diff --git a/L1Trigger/CSCTriggerPrimitives/interface/CSCTriggerPrimitivesBuilder.h b/L1Trigger/CSCTriggerPrimitives/interface/CSCTriggerPrimitivesBuilder.h index 76d569e1a540c..5eb28ff546bf9 100644 --- a/L1Trigger/CSCTriggerPrimitives/interface/CSCTriggerPrimitivesBuilder.h +++ b/L1Trigger/CSCTriggerPrimitives/interface/CSCTriggerPrimitivesBuilder.h @@ -70,7 +70,9 @@ class CSCTriggerPrimitivesBuilder { const GEMPadDigiCollection* gemPads, const GEMPadDigiClusterCollection* gemPadClusters, CSCALCTDigiCollection& oc_alct, + CSCALCTDigiCollection& oc_alct_all, CSCCLCTDigiCollection& oc_clct, + CSCCLCTDigiCollection& oc_clct_all, CSCALCTPreTriggerDigiCollection& oc_alctpretrigger, CSCCLCTPreTriggerDigiCollection& oc_clctpretrigger, CSCCLCTPreTriggerCollection& oc_pretrig, diff --git a/L1Trigger/CSCTriggerPrimitives/plugins/CSCTriggerPrimitivesProducer.cc b/L1Trigger/CSCTriggerPrimitives/plugins/CSCTriggerPrimitivesProducer.cc index 34c8a0aab0364..8ac4bc6dea5aa 100644 --- a/L1Trigger/CSCTriggerPrimitives/plugins/CSCTriggerPrimitivesProducer.cc +++ b/L1Trigger/CSCTriggerPrimitives/plugins/CSCTriggerPrimitivesProducer.cc @@ -48,6 +48,10 @@ CSCTriggerPrimitivesProducer::CSCTriggerPrimitivesProducer(const edm::ParameterS : edm::InputTag(""); checkBadChambers_ = conf.getParameter("checkBadChambers"); + writeOutAllCLCTs_ = conf.getParameter("writeOutAllCLCTs"); + + writeOutAllALCTs_ = conf.getParameter("writeOutAllALCTs"); + savePreTriggers_ = conf.getParameter("savePreTriggers"); // check whether you need to run the integrated local triggers @@ -63,6 +67,13 @@ CSCTriggerPrimitivesProducer::CSCTriggerPrimitivesProducer(const edm::ParameterS // register what this produces produces(); produces(); + // for experimental simulation studies + if (writeOutAllCLCTs_) { + produces("All"); + } + if (writeOutAllALCTs_) { + produces("All"); + } produces(); produces(); produces(); @@ -136,7 +147,9 @@ void CSCTriggerPrimitivesProducer::produce(edm::StreamID iID, edm::Event& ev, co // Create empty collections of ALCTs, CLCTs, and correlated LCTs upstream // and downstream of MPC. std::unique_ptr oc_alct(new CSCALCTDigiCollection); + std::unique_ptr oc_alct_all(new CSCALCTDigiCollection); std::unique_ptr oc_clct(new CSCCLCTDigiCollection); + std::unique_ptr oc_clct_all(new CSCCLCTDigiCollection); std::unique_ptr oc_clctpretrigger(new CSCCLCTPreTriggerDigiCollection); std::unique_ptr oc_alctpretrigger(new CSCALCTPreTriggerDigiCollection); std::unique_ptr oc_pretrig(new CSCCLCTPreTriggerCollection); @@ -165,7 +178,9 @@ void CSCTriggerPrimitivesProducer::produce(edm::StreamID iID, edm::Event& ev, co gemPads, gemPadClusters, *oc_alct, + *oc_alct_all, *oc_clct, + *oc_clct_all, *oc_alctpretrigger, *oc_clctpretrigger, *oc_pretrig, @@ -178,7 +193,13 @@ void CSCTriggerPrimitivesProducer::produce(edm::StreamID iID, edm::Event& ev, co // Put collections in event. ev.put(std::move(oc_alct)); + if (writeOutAllALCTs_) { + ev.put(std::move(oc_alct_all), "All"); + } ev.put(std::move(oc_clct)); + if (writeOutAllCLCTs_) { + ev.put(std::move(oc_clct_all), "All"); + } if (savePreTriggers_) { ev.put(std::move(oc_alctpretrigger)); ev.put(std::move(oc_clctpretrigger)); diff --git a/L1Trigger/CSCTriggerPrimitives/plugins/CSCTriggerPrimitivesProducer.h b/L1Trigger/CSCTriggerPrimitives/plugins/CSCTriggerPrimitivesProducer.h index 997b68f011401..fe271849871a8 100644 --- a/L1Trigger/CSCTriggerPrimitives/plugins/CSCTriggerPrimitivesProducer.h +++ b/L1Trigger/CSCTriggerPrimitives/plugins/CSCTriggerPrimitivesProducer.h @@ -74,6 +74,14 @@ class CSCTriggerPrimitivesProducer : public edm::global::EDProducer 2 + bool writeOutAllCLCTs_; + + // write out all ALCTs + // only relevant when CSCConstants::MAX_ALCTS_PER_PROCESSOR is > 2 + bool writeOutAllALCTs_; + // Write out pre-triggers bool savePreTriggers_; diff --git a/L1Trigger/CSCTriggerPrimitives/python/cscTriggerPrimitiveDigis_cfi.py b/L1Trigger/CSCTriggerPrimitives/python/cscTriggerPrimitiveDigis_cfi.py index 136691e58e97c..96577a6715b83 100644 --- a/L1Trigger/CSCTriggerPrimitives/python/cscTriggerPrimitiveDigis_cfi.py +++ b/L1Trigger/CSCTriggerPrimitives/python/cscTriggerPrimitiveDigis_cfi.py @@ -17,6 +17,12 @@ # If True, output collections will only be built for good chambers checkBadChambers = cms.bool(True), + # Write out all CLCTs + writeOutAllCLCTs = cms.bool(False), + + # Write out all ALCTs + writeOutAllALCTs = cms.bool(False), + # Write out pre-triggers savePreTriggers = cms.bool(False), diff --git a/L1Trigger/CSCTriggerPrimitives/src/CSCTriggerPrimitivesBuilder.cc b/L1Trigger/CSCTriggerPrimitives/src/CSCTriggerPrimitivesBuilder.cc index 6cdfead81fc75..fbc8436bb2972 100644 --- a/L1Trigger/CSCTriggerPrimitives/src/CSCTriggerPrimitivesBuilder.cc +++ b/L1Trigger/CSCTriggerPrimitives/src/CSCTriggerPrimitivesBuilder.cc @@ -118,7 +118,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers, const GEMPadDigiCollection* gemPads, const GEMPadDigiClusterCollection* gemClusters, CSCALCTDigiCollection& oc_alct, + CSCALCTDigiCollection& oc_alct_all, CSCCLCTDigiCollection& oc_clct, + CSCCLCTDigiCollection& oc_clct_all, CSCALCTPreTriggerDigiCollection& oc_alctpretrigger, CSCCLCTPreTriggerDigiCollection& oc_pretrigger, CSCCLCTPreTriggerCollection& oc_pretrig, @@ -173,7 +175,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers, const std::vector& lctV = tmb11->readoutLCTs1b(); const std::vector& lctV1a = tmb11->readoutLCTs1a(); const std::vector& alctV = tmb11->alctProc->readoutALCTs(); + const std::vector& alctV_all = tmb11->alctProc->getALCTs(); const std::vector& clctV = tmb11->clctProc->readoutCLCTsME1b(); + const std::vector& clctV_all = tmb11->clctProc->getCLCTs(); const std::vector preTriggerBXs = tmb11->clctProc->preTriggerBXs(); const std::vector& pretriggerV = tmb11->clctProc->preTriggerDigisME1b(); const std::vector& clctV1a = tmb11->clctProc->readoutCLCTsME1a(); @@ -190,11 +194,12 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers, if (!(lctV.empty() && alctV.empty() && clctV.empty()) and infoV > 1) { LogTrace("L1CSCTrigger") << "CSCTriggerPrimitivesBuilder results in " << detid; } - // put collections in event put(lctV, oc_lct, detid, " ME1b LCT digi"); put(alctV, oc_alct, detid, " ME1b ALCT digi"); + put(alctV_all, oc_alct_all, detid, " ME1b ALCT digi"); put(clctV, oc_clct, detid, " ME1b CLCT digi"); + put(clctV_all, oc_clct_all, detid, " ME1b CLCT digi"); put(pretriggerV, oc_pretrigger, detid, " ME1b CLCT pre-trigger digi"); put(preTriggerBXs, oc_pretrig, detid, " ME1b CLCT pre-trigger BX"); put(alctpretriggerV, oc_alctpretrigger, detid, " ME1b ALCT pre-trigger digi"); @@ -234,7 +239,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers, const std::vector& lctV = tmb11GEM->readoutLCTs1b(); const std::vector& lctV1a = tmb11GEM->readoutLCTs1a(); const std::vector& alctV = tmb11GEM->alctProc->readoutALCTs(); + const std::vector& alctV_all = tmb11GEM->alctProc->getALCTs(); const std::vector& clctV = tmb11GEM->clctProc->readoutCLCTsME1b(); + const std::vector& clctV_all = tmb11GEM->clctProc->getCLCTs(); const std::vector& preTriggerBXs = tmb11GEM->clctProc->preTriggerBXs(); const std::vector& pretriggerV = tmb11GEM->clctProc->preTriggerDigisME1b(); const std::vector& clctV1a = tmb11GEM->clctProc->readoutCLCTsME1a(); @@ -250,7 +257,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers, // put collections in event put(lctV, oc_lct, detid, " ME1b LCT digi"); put(alctV, oc_alct, detid, " ME1b ALCT digi"); + put(alctV_all, oc_alct_all, detid, " ME1b ALCT digi"); put(clctV, oc_clct, detid, " ME1b CLCT digi"); + put(clctV_all, oc_clct_all, detid, " ME1b CLCT digi"); put(pretriggerV, oc_pretrigger, detid, " ME1b CLCT pre-trigger digi"); put(preTriggerBXs, oc_pretrig, detid, " ME1b CLCT pre-trigger BX"); put(copads, oc_gemcopad, gemId, " GEM coincidence pad"); @@ -286,7 +295,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers, // get the collections const std::vector& lctV = tmb21GEM->readoutLCTs(); const std::vector& alctV = tmb21GEM->alctProc->readoutALCTs(); + const std::vector& alctV_all = tmb21GEM->alctProc->getALCTs(); const std::vector& clctV = tmb21GEM->clctProc->readoutCLCTs(); + const std::vector& clctV_all = tmb21GEM->clctProc->getCLCTs(); const std::vector& preTriggerBXs = tmb21GEM->clctProc->preTriggerBXs(); const std::vector& pretriggerV = tmb21GEM->clctProc->preTriggerDigis(); const std::vector& copads = tmb21GEM->coPadProcessor->readoutCoPads(); @@ -299,7 +310,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers, // put collections in event put(lctV, oc_lct, detid, " ME21 LCT digi"); put(alctV, oc_alct, detid, " ME21 ALCT digi"); + put(alctV_all, oc_alct_all, detid, " ME21 ALCT digi"); put(clctV, oc_clct, detid, " ME21 CLCT digi"); + put(clctV_all, oc_clct_all, detid, " ME21 CLCT digi"); put(pretriggerV, oc_pretrigger, detid, " ME21 CLCT pre-trigger digi"); put(preTriggerBXs, oc_pretrig, detid, " ME21 CLCT pre-trigger BX"); put(copads, oc_gemcopad, gemId, " GEM coincidence pad"); @@ -315,7 +328,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers, // get the collections const std::vector& lctV = utmb->readoutLCTs(); const std::vector& alctV = utmb->alctProc->readoutALCTs(); + const std::vector& alctV_all = utmb->alctProc->getALCTs(); const std::vector& clctV = utmb->clctProc->readoutCLCTs(); + const std::vector& clctV_all = utmb->clctProc->getCLCTs(); const std::vector& preTriggerBXs = utmb->clctProc->preTriggerBXs(); const std::vector& pretriggerV = utmb->clctProc->preTriggerDigis(); const std::vector& alctpretriggerV = utmb->alctProc->preTriggerDigis(); @@ -327,7 +342,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers, // put collections in event put(lctV, oc_lct, detid, " LCT digi"); put(alctV, oc_alct, detid, " ALCT digi"); + put(alctV_all, oc_alct_all, detid, " ALCT digi"); put(clctV, oc_clct, detid, " CLCT digi"); + put(clctV_all, oc_clct_all, detid, tmb->getCSCName() + " CLCT digi"); put(pretriggerV, oc_pretrigger, detid, " CLCT pre-trigger digi"); put(preTriggerBXs, oc_pretrig, detid, " CLCT pre-trigger BX"); put(alctpretriggerV, oc_alctpretrigger, detid, " ALCT pre-trigger digi"); @@ -341,7 +358,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers, // get the collections const std::vector& lctV = tmb->readoutLCTs(); const std::vector& alctV = tmb->alctProc->readoutALCTs(); + const std::vector& alctV_all = tmb->alctProc->getALCTs(); const std::vector& clctV = tmb->clctProc->readoutCLCTs(); + const std::vector& clctV_all = tmb->clctProc->getCLCTs(); const std::vector& preTriggerBXs = tmb->clctProc->preTriggerBXs(); const std::vector& pretriggerV = tmb->clctProc->preTriggerDigis(); const std::vector& alctpretriggerV = tmb->alctProc->preTriggerDigis(); @@ -353,7 +372,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers, // put collections in event put(lctV, oc_lct, detid, tmb->getCSCName() + " LCT digi"); put(alctV, oc_alct, detid, tmb->getCSCName() + " ALCT digi"); + put(alctV_all, oc_alct_all, detid, tmb->getCSCName() + " ALCT digi"); put(clctV, oc_clct, detid, tmb->getCSCName() + " CLCT digi"); + put(clctV_all, oc_clct_all, detid, tmb->getCSCName() + " CLCT digi"); put(pretriggerV, oc_pretrigger, detid, tmb->getCSCName() + " CLCT pre-trigger digi"); put(preTriggerBXs, oc_pretrig, detid, tmb->getCSCName() + " CLCT pre-trigger BX"); put(alctpretriggerV, oc_alctpretrigger, detid, tmb->getCSCName() + " ALCT pre-trigger digi");