Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring of Phase1 OMTF emulator code #43687

Merged
merged 4 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 0 additions & 59 deletions L1Trigger/L1TMuonOverlapPhase1/interface/AlgoMuonBase.h

This file was deleted.

6 changes: 2 additions & 4 deletions L1Trigger/L1TMuonOverlapPhase1/interface/AngleConverterBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ class AngleConverterBase {
/// phiZero - desired phi where the scale should start, should be in the desired scale, use getProcessorPhiZero to obtain it
virtual int getProcessorPhi(int phiZero, l1t::tftype part, int dtScNum, int dtPhi) const;

virtual int getProcessorPhi(int phiZero,
l1t::tftype part,
const CSCDetId& csc,
const CSCCorrelatedLCTDigi& digi) const;
virtual int getProcessorPhi(
int phiZero, l1t::tftype part, const CSCDetId& csc, const CSCCorrelatedLCTDigi& digi, unsigned int iInput) const;

virtual int getProcessorPhi(unsigned int iProcessor,
l1t::tftype part,
Expand Down
4 changes: 3 additions & 1 deletion L1Trigger/L1TMuonOverlapPhase1/interface/MuonStub.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct MuonStub {
static const int EMTPY_PHI = 0xffffff;

int etaHw = 0;
int etaSigmaHw = 0; ///error of the eta measurement
int r = 0; //[cm] distance from beam pipe
int qualityHw = 0;

int bx = 0;
Expand All @@ -52,6 +52,8 @@ struct MuonStub {
//used to address LUTs
unsigned int logicLayer = 0;

unsigned int input = 0;

//int roll = 0; //TODO remove

int detId = 0;
Expand Down
41 changes: 31 additions & 10 deletions L1Trigger/L1TMuonOverlapPhase1/interface/MuonStubMakerBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "FWCore/Utilities/interface/EDGetToken.h"
#include "L1Trigger/L1TMuonOverlapPhase1/interface/MuonStub.h"
#include "L1Trigger/L1TMuonOverlapPhase1/interface/RpcClusterization.h"
#include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/IOMTFEmulationObserver.h"
#include <cstdint>
#include <memory>
#include <vector>
Expand All @@ -37,8 +38,12 @@ class DigiToStubsConverterBase {

virtual void loadDigis(const edm::Event& event) = 0;

virtual void makeStubs(
MuonStubPtrs2D& muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo) = 0;
virtual void makeStubs(MuonStubPtrs2D& muonStubsInLayers,
unsigned int iProcessor,
l1t::tftype procTyp,
int bxFrom,
int bxTo,
std::vector<std::unique_ptr<IOMTFEmulationObserver> >& observers) = 0;
};

class DtDigiToStubsConverter : public DigiToStubsConverterBase {
Expand All @@ -53,8 +58,12 @@ class DtDigiToStubsConverter : public DigiToStubsConverterBase {

void loadDigis(const edm::Event& event) override;

void makeStubs(
MuonStubPtrs2D& muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo) override;
void makeStubs(MuonStubPtrs2D& muonStubsInLayers,
unsigned int iProcessor,
l1t::tftype procTyp,
int bxFrom,
int bxTo,
std::vector<std::unique_ptr<IOMTFEmulationObserver> >& observers) override;

//dtThDigis is provided as argument, because in the OMTF implementation the phi and eta digis are merged (even thought it is artificial)
virtual void addDTphiDigi(MuonStubPtrs2D& muonStubsInLayers,
Expand Down Expand Up @@ -94,8 +103,12 @@ class CscDigiToStubsConverter : public DigiToStubsConverterBase {

void loadDigis(const edm::Event& event) override { event.getByToken(inputTokenCsc, cscDigis); }

void makeStubs(
MuonStubPtrs2D& muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo) override;
void makeStubs(MuonStubPtrs2D& muonStubsInLayers,
unsigned int iProcessor,
l1t::tftype procTyp,
int bxFrom,
int bxTo,
std::vector<std::unique_ptr<IOMTFEmulationObserver> >& observers) override;

//can add both phi and eta stubs
virtual void addCSCstubs(MuonStubPtrs2D& muonStubsInLayers,
Expand Down Expand Up @@ -128,8 +141,12 @@ class RpcDigiToStubsConverter : public DigiToStubsConverterBase {

void loadDigis(const edm::Event& event) override { event.getByToken(inputTokenRpc, rpcDigis); }

void makeStubs(
MuonStubPtrs2D& muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo) override;
void makeStubs(MuonStubPtrs2D& muonStubsInLayers,
unsigned int iProcessor,
l1t::tftype procTyp,
int bxFrom,
int bxTo,
std::vector<std::unique_ptr<IOMTFEmulationObserver> >& observers) override;

virtual void addRPCstub(MuonStubPtrs2D& muonStubsInLayers,
const RPCDetId& roll,
Expand Down Expand Up @@ -166,8 +183,12 @@ class MuonStubMakerBase {
void loadAndFilterDigis(const edm::Event& event);

///Method translating trigger digis into input matrix with global phi coordinates, fills the muonStubsInLayers
void buildInputForProcessor(
MuonStubPtrs2D& muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom = 0, int bxTo = 0);
void buildInputForProcessor(MuonStubPtrs2D& muonStubsInLayers,
unsigned int iProcessor,
l1t::tftype procTyp,
int bxFrom,
int bxTo,
std::vector<std::unique_ptr<IOMTFEmulationObserver> >& observers);

protected:
const ProcConfigurationBase* config = nullptr;
Expand Down
Loading