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
 
edm::ESGetToken< DTConfigManager, DTConfigManagerRcdconfToken_
 
edm::ESGetToken< DTGeometry, MuonGeometryRecorddtGeomBeginRunToken_
 
edm::ESGetToken< DTGeometry, MuonGeometryRecorddtGeomToken_
 

Detailed Description

Steering routine for L1 trigger simulation in a muon barrel station

Author
C.Grandi

Definition at line 59 of file DTTrig.h.

Member Typedef Documentation

◆ DTDigiMap

typedef std::map<DTChamberId, DTDigiCollection, std::less<DTChamberId> > DTTrig::DTDigiMap

Definition at line 69 of file DTTrig.h.

◆ DTDigiMap_const_iterator

typedef DTDigiMap::const_iterator DTTrig::DTDigiMap_const_iterator

Definition at line 71 of file DTTrig.h.

◆ DTDigiMap_iterator

typedef DTDigiMap::iterator DTTrig::DTDigiMap_iterator

Definition at line 70 of file DTTrig.h.

◆ Range

typedef std::pair<TU_iterator, TU_iterator> DTTrig::Range

Definition at line 67 of file DTTrig.h.

◆ SC_const_iterator

typedef SCcontainer::const_iterator DTTrig::SC_const_iterator

Definition at line 66 of file DTTrig.h.

◆ SC_iterator

typedef SCcontainer::iterator DTTrig::SC_iterator

Definition at line 65 of file DTTrig.h.

◆ SCcontainer

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

Definition at line 64 of file DTTrig.h.

◆ SCRange

Definition at line 68 of file DTTrig.h.

◆ TU_const_iterator

typedef TUcontainer::const_iterator DTTrig::TU_const_iterator

Definition at line 63 of file DTTrig.h.

◆ TU_iterator

typedef TUcontainer::iterator DTTrig::TU_iterator

Definition at line 62 of file DTTrig.h.

◆ TUcontainer

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

Definition at line 61 of file DTTrig.h.

Constructor & Destructor Documentation

◆ DTTrig()

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

Constructors.

Definition at line 46 of file DTTrig.cc.

References _debug, _digitag, edm::BeginRun, confToken_, gather_cfg::cout, dtGeomBeginRunToken_, dtGeomToken_, and submitPVValidationJobs::params.

47  : _inputexist(true), _configid(0), _geomid(0) {
48  // Set configuration parameters
49  _debug = params.getUntrackedParameter<bool>("debug");
50 
51  if (_debug) {
52  std::cout << std::endl;
53  std::cout << "**** Initialization of DTTrigger ****" << std::endl;
54  }
55 
56  _digitag = params.getParameter<edm::InputTag>("digiTag");
57  iC.consumes<DTDigiCollection>(_digitag);
58  dtGeomToken_ = iC.esConsumes<DTGeometry, MuonGeometryRecord>();
59  confToken_ = iC.esConsumes<DTConfigManager, DTConfigManagerRcd>();
61 }
bool _debug
Definition: DTTrig.h:248
unsigned long long _geomid
Definition: DTTrig.h:252
edm::InputTag _digitag
Definition: DTTrig.h:244
edm::ESGetToken< DTConfigManager, DTConfigManagerRcd > confToken_
Definition: DTTrig.h:247
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomBeginRunToken_
Definition: DTTrig.h:246
bool _inputexist
Definition: DTTrig.h:249
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
Definition: DTTrig.h:245
unsigned long long _configid
Definition: DTTrig.h:251

Member Function Documentation

◆ begin()

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:241

◆ begin1()

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:242

◆ BtiTrigs()

std::vector< DTBtiTrigData > DTTrig::BtiTrigs ( ) const

Return a copy of all the BTI triggers.

Definition at line 412 of file DTTrig.cc.

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

Referenced by DTTrigTest::analyze().

412  {
413  /*check();*/
414  std::vector<DTBtiTrigData> trigs;
415  for (auto ptu = _cache.begin(); ptu != _cache.end(); ptu++) {
416  const DTSCTrigUnit& tu = (*ptu).second;
417  auto peb = tu.BtiTrigs()->end();
418  for (auto p = tu.BtiTrigs()->begin(); p != peb; p++) {
419  trigs.push_back(*p);
420  }
421  }
422  return trigs;
423 }
DTBtiCard * BtiTrigs() const
Return container of BTI triggers.
Definition: DTSCTrigUnit.h:84
TUcontainer _cache
Definition: DTTrig.h:241
const_iterator end() const
Get last cache element.
Definition: DTCache.h:41
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:38

◆ cache()

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()); }
std::pair< TU_iterator, TU_iterator > Range
Definition: DTTrig.h:67
TUcontainer _cache
Definition: DTTrig.h:241

◆ cache1()

SCRange DTTrig::cache1 ( )
inline

Range of the sector collector store.

Definition at line 119 of file DTTrig.h.

References _cache1.

119 { /*check();*/ return SCRange(_cache1.begin(), _cache1.end()); }
SCcontainer _cache1
Definition: DTTrig.h:242
std::pair< SC_iterator, SC_iterator > SCRange
Definition: DTTrig.h:68

◆ chPhiSegm1() [1/3]

DTChambPhSegm * DTTrig::chPhiSegm1 ( DTChamberId  sid,
int  step 
)

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

Definition at line 313 of file DTTrig.cc.

References trigUnit().

Referenced by chPhiSegm1().

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

◆ chPhiSegm1() [2/3]

DTChambPhSegm * DTTrig::chPhiSegm1 ( DTSCTrigUnit unit,
int  step 
)

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

Definition at line 289 of file DTTrig.cc.

References unit().

289  {
290  if (unit == nullptr)
291  return nullptr;
292  if (unit->nPhiSegm(step) < 1)
293  return nullptr;
294  return const_cast<DTChambPhSegm*>(unit->phiSegment(step, 1));
295 }
Basic3DVector unit() const
step
Definition: StallMonitor.cc:83

◆ chPhiSegm1() [3/3]

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 323 of file DTTrig.cc.

References chPhiSegm1(), trigUnit(), and makeMuonMisalignmentScenario::wheel.

323  {
324  return chPhiSegm1(trigUnit(wheel, stat, sect), step);
325  // to make it transparent to the outside world
326  // return chSectCollSegm1(wheel,stat,sect,step);
327 }
DTChambPhSegm * chPhiSegm1(DTChamberId sid, int step)
Return the first phi track segment in req. chamber/step.
Definition: DTTrig.cc:313
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:245
step
Definition: StallMonitor.cc:83

◆ chPhiSegm2() [1/3]

DTChambPhSegm * DTTrig::chPhiSegm2 ( DTChamberId  sid,
int  step 
)

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

Definition at line 315 of file DTTrig.cc.

References trigUnit().

Referenced by chPhiSegm2().

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

◆ chPhiSegm2() [2/3]

DTChambPhSegm * DTTrig::chPhiSegm2 ( DTSCTrigUnit unit,
int  step 
)

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

Definition at line 297 of file DTTrig.cc.

References unit().

297  {
298  if (unit == nullptr)
299  return nullptr;
300  if (unit->nPhiSegm(step) < 2)
301  return nullptr;
302  return const_cast<DTChambPhSegm*>(unit->phiSegment(step, 2));
303 }
Basic3DVector unit() const
step
Definition: StallMonitor.cc:83

◆ chPhiSegm2() [3/3]

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 329 of file DTTrig.cc.

References chPhiSegm2(), trigUnit(), and makeMuonMisalignmentScenario::wheel.

329  {
330  // if(stat==4&&(sect==3||sect==9)) {
331  // if hrizontal chambers of MB4 get first track of twin chamber (flag=1)
332  // return chPhiSegm1(trigUnit(wheel,stat,sect,1),step);
333  // } else {
334  return chPhiSegm2(trigUnit(wheel, stat, sect), step);
335  // to make it transparent to the outside world
336  // return chSectCollSegm2(wheel,stat,sect,step);
337  //}
338 }
DTChambPhSegm * chPhiSegm2(DTChamberId sid, int step)
Return the second phi track segment in req. chamber/step.
Definition: DTTrig.cc:315
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:245
step
Definition: StallMonitor.cc:83

◆ chSectCollPhSegm1() [1/2]

DTSectCollPhSegm * DTTrig::chSectCollPhSegm1 ( DTSectColl unit,
int  step 
)

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

Definition at line 347 of file DTTrig.cc.

References unit().

Referenced by chSectCollPhSegm1().

347  {
348  if (unit == nullptr)
349  return nullptr;
350  if (unit->nSegmPh(step) < 1)
351  return nullptr;
352  return const_cast<DTSectCollPhSegm*>(unit->SectCollPhSegment(step, 1));
353 }
Basic3DVector unit() const
step
Definition: StallMonitor.cc:83

◆ chSectCollPhSegm1() [2/2]

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 363 of file DTTrig.cc.

References chSectCollPhSegm1(), SCUnit(), and makeMuonMisalignmentScenario::wheel.

363  {
364  return chSectCollPhSegm1(const_cast<DTSectColl*>(SCUnit(wheel, sect)), step);
365 }
DTSectCollPhSegm * chSectCollPhSegm1(DTSectColl *unit, int step)
Return the first phi track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:347
step
Definition: StallMonitor.cc:83
DTSectColl const * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:262

◆ chSectCollPhSegm2() [1/2]

DTSectCollPhSegm * DTTrig::chSectCollPhSegm2 ( DTSectColl unit,
int  step 
)

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

Definition at line 355 of file DTTrig.cc.

References unit().

Referenced by chSectCollPhSegm2().

355  {
356  if (unit == nullptr)
357  return nullptr;
358  if (unit->nSegmPh(step) < 2)
359  return nullptr;
360  return const_cast<DTSectCollPhSegm*>(unit->SectCollPhSegment(step, 2));
361 }
Basic3DVector unit() const
step
Definition: StallMonitor.cc:83

◆ chSectCollPhSegm2() [2/2]

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 367 of file DTTrig.cc.

References chSectCollPhSegm2(), SCUnit(), and makeMuonMisalignmentScenario::wheel.

367  {
368  // if(stat==4&&(sect==3||sect==9)) {
369  // if hrizontal chambers of MB4 get first track of twin chamber (flag=1)
370  //return chSectCollSegm1(trigUnit(wheel,stat,sect,1),step);
371  //} else {
372  return chSectCollPhSegm2(const_cast<DTSectColl*>(SCUnit(wheel, sect)), step);
373  //}
374 }
DTSectCollPhSegm * chSectCollPhSegm2(DTSectColl *unit, int step)
Return the second phi track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:355
step
Definition: StallMonitor.cc:83
DTSectColl const * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:262

◆ chSectCollThSegm() [1/2]

DTSectCollThSegm * DTTrig::chSectCollThSegm ( DTSectColl unit,
int  step 
)

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

Definition at line 376 of file DTTrig.cc.

References unit().

Referenced by chSectCollThSegm().

376  {
377  if (unit == nullptr)
378  return nullptr;
379  if (unit->nSegmTh(step) < 1)
380  return nullptr;
381  return const_cast<DTSectCollThSegm*>(unit->SectCollThSegment(step));
382 }
Basic3DVector unit() const
step
Definition: StallMonitor.cc:83

◆ chSectCollThSegm() [2/2]

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 384 of file DTTrig.cc.

References chSectCollThSegm(), SCUnit(), and makeMuonMisalignmentScenario::wheel.

384  {
385  return chSectCollThSegm(const_cast<DTSectColl*>(SCUnit(wheel, sect)), step);
386 }
DTSectCollThSegm * chSectCollThSegm(DTSectColl *unit, int step)
Return the theta track segment in req. chamber/step [SC step].
Definition: DTTrig.cc:376
step
Definition: StallMonitor.cc:83
DTSectColl const * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:262

◆ chThetaSegm() [1/3]

DTChambThSegm * DTTrig::chThetaSegm ( DTChamberId  sid,
int  step 
)

Return the theta candidates in req. chamber/step.

Definition at line 317 of file DTTrig.cc.

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

Referenced by chThetaSegm().

317  {
318  if (sid.station() == 4)
319  return nullptr;
320  return chThetaSegm(trigUnit(sid), step);
321 }
int station() const
Return the station number.
Definition: DTChamberId.h:45
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:245
DTChambThSegm * chThetaSegm(DTChamberId sid, int step)
Return the theta candidates in req. chamber/step.
Definition: DTTrig.cc:317
step
Definition: StallMonitor.cc:83

◆ chThetaSegm() [2/3]

DTChambThSegm * DTTrig::chThetaSegm ( DTSCTrigUnit unit,
int  step 
)

Return the theta candidates in req. chamber/step.

Definition at line 305 of file DTTrig.cc.

References unit().

305  {
306  if (unit == nullptr)
307  return nullptr;
308  if (unit->nThetaSegm(step) < 1)
309  return nullptr;
310  return const_cast<DTChambThSegm*>(unit->thetaSegment(step, 1));
311 }
Basic3DVector unit() const
step
Definition: StallMonitor.cc:83

◆ chThetaSegm() [3/3]

DTChambThSegm * DTTrig::chThetaSegm ( int  wheel,
int  stat,
int  sect,
int  step 
)

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

Definition at line 340 of file DTTrig.cc.

References chThetaSegm(), trigUnit(), and makeMuonMisalignmentScenario::wheel.

340  {
341  if (stat == 4)
342  return nullptr;
343  return chThetaSegm(trigUnit(wheel, stat, sect), step);
344 }
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
Definition: DTTrig.cc:245
DTChambThSegm * chThetaSegm(DTChamberId sid, int step)
Return the theta candidates in req. chamber/step.
Definition: DTTrig.cc:317
step
Definition: StallMonitor.cc:83

◆ clear()

void DTTrig::clear ( void  )

Clear the trigger units cache.

Definition at line 239 of file DTTrig.cc.

References _cache, and _cache1.

239  {
240  // Delete the map
241  _cache.clear();
242  _cache1.clear();
243 }
SCcontainer _cache1
Definition: DTTrig.h:242
TUcontainer _cache
Definition: DTTrig.h:241

◆ CMSDirection()

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 constTrigUnit(), and ClusterTask_cfi::trig.

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:247
GlobalVector CMSDirection(const DTTrigData *trig) const
Direction of a trigger-data object in CMS frame.
Definition: DTTrig.h:219

◆ CMSPosition()

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 CMSPosition(), constTrigUnit(), and ClusterTask_cfi::trig.

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

211 { return constTrigUnit(trig->ChamberId())->CMSPosition(trig); }
GlobalPoint CMSPosition(const DTTrigData *trig) const
Coordinate of a trigger-data object in CMS frame.
Definition: DTTrig.h:211
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:247

◆ constTrigUnit() [1/2]

DTSCTrigUnit const * DTTrig::constTrigUnit ( DTChamberId  sid) const
private

Return a trigger unit - Muon numbering - const version.

Definition at line 247 of file DTTrig.cc.

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

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

247  {
248  // std::cout << " SC: running DTTrig::constTrigUnit(DTChamberId chid)" << std::endl;
249  TU_const_iterator it = _cache.find(chid);
250  if (it == _cache.end()) {
251  std::cout << "DTTrig::trigUnit: Trigger Unit not in the map: ";
252  std::cout << " wheel=" << chid.wheel();
253  std::cout << ", station=" << chid.station();
254  std::cout << ", sector=" << chid.sector();
255  std::cout << std::endl;
256  return nullptr;
257  }
258 
259  return &(*it).second;
260 }
TUcontainer _cache
Definition: DTTrig.h:241
TUcontainer::const_iterator TU_const_iterator
Definition: DTTrig.h:63

◆ constTrigUnit() [2/2]

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 284 of file DTTrig.cc.

References constTrigUnit(), and makeMuonMisalignmentScenario::wheel.

284  {
285  sect++; // offset 1 for sector number ([0,11] --> [1,12])
286  return constTrigUnit(DTChamberId(wheel, stat, sect));
287 }
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:247

◆ createTUs()

void DTTrig::createTUs ( const edm::EventSetup iSetup)

Create the trigger units and store them in the cache.

Definition at line 63 of file DTTrig.cc.

References _cache, _cache1, _debug, DTGeometry::chambers(), gather_cfg::cout, dtGeomBeginRunToken_, edm::EventSetup::getHandle(), DTChamber::id(), info(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, DTSectCollId::sector(), DTChamberId::sector(), DTSectCollId::wheel(), and DTChamberId::wheel().

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

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

◆ dumpGeom()

void DTTrig::dumpGeom ( ) const

Dump the geometry.

Definition at line 390 of file DTTrig.cc.

References _cache, and ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it.

390  {
391  /*check();*/
392  for (TU_const_iterator it = _cache.begin(); it != _cache.end(); it++) {
393  ((*it).second).dumpGeom();
394  }
395 }
TUcontainer _cache
Definition: DTTrig.h:241
TUcontainer::const_iterator TU_const_iterator
Definition: DTTrig.h:63
void dumpGeom() const
Dump the geometry.
Definition: DTTrig.cc:390

◆ dumpLuts()

void DTTrig::dumpLuts ( short int  lut_btic,
const DTConfigManager conf 
) const

Dump the LUT files.

Definition at line 397 of file DTTrig.cc.

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

Referenced by DTTrigProd::beginRun().

397  {
398  for (TU_const_iterator it = _cache.begin(); it != _cache.end(); it++) {
399  const DTSCTrigUnit& thisTU = (*it).second;
400 
401  // dump lut command file from geometry
402  thisTU.dumpLUT(lut_btic);
403 
404  // dump lut command file from parameters (DB or CMSSW)
405  DTChamberId chid = thisTU.statId();
406  conf->dumpLUTParam(chid);
407  }
408 
409  return;
410 }
void dumpLUT(short int btic) const
Dump the Lut file.
Definition: DTSCTrigUnit.h:117
TUcontainer _cache
Definition: DTTrig.h:241
DTChamberId statId() const
Identifier of the associated chamber.
Definition: DTSCTrigUnit.h:72
void dumpLUTParam(DTChamberId &chambid) const
Dump luts string commands from configuration parameters.
TUcontainer::const_iterator TU_const_iterator
Definition: DTTrig.h:63

◆ end()

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:241

◆ end1()

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:242

◆ find()

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:241

◆ find1()

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:242

◆ getBXOffset()

int DTTrig::getBXOffset ( ) const
inline

Get BX Offset.

Definition at line 183 of file DTTrig.h.

References _conf_manager, and DTConfigManager::getBXOffset().

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:243

◆ localDirection()

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 constTrigUnit(), and ClusterTask_cfi::trig.

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:247
LocalVector localDirection(const DTTrigData *trig) const
Direction of a trigger-data object in chamber frame.
Definition: DTTrig.h:214

◆ localPosition()

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 constTrigUnit(), and ClusterTask_cfi::trig.

206  {
207  return constTrigUnit(trig->ChamberId())->localPosition(trig);
208  }
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:247
LocalPoint localPosition(const DTTrigData *trig) const
Coordinate of a trigger-data object in chamber frame.
Definition: DTTrig.h:206

◆ print()

void DTTrig::print ( DTTrigData trig) const
inline

Print a trigger-data object.

Definition at line 224 of file DTTrig.h.

References constTrigUnit(), print(), and ClusterTask_cfi::trig.

Referenced by print().

224 { constTrigUnit(trig->ChamberId())->print(trig); }
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:247
void print(DTTrigData *trig) const
Print a trigger-data object.
Definition: DTTrig.h:224

◆ SCPhTrigs()

std::vector< DTSectCollPhSegm > DTTrig::SCPhTrigs ( ) const

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

Definition at line 464 of file DTTrig.cc.

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

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

464  {
465  /*check();*/
466  std::vector<DTSectCollPhSegm> trigs;
467  for (auto psc = _cache1.begin(); psc != _cache1.end(); psc++) {
468  // DTSCTrigUnit* tu = (*ptu).second;
469  //
470  // old SMDB:
471  // DTSectColl* tu = (*ptu).second;
472  // std::vector<DTChambPhSegm>::const_iterator p=0;
473  // std::vector<DTChambPhSegm>::const_iterator peb=tu->SCTrigs()->end();
474  // for(p=tu->SCTrigs()->begin();p!=peb;p++){
475  // trigs.push_back(*p);
476  // }
477 
478  const DTSectColl& sc = (*psc).second;
479  auto peb = sc.endPh();
480  for (auto p = sc.beginPh(); p != peb; p++) {
481  trigs.push_back(*p);
482  }
483  }
484  return trigs;
485 }
SCcontainer _cache1
Definition: DTTrig.h:242
std::vector< DTSectCollPhSegm >::const_iterator endPh() const
Return iterator to the end of Phi cache.
Definition: DTSectColl.h:154
std::vector< DTSectCollPhSegm >::const_iterator beginPh() const
Return iterator to the beghin of Phi cache.
Definition: DTSectColl.h:148

◆ SCThTrigs()

std::vector< DTSectCollThSegm > DTTrig::SCThTrigs ( ) const

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

Definition at line 487 of file DTTrig.cc.

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

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

487  {
488  /*check();*/
489  std::vector<DTSectCollThSegm> trigs;
490  for (auto psc = _cache1.begin(); psc != _cache1.end(); psc++) {
491  const DTSectColl& sc = (*psc).second;
492  auto peb = sc.endTh();
493  for (auto p = sc.beginTh(); p != peb; p++) {
494  trigs.push_back(*p);
495  }
496  }
497  return trigs;
498 }
SCcontainer _cache1
Definition: DTTrig.h:242
std::vector< DTSectCollThSegm >::const_iterator beginTh() const
Return iterator to the begni of Theta cache.
Definition: DTSectColl.h:157
std::vector< DTSectCollThSegm >::const_iterator endTh() const
Return iterator to the end of Theta cache.
Definition: DTSectColl.h:163

◆ SCUnit() [1/2]

DTSectColl const * DTTrig::SCUnit ( DTSectCollId  scid) const
private

Return a SC unit - Muon numbering - const version.

Definition at line 262 of file DTTrig.cc.

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

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

262  {
263  SC_const_iterator it = _cache1.find(scid);
264  if (it == _cache1.end()) {
265  std::cout << "DTTrig::SCUnit: Trigger Unit not in the map: ";
266  std::cout << " wheel=" << scid.wheel();
267  std::cout << ", sector=" << scid.sector();
268  std::cout << std::endl;
269  return nullptr;
270  }
271 
272  return &(*it).second;
273 }
SCcontainer _cache1
Definition: DTTrig.h:242
int wheel() const
Definition: DTSectCollId.h:30
int sector() const
Definition: DTSectCollId.h:31
SCcontainer::const_iterator SC_const_iterator
Definition: DTTrig.h:66

◆ SCUnit() [2/2]

DTSectColl const * DTTrig::SCUnit ( int  wheel,
int  sect 
) const
private

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

Definition at line 279 of file DTTrig.cc.

References SCUnit(), and makeMuonMisalignmentScenario::wheel.

279  {
280  sect++;
281  return SCUnit(DTSectCollId(wheel, sect));
282 }
DTSectColl const * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
Definition: DTTrig.cc:262

◆ size()

int DTTrig::size ( void  ) const
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:241

◆ size1()

int DTTrig::size1 ( ) const
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:242

◆ TracoTrigs()

std::vector< DTTracoTrigData > DTTrig::TracoTrigs ( ) const

Return a copy of all the TRACO triggers.

Definition at line 425 of file DTTrig.cc.

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

Referenced by DTTrigTest::analyze().

425  {
426  std::vector<DTTracoTrigData> trigs;
427  /*check();*/
428  for (auto ptu = _cache.begin(); ptu != _cache.end(); ptu++) {
429  const DTSCTrigUnit& tu = (*ptu).second;
430  auto peb = tu.TracoTrigs()->end();
431  for (auto p = tu.TracoTrigs()->begin(); p != peb; p++) {
432  trigs.push_back(*p);
433  }
434  }
435  return trigs;
436 }
TUcontainer _cache
Definition: DTTrig.h:241
const_iterator end() const
Get last cache element.
Definition: DTCache.h:41
DTTracoCard * TracoTrigs() const
Return container of TRACO triggers.
Definition: DTSCTrigUnit.h:87
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:38

◆ triggerReco()

void DTTrig::triggerReco ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)

Run the whole trigger reconstruction chain.

Definition at line 132 of file DTTrig.cc.

References _cache, _cache1, _digitag, _inputexist, DTSCTrigUnit::BtiTrigs(), DTSuperLayerId::chamberId(), DTCache< T, Coll >::clearCache(), DTTracoCard::clearCache(), DTBtiCard::clearCache(), DTSectColl::clearCache(), DTSectColl::getTSPhi(), DTSectColl::getTSTheta(), mps_fire::i, iEvent, edm::HandleBase::isValid(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, LogDebug, isotrackApplyRegressor::range, DTTSPhi::reconstruct(), DTTSTheta::reconstruct(), DTTracoCard::reconstruct(), DTBtiCard::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().

132  {
133  updateES(iSetup);
134  if (!_inputexist)
135  return;
136 
137  DTDigiMap digiMap;
138  //Sort digis by chamber so they can be used by BTIs
140  iEvent.getByLabel(_digitag, dtDigis);
141 
142  if (!dtDigis.isValid()) {
143  LogDebug("DTTrig") << "DTTrig::triggerReco DTDigiCollection with input tag " << _digitag
144  << "requested in configuration, but not found in the event." << std::endl;
145  _inputexist = false;
146  return;
147  }
148 
150 
151  for (detUnitIt = dtDigis->begin(); detUnitIt != dtDigis->end(); ++detUnitIt) {
152  const DTLayerId& layId = (*detUnitIt).first;
153  const DTChamberId chambId = layId.superlayerId().chamberId();
154  const DTDigiCollection::Range& range = (*detUnitIt).second;
155  digiMap[chambId].put(range, layId);
156  }
157 
158  //Run reconstruct for single trigger subsystem (Bti, Traco TS)
159  for (TU_iterator it = _cache.begin(); it != _cache.end(); it++) {
160  DTSCTrigUnit& thisTU = (*it).second;
161  if (thisTU.BtiTrigs()->size() > 0) {
162  thisTU.BtiTrigs()->clearCache();
163  thisTU.TSThTrigs()->clearCache();
164  thisTU.TracoTrigs()->clearCache();
165  thisTU.TSPhTrigs()->clearCache();
166  }
167  DTChamberId chid = thisTU.statId();
168  DTDigiMap_iterator dmit = digiMap.find(chid);
169  if (dmit != digiMap.end()) {
170  thisTU.BtiTrigs()->reconstruct((*dmit).second);
171  if (thisTU.BtiTrigs()->size() > 0) {
172  thisTU.TSThTrigs()->reconstruct();
173  thisTU.TracoTrigs()->reconstruct();
174  if (thisTU.TracoTrigs()->size() > 0)
175  thisTU.TSPhTrigs()->reconstruct();
176  }
177  }
178  }
179  //Run reconstruct for Sector Collector
180  for (SC_iterator it = _cache1.begin(); it != _cache1.end(); it++) {
181  DTSectColl& sectcoll = (*it).second;
182  DTSectCollId scid = (*it).first;
183  if (sectcoll.sizePh() > 0 || sectcoll.sizeTh() > 0)
184  sectcoll.clearCache();
185  bool mustreco = false;
186  for (int i = 1; i < 5; i++) {
187  if (sectcoll.getTSPhi(i)->size() > 0) {
188  mustreco = true;
189  break;
190  }
191  }
192  for (int i = 1; i < 4; i++) {
193  if (sectcoll.getTSTheta(i)->size() > 0) {
194  mustreco = true;
195  break;
196  }
197  }
198  if (scid.sector() == 4 || scid.sector() == 10) {
199  if (sectcoll.getTSPhi(5)->size() > 0)
200  mustreco = true;
201  }
202  if (mustreco)
203  sectcoll.reconstruct();
204  }
205 }
void reconstruct() override
Load BTIs triggers and run TSTheta algoritm.
Definition: DTTSTheta.h:81
virtual void reconstruct(const DTDigiCollection dtDigis)
Definition: DTBtiCard.h:101
void clearCache()
Clear all traco stuff (cache & map)
Definition: DTTracoCard.cc:61
SCcontainer::iterator SC_iterator
Definition: DTTrig.h:65
void reconstruct() override
Load Trigger Units triggers and run Sector Collector algorithm.
Definition: DTSectColl.h:178
void reconstruct() override
Load TRACO triggers and run TSPhi algorithm.
Definition: DTTSPhi.h:80
SCcontainer _cache1
Definition: DTTrig.h:242
std::map< DTChamberId, DTDigiCollection, std::less< DTChamberId > > DTDigiMap
Definition: DTTrig.h:69
DTBtiCard * BtiTrigs() const
Return container of BTI triggers.
Definition: DTSCTrigUnit.h:84
void clearCache()
Clear all BTI stuff (map & cache)
Definition: DTBtiCard.cc:85
TUcontainer _cache
Definition: DTTrig.h:241
void reconstruct() override
Load BTIs triggers and run TRACOs algorithm.
Definition: DTTracoCard.h:101
int sizeTh() const
Return Theta cache size.
Definition: DTSectColl.h:160
TUcontainer::iterator TU_iterator
Definition: DTTrig.h:62
int sizePh() const
Return Phi cache size.
Definition: DTSectColl.h:151
DTChamberId statId() const
Identifier of the associated chamber.
Definition: DTSCTrigUnit.h:72
int size() const
Get cache vector&#39;s size.
Definition: DTCache.h:44
int iEvent
Definition: GenABIO.cc:224
DTChamberId chamberId() const
Return the corresponding ChamberId.
DTTSPhi * TSPhTrigs() const
Return the chamber Trigger Server (Phi)
Definition: DTSCTrigUnit.h:90
void updateES(const edm::EventSetup &iSetup)
update the eventsetup info
Definition: DTTrig.cc:207
edm::InputTag _digitag
Definition: DTTrig.h:244
DTDigiMap::iterator DTDigiMap_iterator
Definition: DTTrig.h:70
int sector() const
Definition: DTSectCollId.h:31
DTTSPhi * getTSPhi(int istat) const
Return TSPhi.
Definition: DTSectColl.h:69
std::pair< const_iterator, const_iterator > Range
DTTracoCard * TracoTrigs() const
Return container of TRACO triggers.
Definition: DTSCTrigUnit.h:87
bool isValid() const
Definition: HandleBase.h:70
void clearCache()
Local position in chamber of a trigger-data object.
Definition: DTSectColl.h:172
bool _inputexist
Definition: DTTrig.h:249
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:48
DTTSTheta * getTSTheta(int istat) const
Return TSTheta.
Definition: DTSectColl.h:72
void clearCache()
Clear cache vector.
Definition: DTCache.h:47
DTTSTheta * TSThTrigs() const
Return the chamber Trigger Server (Theta)
Definition: DTSCTrigUnit.h:93
#define LogDebug(id)

◆ trigUnit() [1/2]

DTSCTrigUnit * DTTrig::trigUnit ( DTChamberId  sid)

Return a trigger unit - Muon numbering.

Definition at line 245 of file DTTrig.cc.

References constTrigUnit().

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

245 { /*check();*/ return const_cast<DTSCTrigUnit*>(constTrigUnit(chid)); }
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:247

◆ trigUnit() [2/2]

DTSCTrigUnit * DTTrig::trigUnit ( int  wheel,
int  stat,
int  sect 
)

Return a trigger unit - Muon numbering, MTTF numbering.

Definition at line 275 of file DTTrig.cc.

References constTrigUnit(), and makeMuonMisalignmentScenario::wheel.

275  {
276  return const_cast<DTSCTrigUnit*>(constTrigUnit(wheel, stat, sect));
277 }
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
Definition: DTTrig.cc:247

◆ TSPhTrigs()

std::vector< DTChambPhSegm > DTTrig::TSPhTrigs ( ) const

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

Definition at line 438 of file DTTrig.cc.

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

Referenced by DTTrigTest::analyze().

438  {
439  /*check();*/
440  std::vector<DTChambPhSegm> trigs;
441  for (auto ptu = _cache.begin(); ptu != _cache.end(); ptu++) {
442  const DTSCTrigUnit& tu = (*ptu).second;
443  auto peb = tu.TSPhTrigs()->end();
444  for (auto p = tu.TSPhTrigs()->begin(); p != peb; p++) {
445  trigs.push_back(*p);
446  }
447  }
448  return trigs;
449 }
TUcontainer _cache
Definition: DTTrig.h:241
DTTSPhi * TSPhTrigs() const
Return the chamber Trigger Server (Phi)
Definition: DTSCTrigUnit.h:90
const_iterator end() const
Get last cache element.
Definition: DTCache.h:41
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:38

◆ TSThTrigs()

std::vector< DTChambThSegm > DTTrig::TSThTrigs ( ) const

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

Definition at line 451 of file DTTrig.cc.

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

Referenced by DTTrigTest::analyze().

451  {
452  /*check();*/
453  std::vector<DTChambThSegm> trigs;
454  for (auto ptu = _cache.begin(); ptu != _cache.end(); ptu++) {
455  const DTSCTrigUnit& tu = (*ptu).second;
456  auto peb = tu.TSThTrigs()->end();
457  for (auto p = tu.TSThTrigs()->begin(); p != peb; p++) {
458  trigs.push_back(*p);
459  }
460  }
461  return trigs;
462 }
TUcontainer _cache
Definition: DTTrig.h:241
const_iterator end() const
Get last cache element.
Definition: DTCache.h:41
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:38
DTTSTheta * TSThTrigs() const
Return the chamber Trigger Server (Theta)
Definition: DTSCTrigUnit.h:93

◆ updateES()

void DTTrig::updateES ( const edm::EventSetup iSetup)

update the eventsetup info

Definition at line 207 of file DTTrig.cc.

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

Referenced by triggerReco().

207  {
208  // Check for updatets in config
210  edm::ESHandle<DTGeometry> geomHandle;
211 
212  if (iSetup.get<DTConfigManagerRcd>().cacheIdentifier() != _configid) {
213  if (_debug)
214  std::cout << "DTTrig::updateES updating DTTPG configuration" << std::endl;
215 
216  _configid = iSetup.get<DTConfigManagerRcd>().cacheIdentifier();
217  confHandle = iSetup.getHandle(confToken_);
218  _conf_manager = confHandle.product();
219  for (TU_iterator it = _cache.begin(); it != _cache.end(); it++) {
220  (*it).second.setConfig(_conf_manager);
221  }
222  for (SC_iterator it = _cache1.begin(); it != _cache1.end(); it++) {
223  (*it).second.setConfig(_conf_manager);
224  }
225  }
226 
227  if (iSetup.get<MuonGeometryRecord>().cacheIdentifier() != _configid) {
228  if (_debug)
229  std::cout << "DTTrig::updateES updating muon geometry" << std::endl;
230 
231  _geomid = iSetup.get<MuonGeometryRecord>().cacheIdentifier();
232  geomHandle = iSetup.getHandle(dtGeomToken_);
233  for (TU_iterator it = _cache.begin(); it != _cache.end(); it++) {
234  (*it).second.setGeom(geomHandle->chamber((*it).second.statId()));
235  }
236  }
237 }
SCcontainer::iterator SC_iterator
Definition: DTTrig.h:65
SCcontainer _cache1
Definition: DTTrig.h:242
bool _debug
Definition: DTTrig.h:248
TUcontainer _cache
Definition: DTTrig.h:241
TUcontainer::iterator TU_iterator
Definition: DTTrig.h:62
unsigned long long cacheIdentifier() const
unsigned long long _geomid
Definition: DTTrig.h:252
T const * product() const
Definition: ESHandle.h:86
T get() const
Definition: EventSetup.h:79
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
edm::ESGetToken< DTConfigManager, DTConfigManagerRcd > confToken_
Definition: DTTrig.h:247
const DTConfigManager * _conf_manager
Definition: DTTrig.h:243
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
Definition: DTTrig.h:245
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
Definition: DTGeometry.cc:90
unsigned long long _configid
Definition: DTTrig.h:251

Member Data Documentation

◆ _cache

TUcontainer DTTrig::_cache
private

◆ _cache1

SCcontainer DTTrig::_cache1
private

◆ _conf_manager

const DTConfigManager* DTTrig::_conf_manager
private

Definition at line 243 of file DTTrig.h.

Referenced by getBXOffset(), and updateES().

◆ _configid

unsigned long long DTTrig::_configid
private

Definition at line 251 of file DTTrig.h.

Referenced by updateES().

◆ _debug

bool DTTrig::_debug
private

Definition at line 248 of file DTTrig.h.

Referenced by createTUs(), DTTrig(), and updateES().

◆ _digitag

edm::InputTag DTTrig::_digitag
private

Definition at line 244 of file DTTrig.h.

Referenced by DTTrig(), and triggerReco().

◆ _geomid

unsigned long long DTTrig::_geomid
private

Definition at line 252 of file DTTrig.h.

Referenced by updateES().

◆ _inputexist

bool DTTrig::_inputexist
private

Definition at line 249 of file DTTrig.h.

Referenced by triggerReco().

◆ confToken_

edm::ESGetToken<DTConfigManager, DTConfigManagerRcd> DTTrig::confToken_
private

Definition at line 247 of file DTTrig.h.

Referenced by DTTrig(), and updateES().

◆ dtGeomBeginRunToken_

edm::ESGetToken<DTGeometry, MuonGeometryRecord> DTTrig::dtGeomBeginRunToken_
private

Definition at line 246 of file DTTrig.h.

Referenced by createTUs(), and DTTrig().

◆ dtGeomToken_

edm::ESGetToken<DTGeometry, MuonGeometryRecord> DTTrig::dtGeomToken_
private

Definition at line 245 of file DTTrig.h.

Referenced by DTTrig(), and updateES().