47 : _inputexist(
true), _configid(0), _geomid(0) {
53 std::cout <<
"**** Initialization of DTTrigger ****" << std::endl;
66 for (
int iwh = -2; iwh <= 2; iwh++) {
67 for (
int ise = 1; ise <= 12; ise++) {
69 std::cout <<
"calling sectcollid wh sc " << iwh <<
" " << ise << std::endl;
76 std::cout <<
"DTTrig::createTUs: Sector Collector unit already exists" << std::endl;
82 auto element =
_cache1.emplace(scid, scid);
84 std::cout <<
" DTTrig::createTUs new SC sc = " << &(element.first->second) <<
" at scid.sector() " 85 << scid.
sector() <<
" at scid.wheel() " << scid.
wheel() << std::endl;
92 for (std::vector<const DTChamber*>::const_iterator ich = dtGeom->
chambers().begin(); ich != dtGeom->
chambers().end();
99 std::cout <<
"DTTrig::init: Trigger unit already exists" << std::endl;
104 auto tru = &(
info.first->second);
109 if (chid.
sector() == 13) {
111 }
else if (chid.
sector() == 14) {
120 auto& sc = (*it1).second;
122 std::cout <<
"DTTrig::init: adding TU in SC << " 123 <<
" sector = " << scid.
sector() <<
" wheel = " << scid.
wheel() << std::endl;
127 std::cout <<
"DTTrig::createTUs: Trigger Unit not in the map: ";
143 LogDebug(
"DTTrig") <<
"DTTrig::triggerReco DTDigiCollection with input tag " <<
_digitag 144 <<
"requested in configuration, but not found in the event." << std::endl;
151 for (detUnitIt = dtDigis->begin(); detUnitIt != dtDigis->end(); ++detUnitIt) {
152 const DTLayerId& layId = (*detUnitIt).first;
155 digiMap[chambId].put(
range, layId);
169 if (dmit != digiMap.end()) {
185 bool mustreco =
false;
186 for (
int i = 1;
i < 5;
i++) {
192 for (
int i = 1;
i < 4;
i++) {
214 std::cout <<
"DTTrig::updateES updating DTTPG configuration" << std::endl;
229 std::cout <<
"DTTrig::updateES updating muon geometry" << std::endl;
234 (*it).second.setGeom(geomHandle->
chamber((*it).second.statId()));
253 std::cout <<
"DTTrig::trigUnit: Trigger Unit not in the map: ";
261 return &(*it).second;
267 std::cout <<
"DTTrig::SCUnit: Trigger Unit not in the map: ";
274 return &(*it).second;
416 std::vector<DTBtiTrigData> trigs;
417 for (
auto ptu =
_cache.begin(); ptu !=
_cache.end(); ptu++) {
428 std::vector<DTTracoTrigData> trigs;
430 for (
auto ptu =
_cache.begin(); ptu !=
_cache.end(); ptu++) {
442 std::vector<DTChambPhSegm> trigs;
443 for (
auto ptu =
_cache.begin(); ptu !=
_cache.end(); ptu++) {
455 std::vector<DTChambThSegm> trigs;
456 for (
auto ptu =
_cache.begin(); ptu !=
_cache.end(); ptu++) {
468 std::vector<DTSectCollPhSegm> trigs;
481 auto peb = sc.
endPh();
491 std::vector<DTSectCollThSegm> trigs;
494 auto peb = sc.
endTh();
void reconstruct() override
Load BTIs triggers and run TSTheta algoritm.
virtual void reconstruct(const DTDigiCollection dtDigis)
std::vector< DTBtiTrigData > BtiTrigs() const
Return a copy of all the BTI triggers.
int station() const
Return the station number.
void clearCache()
Clear all traco stuff (cache & map)
SCcontainer::iterator SC_iterator
void reconstruct() override
Load Trigger Units triggers and run Sector Collector algorithm.
void reconstruct() override
Load TRACO triggers and run TSPhi algorithm.
void dumpLUT(short int btic) const
Dump the Lut file.
std::map< DTChamberId, DTDigiCollection, std::less< DTChamberId > > DTDigiMap
DTChamberId id() const
Return the DTChamberId of this chamber.
DTBtiCard * BtiTrigs() const
Return container of BTI triggers.
void clearCache()
Clear all BTI stuff (map & cache)
DTChambPhSegm * chPhiSegm2(DTChamberId sid, int step)
Return the second phi track segment in req. chamber/step.
std::vector< DTChambThSegm > TSThTrigs() const
Return a copy of all the Trigger Server (Theta) triggers.
DTTrig(const edm::ParameterSet ¶ms, edm::ConsumesCollector &&ix)
Constructors.
void reconstruct() override
Load BTIs triggers and run TRACOs algorithm.
int sizeTh() const
Return Theta cache size.
TUcontainer::iterator TU_iterator
unsigned long long cacheIdentifier() const
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
int sizePh() const
Return Phi cache size.
DTSCTrigUnit const * constTrigUnit(DTChamberId sid) const
Return a trigger unit - Muon numbering - const version.
DTChamberId statId() const
Identifier of the associated chamber.
int size() const
Get cache vector's size.
T const * product() const
std::vector< DTSectCollPhSegm >::const_iterator endPh() const
Return iterator to the end of Phi cache.
std::vector< DTSectCollPhSegm > SCPhTrigs() const
Return a copy of all the Sector Collector (Phi) triggers.
DTChamberId chamberId() const
Return the corresponding ChamberId.
std::vector< DTTracoTrigData > TracoTrigs() const
Return a copy of all the TRACO triggers.
DTTSPhi * TSPhTrigs() const
Return the chamber Trigger Server (Phi)
std::vector< DTSectCollThSegm > SCThTrigs() const
Return a copy of all the Sector Collector (Theta) triggers.
void updateES(const edm::EventSetup &iSetup)
update the eventsetup info
void dumpLUTParam(DTChamberId &chambid) const
Dump luts string commands from configuration parameters.
std::vector< DTSectCollThSegm >::const_iterator beginTh() const
Return iterator to the begni of Theta cache.
std::vector< DTSectCollThSegm >::const_iterator endTh() const
Return iterator to the end of Theta cache.
const_iterator end() const
Get last cache element.
void triggerReco(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Run the whole trigger reconstruction chain.
std::vector< DTChambPhSegm > TSPhTrigs() const
Return a copy of all the Trigger Server (Phi) triggers.
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Basic3DVector unit() const
DTSectCollPhSegm * chSectCollPhSegm2(DTSectColl *unit, int step)
Return the second phi track segment in req. chamber/step [SC step].
DTDigiMap::iterator DTDigiMap_iterator
DTTSPhi * getTSPhi(int istat) const
Return TSPhi.
TUcontainer::const_iterator TU_const_iterator
DTSCTrigUnit * trigUnit(DTChamberId sid)
Return a trigger unit - Muon numbering.
edm::ESGetToken< DTConfigManager, DTConfigManagerRcd > confToken_
std::pair< const_iterator, const_iterator > Range
DTTracoCard * TracoTrigs() const
Return container of TRACO triggers.
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomBeginRunToken_
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.
int wheel() const
Return the wheel number.
const DTConfigManager * _conf_manager
DTSectCollThSegm * chSectCollThSegm(DTSectColl *unit, int step)
Return the theta track segment in req. chamber/step [SC step].
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
DTTSTheta * getTSTheta(int istat) const
Return TSTheta.
void dumpGeom() const
Dump the geometry.
void dumpLuts(short int lut_btic, const DTConfigManager *conf) const
Dump the LUT files.
DTSectColl const * SCUnit(DTSectCollId scid) const
Return a SC unit - Muon numbering - const version.
void createTUs(const edm::EventSetup &iSetup)
Create the trigger units and store them in the cache.
void clearCache()
Clear cache vector.
const_iterator begin() const
Get first cache element.
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
unsigned long long _configid
SCcontainer::const_iterator SC_const_iterator
DTTSTheta * TSThTrigs() const
Return the chamber Trigger Server (Theta)
void clear()
Clear the trigger units cache.
std::vector< DTSectCollPhSegm >::const_iterator beginPh() const
Return iterator to the beghin of Phi cache.