75 <<
"+++ trying to instantiate TMB of illegal CSC id ["
76 <<
" endcap = " << endc <<
" station = " << stat
77 <<
" sector = " << sect <<
" subsector = " << subs
78 <<
" chamber = " <<
cham <<
"]; skipping it... +++\n";
84 if (stat==1 && ring==1 && smartME1aME1b)
118 delete tmb_[endc-1][stat-1][sect-1][subs-1][
cham-1];
195 if (tmb == 0 || theGeom->
chamber(endc, stat, sect, subs,
cham) == 0)
continue;
214 tmb11->
run(wiredc,compdc);
215 std::vector<CSCCorrelatedLCTDigi> lctV = tmb11->
readoutLCTs1b();
216 std::vector<CSCCorrelatedLCTDigi> lctV1a = tmb11->
readoutLCTs1a();
227 std::vector<CSCALCTDigi> tmpV(alctV);
229 for (
unsigned int al=0; al < tmpV.size(); al++)
231 if (tmpV[al].getKeyWG()<=15) alctV1a.push_back(tmpV[al]);
232 if (tmpV[al].getKeyWG()>=10) alctV.push_back(tmpV[al]);
239 if (!(lctV.empty()&&alctV.empty()&&clctV.empty())) {
241 <<
"CSCTriggerPrimitivesBuilder results in " <<
detid;
247 <<
"Put " << lctV.size() <<
" ME1b LCT digi"
248 << ((lctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
249 oc_lct.put(std::make_pair(lctV.begin(),lctV.end()), detid);
253 if (!alctV.empty()) {
255 <<
"Put " << alctV.size() <<
" ME1b ALCT digi"
256 << ((alctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
257 oc_alct.put(std::make_pair(alctV.begin(),alctV.end()), detid);
261 if (!clctV.empty()) {
263 <<
"Put " << clctV.size() <<
" ME1b CLCT digi"
264 << ((clctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
265 oc_clct.put(std::make_pair(clctV.begin(),clctV.end()), detid);
269 if (!preTriggerBXs.empty()) {
271 <<
"Put " << preTriggerBXs.size() <<
" CLCT pretrigger"
272 << ((preTriggerBXs.size() > 1) ?
"s " :
" ") <<
"in collection\n";
273 oc_pretrig.put(std::make_pair(preTriggerBXs.begin(),preTriggerBXs.end()), detid);
280 CSCDetId detid1a(endc, stat, 4, chid, 0);
282 if (!(lctV1a.empty()&&alctV1a.empty()&&clctV1a.empty())){
283 LogTrace(
"L1CSCTrigger") <<
"CSCTriggerPrimitivesBuilder results in " <<detid1a;
287 if (!lctV1a.empty()) {
289 <<
"Put " << lctV1a.size() <<
" ME1a LCT digi"
290 << ((lctV1a.size() > 1) ?
"s " :
" ") <<
"in collection\n";
291 oc_lct.put(std::make_pair(lctV1a.begin(),lctV1a.end()), detid1a);
295 if (!alctV1a.empty()) {
297 <<
"Put " << alctV1a.size() <<
" ME1a ALCT digi"
298 << ((alctV1a.size() > 1) ?
"s " :
" ") <<
"in collection\n";
299 oc_alct.put(std::make_pair(alctV1a.begin(),alctV1a.end()), detid1a);
303 if (!clctV1a.empty()) {
305 <<
"Put " << clctV1a.size() <<
" ME1a CLCT digi"
306 << ((clctV1a.size() > 1) ?
"s " :
" ") <<
"in collection\n";
307 oc_clct.put(std::make_pair(clctV1a.begin(),clctV1a.end()), detid1a);
311 if (!preTriggerBXs1a.empty()) {
313 <<
"Put " << preTriggerBXs.size() <<
" CLCT pretrigger"
314 << ((preTriggerBXs.size() > 1) ?
"s " :
" ") <<
"in collection\n";
315 oc_pretrig.put(std::make_pair(preTriggerBXs.begin(),preTriggerBXs.end()), detid);
322 tmb->
run(wiredc,compdc);
324 std::vector<CSCCorrelatedLCTDigi> lctV = tmb->
readoutLCTs();
329 if (!(alctV.empty() && clctV.empty() && lctV.empty())) {
331 <<
"CSCTriggerPrimitivesBuilder got results in " <<
detid;
349 <<
"Put " << lctV.size() <<
" LCT digi"
350 << ((lctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
351 oc_lct.put(std::make_pair(lctV.begin(),lctV.end()), detid);
355 if (!alctV.empty()) {
357 <<
"Put " << alctV.size() <<
" ALCT digi"
358 << ((alctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
359 oc_alct.put(std::make_pair(alctV.begin(),alctV.end()), detid);
363 if (!clctV.empty()) {
365 <<
"Put " << clctV.size() <<
" CLCT digi"
366 << ((clctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
367 oc_clct.put(std::make_pair(clctV.begin(),clctV.end()), detid);
371 if (!preTriggerBXs.empty()) {
373 <<
"Put " << preTriggerBXs.size() <<
" CLCT pretrigger"
374 << ((preTriggerBXs.size() > 1) ?
"s " :
" ") <<
"in collection\n";
375 oc_pretrig.put(std::make_pair(preTriggerBXs.begin(),preTriggerBXs.end()), detid);
387 std::vector<csctf::TrackStub>
result;
395 std::vector<csctf::TrackStub> subs1, subs2;
398 result.insert(result.end(), subs1.begin(), subs1.end());
399 result.insert(result.end(), subs2.begin(), subs2.end());
403 std::vector<csctf::TrackStub> sector;
405 result.insert(result.end(), sector.begin(), sector.end());
409 std::vector<csctf::TrackStub>::const_iterator itr = result.begin();
410 for (; itr != result.end(); itr++)
412 oc_sorted_lct.insertDigi(
CSCDetId(itr->getDetId().rawId()), *(itr->getDigi()));
414 <<
"MPC " << *(itr->getDigi()) <<
" found in ME"
415 << ((itr->endcap() == 1) ?
"+" :
"-") << itr->station() <<
"/"
417 <<
CSCDetId(itr->getDetId().rawId()).chamber()
418 <<
" (sector " << itr->sector()
419 <<
" trig id. " << itr->cscid() <<
")" <<
"\n";
static const int min_station
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< CSCCLCTDigi > readoutCLCTs()
void run(const std::vector< int > w_time[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES], const std::vector< int > hs_times[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS], const std::vector< int > ds_times[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS])
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc)
CSCChamber * chamber(unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned tcscid) const
Return the CSCChamber for a corresponding endcap/station/sector/subsector/trigger cscid...
std::vector< CSCCorrelatedLCTDigi > readoutLCTs()
static const int max_subsector
static int maxTriggerCscId()
static int maxTriggerSectorId()
void build(const CSCBadChambers *badChambers, const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, CSCALCTDigiCollection &oc_alct, CSCCLCTDigiCollection &oc_clct, CSCCLCTPreTriggerCollection &oc_pretrig, CSCCorrelatedLCTDigiCollection &oc_lct, CSCCorrelatedLCTDigiCollection &oc_sorted_lct)
static const int min_endcap
CSCMuonPortCard * m_muonportcard
static const int max_station
static int maxStationId()
static int minTriggerSectorId()
static const int min_subsector
static int ringFromTriggerLabels(int station, int triggerCSCID)
static const int max_chamber
void setConfigParameters(const CSCDBL1TPParameters *conf)
bool isInBadChamber(IndexType ichamber) const
Is the chamber with index 'ichamber' flagged as bad?
void loadDigis(const CSCCorrelatedLCTDigiCollection &thedigis)
static const int max_sector
~CSCTriggerPrimitivesBuilder()
static const int max_endcap
CSCTriggerPrimitivesBuilder(const edm::ParameterSet &)
static CSCTriggerGeomManager * get()
static int minStationId()
CSCMotherboard * tmb_[MAX_ENDCAPS][MAX_STATIONS][MAX_SECTORS][MAX_SUBSECTORS][MAX_CHAMBERS]
CSCAnodeLCTProcessor * alct
static const int min_sector
std::vector< int > preTriggerBXs() const
std::vector< CSCALCTDigi > readoutALCTs()
static int minTriggerSubSectorId()
CSCCathodeLCTProcessor * clct
bool checkBadChambers_
a flag whether to skip chambers from the bad chambers map
std::vector< csctf::TrackStub > sort(const unsigned endcap, const unsigned station, const unsigned sector, const unsigned subsector, const int bx)
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1b()
CSCCathodeLCTProcessor * clct1a
static int minTriggerCscId()
void setConfigParameters(const CSCDBL1TPParameters *conf)
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
static int maxTriggerSubSectorId()
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1a()
static const int min_chamber