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 () const
 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 () const
 Dump the geometry. More...
 
void dumpLuts (short int lut_btic, const DTConfigManager *conf) const
 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 () const
 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 () const
 Return a copy of all the Sector Collector (Phi) triggers. More...
 
std::vector< DTSectCollThSegmSCThTrigs () const
 Return a copy of all the Sector Collector (Theta) triggers. More...
 
int size () const
 Size of the trigger units store. More...
 
int size1 () const
 Size of the sector collector store. More...
 
std::vector< DTTracoTrigDataTracoTrigs () const
 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 () const
 Return a copy of all the Trigger Server (Phi) triggers. More...
 
std::vector< DTChambThSegmTSThTrigs () const
 Return a copy of all the Trigger Server (Theta) triggers. More...
 
void updateES (const edm::EventSetup &iSetup)
 update the eventsetup info More...
 

Private Member Functions

DTSCTrigUnit const * constTrigUnit (DTChamberId sid) const
 Return a trigger unit - Muon numbering - const version. More...
 
DTSCTrigUnit const * constTrigUnit (int wheel, int stat, int sect) const
 Return a trigger unit - Muon numbering, MTTF numbering - const version. More...
 
DTSectColl const * SCUnit (DTSectCollId scid) const
 Return a SC unit - Muon numbering - const version. More...
 
DTSectColl const * SCUnit (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 54 of file DTTrig.h.

Member Typedef Documentation

Definition at line 66 of file DTTrig.h.

typedef DTDigiMap::const_iterator DTTrig::DTDigiMap_const_iterator

Definition at line 68 of file DTTrig.h.

typedef DTDigiMap::iterator DTTrig::DTDigiMap_iterator

Definition at line 67 of file DTTrig.h.

Definition at line 64 of file DTTrig.h.

typedef SCcontainer::const_iterator DTTrig::SC_const_iterator

Definition at line 63 of file DTTrig.h.

typedef SCcontainer::iterator DTTrig::SC_iterator

Definition at line 62 of file DTTrig.h.

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

Definition at line 61 of file DTTrig.h.

Definition at line 65 of file DTTrig.h.

typedef TUcontainer::const_iterator DTTrig::TU_const_iterator

Definition at line 60 of file DTTrig.h.

typedef TUcontainer::iterator DTTrig::TU_iterator

Definition at line 59 of file DTTrig.h.

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

Definition at line 58 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(true) , _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:249
unsigned long long _geomid
Definition: DTTrig.h:253
edm::InputTag _digitag
Definition: DTTrig.h:248
bool _inputexist
Definition: DTTrig.h:250
unsigned long long _configid
Definition: DTTrig.h:252

Member Function Documentation

TU_iterator DTTrig::begin ( void  )
inline

Begin of the trigger units store.

Definition at line 91 of file DTTrig.h.

References _cache.

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

Begin of the sector collector store.

Definition at line 108 of file DTTrig.h.

References _cache1.

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

Return a copy of all the BTI triggers.

Definition at line 474 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().

474  {
475  /*check();*/
476  std::vector<DTBtiTrigData> trigs;
477  for(auto ptu=_cache.begin();ptu!=_cache.end();ptu++) {
478  const DTSCTrigUnit& tu = (*ptu).second;
479  auto peb=tu.BtiTrigs()->end();
480  for(auto p=tu.BtiTrigs()->begin();p!=peb;p++){
481  trigs.push_back(*p);
482  }
483  }
484  return trigs;
485 }
TUcontainer _cache
Definition: DTTrig.h:245
DTBtiCard * BtiTrigs() const
Return container of BTI triggers.
Definition: DTSCTrigUnit.h:88
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:38
const_iterator end() const
Get last cache element.
Definition: DTCache.h:41
Range DTTrig::cache ( )
inline

Begin of the trigger units store.

Definition at line 100 of file DTTrig.h.

References _cache.

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

Range of the sector collector store.

Definition at line 117 of file DTTrig.h.

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

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

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

Definition at line 355 of file DTTrig.cc.

References trigUnit().

Referenced by cache1(), and chPhiSegm1().

355  {
356  return chPhiSegm1(trigUnit(sid),step);
357 }
DTChambPhSegm * chPhiSegm1(DTChamberId sid, int step)
Return the first phi track segment in req. chamber/step.
Definition: DTTrig.cc:355
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:276
step
Definition: StallMonitor.cc:94
DTChambPhSegm * DTTrig::chPhiSegm1 ( DTSCTrigUnit unit,
int  step 
)

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

Definition at line 334 of file DTTrig.cc.

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

334  {
335  if(unit==nullptr)return nullptr;
336  if(unit->nPhiSegm(step)<1)return nullptr;
337  return const_cast<DTChambPhSegm*>(unit->phiSegment(step,1));
338 }
step
Definition: StallMonitor.cc:94
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 371 of file DTTrig.cc.

References chPhiSegm1(), and trigUnit().

371  {
372  return chPhiSegm1(trigUnit(wheel,stat,sect),step);
373  // to make it transparent to the outside world
374  // return chSectCollSegm1(wheel,stat,sect,step);
375 
376 }
DTChambPhSegm * chPhiSegm1(DTChamberId sid, int step)
Return the first phi track segment in req. chamber/step.
Definition: DTTrig.cc:355
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:276
step
Definition: StallMonitor.cc:94
DTChambPhSegm * DTTrig::chPhiSegm2 ( DTChamberId  sid,
int  step 
)

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

Definition at line 360 of file DTTrig.cc.

References trigUnit().

Referenced by cache1(), and chPhiSegm2().

360  {
361  return chPhiSegm2(trigUnit(sid),step);
362 }
DTChambPhSegm * chPhiSegm2(DTChamberId sid, int step)
Return the second phi track segment in req. chamber/step.
Definition: DTTrig.cc:360
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:276
step
Definition: StallMonitor.cc:94
DTChambPhSegm * DTTrig::chPhiSegm2 ( DTSCTrigUnit unit,
int  step 
)

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

Definition at line 341 of file DTTrig.cc.

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

341  {
342  if(unit==nullptr)return nullptr;
343  if(unit->nPhiSegm(step)<2)return nullptr;
344  return const_cast<DTChambPhSegm*>(unit->phiSegment(step,2));
345 }
step
Definition: StallMonitor.cc:94
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 379 of file DTTrig.cc.

References chPhiSegm2(), and trigUnit().

379  {
380  // if(stat==4&&(sect==3||sect==9)) {
381  // if hrizontal chambers of MB4 get first track of twin chamber (flag=1)
382  // return chPhiSegm1(trigUnit(wheel,stat,sect,1),step);
383  // } else {
384  return chPhiSegm2(trigUnit(wheel,stat,sect),step);
385  // to make it transparent to the outside world
386  // return chSectCollSegm2(wheel,stat,sect,step);
387  //}
388 }
DTChambPhSegm * chPhiSegm2(DTChamberId sid, int step)
Return the second phi track segment in req. chamber/step.
Definition: DTTrig.cc:360
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:276
step
Definition: StallMonitor.cc:94
DTSectCollPhSegm * DTTrig::chSectCollPhSegm1 ( DTSectColl unit,
int  step 
)

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

Definition at line 398 of file DTTrig.cc.

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

Referenced by cache1(), and chSectCollPhSegm1().

398  {
399 
400  if(unit==nullptr)return nullptr;
401  if(unit->nSegmPh(step)<1)return nullptr;
402  return const_cast<DTSectCollPhSegm*>(unit->SectCollPhSegment(step,1));
403 }
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
Definition: StallMonitor.cc:94
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 414 of file DTTrig.cc.

References chSectCollPhSegm1(), and SCUnit().

414  {
415 
416  return chSectCollPhSegm1(const_cast<DTSectColl*>(SCUnit(wheel,sect)),step);
417 }
DTSectColl const * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:300
DTSectCollPhSegm * chSectCollPhSegm1(DTSectColl *unit, int step)
Return the first phi track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:398
step
Definition: StallMonitor.cc:94
DTSectCollPhSegm * DTTrig::chSectCollPhSegm2 ( DTSectColl unit,
int  step 
)

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

Definition at line 406 of file DTTrig.cc.

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

Referenced by cache1(), and chSectCollPhSegm2().

406  {
407  if(unit==nullptr)return nullptr;
408  if(unit->nSegmPh(step)<2)return nullptr;
409  return const_cast<DTSectCollPhSegm*>(unit->SectCollPhSegment(step,2));
410 }
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
Definition: StallMonitor.cc:94
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 420 of file DTTrig.cc.

References chSectCollPhSegm2(), and SCUnit().

420  {
421  // if(stat==4&&(sect==3||sect==9)) {
422  // if hrizontal chambers of MB4 get first track of twin chamber (flag=1)
423  //return chSectCollSegm1(trigUnit(wheel,stat,sect,1),step);
424  //} else {
425  return chSectCollPhSegm2(const_cast<DTSectColl*>(SCUnit(wheel,sect)),step);
426  //}
427 }
DTSectColl const * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:300
DTSectCollPhSegm * chSectCollPhSegm2(DTSectColl *unit, int step)
Return the second phi track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:406
step
Definition: StallMonitor.cc:94
DTSectCollThSegm * DTTrig::chSectCollThSegm ( DTSectColl unit,
int  step 
)

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

Definition at line 430 of file DTTrig.cc.

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

Referenced by cache1(), and chSectCollThSegm().

430  {
431 
432  if(unit==nullptr)return nullptr;
433  if(unit->nSegmTh(step)<1)return nullptr;
434  return const_cast<DTSectCollThSegm*>(unit->SectCollThSegment(step));
435 }
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
Definition: StallMonitor.cc:94
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 438 of file DTTrig.cc.

References chSectCollThSegm(), and SCUnit().

438  {
439 
440  return chSectCollThSegm(const_cast<DTSectColl*>(SCUnit(wheel,sect)),step);
441 }
DTSectColl const * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:300
DTSectCollThSegm * chSectCollThSegm(DTSectColl *unit, int step)
Return the theta track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:430
step
Definition: StallMonitor.cc:94
DTChambThSegm * DTTrig::chThetaSegm ( DTChamberId  sid,
int  step 
)

Return the theta candidates in req. chamber/step.

Definition at line 365 of file DTTrig.cc.

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

Referenced by cache1(), and chThetaSegm().

365  {
366  if(sid.station()==4)return nullptr;
367  return chThetaSegm(trigUnit(sid),step);
368 }
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:276
DTChambThSegm * chThetaSegm(DTChamberId sid, int step)
Return the theta candidates in req. chamber/step.
Definition: DTTrig.cc:365
step
Definition: StallMonitor.cc:94
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 348 of file DTTrig.cc.

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

348  {
349  if(unit==nullptr)return nullptr;
350  if(unit->nThetaSegm(step)<1)return nullptr;
351  return const_cast<DTChambThSegm*>(unit->thetaSegment(step,1));
352 }
const DTChambThSegm * thetaSegment(int step, int n)
Return output segments, theta view.
Definition: DTSCTrigUnit.h:152
step
Definition: StallMonitor.cc:94
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 391 of file DTTrig.cc.

References chThetaSegm(), and trigUnit().

391  {
392  if(stat==4)return nullptr;
393  return chThetaSegm(trigUnit(wheel,stat,sect),step);
394 }
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:276
DTChambThSegm * chThetaSegm(DTChamberId sid, int step)
Return the theta candidates in req. chamber/step.
Definition: DTTrig.cc:365
step
Definition: StallMonitor.cc:94
void DTTrig::clear ( void  )

Clear the trigger units cache.

Definition at line 268 of file DTTrig.cc.

References _cache, and _cache1.

268  {
269  // Delete the map
270  _cache.clear();
271  _cache1.clear();
272 
273 }
SCcontainer _cache1
Definition: DTTrig.h:246
TUcontainer _cache
Definition: DTTrig.h:245
GlobalVector DTTrig::CMSDirection ( const DTTrigData trig) const
inline

Direction of a trigger-data object in CMS frame.

Definition at line 219 of file DTTrig.h.

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

Referenced by DTTrigTest::analyze().

219  {
220  return constTrigUnit(trig->ChamberId())->CMSDirection(trig);
221  }
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:284
GlobalVector CMSDirection(const DTTrigData *trig) const
Direction of a trigger-data object in CMS frame.
Definition: DTTrig.h:219
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 209 of file DTTrig.h.

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

Referenced by DTTrigTest::analyze().

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

Return a trigger unit - Muon numbering - const version.

Definition at line 284 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().

284  {
285 // std::cout << " SC: running DTTrig::constTrigUnit(DTChamberId chid)" << std::endl;
286  TU_const_iterator it = _cache.find(chid);
287  if ( it == _cache.end()) {
288  std::cout << "DTTrig::trigUnit: Trigger Unit not in the map: ";
289  std::cout << " wheel=" << chid.wheel() ;
290  std::cout << ", station=" << chid.station();
291  std::cout << ", sector=" << chid.sector();
292  std::cout << std::endl;
293  return nullptr;
294  }
295 
296  return &(*it).second;
297 }
TUcontainer _cache
Definition: DTTrig.h:245
TUcontainer::const_iterator TU_const_iterator
Definition: DTTrig.h:60
DTSCTrigUnit const * DTTrig::constTrigUnit ( int  wheel,
int  stat,
int  sect 
) const
private

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

Definition at line 326 of file DTTrig.cc.

References constTrigUnit().

326  {
327  sect++; // offset 1 for sector number ([0,11] --> [1,12])
328  return constTrigUnit(DTChamberId(wheel,stat,sect));
329 
330 }
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:284
void DTTrig::createTUs ( const edm::EventSetup iSetup)

Create the trigger units and store them in the cache.

Definition at line 68 of file DTTrig.cc.

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

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

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

Dump the geometry.

Definition at line 447 of file DTTrig.cc.

References _cache.

Referenced by cache1().

447  {
448  /*check();*/
449  for (TU_const_iterator it=_cache.begin();it!=_cache.end();it++){
450  ((*it).second).dumpGeom();
451  }
452 }
TUcontainer _cache
Definition: DTTrig.h:245
void dumpGeom() const
Dump the geometry.
Definition: DTTrig.cc:447
TUcontainer::const_iterator TU_const_iterator
Definition: DTTrig.h:60
void DTTrig::dumpLuts ( short int  lut_btic,
const DTConfigManager conf 
) const

Dump the LUT files.

Definition at line 455 of file DTTrig.cc.

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

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

455  {
456  for (TU_const_iterator it=_cache.begin();it!=_cache.end();it++){
457 
458  const DTSCTrigUnit& thisTU = (*it).second;
459 
460  // dump lut command file from geometry
461  thisTU.dumpLUT(lut_btic);
462 
463  // dump lut command file from parameters (DB or CMSSW)
464  DTChamberId chid = thisTU.statId();
465  conf->dumpLUTParam(chid);
466 
467  }
468 
469  return;
470 
471 }
void dumpLUTParam(DTChamberId &chambid) const
Dump luts string commands from configuration parameters.
TUcontainer _cache
Definition: DTTrig.h:245
void dumpLUT(short int btic) const
Dump the Lut file.
Definition: DTSCTrigUnit.h:131
TUcontainer::const_iterator TU_const_iterator
Definition: DTTrig.h:60
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 94 of file DTTrig.h.

References _cache.

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

End of the sectoor collector store.

Definition at line 111 of file DTTrig.h.

References _cache1.

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

Find a trigger unit in the map.

Definition at line 97 of file DTTrig.h.

References _cache.

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

Find a Sector Collector in the map.

Definition at line 114 of file DTTrig.h.

References _cache1.

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

Get BX Offset.

Definition at line 181 of file DTTrig.h.

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

Referenced by DTTrigProd::produce().

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

Direction of a trigger-data object in chamber frame.

Definition at line 214 of file DTTrig.h.

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

214  {
215  return constTrigUnit(trig->ChamberId())->localDirection(trig);
216  }
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:284
LocalVector localDirection(const DTTrigData *trig) const
Direction of a trigger-data object in chamber frame.
Definition: DTTrig.h:214
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 204 of file DTTrig.h.

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

204  {
205  return constTrigUnit(trig->ChamberId())->localPosition(trig);
206  }
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:284
LocalPoint localPosition(const DTTrigData *trig) const
Coordinate of a trigger-data object in chamber frame.
Definition: DTTrig.h:204
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 224 of file DTTrig.h.

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

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

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

Definition at line 530 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().

530  {
531  /*check();*/
532  std::vector<DTSectCollPhSegm> trigs;
533  for(auto psc=_cache1.begin();psc!=_cache1.end();psc++) {
534  // DTSCTrigUnit* tu = (*ptu).second;
535  //
536  // old SMDB:
537  // DTSectColl* tu = (*ptu).second;
538  // std::vector<DTChambPhSegm>::const_iterator p=0;
539  // std::vector<DTChambPhSegm>::const_iterator peb=tu->SCTrigs()->end();
540  // for(p=tu->SCTrigs()->begin();p!=peb;p++){
541  // trigs.push_back(*p);
542  // }
543 
544  const DTSectColl& sc = (*psc).second;
545  auto peb=sc.endPh();
546  for(auto p=sc.beginPh();p!=peb;p++){
547  trigs.push_back(*p);
548  }
549 
550  }
551  return trigs;
552 }
SCcontainer _cache1
Definition: DTTrig.h:246
std::vector< DTSectCollPhSegm >::const_iterator beginPh() const
Return iterator to the beghin of Phi cache.
Definition: DTSectColl.h:150
std::vector< DTSectCollPhSegm >::const_iterator endPh() const
Return iterator to the end of Phi cache.
Definition: DTSectColl.h:156
std::vector< DTSectCollThSegm > DTTrig::SCThTrigs ( ) const

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

Definition at line 556 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().

556  {
557  /*check();*/
558  std::vector<DTSectCollThSegm> trigs;
559  for(auto psc=_cache1.begin();psc!=_cache1.end();psc++) {
560  const DTSectColl& sc = (*psc).second;
561  auto peb=sc.endTh();
562  for(auto p=sc.beginTh();p!=peb;p++){
563  trigs.push_back(*p);
564  }
565  }
566  return trigs;
567 }
SCcontainer _cache1
Definition: DTTrig.h:246
std::vector< DTSectCollThSegm >::const_iterator endTh() const
Return iterator to the end of Theta cache.
Definition: DTSectColl.h:165
std::vector< DTSectCollThSegm >::const_iterator beginTh() const
Return iterator to the begni of Theta cache.
Definition: DTSectColl.h:159
DTSectColl const * DTTrig::SCUnit ( DTSectCollId  scid) const
private

Return a SC unit - Muon numbering - const version.

Definition at line 300 of file DTTrig.cc.

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

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

300  {
301 SC_const_iterator it = _cache1.find(scid);
302  if ( it == _cache1.end()) {
303  std::cout << "DTTrig::SCUnit: Trigger Unit not in the map: ";
304  std::cout << " wheel=" << scid.wheel() ;
305  std::cout << ", sector=" << scid.sector();
306  std::cout << std::endl;
307  return nullptr;
308  }
309 
310  return &(*it).second;
311 }
SCcontainer _cache1
Definition: DTTrig.h:246
int sector() const
Definition: DTSectCollId.h:41
int wheel() const
Definition: DTSectCollId.h:40
SCcontainer::const_iterator SC_const_iterator
Definition: DTTrig.h:63
DTSectColl const * DTTrig::SCUnit ( int  wheel,
int  sect 
) const
private

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

Definition at line 319 of file DTTrig.cc.

References SCUnit().

319  {
320  sect++;
321  return SCUnit(DTSectCollId(wheel,sect));
322 }
DTSectColl const * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:300
int DTTrig::size ( void  ) const
inline

Size of the trigger units store.

Definition at line 88 of file DTTrig.h.

References _cache.

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

88 { return _cache.size(); }
TUcontainer _cache
Definition: DTTrig.h:245
int DTTrig::size1 ( ) const
inline

Size of the sector collector store.

Definition at line 105 of file DTTrig.h.

References _cache1.

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

Return a copy of all the TRACO triggers.

Definition at line 488 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().

488  {
489  std::vector<DTTracoTrigData> trigs;
490  /*check();*/
491  for(auto ptu=_cache.begin();ptu!=_cache.end();ptu++) {
492  const DTSCTrigUnit& tu = (*ptu).second;
493  auto peb=tu.TracoTrigs()->end();
494  for(auto p=tu.TracoTrigs()->begin();p!=peb;p++){
495  trigs.push_back(*p);
496  }
497  }
498  return trigs;
499 }
TUcontainer _cache
Definition: DTTrig.h:245
DTTracoCard * TracoTrigs() const
Return container of TRACO triggers.
Definition: DTSCTrigUnit.h:91
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:38
const_iterator end() const
Get last cache element.
Definition: DTCache.h:41
void DTTrig::triggerReco ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)

Run the whole trigger reconstruction chain.

Definition at line 146 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().

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

References constTrigUnit().

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

276  {
277  /*check();*/ return const_cast<DTSCTrigUnit*>(constTrigUnit(chid));
278 
279 }
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:284
DTSCTrigUnit * DTTrig::trigUnit ( int  wheel,
int  stat,
int  sect 
)

Return a trigger unit - Muon numbering, MTTF numbering.

Definition at line 314 of file DTTrig.cc.

References constTrigUnit().

314  {
315  return const_cast<DTSCTrigUnit*>(constTrigUnit(wheel, stat, sect));
316 }
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:284
std::vector< DTChambPhSegm > DTTrig::TSPhTrigs ( ) const

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

Definition at line 502 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().

502  {
503  /*check();*/
504  std::vector<DTChambPhSegm> trigs;
505  for(auto ptu=_cache.begin();ptu!=_cache.end();ptu++) {
506  const DTSCTrigUnit& tu = (*ptu).second;
507  auto peb=tu.TSPhTrigs()->end();
508  for(auto p=tu.TSPhTrigs()->begin();p!=peb;p++){
509  trigs.push_back(*p);
510  }
511  }
512  return trigs;
513 }
DTTSPhi * TSPhTrigs() const
Return the chamber Trigger Server (Phi)
Definition: DTSCTrigUnit.h:94
TUcontainer _cache
Definition: DTTrig.h:245
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:38
const_iterator end() const
Get last cache element.
Definition: DTCache.h:41
std::vector< DTChambThSegm > DTTrig::TSThTrigs ( ) const

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

Definition at line 516 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().

516  {
517  /*check();*/
518  std::vector<DTChambThSegm> trigs;
519  for(auto ptu=_cache.begin();ptu!=_cache.end();ptu++) {
520  const DTSCTrigUnit& tu = (*ptu).second;
521  auto peb=tu.TSThTrigs()->end();
522  for(auto p=tu.TSThTrigs()->begin();p!=peb;p++){
523  trigs.push_back(*p);
524  }
525  }
526  return trigs;
527 }
DTTSTheta * TSThTrigs() const
Return the chamber Trigger Server (Theta)
Definition: DTSCTrigUnit.h:97
TUcontainer _cache
Definition: DTTrig.h:245
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:38
const_iterator end() const
Get last cache element.
Definition: DTCache.h:41
void DTTrig::updateES ( const edm::EventSetup iSetup)

update the eventsetup info

Definition at line 228 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().

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

Member Data Documentation

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

Definition at line 247 of file DTTrig.h.

Referenced by getBXOffset(), and updateES().

unsigned long long DTTrig::_configid
private

Definition at line 252 of file DTTrig.h.

Referenced by updateES().

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

Definition at line 248 of file DTTrig.h.

Referenced by DTTrig(), and triggerReco().

unsigned long long DTTrig::_geomid
private

Definition at line 253 of file DTTrig.h.

Referenced by updateES().

bool DTTrig::_inputexist
private

Definition at line 250 of file DTTrig.h.

Referenced by triggerReco().