51 _inputexist(
true) , _configid(0) , _geomid(0) {
58 std::cout <<
"**** Initialization of DTTrigger ****" << std::endl;
72 for(
int iwh=-2;iwh<=2;iwh++){
73 for(
int ise=1;ise<=12;ise++){
75 std::cout <<
"calling sectcollid wh sc " << iwh <<
" " << ise << std::endl;}
81 std::cout <<
"DTTrig::createTUs: Sector Collector unit already exists"<<std::endl;
87 auto element =
_cache1.emplace(scid, scid);
89 std::cout <<
" DTTrig::createTUs new SC sc = " << &(element.first->second)
90 <<
" at scid.sector() " << scid.
sector()
91 <<
" at scid.wheel() " << scid.
wheel()
100 for (std::vector<const DTChamber*>::const_iterator ich=dtGeom->
chambers().begin(); ich!=dtGeom->
chambers().end();ich++){
105 if ( it !=
_cache.end()) {
106 if (
_debug)
std::cout <<
"DTTrig::init: Trigger unit already exists" << std::endl;
111 auto tru = &(
info.first->second);
118 else if(chid.
sector()==14) {
127 auto&
sc = (*it1).second;
129 std::cout <<
"DTTrig::init: adding TU in SC << " 130 <<
" sector = " << scid.
sector()
131 <<
" wheel = " << scid.
wheel()
137 std::cout <<
"DTTrig::createTUs: Trigger Unit not in the map: ";
158 <<
"DTTrig::triggerReco DTDigiCollection with input tag " <<
_digitag 159 <<
"requested in configuration, but not found in the event." << std::endl;
166 for (detUnitIt=dtDigis->begin();
167 detUnitIt!=dtDigis->end();
170 const DTLayerId& layId = (*detUnitIt).first;
173 digiMap[chambId].put(range,layId);
188 if (dmit !=digiMap.end()){
204 bool mustreco =
false;
205 for (
int i=1;
i<5;
i++) {
211 for (
int i=1;
i<4;
i++) {
237 std::cout <<
"DTTrig::updateES updating DTTPG configuration" << std::endl;
254 std::cout <<
"DTTrig::updateES updating muon geometry" << std::endl;
259 (*it).second.setGeom(geomHandle->
chamber((*it).second.statId()));
287 if ( it ==
_cache.end()) {
288 std::cout <<
"DTTrig::trigUnit: Trigger Unit not in the map: ";
296 return &(*it).second;
303 std::cout <<
"DTTrig::SCUnit: Trigger Unit not in the map: ";
310 return &(*it).second;
335 if(unit==
nullptr)
return nullptr;
336 if(unit->
nPhiSegm(step)<1)
return nullptr;
342 if(unit==
nullptr)
return nullptr;
343 if(unit->
nPhiSegm(step)<2)
return nullptr;
349 if(unit==
nullptr)
return nullptr;
366 if(sid.
station()==4)
return nullptr;
392 if(stat==4)
return nullptr;
400 if(unit==
nullptr)
return nullptr;
401 if(unit->
nSegmPh(step)<1)
return nullptr;
407 if(unit==
nullptr)
return nullptr;
408 if(unit->
nSegmPh(step)<2)
return nullptr;
432 if(unit==
nullptr)
return nullptr;
433 if(unit->
nSegmTh(step)<1)
return nullptr;
473 std::vector<DTBtiTrigData>
476 std::vector<DTBtiTrigData> trigs;
487 std::vector<DTTracoTrigData>
489 std::vector<DTTracoTrigData> trigs;
501 std::vector<DTChambPhSegm>
504 std::vector<DTChambPhSegm> trigs;
515 std::vector<DTChambThSegm>
518 std::vector<DTChambThSegm> trigs;
529 std::vector<DTSectCollPhSegm>
532 std::vector<DTSectCollPhSegm> trigs;
555 std::vector<DTSectCollThSegm>
558 std::vector<DTSectCollThSegm> trigs;
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.
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
void reconstruct() override
Load TRACO triggers and run TSPhi algorithm.
std::vector< DTTracoTrigData > TracoTrigs() const
Return a copy of all the TRACO triggers.
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
std::vector< DTChambThSegm > TSThTrigs() const
Return a copy of all the Trigger Server (Theta) triggers.
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.
DTSectColl const * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
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.
void dumpLuts(short int lut_btic, const DTConfigManager *conf) const
Dump the LUT files.
std::vector< DTSectCollThSegm >::const_iterator endTh() const
Return iterator to the end of Theta cache.
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
void dumpLUT(short int btic) const
Dump the Lut file.
DTBtiCard * BtiTrigs() const
Return container of BTI triggers.
std::vector< DTSectCollThSegm >::const_iterator beginTh() const
Return iterator to the begni of Theta cache.
int nSegmPh(int step)
Return number of DTSectCollPhi segments (SC step)
void updateES(const edm::EventSetup &iSetup)
update the eventsetup info
int sizeTh() const
Return Theta cache size.
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.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
int sizePh() const
Return Phi cache size.
std::vector< DTSectCollPhSegm >::const_iterator beginPh() const
Return iterator to the beghin of Phi cache.
DTSectCollPhSegm * chSectCollPhSegm2(DTSectColl *unit, int step)
Return the second phi track segment in req. chamber/step [SC step].
DTDigiMap::iterator DTDigiMap_iterator
std::vector< DTSectCollPhSegm > SCPhTrigs() const
Return a copy of all the Sector Collector (Phi) triggers.
void dumpGeom() const
Dump the geometry.
TUcontainer::const_iterator TU_const_iterator
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
DTTracoCard * TracoTrigs() const
Return container of TRACO triggers.
const DTSectCollThSegm * SectCollThSegment(int step)
Return requested Sector Collector Theta Segment.
const_iterator begin() const
Get first cache element.
std::vector< DTSectCollThSegm > SCThTrigs() const
Return a copy of all the Sector Collector (Theta) triggers.
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::vector< DTBtiTrigData > BtiTrigs() const
Return a copy of all the BTI triggers.
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 endPh() const
Return iterator to the end 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.
std::vector< DTChambPhSegm > TSPhTrigs() const
Return a copy of all the Trigger Server (Phi) triggers.
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.
DTTSTheta * getTSTheta(int istat) const
Return TSTheta.
int nThetaSegm(int step)
Number of theta segments for a given step.
void clear()
Clear the trigger units cache.