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 
18 #include <cstdint>
19 #include <memory>
20 #include <vector>
21 
23 
24 namespace edm {
25  class EventSetup;
26 }
27 
33 };
34 
36 public:
38 
39  virtual void loadDigis(const edm::Event& event) = 0;
40 
41  virtual void makeStubs(MuonStubPtrs2D& muonStubsInLayers,
42  unsigned int iProcessor,
43  l1t::tftype procTyp,
44  int bxFrom,
45  int bxTo,
46  std::vector<std::unique_ptr<IOMTFEmulationObserver> >& observers) = 0;
47 };
48 
50 public:
54 
56 
57  //virtual void initialize(const edm::ParameterSet& edmCfg, const edm::EventSetup& es, const ProcConfigurationBase* procConf) {} //TODO is it needed at all?
58 
59  void loadDigis(const edm::Event& event) override;
60 
61  void makeStubs(MuonStubPtrs2D& muonStubsInLayers,
62  unsigned int iProcessor,
63  l1t::tftype procTyp,
64  int bxFrom,
65  int bxTo,
66  std::vector<std::unique_ptr<IOMTFEmulationObserver> >& observers) override;
67 
68  //dtThDigis is provided as argument, because in the OMTF implementation the phi and eta digis are merged (even thought it is artificial)
69  virtual void addDTphiDigi(MuonStubPtrs2D& muonStubsInLayers,
70  const L1MuDTChambPhDigi& digi,
72  unsigned int iProcessor,
73  l1t::tftype procTyp) = 0;
74 
75  virtual void addDTetaStubs(MuonStubPtrs2D& muonStubsInLayers,
76  const L1MuDTChambThDigi& thetaDigi,
77  unsigned int iProcessor,
78  l1t::tftype procTyp) = 0;
79 
80  virtual bool acceptDigi(const DTChamberId& dTChamberId, unsigned int iProcessor, l1t::tftype procType) {
81  return true;
82  }
83 
84 protected:
85  bool mergePhiAndTheta = true;
86 
89 
92 };
93 
95 public:
99 
101 
102  //virtual void initialize(const edm::ParameterSet& edmCfg, const edm::EventSetup& es, const ProcConfigurationBase* procConf) {} //TODO is it needed at all?
103 
104  void loadDigis(const edm::Event& event) override { event.getByToken(inputTokenCsc, cscDigis); }
105 
106  void makeStubs(MuonStubPtrs2D& muonStubsInLayers,
107  unsigned int iProcessor,
108  l1t::tftype procTyp,
109  int bxFrom,
110  int bxTo,
111  std::vector<std::unique_ptr<IOMTFEmulationObserver> >& observers) override;
112 
113  //can add both phi and eta stubs
114  virtual void addCSCstubs(MuonStubPtrs2D& muonStubsInLayers,
115  unsigned int rawid,
116  const CSCCorrelatedLCTDigi& digi,
117  unsigned int iProcessor,
118  l1t::tftype procTyp) = 0;
119 
120  virtual bool acceptDigi(const CSCDetId& cscDetId, unsigned int iProcessor, l1t::tftype procType) { return true; }
121 
122 protected:
124 
125  bool mergePhiAndTheta = true;
126 
129 };
130 
132 public:
137 
139 
140  //virtual void initialize(const edm::ParameterSet& edmCfg, const edm::EventSetup& es, const ProcConfigurationBase* procConf) {} //TODO is it needed at all?
141 
142  void loadDigis(const edm::Event& event) override { event.getByToken(inputTokenRpc, rpcDigis); }
143 
144  void makeStubs(MuonStubPtrs2D& muonStubsInLayers,
145  unsigned int iProcessor,
146  l1t::tftype procTyp,
147  int bxFrom,
148  int bxTo,
149  std::vector<std::unique_ptr<IOMTFEmulationObserver> >& observers) override;
150 
151  virtual void addRPCstub(MuonStubPtrs2D& muonStubsInLayers,
152  const RPCDetId& roll,
153  const RpcCluster& cluster,
154  unsigned int iProcessor,
155  l1t::tftype procTyp) = 0;
156 
157  virtual bool acceptDigi(const RPCDetId& rpcDetId, unsigned int iProcessor, l1t::tftype procType) { return true; }
158 
159 protected:
161 
162  bool mergePhiAndTheta = true;
163 
166 
168 };
169 
170 //forward declaration - MuonGeometryTokens is defined and used in the AngleConverterBase
171 struct MuonGeometryTokens;
172 
174 public:
175  MuonStubMakerBase(const ProcConfigurationBase* procConf);
176 
177  virtual ~MuonStubMakerBase();
178 
179  virtual void initialize(const edm::ParameterSet& edmCfg,
180  const edm::EventSetup& es,
181  const MuonGeometryTokens& muonGeometryTokens);
182 
183  void loadAndFilterDigis(const edm::Event& event);
184 
186  void buildInputForProcessor(MuonStubPtrs2D& muonStubsInLayers,
187  unsigned int iProcessor,
188  l1t::tftype procTyp,
189  int bxFrom,
190  int bxTo,
191  std::vector<std::unique_ptr<IOMTFEmulationObserver> >& observers);
192 
193 protected:
194  const ProcConfigurationBase* config = nullptr;
195 
196  std::vector<std::unique_ptr<DigiToStubsConverterBase> > digiToStubsConverters;
197 
199 };
200 
201 #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)
void buildInputForProcessor(MuonStubPtrs2D &muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo, std::vector< std::unique_ptr< IOMTFEmulationObserver > > &observers)
Method translating trigger digis into input matrix with global phi coordinates, fills the muonStubsIn...
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)
void makeStubs(MuonStubPtrs2D &muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo, std::vector< std::unique_ptr< IOMTFEmulationObserver > > &observers) override
void makeStubs(MuonStubPtrs2D &muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo, std::vector< std::unique_ptr< IOMTFEmulationObserver > > &observers) override
virtual bool acceptDigi(const RPCDetId &rpcDetId, unsigned int iProcessor, l1t::tftype procType)
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:69
MuonStubMakerBase(const ProcConfigurationBase *procConf)
const ProcConfigurationBase * config
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
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)
void makeStubs(MuonStubPtrs2D &muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo, std::vector< std::unique_ptr< IOMTFEmulationObserver > > &observers) override
virtual void makeStubs(MuonStubPtrs2D &muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo, std::vector< std::unique_ptr< IOMTFEmulationObserver > > &observers)=0
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
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