#include <L1Trigger/DTTrigger/interface/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 (int wheel, int stat, int sect, int step) |
Return the first phi track segment in req. chamber/step, MTTF numbering. | |
DTChambPhSegm * | chPhiSegm1 (DTSCTrigUnit *unit, int step) |
Return the first phi track segment in req. chamber/step. | |
DTChambPhSegm * | chPhiSegm1 (DTChamberId sid, int step) |
Return the first 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. | |
DTChambPhSegm * | chPhiSegm2 (DTSCTrigUnit *unit, int step) |
Return the second phi track segment in req. chamber/step. | |
DTChambPhSegm * | chPhiSegm2 (DTChamberId sid, int step) |
Return the second phi track segment in req. chamber/step. | |
DTSectCollPhSegm * | chSectCollPhSegm1 (int wheel, int sect, int step) |
Return the first phi track segment in req. chamber/step, [MTTF numbering & SC step]. | |
DTSectCollPhSegm * | chSectCollPhSegm1 (DTSectColl *unit, int step) |
Return the first 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]. | |
DTSectCollPhSegm * | chSectCollPhSegm2 (DTSectColl *unit, int step) |
Return the second phi 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]. | |
DTSectCollThSegm * | chSectCollThSegm (DTSectColl *unit, int step) |
Return the theta track segment in req. chamber/step [SC step]. | |
DTChambThSegm * | chThetaSegm (int wheel, int stat, int sect, int step) |
Return the theta candidates in req. chamber/step, MTTF numbering. | |
DTChambThSegm * | chThetaSegm (DTSCTrigUnit *unit, int step) |
Return the theta candidates in req. chamber/step. | |
DTChambThSegm * | chThetaSegm (DTChamberId sid, int step) |
Return the theta candidates in req. chamber/step. | |
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. | |
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 (int wheel, int stat, int sect) |
Return a trigger unit - Muon numbering, MTTF numbering. | |
DTSCTrigUnit * | trigUnit (DTChamberId sid) |
Return a trigger unit - Muon 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 (int wheel, int stat, int sect) const |
Return a trigger unit - Muon numbering, MTTF numbering - const version. | |
DTSCTrigUnit * | constTrigUnit (DTChamberId sid) const |
Return a trigger unit - Muon numbering - const version. | |
DTSectColl * | SCUnit (int wheel, int sect) const |
Return a SC Unit Muon Numbering, MTTF numbering - const version. | |
DTSectColl * | SCUnit (DTSectCollId scid) const |
Return a SC unit - Muon numbering - const version. | |
Private Attributes | |
TUcontainer | _cache |
SCcontainer | _cache1 |
const DTConfigManager * | _conf_manager |
unsigned long long | _configid |
bool | _debug |
DTTTrigBaseSync * | _digi_sync |
edm::InputTag | _digitag |
unsigned long long | _geomid |
unsigned long long | _t0id |
unsigned long long | _ttrigid |
bool | _usesyncdb |
Definition at line 54 of file DTTrig.h.
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 55 of file DTTrig.cc.
References _debug, _digi_sync, _digitag, _usesyncdb, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), DBSPlugin::get(), edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().
00055 : 00056 _configid(0) , _geomid(0) , _t0id(0) , _ttrigid(0) { 00057 00058 // Set configuration parameters 00059 // _debug = _conf_manager->getDTTPGDebug(); 00060 _debug = params.getUntrackedParameter<bool>("debug"); // CB FIXME: update when debug will be fully configured from parameter set 00061 00062 if(_debug){ 00063 std::cout << std::endl; 00064 std::cout << "**** Initialization of DTTrigger ****" << std::endl; 00065 std::cout << std::endl; 00066 std::cout << "DTTrig::DTTrig creating synchronizer" << std::endl; 00067 } 00068 00069 _digitag = params.getParameter<edm::InputTag>("digiTag"); 00070 _digi_sync = DTTTrigSyncFactory::get()->create(params.getParameter<std::string>("tTrigMode"), 00071 params.getParameter<edm::ParameterSet>("tTrigModeConfig")); 00072 _usesyncdb = params.getParameter<std::string>("tTrigMode")!="DTTTrigSyncTOFCorr"; 00073 }
DTTrig::~DTTrig | ( | ) |
Destructor.
Definition at line 79 of file DTTrig.cc.
References _digi_sync, and clear().
00079 { 00080 00081 clear(); 00082 delete _digi_sync; //CB check if it is really needed 00083 00084 }
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 539 of file DTTrig.cc.
References _cache, DTCache< T, Coll >::begin(), DTSCTrigUnit::BtiTrigs(), DTCache< T, Coll >::end(), and p.
Referenced by DTTrigTest::analyze().
00539 { 00540 /*check();*/ 00541 std::vector<DTBtiTrigData> trigs; 00542 TU_iterator ptu; 00543 for(ptu=_cache.begin();ptu!=_cache.end();ptu++) { 00544 DTSCTrigUnit* tu = (*ptu).second; 00545 std::vector<DTBtiTrigData>::const_iterator p; //p=0; 00546 std::vector<DTBtiTrigData>::const_iterator peb=tu->BtiTrigs()->end(); 00547 for(p=tu->BtiTrigs()->begin();p!=peb;p++){ 00548 trigs.push_back(*p); 00549 } 00550 } 00551 return trigs; 00552 }
Range DTTrig::cache | ( | ) | [inline] |
SCRange DTTrig::cache1 | ( | ) | [inline] |
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 455 of file DTTrig.cc.
References chPhiSegm1(), and trigUnit().
00455 { 00456 return chPhiSegm1(trigUnit(wheel,stat,sect),step); 00457 // to make it transparent to the outside world 00458 // return chSectCollSegm1(wheel,stat,sect,step); 00459 00460 }
DTChambPhSegm * DTTrig::chPhiSegm1 | ( | DTSCTrigUnit * | unit, | |
int | step | |||
) |
Return the first phi track segment in req. chamber/step.
Definition at line 418 of file DTTrig.cc.
References DTSCTrigUnit::nPhiSegm(), and DTSCTrigUnit::phiSegment().
00418 { 00419 if(unit==0)return 0; 00420 if(unit->nPhiSegm(step)<1)return 0; 00421 return const_cast<DTChambPhSegm*>(unit->phiSegment(step,1)); 00422 }
DTChambPhSegm * DTTrig::chPhiSegm1 | ( | DTChamberId | sid, | |
int | step | |||
) |
Return the first phi track segment in req. chamber/step.
Definition at line 439 of file DTTrig.cc.
References trigUnit().
Referenced by chPhiSegm1().
00439 { 00440 return chPhiSegm1(trigUnit(sid),step); 00441 }
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 463 of file DTTrig.cc.
References chPhiSegm2(), and trigUnit().
00463 { 00464 // if(stat==4&&(sect==3||sect==9)) { 00465 // if hrizontal chambers of MB4 get first track of twin chamber (flag=1) 00466 // return chPhiSegm1(trigUnit(wheel,stat,sect,1),step); 00467 // } else { 00468 return chPhiSegm2(trigUnit(wheel,stat,sect),step); 00469 // to make it transparent to the outside world 00470 // return chSectCollSegm2(wheel,stat,sect,step); 00471 //} 00472 }
DTChambPhSegm * DTTrig::chPhiSegm2 | ( | DTSCTrigUnit * | unit, | |
int | step | |||
) |
Return the second phi track segment in req. chamber/step.
Definition at line 425 of file DTTrig.cc.
References DTSCTrigUnit::nPhiSegm(), and DTSCTrigUnit::phiSegment().
00425 { 00426 if(unit==0)return 0; 00427 if(unit->nPhiSegm(step)<2)return 0; 00428 return const_cast<DTChambPhSegm*>(unit->phiSegment(step,2)); 00429 }
DTChambPhSegm * DTTrig::chPhiSegm2 | ( | DTChamberId | sid, | |
int | step | |||
) |
Return the second phi track segment in req. chamber/step.
Definition at line 444 of file DTTrig.cc.
References trigUnit().
Referenced by chPhiSegm2().
00444 { 00445 return chPhiSegm2(trigUnit(sid),step); 00446 }
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 498 of file DTTrig.cc.
References chSectCollPhSegm1(), and SCUnit().
00498 { 00499 00500 return chSectCollPhSegm1(SCUnit(wheel,sect),step); 00501 }
DTSectCollPhSegm * DTTrig::chSectCollPhSegm1 | ( | DTSectColl * | unit, | |
int | step | |||
) |
Return the first phi track segment in req. chamber/step [SC step].
Definition at line 482 of file DTTrig.cc.
References DTSectColl::nSegmPh(), and DTSectColl::SectCollPhSegment().
Referenced by chSectCollPhSegm1().
00482 { 00483 00484 if(unit==0)return 0; 00485 if(unit->nSegmPh(step)<1)return 0; 00486 return const_cast<DTSectCollPhSegm*>(unit->SectCollPhSegment(step,1)); 00487 }
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 504 of file DTTrig.cc.
References chSectCollPhSegm2(), and SCUnit().
00504 { 00505 // if(stat==4&&(sect==3||sect==9)) { 00506 // if hrizontal chambers of MB4 get first track of twin chamber (flag=1) 00507 //return chSectCollSegm1(trigUnit(wheel,stat,sect,1),step); 00508 //} else { 00509 return chSectCollPhSegm2(SCUnit(wheel,sect),step); 00510 //} 00511 }
DTSectCollPhSegm * DTTrig::chSectCollPhSegm2 | ( | DTSectColl * | unit, | |
int | step | |||
) |
Return the second phi track segment in req. chamber/step [SC step].
Definition at line 490 of file DTTrig.cc.
References DTSectColl::nSegmPh(), and DTSectColl::SectCollPhSegment().
Referenced by chSectCollPhSegm2().
00490 { 00491 if(unit==0)return 0; 00492 if(unit->nSegmPh(step)<2)return 0; 00493 return const_cast<DTSectCollPhSegm*>(unit->SectCollPhSegment(step,2)); 00494 }
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 522 of file DTTrig.cc.
References chSectCollThSegm(), and SCUnit().
00522 { 00523 00524 return chSectCollThSegm(SCUnit(wheel,sect),step); 00525 }
DTSectCollThSegm * DTTrig::chSectCollThSegm | ( | DTSectColl * | unit, | |
int | step | |||
) |
Return the theta track segment in req. chamber/step [SC step].
Definition at line 514 of file DTTrig.cc.
References DTSectColl::nSegmTh(), and DTSectColl::SectCollThSegment().
Referenced by chSectCollThSegm().
00514 { 00515 00516 if(unit==0)return 0; 00517 if(unit->nSegmTh(step)<1)return 0; 00518 return const_cast<DTSectCollThSegm*>(unit->SectCollThSegment(step)); 00519 }
DTChambThSegm * DTTrig::chThetaSegm | ( | int | wheel, | |
int | stat, | |||
int | sect, | |||
int | step | |||
) |
Return the theta candidates in req. chamber/step, MTTF numbering.
Definition at line 475 of file DTTrig.cc.
References chThetaSegm(), and trigUnit().
00475 { 00476 if(stat==4)return 0; 00477 return chThetaSegm(trigUnit(wheel,stat,sect),step); 00478 }
DTChambThSegm * DTTrig::chThetaSegm | ( | DTSCTrigUnit * | unit, | |
int | step | |||
) |
Return the theta candidates in req. chamber/step.
Definition at line 432 of file DTTrig.cc.
References DTSCTrigUnit::nThetaSegm(), and DTSCTrigUnit::thetaSegment().
00432 { 00433 if(unit==0)return 0; 00434 if(unit->nThetaSegm(step)<1)return 0; 00435 return const_cast<DTChambThSegm*>(unit->thetaSegment(step,1)); 00436 }
DTChambThSegm * DTTrig::chThetaSegm | ( | DTChamberId | sid, | |
int | step | |||
) |
Return the theta candidates in req. chamber/step.
Definition at line 449 of file DTTrig.cc.
References DTChamberId::station(), and trigUnit().
Referenced by chThetaSegm().
00449 { 00450 if(sid.station()==4)return 0; 00451 return chThetaSegm(trigUnit(sid),step); 00452 }
Clear the trigger units cache.
Definition at line 343 of file DTTrig.cc.
References _cache, _cache1, and it.
Referenced by ~DTTrig().
00343 { 00344 // Delete the map 00345 for (TU_iterator it=_cache.begin();it!=_cache.end();it++){ 00346 // Delete all the trigger units 00347 delete (*it).second; 00348 } 00349 _cache.clear(); 00350 00351 for (SC_iterator it=_cache1.begin();it!=_cache1.end();it++){ 00352 // Delete all the Sector Collectors 00353 delete (*it).second; 00354 } 00355 _cache1.clear(); 00356 00357 }
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().
00219 { 00220 return constTrigUnit(trig->ChamberId())->CMSDirection(trig); 00221 }
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().
00209 { 00210 return constTrigUnit(trig->ChamberId())->CMSPosition(trig); 00211 }
DTSCTrigUnit * DTTrig::constTrigUnit | ( | int | wheel, | |
int | stat, | |||
int | sect | |||
) | const [private] |
Return a trigger unit - Muon numbering, MTTF numbering - const version.
Definition at line 410 of file DTTrig.cc.
References constTrigUnit().
00410 { 00411 sect++; // offset 1 for sector number ([0,11] --> [1,12]) 00412 return constTrigUnit(DTChamberId(wheel,stat,sect)); 00413 00414 }
DTSCTrigUnit * DTTrig::constTrigUnit | ( | DTChamberId | sid | ) | const [private] |
Return a trigger unit - Muon numbering - const version.
Definition at line 368 of file DTTrig.cc.
References _cache, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), it, DTChamberId::sector(), DTChamberId::station(), and DTChamberId::wheel().
Referenced by CMSDirection(), CMSPosition(), constTrigUnit(), localDirection(), localPosition(), print(), and trigUnit().
00368 { 00369 // std::cout << " SC: running DTTrig::constTrigUnit(DTChamberId chid)" << std::endl; 00370 TU_const_iterator it = _cache.find(chid); 00371 if ( it == _cache.end()) { 00372 std::cout << "DTTrig::trigUnit: Trigger Unit not in the map: "; 00373 std::cout << " wheel=" << chid.wheel() ; 00374 std::cout << ", station=" << chid.station(); 00375 std::cout << ", sector=" << chid.sector(); 00376 std::cout << std::endl; 00377 return 0; 00378 } 00379 00380 return (*it).second; 00381 }
void DTTrig::createTUs | ( | const edm::EventSetup & | iSetup | ) |
Create the trigger units and store them in the cache.
Definition at line 87 of file DTTrig.cc.
References _cache, _cache1, _debug, _digi_sync, DTSectColl::addTU(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), edm::EventSetup::get(), DTChamber::id(), it, it1, DTChamberId::sector(), DTSectCollId::sector(), DTSectCollId::wheel(), and DTChamberId::wheel().
Referenced by DTTrigProd::beginRun(), and DTTrigTest::beginRun().
00087 { 00088 00089 // build up Sector Collectors and then 00090 // build the trrigger units (one for each chamber) 00091 for(int iwh=-2;iwh<=2;iwh++){ 00092 for(int ise=1;ise<=12;ise++){ 00093 if(_debug){ 00094 std::cout << "calling sectcollid wh sc " << iwh << " " << ise << std::endl;} 00095 DTSectCollId scid(iwh,ise); 00096 SC_iterator it = _cache1.find(scid); 00097 if ( it != _cache1.end()) { 00098 std::cout << "DTTrig::createTUs: Sector Collector unit already exists"<<std::endl; 00099 continue; 00100 } 00101 // add a sector collector to the map 00102 // SCConf_iterator scit = _scconf.find(scid); 00103 //edm::ParameterSet sc_pset = _conf_pset.getParameter<edm::ParameterSet>("SectCollParameters"); 00104 DTSectColl* sc; 00105 //sc = new DTSectColl(sc_pset); 00106 sc = new DTSectColl(scid); 00107 00108 // if ( scit != _scconf.end()){ 00109 // sc = new DTSectColl( (*scit).second); 00110 // } 00111 // else { 00112 // std::cout << "DTTrig::createTUs: SC config file does not exist. Using default one"; 00113 // sc = new DTSectColl(config()); 00114 // } 00115 if(_debug){ 00116 std::cout << " DTTrig::createTUs new SC sc = " << sc 00117 << " at scid.sector() " << scid.sector() 00118 << " at scid.wheel() " << scid.wheel() 00119 << std::endl; 00120 } 00121 _cache1[scid] = sc; 00122 } 00123 } 00124 00125 edm::ESHandle<DTGeometry>pDD; 00126 iSetup.get<MuonGeometryRecord>().get(pDD); 00127 for (std::vector<DTChamber*>::const_iterator ich=pDD->chambers().begin(); ich!=pDD->chambers().end();ich++){ 00128 00129 DTChamber* chamb = (*ich); 00130 DTChamberId chid = chamb->id(); 00131 TU_iterator it = _cache.find(chid); 00132 if ( it != _cache.end()) { 00133 std::cout << "DTTrig::init: Trigger unit already exists" << std::endl; 00134 continue; 00135 } 00136 // Conf_iterator cit = _truconf.find(chid); 00137 // if ( cit == _truconf.end()) { 00138 // std::cout << "DTTrig::init: Local Config File not found using default config" << std::endl; 00139 // DTSCTrigUnit* tru = new DTSCTrigUnit(chamb,config()); 00140 // _cache[chid] = tru; 00141 // continue; 00142 // } 00143 00144 // add a trigger unit to the map with a link to the station 00145 //edm::ParameterSet tu_pset = _conf_pset.getParameter<edm::ParameterSet>("TUParameters"); 00146 //DTSCTrigUnit* tru = new DTSCTrigUnit(chamb,tu_pset); 00147 DTSCTrigUnit* tru = new DTSCTrigUnit(chamb,_digi_sync); 00148 _cache[chid] = tru; 00149 00150 //----------- add TU to corresponding SC 00151 // returning correspondent SC id 00152 DTSectCollId scid; 00153 if(chid.sector()==13) { 00154 scid = DTSectCollId(chid.wheel(), 4);} 00155 else if(chid.sector()==14) { 00156 scid = DTSectCollId(chid.wheel(), 10);} 00157 else { 00158 scid = DTSectCollId(chid.wheel(), chid.sector() );} 00159 00160 SC_iterator it1 = _cache1.find(scid); 00161 00162 if ( it1 != _cache1.end()) { 00163 00164 DTSectColl* sc = (*it1).second; 00165 if(_debug) { 00166 std::cout << "DTTrig::init: adding TU in SC << " 00167 << " sector = " << scid.sector() 00168 << " wheel = " << scid.wheel() 00169 << std::endl;} 00170 sc->addTU(tru); 00171 } 00172 else { 00173 std::cout << "DTTrig::createTUs: Trigger Unit not in the map: "; 00174 } 00175 00176 } 00177 00178 }
void DTTrig::dumpGeom | ( | ) |
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 181 of file DTTrig.h.
References _conf_manager, and DTConfigManager::getBXOffset().
Referenced by DTTrigProd::produce().
00181 { return _conf_manager->getBXOffset(); }
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().
00214 { 00215 return constTrigUnit(trig->ChamberId())->localDirection(trig); 00216 }
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().
00204 { 00205 return constTrigUnit(trig->ChamberId())->localPosition(trig); 00206 }
void DTTrig::print | ( | DTTrigData * | trig | ) | const [inline] |
Print a trigger-data object.
Definition at line 224 of file DTTrig.h.
References DTTrigData::ChamberId(), and constTrigUnit().
00224 { 00225 constTrigUnit(trig->ChamberId())->print(trig); 00226 }
std::vector< DTSectCollPhSegm > DTTrig::SCPhTrigs | ( | ) |
Return a copy of all the Sector Collector (Phi) triggers.
Definition at line 603 of file DTTrig.cc.
References _cache1, DTSectColl::beginPh(), DTSectColl::endPh(), and p.
Referenced by DTTrigTest::analyze(), and DTTrigProd::produce().
00603 { 00604 /*check();*/ 00605 std::vector<DTSectCollPhSegm> trigs; 00606 // SC_iterator ptu; 00607 SC_iterator psc; 00608 for(psc=_cache1.begin();psc!=_cache1.end();psc++) { 00609 // DTSCTrigUnit* tu = (*ptu).second; 00610 // 00611 // old SMDB: 00612 // DTSectColl* tu = (*ptu).second; 00613 // std::vector<DTChambPhSegm>::const_iterator p=0; 00614 // std::vector<DTChambPhSegm>::const_iterator peb=tu->SCTrigs()->end(); 00615 // for(p=tu->SCTrigs()->begin();p!=peb;p++){ 00616 // trigs.push_back(*p); 00617 // } 00618 00619 DTSectColl* sc = (*psc).second; 00620 std::vector<DTSectCollPhSegm>::const_iterator p; 00621 std::vector<DTSectCollPhSegm>::const_iterator peb=sc->endPh(); 00622 for(p=sc->beginPh();p!=peb;p++){ 00623 trigs.push_back(*p); 00624 } 00625 00626 } 00627 return trigs; 00628 }
std::vector< DTSectCollThSegm > DTTrig::SCThTrigs | ( | ) |
Return a copy of all the Sector Collector (Theta) triggers.
Definition at line 632 of file DTTrig.cc.
References _cache1, DTSectColl::beginTh(), DTSectColl::endTh(), and p.
Referenced by DTTrigTest::analyze(), and DTTrigProd::produce().
00632 { 00633 /*check();*/ 00634 std::vector<DTSectCollThSegm> trigs; 00635 SC_iterator psc; 00636 for(psc=_cache1.begin();psc!=_cache1.end();psc++) { 00637 DTSectColl* sc = (*psc).second; 00638 std::vector<DTSectCollThSegm>::const_iterator p; //p=0; 00639 std::vector<DTSectCollThSegm>::const_iterator peb=sc->endTh(); 00640 for(p=sc->beginTh();p!=peb;p++){ 00641 trigs.push_back(*p); 00642 } 00643 00644 } 00645 return trigs; 00646 }
DTSectColl * DTTrig::SCUnit | ( | int | wheel, | |
int | sect | |||
) | const [private] |
DTSectColl * DTTrig::SCUnit | ( | DTSectCollId | scid | ) | const [private] |
Return a SC unit - Muon numbering - const version.
Definition at line 384 of file DTTrig.cc.
References _cache1, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), it, DTSectCollId::sector(), and DTSectCollId::wheel().
Referenced by chSectCollPhSegm1(), chSectCollPhSegm2(), chSectCollThSegm(), and SCUnit().
00384 { 00385 SC_const_iterator it = _cache1.find(scid); 00386 if ( it == _cache1.end()) { 00387 std::cout << "DTTrig::SCUnit: Trigger Unit not in the map: "; 00388 std::cout << " wheel=" << scid.wheel() ; 00389 std::cout << ", sector=" << scid.sector(); 00390 std::cout << std::endl; 00391 return 0; 00392 } 00393 00394 return (*it).second; 00395 }
int DTTrig::size1 | ( | ) | [inline] |
std::vector< DTTracoTrigData > DTTrig::TracoTrigs | ( | ) |
Return a copy of all the TRACO triggers.
Definition at line 555 of file DTTrig.cc.
References _cache, DTCache< T, Coll >::begin(), DTCache< T, Coll >::end(), p, and DTSCTrigUnit::TracoTrigs().
Referenced by DTTrigTest::analyze().
00555 { 00556 std::vector<DTTracoTrigData> trigs; 00557 TU_iterator ptu; 00558 /*check();*/ 00559 for(ptu=_cache.begin();ptu!=_cache.end();ptu++) { 00560 DTSCTrigUnit* tu = (*ptu).second; 00561 std::vector<DTTracoTrigData>::const_iterator p; //p=0; 00562 std::vector<DTTracoTrigData>::const_iterator peb=tu->TracoTrigs()->end(); 00563 for(p=tu->TracoTrigs()->begin();p!=peb;p++){ 00564 trigs.push_back(*p); 00565 } 00566 } 00567 return trigs; 00568 }
void DTTrig::triggerReco | ( | const edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup | |||
) |
Run the whole trigger reconstruction chain.
Definition at line 182 of file DTTrig.cc.
References _cache, _cache1, _digitag, DTSCTrigUnit::BtiTrigs(), DTSuperLayerId::chamberId(), DTCache< T, Coll >::clearCache(), DTTracoCard::clearCache(), DTBtiCard::clearCache(), DTSectColl::clearCache(), edm::Event::getByLabel(), DTSectColl::getTSPhi(), DTSectColl::getTSTheta(), i, it, range, 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().
00182 { 00183 00184 updateES(iSetup); 00185 00186 DTDigiMap digiMap; 00187 //Sort digis by chamber so they can be used by BTIs 00188 edm::Handle<DTDigiCollection> dtDigis; 00189 iEvent.getByLabel(_digitag, dtDigis); 00190 DTDigiCollection::DigiRangeIterator detUnitIt; 00191 00192 for (detUnitIt=dtDigis->begin(); 00193 detUnitIt!=dtDigis->end(); 00194 ++detUnitIt){ 00195 const DTLayerId& layId = (*detUnitIt).first; 00196 const DTChamberId chambId=layId.superlayerId().chamberId(); 00197 const DTDigiCollection::Range& range = (*detUnitIt).second; 00198 // DTDigiCollection tmpDTDigiColl; 00199 //tmpDTDigiColl.put(range,layId); 00200 digiMap[chambId].put(range,layId); 00201 // const DTDigiCollection::Range& range = (*detUnitIt).second; 00202 // for (DTDigiCollection::const_iterator digiIt = range.first; 00203 // digiIt!=range.second; 00204 // ++digiIt){ 00205 // DTDigiCollection tmp; 00206 00207 // digiMap[chambId].push_back((*digiIt)); 00208 // } 00209 } 00210 00211 // CB the commented because we don't use config()->debug() anymore in future will probably be possible to avoid the digis sorting 00212 // if(config()->debug()>2){ 00213 // std::cout << "----------DTDigis ordered by chamber:" << std::endl; 00214 // for (DTDigiMap_const_iterator digiMapIt=digiMap.begin(); 00215 // digiMapIt!=digiMap.end(); 00216 // digiMapIt++){ 00217 // DTChamberId chambId = (*digiMapIt).first; 00218 // DTDigiCollection digis = (*digiMapIt).second; 00219 // std::cout << "Chamber id " << chambId << std::endl; 00220 // DTDigiCollection::DigiRangeIterator RangeIt; 00221 // for (RangeIt=digis.begin(); 00222 // RangeIt!=digis.end(); 00223 // RangeIt++){ 00224 // std::cout << "Digi's layer " << (*RangeIt).first << std::endl; 00225 // const DTDigiCollection::Range& range = (*RangeIt).second; 00226 // for (DTDigiCollection::const_iterator digiIt = range.first; 00227 // digiIt!=range.second; 00228 // ++digiIt){ 00229 // std::cout << "Digi's data " << (*digiIt) << std::endl; 00230 // } 00231 00232 00233 // } 00234 // } 00235 // } 00236 00237 //Run reconstruct for single trigger subsystem (Bti, Traco TS) 00238 for (TU_iterator it=_cache.begin();it!=_cache.end();it++){ 00239 DTSCTrigUnit* thisTU=(*it).second; 00240 if (thisTU->BtiTrigs()->size()>0){ 00241 thisTU->BtiTrigs()->clearCache(); 00242 thisTU->TSThTrigs()->clearCache(); 00243 thisTU->TracoTrigs()->clearCache(); 00244 thisTU->TSPhTrigs()->clearCache(); 00245 } 00246 DTChamberId chid=thisTU->statId(); 00247 DTDigiMap_iterator dmit = digiMap.find(chid); 00248 if (dmit !=digiMap.end()){ 00249 thisTU->BtiTrigs()->reconstruct((*dmit).second); 00250 if(thisTU->BtiTrigs()->size()>0){ 00251 thisTU->TSThTrigs()->reconstruct(); 00252 thisTU->TracoTrigs()->reconstruct(); 00253 if(thisTU->TracoTrigs()->size()>0) 00254 thisTU->TSPhTrigs()->reconstruct(); 00255 } 00256 } 00257 } 00258 //Run reconstruct for Sector Collector 00259 for (SC_iterator it=_cache1.begin();it!=_cache1.end();it++){ 00260 DTSectColl* sectcoll = (*it).second; 00261 DTSectCollId scid = (*it).first; 00262 if (sectcoll->sizePh()>0 || sectcoll->sizeTh()>0) 00263 sectcoll->clearCache(); 00264 bool mustreco = false; 00265 for (int i=1;i<5;i++) { 00266 if (sectcoll->getTSPhi(i)->size()>0) { 00267 mustreco = true; 00268 break; 00269 } 00270 } 00271 for (int i=1;i<4;i++) { 00272 if (sectcoll->getTSTheta(i)->size()>0) { 00273 mustreco = true; 00274 break; 00275 } 00276 } 00277 if (scid.sector()==4 || scid.sector()==10){ 00278 if (sectcoll->getTSPhi(5)->size()>0) 00279 mustreco = true; 00280 } 00281 if (mustreco) 00282 sectcoll->reconstruct(); 00283 } 00284 00285 }
DTSCTrigUnit * DTTrig::trigUnit | ( | int | wheel, | |
int | stat, | |||
int | sect | |||
) |
Return a trigger unit - Muon numbering, MTTF numbering.
Definition at line 398 of file DTTrig.cc.
References constTrigUnit().
00398 { 00399 return constTrigUnit(wheel, stat, sect); 00400 }
DTSCTrigUnit * DTTrig::trigUnit | ( | DTChamberId | sid | ) |
Return a trigger unit - Muon numbering.
Definition at line 360 of file DTTrig.cc.
References constTrigUnit().
Referenced by chPhiSegm1(), chPhiSegm2(), and chThetaSegm().
00360 { 00361 /*check();*/ return constTrigUnit(chid); 00362 00363 }
std::vector< DTChambPhSegm > DTTrig::TSPhTrigs | ( | ) |
Return a copy of all the Trigger Server (Phi) triggers.
Definition at line 571 of file DTTrig.cc.
References _cache, DTCache< T, Coll >::begin(), DTCache< T, Coll >::end(), p, and DTSCTrigUnit::TSPhTrigs().
Referenced by DTTrigTest::analyze().
00571 { 00572 /*check();*/ 00573 std::vector<DTChambPhSegm> trigs; 00574 TU_iterator ptu; 00575 for(ptu=_cache.begin();ptu!=_cache.end();ptu++) { 00576 DTSCTrigUnit* tu = (*ptu).second; 00577 std::vector<DTChambPhSegm>::const_iterator p; //p=0; 00578 std::vector<DTChambPhSegm>::const_iterator peb=tu->TSPhTrigs()->end(); 00579 for(p=tu->TSPhTrigs()->begin();p!=peb;p++){ 00580 trigs.push_back(*p); 00581 } 00582 } 00583 return trigs; 00584 }
std::vector< DTChambThSegm > DTTrig::TSThTrigs | ( | ) |
Return a copy of all the Trigger Server (Theta) triggers.
Definition at line 587 of file DTTrig.cc.
References _cache, DTCache< T, Coll >::begin(), DTCache< T, Coll >::end(), p, and DTSCTrigUnit::TSThTrigs().
Referenced by DTTrigTest::analyze().
00587 { 00588 /*check();*/ 00589 std::vector<DTChambThSegm> trigs; 00590 TU_iterator ptu; 00591 for(ptu=_cache.begin();ptu!=_cache.end();ptu++) { 00592 DTSCTrigUnit* tu = (*ptu).second; 00593 std::vector<DTChambThSegm>::const_iterator p; //p=0; 00594 std::vector<DTChambThSegm>::const_iterator peb=tu->TSThTrigs()->end(); 00595 for(p=tu->TSThTrigs()->begin();p!=peb;p++){ 00596 trigs.push_back(*p); 00597 } 00598 } 00599 return trigs; 00600 }
void DTTrig::updateES | ( | const edm::EventSetup & | iSetup | ) |
update the eventsetup info
Definition at line 288 of file DTTrig.cc.
References _cache, _cache1, _conf_manager, _configid, _debug, _digi_sync, _geomid, _t0id, _ttrigid, _usesyncdb, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), edm::EventSetup::get(), it, edm::ESHandle< T >::product(), and DTTTrigBaseSync::setES().
Referenced by triggerReco().
00288 { 00289 00290 // Check for updatets in config 00291 edm::ESHandle<DTConfigManager> confHandle; 00292 edm::ESHandle<DTGeometry> geomHandle; 00293 edm::ESHandle<DTT0> t0Handle; 00294 edm::ESHandle<DTTtrig> ttrigHandle; 00295 00296 if (iSetup.get<DTConfigManagerRcd>().cacheIdentifier()!=_configid) { 00297 00298 if (_debug) 00299 std::cout << "DTTrig::updateES updating DTTPG configuration" << std::endl; 00300 00301 _configid = iSetup.get<DTConfigManagerRcd>().cacheIdentifier(); 00302 iSetup.get<DTConfigManagerRcd>().get(confHandle); 00303 _conf_manager = confHandle.product(); 00304 for (TU_iterator it=_cache.begin();it!=_cache.end();it++){ 00305 (*it).second->setConfig(_conf_manager); 00306 } 00307 for (SC_iterator it=_cache1.begin();it!=_cache1.end();it++){ 00308 (*it).second->setConfig(_conf_manager); 00309 } 00310 00311 } 00312 00313 if (iSetup.get<MuonGeometryRecord>().cacheIdentifier()!=_configid) { 00314 00315 if (_debug) 00316 std::cout << "DTTrig::updateES updating muon geometry" << std::endl; 00317 00318 _geomid = iSetup.get<MuonGeometryRecord>().cacheIdentifier(); 00319 iSetup.get<MuonGeometryRecord>().get(geomHandle); 00320 for (TU_iterator it=_cache.begin();it!=_cache.end();it++){ 00321 (*it).second->setGeom(geomHandle->chamber((*it).second->statId())); 00322 } 00323 00324 } 00325 00326 if (_usesyncdb && 00327 (iSetup.get<DTT0Rcd>().cacheIdentifier()!=_t0id || 00328 iSetup.get<DTTtrigRcd>().cacheIdentifier()!=_ttrigid)) { 00329 00330 if (_debug) 00331 std::cout << "DTTrig::updateES updating synchronizer" << std::endl; 00332 00333 _t0id = iSetup.get<DTT0Rcd>().cacheIdentifier(); 00334 _ttrigid = iSetup.get<DTTtrigRcd>().cacheIdentifier(); 00335 _digi_sync->setES(iSetup); 00336 00337 } 00338 00339 }
TUcontainer DTTrig::_cache [private] |
Definition at line 245 of file DTTrig.h.
Referenced by begin(), BtiTrigs(), cache(), clear(), constTrigUnit(), createTUs(), dumpGeom(), end(), find(), size(), TracoTrigs(), triggerReco(), TSPhTrigs(), TSThTrigs(), and updateES().
SCcontainer DTTrig::_cache1 [private] |
Definition at line 246 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] |
unsigned long long DTTrig::_configid [private] |
bool DTTrig::_debug [private] |
DTTTrigBaseSync* DTTrig::_digi_sync [private] |
Definition at line 248 of file DTTrig.h.
Referenced by createTUs(), DTTrig(), updateES(), and ~DTTrig().
edm::InputTag DTTrig::_digitag [private] |
unsigned long long DTTrig::_geomid [private] |
unsigned long long DTTrig::_t0id [private] |
unsigned long long DTTrig::_ttrigid [private] |
bool DTTrig::_usesyncdb [private] |