CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTTrig.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
12 //
13 //--------------------------------------------------
14 #ifndef DT_TRIG_H
15 #define DT_TRIG_H
16 
17 //---------------
18 // C++ Headers --
19 //---------------
20 #include<map>
21 #include<string>
22 
23 //------------------------------------
24 // Collaborating Class Declarations --
25 //------------------------------------
44 
46 
47 
48 class InputTag;
49 
50 // ---------------------
51 // -- Class Interface --
52 // ---------------------
53 
54 class DTTrig {
55 
56  public:
57 
58  typedef std::map< DTChamberId,DTSCTrigUnit*,std::less<DTChamberId> > TUcontainer;
59  typedef TUcontainer::iterator TU_iterator;
60  typedef TUcontainer::const_iterator TU_const_iterator;
61  typedef std::map< DTSectCollId,DTSectColl*,std::less<DTSectCollId> > SCcontainer;
62  typedef SCcontainer::iterator SC_iterator;
63  typedef SCcontainer::const_iterator SC_const_iterator;
64  typedef std::pair<TU_iterator,TU_iterator> Range;
65  typedef std::pair<SC_iterator,SC_iterator> SCRange;
66  typedef std::map< DTChamberId,DTDigiCollection,std::less<DTChamberId> > DTDigiMap;
67  typedef DTDigiMap::iterator DTDigiMap_iterator;
68  typedef DTDigiMap::const_iterator DTDigiMap_const_iterator;
69 
70  public:
71 
73  DTTrig(const edm::ParameterSet &params);
74 
76  ~DTTrig();
77 
79  void createTUs(const edm::EventSetup& iSetup);
80 
82  void updateES(const edm::EventSetup& iSetup);
83 
85  void triggerReco(const edm::Event& iEvent, const edm::EventSetup& iSetup);
86 
88  void clear();
89 
91  int size() { return _cache.size(); }
92 
94  TU_iterator begin() { /*check();*/ return _cache.begin(); }
95 
97  TU_iterator end() { /*check();*/ return _cache.end(); }
98 
100  TU_iterator find(DTChamberId id) { /*check();*/ return _cache.find(id); }
101 
103  Range cache() { /*check();*/ return Range(_cache.begin(), _cache.end()); }
104 
105  // ------------ do the same for Sector Collector
106 
108  int size1() { /*check();*/ return _cache1.size(); }
109 
111  SC_iterator begin1() { /*check();*/ return _cache1.begin(); }
112 
114  SC_iterator end1() { /*check();*/ return _cache1.end(); }
115 
117  SC_iterator find1(DTSectCollId id) { /*check();*/ return _cache1.find(id); }
118 
120  SCRange cache1() { /*check();*/ return SCRange(_cache1.begin(), _cache1.end()); }
121 
124 
126  DTSCTrigUnit* trigUnit(int wheel, int stat, int sect);
127 
130 
133 
135  DTChambPhSegm* chPhiSegm1(int wheel, int stat, int sect, int step);
136 
139 
142 
144  DTChambPhSegm* chPhiSegm2(int wheel, int stat, int sect, int step);
145 
148 
151 
153  DTChambThSegm* chThetaSegm(int wheel, int stat, int sect, int step);
154 
155  // sector collector
156 
159 
161  DTSectCollPhSegm* chSectCollPhSegm1(int wheel, int sect, int step);
162 
165 
167  DTSectCollPhSegm* chSectCollPhSegm2(int wheel, int sect, int step);
168 
171 
173  DTSectCollThSegm* chSectCollThSegm(int wheel, int sect, int step);
174 
175  // end sector collector
176 
178  void dumpGeom();
179 
181  void dumpLuts(short int lut_btic, const DTConfigManager *conf);
182 
184  int getBXOffset() { return _conf_manager->getBXOffset(); }
185 
186  // Methods to access intermediate results
187 
189  std::vector<DTBtiTrigData> BtiTrigs();
190 
192  std::vector<DTTracoTrigData> TracoTrigs();
193 
195  std::vector<DTChambPhSegm> TSPhTrigs();
196 
198  std::vector<DTChambThSegm> TSThTrigs();
199 
201  std::vector<DTSectCollPhSegm> SCPhTrigs();
202 
204  std::vector<DTSectCollThSegm> SCThTrigs();
205 
207  LocalPoint localPosition(const DTTrigData* trig) const {
208  return constTrigUnit(trig->ChamberId())->localPosition(trig);
209  }
210 
212  GlobalPoint CMSPosition(const DTTrigData* trig) const {
213  return constTrigUnit(trig->ChamberId())->CMSPosition(trig);
214  }
215 
217  LocalVector localDirection(const DTTrigData* trig) const {
218  return constTrigUnit(trig->ChamberId())->localDirection(trig);
219  }
220 
222  GlobalVector CMSDirection(const DTTrigData* trig) const {
223  return constTrigUnit(trig->ChamberId())->CMSDirection(trig);
224  }
225 
227  void print(DTTrigData* trig) const {
228  constTrigUnit(trig->ChamberId())->print(trig);
229  }
230 
231  private:
232 
233  // const version of the methods to access TUs and SCs are private to avoid misuse
236 
238  DTSCTrigUnit* constTrigUnit(int wheel, int stat, int sect) const;
239 
241  DTSectColl* SCUnit(DTSectCollId scid) const;
242 
244  DTSectColl* SCUnit(int wheel, int sect) const;
245 
246  private:
247 
248  TUcontainer _cache; // Trigger units
249  SCcontainer _cache1; // Sector Collector units
250  const DTConfigManager *_conf_manager; // Configuration Manager class pointer
252  bool _debug; // Debug flag
254 
255  unsigned long long _configid;
256  unsigned long long _geomid;
257 
258 };
259 
260 #endif
SC_iterator end1()
End of the sectoor collector store.
Definition: DTTrig.h:114
SC_iterator begin1()
Begin of the sector collector store.
Definition: DTTrig.h:111
SCcontainer::iterator SC_iterator
Definition: DTTrig.h:62
int getBXOffset()
Get BX Offset.
Definition: DTTrig.h:184
TU_iterator find(DTChamberId id)
Find a trigger unit in the map.
Definition: DTTrig.h:100
SCcontainer _cache1
Definition: DTTrig.h:249
std::pair< SC_iterator, SC_iterator > SCRange
Definition: DTTrig.h:65
DTSectColl * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:313
list step
Definition: launcher.py:15
bool _debug
Definition: DTTrig.h:252
int size1()
Size of the sector collector store.
Definition: DTTrig.h:108
SC_iterator find1(DTSectCollId id)
Find a Sector Collector in the map.
Definition: DTTrig.h:117
DTChambPhSegm * chPhiSegm2(DTChamberId sid, int step)
Return the second phi track segment in req. chamber/step.
Definition: DTTrig.cc:373
TU_iterator begin()
Begin of the trigger units store.
Definition: DTTrig.h:94
int getBXOffset() const
Get BX Offset for a given vdrift config.
TUcontainer _cache
Definition: DTTrig.h:248
TUcontainer::iterator TU_iterator
Definition: DTTrig.h:59
LocalPoint localPosition(const DTTrigData *trig) const
Coordinate of a trigger-data object in chamber frame.
Definition: DTTrig.h:207
DTSectCollPhSegm * chSectCollPhSegm1(DTSectColl *unit, int step)
Return the first phi track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:411
DTChambPhSegm * chPhiSegm1(DTChamberId sid, int step)
Return the first phi track segment in req. chamber/step.
Definition: DTTrig.cc:368
unsigned long long _geomid
Definition: DTTrig.h:256
virtual DTChamberId ChamberId() const =0
Identifier of the associated chamber.
std::vector< DTSectCollPhSegm > SCPhTrigs()
Return a copy of all the Sector Collector (Phi) triggers.
Definition: DTTrig.cc:551
void print(DTTrigData *trig) const
Print a trigger-data object.
Definition: DTTrig.h:227
int size()
Size of the trigger units store.
Definition: DTTrig.h:91
int iEvent
Definition: GenABIO.cc:243
std::map< DTSectCollId, DTSectColl *, std::less< DTSectCollId > > SCcontainer
Definition: DTTrig.h:61
TU_iterator end()
End of the trigger units store.
Definition: DTTrig.h:97
void updateES(const edm::EventSetup &iSetup)
update the eventsetup info
Definition: DTTrig.cc:232
std::pair< TU_iterator, TU_iterator > Range
Definition: DTTrig.h:64
string unit
Definition: csvLumiCalc.py:46
~DTTrig()
Destructor.
Definition: DTTrig.cc:69
edm::InputTag _digitag
Definition: DTTrig.h:251
void triggerReco(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Run the whole trigger reconstruction chain.
Definition: DTTrig.cc:150
DTSCTrigUnit * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:297
void dumpGeom()
Dump the geometry.
Definition: DTTrig.cc:460
LocalVector localDirection(const DTTrigData *trig) const
Direction of a trigger-data object in chamber frame.
Definition: DTTrig.h:217
GlobalPoint CMSPosition(const DTTrigData *trig) const
Coordinate of a trigger-data object in CMS frame.
Definition: DTTrig.h:212
tuple conf
Definition: dbtoconf.py:185
GlobalVector CMSDirection(const DTTrigData *trig) const
Direction of a trigger-data object in CMS frame.
Definition: DTTrig.h:222
DTSectCollPhSegm * chSectCollPhSegm2(DTSectColl *unit, int step)
Return the second phi track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:419
DTDigiMap::iterator DTDigiMap_iterator
Definition: DTTrig.h:67
std::map< DTChamberId, DTSCTrigUnit *, std::less< DTChamberId > > TUcontainer
Definition: DTTrig.h:58
TUcontainer::const_iterator TU_const_iterator
Definition: DTTrig.h:60
std::vector< DTChambThSegm > TSThTrigs()
Return a copy of all the Trigger Server (Theta) triggers.
Definition: DTTrig.cc:535
Definition: DTTrig.h:54
void dumpLuts(short int lut_btic, const DTConfigManager *conf)
Dump the LUT files.
Definition: DTTrig.cc:468
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:289
std::vector< DTTracoTrigData > TracoTrigs()
Return a copy of all the TRACO triggers.
Definition: DTTrig.cc:503
SCRange cache1()
Range of the sector collector store.
Definition: DTTrig.h:120
DTChambThSegm * chThetaSegm(DTChamberId sid, int step)
Return the theta candidates in req. chamber/step.
Definition: DTTrig.cc:378
DTDigiMap::const_iterator DTDigiMap_const_iterator
Definition: DTTrig.h:68
std::map< DTChamberId, DTDigiCollection, std::less< DTChamberId > > DTDigiMap
Definition: DTTrig.h:66
Range cache()
Begin of the trigger units store.
Definition: DTTrig.h:103
const DTConfigManager * _conf_manager
Definition: DTTrig.h:250
bool _inputexist
Definition: DTTrig.h:253
DTSectCollThSegm * chSectCollThSegm(DTSectColl *unit, int step)
Return the theta track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:443
void createTUs(const edm::EventSetup &iSetup)
Create the trigger units and store them in the cache.
Definition: DTTrig.cc:76
unsigned long long _configid
Definition: DTTrig.h:255
SCcontainer::const_iterator SC_const_iterator
Definition: DTTrig.h:63
std::vector< DTBtiTrigData > BtiTrigs()
Return a copy of all the BTI triggers.
Definition: DTTrig.cc:487
DTTrig(const edm::ParameterSet &params)
Constructors.
Definition: DTTrig.cc:50
std::vector< DTSectCollThSegm > SCThTrigs()
Return a copy of all the Sector Collector (Theta) triggers.
Definition: DTTrig.cc:580
std::vector< DTChambPhSegm > TSPhTrigs()
Return a copy of all the Trigger Server (Phi) triggers.
Definition: DTTrig.cc:519
void clear()
Clear the trigger units cache.
Definition: DTTrig.cc:272