51 _inputexist(1) , _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;}
87 std::cout <<
"DTTrig::createTUs: Sector Collector unit already exists"<<std::endl;
93 std::cout <<
" DTTrig::createTUs new SC sc = " << sc
94 <<
" at scid.sector() " << scid.
sector()
95 <<
" at scid.wheel() " << scid.
wheel()
104 for (std::vector<const DTChamber*>::const_iterator ich=dtGeom->chambers().begin(); ich!=dtGeom->chambers().end();ich++){
109 if ( it !=
_cache.end()) {
110 if (
_debug)
std::cout <<
"DTTrig::init: Trigger unit already exists" << std::endl;
122 else if(chid.
sector()==14) {
133 std::cout <<
"DTTrig::init: adding TU in SC << "
134 <<
" sector = " << scid.
sector()
135 <<
" wheel = " << scid.
wheel()
141 std::cout <<
"DTTrig::createTUs: Trigger Unit not in the map: ";
162 <<
"DTTrig::triggerReco DTDigiCollection with input tag " <<
_digitag
163 <<
"requested in configuration, but not found in the event." << std::endl;
170 for (detUnitIt=dtDigis->begin();
171 detUnitIt!=dtDigis->end();
174 const DTLayerId& layId = (*detUnitIt).first;
177 digiMap[chambId].put(range,layId);
192 if (dmit !=digiMap.end()){
208 bool mustreco =
false;
209 for (
int i=1;
i<5;
i++) {
215 for (
int i=1;
i<4;
i++) {
241 std::cout <<
"DTTrig::updateES updating DTTPG configuration" << std::endl;
258 std::cout <<
"DTTrig::updateES updating muon geometry" << std::endl;
263 (*it).second->setGeom(geomHandle->chamber((*it).second->statId()));
300 if ( it ==
_cache.end()) {
301 std::cout <<
"DTTrig::trigUnit: Trigger Unit not in the map: ";
316 std::cout <<
"DTTrig::SCUnit: Trigger Unit not in the map: ";
414 if(unit->
nSegmPh(step)<1)
return 0;
421 if(unit->
nSegmPh(step)<2)
return 0;
446 if(unit->
nSegmTh(step)<1)
return 0;
486 std::vector<DTBtiTrigData>
489 std::vector<DTBtiTrigData> trigs;
493 std::vector<DTBtiTrigData>::const_iterator
p;
494 std::vector<DTBtiTrigData>::const_iterator peb=tu->
BtiTrigs()->
end();
502 std::vector<DTTracoTrigData>
504 std::vector<DTTracoTrigData> trigs;
509 std::vector<DTTracoTrigData>::const_iterator
p;
510 std::vector<DTTracoTrigData>::const_iterator peb=tu->
TracoTrigs()->
end();
518 std::vector<DTChambPhSegm>
521 std::vector<DTChambPhSegm> trigs;
525 std::vector<DTChambPhSegm>::const_iterator
p;
526 std::vector<DTChambPhSegm>::const_iterator peb=tu->
TSPhTrigs()->
end();
534 std::vector<DTChambThSegm>
537 std::vector<DTChambThSegm> trigs;
541 std::vector<DTChambThSegm>::const_iterator
p;
542 std::vector<DTChambThSegm>::const_iterator peb=tu->
TSThTrigs()->
end();
550 std::vector<DTSectCollPhSegm>
553 std::vector<DTSectCollPhSegm> trigs;
568 std::vector<DTSectCollPhSegm>::const_iterator
p;
569 std::vector<DTSectCollPhSegm>::const_iterator peb=sc->
endPh();
570 for(p=sc->
beginPh();p!=peb;p++){
579 std::vector<DTSectCollThSegm>
582 std::vector<DTSectCollThSegm> trigs;
586 std::vector<DTSectCollThSegm>::const_iterator
p;
587 std::vector<DTSectCollThSegm>::const_iterator peb=sc->
endTh();
588 for(p=sc->
beginTh();p!=peb;p++){
virtual void reconstruct()
Load Trigger Units triggers and run Sector Collector algorithm.
int sizePh()
Return Phi cache size.
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.
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.
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.
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.
void reconstruct()
Load BTIs triggers and run TSTheta algoritm.
const DTSectCollThSegm * SectCollThSegment(int step)
Return requested Sector Collector Theta Segment.
T const * product() const
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.
virtual void reconstruct()
Load TRACO triggers and run TSPhi algorithm.
DTSectCollThSegm * chSectCollThSegm(DTSectColl *unit, int step)
Return the theta track segment in req. chamber/step [SC step].
virtual void reconstruct()
Load BTIs triggers and run TRACOs algorithm.
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.
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.