CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTTrig.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: DTTrig
4 //
5 // Description: Steering routine for L1 trigger simulation in
6 // a muon barrel station
7 //
8 //
9 // Author List:
10 // C. Grandi
11 // Modifications:
12 // S Vanini, S. Marcellini, D. Bonacorsi, C.Battilana
13 //
14 // 07/03/30 : configuration now through DTConfigManager SV
15 //-------------------------------------------------------
16 
17 //-----------------------
18 // This Class's Header --
19 //-----------------------
21 
29 
40 
41 //---------------
42 // C++ Headers --
43 //---------------
44 #include <iostream>
45 #include <string>
46 
47 //-------------------------------
48 // Collaborating Class Headers --
49 //-------------------------------
51 
52 //----------------
53 // Constructors --
54 //----------------
55 
57  _inputexist(1) , _configid(0) , _geomid(0) , _t0id(0) , _ttrigid(0) {
58 
59  // Set configuration parameters
60  // _debug = _conf_manager->getDTTPGDebug();
61  _debug = params.getUntrackedParameter<bool>("debug"); // CB FIXME: update when debug will be fully configured from parameter set
62 
63  if(_debug){
64  std::cout << std::endl;
65  std::cout << "**** Initialization of DTTrigger ****" << std::endl;
66  std::cout << std::endl;
67  std::cout << "DTTrig::DTTrig creating synchronizer" << std::endl;
68  }
69 
70  _digitag = params.getParameter<edm::InputTag>("digiTag");
71  _digi_sync = DTTTrigSyncFactory::get()->create(params.getParameter<std::string>("tTrigMode"),
72  params.getParameter<edm::ParameterSet>("tTrigModeConfig"));
73  _usesyncdb = params.getParameter<std::string>("tTrigMode")!="DTTTrigSyncTOFCorr";
74 }
75 
76 
77 //--------------
78 // Destructor --
79 //--------------
81 
82  clear();
83  delete _digi_sync; //CB check if it is really needed
84 
85 }
86 
87 void
89 
90  // build up Sector Collectors and then
91  // build the trrigger units (one for each chamber)
92  for(int iwh=-2;iwh<=2;iwh++){
93  for(int ise=1;ise<=12;ise++){
94  if(_debug){
95  std::cout << "calling sectcollid wh sc " << iwh << " " << ise << std::endl;}
96  DTSectCollId scid(iwh,ise);
97  SC_iterator it = _cache1.find(scid);
98  if ( it != _cache1.end()) {
99  std::cout << "DTTrig::createTUs: Sector Collector unit already exists"<<std::endl;
100  continue;
101  }
102  // add a sector collector to the map
103  // SCConf_iterator scit = _scconf.find(scid);
104  //edm::ParameterSet sc_pset = _conf_pset.getParameter<edm::ParameterSet>("SectCollParameters");
105  DTSectColl* sc;
106  //sc = new DTSectColl(sc_pset);
107  sc = new DTSectColl(scid);
108 
109  // if ( scit != _scconf.end()){
110  // sc = new DTSectColl( (*scit).second);
111  // }
112  // else {
113  // std::cout << "DTTrig::createTUs: SC config file does not exist. Using default one";
114  // sc = new DTSectColl(config());
115  // }
116  if(_debug){
117  std::cout << " DTTrig::createTUs new SC sc = " << sc
118  << " at scid.sector() " << scid.sector()
119  << " at scid.wheel() " << scid.wheel()
120  << std::endl;
121  }
122  _cache1[scid] = sc;
123  }
124  }
125 
127  iSetup.get<MuonGeometryRecord>().get(pDD);
128  for (std::vector<DTChamber*>::const_iterator ich=pDD->chambers().begin(); ich!=pDD->chambers().end();ich++){
129 
130  DTChamber* chamb = (*ich);
131  DTChamberId chid = chamb->id();
132  TU_iterator it = _cache.find(chid);
133  if ( it != _cache.end()) {
134  std::cout << "DTTrig::init: Trigger unit already exists" << std::endl;
135  continue;
136  }
137  // Conf_iterator cit = _truconf.find(chid);
138  // if ( cit == _truconf.end()) {
139  // std::cout << "DTTrig::init: Local Config File not found using default config" << std::endl;
140  // DTSCTrigUnit* tru = new DTSCTrigUnit(chamb,config());
141  // _cache[chid] = tru;
142  // continue;
143  // }
144 
145  // add a trigger unit to the map with a link to the station
146  //edm::ParameterSet tu_pset = _conf_pset.getParameter<edm::ParameterSet>("TUParameters");
147  //DTSCTrigUnit* tru = new DTSCTrigUnit(chamb,tu_pset);
148  DTSCTrigUnit* tru = new DTSCTrigUnit(chamb,_digi_sync);
149  _cache[chid] = tru;
150 
151  //----------- add TU to corresponding SC
152  // returning correspondent SC id
153  DTSectCollId scid;
154  if(chid.sector()==13) {
155  scid = DTSectCollId(chid.wheel(), 4);}
156  else if(chid.sector()==14) {
157  scid = DTSectCollId(chid.wheel(), 10);}
158  else {
159  scid = DTSectCollId(chid.wheel(), chid.sector() );}
160 
161  SC_iterator it1 = _cache1.find(scid);
162 
163  if ( it1 != _cache1.end()) {
164 
165  DTSectColl* sc = (*it1).second;
166  if(_debug) {
167  std::cout << "DTTrig::init: adding TU in SC << "
168  << " sector = " << scid.sector()
169  << " wheel = " << scid.wheel()
170  << std::endl;}
171  sc->addTU(tru);
172  }
173  else {
174  std::cout << "DTTrig::createTUs: Trigger Unit not in the map: ";
175  }
176 
177  }
178 
179 }
180 
181 
182 void
184 
185  updateES(iSetup);
186  if (!_inputexist) return;
187 
188  DTDigiMap digiMap;
189  //Sort digis by chamber so they can be used by BTIs
191  iEvent.getByLabel(_digitag, dtDigis);
192 
193  if (!dtDigis.isValid()) {
194  LogDebug("DTTrig")
195  << "DTTrig::triggerReco DTDigiCollection with input tag " << _digitag
196  << "requested in configuration, but not found in the event." << std::endl;
197 
198  _inputexist = false;
199  return;
200  }
201 
203 
204  for (detUnitIt=dtDigis->begin();
205  detUnitIt!=dtDigis->end();
206  ++detUnitIt){
207  const DTLayerId& layId = (*detUnitIt).first;
208  const DTChamberId chambId=layId.superlayerId().chamberId();
209  const DTDigiCollection::Range& range = (*detUnitIt).second;
210  // DTDigiCollection tmpDTDigiColl;
211  //tmpDTDigiColl.put(range,layId);
212  digiMap[chambId].put(range,layId);
213 // const DTDigiCollection::Range& range = (*detUnitIt).second;
214 // for (DTDigiCollection::const_iterator digiIt = range.first;
215 // digiIt!=range.second;
216 // ++digiIt){
217 // DTDigiCollection tmp;
218 
219 // digiMap[chambId].push_back((*digiIt));
220 // }
221  }
222 
223  // CB the commented because we don't use config()->debug() anymore in future will probably be possible to avoid the digis sorting
224 // if(config()->debug()>2){
225 // std::cout << "----------DTDigis ordered by chamber:" << std::endl;
226 // for (DTDigiMap_const_iterator digiMapIt=digiMap.begin();
227 // digiMapIt!=digiMap.end();
228 // digiMapIt++){
229 // DTChamberId chambId = (*digiMapIt).first;
230 // DTDigiCollection digis = (*digiMapIt).second;
231 // std::cout << "Chamber id " << chambId << std::endl;
232 // DTDigiCollection::DigiRangeIterator RangeIt;
233 // for (RangeIt=digis.begin();
234 // RangeIt!=digis.end();
235 // RangeIt++){
236 // std::cout << "Digi's layer " << (*RangeIt).first << std::endl;
237 // const DTDigiCollection::Range& range = (*RangeIt).second;
238 // for (DTDigiCollection::const_iterator digiIt = range.first;
239 // digiIt!=range.second;
240 // ++digiIt){
241 // std::cout << "Digi's data " << (*digiIt) << std::endl;
242 // }
243 
244 
245 // }
246 // }
247 // }
248 
249  //Run reconstruct for single trigger subsystem (Bti, Traco TS)
250  for (TU_iterator it=_cache.begin();it!=_cache.end();it++){
251  DTSCTrigUnit* thisTU=(*it).second;
252  if (thisTU->BtiTrigs()->size()>0){
253  thisTU->BtiTrigs()->clearCache();
254  thisTU->TSThTrigs()->clearCache();
255  thisTU->TracoTrigs()->clearCache();
256  thisTU->TSPhTrigs()->clearCache();
257  }
258  DTChamberId chid=thisTU->statId();
259  DTDigiMap_iterator dmit = digiMap.find(chid);
260  if (dmit !=digiMap.end()){
261  thisTU->BtiTrigs()->reconstruct((*dmit).second);
262  if(thisTU->BtiTrigs()->size()>0){
263  thisTU->TSThTrigs()->reconstruct();
264  thisTU->TracoTrigs()->reconstruct();
265  if(thisTU->TracoTrigs()->size()>0)
266  thisTU->TSPhTrigs()->reconstruct();
267  }
268  }
269  }
270  //Run reconstruct for Sector Collector
271  for (SC_iterator it=_cache1.begin();it!=_cache1.end();it++){
272  DTSectColl* sectcoll = (*it).second;
273  DTSectCollId scid = (*it).first;
274  if (sectcoll->sizePh()>0 || sectcoll->sizeTh()>0)
275  sectcoll->clearCache();
276  bool mustreco = false;
277  for (int i=1;i<5;i++) {
278  if (sectcoll->getTSPhi(i)->size()>0) {
279  mustreco = true;
280  break;
281  }
282  }
283  for (int i=1;i<4;i++) {
284  if (sectcoll->getTSTheta(i)->size()>0) {
285  mustreco = true;
286  break;
287  }
288  }
289  if (scid.sector()==4 || scid.sector()==10){
290  if (sectcoll->getTSPhi(5)->size()>0)
291  mustreco = true;
292  }
293  if (mustreco)
294  sectcoll->reconstruct();
295  }
296 
297 }
298 
299 void
301 
302  // Check for updatets in config
304  edm::ESHandle<DTGeometry> geomHandle;
305  edm::ESHandle<DTT0> t0Handle;
306  edm::ESHandle<DTTtrig> ttrigHandle;
307 
308  if (iSetup.get<DTConfigManagerRcd>().cacheIdentifier()!=_configid) {
309 
310  if (_debug)
311  std::cout << "DTTrig::updateES updating DTTPG configuration" << std::endl;
312 
313  _configid = iSetup.get<DTConfigManagerRcd>().cacheIdentifier();
314  iSetup.get<DTConfigManagerRcd>().get(confHandle);
315  _conf_manager = confHandle.product();
316  for (TU_iterator it=_cache.begin();it!=_cache.end();it++){
317  (*it).second->setConfig(_conf_manager);
318  }
319  for (SC_iterator it=_cache1.begin();it!=_cache1.end();it++){
320  (*it).second->setConfig(_conf_manager);
321  }
322 
323  }
324 
325  if (iSetup.get<MuonGeometryRecord>().cacheIdentifier()!=_configid) {
326 
327  if (_debug)
328  std::cout << "DTTrig::updateES updating muon geometry" << std::endl;
329 
330  _geomid = iSetup.get<MuonGeometryRecord>().cacheIdentifier();
331  iSetup.get<MuonGeometryRecord>().get(geomHandle);
332  for (TU_iterator it=_cache.begin();it!=_cache.end();it++){
333  (*it).second->setGeom(geomHandle->chamber((*it).second->statId()));
334  }
335 
336  }
337 
338  if (_usesyncdb &&
339  (iSetup.get<DTT0Rcd>().cacheIdentifier()!=_t0id ||
340  iSetup.get<DTTtrigRcd>().cacheIdentifier()!=_ttrigid)) {
341 
342  if (_debug)
343  std::cout << "DTTrig::updateES updating synchronizer" << std::endl;
344 
345  _t0id = iSetup.get<DTT0Rcd>().cacheIdentifier();
346  _ttrigid = iSetup.get<DTTtrigRcd>().cacheIdentifier();
347  _digi_sync->setES(iSetup);
348 
349  }
350 
351 }
352 
353 
354 void
356  // Delete the map
357  for (TU_iterator it=_cache.begin();it!=_cache.end();it++){
358  // Delete all the trigger units
359  delete (*it).second;
360  }
361  _cache.clear();
362 
363  for (SC_iterator it=_cache1.begin();it!=_cache1.end();it++){
364  // Delete all the Sector Collectors
365  delete (*it).second;
366  }
367  _cache1.clear();
368 
369 }
370 
373  /*check();*/ return constTrigUnit(chid);
374 
375 }
376 
377 
378 
381 // std::cout << " SC: running DTTrig::constTrigUnit(DTChamberId chid)" << std::endl;
382  TU_const_iterator it = _cache.find(chid);
383  if ( it == _cache.end()) {
384  std::cout << "DTTrig::trigUnit: Trigger Unit not in the map: ";
385  std::cout << " wheel=" << chid.wheel() ;
386  std::cout << ", station=" << chid.station();
387  std::cout << ", sector=" << chid.sector();
388  std::cout << std::endl;
389  return 0;
390  }
391 
392  return (*it).second;
393 }
394 
395 DTSectColl*
397 SC_const_iterator it = _cache1.find(scid);
398  if ( it == _cache1.end()) {
399  std::cout << "DTTrig::SCUnit: Trigger Unit not in the map: ";
400  std::cout << " wheel=" << scid.wheel() ;
401  std::cout << ", sector=" << scid.sector();
402  std::cout << std::endl;
403  return 0;
404  }
405 
406  return (*it).second;
407 }
408 
410 DTTrig::trigUnit(int wheel, int stat, int sect) {
411  return constTrigUnit(wheel, stat, sect);
412 }
413 
414 DTSectColl*
415 DTTrig::SCUnit(int wheel, int sect) const {
416  sect++;
417  return SCUnit(DTSectCollId(wheel,sect));
418 }
419 
420 
422 DTTrig::constTrigUnit(int wheel, int stat, int sect) const {
423  sect++; // offset 1 for sector number ([0,11] --> [1,12])
424  return constTrigUnit(DTChamberId(wheel,stat,sect));
425 
426 }
427 
428 
431  if(unit==0)return 0;
432  if(unit->nPhiSegm(step)<1)return 0;
433  return const_cast<DTChambPhSegm*>(unit->phiSegment(step,1));
434 }
435 
438  if(unit==0)return 0;
439  if(unit->nPhiSegm(step)<2)return 0;
440  return const_cast<DTChambPhSegm*>(unit->phiSegment(step,2));
441 }
442 
445  if(unit==0)return 0;
446  if(unit->nThetaSegm(step)<1)return 0;
447  return const_cast<DTChambThSegm*>(unit->thetaSegment(step,1));
448 }
449 
452  return chPhiSegm1(trigUnit(sid),step);
453 }
454 
457  return chPhiSegm2(trigUnit(sid),step);
458 }
459 
462  if(sid.station()==4)return 0;
463  return chThetaSegm(trigUnit(sid),step);
464 }
465 
467 DTTrig::chPhiSegm1(int wheel, int stat, int sect, int step) {
468  return chPhiSegm1(trigUnit(wheel,stat,sect),step);
469  // to make it transparent to the outside world
470  // return chSectCollSegm1(wheel,stat,sect,step);
471 
472 }
473 
475 DTTrig::chPhiSegm2(int wheel, int stat, int sect, int step) {
476  // if(stat==4&&(sect==3||sect==9)) {
477  // if hrizontal chambers of MB4 get first track of twin chamber (flag=1)
478  // return chPhiSegm1(trigUnit(wheel,stat,sect,1),step);
479  // } else {
480  return chPhiSegm2(trigUnit(wheel,stat,sect),step);
481  // to make it transparent to the outside world
482  // return chSectCollSegm2(wheel,stat,sect,step);
483  //}
484 }
485 
487 DTTrig::chThetaSegm(int wheel, int stat, int sect, int step) {
488  if(stat==4)return 0;
489  return chThetaSegm(trigUnit(wheel,stat,sect),step);
490 }
491 
492 // SM sector collector section
495 
496  if(unit==0)return 0;
497  if(unit->nSegmPh(step)<1)return 0;
498  return const_cast<DTSectCollPhSegm*>(unit->SectCollPhSegment(step,1));
499 }
500 
503  if(unit==0)return 0;
504  if(unit->nSegmPh(step)<2)return 0;
505  return const_cast<DTSectCollPhSegm*>(unit->SectCollPhSegment(step,2));
506 }
507 
508 
510 DTTrig::chSectCollPhSegm1(int wheel, int sect, int step) {
511 
512  return chSectCollPhSegm1(SCUnit(wheel,sect),step);
513 }
514 
516 DTTrig::chSectCollPhSegm2(int wheel, int sect, int step) {
517  // if(stat==4&&(sect==3||sect==9)) {
518  // if hrizontal chambers of MB4 get first track of twin chamber (flag=1)
519  //return chSectCollSegm1(trigUnit(wheel,stat,sect,1),step);
520  //} else {
521  return chSectCollPhSegm2(SCUnit(wheel,sect),step);
522  //}
523 }
524 
527 
528  if(unit==0)return 0;
529  if(unit->nSegmTh(step)<1)return 0;
530  return const_cast<DTSectCollThSegm*>(unit->SectCollThSegment(step));
531 }
532 
534 DTTrig::chSectCollThSegm(int wheel, int sect, int step) {
535 
536  return chSectCollThSegm(SCUnit(wheel,sect),step);
537 }
538 
539  // end SM
540 
541 
542 void
544  /*check();*/
545  for (TU_const_iterator it=_cache.begin();it!=_cache.end();it++){
546  ((*it).second)->dumpGeom();
547  }
548 }
549 
550 void
552  for (TU_const_iterator it=_cache.begin();it!=_cache.end();it++){
553 
554  DTSCTrigUnit* thisTU = (*it).second;
555 
556  // dump lut command file from geometry
557  thisTU->dumpLUT(lut_btic);
558 
559  // dump lut command file from parameters (DB or CMSSW)
560  DTChamberId chid = thisTU->statId();
561  conf->dumpLUTParam(chid);
562 
563  }
564 
565  return;
566 
567 }
568 
569 std::vector<DTBtiTrigData>
571  /*check();*/
572  std::vector<DTBtiTrigData> trigs;
573  TU_iterator ptu;
574  for(ptu=_cache.begin();ptu!=_cache.end();ptu++) {
575  DTSCTrigUnit* tu = (*ptu).second;
576  std::vector<DTBtiTrigData>::const_iterator p; //p=0;
577  std::vector<DTBtiTrigData>::const_iterator peb=tu->BtiTrigs()->end();
578  for(p=tu->BtiTrigs()->begin();p!=peb;p++){
579  trigs.push_back(*p);
580  }
581  }
582  return trigs;
583 }
584 
585 std::vector<DTTracoTrigData>
587  std::vector<DTTracoTrigData> trigs;
588  TU_iterator ptu;
589  /*check();*/
590  for(ptu=_cache.begin();ptu!=_cache.end();ptu++) {
591  DTSCTrigUnit* tu = (*ptu).second;
592  std::vector<DTTracoTrigData>::const_iterator p; //p=0;
593  std::vector<DTTracoTrigData>::const_iterator peb=tu->TracoTrigs()->end();
594  for(p=tu->TracoTrigs()->begin();p!=peb;p++){
595  trigs.push_back(*p);
596  }
597  }
598  return trigs;
599 }
600 
601 std::vector<DTChambPhSegm>
603  /*check();*/
604  std::vector<DTChambPhSegm> trigs;
605  TU_iterator ptu;
606  for(ptu=_cache.begin();ptu!=_cache.end();ptu++) {
607  DTSCTrigUnit* tu = (*ptu).second;
608  std::vector<DTChambPhSegm>::const_iterator p; //p=0;
609  std::vector<DTChambPhSegm>::const_iterator peb=tu->TSPhTrigs()->end();
610  for(p=tu->TSPhTrigs()->begin();p!=peb;p++){
611  trigs.push_back(*p);
612  }
613  }
614  return trigs;
615 }
616 
617 std::vector<DTChambThSegm>
619  /*check();*/
620  std::vector<DTChambThSegm> trigs;
621  TU_iterator ptu;
622  for(ptu=_cache.begin();ptu!=_cache.end();ptu++) {
623  DTSCTrigUnit* tu = (*ptu).second;
624  std::vector<DTChambThSegm>::const_iterator p; //p=0;
625  std::vector<DTChambThSegm>::const_iterator peb=tu->TSThTrigs()->end();
626  for(p=tu->TSThTrigs()->begin();p!=peb;p++){
627  trigs.push_back(*p);
628  }
629  }
630  return trigs;
631 }
632 
633 std::vector<DTSectCollPhSegm>
635  /*check();*/
636  std::vector<DTSectCollPhSegm> trigs;
637  // SC_iterator ptu;
638  SC_iterator psc;
639  for(psc=_cache1.begin();psc!=_cache1.end();psc++) {
640  // DTSCTrigUnit* tu = (*ptu).second;
641  //
642  // old SMDB:
643  // DTSectColl* tu = (*ptu).second;
644  // std::vector<DTChambPhSegm>::const_iterator p=0;
645  // std::vector<DTChambPhSegm>::const_iterator peb=tu->SCTrigs()->end();
646  // for(p=tu->SCTrigs()->begin();p!=peb;p++){
647  // trigs.push_back(*p);
648  // }
649 
650  DTSectColl* sc = (*psc).second;
651  std::vector<DTSectCollPhSegm>::const_iterator p;
652  std::vector<DTSectCollPhSegm>::const_iterator peb=sc->endPh();
653  for(p=sc->beginPh();p!=peb;p++){
654  trigs.push_back(*p);
655  }
656 
657  }
658  return trigs;
659 }
660 
661 
662 std::vector<DTSectCollThSegm>
664  /*check();*/
665  std::vector<DTSectCollThSegm> trigs;
666  SC_iterator psc;
667  for(psc=_cache1.begin();psc!=_cache1.end();psc++) {
668  DTSectColl* sc = (*psc).second;
669  std::vector<DTSectCollThSegm>::const_iterator p; //p=0;
670  std::vector<DTSectCollThSegm>::const_iterator peb=sc->endTh();
671  for(p=sc->beginTh();p!=peb;p++){
672  trigs.push_back(*p);
673  }
674 
675  }
676  return trigs;
677 }
#define LogDebug(id)
virtual void reconstruct()
Load Trigger Units triggers and run Sector Collector algorithm.
Definition: DTSectColl.h:178
int sizePh()
Return Phi cache size.
Definition: DTSectColl.h:154
virtual void reconstruct(const DTDigiCollection dtDigis)
Definition: DTBtiCard.h:104
void clearCache()
Clear all traco stuff (cache &amp; map)
Definition: DTTracoCard.cc:70
T getParameter(std::string const &) const
unsigned long long cacheIdentifier() const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
const DTChambThSegm * thetaSegment(int step, int n)
Return output segments, theta view.
Definition: DTSCTrigUnit.h:155
SCcontainer::iterator SC_iterator
Definition: DTTrig.h:62
void dumpLUTParam(DTChamberId &chambid) const
SV 091111 Dump luts string commands from configuration parameters.
SCcontainer _cache1
Definition: DTTrig.h:249
unsigned long long _ttrigid
Definition: DTTrig.h:260
std::vector< DTSectCollPhSegm >::const_iterator endPh()
Return iterator to the end of Phi cache.
Definition: DTSectColl.h:157
DTSectColl * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:396
DTChamberId chamberId() const
Return the corresponding ChamberId.
DTTSTheta * TSThTrigs() const
Return the chamber Trigger Server (Theta)
Definition: DTSCTrigUnit.h:100
bool _debug
Definition: DTTrig.h:253
void clearCache()
Clear all BTI stuff (map &amp; cache)
Definition: DTBtiCard.cc:92
DTChambPhSegm * chPhiSegm2(DTChamberId sid, int step)
Return the second phi track segment in req. chamber/step.
Definition: DTTrig.cc:456
int sizeTh()
Return Theta cache size.
Definition: DTSectColl.h:163
int nSegmTh(int step)
Return number of DTSectCollTheta segments (SC step)
Definition: DTSectColl.cc:497
DTTSPhi * TSPhTrigs() const
Return the chamber Trigger Server (Phi)
Definition: DTSCTrigUnit.h:97
TUcontainer _cache
Definition: DTTrig.h:248
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:61
bool _usesyncdb
Definition: DTTrig.h:254
TUcontainer::iterator TU_iterator
Definition: DTTrig.h:59
DTSectCollPhSegm * chSectCollPhSegm1(DTSectColl *unit, int step)
Return the first phi track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:494
DTChambPhSegm * chPhiSegm1(DTChamberId sid, int step)
Return the first phi track segment in req. chamber/step.
Definition: DTTrig.cc:451
unsigned long long _geomid
Definition: DTTrig.h:258
virtual void setES(const edm::EventSetup &setup)=0
Pass the Event Setup to the synchronization module at each event.
std::vector< DTSectCollPhSegm > SCPhTrigs()
Return a copy of all the Sector Collector (Phi) triggers.
Definition: DTTrig.cc:634
void dumpLUT(short int btic) const
Dump the Lut file.
Definition: DTSCTrigUnit.h:134
DTBtiCard * BtiTrigs() const
Return container of BTI triggers.
Definition: DTSCTrigUnit.h:91
int iEvent
Definition: GenABIO.cc:243
int nSegmPh(int step)
Return number of DTSectCollPhi segments (SC step)
Definition: DTSectColl.cc:483
void updateES(const edm::EventSetup &iSetup)
update the eventsetup info
Definition: DTTrig.cc:300
string unit
Definition: csvLumiCalc.py:46
DTChamberId id() const
Return the DTChamberId of this chamber.
Definition: DTChamber.cc:35
~DTTrig()
Destructor.
Definition: DTTrig.cc:80
edm::InputTag _digitag
Definition: DTTrig.h:252
void triggerReco(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Run the whole trigger reconstruction chain.
Definition: DTTrig.cc:183
DTSCTrigUnit * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:380
bool isValid() const
Definition: HandleBase.h:76
void dumpGeom()
Dump the geometry.
Definition: DTTrig.cc:543
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
tuple conf
Definition: dbtoconf.py:185
DTSectCollPhSegm * chSectCollPhSegm2(DTSectColl *unit, int step)
Return the second phi track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:502
DTDigiMap::iterator DTDigiMap_iterator
Definition: DTTrig.h:67
int sector() const
Definition: DTSectCollId.h:42
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:618
void addTU(DTSCTrigUnit *tru)
Add a Trigger Unit to the Sector Collector.
Definition: DTSectColl.cc:128
std::vector< DTSectCollThSegm >::const_iterator beginTh()
Return iterator to the begni of Theta cache.
Definition: DTSectColl.h:160
void dumpLuts(short int lut_btic, const DTConfigManager *conf)
Dump the LUT files.
Definition: DTTrig.cc:551
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:372
std::vector< DTTracoTrigData > TracoTrigs()
Return a copy of all the TRACO triggers.
Definition: DTTrig.cc:586
DTTracoCard * TracoTrigs() const
Return container of TRACO triggers.
Definition: DTSCTrigUnit.h:94
void reconstruct()
Load BTIs triggers and run TSTheta algoritm.
Definition: DTTSTheta.h:85
const T & get() const
Definition: EventSetup.h:55
const DTSectCollThSegm * SectCollThSegment(int step)
Return requested Sector Collector Theta Segment.
Definition: DTSectColl.cc:526
T const * product() const
Definition: ESHandle.h:62
std::vector< DTSectCollThSegm >::const_iterator endTh()
Return iterator to the end of Theta cache.
Definition: DTSectColl.h:166
int wheel() const
Definition: DTSectCollId.h:41
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:42
Definition: DTT0Rcd.h:9
DTChambThSegm * chThetaSegm(DTChamberId sid, int step)
Return the theta candidates in req. chamber/step.
Definition: DTTrig.cc:461
void clearCache()
Local position in chamber of a trigger-data object.
Definition: DTSectColl.h:175
std::map< DTChamberId, DTDigiCollection, std::less< DTChamberId > > DTDigiMap
Definition: DTTrig.h:66
DTTTrigBaseSync * _digi_sync
Definition: DTTrig.h:251
unsigned long long _t0id
Definition: DTTrig.h:259
const DTConfigManager * _conf_manager
Definition: DTTrig.h:250
int sector() const
Definition: DTChamberId.h:63
bool _inputexist
Definition: DTTrig.h:255
DTChamberId statId() const
Identifier of the associated chamber.
Definition: DTSCTrigUnit.h:79
std::vector< DTSectCollPhSegm >::const_iterator beginPh()
Return iterator to the beghin of Phi cache.
Definition: DTSectColl.h:151
const DTSectCollPhSegm * SectCollPhSegment(int step, unsigned n)
Return requested Sector Collector Phi Segment 1st/2nd.
Definition: DTSectColl.cc:512
virtual void reconstruct()
Load TRACO triggers and run TSPhi algorithm.
Definition: DTTSPhi.h:84
DTSectCollThSegm * chSectCollThSegm(DTSectColl *unit, int step)
Return the theta track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:526
virtual void reconstruct()
Load BTIs triggers and run TRACOs algorithm.
Definition: DTTracoCard.h:107
std::pair< const_iterator, const_iterator > Range
tuple cout
Definition: gather_cfg.py:41
const DTChambPhSegm * phiSegment(int step, int n)
Return output segments, phi view.
Definition: DTSCTrigUnit.h:147
int nPhiSegm(int step)
Number of Phi segments for a given step.
Definition: DTSCTrigUnit.h:143
int station() const
Return the station number.
Definition: DTChamberId.h:53
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:47
const_iterator end() const
Get last cache element.
Definition: DTCache.h:45
void createTUs(const edm::EventSetup &iSetup)
Create the trigger units and store them in the cache.
Definition: DTTrig.cc:88
void clearCache()
Clear cache vector.
Definition: DTCache.h:51
DTTSPhi * getTSPhi(int istat) const
Return TSPhi.
Definition: DTSectColl.h:72
T get(const Candidate &c)
Definition: component.h:56
unsigned long long _configid
Definition: DTTrig.h:257
SCcontainer::const_iterator SC_const_iterator
Definition: DTTrig.h:63
int size() const
Get cache vector&#39;s size.
Definition: DTCache.h:48
std::vector< DTBtiTrigData > BtiTrigs()
Return a copy of all the BTI triggers.
Definition: DTTrig.cc:570
DTTrig(const edm::ParameterSet &params)
Constructors.
Definition: DTTrig.cc:56
std::vector< DTSectCollThSegm > SCThTrigs()
Return a copy of all the Sector Collector (Theta) triggers.
Definition: DTTrig.cc:663
DTTSTheta * getTSTheta(int istat) const
Return TSTheta.
Definition: DTSectColl.h:75
std::vector< DTChambPhSegm > TSPhTrigs()
Return a copy of all the Trigger Server (Phi) triggers.
Definition: DTTrig.cc:602
int nThetaSegm(int step)
Number of theta segments for a given step.
Definition: DTSCTrigUnit.h:152
void clear()
Clear the trigger units cache.
Definition: DTTrig.cc:355