#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_iterator > | Range |
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_iterator > | SCRange |
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. | |
SC_iterator | begin1 () |
Begin of the sector collector store. | |
std::vector< DTBtiTrigData > | BtiTrigs () |
Return a copy of all the BTI triggers. | |
Range | cache () |
Begin of the trigger units store. | |
SCRange | cache1 () |
Range of the sector collector store. | |
DTChambPhSegm * | chPhiSegm1 (DTChamberId sid, int step) |
Return the first phi track segment in req. chamber/step. | |
DTChambPhSegm * | chPhiSegm1 (DTSCTrigUnit *unit, int step) |
Return the first phi track segment in req. chamber/step. | |
DTChambPhSegm * | chPhiSegm1 (int wheel, int stat, int sect, int step) |
Return the first phi track segment in req. chamber/step, MTTF numbering. | |
DTChambPhSegm * | chPhiSegm2 (DTChamberId sid, int step) |
Return the second phi track segment in req. chamber/step. | |
DTChambPhSegm * | chPhiSegm2 (DTSCTrigUnit *unit, int step) |
Return the second phi track segment in req. chamber/step. | |
DTChambPhSegm * | chPhiSegm2 (int wheel, int stat, int sect, int step) |
Return the second phi track segment in req. chamber/step, MTTF numbering. | |
DTSectCollPhSegm * | chSectCollPhSegm1 (DTSectColl *unit, int step) |
Return the first phi track segment in req. chamber/step [SC step]. | |
DTSectCollPhSegm * | chSectCollPhSegm1 (int wheel, int sect, int step) |
Return the first phi track segment in req. chamber/step, [MTTF numbering & SC step]. | |
DTSectCollPhSegm * | chSectCollPhSegm2 (DTSectColl *unit, int step) |
Return the second phi track segment in req. chamber/step [SC step]. | |
DTSectCollPhSegm * | chSectCollPhSegm2 (int wheel, int sect, int step) |
Return the second phi track segment in req. chamber/step, [MTTF numbering & SC step]. | |
DTSectCollThSegm * | chSectCollThSegm (DTSectColl *unit, int step) |
Return the theta track segment in req. chamber/step [SC step]. | |
DTSectCollThSegm * | chSectCollThSegm (int wheel, int sect, int step) |
Return the theta track segment in req. chamber/step, [MTTF numbering & SC step]. | |
DTChambThSegm * | chThetaSegm (DTChamberId sid, int step) |
Return the theta candidates in req. chamber/step. | |
DTChambThSegm * | chThetaSegm (DTSCTrigUnit *unit, int step) |
Return the theta candidates in req. chamber/step. | |
DTChambThSegm * | chThetaSegm (int wheel, int stat, int sect, int step) |
Return the theta candidates in req. chamber/step, MTTF numbering. | |
void | clear () |
Clear the trigger units cache. | |
GlobalVector | CMSDirection (const DTTrigData *trig) const |
Direction of a trigger-data object in CMS frame. | |
GlobalPoint | CMSPosition (const DTTrigData *trig) const |
Coordinate of a trigger-data object in CMS frame. | |
void | createTUs (const edm::EventSetup &iSetup) |
Create the trigger units and store them in the cache. | |
DTTrig (const edm::ParameterSet ¶ms) | |
Constructors. | |
void | dumpGeom () |
Dump the geometry. | |
void | dumpLuts (short int lut_btic, const DTConfigManager *conf) |
Dump the LUT files. | |
TU_iterator | end () |
End of the trigger units store. | |
SC_iterator | end1 () |
End of the sectoor collector store. | |
TU_iterator | find (DTChamberId id) |
Find a trigger unit in the map. | |
SC_iterator | find1 (DTSectCollId id) |
Find a Sector Collector in the map. | |
int | getBXOffset () |
Get BX Offset. | |
LocalVector | localDirection (const DTTrigData *trig) const |
Direction of a trigger-data object in chamber frame. | |
LocalPoint | localPosition (const DTTrigData *trig) const |
Coordinate of a trigger-data object in chamber frame. | |
void | print (DTTrigData *trig) const |
Print a trigger-data object. | |
std::vector< DTSectCollPhSegm > | SCPhTrigs () |
Return a copy of all the Sector Collector (Phi) triggers. | |
std::vector< DTSectCollThSegm > | SCThTrigs () |
Return a copy of all the Sector Collector (Theta) triggers. | |
int | size () |
Size of the trigger units store. | |
int | size1 () |
Size of the sector collector store. | |
std::vector< DTTracoTrigData > | TracoTrigs () |
Return a copy of all the TRACO triggers. | |
void | triggerReco (const edm::Event &iEvent, const edm::EventSetup &iSetup) |
Run the whole trigger reconstruction chain. | |
DTSCTrigUnit * | trigUnit (DTChamberId sid) |
Return a trigger unit - Muon numbering. | |
DTSCTrigUnit * | trigUnit (int wheel, int stat, int sect) |
Return a trigger unit - Muon numbering, MTTF numbering. | |
std::vector< DTChambPhSegm > | TSPhTrigs () |
Return a copy of all the Trigger Server (Phi) triggers. | |
std::vector< DTChambThSegm > | TSThTrigs () |
Return a copy of all the Trigger Server (Theta) triggers. | |
void | updateES (const edm::EventSetup &iSetup) |
update the eventsetup info | |
~DTTrig () | |
Destructor. | |
Private Member Functions | |
DTSCTrigUnit * | constTrigUnit (DTChamberId sid) const |
Return a trigger unit - Muon numbering - const version. | |
DTSCTrigUnit * | constTrigUnit (int wheel, int stat, int sect) const |
Return a trigger unit - Muon numbering, MTTF numbering - const version. | |
DTSectColl * | SCUnit (DTSectCollId scid) const |
Return a SC unit - Muon numbering - const version. | |
DTSectColl * | SCUnit (int wheel, int sect) const |
Return a SC Unit Muon Numbering, MTTF numbering - const version. | |
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 |
Steering routine for L1 trigger simulation in a muon barrel station
typedef std::map< DTChamberId,DTDigiCollection,std::less<DTChamberId> > DTTrig::DTDigiMap |
typedef DTDigiMap::const_iterator DTTrig::DTDigiMap_const_iterator |
typedef DTDigiMap::iterator DTTrig::DTDigiMap_iterator |
typedef std::pair<TU_iterator,TU_iterator> DTTrig::Range |
typedef SCcontainer::const_iterator DTTrig::SC_const_iterator |
typedef SCcontainer::iterator DTTrig::SC_iterator |
typedef std::map< DTSectCollId,DTSectColl*,std::less<DTSectCollId> > DTTrig::SCcontainer |
typedef std::pair<SC_iterator,SC_iterator> DTTrig::SCRange |
typedef TUcontainer::const_iterator DTTrig::TU_const_iterator |
typedef TUcontainer::iterator DTTrig::TU_iterator |
typedef std::map< DTChamberId,DTSCTrigUnit*,std::less<DTChamberId> > DTTrig::TUcontainer |
DTTrig::DTTrig | ( | const edm::ParameterSet & | params | ) |
Constructors.
Definition at line 50 of file DTTrig.cc.
References _debug, _digitag, gather_cfg::cout, edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().
: _inputexist(1) , _configid(0) , _geomid(0) { // Set configuration parameters _debug = params.getUntrackedParameter<bool>("debug"); if(_debug){ std::cout << std::endl; std::cout << "**** Initialization of DTTrigger ****" << std::endl; } _digitag = params.getParameter<edm::InputTag>("digiTag"); }
DTTrig::~DTTrig | ( | ) |
TU_iterator DTTrig::begin | ( | void | ) | [inline] |
SC_iterator DTTrig::begin1 | ( | ) | [inline] |
std::vector< DTBtiTrigData > DTTrig::BtiTrigs | ( | ) |
Return a copy of all the BTI triggers.
Definition at line 487 of file DTTrig.cc.
References _cache, DTCache< T, Coll >::begin(), DTSCTrigUnit::BtiTrigs(), DTCache< T, Coll >::end(), and L1TEmulatorMonitor_cff::p.
Referenced by DTTrigTest::analyze().
{ /*check();*/ std::vector<DTBtiTrigData> trigs; TU_iterator ptu; for(ptu=_cache.begin();ptu!=_cache.end();ptu++) { DTSCTrigUnit* tu = (*ptu).second; std::vector<DTBtiTrigData>::const_iterator p; //p=0; std::vector<DTBtiTrigData>::const_iterator peb=tu->BtiTrigs()->end(); for(p=tu->BtiTrigs()->begin();p!=peb;p++){ trigs.push_back(*p); } } return trigs; }
Range DTTrig::cache | ( | ) | [inline] |
SCRange DTTrig::cache1 | ( | ) | [inline] |
DTChambPhSegm * DTTrig::chPhiSegm1 | ( | DTChamberId | sid, |
int | step | ||
) |
Return the first phi track segment in req. chamber/step.
Definition at line 368 of file DTTrig.cc.
References trigUnit().
Referenced by chPhiSegm1().
{ return chPhiSegm1(trigUnit(sid),step); }
DTChambPhSegm * DTTrig::chPhiSegm1 | ( | DTSCTrigUnit * | unit, |
int | step | ||
) |
Return the first phi track segment in req. chamber/step.
Definition at line 347 of file DTTrig.cc.
References DTSCTrigUnit::nPhiSegm(), and DTSCTrigUnit::phiSegment().
{ if(unit==0)return 0; if(unit->nPhiSegm(step)<1)return 0; return const_cast<DTChambPhSegm*>(unit->phiSegment(step,1)); }
DTChambPhSegm * DTTrig::chPhiSegm1 | ( | int | wheel, |
int | stat, | ||
int | sect, | ||
int | step | ||
) |
Return the first phi track segment in req. chamber/step, MTTF numbering.
Definition at line 384 of file DTTrig.cc.
References chPhiSegm1(), and trigUnit().
{ return chPhiSegm1(trigUnit(wheel,stat,sect),step); // to make it transparent to the outside world // return chSectCollSegm1(wheel,stat,sect,step); }
DTChambPhSegm * DTTrig::chPhiSegm2 | ( | DTChamberId | sid, |
int | step | ||
) |
Return the second phi track segment in req. chamber/step.
Definition at line 373 of file DTTrig.cc.
References trigUnit().
Referenced by chPhiSegm2().
{ return chPhiSegm2(trigUnit(sid),step); }
DTChambPhSegm * DTTrig::chPhiSegm2 | ( | DTSCTrigUnit * | unit, |
int | step | ||
) |
Return the second phi track segment in req. chamber/step.
Definition at line 354 of file DTTrig.cc.
References DTSCTrigUnit::nPhiSegm(), and DTSCTrigUnit::phiSegment().
{ if(unit==0)return 0; if(unit->nPhiSegm(step)<2)return 0; return const_cast<DTChambPhSegm*>(unit->phiSegment(step,2)); }
DTChambPhSegm * DTTrig::chPhiSegm2 | ( | int | wheel, |
int | stat, | ||
int | sect, | ||
int | step | ||
) |
Return the second phi track segment in req. chamber/step, MTTF numbering.
Definition at line 392 of file DTTrig.cc.
References chPhiSegm2(), and trigUnit().
{ // if(stat==4&&(sect==3||sect==9)) { // if hrizontal chambers of MB4 get first track of twin chamber (flag=1) // return chPhiSegm1(trigUnit(wheel,stat,sect,1),step); // } else { return chPhiSegm2(trigUnit(wheel,stat,sect),step); // to make it transparent to the outside world // return chSectCollSegm2(wheel,stat,sect,step); //} }
DTSectCollPhSegm * DTTrig::chSectCollPhSegm1 | ( | DTSectColl * | unit, |
int | step | ||
) |
Return the first phi track segment in req. chamber/step [SC step].
Definition at line 411 of file DTTrig.cc.
References DTSectColl::nSegmPh(), and DTSectColl::SectCollPhSegment().
Referenced by chSectCollPhSegm1().
{ if(unit==0)return 0; if(unit->nSegmPh(step)<1)return 0; return const_cast<DTSectCollPhSegm*>(unit->SectCollPhSegment(step,1)); }
DTSectCollPhSegm * DTTrig::chSectCollPhSegm1 | ( | int | wheel, |
int | sect, | ||
int | step | ||
) |
Return the first phi track segment in req. chamber/step, [MTTF numbering & SC step].
Definition at line 427 of file DTTrig.cc.
References chSectCollPhSegm1(), and SCUnit().
{ return chSectCollPhSegm1(SCUnit(wheel,sect),step); }
DTSectCollPhSegm * DTTrig::chSectCollPhSegm2 | ( | DTSectColl * | unit, |
int | step | ||
) |
Return the second phi track segment in req. chamber/step [SC step].
Definition at line 419 of file DTTrig.cc.
References DTSectColl::nSegmPh(), and DTSectColl::SectCollPhSegment().
Referenced by chSectCollPhSegm2().
{ if(unit==0)return 0; if(unit->nSegmPh(step)<2)return 0; return const_cast<DTSectCollPhSegm*>(unit->SectCollPhSegment(step,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 433 of file DTTrig.cc.
References chSectCollPhSegm2(), and SCUnit().
{ // if(stat==4&&(sect==3||sect==9)) { // if hrizontal chambers of MB4 get first track of twin chamber (flag=1) //return chSectCollSegm1(trigUnit(wheel,stat,sect,1),step); //} else { return chSectCollPhSegm2(SCUnit(wheel,sect),step); //} }
DTSectCollThSegm * DTTrig::chSectCollThSegm | ( | DTSectColl * | unit, |
int | step | ||
) |
Return the theta track segment in req. chamber/step [SC step].
Definition at line 443 of file DTTrig.cc.
References DTSectColl::nSegmTh(), and DTSectColl::SectCollThSegment().
Referenced by chSectCollThSegm().
{ if(unit==0)return 0; if(unit->nSegmTh(step)<1)return 0; return const_cast<DTSectCollThSegm*>(unit->SectCollThSegment(step)); }
DTSectCollThSegm * DTTrig::chSectCollThSegm | ( | int | wheel, |
int | sect, | ||
int | step | ||
) |
Return the theta track segment in req. chamber/step, [MTTF numbering & SC step].
Definition at line 451 of file DTTrig.cc.
References chSectCollThSegm(), and SCUnit().
{ return chSectCollThSegm(SCUnit(wheel,sect),step); }
DTChambThSegm * DTTrig::chThetaSegm | ( | DTChamberId | sid, |
int | step | ||
) |
Return the theta candidates in req. chamber/step.
Definition at line 378 of file DTTrig.cc.
References DTChamberId::station(), and trigUnit().
Referenced by chThetaSegm().
{ if(sid.station()==4)return 0; return chThetaSegm(trigUnit(sid),step); }
DTChambThSegm * DTTrig::chThetaSegm | ( | int | wheel, |
int | stat, | ||
int | sect, | ||
int | step | ||
) |
Return the theta candidates in req. chamber/step, MTTF numbering.
Definition at line 404 of file DTTrig.cc.
References chThetaSegm(), and trigUnit().
{ if(stat==4)return 0; return chThetaSegm(trigUnit(wheel,stat,sect),step); }
DTChambThSegm * DTTrig::chThetaSegm | ( | DTSCTrigUnit * | unit, |
int | step | ||
) |
Return the theta candidates in req. chamber/step.
Definition at line 361 of file DTTrig.cc.
References DTSCTrigUnit::nThetaSegm(), and DTSCTrigUnit::thetaSegment().
{ if(unit==0)return 0; if(unit->nThetaSegm(step)<1)return 0; return const_cast<DTChambThSegm*>(unit->thetaSegment(step,1)); }
void DTTrig::clear | ( | void | ) |
Clear the trigger units cache.
Definition at line 272 of file DTTrig.cc.
References _cache, and _cache1.
Referenced by ~DTTrig().
{ // Delete the map for (TU_iterator it=_cache.begin();it!=_cache.end();it++){ // Delete all the trigger units delete (*it).second; } _cache.clear(); for (SC_iterator it=_cache1.begin();it!=_cache1.end();it++){ // Delete all the Sector Collectors delete (*it).second; } _cache1.clear(); }
GlobalVector DTTrig::CMSDirection | ( | const DTTrigData * | trig | ) | const [inline] |
Direction of a trigger-data object in CMS frame.
Definition at line 222 of file DTTrig.h.
References DTTrigData::ChamberId(), and constTrigUnit().
Referenced by DTTrigTest::analyze().
{ return constTrigUnit(trig->ChamberId())->CMSDirection(trig); }
GlobalPoint DTTrig::CMSPosition | ( | const DTTrigData * | trig | ) | const [inline] |
Coordinate of a trigger-data object in CMS frame.
Definition at line 212 of file DTTrig.h.
References DTTrigData::ChamberId(), and constTrigUnit().
Referenced by DTTrigTest::analyze().
{ return constTrigUnit(trig->ChamberId())->CMSPosition(trig); }
DTSCTrigUnit * DTTrig::constTrigUnit | ( | int | wheel, |
int | stat, | ||
int | sect | ||
) | const [private] |
Return a trigger unit - Muon numbering, MTTF numbering - const version.
Definition at line 339 of file DTTrig.cc.
References constTrigUnit(), and DTChamberId.
{ sect++; // offset 1 for sector number ([0,11] --> [1,12]) return constTrigUnit(DTChamberId(wheel,stat,sect)); }
DTSCTrigUnit * DTTrig::constTrigUnit | ( | DTChamberId | sid | ) | const [private] |
Return a trigger unit - Muon numbering - const version.
Definition at line 297 of file DTTrig.cc.
References _cache, gather_cfg::cout, DTChamberId::sector(), DTChamberId::station(), and DTChamberId::wheel().
Referenced by CMSDirection(), CMSPosition(), constTrigUnit(), localDirection(), localPosition(), print(), and trigUnit().
{ // std::cout << " SC: running DTTrig::constTrigUnit(DTChamberId chid)" << std::endl; TU_const_iterator it = _cache.find(chid); if ( it == _cache.end()) { std::cout << "DTTrig::trigUnit: Trigger Unit not in the map: "; std::cout << " wheel=" << chid.wheel() ; std::cout << ", station=" << chid.station(); std::cout << ", sector=" << chid.sector(); std::cout << std::endl; return 0; } return (*it).second; }
void DTTrig::createTUs | ( | const edm::EventSetup & | iSetup | ) |
Create the trigger units and store them in the cache.
Definition at line 76 of file DTTrig.cc.
References _cache, _cache1, _debug, DTSectColl::addTU(), gather_cfg::cout, edm::EventSetup::get(), DTChamber::id(), DTChamberId::sector(), DTSectCollId::sector(), DTSectCollId::wheel(), and DTChamberId::wheel().
Referenced by DTTrigProd::beginRun(), and DTTrigTest::beginRun().
{ // build up Sector Collectors and then // build the trrigger units (one for each chamber) for(int iwh=-2;iwh<=2;iwh++){ for(int ise=1;ise<=12;ise++){ if(_debug){ std::cout << "calling sectcollid wh sc " << iwh << " " << ise << std::endl;} DTSectCollId scid(iwh,ise); SC_iterator it = _cache1.find(scid); if ( it != _cache1.end()) { std::cout << "DTTrig::createTUs: Sector Collector unit already exists"<<std::endl; continue; } DTSectColl* sc; sc = new DTSectColl(scid); if(_debug){ std::cout << " DTTrig::createTUs new SC sc = " << sc << " at scid.sector() " << scid.sector() << " at scid.wheel() " << scid.wheel() << std::endl; } _cache1[scid] = sc; } } edm::ESHandle<DTGeometry>dtGeom; iSetup.get<MuonGeometryRecord>().get(dtGeom); for (std::vector<DTChamber*>::const_iterator ich=dtGeom->chambers().begin(); ich!=dtGeom->chambers().end();ich++){ DTChamber* chamb = (*ich); DTChamberId chid = chamb->id(); TU_iterator it = _cache.find(chid); if ( it != _cache.end()) { std::cout << "DTTrig::init: Trigger unit already exists" << std::endl; continue; } DTSCTrigUnit* tru = new DTSCTrigUnit(chamb); _cache[chid] = tru; //----------- add TU to corresponding SC // returning correspondent SC id DTSectCollId scid; if(chid.sector()==13) { scid = DTSectCollId(chid.wheel(), 4);} else if(chid.sector()==14) { scid = DTSectCollId(chid.wheel(), 10);} else { scid = DTSectCollId(chid.wheel(), chid.sector() );} SC_iterator it1 = _cache1.find(scid); if ( it1 != _cache1.end()) { DTSectColl* sc = (*it1).second; if(_debug) { std::cout << "DTTrig::init: adding TU in SC << " << " sector = " << scid.sector() << " wheel = " << scid.wheel() << std::endl; } sc->addTU(tru); } else { std::cout << "DTTrig::createTUs: Trigger Unit not in the map: "; } } }
void DTTrig::dumpGeom | ( | ) |
void DTTrig::dumpLuts | ( | short int | lut_btic, |
const DTConfigManager * | conf | ||
) |
Dump the LUT files.
Definition at line 468 of file DTTrig.cc.
References _cache, DTSCTrigUnit::dumpLUT(), DTConfigManager::dumpLUTParam(), and DTSCTrigUnit::statId().
Referenced by DTTrigProd::beginRun().
{ for (TU_const_iterator it=_cache.begin();it!=_cache.end();it++){ DTSCTrigUnit* thisTU = (*it).second; // dump lut command file from geometry thisTU->dumpLUT(lut_btic); // dump lut command file from parameters (DB or CMSSW) DTChamberId chid = thisTU->statId(); conf->dumpLUTParam(chid); } return; }
TU_iterator DTTrig::end | ( | void | ) | [inline] |
SC_iterator DTTrig::end1 | ( | ) | [inline] |
TU_iterator DTTrig::find | ( | DTChamberId | id | ) | [inline] |
SC_iterator DTTrig::find1 | ( | DTSectCollId | id | ) | [inline] |
int DTTrig::getBXOffset | ( | ) | [inline] |
Get BX Offset.
Definition at line 184 of file DTTrig.h.
References _conf_manager, and DTConfigManager::getBXOffset().
Referenced by DTTrigProd::produce().
{ return _conf_manager->getBXOffset(); }
LocalVector DTTrig::localDirection | ( | const DTTrigData * | trig | ) | const [inline] |
Direction of a trigger-data object in chamber frame.
Definition at line 217 of file DTTrig.h.
References DTTrigData::ChamberId(), and constTrigUnit().
{ return constTrigUnit(trig->ChamberId())->localDirection(trig); }
LocalPoint DTTrig::localPosition | ( | const DTTrigData * | trig | ) | const [inline] |
Coordinate of a trigger-data object in chamber frame.
Definition at line 207 of file DTTrig.h.
References DTTrigData::ChamberId(), and constTrigUnit().
{ return constTrigUnit(trig->ChamberId())->localPosition(trig); }
void DTTrig::print | ( | DTTrigData * | trig | ) | const [inline] |
Print a trigger-data object.
Definition at line 227 of file DTTrig.h.
References DTTrigData::ChamberId(), and constTrigUnit().
{ constTrigUnit(trig->ChamberId())->print(trig); }
std::vector< DTSectCollPhSegm > DTTrig::SCPhTrigs | ( | ) |
Return a copy of all the Sector Collector (Phi) triggers.
Definition at line 551 of file DTTrig.cc.
References _cache1, DTSectColl::beginPh(), DTSectColl::endPh(), and L1TEmulatorMonitor_cff::p.
Referenced by DTTrigTest::analyze(), and DTTrigProd::produce().
{ /*check();*/ std::vector<DTSectCollPhSegm> trigs; // SC_iterator ptu; SC_iterator psc; for(psc=_cache1.begin();psc!=_cache1.end();psc++) { // DTSCTrigUnit* tu = (*ptu).second; // // old SMDB: // DTSectColl* tu = (*ptu).second; // std::vector<DTChambPhSegm>::const_iterator p=0; // std::vector<DTChambPhSegm>::const_iterator peb=tu->SCTrigs()->end(); // for(p=tu->SCTrigs()->begin();p!=peb;p++){ // trigs.push_back(*p); // } DTSectColl* sc = (*psc).second; std::vector<DTSectCollPhSegm>::const_iterator p; std::vector<DTSectCollPhSegm>::const_iterator peb=sc->endPh(); for(p=sc->beginPh();p!=peb;p++){ trigs.push_back(*p); } } return trigs; }
std::vector< DTSectCollThSegm > DTTrig::SCThTrigs | ( | ) |
Return a copy of all the Sector Collector (Theta) triggers.
Definition at line 580 of file DTTrig.cc.
References _cache1, DTSectColl::beginTh(), DTSectColl::endTh(), and L1TEmulatorMonitor_cff::p.
Referenced by DTTrigTest::analyze(), and DTTrigProd::produce().
{ /*check();*/ std::vector<DTSectCollThSegm> trigs; SC_iterator psc; for(psc=_cache1.begin();psc!=_cache1.end();psc++) { DTSectColl* sc = (*psc).second; std::vector<DTSectCollThSegm>::const_iterator p; //p=0; std::vector<DTSectCollThSegm>::const_iterator peb=sc->endTh(); for(p=sc->beginTh();p!=peb;p++){ trigs.push_back(*p); } } return trigs; }
DTSectColl * DTTrig::SCUnit | ( | DTSectCollId | scid | ) | const [private] |
Return a SC unit - Muon numbering - const version.
Definition at line 313 of file DTTrig.cc.
References _cache1, gather_cfg::cout, DTSectCollId::sector(), and DTSectCollId::wheel().
Referenced by chSectCollPhSegm1(), chSectCollPhSegm2(), chSectCollThSegm(), and SCUnit().
DTSectColl * DTTrig::SCUnit | ( | int | wheel, |
int | sect | ||
) | const [private] |
Return a SC Unit Muon Numbering, MTTF numbering - const version.
Definition at line 332 of file DTTrig.cc.
References SCUnit().
{ sect++; return SCUnit(DTSectCollId(wheel,sect)); }
int DTTrig::size | ( | void | ) | [inline] |
int DTTrig::size1 | ( | ) | [inline] |
std::vector< DTTracoTrigData > DTTrig::TracoTrigs | ( | ) |
Return a copy of all the TRACO triggers.
Definition at line 503 of file DTTrig.cc.
References _cache, DTCache< T, Coll >::begin(), DTCache< T, Coll >::end(), L1TEmulatorMonitor_cff::p, and DTSCTrigUnit::TracoTrigs().
Referenced by DTTrigTest::analyze().
{ std::vector<DTTracoTrigData> trigs; TU_iterator ptu; /*check();*/ for(ptu=_cache.begin();ptu!=_cache.end();ptu++) { DTSCTrigUnit* tu = (*ptu).second; std::vector<DTTracoTrigData>::const_iterator p; //p=0; std::vector<DTTracoTrigData>::const_iterator peb=tu->TracoTrigs()->end(); for(p=tu->TracoTrigs()->begin();p!=peb;p++){ trigs.push_back(*p); } } return trigs; }
void DTTrig::triggerReco | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) |
Run the whole trigger reconstruction chain.
Definition at line 150 of file DTTrig.cc.
References _cache, _cache1, _digitag, _inputexist, DTSCTrigUnit::BtiTrigs(), DTSuperLayerId::chamberId(), DTCache< T, Coll >::clearCache(), DTBtiCard::clearCache(), DTTracoCard::clearCache(), DTSectColl::clearCache(), edm::Event::getByLabel(), DTSectColl::getTSPhi(), DTSectColl::getTSTheta(), i, edm::HandleBase::isValid(), LogDebug, DTSectColl::reconstruct(), DTTSPhi::reconstruct(), DTTracoCard::reconstruct(), DTTSTheta::reconstruct(), DTBtiCard::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().
{ updateES(iSetup); if (!_inputexist) return; DTDigiMap digiMap; //Sort digis by chamber so they can be used by BTIs edm::Handle<DTDigiCollection> dtDigis; iEvent.getByLabel(_digitag, dtDigis); if (!dtDigis.isValid()) { LogDebug("DTTrig") << "DTTrig::triggerReco DTDigiCollection with input tag " << _digitag << "requested in configuration, but not found in the event." << std::endl; _inputexist = false; return; } DTDigiCollection::DigiRangeIterator detUnitIt; for (detUnitIt=dtDigis->begin(); detUnitIt!=dtDigis->end(); ++detUnitIt){ const DTLayerId& layId = (*detUnitIt).first; const DTChamberId chambId=layId.superlayerId().chamberId(); const DTDigiCollection::Range& range = (*detUnitIt).second; digiMap[chambId].put(range,layId); } //Run reconstruct for single trigger subsystem (Bti, Traco TS) for (TU_iterator it=_cache.begin();it!=_cache.end();it++){ DTSCTrigUnit* thisTU=(*it).second; if (thisTU->BtiTrigs()->size()>0){ thisTU->BtiTrigs()->clearCache(); thisTU->TSThTrigs()->clearCache(); thisTU->TracoTrigs()->clearCache(); thisTU->TSPhTrigs()->clearCache(); } DTChamberId chid=thisTU->statId(); DTDigiMap_iterator dmit = digiMap.find(chid); if (dmit !=digiMap.end()){ thisTU->BtiTrigs()->reconstruct((*dmit).second); if(thisTU->BtiTrigs()->size()>0){ thisTU->TSThTrigs()->reconstruct(); thisTU->TracoTrigs()->reconstruct(); if(thisTU->TracoTrigs()->size()>0) thisTU->TSPhTrigs()->reconstruct(); } } } //Run reconstruct for Sector Collector for (SC_iterator it=_cache1.begin();it!=_cache1.end();it++){ DTSectColl* sectcoll = (*it).second; DTSectCollId scid = (*it).first; if (sectcoll->sizePh()>0 || sectcoll->sizeTh()>0) sectcoll->clearCache(); bool mustreco = false; for (int i=1;i<5;i++) { if (sectcoll->getTSPhi(i)->size()>0) { mustreco = true; break; } } for (int i=1;i<4;i++) { if (sectcoll->getTSTheta(i)->size()>0) { mustreco = true; break; } } if (scid.sector()==4 || scid.sector()==10){ if (sectcoll->getTSPhi(5)->size()>0) mustreco = true; } if (mustreco) sectcoll->reconstruct(); } }
DTSCTrigUnit * DTTrig::trigUnit | ( | DTChamberId | sid | ) |
Return a trigger unit - Muon numbering.
Definition at line 289 of file DTTrig.cc.
References constTrigUnit().
Referenced by chPhiSegm1(), chPhiSegm2(), and chThetaSegm().
{ /*check();*/ return constTrigUnit(chid); }
DTSCTrigUnit * DTTrig::trigUnit | ( | int | wheel, |
int | stat, | ||
int | sect | ||
) |
Return a trigger unit - Muon numbering, MTTF numbering.
Definition at line 327 of file DTTrig.cc.
References constTrigUnit().
{ return constTrigUnit(wheel, stat, sect); }
std::vector< DTChambPhSegm > DTTrig::TSPhTrigs | ( | ) |
Return a copy of all the Trigger Server (Phi) triggers.
Definition at line 519 of file DTTrig.cc.
References _cache, DTCache< T, Coll >::begin(), DTCache< T, Coll >::end(), L1TEmulatorMonitor_cff::p, and DTSCTrigUnit::TSPhTrigs().
Referenced by DTTrigTest::analyze().
{ /*check();*/ std::vector<DTChambPhSegm> trigs; TU_iterator ptu; for(ptu=_cache.begin();ptu!=_cache.end();ptu++) { DTSCTrigUnit* tu = (*ptu).second; std::vector<DTChambPhSegm>::const_iterator p; //p=0; std::vector<DTChambPhSegm>::const_iterator peb=tu->TSPhTrigs()->end(); for(p=tu->TSPhTrigs()->begin();p!=peb;p++){ trigs.push_back(*p); } } return trigs; }
std::vector< DTChambThSegm > DTTrig::TSThTrigs | ( | ) |
Return a copy of all the Trigger Server (Theta) triggers.
Definition at line 535 of file DTTrig.cc.
References _cache, DTCache< T, Coll >::begin(), DTCache< T, Coll >::end(), L1TEmulatorMonitor_cff::p, and DTSCTrigUnit::TSThTrigs().
Referenced by DTTrigTest::analyze().
{ /*check();*/ std::vector<DTChambThSegm> trigs; TU_iterator ptu; for(ptu=_cache.begin();ptu!=_cache.end();ptu++) { DTSCTrigUnit* tu = (*ptu).second; std::vector<DTChambThSegm>::const_iterator p; //p=0; std::vector<DTChambThSegm>::const_iterator peb=tu->TSThTrigs()->end(); for(p=tu->TSThTrigs()->begin();p!=peb;p++){ trigs.push_back(*p); } } return trigs; }
void DTTrig::updateES | ( | const edm::EventSetup & | iSetup | ) |
update the eventsetup info
Definition at line 232 of file DTTrig.cc.
References _cache, _cache1, _conf_manager, _configid, _debug, _geomid, edm::eventsetup::EventSetupRecord::cacheIdentifier(), gather_cfg::cout, edm::EventSetup::get(), and edm::ESHandle< T >::product().
Referenced by triggerReco().
{ // Check for updatets in config edm::ESHandle<DTConfigManager> confHandle; edm::ESHandle<DTGeometry> geomHandle; if (iSetup.get<DTConfigManagerRcd>().cacheIdentifier()!=_configid) { if (_debug) std::cout << "DTTrig::updateES updating DTTPG configuration" << std::endl; _configid = iSetup.get<DTConfigManagerRcd>().cacheIdentifier(); iSetup.get<DTConfigManagerRcd>().get(confHandle); _conf_manager = confHandle.product(); for (TU_iterator it=_cache.begin();it!=_cache.end();it++){ (*it).second->setConfig(_conf_manager); } for (SC_iterator it=_cache1.begin();it!=_cache1.end();it++){ (*it).second->setConfig(_conf_manager); } } if (iSetup.get<MuonGeometryRecord>().cacheIdentifier()!=_configid) { if (_debug) std::cout << "DTTrig::updateES updating muon geometry" << std::endl; _geomid = iSetup.get<MuonGeometryRecord>().cacheIdentifier(); iSetup.get<MuonGeometryRecord>().get(geomHandle); for (TU_iterator it=_cache.begin();it!=_cache.end();it++){ (*it).second->setGeom(geomHandle->chamber((*it).second->statId())); } } }
TUcontainer DTTrig::_cache [private] |
Definition at line 248 of file DTTrig.h.
Referenced by begin(), BtiTrigs(), cache(), clear(), constTrigUnit(), createTUs(), dumpGeom(), dumpLuts(), end(), find(), size(), TracoTrigs(), triggerReco(), TSPhTrigs(), TSThTrigs(), and updateES().
SCcontainer DTTrig::_cache1 [private] |
Definition at line 249 of file DTTrig.h.
Referenced by begin1(), cache1(), clear(), createTUs(), end1(), find1(), SCPhTrigs(), SCThTrigs(), SCUnit(), size1(), triggerReco(), and updateES().
const DTConfigManager* DTTrig::_conf_manager [private] |
Definition at line 250 of file DTTrig.h.
Referenced by getBXOffset(), and updateES().
unsigned long long DTTrig::_configid [private] |
Definition at line 255 of file DTTrig.h.
Referenced by updateES().
bool DTTrig::_debug [private] |
Definition at line 252 of file DTTrig.h.
Referenced by createTUs(), DTTrig(), and updateES().
edm::InputTag DTTrig::_digitag [private] |
Definition at line 251 of file DTTrig.h.
Referenced by DTTrig(), and triggerReco().
unsigned long long DTTrig::_geomid [private] |
Definition at line 256 of file DTTrig.h.
Referenced by updateES().
bool DTTrig::_inputexist [private] |
Definition at line 253 of file DTTrig.h.
Referenced by triggerReco().