CMS 3D CMS Logo

MuonStubMakerBase.h
Go to the documentation of this file.
1 #ifndef L1T_OmtfP1_MUONSTUBMAKERBASE_H
2 #define L1T_OmtfP1_MUONSTUBMAKERBASE_H
3 
17 #include <cstdint>
18 #include <memory>
19 #include <vector>
20 
22 
23 namespace edm {
24  class EventSetup;
25 }
26 
32 };
33 
35 public:
37 
38  virtual void loadDigis(const edm::Event& event) = 0;
39 
40  virtual void makeStubs(
41  MuonStubPtrs2D& muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo) = 0;
42 };
43 
45 public:
49 
51 
52  //virtual void initialize(const edm::ParameterSet& edmCfg, const edm::EventSetup& es, const ProcConfigurationBase* procConf) {} //TODO is it needed at all?
53 
54  void loadDigis(const edm::Event& event) override;
55 
56  void makeStubs(
57  MuonStubPtrs2D& muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo) override;
58 
59  //dtThDigis is provided as argument, because in the OMTF implementation the phi and eta digis are merged (even thought it is artificial)
60  virtual void addDTphiDigi(MuonStubPtrs2D& muonStubsInLayers,
61  const L1MuDTChambPhDigi& digi,
63  unsigned int iProcessor,
64  l1t::tftype procTyp) = 0;
65 
66  virtual void addDTetaStubs(MuonStubPtrs2D& muonStubsInLayers,
67  const L1MuDTChambThDigi& thetaDigi,
68  unsigned int iProcessor,
69  l1t::tftype procTyp) = 0;
70 
71  virtual bool acceptDigi(const DTChamberId& dTChamberId, unsigned int iProcessor, l1t::tftype procType) {
72  return true;
73  }
74 
75 protected:
76  bool mergePhiAndTheta = true;
77 
80 
83 };
84 
86 public:
90 
92 
93  //virtual void initialize(const edm::ParameterSet& edmCfg, const edm::EventSetup& es, const ProcConfigurationBase* procConf) {} //TODO is it needed at all?
94 
95  void loadDigis(const edm::Event& event) override { event.getByToken(inputTokenCsc, cscDigis); }
96 
97  void makeStubs(
98  MuonStubPtrs2D& muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo) override;
99 
100  //can add both phi and eta stubs
101  virtual void addCSCstubs(MuonStubPtrs2D& muonStubsInLayers,
102  unsigned int rawid,
103  const CSCCorrelatedLCTDigi& digi,
104  unsigned int iProcessor,
105  l1t::tftype procTyp) = 0;
106 
107  virtual bool acceptDigi(const CSCDetId& cscDetId, unsigned int iProcessor, l1t::tftype procType) { return true; }
108 
109 protected:
111 
112  bool mergePhiAndTheta = true;
113 
116 };
117 
119 public:
124 
126 
127  //virtual void initialize(const edm::ParameterSet& edmCfg, const edm::EventSetup& es, const ProcConfigurationBase* procConf) {} //TODO is it needed at all?
128 
129  void loadDigis(const edm::Event& event) override { event.getByToken(inputTokenRpc, rpcDigis); }
130 
131  void makeStubs(
132  MuonStubPtrs2D& muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo) override;
133 
134  virtual void addRPCstub(MuonStubPtrs2D& muonStubsInLayers,
135  const RPCDetId& roll,
136  const RpcCluster& cluster,
137  unsigned int iProcessor,
138  l1t::tftype procTyp) = 0;
139 
140  virtual bool acceptDigi(const RPCDetId& rpcDetId, unsigned int iProcessor, l1t::tftype procType) { return true; }
141 
142 protected:
144 
145  bool mergePhiAndTheta = true;
146 
149 
151 };
152 
153 //forward declaration - MuonGeometryTokens is defined and used in the AngleConverterBase
154 struct MuonGeometryTokens;
155 
157 public:
158  MuonStubMakerBase(const ProcConfigurationBase* procConf);
159 
160  virtual ~MuonStubMakerBase();
161 
162  virtual void initialize(const edm::ParameterSet& edmCfg,
163  const edm::EventSetup& es,
164  const MuonGeometryTokens& muonGeometryTokens);
165 
166  void loadAndFilterDigis(const edm::Event& event);
167 
170  MuonStubPtrs2D& muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom = 0, int bxTo = 0);
171 
172 protected:
173  const ProcConfigurationBase* config = nullptr;
174 
175  std::vector<std::unique_ptr<DigiToStubsConverterBase> > digiToStubsConverters;
176 
178 };
179 
180 #endif
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > inputTokenCSC
virtual void loadDigis(const edm::Event &event)=0
edm::EDGetTokenT< RPCDigiCollection > inputTokenRpc
virtual bool acceptDigi(const CSCDetId &cscDetId, unsigned int iProcessor, l1t::tftype procType)
virtual void addCSCstubs(MuonStubPtrs2D &muonStubsInLayers, unsigned int rawid, const CSCCorrelatedLCTDigi &digi, unsigned int iProcessor, l1t::tftype procTyp)=0
void loadDigis(const edm::Event &event) override
CscDigiToStubsConverter(const ProcConfigurationBase *config, edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > inputTokenCsc)
virtual bool acceptDigi(const RPCDetId &rpcDetId, unsigned int iProcessor, l1t::tftype procType)
void buildInputForProcessor(MuonStubPtrs2D &muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom=0, int bxTo=0)
Method translating trigger digis into input matrix with global phi coordinates, fills the muonStubsIn...
edm::Handle< L1MuDTChambThContainer > dtThDigis
~DtDigiToStubsConverter() override
Definition: config.py:1
void loadAndFilterDigis(const edm::Event &event)
RpcDigiToStubsConverter(const ProcConfigurationBase *config, edm::EDGetTokenT< RPCDigiCollection > inputTokenRpc, const RpcClusterization *rpcClusterization)
edm::EDGetTokenT< RPCDigiCollection > inputTokenRPC
std::vector< MuonStubPtrs1D > MuonStubPtrs2D
Definition: MuonStub.h:67
MuonStubMakerBase(const ProcConfigurationBase *procConf)
const ProcConfigurationBase * config
void makeStubs(MuonStubPtrs2D &muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo) override
const ProcConfigurationBase * config
DtDigiToStubsConverter(edm::EDGetTokenT< L1MuDTChambPhContainer > inputTokenDtPh, edm::EDGetTokenT< L1MuDTChambThContainer > inputTokenDtTh)
virtual void addDTphiDigi(MuonStubPtrs2D &muonStubsInLayers, const L1MuDTChambPhDigi &digi, const L1MuDTChambThContainer *dtThDigis, unsigned int iProcessor, l1t::tftype procTyp)=0
edm::EDGetTokenT< L1MuDTChambPhContainer > inputTokenDtPh
virtual void makeStubs(MuonStubPtrs2D &muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo)=0
void makeStubs(MuonStubPtrs2D &muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo) override
const RpcClusterization * rpcClusterization
edm::EDGetTokenT< L1MuDTChambThContainer > inputTokenDtTh
edm::Handle< RPCDigiCollection > rpcDigis
virtual void initialize(const edm::ParameterSet &edmCfg, const edm::EventSetup &es, const MuonGeometryTokens &muonGeometryTokens)
virtual void addDTetaStubs(MuonStubPtrs2D &muonStubsInLayers, const L1MuDTChambThDigi &thetaDigi, unsigned int iProcessor, l1t::tftype procTyp)=0
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > inputTokenCsc
std::vector< std::unique_ptr< DigiToStubsConverterBase > > digiToStubsConverters
void loadDigis(const edm::Event &event) override
edm::EDGetTokenT< L1MuDTChambThContainer > inputTokenDtTh
virtual void addRPCstub(MuonStubPtrs2D &muonStubsInLayers, const RPCDetId &roll, const RpcCluster &cluster, unsigned int iProcessor, l1t::tftype procTyp)=0
void makeStubs(MuonStubPtrs2D &muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo) override
edm::EDGetTokenT< L1MuDTChambPhContainer > inputTokenDtPh
virtual bool acceptDigi(const DTChamberId &dTChamberId, unsigned int iProcessor, l1t::tftype procType)
HLT enums.
edm::Handle< L1MuDTChambPhContainer > dtPhDigis
RpcClusterization rpcClusterization
edm::Handle< CSCCorrelatedLCTDigiCollection > cscDigis
void loadDigis(const edm::Event &event) override
Definition: event.py:1