CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
DTTrig Class Reference

#include <DTTrig.h>

Public Types

typedef std::map< DTChamberId, DTDigiCollection, std::less< DTChamberId > > DTDigiMap
 
typedef DTDigiMap::const_iterator DTDigiMap_const_iterator
 
typedef DTDigiMap::iterator DTDigiMap_iterator
 
typedef std::pair< TU_iterator, TU_iteratorRange
 
typedef SCcontainer::const_iterator SC_const_iterator
 
typedef SCcontainer::iterator SC_iterator
 
typedef std::map< DTSectCollId, DTSectColl *, std::less< DTSectCollId > > SCcontainer
 
typedef std::pair< SC_iterator, SC_iteratorSCRange
 
typedef TUcontainer::const_iterator TU_const_iterator
 
typedef TUcontainer::iterator TU_iterator
 
typedef std::map< DTChamberId, DTSCTrigUnit *, std::less< DTChamberId > > TUcontainer
 

Public Member Functions

TU_iterator begin ()
 Begin of the trigger units store. More...
 
SC_iterator begin1 ()
 Begin of the sector collector store. More...
 
std::vector< DTBtiTrigDataBtiTrigs ()
 Return a copy of all the BTI triggers. More...
 
Range cache ()
 Begin of the trigger units store. More...
 
SCRange cache1 ()
 Range of the sector collector store. More...
 
DTChambPhSegmchPhiSegm1 (DTChamberId sid, int step)
 Return the first phi track segment in req. chamber/step. More...
 
DTChambPhSegmchPhiSegm1 (DTSCTrigUnit *unit, int step)
 Return the first phi track segment in req. chamber/step. More...
 
DTChambPhSegmchPhiSegm1 (int wheel, int stat, int sect, int step)
 Return the first phi track segment in req. chamber/step, MTTF numbering. More...
 
DTChambPhSegmchPhiSegm2 (DTChamberId sid, int step)
 Return the second phi track segment in req. chamber/step. More...
 
DTChambPhSegmchPhiSegm2 (DTSCTrigUnit *unit, int step)
 Return the second phi track segment in req. chamber/step. More...
 
DTChambPhSegmchPhiSegm2 (int wheel, int stat, int sect, int step)
 Return the second phi track segment in req. chamber/step, MTTF numbering. More...
 
DTSectCollPhSegmchSectCollPhSegm1 (DTSectColl *unit, int step)
 Return the first phi track segment in req. chamber/step [SC step]. More...
 
DTSectCollPhSegmchSectCollPhSegm1 (int wheel, int sect, int step)
 Return the first phi track segment in req. chamber/step, [MTTF numbering & SC step]. More...
 
DTSectCollPhSegmchSectCollPhSegm2 (DTSectColl *unit, int step)
 Return the second phi track segment in req. chamber/step [SC step]. More...
 
DTSectCollPhSegmchSectCollPhSegm2 (int wheel, int sect, int step)
 Return the second phi track segment in req. chamber/step, [MTTF numbering & SC step]. More...
 
DTSectCollThSegmchSectCollThSegm (DTSectColl *unit, int step)
 Return the theta track segment in req. chamber/step [SC step]. More...
 
DTSectCollThSegmchSectCollThSegm (int wheel, int sect, int step)
 Return the theta track segment in req. chamber/step, [MTTF numbering & SC step]. More...
 
DTChambThSegmchThetaSegm (DTChamberId sid, int step)
 Return the theta candidates in req. chamber/step. More...
 
DTChambThSegmchThetaSegm (DTSCTrigUnit *unit, int step)
 Return the theta candidates in req. chamber/step. More...
 
DTChambThSegmchThetaSegm (int wheel, int stat, int sect, int step)
 Return the theta candidates in req. chamber/step, MTTF numbering. More...
 
void clear ()
 Clear the trigger units cache. More...
 
GlobalVector CMSDirection (const DTTrigData *trig) const
 Direction of a trigger-data object in CMS frame. More...
 
GlobalPoint CMSPosition (const DTTrigData *trig) const
 Coordinate of a trigger-data object in CMS frame. More...
 
void createTUs (const edm::EventSetup &iSetup)
 Create the trigger units and store them in the cache. More...
 
 DTTrig (const edm::ParameterSet &params, edm::ConsumesCollector &&ix)
 Constructors. More...
 
void dumpGeom ()
 Dump the geometry. More...
 
void dumpLuts (short int lut_btic, const DTConfigManager *conf)
 Dump the LUT files. More...
 
TU_iterator end ()
 End of the trigger units store. More...
 
SC_iterator end1 ()
 End of the sectoor collector store. More...
 
TU_iterator find (DTChamberId id)
 Find a trigger unit in the map. More...
 
SC_iterator find1 (DTSectCollId id)
 Find a Sector Collector in the map. More...
 
int getBXOffset ()
 Get BX Offset. More...
 
LocalVector localDirection (const DTTrigData *trig) const
 Direction of a trigger-data object in chamber frame. More...
 
LocalPoint localPosition (const DTTrigData *trig) const
 Coordinate of a trigger-data object in chamber frame. More...
 
void print (DTTrigData *trig) const
 Print a trigger-data object. More...
 
std::vector< DTSectCollPhSegmSCPhTrigs ()
 Return a copy of all the Sector Collector (Phi) triggers. More...
 
std::vector< DTSectCollThSegmSCThTrigs ()
 Return a copy of all the Sector Collector (Theta) triggers. More...
 
int size ()
 Size of the trigger units store. More...
 
int size1 ()
 Size of the sector collector store. More...
 
std::vector< DTTracoTrigDataTracoTrigs ()
 Return a copy of all the TRACO triggers. More...
 
void triggerReco (const edm::Event &iEvent, const edm::EventSetup &iSetup)
 Run the whole trigger reconstruction chain. More...
 
DTSCTrigUnittrigUnit (DTChamberId sid)
 Return a trigger unit - Muon numbering. More...
 
DTSCTrigUnittrigUnit (int wheel, int stat, int sect)
 Return a trigger unit - Muon numbering, MTTF numbering. More...
 
std::vector< DTChambPhSegmTSPhTrigs ()
 Return a copy of all the Trigger Server (Phi) triggers. More...
 
std::vector< DTChambThSegmTSThTrigs ()
 Return a copy of all the Trigger Server (Theta) triggers. More...
 
void updateES (const edm::EventSetup &iSetup)
 update the eventsetup info More...
 
 ~DTTrig ()
 Destructor. More...
 

Private Member Functions

DTSCTrigUnitconstTrigUnit (DTChamberId sid) const
 Return a trigger unit - Muon numbering - const version. More...
 
DTSCTrigUnitconstTrigUnit (int wheel, int stat, int sect) const
 Return a trigger unit - Muon numbering, MTTF numbering - const version. More...
 
DTSectCollSCUnit (DTSectCollId scid) const
 Return a SC unit - Muon numbering - const version. More...
 
DTSectCollSCUnit (int wheel, int sect) const
 Return a SC Unit Muon Numbering, MTTF numbering - const version. More...
 

Private Attributes

TUcontainer _cache
 
SCcontainer _cache1
 
const DTConfigManager_conf_manager
 
unsigned long long _configid
 
bool _debug
 
edm::InputTag _digitag
 
unsigned long long _geomid
 
bool _inputexist
 

Detailed Description

Steering routine for L1 trigger simulation in a muon barrel station

Author
C.Grandi

Definition at line 53 of file DTTrig.h.

Member Typedef Documentation

Definition at line 65 of file DTTrig.h.

typedef DTDigiMap::const_iterator DTTrig::DTDigiMap_const_iterator

Definition at line 67 of file DTTrig.h.

typedef DTDigiMap::iterator DTTrig::DTDigiMap_iterator

Definition at line 66 of file DTTrig.h.

Definition at line 63 of file DTTrig.h.

typedef SCcontainer::const_iterator DTTrig::SC_const_iterator

Definition at line 62 of file DTTrig.h.

typedef SCcontainer::iterator DTTrig::SC_iterator

Definition at line 61 of file DTTrig.h.

typedef std::map< DTSectCollId,DTSectColl*,std::less<DTSectCollId> > DTTrig::SCcontainer

Definition at line 60 of file DTTrig.h.

Definition at line 64 of file DTTrig.h.

typedef TUcontainer::const_iterator DTTrig::TU_const_iterator

Definition at line 59 of file DTTrig.h.

typedef TUcontainer::iterator DTTrig::TU_iterator

Definition at line 58 of file DTTrig.h.

typedef std::map< DTChamberId,DTSCTrigUnit*,std::less<DTChamberId> > DTTrig::TUcontainer

Definition at line 57 of file DTTrig.h.

Constructor & Destructor Documentation

DTTrig::DTTrig ( const edm::ParameterSet params,
edm::ConsumesCollector &&  ix 
)

Constructors.

Definition at line 50 of file DTTrig.cc.

References _debug, _digitag, gather_cfg::cout, edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().

50  :
51  _inputexist(1) , _configid(0) , _geomid(0) {
52 
53  // Set configuration parameters
54  _debug = params.getUntrackedParameter<bool>("debug");
55 
56  if(_debug){
57  std::cout << std::endl;
58  std::cout << "**** Initialization of DTTrigger ****" << std::endl;
59  }
60 
61  _digitag = params.getParameter<edm::InputTag>("digiTag");
62  iC.consumes<DTDigiCollection>(_digitag);
63 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool _debug
Definition: DTTrig.h:251
unsigned long long _geomid
Definition: DTTrig.h:255
edm::InputTag _digitag
Definition: DTTrig.h:250
bool _inputexist
Definition: DTTrig.h:252
unsigned long long _configid
Definition: DTTrig.h:254
DTTrig::~DTTrig ( )

Destructor.

Definition at line 69 of file DTTrig.cc.

References clear().

69  {
70 
71  clear();
72 
73 }
void clear()
Clear the trigger units cache.
Definition: DTTrig.cc:272

Member Function Documentation

TU_iterator DTTrig::begin ( void  )
inline

Begin of the trigger units store.

Definition at line 93 of file DTTrig.h.

References _cache.

93 { /*check();*/ return _cache.begin(); }
TUcontainer _cache
Definition: DTTrig.h:247
SC_iterator DTTrig::begin1 ( )
inline

Begin of the sector collector store.

Definition at line 110 of file DTTrig.h.

References _cache1.

110 { /*check();*/ return _cache1.begin(); }
SCcontainer _cache1
Definition: DTTrig.h:248
std::vector< DTBtiTrigData > DTTrig::BtiTrigs ( )

Return a copy of all the BTI triggers.

Definition at line 487 of file DTTrig.cc.

References _cache, DTCache< T, Coll >::begin(), DTSCTrigUnit::BtiTrigs(), DTCache< T, Coll >::end(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by DTTrigTest::analyze(), and getBXOffset().

487  {
488  /*check();*/
489  std::vector<DTBtiTrigData> trigs;
490  TU_iterator ptu;
491  for(ptu=_cache.begin();ptu!=_cache.end();ptu++) {
492  DTSCTrigUnit* tu = (*ptu).second;
493  std::vector<DTBtiTrigData>::const_iterator p; //p=0;
494  std::vector<DTBtiTrigData>::const_iterator peb=tu->BtiTrigs()->end();
495  for(p=tu->BtiTrigs()->begin();p!=peb;p++){
496  trigs.push_back(*p);
497  }
498  }
499  return trigs;
500 }
TUcontainer _cache
Definition: DTTrig.h:247
TUcontainer::iterator TU_iterator
Definition: DTTrig.h:58
DTBtiCard * BtiTrigs() const
Return container of BTI triggers.
Definition: DTSCTrigUnit.h:88
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:40
const_iterator end() const
Get last cache element.
Definition: DTCache.h:43
Range DTTrig::cache ( )
inline

Begin of the trigger units store.

Definition at line 102 of file DTTrig.h.

References _cache.

102 { /*check();*/ return Range(_cache.begin(), _cache.end()); }
TUcontainer _cache
Definition: DTTrig.h:247
std::pair< TU_iterator, TU_iterator > Range
Definition: DTTrig.h:63
SCRange DTTrig::cache1 ( )
inline

Range of the sector collector store.

Definition at line 119 of file DTTrig.h.

References _cache1, chPhiSegm1(), chPhiSegm2(), chSectCollPhSegm1(), chSectCollPhSegm2(), chSectCollThSegm(), chThetaSegm(), dumpGeom(), dumpLuts(), trigUnit(), csvLumiCalc::unit, and makeMuonMisalignmentScenario::wheel.

119 { /*check();*/ return SCRange(_cache1.begin(), _cache1.end()); }
SCcontainer _cache1
Definition: DTTrig.h:248
std::pair< SC_iterator, SC_iterator > SCRange
Definition: DTTrig.h:64
DTChambPhSegm * DTTrig::chPhiSegm1 ( DTChamberId  sid,
int  step 
)

Return the first phi track segment in req. chamber/step.

Definition at line 368 of file DTTrig.cc.

References trigUnit().

Referenced by cache1(), and chPhiSegm1().

368  {
369  return chPhiSegm1(trigUnit(sid),step);
370 }
DTChambPhSegm * chPhiSegm1(DTChamberId sid, int step)
Return the first phi track segment in req. chamber/step.
Definition: DTTrig.cc:368
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:289
step
DTChambPhSegm * DTTrig::chPhiSegm1 ( DTSCTrigUnit unit,
int  step 
)

Return the first phi track segment in req. chamber/step.

Definition at line 347 of file DTTrig.cc.

References DTSCTrigUnit::nPhiSegm(), and DTSCTrigUnit::phiSegment().

347  {
348  if(unit==0)return 0;
349  if(unit->nPhiSegm(step)<1)return 0;
350  return const_cast<DTChambPhSegm*>(unit->phiSegment(step,1));
351 }
step
const DTChambPhSegm * phiSegment(int step, int n)
Return output segments, phi view.
Definition: DTSCTrigUnit.h:144
int nPhiSegm(int step)
Number of Phi segments for a given step.
Definition: DTSCTrigUnit.h:140
DTChambPhSegm * DTTrig::chPhiSegm1 ( int  wheel,
int  stat,
int  sect,
int  step 
)

Return the first phi track segment in req. chamber/step, MTTF numbering.

Definition at line 384 of file DTTrig.cc.

References chPhiSegm1(), and trigUnit().

384  {
385  return chPhiSegm1(trigUnit(wheel,stat,sect),step);
386  // to make it transparent to the outside world
387  // return chSectCollSegm1(wheel,stat,sect,step);
388 
389 }
DTChambPhSegm * chPhiSegm1(DTChamberId sid, int step)
Return the first phi track segment in req. chamber/step.
Definition: DTTrig.cc:368
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:289
step
DTChambPhSegm * DTTrig::chPhiSegm2 ( DTChamberId  sid,
int  step 
)

Return the second phi track segment in req. chamber/step.

Definition at line 373 of file DTTrig.cc.

References trigUnit().

Referenced by cache1(), and chPhiSegm2().

373  {
374  return chPhiSegm2(trigUnit(sid),step);
375 }
DTChambPhSegm * chPhiSegm2(DTChamberId sid, int step)
Return the second phi track segment in req. chamber/step.
Definition: DTTrig.cc:373
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:289
step
DTChambPhSegm * DTTrig::chPhiSegm2 ( DTSCTrigUnit unit,
int  step 
)

Return the second phi track segment in req. chamber/step.

Definition at line 354 of file DTTrig.cc.

References DTSCTrigUnit::nPhiSegm(), and DTSCTrigUnit::phiSegment().

354  {
355  if(unit==0)return 0;
356  if(unit->nPhiSegm(step)<2)return 0;
357  return const_cast<DTChambPhSegm*>(unit->phiSegment(step,2));
358 }
step
const DTChambPhSegm * phiSegment(int step, int n)
Return output segments, phi view.
Definition: DTSCTrigUnit.h:144
int nPhiSegm(int step)
Number of Phi segments for a given step.
Definition: DTSCTrigUnit.h:140
DTChambPhSegm * DTTrig::chPhiSegm2 ( int  wheel,
int  stat,
int  sect,
int  step 
)

Return the second phi track segment in req. chamber/step, MTTF numbering.

Definition at line 392 of file DTTrig.cc.

References chPhiSegm2(), and trigUnit().

392  {
393  // if(stat==4&&(sect==3||sect==9)) {
394  // if hrizontal chambers of MB4 get first track of twin chamber (flag=1)
395  // return chPhiSegm1(trigUnit(wheel,stat,sect,1),step);
396  // } else {
397  return chPhiSegm2(trigUnit(wheel,stat,sect),step);
398  // to make it transparent to the outside world
399  // return chSectCollSegm2(wheel,stat,sect,step);
400  //}
401 }
DTChambPhSegm * chPhiSegm2(DTChamberId sid, int step)
Return the second phi track segment in req. chamber/step.
Definition: DTTrig.cc:373
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:289
step
DTSectCollPhSegm * DTTrig::chSectCollPhSegm1 ( DTSectColl unit,
int  step 
)

Return the first phi track segment in req. chamber/step [SC step].

Definition at line 411 of file DTTrig.cc.

References DTSectColl::nSegmPh(), and DTSectColl::SectCollPhSegment().

Referenced by cache1(), and chSectCollPhSegm1().

411  {
412 
413  if(unit==0)return 0;
414  if(unit->nSegmPh(step)<1)return 0;
415  return const_cast<DTSectCollPhSegm*>(unit->SectCollPhSegment(step,1));
416 }
int nSegmPh(int step)
Return number of DTSectCollPhi segments (SC step)
Definition: DTSectColl.cc:483
const DTSectCollPhSegm * SectCollPhSegment(int step, unsigned n)
Return requested Sector Collector Phi Segment 1st/2nd.
Definition: DTSectColl.cc:512
step
DTSectCollPhSegm * DTTrig::chSectCollPhSegm1 ( int  wheel,
int  sect,
int  step 
)

Return the first phi track segment in req. chamber/step, [MTTF numbering & SC step].

Definition at line 427 of file DTTrig.cc.

References chSectCollPhSegm1(), and SCUnit().

427  {
428 
429  return chSectCollPhSegm1(SCUnit(wheel,sect),step);
430 }
DTSectColl * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:313
DTSectCollPhSegm * chSectCollPhSegm1(DTSectColl *unit, int step)
Return the first phi track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:411
step
DTSectCollPhSegm * DTTrig::chSectCollPhSegm2 ( DTSectColl unit,
int  step 
)

Return the second phi track segment in req. chamber/step [SC step].

Definition at line 419 of file DTTrig.cc.

References DTSectColl::nSegmPh(), and DTSectColl::SectCollPhSegment().

Referenced by cache1(), and chSectCollPhSegm2().

419  {
420  if(unit==0)return 0;
421  if(unit->nSegmPh(step)<2)return 0;
422  return const_cast<DTSectCollPhSegm*>(unit->SectCollPhSegment(step,2));
423 }
int nSegmPh(int step)
Return number of DTSectCollPhi segments (SC step)
Definition: DTSectColl.cc:483
const DTSectCollPhSegm * SectCollPhSegment(int step, unsigned n)
Return requested Sector Collector Phi Segment 1st/2nd.
Definition: DTSectColl.cc:512
step
DTSectCollPhSegm * DTTrig::chSectCollPhSegm2 ( int  wheel,
int  sect,
int  step 
)

Return the second phi track segment in req. chamber/step, [MTTF numbering & SC step].

Definition at line 433 of file DTTrig.cc.

References chSectCollPhSegm2(), and SCUnit().

433  {
434  // if(stat==4&&(sect==3||sect==9)) {
435  // if hrizontal chambers of MB4 get first track of twin chamber (flag=1)
436  //return chSectCollSegm1(trigUnit(wheel,stat,sect,1),step);
437  //} else {
438  return chSectCollPhSegm2(SCUnit(wheel,sect),step);
439  //}
440 }
DTSectColl * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:313
DTSectCollPhSegm * chSectCollPhSegm2(DTSectColl *unit, int step)
Return the second phi track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:419
step
DTSectCollThSegm * DTTrig::chSectCollThSegm ( DTSectColl unit,
int  step 
)

Return the theta track segment in req. chamber/step [SC step].

Definition at line 443 of file DTTrig.cc.

References DTSectColl::nSegmTh(), and DTSectColl::SectCollThSegment().

Referenced by cache1(), and chSectCollThSegm().

443  {
444 
445  if(unit==0)return 0;
446  if(unit->nSegmTh(step)<1)return 0;
447  return const_cast<DTSectCollThSegm*>(unit->SectCollThSegment(step));
448 }
int nSegmTh(int step)
Return number of DTSectCollTheta segments (SC step)
Definition: DTSectColl.cc:497
const DTSectCollThSegm * SectCollThSegment(int step)
Return requested Sector Collector Theta Segment.
Definition: DTSectColl.cc:526
step
DTSectCollThSegm * DTTrig::chSectCollThSegm ( int  wheel,
int  sect,
int  step 
)

Return the theta track segment in req. chamber/step, [MTTF numbering & SC step].

Definition at line 451 of file DTTrig.cc.

References chSectCollThSegm(), and SCUnit().

451  {
452 
453  return chSectCollThSegm(SCUnit(wheel,sect),step);
454 }
DTSectColl * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:313
DTSectCollThSegm * chSectCollThSegm(DTSectColl *unit, int step)
Return the theta track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:443
step
DTChambThSegm * DTTrig::chThetaSegm ( DTChamberId  sid,
int  step 
)

Return the theta candidates in req. chamber/step.

Definition at line 378 of file DTTrig.cc.

References DTChamberId::station(), and trigUnit().

Referenced by cache1(), and chThetaSegm().

378  {
379  if(sid.station()==4)return 0;
380  return chThetaSegm(trigUnit(sid),step);
381 }
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:289
DTChambThSegm * chThetaSegm(DTChamberId sid, int step)
Return the theta candidates in req. chamber/step.
Definition: DTTrig.cc:378
step
int station() const
Return the station number.
Definition: DTChamberId.h:51
DTChambThSegm * DTTrig::chThetaSegm ( DTSCTrigUnit unit,
int  step 
)

Return the theta candidates in req. chamber/step.

Definition at line 361 of file DTTrig.cc.

References DTSCTrigUnit::nThetaSegm(), and DTSCTrigUnit::thetaSegment().

361  {
362  if(unit==0)return 0;
363  if(unit->nThetaSegm(step)<1)return 0;
364  return const_cast<DTChambThSegm*>(unit->thetaSegment(step,1));
365 }
const DTChambThSegm * thetaSegment(int step, int n)
Return output segments, theta view.
Definition: DTSCTrigUnit.h:152
step
int nThetaSegm(int step)
Number of theta segments for a given step.
Definition: DTSCTrigUnit.h:149
DTChambThSegm * DTTrig::chThetaSegm ( int  wheel,
int  stat,
int  sect,
int  step 
)

Return the theta candidates in req. chamber/step, MTTF numbering.

Definition at line 404 of file DTTrig.cc.

References chThetaSegm(), and trigUnit().

404  {
405  if(stat==4)return 0;
406  return chThetaSegm(trigUnit(wheel,stat,sect),step);
407 }
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:289
DTChambThSegm * chThetaSegm(DTChamberId sid, int step)
Return the theta candidates in req. chamber/step.
Definition: DTTrig.cc:378
step
void DTTrig::clear ( void  )

Clear the trigger units cache.

Definition at line 272 of file DTTrig.cc.

References _cache, and _cache1.

Referenced by ~DTTrig().

272  {
273  // Delete the map
274  for (TU_iterator it=_cache.begin();it!=_cache.end();it++){
275  // Delete all the trigger units
276  delete (*it).second;
277  }
278  _cache.clear();
279 
280  for (SC_iterator it=_cache1.begin();it!=_cache1.end();it++){
281  // Delete all the Sector Collectors
282  delete (*it).second;
283  }
284  _cache1.clear();
285 
286 }
SCcontainer::iterator SC_iterator
Definition: DTTrig.h:61
SCcontainer _cache1
Definition: DTTrig.h:248
TUcontainer _cache
Definition: DTTrig.h:247
TUcontainer::iterator TU_iterator
Definition: DTTrig.h:58
GlobalVector DTTrig::CMSDirection ( const DTTrigData trig) const
inline

Direction of a trigger-data object in CMS frame.

Definition at line 221 of file DTTrig.h.

References DTTrigData::ChamberId(), and constTrigUnit().

Referenced by DTTrigTest::analyze().

221  {
222  return constTrigUnit(trig->ChamberId())->CMSDirection(trig);
223  }
DTSCTrigUnit * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:297
GlobalVector CMSDirection(const DTTrigData *trig) const
Direction of a trigger-data object in CMS frame.
Definition: DTTrig.h:221
virtual DTChamberId ChamberId() const =0
Identifier of the associated chamber.
GlobalPoint DTTrig::CMSPosition ( const DTTrigData trig) const
inline

Coordinate of a trigger-data object in CMS frame.

Definition at line 211 of file DTTrig.h.

References DTTrigData::ChamberId(), and constTrigUnit().

Referenced by DTTrigTest::analyze().

211  {
212  return constTrigUnit(trig->ChamberId())->CMSPosition(trig);
213  }
DTSCTrigUnit * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:297
GlobalPoint CMSPosition(const DTTrigData *trig) const
Coordinate of a trigger-data object in CMS frame.
Definition: DTTrig.h:211
virtual DTChamberId ChamberId() const =0
Identifier of the associated chamber.
DTSCTrigUnit * DTTrig::constTrigUnit ( DTChamberId  sid) const
private

Return a trigger unit - Muon numbering - const version.

Definition at line 297 of file DTTrig.cc.

References _cache, gather_cfg::cout, DTChamberId::sector(), DTChamberId::station(), and DTChamberId::wheel().

Referenced by CMSDirection(), CMSPosition(), constTrigUnit(), localDirection(), localPosition(), print(), and trigUnit().

297  {
298 // std::cout << " SC: running DTTrig::constTrigUnit(DTChamberId chid)" << std::endl;
299  TU_const_iterator it = _cache.find(chid);
300  if ( it == _cache.end()) {
301  std::cout << "DTTrig::trigUnit: Trigger Unit not in the map: ";
302  std::cout << " wheel=" << chid.wheel() ;
303  std::cout << ", station=" << chid.station();
304  std::cout << ", sector=" << chid.sector();
305  std::cout << std::endl;
306  return 0;
307  }
308 
309  return (*it).second;
310 }
TUcontainer _cache
Definition: DTTrig.h:247
TUcontainer::const_iterator TU_const_iterator
Definition: DTTrig.h:59
DTSCTrigUnit * DTTrig::constTrigUnit ( int  wheel,
int  stat,
int  sect 
) const
private

Return a trigger unit - Muon numbering, MTTF numbering - const version.

Definition at line 339 of file DTTrig.cc.

References constTrigUnit().

339  {
340  sect++; // offset 1 for sector number ([0,11] --> [1,12])
341  return constTrigUnit(DTChamberId(wheel,stat,sect));
342 
343 }
DTSCTrigUnit * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:297
void DTTrig::createTUs ( const edm::EventSetup iSetup)

Create the trigger units and store them in the cache.

Definition at line 76 of file DTTrig.cc.

References _cache, _cache1, _debug, DTSectColl::addTU(), DTGeometry::chambers(), gather_cfg::cout, edm::EventSetup::get(), DTChamber::id(), SimDataFormats::CaloAnalysis::sc, DTSectCollId::sector(), DTChamberId::sector(), DTSectCollId::wheel(), and DTChamberId::wheel().

Referenced by DTTrigProd::beginRun(), and DTTrigTest::beginRun().

76  {
77 
78  // build up Sector Collectors and then
79  // build the trrigger units (one for each chamber)
80  for(int iwh=-2;iwh<=2;iwh++){
81  for(int ise=1;ise<=12;ise++){
82  if(_debug){
83  std::cout << "calling sectcollid wh sc " << iwh << " " << ise << std::endl;}
84  DTSectCollId scid(iwh,ise);
85  SC_iterator it = _cache1.find(scid);
86  if ( it != _cache1.end()) {
87  std::cout << "DTTrig::createTUs: Sector Collector unit already exists"<<std::endl;
88  continue;
89  }
90  DTSectColl* sc;
91  sc = new DTSectColl(scid);
92  if(_debug){
93  std::cout << " DTTrig::createTUs new SC sc = " << sc
94  << " at scid.sector() " << scid.sector()
95  << " at scid.wheel() " << scid.wheel()
96  << std::endl;
97  }
98  _cache1[scid] = sc;
99  }
100  }
101 
103  iSetup.get<MuonGeometryRecord>().get(dtGeom);
104  for (std::vector<const DTChamber*>::const_iterator ich=dtGeom->chambers().begin(); ich!=dtGeom->chambers().end();ich++){
105 
106  const DTChamber* chamb = (*ich);
107  DTChamberId chid = chamb->id();
108  TU_iterator it = _cache.find(chid);
109  if ( it != _cache.end()) {
110  if (_debug) std::cout << "DTTrig::init: Trigger unit already exists" << std::endl;
111  continue;
112  }
113 
114  DTSCTrigUnit* tru = new DTSCTrigUnit(chamb);
115  _cache[chid] = tru;
116 
117  //----------- add TU to corresponding SC
118  // returning correspondent SC id
119  DTSectCollId scid;
120  if(chid.sector()==13) {
121  scid = DTSectCollId(chid.wheel(), 4);}
122  else if(chid.sector()==14) {
123  scid = DTSectCollId(chid.wheel(), 10);}
124  else {
125  scid = DTSectCollId(chid.wheel(), chid.sector() );}
126 
127  SC_iterator it1 = _cache1.find(scid);
128 
129  if ( it1 != _cache1.end()) {
130 
131  DTSectColl* sc = (*it1).second;
132  if(_debug) {
133  std::cout << "DTTrig::init: adding TU in SC << "
134  << " sector = " << scid.sector()
135  << " wheel = " << scid.wheel()
136  << std::endl;
137  }
138  sc->addTU(tru);
139  }
140  else {
141  std::cout << "DTTrig::createTUs: Trigger Unit not in the map: ";
142  }
143 
144  }
145 
146 }
SCcontainer::iterator SC_iterator
Definition: DTTrig.h:61
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
Definition: DTGeometry.cc:84
SCcontainer _cache1
Definition: DTTrig.h:248
bool _debug
Definition: DTTrig.h:251
TUcontainer _cache
Definition: DTTrig.h:247
TUcontainer::iterator TU_iterator
Definition: DTTrig.h:58
DTChamberId id() const
Return the DTChamberId of this chamber.
Definition: DTChamber.cc:33
int sector() const
Definition: DTSectCollId.h:41
void addTU(DTSCTrigUnit *tru)
Add a Trigger Unit to the Sector Collector.
Definition: DTSectColl.cc:128
const T & get() const
Definition: EventSetup.h:55
int wheel() const
Definition: DTSectCollId.h:40
int sector() const
Definition: DTChamberId.h:61
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
void DTTrig::dumpGeom ( )

Dump the geometry.

Definition at line 460 of file DTTrig.cc.

References _cache.

Referenced by cache1().

460  {
461  /*check();*/
462  for (TU_const_iterator it=_cache.begin();it!=_cache.end();it++){
463  ((*it).second)->dumpGeom();
464  }
465 }
TUcontainer _cache
Definition: DTTrig.h:247
void dumpGeom()
Dump the geometry.
Definition: DTTrig.cc:460
TUcontainer::const_iterator TU_const_iterator
Definition: DTTrig.h:59
void DTTrig::dumpLuts ( short int  lut_btic,
const DTConfigManager conf 
)

Dump the LUT files.

Definition at line 468 of file DTTrig.cc.

References _cache, DTSCTrigUnit::dumpLUT(), DTConfigManager::dumpLUTParam(), and DTSCTrigUnit::statId().

Referenced by DTTrigProd::beginRun(), and cache1().

468  {
469  for (TU_const_iterator it=_cache.begin();it!=_cache.end();it++){
470 
471  DTSCTrigUnit* thisTU = (*it).second;
472 
473  // dump lut command file from geometry
474  thisTU->dumpLUT(lut_btic);
475 
476  // dump lut command file from parameters (DB or CMSSW)
477  DTChamberId chid = thisTU->statId();
478  conf->dumpLUTParam(chid);
479 
480  }
481 
482  return;
483 
484 }
void dumpLUTParam(DTChamberId &chambid) const
Dump luts string commands from configuration parameters.
TUcontainer _cache
Definition: DTTrig.h:247
void dumpLUT(short int btic) const
Dump the Lut file.
Definition: DTSCTrigUnit.h:131
TUcontainer::const_iterator TU_const_iterator
Definition: DTTrig.h:59
DTChamberId statId() const
Identifier of the associated chamber.
Definition: DTSCTrigUnit.h:76
TU_iterator DTTrig::end ( void  )
inline

End of the trigger units store.

Definition at line 96 of file DTTrig.h.

References _cache.

96 { /*check();*/ return _cache.end(); }
TUcontainer _cache
Definition: DTTrig.h:247
SC_iterator DTTrig::end1 ( )
inline

End of the sectoor collector store.

Definition at line 113 of file DTTrig.h.

References _cache1.

113 { /*check();*/ return _cache1.end(); }
SCcontainer _cache1
Definition: DTTrig.h:248
TU_iterator DTTrig::find ( DTChamberId  id)
inline

Find a trigger unit in the map.

Definition at line 99 of file DTTrig.h.

References _cache.

99 { /*check();*/ return _cache.find(id); }
TUcontainer _cache
Definition: DTTrig.h:247
SC_iterator DTTrig::find1 ( DTSectCollId  id)
inline

Find a Sector Collector in the map.

Definition at line 116 of file DTTrig.h.

References _cache1.

116 { /*check();*/ return _cache1.find(id); }
SCcontainer _cache1
Definition: DTTrig.h:248
int DTTrig::getBXOffset ( )
inline

Get BX Offset.

Definition at line 183 of file DTTrig.h.

References _conf_manager, BtiTrigs(), DTConfigManager::getBXOffset(), SCPhTrigs(), SCThTrigs(), TracoTrigs(), TSPhTrigs(), and TSThTrigs().

Referenced by DTTrigProd::produce().

183 { return _conf_manager->getBXOffset(); }
int getBXOffset() const
Get BX Offset for a given vdrift config.
const DTConfigManager * _conf_manager
Definition: DTTrig.h:249
LocalVector DTTrig::localDirection ( const DTTrigData trig) const
inline

Direction of a trigger-data object in chamber frame.

Definition at line 216 of file DTTrig.h.

References DTTrigData::ChamberId(), and constTrigUnit().

216  {
217  return constTrigUnit(trig->ChamberId())->localDirection(trig);
218  }
DTSCTrigUnit * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:297
LocalVector localDirection(const DTTrigData *trig) const
Direction of a trigger-data object in chamber frame.
Definition: DTTrig.h:216
virtual DTChamberId ChamberId() const =0
Identifier of the associated chamber.
LocalPoint DTTrig::localPosition ( const DTTrigData trig) const
inline

Coordinate of a trigger-data object in chamber frame.

Definition at line 206 of file DTTrig.h.

References DTTrigData::ChamberId(), and constTrigUnit().

206  {
207  return constTrigUnit(trig->ChamberId())->localPosition(trig);
208  }
LocalPoint localPosition(const DTTrigData *trig) const
Coordinate of a trigger-data object in chamber frame.
Definition: DTTrig.h:206
DTSCTrigUnit * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:297
virtual DTChamberId ChamberId() const =0
Identifier of the associated chamber.
void DTTrig::print ( DTTrigData trig) const
inline

Print a trigger-data object.

Definition at line 226 of file DTTrig.h.

References DTTrigData::ChamberId(), constTrigUnit(), and SCUnit().

226  {
227  constTrigUnit(trig->ChamberId())->print(trig);
228  }
void print(DTTrigData *trig) const
Print a trigger-data object.
Definition: DTTrig.h:226
DTSCTrigUnit * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:297
virtual DTChamberId ChamberId() const =0
Identifier of the associated chamber.
std::vector< DTSectCollPhSegm > DTTrig::SCPhTrigs ( )

Return a copy of all the Sector Collector (Phi) triggers.

Definition at line 551 of file DTTrig.cc.

References _cache1, DTSectColl::beginPh(), DTSectColl::endPh(), AlCaHLTBitMon_ParallelJobs::p, and SimDataFormats::CaloAnalysis::sc.

Referenced by DTTrigTest::analyze(), getBXOffset(), and DTTrigProd::produce().

551  {
552  /*check();*/
553  std::vector<DTSectCollPhSegm> trigs;
554  // SC_iterator ptu;
555  SC_iterator psc;
556  for(psc=_cache1.begin();psc!=_cache1.end();psc++) {
557  // DTSCTrigUnit* tu = (*ptu).second;
558  //
559  // old SMDB:
560  // DTSectColl* tu = (*ptu).second;
561  // std::vector<DTChambPhSegm>::const_iterator p=0;
562  // std::vector<DTChambPhSegm>::const_iterator peb=tu->SCTrigs()->end();
563  // for(p=tu->SCTrigs()->begin();p!=peb;p++){
564  // trigs.push_back(*p);
565  // }
566 
567  DTSectColl* sc = (*psc).second;
568  std::vector<DTSectCollPhSegm>::const_iterator p;
569  std::vector<DTSectCollPhSegm>::const_iterator peb=sc->endPh();
570  for(p=sc->beginPh();p!=peb;p++){
571  trigs.push_back(*p);
572  }
573 
574  }
575  return trigs;
576 }
SCcontainer::iterator SC_iterator
Definition: DTTrig.h:61
SCcontainer _cache1
Definition: DTTrig.h:248
std::vector< DTSectCollPhSegm >::const_iterator endPh()
Return iterator to the end of Phi cache.
Definition: DTSectColl.h:156
std::vector< DTSectCollPhSegm >::const_iterator beginPh()
Return iterator to the beghin of Phi cache.
Definition: DTSectColl.h:150
std::vector< DTSectCollThSegm > DTTrig::SCThTrigs ( )

Return a copy of all the Sector Collector (Theta) triggers.

Definition at line 580 of file DTTrig.cc.

References _cache1, DTSectColl::beginTh(), DTSectColl::endTh(), AlCaHLTBitMon_ParallelJobs::p, and SimDataFormats::CaloAnalysis::sc.

Referenced by DTTrigTest::analyze(), getBXOffset(), and DTTrigProd::produce().

580  {
581  /*check();*/
582  std::vector<DTSectCollThSegm> trigs;
583  SC_iterator psc;
584  for(psc=_cache1.begin();psc!=_cache1.end();psc++) {
585  DTSectColl* sc = (*psc).second;
586  std::vector<DTSectCollThSegm>::const_iterator p; //p=0;
587  std::vector<DTSectCollThSegm>::const_iterator peb=sc->endTh();
588  for(p=sc->beginTh();p!=peb;p++){
589  trigs.push_back(*p);
590  }
591 
592  }
593  return trigs;
594 }
SCcontainer::iterator SC_iterator
Definition: DTTrig.h:61
SCcontainer _cache1
Definition: DTTrig.h:248
std::vector< DTSectCollThSegm >::const_iterator beginTh()
Return iterator to the begni of Theta cache.
Definition: DTSectColl.h:159
std::vector< DTSectCollThSegm >::const_iterator endTh()
Return iterator to the end of Theta cache.
Definition: DTSectColl.h:165
DTSectColl * DTTrig::SCUnit ( DTSectCollId  scid) const
private

Return a SC unit - Muon numbering - const version.

Definition at line 313 of file DTTrig.cc.

References _cache1, gather_cfg::cout, DTSectCollId::sector(), and DTSectCollId::wheel().

Referenced by chSectCollPhSegm1(), chSectCollPhSegm2(), chSectCollThSegm(), print(), and SCUnit().

313  {
314 SC_const_iterator it = _cache1.find(scid);
315  if ( it == _cache1.end()) {
316  std::cout << "DTTrig::SCUnit: Trigger Unit not in the map: ";
317  std::cout << " wheel=" << scid.wheel() ;
318  std::cout << ", sector=" << scid.sector();
319  std::cout << std::endl;
320  return 0;
321  }
322 
323  return (*it).second;
324 }
SCcontainer _cache1
Definition: DTTrig.h:248
int sector() const
Definition: DTSectCollId.h:41
int wheel() const
Definition: DTSectCollId.h:40
SCcontainer::const_iterator SC_const_iterator
Definition: DTTrig.h:62
DTSectColl * DTTrig::SCUnit ( int  wheel,
int  sect 
) const
private

Return a SC Unit Muon Numbering, MTTF numbering - const version.

Definition at line 332 of file DTTrig.cc.

References SCUnit().

332  {
333  sect++;
334  return SCUnit(DTSectCollId(wheel,sect));
335 }
DTSectColl * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:313
int DTTrig::size ( void  )
inline

Size of the trigger units store.

Definition at line 90 of file DTTrig.h.

References _cache.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

90 { return _cache.size(); }
TUcontainer _cache
Definition: DTTrig.h:247
int DTTrig::size1 ( )
inline

Size of the sector collector store.

Definition at line 107 of file DTTrig.h.

References _cache1.

107 { /*check();*/ return _cache1.size(); }
SCcontainer _cache1
Definition: DTTrig.h:248
std::vector< DTTracoTrigData > DTTrig::TracoTrigs ( )

Return a copy of all the TRACO triggers.

Definition at line 503 of file DTTrig.cc.

References _cache, DTCache< T, Coll >::begin(), DTCache< T, Coll >::end(), AlCaHLTBitMon_ParallelJobs::p, and DTSCTrigUnit::TracoTrigs().

Referenced by DTTrigTest::analyze(), and getBXOffset().

503  {
504  std::vector<DTTracoTrigData> trigs;
505  TU_iterator ptu;
506  /*check();*/
507  for(ptu=_cache.begin();ptu!=_cache.end();ptu++) {
508  DTSCTrigUnit* tu = (*ptu).second;
509  std::vector<DTTracoTrigData>::const_iterator p; //p=0;
510  std::vector<DTTracoTrigData>::const_iterator peb=tu->TracoTrigs()->end();
511  for(p=tu->TracoTrigs()->begin();p!=peb;p++){
512  trigs.push_back(*p);
513  }
514  }
515  return trigs;
516 }
TUcontainer _cache
Definition: DTTrig.h:247
TUcontainer::iterator TU_iterator
Definition: DTTrig.h:58
DTTracoCard * TracoTrigs() const
Return container of TRACO triggers.
Definition: DTSCTrigUnit.h:91
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:40
const_iterator end() const
Get last cache element.
Definition: DTCache.h:43
void DTTrig::triggerReco ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)

Run the whole trigger reconstruction chain.

Definition at line 150 of file DTTrig.cc.

References _cache, _cache1, _digitag, _inputexist, DTSCTrigUnit::BtiTrigs(), DTSuperLayerId::chamberId(), DTCache< T, Coll >::clearCache(), DTTracoCard::clearCache(), DTBtiCard::clearCache(), DTSectColl::clearCache(), edm::Event::getByLabel(), DTSectColl::getTSPhi(), DTSectColl::getTSTheta(), mps_fire::i, edm::HandleBase::isValid(), LogDebug, DTTSPhi::reconstruct(), DTTSTheta::reconstruct(), DTBtiCard::reconstruct(), DTTracoCard::reconstruct(), DTSectColl::reconstruct(), DTSectCollId::sector(), DTCache< T, Coll >::size(), DTSectColl::sizePh(), DTSectColl::sizeTh(), DTSCTrigUnit::statId(), DTLayerId::superlayerId(), DTSCTrigUnit::TracoTrigs(), DTSCTrigUnit::TSPhTrigs(), DTSCTrigUnit::TSThTrigs(), and updateES().

Referenced by DTTrigTest::analyze(), and DTTrigProd::produce().

150  {
151 
152  updateES(iSetup);
153  if (!_inputexist) return;
154 
155  DTDigiMap digiMap;
156  //Sort digis by chamber so they can be used by BTIs
158  iEvent.getByLabel(_digitag, dtDigis);
159 
160  if (!dtDigis.isValid()) {
161  LogDebug("DTTrig")
162  << "DTTrig::triggerReco DTDigiCollection with input tag " << _digitag
163  << "requested in configuration, but not found in the event." << std::endl;
164  _inputexist = false;
165  return;
166  }
167 
169 
170  for (detUnitIt=dtDigis->begin();
171  detUnitIt!=dtDigis->end();
172  ++detUnitIt){
173 
174  const DTLayerId& layId = (*detUnitIt).first;
175  const DTChamberId chambId=layId.superlayerId().chamberId();
176  const DTDigiCollection::Range& range = (*detUnitIt).second;
177  digiMap[chambId].put(range,layId);
178 
179  }
180 
181  //Run reconstruct for single trigger subsystem (Bti, Traco TS)
182  for (TU_iterator it=_cache.begin();it!=_cache.end();it++){
183  DTSCTrigUnit* thisTU=(*it).second;
184  if (thisTU->BtiTrigs()->size()>0){
185  thisTU->BtiTrigs()->clearCache();
186  thisTU->TSThTrigs()->clearCache();
187  thisTU->TracoTrigs()->clearCache();
188  thisTU->TSPhTrigs()->clearCache();
189  }
190  DTChamberId chid=thisTU->statId();
191  DTDigiMap_iterator dmit = digiMap.find(chid);
192  if (dmit !=digiMap.end()){
193  thisTU->BtiTrigs()->reconstruct((*dmit).second);
194  if(thisTU->BtiTrigs()->size()>0){
195  thisTU->TSThTrigs()->reconstruct();
196  thisTU->TracoTrigs()->reconstruct();
197  if(thisTU->TracoTrigs()->size()>0)
198  thisTU->TSPhTrigs()->reconstruct();
199  }
200  }
201  }
202  //Run reconstruct for Sector Collector
203  for (SC_iterator it=_cache1.begin();it!=_cache1.end();it++){
204  DTSectColl* sectcoll = (*it).second;
205  DTSectCollId scid = (*it).first;
206  if (sectcoll->sizePh()>0 || sectcoll->sizeTh()>0)
207  sectcoll->clearCache();
208  bool mustreco = false;
209  for (int i=1;i<5;i++) {
210  if (sectcoll->getTSPhi(i)->size()>0) {
211  mustreco = true;
212  break;
213  }
214  }
215  for (int i=1;i<4;i++) {
216  if (sectcoll->getTSTheta(i)->size()>0) {
217  mustreco = true;
218  break;
219  }
220  }
221  if (scid.sector()==4 || scid.sector()==10){
222  if (sectcoll->getTSPhi(5)->size()>0)
223  mustreco = true;
224  }
225  if (mustreco)
226  sectcoll->reconstruct();
227  }
228 
229 }
#define LogDebug(id)
virtual void reconstruct()
Load Trigger Units triggers and run Sector Collector algorithm.
Definition: DTSectColl.h:177
int sizePh()
Return Phi cache size.
Definition: DTSectColl.h:153
virtual void reconstruct(const DTDigiCollection dtDigis)
Definition: DTBtiCard.h:102
void clearCache()
Clear all traco stuff (cache & map)
Definition: DTTracoCard.cc:70
SCcontainer::iterator SC_iterator
Definition: DTTrig.h:61
SCcontainer _cache1
Definition: DTTrig.h:248
DTChamberId chamberId() const
Return the corresponding ChamberId.
DTTSTheta * TSThTrigs() const
Return the chamber Trigger Server (Theta)
Definition: DTSCTrigUnit.h:97
void clearCache()
Clear all BTI stuff (map & cache)
Definition: DTBtiCard.cc:95
int sizeTh()
Return Theta cache size.
Definition: DTSectColl.h:162
DTTSPhi * TSPhTrigs() const
Return the chamber Trigger Server (Phi)
Definition: DTSCTrigUnit.h:94
TUcontainer _cache
Definition: DTTrig.h:247
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:59
TUcontainer::iterator TU_iterator
Definition: DTTrig.h:58
DTBtiCard * BtiTrigs() const
Return container of BTI triggers.
Definition: DTSCTrigUnit.h:88
void updateES(const edm::EventSetup &iSetup)
update the eventsetup info
Definition: DTTrig.cc:232
edm::InputTag _digitag
Definition: DTTrig.h:250
bool isValid() const
Definition: HandleBase.h:74
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:416
DTDigiMap::iterator DTDigiMap_iterator
Definition: DTTrig.h:66
int sector() const
Definition: DTSectCollId.h:41
DTTracoCard * TracoTrigs() const
Return container of TRACO triggers.
Definition: DTSCTrigUnit.h:91
void reconstruct()
Load BTIs triggers and run TSTheta algoritm.
Definition: DTTSTheta.h:83
void clearCache()
Local position in chamber of a trigger-data object.
Definition: DTSectColl.h:174
std::map< DTChamberId, DTDigiCollection, std::less< DTChamberId > > DTDigiMap
Definition: DTTrig.h:65
bool _inputexist
Definition: DTTrig.h:252
DTChamberId statId() const
Identifier of the associated chamber.
Definition: DTSCTrigUnit.h:76
virtual void reconstruct()
Load TRACO triggers and run TSPhi algorithm.
Definition: DTTSPhi.h:82
virtual void reconstruct()
Load BTIs triggers and run TRACOs algorithm.
Definition: DTTracoCard.h:105
std::pair< const_iterator, const_iterator > Range
void clearCache()
Clear cache vector.
Definition: DTCache.h:49
DTTSPhi * getTSPhi(int istat) const
Return TSPhi.
Definition: DTSectColl.h:71
int size() const
Get cache vector&#39;s size.
Definition: DTCache.h:46
DTTSTheta * getTSTheta(int istat) const
Return TSTheta.
Definition: DTSectColl.h:74
DTSCTrigUnit * DTTrig::trigUnit ( DTChamberId  sid)

Return a trigger unit - Muon numbering.

Definition at line 289 of file DTTrig.cc.

References constTrigUnit().

Referenced by cache1(), chPhiSegm1(), chPhiSegm2(), and chThetaSegm().

289  {
290  /*check();*/ return constTrigUnit(chid);
291 
292 }
DTSCTrigUnit * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:297
DTSCTrigUnit * DTTrig::trigUnit ( int  wheel,
int  stat,
int  sect 
)

Return a trigger unit - Muon numbering, MTTF numbering.

Definition at line 327 of file DTTrig.cc.

References constTrigUnit().

327  {
328  return constTrigUnit(wheel, stat, sect);
329 }
DTSCTrigUnit * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:297
std::vector< DTChambPhSegm > DTTrig::TSPhTrigs ( )

Return a copy of all the Trigger Server (Phi) triggers.

Definition at line 519 of file DTTrig.cc.

References _cache, DTCache< T, Coll >::begin(), DTCache< T, Coll >::end(), AlCaHLTBitMon_ParallelJobs::p, and DTSCTrigUnit::TSPhTrigs().

Referenced by DTTrigTest::analyze(), and getBXOffset().

519  {
520  /*check();*/
521  std::vector<DTChambPhSegm> trigs;
522  TU_iterator ptu;
523  for(ptu=_cache.begin();ptu!=_cache.end();ptu++) {
524  DTSCTrigUnit* tu = (*ptu).second;
525  std::vector<DTChambPhSegm>::const_iterator p; //p=0;
526  std::vector<DTChambPhSegm>::const_iterator peb=tu->TSPhTrigs()->end();
527  for(p=tu->TSPhTrigs()->begin();p!=peb;p++){
528  trigs.push_back(*p);
529  }
530  }
531  return trigs;
532 }
DTTSPhi * TSPhTrigs() const
Return the chamber Trigger Server (Phi)
Definition: DTSCTrigUnit.h:94
TUcontainer _cache
Definition: DTTrig.h:247
TUcontainer::iterator TU_iterator
Definition: DTTrig.h:58
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:40
const_iterator end() const
Get last cache element.
Definition: DTCache.h:43
std::vector< DTChambThSegm > DTTrig::TSThTrigs ( )

Return a copy of all the Trigger Server (Theta) triggers.

Definition at line 535 of file DTTrig.cc.

References _cache, DTCache< T, Coll >::begin(), DTCache< T, Coll >::end(), AlCaHLTBitMon_ParallelJobs::p, and DTSCTrigUnit::TSThTrigs().

Referenced by DTTrigTest::analyze(), and getBXOffset().

535  {
536  /*check();*/
537  std::vector<DTChambThSegm> trigs;
538  TU_iterator ptu;
539  for(ptu=_cache.begin();ptu!=_cache.end();ptu++) {
540  DTSCTrigUnit* tu = (*ptu).second;
541  std::vector<DTChambThSegm>::const_iterator p; //p=0;
542  std::vector<DTChambThSegm>::const_iterator peb=tu->TSThTrigs()->end();
543  for(p=tu->TSThTrigs()->begin();p!=peb;p++){
544  trigs.push_back(*p);
545  }
546  }
547  return trigs;
548 }
DTTSTheta * TSThTrigs() const
Return the chamber Trigger Server (Theta)
Definition: DTSCTrigUnit.h:97
TUcontainer _cache
Definition: DTTrig.h:247
TUcontainer::iterator TU_iterator
Definition: DTTrig.h:58
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:40
const_iterator end() const
Get last cache element.
Definition: DTCache.h:43
void DTTrig::updateES ( const edm::EventSetup iSetup)

update the eventsetup info

Definition at line 232 of file DTTrig.cc.

References _cache, _cache1, _conf_manager, _configid, _debug, _geomid, edm::eventsetup::EventSetupRecord::cacheIdentifier(), DTGeometry::chamber(), gather_cfg::cout, edm::EventSetup::get(), and edm::ESHandle< T >::product().

Referenced by triggerReco().

232  {
233 
234  // Check for updatets in config
236  edm::ESHandle<DTGeometry> geomHandle;
237 
238  if (iSetup.get<DTConfigManagerRcd>().cacheIdentifier()!=_configid) {
239 
240  if (_debug)
241  std::cout << "DTTrig::updateES updating DTTPG configuration" << std::endl;
242 
243  _configid = iSetup.get<DTConfigManagerRcd>().cacheIdentifier();
244  iSetup.get<DTConfigManagerRcd>().get(confHandle);
245  _conf_manager = confHandle.product();
246  for (TU_iterator it=_cache.begin();it!=_cache.end();it++){
247  (*it).second->setConfig(_conf_manager);
248  }
249  for (SC_iterator it=_cache1.begin();it!=_cache1.end();it++){
250  (*it).second->setConfig(_conf_manager);
251  }
252 
253  }
254 
255  if (iSetup.get<MuonGeometryRecord>().cacheIdentifier()!=_configid) {
256 
257  if (_debug)
258  std::cout << "DTTrig::updateES updating muon geometry" << std::endl;
259 
260  _geomid = iSetup.get<MuonGeometryRecord>().cacheIdentifier();
261  iSetup.get<MuonGeometryRecord>().get(geomHandle);
262  for (TU_iterator it=_cache.begin();it!=_cache.end();it++){
263  (*it).second->setGeom(geomHandle->chamber((*it).second->statId()));
264  }
265 
266  }
267 
268 }
unsigned long long cacheIdentifier() const
SCcontainer::iterator SC_iterator
Definition: DTTrig.h:61
SCcontainer _cache1
Definition: DTTrig.h:248
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
Definition: DTGeometry.cc:99
bool _debug
Definition: DTTrig.h:251
TUcontainer _cache
Definition: DTTrig.h:247
TUcontainer::iterator TU_iterator
Definition: DTTrig.h:58
unsigned long long _geomid
Definition: DTTrig.h:255
const T & get() const
Definition: EventSetup.h:55
const DTConfigManager * _conf_manager
Definition: DTTrig.h:249
T const * product() const
Definition: ESHandle.h:86
unsigned long long _configid
Definition: DTTrig.h:254

Member Data Documentation

TUcontainer DTTrig::_cache
private
SCcontainer DTTrig::_cache1
private
const DTConfigManager* DTTrig::_conf_manager
private

Definition at line 249 of file DTTrig.h.

Referenced by getBXOffset(), and updateES().

unsigned long long DTTrig::_configid
private

Definition at line 254 of file DTTrig.h.

Referenced by updateES().

bool DTTrig::_debug
private
edm::InputTag DTTrig::_digitag
private

Definition at line 250 of file DTTrig.h.

Referenced by DTTrig(), and triggerReco().

unsigned long long DTTrig::_geomid
private

Definition at line 255 of file DTTrig.h.

Referenced by updateES().

bool DTTrig::_inputexist
private

Definition at line 252 of file DTTrig.h.

Referenced by triggerReco().