51 : _inputexist(
true), _configid(0), _geomid(0) {
57 std::cout <<
"**** Initialization of DTTrigger ****" << std::endl;
67 for (
int iwh = -2; iwh <= 2; iwh++) {
68 for (
int ise = 1; ise <= 12; ise++) {
70 std::cout <<
"calling sectcollid wh sc " << iwh <<
" " << ise << std::endl;
77 std::cout <<
"DTTrig::createTUs: Sector Collector unit already exists" << std::endl;
83 auto element =
_cache1.emplace(scid, scid);
85 std::cout <<
" DTTrig::createTUs new SC sc = " << &(element.first->second) <<
" at scid.sector() " 86 << scid.
sector() <<
" at scid.wheel() " << scid.
wheel() << std::endl;
94 for (std::vector<const DTChamber*>::const_iterator ich = dtGeom->
chambers().begin(); ich != dtGeom->
chambers().end();
101 std::cout <<
"DTTrig::init: Trigger unit already exists" << std::endl;
106 auto tru = &(
info.first->second);
111 if (chid.
sector() == 13) {
113 }
else if (chid.
sector() == 14) {
122 auto&
sc = (*it1).second;
124 std::cout <<
"DTTrig::init: adding TU in SC << " 125 <<
" sector = " << scid.
sector() <<
" wheel = " << scid.
wheel() << std::endl;
129 std::cout <<
"DTTrig::createTUs: Trigger Unit not in the map: ";
145 LogDebug(
"DTTrig") <<
"DTTrig::triggerReco DTDigiCollection with input tag " <<
_digitag 146 <<
"requested in configuration, but not found in the event." << std::endl;
153 for (detUnitIt = dtDigis->begin(); detUnitIt != dtDigis->end(); ++detUnitIt) {
154 const DTLayerId& layId = (*detUnitIt).first;
157 digiMap[chambId].put(range, layId);
171 if (dmit != digiMap.end()) {
187 bool mustreco =
false;
188 for (
int i = 1;
i < 5;
i++) {
194 for (
int i = 1;
i < 4;
i++) {
216 std::cout <<
"DTTrig::updateES updating DTTPG configuration" << std::endl;
231 std::cout <<
"DTTrig::updateES updating muon geometry" << std::endl;
236 (*it).second.setGeom(geomHandle->
chamber((*it).second.statId()));
255 std::cout <<
"DTTrig::trigUnit: Trigger Unit not in the map: ";
263 return &(*it).second;
269 std::cout <<
"DTTrig::SCUnit: Trigger Unit not in the map: ";
276 return &(*it).second;
418 std::vector<DTBtiTrigData> trigs;
419 for (
auto ptu =
_cache.begin(); ptu !=
_cache.end(); ptu++) {
430 std::vector<DTTracoTrigData> trigs;
432 for (
auto ptu =
_cache.begin(); ptu !=
_cache.end(); ptu++) {
444 std::vector<DTChambPhSegm> trigs;
445 for (
auto ptu =
_cache.begin(); ptu !=
_cache.end(); ptu++) {
457 std::vector<DTChambThSegm> trigs;
458 for (
auto ptu =
_cache.begin(); ptu !=
_cache.end(); ptu++) {
470 std::vector<DTSectCollPhSegm> trigs;
483 auto peb = sc.
endPh();
493 std::vector<DTSectCollThSegm> trigs;
496 auto peb = sc.
endTh();
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.
std::map< DTChamberId, DTDigiCollection, std::less< DTChamberId > > DTDigiMap
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.
std::pair< const_iterator, const_iterator > Range
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.
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].
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.
Basic3DVector unit() const
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.