51 _inputexist(
true) , _configid(0) , _geomid(0) {
58 std::cout <<
"**** Initialization of DTTrigger ****" << std::endl;
80 for(
int iwh=-2;iwh<=2;iwh++){
81 for(
int ise=1;ise<=12;ise++){
83 std::cout <<
"calling sectcollid wh sc " << iwh <<
" " << ise << std::endl;}
88 std::cout <<
"DTTrig::createTUs: Sector Collector unit already exists"<<std::endl;
95 std::cout <<
" DTTrig::createTUs new SC sc = " << sc
96 <<
" at scid.sector() " << scid.
sector()
97 <<
" at scid.wheel() " << scid.
wheel()
106 for (std::vector<const DTChamber*>::const_iterator ich=dtGeom->
chambers().begin(); ich!=dtGeom->
chambers().end();ich++){
111 if ( it !=
_cache.end()) {
112 if (
_debug)
std::cout <<
"DTTrig::init: Trigger unit already exists" << std::endl;
124 else if(chid.
sector()==14) {
135 std::cout <<
"DTTrig::init: adding TU in SC << " 136 <<
" sector = " << scid.
sector()
137 <<
" wheel = " << scid.
wheel()
143 std::cout <<
"DTTrig::createTUs: Trigger Unit not in the map: ";
164 <<
"DTTrig::triggerReco DTDigiCollection with input tag " <<
_digitag 165 <<
"requested in configuration, but not found in the event." << std::endl;
172 for (detUnitIt=dtDigis->begin();
173 detUnitIt!=dtDigis->end();
176 const DTLayerId& layId = (*detUnitIt).first;
179 digiMap[chambId].put(range,layId);
194 if (dmit !=digiMap.end()){
210 bool mustreco =
false;
211 for (
int i=1;
i<5;
i++) {
217 for (
int i=1;
i<4;
i++) {
243 std::cout <<
"DTTrig::updateES updating DTTPG configuration" << std::endl;
260 std::cout <<
"DTTrig::updateES updating muon geometry" << std::endl;
265 (*it).second->setGeom(geomHandle->
chamber((*it).second->statId()));
302 if ( it ==
_cache.end()) {
303 std::cout <<
"DTTrig::trigUnit: Trigger Unit not in the map: ";
318 std::cout <<
"DTTrig::SCUnit: Trigger Unit not in the map: ";
350 if(unit==
nullptr)
return nullptr;
351 if(unit->
nPhiSegm(step)<1)
return nullptr;
357 if(unit==
nullptr)
return nullptr;
358 if(unit->
nPhiSegm(step)<2)
return nullptr;
364 if(unit==
nullptr)
return nullptr;
381 if(sid.
station()==4)
return nullptr;
407 if(stat==4)
return nullptr;
415 if(unit==
nullptr)
return nullptr;
416 if(unit->
nSegmPh(step)<1)
return nullptr;
422 if(unit==
nullptr)
return nullptr;
423 if(unit->
nSegmPh(step)<2)
return nullptr;
447 if(unit==
nullptr)
return nullptr;
448 if(unit->
nSegmTh(step)<1)
return nullptr;
488 std::vector<DTBtiTrigData>
491 std::vector<DTBtiTrigData> trigs;
495 std::vector<DTBtiTrigData>::const_iterator
p;
496 std::vector<DTBtiTrigData>::const_iterator peb=tu->
BtiTrigs()->
end();
504 std::vector<DTTracoTrigData>
506 std::vector<DTTracoTrigData> trigs;
511 std::vector<DTTracoTrigData>::const_iterator
p;
512 std::vector<DTTracoTrigData>::const_iterator peb=tu->
TracoTrigs()->
end();
520 std::vector<DTChambPhSegm>
523 std::vector<DTChambPhSegm> trigs;
527 std::vector<DTChambPhSegm>::const_iterator
p;
528 std::vector<DTChambPhSegm>::const_iterator peb=tu->
TSPhTrigs()->
end();
536 std::vector<DTChambThSegm>
539 std::vector<DTChambThSegm> trigs;
543 std::vector<DTChambThSegm>::const_iterator
p;
544 std::vector<DTChambThSegm>::const_iterator peb=tu->
TSThTrigs()->
end();
552 std::vector<DTSectCollPhSegm>
555 std::vector<DTSectCollPhSegm> trigs;
570 std::vector<DTSectCollPhSegm>::const_iterator
p;
571 std::vector<DTSectCollPhSegm>::const_iterator peb=sc->
endPh();
572 for(p=sc->
beginPh();p!=peb;p++){
581 std::vector<DTSectCollThSegm>
584 std::vector<DTSectCollThSegm> trigs;
588 std::vector<DTSectCollThSegm>::const_iterator
p;
589 std::vector<DTSectCollThSegm>::const_iterator peb=sc->
endTh();
590 for(p=sc->
beginTh();p!=peb;p++){
int sizePh()
Return Phi cache size.
void reconstruct() override
Load BTIs triggers and run TSTheta algoritm.
virtual void reconstruct(const DTDigiCollection dtDigis)
void clearCache()
Clear all traco stuff (cache & map)
T getParameter(std::string const &) const
unsigned long long cacheIdentifier() const
T getUntrackedParameter(std::string const &, T const &) const
const DTChambThSegm * thetaSegment(int step, int n)
Return output segments, theta view.
SCcontainer::iterator SC_iterator
void dumpLUTParam(DTChamberId &chambid) const
Dump luts string commands from configuration parameters.
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
void reconstruct() override
Load Trigger Units triggers and run Sector Collector algorithm.
void reconstruct() override
Load TRACO triggers and run TSPhi algorithm.
std::vector< DTSectCollPhSegm >::const_iterator endPh()
Return iterator to the end of Phi cache.
DTSectColl * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
DTChamberId chamberId() const
Return the corresponding ChamberId.
DTTSTheta * TSThTrigs() const
Return the chamber Trigger Server (Theta)
void clearCache()
Clear all BTI stuff (map & cache)
DTChambPhSegm * chPhiSegm2(DTChamberId sid, int step)
Return the second phi track segment in req. chamber/step.
int sizeTh()
Return Theta cache size.
int nSegmTh(int step)
Return number of DTSectCollTheta segments (SC step)
DTTrig(const edm::ParameterSet ¶ms, edm::ConsumesCollector &&ix)
Constructors.
DTTSPhi * TSPhTrigs() const
Return the chamber Trigger Server (Phi)
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
void reconstruct() override
Load BTIs triggers and run TRACOs algorithm.
TUcontainer::iterator TU_iterator
DTSectCollPhSegm * chSectCollPhSegm1(DTSectColl *unit, int step)
Return the first phi track segment in req. chamber/step [SC step].
DTChambPhSegm * chPhiSegm1(DTChamberId sid, int step)
Return the first phi track segment in req. chamber/step.
unsigned long long _geomid
std::vector< DTSectCollPhSegm > SCPhTrigs()
Return a copy of all the Sector Collector (Phi) triggers.
void dumpLUT(short int btic) const
Dump the Lut file.
DTBtiCard * BtiTrigs() const
Return container of BTI triggers.
int nSegmPh(int step)
Return number of DTSectCollPhi segments (SC step)
void updateES(const edm::EventSetup &iSetup)
update the eventsetup info
DTChamberId id() const
Return the DTChamberId of this chamber.
void triggerReco(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Run the whole trigger reconstruction chain.
DTSCTrigUnit * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
void dumpGeom()
Dump the geometry.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
DTSectCollPhSegm * chSectCollPhSegm2(DTSectColl *unit, int step)
Return the second phi track segment in req. chamber/step [SC step].
DTDigiMap::iterator DTDigiMap_iterator
TUcontainer::const_iterator TU_const_iterator
std::vector< DTChambThSegm > TSThTrigs()
Return a copy of all the Trigger Server (Theta) triggers.
void addTU(DTSCTrigUnit *tru)
Add a Trigger Unit to the Sector Collector.
std::vector< DTSectCollThSegm >::const_iterator beginTh()
Return iterator to the begni of Theta cache.
void dumpLuts(short int lut_btic, const DTConfigManager *conf)
Dump the LUT files.
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
std::vector< DTTracoTrigData > TracoTrigs()
Return a copy of all the TRACO triggers.
DTTracoCard * TracoTrigs() const
Return container of TRACO triggers.
const DTSectCollThSegm * SectCollThSegment(int step)
Return requested Sector Collector Theta Segment.
std::vector< DTSectCollThSegm >::const_iterator endTh()
Return iterator to the end of Theta cache.
const_iterator begin() const
Get first cache element.
DTChambThSegm * chThetaSegm(DTChamberId sid, int step)
Return the theta candidates in req. chamber/step.
void clearCache()
Local position in chamber of a trigger-data object.
std::map< DTChamberId, DTDigiCollection, std::less< DTChamberId > > DTDigiMap
const DTConfigManager * _conf_manager
DTChamberId statId() const
Identifier of the associated chamber.
std::vector< DTSectCollPhSegm >::const_iterator beginPh()
Return iterator to the beghin of Phi cache.
const DTSectCollPhSegm * SectCollPhSegment(int step, unsigned n)
Return requested Sector Collector Phi Segment 1st/2nd.
DTSectCollThSegm * chSectCollThSegm(DTSectColl *unit, int step)
Return the theta track segment in req. chamber/step [SC step].
std::pair< const_iterator, const_iterator > Range
const DTChambPhSegm * phiSegment(int step, int n)
Return output segments, phi view.
int nPhiSegm(int step)
Number of Phi segments for a given step.
int station() const
Return the station number.
int wheel() const
Return the wheel number.
const_iterator end() const
Get last cache element.
void createTUs(const edm::EventSetup &iSetup)
Create the trigger units and store them in the cache.
void clearCache()
Clear cache vector.
T const * product() const
DTTSPhi * getTSPhi(int istat) const
Return TSPhi.
unsigned long long _configid
SCcontainer::const_iterator SC_const_iterator
int size() const
Get cache vector's size.
std::vector< DTBtiTrigData > BtiTrigs()
Return a copy of all the BTI triggers.
std::vector< DTSectCollThSegm > SCThTrigs()
Return a copy of all the Sector Collector (Theta) triggers.
DTTSTheta * getTSTheta(int istat) const
Return TSTheta.
std::vector< DTChambPhSegm > TSPhTrigs()
Return a copy of all the Trigger Server (Phi) triggers.
int nThetaSegm(int step)
Number of theta segments for a given step.
void clear()
Clear the trigger units cache.