82 <<
"+++ trying to instantiate TMB of illegal CSC id [" 83 <<
" endcap = " << endc <<
" station = " <<
stat 84 <<
" sector = " << sect <<
" subsector = " << subs
85 <<
" chamber = " <<
cham <<
"]; skipping it... +++\n";
91 if (
stat==1 && ring==1 && smartME1aME1b && !runME11ILT_)
93 else if (
stat==1 && ring==1 && smartME1aME1b && runME11ILT_)
139 tmb_[endc-1][
stat-1][sect-1][subs-1][
cham-1]->setConfigParameters(conf);
197 if (tmb ==
nullptr ||
csc_g->
chamber(detid) ==
nullptr)
continue;
211 tmb11->
run(wiredc,compdc);
212 std::vector<CSCCorrelatedLCTDigi> lctV = tmb11->
readoutLCTs1b();
213 std::vector<CSCCorrelatedLCTDigi> lctV1a = tmb11->
readoutLCTs1a();
215 std::vector<CSCALCTDigi> alctV1a, alctV = tmb11->
alct->readoutALCTs();
217 std::vector<CSCCLCTDigi> clctV = tmb11->
clct->readoutCLCTs();
218 std::vector<int> preTriggerBXs = tmb11->
clct->preTriggerBXs();
219 std::vector<CSCCLCTDigi> clctV1a = tmb11->
clct1a->readoutCLCTs();
220 std::vector<int> preTriggerBXs1a = tmb11->
clct1a->preTriggerBXs();
224 std::vector<CSCALCTDigi> tmpV(alctV);
226 for (
unsigned int al=0; al < tmpV.size(); al++)
228 if (tmpV[al].getKeyWG()<=15) alctV1a.push_back(tmpV[al]);
229 if (tmpV[al].getKeyWG()>=10) alctV.push_back(tmpV[al]);
236 if (!(lctV.empty()&&alctV.empty()&&clctV.empty())) {
238 <<
"CSCTriggerPrimitivesBuilder results in " <<detid;
244 <<
"Put " << lctV.size() <<
" ME1b LCT digi" 245 << ((lctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
246 oc_lct.put(std::make_pair(lctV.begin(),lctV.end()), detid);
250 if (!alctV.empty()) {
252 <<
"Put " << alctV.size() <<
" ME1b ALCT digi" 253 << ((alctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
254 oc_alct.put(std::make_pair(alctV.begin(),alctV.end()), detid);
258 if (!clctV.empty()) {
260 <<
"Put " << clctV.size() <<
" ME1b CLCT digi" 261 << ((clctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
262 oc_clct.put(std::make_pair(clctV.begin(),clctV.end()), detid);
266 if (!preTriggerBXs.empty()) {
268 <<
"Put " << preTriggerBXs.size() <<
" CLCT pretrigger" 269 << ((preTriggerBXs.size() > 1) ?
"s " :
" ") <<
"in collection\n";
270 oc_pretrig.put(std::make_pair(preTriggerBXs.begin(),preTriggerBXs.end()), detid);
279 if (!(lctV1a.empty()&&alctV1a.empty()&&clctV1a.empty())){
280 LogTrace(
"L1CSCTrigger") <<
"CSCTriggerPrimitivesBuilder results in " <<detid1a;
284 if (!lctV1a.empty()) {
286 <<
"Put " << lctV1a.size() <<
" ME1a LCT digi" 287 << ((lctV1a.size() > 1) ?
"s " :
" ") <<
"in collection\n";
288 oc_lct.put(std::make_pair(lctV1a.begin(),lctV1a.end()), detid1a);
292 if (!alctV1a.empty()) {
294 <<
"Put " << alctV1a.size() <<
" ME1a ALCT digi" 295 << ((alctV1a.size() > 1) ?
"s " :
" ") <<
"in collection\n";
296 oc_alct.put(std::make_pair(alctV1a.begin(),alctV1a.end()), detid1a);
300 if (!clctV1a.empty()) {
302 <<
"Put " << clctV1a.size() <<
" ME1a CLCT digi" 303 << ((clctV1a.size() > 1) ?
"s " :
" ") <<
"in collection\n";
304 oc_clct.put(std::make_pair(clctV1a.begin(),clctV1a.end()), detid1a);
308 if (!preTriggerBXs1a.empty()) {
310 <<
"Put " << preTriggerBXs1a.size() <<
" CLCT pretrigger" 311 << ((preTriggerBXs1a.size() > 1) ?
"s " :
" ") <<
"in collection\n";
312 oc_pretrig.put(std::make_pair(preTriggerBXs1a.begin(),preTriggerBXs1a.end()), detid1a);
324 tmb11GEM->
run(wiredc, compdc, gemPads);
326 std::vector<CSCCorrelatedLCTDigi> lctV = tmb11GEM->
readoutLCTs1b();
327 std::vector<CSCCorrelatedLCTDigi> lctV1a = tmb11GEM->
readoutLCTs1a();
329 std::vector<CSCALCTDigi> alctV1a, alctV = tmb11GEM->
alct->readoutALCTs();
331 std::vector<CSCCLCTDigi> clctV = tmb11GEM->
clct->readoutCLCTs();
332 std::vector<int> preTriggerBXs = tmb11GEM->
clct->preTriggerBXs();
333 std::vector<CSCCLCTDigi> clctV1a = tmb11GEM->
clct1a->readoutCLCTs();
334 std::vector<int> preTriggerBXs1a = tmb11GEM->
clct1a->preTriggerBXs();
336 std::vector<GEMCoPadDigi> copads = tmb11GEM->
coPadProcessor->readoutCoPads();
339 std::vector<CSCALCTDigi> tmpV(alctV);
341 for (
unsigned int al=0; al < tmpV.size(); al++)
343 if (tmpV[al].getKeyWG()<=15) alctV1a.push_back(tmpV[al]);
344 if (tmpV[al].getKeyWG()>=10) alctV.push_back(tmpV[al]);
351 if (!(lctV.empty()&&alctV.empty()&&clctV.empty())) {
353 <<
"CSCTriggerPrimitivesBuilder results in " <<detid;
359 <<
"Put " << lctV.size() <<
" ME1b LCT digi" 360 << ((lctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
361 oc_lct.put(std::make_pair(lctV.begin(),lctV.end()), detid);
365 if (!alctV.empty()) {
367 <<
"Put " << alctV.size() <<
" ME1b ALCT digi" 368 << ((alctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
369 oc_alct.put(std::make_pair(alctV.begin(),alctV.end()), detid);
373 if (!clctV.empty()) {
375 <<
"Put " << clctV.size() <<
" ME1b CLCT digi" 376 << ((clctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
377 oc_clct.put(std::make_pair(clctV.begin(),clctV.end()), detid);
381 if (!preTriggerBXs.empty()) {
383 <<
"Put " << preTriggerBXs.size() <<
" CLCT pretrigger" 384 << ((preTriggerBXs.size() > 1) ?
"s " :
" ") <<
"in collection\n";
385 oc_pretrig.put(std::make_pair(preTriggerBXs.begin(),preTriggerBXs.end()), detid);
391 if (!copads.empty()) {
393 <<
"Put " << copads.size() <<
" GEM coincidence pad" 394 << ((copads.size() > 1) ?
"s " :
" ") <<
"in collection\n";
395 oc_gemcopad.put(std::make_pair(copads.begin(),copads.end()), gemId);
404 if (!(lctV1a.empty()&&alctV1a.empty()&&clctV1a.empty())){
405 LogTrace(
"L1CSCTrigger") <<
"CSCTriggerPrimitivesBuilder results in " <<detid1a;
409 if (!lctV1a.empty()) {
411 <<
"Put " << lctV1a.size() <<
" ME1a LCT digi" 412 << ((lctV1a.size() > 1) ?
"s " :
" ") <<
"in collection\n";
413 oc_lct.put(std::make_pair(lctV1a.begin(),lctV1a.end()), detid1a);
417 if (!alctV1a.empty()) {
419 <<
"Put " << alctV1a.size() <<
" ME1a ALCT digi" 420 << ((alctV1a.size() > 1) ?
"s " :
" ") <<
"in collection\n";
421 oc_alct.put(std::make_pair(alctV1a.begin(),alctV1a.end()), detid1a);
425 if (!clctV1a.empty()) {
427 <<
"Put " << clctV1a.size() <<
" ME1a CLCT digi" 428 << ((clctV1a.size() > 1) ?
"s " :
" ") <<
"in collection\n";
429 oc_clct.put(std::make_pair(clctV1a.begin(),clctV1a.end()), detid1a);
433 if (!preTriggerBXs1a.empty()) {
435 <<
"Put " << preTriggerBXs.size() <<
" CLCT pretrigger" 436 << ((preTriggerBXs.size() > 1) ?
"s " :
" ") <<
"in collection\n";
437 oc_pretrig.put(std::make_pair(preTriggerBXs.begin(),preTriggerBXs.end()), detid);
447 tmb21GEM->
run(wiredc, compdc, gemPads);
448 std::vector<CSCCorrelatedLCTDigi> lctV = tmb21GEM->
readoutLCTs();
449 std::vector<CSCALCTDigi> alctV = tmb21GEM->
alct->readoutALCTs();
450 std::vector<CSCCLCTDigi> clctV = tmb21GEM->
clct->readoutCLCTs();
451 std::vector<int> preTriggerBXs = tmb21GEM->
clct->preTriggerBXs();
453 std::vector<GEMCoPadDigi> copads = tmb21GEM->
coPadProcessor->readoutCoPads();
455 if (!(alctV.empty() && clctV.empty() && lctV.empty())) {
457 <<
"CSCTriggerPrimitivesBuilder got results in " <<detid;
463 <<
"Put " << lctV.size() <<
" LCT digi" 464 << ((lctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
465 oc_lct.put(std::make_pair(lctV.begin(),lctV.end()), detid);
469 if (!alctV.empty()) {
471 <<
"Put " << alctV.size() <<
" ALCT digi" 472 << ((alctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
473 oc_alct.put(std::make_pair(alctV.begin(),alctV.end()), detid);
477 if (!clctV.empty()) {
479 <<
"Put " << clctV.size() <<
" CLCT digi" 480 << ((clctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
481 oc_clct.put(std::make_pair(clctV.begin(),clctV.end()), detid);
485 if (!preTriggerBXs.empty()) {
487 <<
"Put " << preTriggerBXs.size() <<
" CLCT pretrigger" 488 << ((preTriggerBXs.size() > 1) ?
"s " :
" ") <<
"in collection\n";
489 oc_pretrig.put(std::make_pair(preTriggerBXs.begin(),preTriggerBXs.end()), detid);
496 if (!copads.empty()) {
498 <<
"Put " << copads.size() <<
" GEM coincidence pad" 499 << ((copads.size() > 1) ?
"s " :
" ") <<
"in collection\n";
500 oc_gemcopad.put(std::make_pair(copads.begin(),copads.end()), gemId);
506 tmb->
run(wiredc,compdc);
508 std::vector<CSCCorrelatedLCTDigi> lctV = tmb->
readoutLCTs();
509 std::vector<CSCALCTDigi> alctV = tmb->
alct->readoutALCTs();
510 std::vector<CSCCLCTDigi> clctV = tmb->
clct->readoutCLCTs();
511 std::vector<int> preTriggerBXs = tmb->
clct->preTriggerBXs();
513 if (!(alctV.empty() && clctV.empty() && lctV.empty())) {
515 <<
"CSCTriggerPrimitivesBuilder got results in " <<detid;
521 <<
"Put " << lctV.size() <<
" LCT digi" 522 << ((lctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
523 oc_lct.put(std::make_pair(lctV.begin(),lctV.end()), detid);
527 if (!alctV.empty()) {
529 <<
"Put " << alctV.size() <<
" ALCT digi" 530 << ((alctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
531 oc_alct.put(std::make_pair(alctV.begin(),alctV.end()), detid);
535 if (!clctV.empty()) {
537 <<
"Put " << clctV.size() <<
" CLCT digi" 538 << ((clctV.size() > 1) ?
"s " :
" ") <<
"in collection\n";
539 oc_clct.put(std::make_pair(clctV.begin(),clctV.end()), detid);
543 if (!preTriggerBXs.empty()) {
545 <<
"Put " << preTriggerBXs.size() <<
" CLCT pretrigger" 546 << ((preTriggerBXs.size() > 1) ?
"s " :
" ") <<
"in collection\n";
547 oc_pretrig.put(std::make_pair(preTriggerBXs.begin(),preTriggerBXs.end()), detid);
568 std::vector<csctf::TrackStub>
result;
576 std::vector<csctf::TrackStub> subs1, subs2;
579 result.insert(result.end(), subs1.begin(), subs1.end());
580 result.insert(result.end(), subs2.begin(), subs2.end());
584 std::vector<csctf::TrackStub> sector;
586 result.insert(result.end(), sector.begin(), sector.end());
592 std::vector<csctf::TrackStub>::const_iterator itr = result.begin();
593 for (; itr != result.end(); itr++)
595 oc_sorted_lct.insertDigi(
CSCDetId(itr->getDetId().rawId()), *(itr->getDigi()));
597 <<
"MPC " << *(itr->getDigi()) <<
" found in ME" 598 << ((itr->endcap() == 1) ?
"+" :
"-") << itr->station() <<
"/" 601 <<
" (sector " << itr->sector()
602 <<
" trig id. " << itr->cscid() <<
")" <<
"\n";
static const int min_station
T getParameter(std::string const &) const
void setCSCGeometry(const CSCGeometry *g)
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc)
std::unique_ptr< CSCMotherboard > tmb_[MAX_ENDCAPS][MAX_STATIONS][MAX_SECTORS][MAX_SUBSECTORS][MAX_CHAMBERS]
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiCollection *gemPads) override
std::vector< CSCCorrelatedLCTDigi > readoutLCTs()
static const int max_subsector
static int maxTriggerCscId()
void setGEMGeometry(const GEMGeometry *g)
set CSC and GEM geometries for the matching needs
static int maxTriggerSectorId()
static const int min_endcap
static const int max_station
static int maxStationId()
void setCSCGeometry(const CSCGeometry *g)
static int minTriggerSectorId()
static const int min_subsector
static int ringFromTriggerLabels(int station, int triggerCSCID)
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1b() const
std::unique_ptr< CSCCathodeLCTProcessor > clct1a
const GEMGeometry * gem_g
static const int max_chamber
void setConfigParameters(const CSCDBL1TPParameters *conf)
bool isInBadChamber(IndexType ichamber) const
Is the chamber with index 'ichamber' flagged as bad?
static const int max_sector
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1a() const
bool runOnData_
temporary flag to run on data
~CSCTriggerPrimitivesBuilder()
static const int max_endcap
CSCTriggerPrimitivesBuilder(const edm::ParameterSet &)
std::unique_ptr< GEMCoPadProcessor > coPadProcessor
static int minStationId()
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_7CFEBS], const std::vector< int > ds_times[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS])
std::unique_ptr< CSCCathodeLCTProcessor > clct1a
static const int min_sector
short int zendcap() const
const CSCGeometry * csc_g
static int minTriggerSubSectorId()
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
bool checkBadChambers_
a flag whether to skip chambers from the bad chambers map
std::vector< CSCCorrelatedLCTDigi > readoutLCTs() const
std::unique_ptr< CSCAnodeLCTProcessor > alct
std::unique_ptr< CSCCathodeLCTProcessor > clct
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1b()
std::unique_ptr< CSCMuonPortCard > m_muonportcard
void build(const CSCBadChambers *badChambers, const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiCollection *gemPads, const GEMPadDigiClusterCollection *gemPadClusters, CSCALCTDigiCollection &oc_alct, CSCCLCTDigiCollection &oc_clct, CSCCLCTPreTriggerCollection &oc_pretrig, CSCCorrelatedLCTDigiCollection &oc_lct, CSCCorrelatedLCTDigiCollection &oc_sorted_lct, GEMCoPadDigiCollection &oc_gemcopad)
static int minTriggerCscId()
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
static int maxTriggerSubSectorId()
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1a()
static const int min_chamber
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiCollection *gemPads) override