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 
45 
46 #include <memory>
47 
48 class InputTag;
49 
50 // ---------------------
51 // -- Class Interface --
52 // ---------------------
53 
54 class DTTrig {
55 public:
56  typedef std::map<DTChamberId, DTSCTrigUnit, std::less<DTChamberId> > TUcontainer;
57  typedef TUcontainer::iterator TU_iterator;
58  typedef TUcontainer::const_iterator TU_const_iterator;
59  typedef std::map<DTSectCollId, DTSectColl, std::less<DTSectCollId> > SCcontainer;
60  typedef SCcontainer::iterator SC_iterator;
61  typedef SCcontainer::const_iterator SC_const_iterator;
62  typedef std::pair<TU_iterator, TU_iterator> Range;
63  typedef std::pair<SC_iterator, SC_iterator> SCRange;
64  typedef std::map<DTChamberId, DTDigiCollection, std::less<DTChamberId> > DTDigiMap;
65  typedef DTDigiMap::iterator DTDigiMap_iterator;
66  typedef DTDigiMap::const_iterator DTDigiMap_const_iterator;
67 
68 public:
71 
73  void createTUs(const edm::EventSetup& iSetup);
74 
76  void updateES(const edm::EventSetup& iSetup);
77 
79  void triggerReco(const edm::Event& iEvent, const edm::EventSetup& iSetup);
80 
82  void clear();
83 
85  int size() const { return _cache.size(); }
86 
88  TU_iterator begin() { /*check();*/
89  return _cache.begin();
90  }
91 
93  TU_iterator end() { /*check();*/
94  return _cache.end();
95  }
96 
98  TU_iterator find(DTChamberId id) { /*check();*/
99  return _cache.find(id);
100  }
101 
103  Range cache() { /*check();*/
104  return Range(_cache.begin(), _cache.end());
105  }
106 
107  // ------------ do the same for Sector Collector
108 
110  int size1() const { /*check();*/
111  return _cache1.size();
112  }
113 
115  SC_iterator begin1() { /*check();*/
116  return _cache1.begin();
117  }
118 
120  SC_iterator end1() { /*check();*/
121  return _cache1.end();
122  }
123 
125  SC_iterator find1(DTSectCollId id) { /*check();*/
126  return _cache1.find(id);
127  }
128 
130  SCRange cache1() { /*check();*/
131  return SCRange(_cache1.begin(), _cache1.end());
132  }
133 
136 
138  DTSCTrigUnit* trigUnit(int wheel, int stat, int sect);
139 
142 
145 
147  DTChambPhSegm* chPhiSegm1(int wheel, int stat, int sect, int step);
148 
151 
154 
156  DTChambPhSegm* chPhiSegm2(int wheel, int stat, int sect, int step);
157 
160 
163 
165  DTChambThSegm* chThetaSegm(int wheel, int stat, int sect, int step);
166 
167  // sector collector
168 
171 
173  DTSectCollPhSegm* chSectCollPhSegm1(int wheel, int sect, int step);
174 
177 
179  DTSectCollPhSegm* chSectCollPhSegm2(int wheel, int sect, int step);
180 
183 
185  DTSectCollThSegm* chSectCollThSegm(int wheel, int sect, int step);
186 
187  // end sector collector
188 
190  void dumpGeom() const;
191 
193  void dumpLuts(short int lut_btic, const DTConfigManager* conf) const;
194 
196  int getBXOffset() const { return _conf_manager->getBXOffset(); }
197 
198  // Methods to access intermediate results
199 
201  std::vector<DTBtiTrigData> BtiTrigs() const;
202 
204  std::vector<DTTracoTrigData> TracoTrigs() const;
205 
207  std::vector<DTChambPhSegm> TSPhTrigs() const;
208 
210  std::vector<DTChambThSegm> TSThTrigs() const;
211 
213  std::vector<DTSectCollPhSegm> SCPhTrigs() const;
214 
216  std::vector<DTSectCollThSegm> SCThTrigs() const;
217 
220  return constTrigUnit(trig->ChamberId())->localPosition(trig);
221  }
222 
224  GlobalPoint CMSPosition(const DTTrigData* trig) const { return constTrigUnit(trig->ChamberId())->CMSPosition(trig); }
225 
228  return constTrigUnit(trig->ChamberId())->localDirection(trig);
229  }
230 
233  return constTrigUnit(trig->ChamberId())->CMSDirection(trig);
234  }
235 
237  void print(DTTrigData* trig) const { constTrigUnit(trig->ChamberId())->print(trig); }
238 
239 private:
240  // const version of the methods to access TUs and SCs are private to avoid misuse
242  DTSCTrigUnit const* constTrigUnit(DTChamberId sid) const;
243 
245  DTSCTrigUnit const* constTrigUnit(int wheel, int stat, int sect) const;
246 
248  DTSectColl const* SCUnit(DTSectCollId scid) const;
249 
251  DTSectColl const* SCUnit(int wheel, int sect) const;
252 
253 private:
254  TUcontainer _cache; // Trigger units
255  SCcontainer _cache1; // Sector Collector units
256  const DTConfigManager* _conf_manager; // Configuration Manager class pointer
258  bool _debug; // Debug flag
260 
261  unsigned long long _configid;
262  unsigned long long _geomid;
263 };
264 
265 #endif
Vector3DBase< float, LocalTag >
DTTrig::cache
Range cache()
Begin of the trigger units store.
Definition: DTTrig.h:103
DTTrig::TUcontainer
std::map< DTChamberId, DTSCTrigUnit, std::less< DTChamberId > > TUcontainer
Definition: DTTrig.h:56
DTTrig::_inputexist
bool _inputexist
Definition: DTTrig.h:259
DTTracoTrigData.h
DTTrig::TSThTrigs
std::vector< DTChambThSegm > TSThTrigs() const
Return a copy of all the Trigger Server (Theta) triggers.
Definition: DTTrig.cc:455
DTTrig::SCUnit
DTSectColl const * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:266
DTTrig::getBXOffset
int getBXOffset() const
Get BX Offset.
Definition: DTTrig.h:196
DTTrig::Range
std::pair< TU_iterator, TU_iterator > Range
Definition: DTTrig.h:62
DTTrig::TU_iterator
TUcontainer::iterator TU_iterator
Definition: DTTrig.h:57
step
step
Definition: StallMonitor.cc:94
DTSectColl
Definition: DTSectColl.h:56
DTTrig::_cache
TUcontainer _cache
Definition: DTTrig.h:254
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:241
DTChambPhSegm.h
DTTrig::_configid
unsigned long long _configid
Definition: DTTrig.h:261
DTTrig::SC_const_iterator
SCcontainer::const_iterator SC_const_iterator
Definition: DTTrig.h:61
DTTrig::chPhiSegm1
DTChambPhSegm * chPhiSegm1(DTChamberId sid, int step)
Return the first phi track segment in req. chamber/step.
Definition: DTTrig.cc:317
DTTrig::begin1
SC_iterator begin1()
Begin of the sector collector store.
Definition: DTTrig.h:115
DTTrig::SCPhTrigs
std::vector< DTSectCollPhSegm > SCPhTrigs() const
Return a copy of all the Sector Collector (Phi) triggers.
Definition: DTTrig.cc:468
DTTrig::BtiTrigs
std::vector< DTBtiTrigData > BtiTrigs() const
Return a copy of all the BTI triggers.
Definition: DTTrig.cc:416
DTTrig::constTrigUnit
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:251
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:429
DTTrig::end
TU_iterator end()
End of the trigger units store.
Definition: DTTrig.h:93
DTTrig::updateES
void updateES(const edm::EventSetup &iSetup)
update the eventsetup info
Definition: DTTrig.cc:209
DTTrig::_cache1
SCcontainer _cache1
Definition: DTTrig.h:255
DTTrig::DTDigiMap
std::map< DTChamberId, DTDigiCollection, std::less< DTChamberId > > DTDigiMap
Definition: DTTrig.h:64
DTTrig::_debug
bool _debug
Definition: DTTrig.h:258
DTTrig::triggerReco
void triggerReco(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Run the whole trigger reconstruction chain.
Definition: DTTrig.cc:134
DTTrig::TSPhTrigs
std::vector< DTChambPhSegm > TSPhTrigs() const
Return a copy of all the Trigger Server (Phi) triggers.
Definition: DTTrig.cc:442
DTTrig::find1
SC_iterator find1(DTSectCollId id)
Find a Sector Collector in the map.
Definition: DTTrig.h:125
DTTrig::chPhiSegm2
DTChambPhSegm * chPhiSegm2(DTChamberId sid, int step)
Return the second phi track segment in req. chamber/step.
Definition: DTTrig.cc:319
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1111
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:359
DTSectCollId
Definition: DTSectCollId.h:18
DTSCTrigUnit.h
DTTrig::begin
TU_iterator begin()
Begin of the trigger units store.
Definition: DTTrig.h:88
DTTrig::DTTrig
DTTrig(const edm::ParameterSet &params, edm::ConsumesCollector &&ix)
Constructors.
Definition: DTTrig.cc:50
Point3DBase< float, LocalTag >
DTChamberId.h
DTTrig::trigUnit
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:247
DTTrig::CMSPosition
GlobalPoint CMSPosition(const DTTrigData *trig) const
Coordinate of a trigger-data object in CMS frame.
Definition: DTTrig.h:224
DTTrig::_geomid
unsigned long long _geomid
Definition: DTTrig.h:262
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:351
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
DTConfigManager::getBXOffset
int getBXOffset() const
Get BX Offset for a given vdrift config.
Definition: DTConfigManager.cc:173
edm::ParameterSet
Definition: ParameterSet.h:36
DTTrig::localPosition
LocalPoint localPosition(const DTTrigData *trig) const
Coordinate of a trigger-data object in chamber frame.
Definition: DTTrig.h:219
DTTrig::chThetaSegm
DTChambThSegm * chThetaSegm(DTChamberId sid, int step)
Return the theta candidates in req. chamber/step.
Definition: DTTrig.cc:321
DTTrigData
Definition: DTTrigData.h:35
DTTrig::cache1
SCRange cache1()
Range of the sector collector store.
Definition: DTTrig.h:130
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
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:227
DTTrig::_digitag
edm::InputTag _digitag
Definition: DTTrig.h:257
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:491
edm::EventSetup
Definition: EventSetup.h:57
DTConfigManager
Definition: DTConfigManager.h:49
ClusterTask_cfi.trig
trig
Definition: ClusterTask_cfi.py:336
DTTrig::size1
int size1() const
Size of the sector collector store.
Definition: DTTrig.h:110
DTTrig::dumpGeom
void dumpGeom() const
Dump the geometry.
Definition: DTTrig.cc:394
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:380
DTTrig::dumpLuts
void dumpLuts(short int lut_btic, const DTConfigManager *conf) const
Dump the LUT files.
Definition: DTTrig.cc:401
unit
Basic3DVector unit() const
Definition: Basic3DVectorLD.h:162
DTTrig::SCcontainer
std::map< DTSectCollId, DTSectColl, std::less< DTSectCollId > > SCcontainer
Definition: DTTrig.h:59
DTTrig::SCRange
std::pair< SC_iterator, SC_iterator > SCRange
Definition: DTTrig.h:63
DTTrig::createTUs
void createTUs(const edm::EventSetup &iSetup)
Create the trigger units and store them in the cache.
Definition: DTTrig.cc:64
DTWireId.h
DTTrig
Definition: DTTrig.h:54
LocalPoint.h
DTChambPhSegm
Definition: DTChambPhSegm.h:41
DTTrig::DTDigiMap_iterator
DTDigiMap::iterator DTDigiMap_iterator
Definition: DTTrig.h:65
GlobalVector.h
DTTrig::TU_const_iterator
TUcontainer::const_iterator TU_const_iterator
Definition: DTTrig.h:58
DTTrigData.h
DTTrig::print
void print(DTTrigData *trig) const
Print a trigger-data object.
Definition: DTTrig.h:237
DTTrig::end1
SC_iterator end1()
End of the sectoor collector store.
Definition: DTTrig.h:120
DTTrig::find
TU_iterator find(DTChamberId id)
Find a trigger unit in the map.
Definition: DTTrig.h:98
ConsumesCollector.h
DTDigiCollection.h
DTChamberId
Definition: DTChamberId.h:14
DTTrig::SC_iterator
SCcontainer::iterator SC_iterator
Definition: DTTrig.h:60
ParameterSet.h
DTBtiTrigData.h
DTSuperLayerId.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:232
GlobalPoint.h
edm::InputTag
Definition: InputTag.h:15
DTTrig::size
int size() const
Size of the trigger units store.
Definition: DTTrig.h:85
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
DTTrig::_conf_manager
const DTConfigManager * _conf_manager
Definition: DTTrig.h:256
DTTrig::DTDigiMap_const_iterator
DTDigiMap::const_iterator DTDigiMap_const_iterator
Definition: DTTrig.h:66