CMS 3D CMS Logo

DTTrig.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
10 //
11 //--------------------------------------------------
12 #ifndef DT_TRIG_H
13 #define DT_TRIG_H
14 
15 //---------------
16 // C++ Headers --
17 //---------------
18 #include <map>
19 #include <string>
20 
21 //------------------------------------
22 // Collaborating Class Declarations --
23 //------------------------------------
43 
50 
51 #include <memory>
52 
53 class InputTag;
54 
55 // ---------------------
56 // -- Class Interface --
57 // ---------------------
58 
59 class DTTrig {
60 public:
61  typedef std::map<DTChamberId, DTSCTrigUnit, std::less<DTChamberId> > TUcontainer;
62  typedef TUcontainer::iterator TU_iterator;
63  typedef TUcontainer::const_iterator TU_const_iterator;
64  typedef std::map<DTSectCollId, DTSectColl, std::less<DTSectCollId> > SCcontainer;
65  typedef SCcontainer::iterator SC_iterator;
66  typedef SCcontainer::const_iterator SC_const_iterator;
67  typedef std::pair<TU_iterator, TU_iterator> Range;
68  typedef std::pair<SC_iterator, SC_iterator> SCRange;
69  typedef std::map<DTChamberId, DTDigiCollection, std::less<DTChamberId> > DTDigiMap;
70  typedef DTDigiMap::iterator DTDigiMap_iterator;
71  typedef DTDigiMap::const_iterator DTDigiMap_const_iterator;
72 
73 public:
76 
78  void createTUs(const edm::EventSetup& iSetup);
79 
81  void updateES(const edm::EventSetup& iSetup);
82 
84  void triggerReco(const edm::Event& iEvent, const edm::EventSetup& iSetup);
85 
87  void clear();
88 
90  int size() const { return _cache.size(); }
91 
93  TU_iterator begin() { /*check();*/
94  return _cache.begin();
95  }
96 
98  TU_iterator end() { /*check();*/
99  return _cache.end();
100  }
101 
103  TU_iterator find(DTChamberId id) { /*check();*/
104  return _cache.find(id);
105  }
106 
108  Range cache() { /*check();*/
109  return Range(_cache.begin(), _cache.end());
110  }
111 
112  // ------------ do the same for Sector Collector
113 
115  int size1() const { /*check();*/
116  return _cache1.size();
117  }
118 
120  SC_iterator begin1() { /*check();*/
121  return _cache1.begin();
122  }
123 
125  SC_iterator end1() { /*check();*/
126  return _cache1.end();
127  }
128 
130  SC_iterator find1(DTSectCollId id) { /*check();*/
131  return _cache1.find(id);
132  }
133 
135  SCRange cache1() { /*check();*/
136  return SCRange(_cache1.begin(), _cache1.end());
137  }
138 
141 
143  DTSCTrigUnit* trigUnit(int wheel, int stat, int sect);
144 
147 
150 
152  DTChambPhSegm* chPhiSegm1(int wheel, int stat, int sect, int step);
153 
156 
159 
161  DTChambPhSegm* chPhiSegm2(int wheel, int stat, int sect, int step);
162 
165 
168 
170  DTChambThSegm* chThetaSegm(int wheel, int stat, int sect, int step);
171 
172  // sector collector
173 
176 
178  DTSectCollPhSegm* chSectCollPhSegm1(int wheel, int sect, int step);
179 
182 
184  DTSectCollPhSegm* chSectCollPhSegm2(int wheel, int sect, int step);
185 
188 
190  DTSectCollThSegm* chSectCollThSegm(int wheel, int sect, int step);
191 
192  // end sector collector
193 
195  void dumpGeom() const;
196 
198  void dumpLuts(short int lut_btic, const DTConfigManager* conf) const;
199 
201  int getBXOffset() const { return _conf_manager->getBXOffset(); }
202 
203  // Methods to access intermediate results
204 
206  std::vector<DTBtiTrigData> BtiTrigs() const;
207 
209  std::vector<DTTracoTrigData> TracoTrigs() const;
210 
212  std::vector<DTChambPhSegm> TSPhTrigs() const;
213 
215  std::vector<DTChambThSegm> TSThTrigs() const;
216 
218  std::vector<DTSectCollPhSegm> SCPhTrigs() const;
219 
221  std::vector<DTSectCollThSegm> SCThTrigs() const;
222 
225  return constTrigUnit(trig->ChamberId())->localPosition(trig);
226  }
227 
229  GlobalPoint CMSPosition(const DTTrigData* trig) const { return constTrigUnit(trig->ChamberId())->CMSPosition(trig); }
230 
233  return constTrigUnit(trig->ChamberId())->localDirection(trig);
234  }
235 
238  return constTrigUnit(trig->ChamberId())->CMSDirection(trig);
239  }
240 
242  void print(DTTrigData* trig) const { constTrigUnit(trig->ChamberId())->print(trig); }
243 
244 private:
245  // const version of the methods to access TUs and SCs are private to avoid misuse
247  DTSCTrigUnit const* constTrigUnit(DTChamberId sid) const;
248 
250  DTSCTrigUnit const* constTrigUnit(int wheel, int stat, int sect) const;
251 
253  DTSectColl const* SCUnit(DTSectCollId scid) const;
254 
256  DTSectColl const* SCUnit(int wheel, int sect) const;
257 
258 private:
259  TUcontainer _cache; // Trigger units
260  SCcontainer _cache1; // Sector Collector units
261  const DTConfigManager* _conf_manager; // Configuration Manager class pointer
266  bool _debug; // Debug flag
268 
269  unsigned long long _configid;
270  unsigned long long _geomid;
271 };
272 
273 #endif
Vector3DBase< float, LocalTag >
DTTrig::cache
Range cache()
Begin of the trigger units store.
Definition: DTTrig.h:108
DTTrig::TUcontainer
std::map< DTChamberId, DTSCTrigUnit, std::less< DTChamberId > > TUcontainer
Definition: DTTrig.h:61
DTTrig::_inputexist
bool _inputexist
Definition: DTTrig.h:267
DTTracoTrigData.h
DTTrig::TSThTrigs
std::vector< DTChambThSegm > TSThTrigs() const
Return a copy of all the Trigger Server (Theta) triggers.
Definition: DTTrig.cc:453
DTTrig::SCUnit
DTSectColl const * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:264
DTTrig::getBXOffset
int getBXOffset() const
Get BX Offset.
Definition: DTTrig.h:201
DTTrig::Range
std::pair< TU_iterator, TU_iterator > Range
Definition: DTTrig.h:67
DTTrig::TU_iterator
TUcontainer::iterator TU_iterator
Definition: DTTrig.h:62
step
step
Definition: StallMonitor.cc:94
DTSectColl
Definition: DTSectColl.h:56
DTTrig::_cache
TUcontainer _cache
Definition: DTTrig.h:259
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
DTLayerId.h
DTChambThSegm.h
DTTrig::clear
void clear()
Clear the trigger units cache.
Definition: DTTrig.cc:239
DTChambPhSegm.h
DTTrig::_configid
unsigned long long _configid
Definition: DTTrig.h:269
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
DTTrig::SC_const_iterator
SCcontainer::const_iterator SC_const_iterator
Definition: DTTrig.h:66
DTTrig::chPhiSegm1
DTChambPhSegm * chPhiSegm1(DTChamberId sid, int step)
Return the first phi track segment in req. chamber/step.
Definition: DTTrig.cc:315
DTTrig::begin1
SC_iterator begin1()
Begin of the sector collector store.
Definition: DTTrig.h:120
DTTrig::SCPhTrigs
std::vector< DTSectCollPhSegm > SCPhTrigs() const
Return a copy of all the Sector Collector (Phi) triggers.
Definition: DTTrig.cc:466
DTTrig::BtiTrigs
std::vector< DTBtiTrigData > BtiTrigs() const
Return a copy of all the BTI triggers.
Definition: DTTrig.cc:414
DTTrig::constTrigUnit
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:249
DTSectCollId.h
DTConfigManager.h
DTSectCollThSegm
Definition: DTSectCollThSegm.h:38
DTTrig::TracoTrigs
std::vector< DTTracoTrigData > TracoTrigs() const
Return a copy of all the TRACO triggers.
Definition: DTTrig.cc:427
ESGetToken.h
DTTrig::end
TU_iterator end()
End of the trigger units store.
Definition: DTTrig.h:98
DTTrig::updateES
void updateES(const edm::EventSetup &iSetup)
update the eventsetup info
Definition: DTTrig.cc:207
DTTrig::_cache1
SCcontainer _cache1
Definition: DTTrig.h:260
DTTrig::DTDigiMap
std::map< DTChamberId, DTDigiCollection, std::less< DTChamberId > > DTDigiMap
Definition: DTTrig.h:69
DTTrig::_debug
bool _debug
Definition: DTTrig.h:266
DTTrig::triggerReco
void triggerReco(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Run the whole trigger reconstruction chain.
Definition: DTTrig.cc:132
DTTrig::TSPhTrigs
std::vector< DTChambPhSegm > TSPhTrigs() const
Return a copy of all the Trigger Server (Phi) triggers.
Definition: DTTrig.cc:440
DTTrig::find1
SC_iterator find1(DTSectCollId id)
Find a Sector Collector in the map.
Definition: DTTrig.h:130
DTTrig::chPhiSegm2
DTChambPhSegm * chPhiSegm2(DTChamberId sid, int step)
Return the second phi track segment in req. chamber/step.
Definition: DTTrig.cc:317
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1119
DTChambThSegm
Definition: DTChambThSegm.h:39
DTTrig::chSectCollPhSegm2
DTSectCollPhSegm * chSectCollPhSegm2(DTSectColl *unit, int step)
Return the second phi track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:357
DTSectCollId
Definition: DTSectCollId.h:18
DTSCTrigUnit.h
DTTrig::begin
TU_iterator begin()
Begin of the trigger units store.
Definition: DTTrig.h:93
DTTrig::DTTrig
DTTrig(const edm::ParameterSet &params, edm::ConsumesCollector &&ix)
Constructors.
Definition: DTTrig.cc:46
Point3DBase< float, LocalTag >
DTChamberId.h
DTTrig::trigUnit
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:245
DTTrig::CMSPosition
GlobalPoint CMSPosition(const DTTrigData *trig) const
Coordinate of a trigger-data object in CMS frame.
Definition: DTTrig.h:229
DTTrig::_geomid
unsigned long long _geomid
Definition: DTTrig.h:270
DTGeometry.h
DTSectColl.h
DTTrig::chSectCollPhSegm1
DTSectCollPhSegm * chSectCollPhSegm1(DTSectColl *unit, int step)
Return the first phi track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:349
DTConfigManager::getBXOffset
int getBXOffset() const
Get BX Offset for a given vdrift config.
Definition: DTConfigManager.cc:173
edm::ParameterSet
Definition: ParameterSet.h:47
DTTrig::localPosition
LocalPoint localPosition(const DTTrigData *trig) const
Coordinate of a trigger-data object in chamber frame.
Definition: DTTrig.h:224
DTTrig::chThetaSegm
DTChambThSegm * chThetaSegm(DTChamberId sid, int step)
Return the theta candidates in req. chamber/step.
Definition: DTTrig.cc:319
DTTrigData
Definition: DTTrigData.h:35
DTTrig::cache1
SCRange cache1()
Range of the sector collector store.
Definition: DTTrig.h:135
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
DTTrig::dtGeomBeginRunToken_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomBeginRunToken_
Definition: DTTrig.h:264
iEvent
int iEvent
Definition: GenABIO.cc:224
DTTrig::localDirection
LocalVector localDirection(const DTTrigData *trig) const
Direction of a trigger-data object in chamber frame.
Definition: DTTrig.h:232
DTTrig::_digitag
edm::InputTag _digitag
Definition: DTTrig.h:262
DTSectCollPhSegm
Definition: DTSectCollPhSegm.h:39
DTTrig::SCThTrigs
std::vector< DTSectCollThSegm > SCThTrigs() const
Return a copy of all the Sector Collector (Theta) triggers.
Definition: DTTrig.cc:489
edm::EventSetup
Definition: EventSetup.h:57
DTConfigManager
Definition: DTConfigManager.h:49
ClusterTask_cfi.trig
trig
Definition: ClusterTask_cfi.py:398
DTTrig::size1
int size1() const
Size of the sector collector store.
Definition: DTTrig.h:115
edm::ESGetToken< DTGeometry, MuonGeometryRecord >
DTTrig::dumpGeom
void dumpGeom() const
Dump the geometry.
Definition: DTTrig.cc:392
DTSCTrigUnit
Definition: DTSCTrigUnit.h:50
DTTrig::chSectCollThSegm
DTSectCollThSegm * chSectCollThSegm(DTSectColl *unit, int step)
Return the theta track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:378
DTTrig::dumpLuts
void dumpLuts(short int lut_btic, const DTConfigManager *conf) const
Dump the LUT files.
Definition: DTTrig.cc:399
unit
Basic3DVector unit() const
Definition: Basic3DVectorLD.h:162
DTTrig::SCcontainer
std::map< DTSectCollId, DTSectColl, std::less< DTSectCollId > > SCcontainer
Definition: DTTrig.h:64
DTTrig::SCRange
std::pair< SC_iterator, SC_iterator > SCRange
Definition: DTTrig.h:68
DTTrig::dtGeomToken_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
Definition: DTTrig.h:263
DTConfigManagerRcd.h
DTTrig::createTUs
void createTUs(const edm::EventSetup &iSetup)
Create the trigger units and store them in the cache.
Definition: DTTrig.cc:63
DTWireId.h
DTTrig
Definition: DTTrig.h:59
LocalPoint.h
DTChambPhSegm
Definition: DTChambPhSegm.h:41
DTTrig::DTDigiMap_iterator
DTDigiMap::iterator DTDigiMap_iterator
Definition: DTTrig.h:70
GlobalVector.h
DTTrig::confToken_
edm::ESGetToken< DTConfigManager, DTConfigManagerRcd > confToken_
Definition: DTTrig.h:265
DTTrig::TU_const_iterator
TUcontainer::const_iterator TU_const_iterator
Definition: DTTrig.h:63
DTTrigData.h
DTTrig::print
void print(DTTrigData *trig) const
Print a trigger-data object.
Definition: DTTrig.h:242
DTTrig::end1
SC_iterator end1()
End of the sectoor collector store.
Definition: DTTrig.h:125
DTTrig::find
TU_iterator find(DTChamberId id)
Find a trigger unit in the map.
Definition: DTTrig.h:103
ConsumesCollector.h
DTDigiCollection.h
DTChamberId
Definition: DTChamberId.h:14
DTTrig::SC_iterator
SCcontainer::iterator SC_iterator
Definition: DTTrig.h:65
ParameterSet.h
DTBtiTrigData.h
DTSuperLayerId.h
MuonGeometryRecord.h
edm::Event
Definition: Event.h:73
LocalVector.h
DTTrig::CMSDirection
GlobalVector CMSDirection(const DTTrigData *trig) const
Direction of a trigger-data object in CMS frame.
Definition: DTTrig.h:237
GlobalPoint.h
edm::InputTag
Definition: InputTag.h:15
DTTrig::size
int size() const
Size of the trigger units store.
Definition: DTTrig.h:90
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
DTTrig::_conf_manager
const DTConfigManager * _conf_manager
Definition: DTTrig.h:261
DTTrig::DTDigiMap_const_iterator
DTDigiMap::const_iterator DTDigiMap_const_iterator
Definition: DTTrig.h:71