Skip to content

Commit

Permalink
Merge pull request #28467 from dildick/from-CMSSW_11_0_X_2019-11-20-1…
Browse files Browse the repository at this point in the history
…100-Save-ALL-ALCTs-CLCTs

Option to write out all ALCTs and CLCTs
  • Loading branch information
cmsbuild authored Dec 9, 2019
2 parents b6a7209 + 2118774 commit 431e2fd
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ CSCTriggerPrimitivesProducer::CSCTriggerPrimitivesProducer(const edm::ParameterS
: edm::InputTag("");
checkBadChambers_ = conf.getParameter<bool>("checkBadChambers");

writeOutAllCLCTs_ = conf.getParameter<bool>("writeOutAllCLCTs");

writeOutAllALCTs_ = conf.getParameter<bool>("writeOutAllALCTs");

savePreTriggers_ = conf.getParameter<bool>("savePreTriggers");

// check whether you need to run the integrated local triggers
Expand All @@ -63,6 +67,13 @@ CSCTriggerPrimitivesProducer::CSCTriggerPrimitivesProducer(const edm::ParameterS
// register what this produces
produces<CSCALCTDigiCollection>();
produces<CSCCLCTDigiCollection>();
// for experimental simulation studies
if (writeOutAllCLCTs_) {
produces<CSCCLCTDigiCollection>("All");
}
if (writeOutAllALCTs_) {
produces<CSCALCTDigiCollection>("All");
}
produces<CSCCLCTPreTriggerDigiCollection>();
produces<CSCCLCTPreTriggerCollection>();
produces<CSCALCTPreTriggerDigiCollection>();
Expand Down Expand Up @@ -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<CSCALCTDigiCollection> oc_alct(new CSCALCTDigiCollection);
std::unique_ptr<CSCALCTDigiCollection> oc_alct_all(new CSCALCTDigiCollection);
std::unique_ptr<CSCCLCTDigiCollection> oc_clct(new CSCCLCTDigiCollection);
std::unique_ptr<CSCCLCTDigiCollection> oc_clct_all(new CSCCLCTDigiCollection);
std::unique_ptr<CSCCLCTPreTriggerDigiCollection> oc_clctpretrigger(new CSCCLCTPreTriggerDigiCollection);
std::unique_ptr<CSCALCTPreTriggerDigiCollection> oc_alctpretrigger(new CSCALCTPreTriggerDigiCollection);
std::unique_ptr<CSCCLCTPreTriggerCollection> oc_pretrig(new CSCCLCTPreTriggerCollection);
Expand Down Expand Up @@ -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,
Expand All @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ class CSCTriggerPrimitivesProducer : public edm::global::EDProducer<edm::StreamC
// switch to for enabling checking against the list of bad chambers
bool checkBadChambers_;

// write out all CLCTs
// only relevant when CSCConstants::MAX_CLCTS_PER_PROCESSOR is > 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_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -173,7 +175,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers,
const std::vector<CSCCorrelatedLCTDigi>& lctV = tmb11->readoutLCTs1b();
const std::vector<CSCCorrelatedLCTDigi>& lctV1a = tmb11->readoutLCTs1a();
const std::vector<CSCALCTDigi>& alctV = tmb11->alctProc->readoutALCTs();
const std::vector<CSCALCTDigi>& alctV_all = tmb11->alctProc->getALCTs();
const std::vector<CSCCLCTDigi>& clctV = tmb11->clctProc->readoutCLCTsME1b();
const std::vector<CSCCLCTDigi>& clctV_all = tmb11->clctProc->getCLCTs();
const std::vector<int> preTriggerBXs = tmb11->clctProc->preTriggerBXs();
const std::vector<CSCCLCTPreTriggerDigi>& pretriggerV = tmb11->clctProc->preTriggerDigisME1b();
const std::vector<CSCCLCTDigi>& clctV1a = tmb11->clctProc->readoutCLCTsME1a();
Expand All @@ -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");
Expand Down Expand Up @@ -234,7 +239,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers,
const std::vector<CSCCorrelatedLCTDigi>& lctV = tmb11GEM->readoutLCTs1b();
const std::vector<CSCCorrelatedLCTDigi>& lctV1a = tmb11GEM->readoutLCTs1a();
const std::vector<CSCALCTDigi>& alctV = tmb11GEM->alctProc->readoutALCTs();
const std::vector<CSCALCTDigi>& alctV_all = tmb11GEM->alctProc->getALCTs();
const std::vector<CSCCLCTDigi>& clctV = tmb11GEM->clctProc->readoutCLCTsME1b();
const std::vector<CSCCLCTDigi>& clctV_all = tmb11GEM->clctProc->getCLCTs();
const std::vector<int>& preTriggerBXs = tmb11GEM->clctProc->preTriggerBXs();
const std::vector<CSCCLCTPreTriggerDigi>& pretriggerV = tmb11GEM->clctProc->preTriggerDigisME1b();
const std::vector<CSCCLCTDigi>& clctV1a = tmb11GEM->clctProc->readoutCLCTsME1a();
Expand All @@ -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");
Expand Down Expand Up @@ -286,7 +295,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers,
// get the collections
const std::vector<CSCCorrelatedLCTDigi>& lctV = tmb21GEM->readoutLCTs();
const std::vector<CSCALCTDigi>& alctV = tmb21GEM->alctProc->readoutALCTs();
const std::vector<CSCALCTDigi>& alctV_all = tmb21GEM->alctProc->getALCTs();
const std::vector<CSCCLCTDigi>& clctV = tmb21GEM->clctProc->readoutCLCTs();
const std::vector<CSCCLCTDigi>& clctV_all = tmb21GEM->clctProc->getCLCTs();
const std::vector<int>& preTriggerBXs = tmb21GEM->clctProc->preTriggerBXs();
const std::vector<CSCCLCTPreTriggerDigi>& pretriggerV = tmb21GEM->clctProc->preTriggerDigis();
const std::vector<GEMCoPadDigi>& copads = tmb21GEM->coPadProcessor->readoutCoPads();
Expand All @@ -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");
Expand All @@ -315,7 +328,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers,
// get the collections
const std::vector<CSCCorrelatedLCTDigi>& lctV = utmb->readoutLCTs();
const std::vector<CSCALCTDigi>& alctV = utmb->alctProc->readoutALCTs();
const std::vector<CSCALCTDigi>& alctV_all = utmb->alctProc->getALCTs();
const std::vector<CSCCLCTDigi>& clctV = utmb->clctProc->readoutCLCTs();
const std::vector<CSCCLCTDigi>& clctV_all = utmb->clctProc->getCLCTs();
const std::vector<int>& preTriggerBXs = utmb->clctProc->preTriggerBXs();
const std::vector<CSCCLCTPreTriggerDigi>& pretriggerV = utmb->clctProc->preTriggerDigis();
const std::vector<CSCALCTPreTriggerDigi>& alctpretriggerV = utmb->alctProc->preTriggerDigis();
Expand All @@ -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");
Expand All @@ -341,7 +358,9 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers,
// get the collections
const std::vector<CSCCorrelatedLCTDigi>& lctV = tmb->readoutLCTs();
const std::vector<CSCALCTDigi>& alctV = tmb->alctProc->readoutALCTs();
const std::vector<CSCALCTDigi>& alctV_all = tmb->alctProc->getALCTs();
const std::vector<CSCCLCTDigi>& clctV = tmb->clctProc->readoutCLCTs();
const std::vector<CSCCLCTDigi>& clctV_all = tmb->clctProc->getCLCTs();
const std::vector<int>& preTriggerBXs = tmb->clctProc->preTriggerBXs();
const std::vector<CSCCLCTPreTriggerDigi>& pretriggerV = tmb->clctProc->preTriggerDigis();
const std::vector<CSCALCTPreTriggerDigi>& alctpretriggerV = tmb->alctProc->preTriggerDigis();
Expand All @@ -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");
Expand Down

0 comments on commit 431e2fd

Please sign in to comment.