From 1b91931123d3e25eee6fc61b93727ffbb2406081 Mon Sep 17 00:00:00 2001 From: Samuel Webb Date: Tue, 19 Nov 2019 17:28:16 +0100 Subject: [PATCH] Update to allow different concentrator selections in the silicon CEE, CEH and Scintillator --- .../L1THGCal/interface/HGCalTriggerTools.h | 7 ++ .../HGCalConcentratorProcessorSelection.h | 8 +- .../HGCalConcentratorSuperTriggerCellImpl.h | 3 +- .../HGCalConcentratorProcessorSelection.cc | 76 +++++++++---------- .../python/customTriggerCellSelect.py | 21 ++--- .../python/hgcalConcentratorProducer_cfi.py | 31 ++++---- L1Trigger/L1THGCal/src/HGCalTriggerTools.cc | 12 +++ .../HGCalConcentratorSuperTriggerCellImpl.cc | 20 ++--- .../L1THGCalUtilities/python/concentrator.py | 44 +++++++++-- 9 files changed, 135 insertions(+), 87 deletions(-) diff --git a/L1Trigger/L1THGCal/interface/HGCalTriggerTools.h b/L1Trigger/L1THGCal/interface/HGCalTriggerTools.h index 30accd9d7fc34..474f66cfaec1a 100644 --- a/L1Trigger/L1THGCal/interface/HGCalTriggerTools.h +++ b/L1Trigger/L1THGCal/interface/HGCalTriggerTools.h @@ -85,6 +85,13 @@ class HGCalTriggerTools { static constexpr unsigned kScintillatorPseudoThicknessIndex_ = 3; + enum SubDetectorType { + hgcal_silicon_CEE, + hgcal_silicon_CEH, + hgcal_scintillator, + }; + SubDetectorType getSubDetectorType(const DetId& id) const; + private: const HGCalTriggerGeometryBase* geom_; unsigned eeLayers_; diff --git a/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorProcessorSelection.h b/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorProcessorSelection.h index 34fb445180788..bc1a8dcd17fa1 100644 --- a/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorProcessorSelection.h +++ b/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorProcessorSelection.h @@ -13,7 +13,7 @@ class HGCalConcentratorProcessorSelection : public HGCalConcentratorProcessorBase { private: - enum SelectionType { thresholdSelect, bestChoiceSelect, superTriggerCellSelect, mixedBestChoiceSuperTriggerCell }; + enum SelectionType { thresholdSelect, bestChoiceSelect, superTriggerCellSelect, noSelection }; public: HGCalConcentratorProcessorSelection(const edm::ParameterSet& conf); @@ -23,10 +23,12 @@ class HGCalConcentratorProcessorSelection : public HGCalConcentratorProcessorBas const edm::EventSetup& es) override; private: - SelectionType selectionType_; bool fixedDataSizePerHGCROC_; - bool coarsenTriggerCells_; + std::vector coarsenTriggerCells_; static constexpr int kHighDensityThickness_ = 0; + static constexpr int kNSubDetectors_ = 3; + + std::vector selectionType_; std::unique_ptr thresholdImpl_; std::unique_ptr bestChoiceImpl_; diff --git a/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorSuperTriggerCellImpl.h b/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorSuperTriggerCellImpl.h index 9eae12035325b..c675557723a3e 100644 --- a/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorSuperTriggerCellImpl.h +++ b/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorSuperTriggerCellImpl.h @@ -29,13 +29,14 @@ class HGCalConcentratorSuperTriggerCellImpl { oneBitFraction, equalShare, }; + EnergyDivisionType energyDivisionType_; static constexpr int kHighDensityThickness_ = 0; static constexpr int kOddNumberMask_ = 1; HGCalTriggerTools triggerTools_; bool fixedDataSizePerHGCROC_; - bool coarsenTriggerCells_; + std::vector coarsenTriggerCells_; HGCalCoarseTriggerCellMapping coarseTCmapping_; HGCalCoarseTriggerCellMapping superTCmapping_; diff --git a/L1Trigger/L1THGCal/plugins/concentrator/HGCalConcentratorProcessorSelection.cc b/L1Trigger/L1THGCal/plugins/concentrator/HGCalConcentratorProcessorSelection.cc index cb11784b509ac..42d942b53e5df 100644 --- a/L1Trigger/L1THGCal/plugins/concentrator/HGCalConcentratorProcessorSelection.cc +++ b/L1Trigger/L1THGCal/plugins/concentrator/HGCalConcentratorProcessorSelection.cc @@ -8,27 +8,37 @@ DEFINE_EDM_PLUGIN(HGCalConcentratorFactory, HGCalConcentratorProcessorSelection, HGCalConcentratorProcessorSelection::HGCalConcentratorProcessorSelection(const edm::ParameterSet& conf) : HGCalConcentratorProcessorBase(conf), fixedDataSizePerHGCROC_(conf.getParameter("fixedDataSizePerHGCROC")), - coarsenTriggerCells_(conf.getParameter("coarsenTriggerCells")) { - std::string selectionType(conf.getParameter("Method")); - if (selectionType == "thresholdSelect") { - selectionType_ = thresholdSelect; - thresholdImpl_ = std::make_unique(conf); - } else if (selectionType == "bestChoiceSelect") { - selectionType_ = bestChoiceSelect; - bestChoiceImpl_ = std::make_unique(conf); - } else if (selectionType == "superTriggerCellSelect") { - selectionType_ = superTriggerCellSelect; - superTriggerCellImpl_ = std::make_unique(conf); - } else if (selectionType == "mixedBestChoiceSuperTriggerCell") { - selectionType_ = mixedBestChoiceSuperTriggerCell; - bestChoiceImpl_ = std::make_unique(conf); - superTriggerCellImpl_ = std::make_unique(conf); - } else { + coarsenTriggerCells_(conf.getParameter>("coarsenTriggerCells")), + selectionType_(kNSubDetectors_) { + std::vector selectionType(conf.getParameter>("Method")); + if (selectionType.size() != kNSubDetectors_ || coarsenTriggerCells_.size() != kNSubDetectors_) { throw cms::Exception("HGCTriggerParameterError") - << "Unknown type of concentrator selection '" << selectionType << "'"; + << "Inconsistent number of sub-detectors (should be " << kNSubDetectors_ << ")"; } - if (coarsenTriggerCells_ || fixedDataSizePerHGCROC_) { + for (int subdet = 0; subdet < kNSubDetectors_; subdet++) { + if (selectionType[subdet] == "thresholdSelect") { + selectionType_[subdet] = thresholdSelect; + if (!thresholdImpl_) + thresholdImpl_ = std::make_unique(conf); + } else if (selectionType[subdet] == "bestChoiceSelect") { + selectionType_[subdet] = bestChoiceSelect; + if (!bestChoiceImpl_) + bestChoiceImpl_ = std::make_unique(conf); + } else if (selectionType[subdet] == "superTriggerCellSelect") { + selectionType_[subdet] = superTriggerCellSelect; + if (!superTriggerCellImpl_) + superTriggerCellImpl_ = std::make_unique(conf); + } else if (selectionType[subdet] == "noSelection") { + selectionType_[subdet] = noSelection; + } else { + throw cms::Exception("HGCTriggerParameterError") + << "Unknown type of concentrator selection '" << selectionType[subdet] << "'"; + } + } + + if (std::find(coarsenTriggerCells_.begin(), coarsenTriggerCells_.end(), true) != coarsenTriggerCells_.end() || + fixedDataSizePerHGCROC_) { coarsenerImpl_ = std::make_unique(conf); } } @@ -66,10 +76,12 @@ void HGCalConcentratorProcessorSelection::run(const edm::Handle kHighDensityThickness_)) { + HGCalTriggerTools::SubDetectorType subdet = triggerTools_.getSubDetectorType(module_trigcell.second.at(0).detId()); + + if (coarsenTriggerCells_[subdet] || (fixedDataSizePerHGCROC_ && thickness > kHighDensityThickness_)) { coarsenerImpl_->coarsen(module_trigcell.second, trigCellVecCoarsened); - switch (selectionType_) { + switch (selectionType_[subdet]) { case thresholdSelect: thresholdImpl_->select(trigCellVecCoarsened, trigCellVecOutput); break; @@ -89,15 +101,8 @@ void HGCalConcentratorProcessorSelection::run(const edm::Handleselect(trigCellVecCoarsened, trigCellVecOutput); break; - case mixedBestChoiceSuperTriggerCell: - if (triggerTools_.isEm(module_trigcell.first)) { - bestChoiceImpl_->select(geometry_->getLinksInModule(module_trigcell.first), - geometry_->getModuleSize(module_trigcell.first), - trigCellVecCoarsened, - trigCellVecOutput); - } else { - superTriggerCellImpl_->select(trigCellVecCoarsened, trigCellVecOutput); - } + case noSelection: + trigCellVecOutput = trigCellVecCoarsened; break; default: // Should not happen, selection type checked in constructor @@ -105,7 +110,7 @@ void HGCalConcentratorProcessorSelection::run(const edm::Handleselect(module_trigcell.second, trigCellVecOutput); break; @@ -118,15 +123,8 @@ void HGCalConcentratorProcessorSelection::run(const edm::Handleselect(module_trigcell.second, trigCellVecOutput); break; - case mixedBestChoiceSuperTriggerCell: - if (triggerTools_.isEm(module_trigcell.first)) { - bestChoiceImpl_->select(geometry_->getLinksInModule(module_trigcell.first), - geometry_->getModuleSize(module_trigcell.first), - module_trigcell.second, - trigCellVecOutput); - } else { - superTriggerCellImpl_->select(module_trigcell.second, trigCellVecOutput); - } + case noSelection: + trigCellVecOutput = module_trigcell.second; break; default: // Should not happen, selection type checked in constructor diff --git a/L1Trigger/L1THGCal/python/customTriggerCellSelect.py b/L1Trigger/L1THGCal/python/customTriggerCellSelect.py index 59ae05046f3d6..d30a16e848e6b 100644 --- a/L1Trigger/L1THGCal/python/customTriggerCellSelect.py +++ b/L1Trigger/L1THGCal/python/customTriggerCellSelect.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms import SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi as digiparam -from L1Trigger.L1THGCal.hgcalConcentratorProducer_cfi import threshold_conc_proc, best_conc_proc, supertc_conc_proc, coarsetc_onebitfraction_proc, coarsetc_equalshare_proc, bestchoice_ndata_decentralized, mixedbcstc_conc_proc +from L1Trigger.L1THGCal.hgcalConcentratorProducer_cfi import threshold_conc_proc, best_conc_proc, supertc_conc_proc, coarsetc_onebitfraction_proc, coarsetc_equalshare_proc, bestchoice_ndata_decentralized, custom_conc_proc def custom_triggercellselect_supertriggercell(process, stcSize=supertc_conc_proc.stcSize, @@ -73,16 +73,17 @@ def custom_coarsetc_equalshare(process, return process def custom_triggercellselect_mixedBestChoiceSuperTriggerCell(process, - stcSize=mixedbcstc_conc_proc.stcSize, - type_energy_division=mixedbcstc_conc_proc.type_energy_division, - fixedDataSizePerHGCROC=mixedbcstc_conc_proc.fixedDataSizePerHGCROC, - triggercells=mixedbcstc_conc_proc.NData + stcSize=custom_conc_proc.stcSize, + type_energy_division=custom_conc_proc.type_energy_division, + fixedDataSizePerHGCROC=custom_conc_proc.fixedDataSizePerHGCROC, + triggercells=custom_conc_proc.NData ): - parameters = mixedbcstc_conc_proc.clone(stcSize = stcSize, - type_energy_division = type_energy_division, - fixedDataSizePerHGCROC = fixedDataSizePerHGCROC, - NData=triggercells - ) + parameters = custom_conc_proc.clone(stcSize = stcSize, + type_energy_division = type_energy_division, + fixedDataSizePerHGCROC = fixedDataSizePerHGCROC, + NData=triggercells, + Method = cms.vstring('bestChoiceSelect','superTriggerCellSelect','superTriggerCellSelect'), + ) process.hgcalConcentratorProducer.ProcessorParameters = parameters return process diff --git a/L1Trigger/L1THGCal/python/hgcalConcentratorProducer_cfi.py b/L1Trigger/L1THGCal/python/hgcalConcentratorProducer_cfi.py index 7b4569eae0459..08b7ed94e3fe1 100644 --- a/L1Trigger/L1THGCal/python/hgcalConcentratorProducer_cfi.py +++ b/L1Trigger/L1THGCal/python/hgcalConcentratorProducer_cfi.py @@ -27,10 +27,10 @@ threshold_conc_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'), - Method = cms.string('thresholdSelect'), + Method = cms.vstring(['thresholdSelect']*3), threshold_silicon = cms.double(2.), # MipT threshold_scintillator = cms.double(2.), # MipT - coarsenTriggerCells = cms.bool(False), + coarsenTriggerCells = cms.vuint32(0,0,0), fixedDataSizePerHGCROC = cms.bool(False), ctcSize = cms.vuint32(CTC_SIZE), ) @@ -75,9 +75,9 @@ from L1Trigger.L1THGCal.hgcalVFEProducer_cfi import vfe_proc best_conc_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'), - Method = cms.string('bestChoiceSelect'), + Method = cms.vstring(['bestChoiceSelect']*3), NData = cms.vuint32(bestchoice_ndata_centralized), - coarsenTriggerCells = cms.bool(False), + coarsenTriggerCells = cms.vuint32(0,0,0), fixedDataSizePerHGCROC = cms.bool(False), coarseTCCompression = coarseTCCompression_proc.clone(), superTCCalibration = vfe_proc.clone(), @@ -85,39 +85,40 @@ ) supertc_conc_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'), - Method = cms.string('superTriggerCellSelect'), + Method = cms.vstring(['superTriggerCellSelect']*3), type_energy_division = cms.string('superTriggerCell'),# superTriggerCell,oneBitFraction,equalShare stcSize = cms.vuint32(STC_SIZE), ctcSize = cms.vuint32(CTC_SIZE), fixedDataSizePerHGCROC = cms.bool(False), - coarsenTriggerCells = cms.bool(False), + coarsenTriggerCells = cms.vuint32(0,0,0), superTCCompression = superTCCompression_proc.clone(), coarseTCCompression = coarseTCCompression_proc.clone(), superTCCalibration = vfe_proc.clone(), ) - -mixedbcstc_conc_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'), - Method = cms.string('mixedBestChoiceSuperTriggerCell'), +custom_conc_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'), + Method = cms.vstring('bestChoiceSelect','superTriggerCellSelect','superTriggerCellSelect'), NData = cms.vuint32(bestchoice_ndata_centralized), - coarsenTriggerCells = cms.bool(False), + threshold_silicon = cms.double(2.), # MipT + threshold_scintillator = cms.double(2.), # MipT + coarsenTriggerCells = cms.vuint32(0,0,0), fixedDataSizePerHGCROC = cms.bool(False), type_energy_division = cms.string('superTriggerCell'),# superTriggerCell,oneBitFraction,equalShare stcSize = cms.vuint32(STC_SIZE), ctcSize = cms.vuint32(CTC_SIZE), - supertccompression = superTCCompression_proc.clone(), + superTCCompression = superTCCompression_proc.clone(), coarseTCCompression = coarseTCCompression_proc.clone(), superTCCalibration = vfe_proc.clone(), ) coarsetc_onebitfraction_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'), - Method = cms.string('superTriggerCellSelect'), + Method = cms.vstring(['superTriggerCellSelect']*3), type_energy_division = cms.string('oneBitFraction'), stcSize = cms.vuint32([4]*(MAX_LAYERS+1)+ [8]*(MAX_LAYERS+1)*3), ctcSize = cms.vuint32(CTC_SIZE), fixedDataSizePerHGCROC = cms.bool(True), - coarsenTriggerCells = cms.bool(False), + coarsenTriggerCells = cms.vuint32(0,0,0), oneBitFractionThreshold = cms.double(0.125), oneBitFractionLowValue = cms.double(0.0625), oneBitFractionHighValue = cms.double(0.25), @@ -128,12 +129,12 @@ coarsetc_equalshare_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'), - Method = cms.string('superTriggerCellSelect'), + Method = cms.vstring(['superTriggerCellSelect']*3), type_energy_division = cms.string('equalShare'), stcSize = cms.vuint32([4]*(MAX_LAYERS+1)+ [8]*(MAX_LAYERS+1)*3), ctcSize = cms.vuint32(CTC_SIZE), fixedDataSizePerHGCROC = cms.bool(True), - coarsenTriggerCells = cms.bool(False), + coarsenTriggerCells = cms.vuint32(0,0,0), superTCCompression = superTCCompression_proc.clone(), coarseTCCompression = coarseTCCompression_proc.clone(), superTCCalibration = vfe_proc.clone(), diff --git a/L1Trigger/L1THGCal/src/HGCalTriggerTools.cc b/L1Trigger/L1THGCal/src/HGCalTriggerTools.cc index e1f009376a034..a2550a0511cc0 100644 --- a/L1Trigger/L1THGCal/src/HGCalTriggerTools.cc +++ b/L1Trigger/L1THGCal/src/HGCalTriggerTools.cc @@ -197,6 +197,18 @@ bool HGCalTriggerTools::isSilicon(const DetId& id) const { return silicon; } +HGCalTriggerTools::SubDetectorType HGCalTriggerTools::getSubDetectorType(const DetId& id) const { + SubDetectorType subdet; + if (!isScintillator(id)) { + if (isEm(id)) + subdet = HGCalTriggerTools::hgcal_silicon_CEE; + else + subdet = HGCalTriggerTools::hgcal_silicon_CEH; + } else + subdet = HGCalTriggerTools::hgcal_scintillator; + return subdet; +} + int HGCalTriggerTools::zside(const DetId& id) const { int zside = 0; if (id.det() == DetId::Forward && id.subdetId() != ForwardSubdetector::HFNose) { diff --git a/L1Trigger/L1THGCal/src/concentrator/HGCalConcentratorSuperTriggerCellImpl.cc b/L1Trigger/L1THGCal/src/concentrator/HGCalConcentratorSuperTriggerCellImpl.cc index 6ba1f86eb50a8..daee26d9453cd 100644 --- a/L1Trigger/L1THGCal/src/concentrator/HGCalConcentratorSuperTriggerCellImpl.cc +++ b/L1Trigger/L1THGCal/src/concentrator/HGCalConcentratorSuperTriggerCellImpl.cc @@ -2,7 +2,7 @@ HGCalConcentratorSuperTriggerCellImpl::HGCalConcentratorSuperTriggerCellImpl(const edm::ParameterSet& conf) : fixedDataSizePerHGCROC_(conf.getParameter("fixedDataSizePerHGCROC")), - coarsenTriggerCells_(conf.getParameter("coarsenTriggerCells")), + coarsenTriggerCells_(conf.getParameter>("coarsenTriggerCells")), coarseTCmapping_(conf.getParameter>("ctcSize")), superTCmapping_(conf.getParameter>("stcSize")), calibration_(conf.getParameterSet("superTCCalibration")), @@ -39,15 +39,15 @@ void HGCalConcentratorSuperTriggerCellImpl::createAllTriggerCells( int thickness = 0; std::vector output_ids = superTCmapping_.getConstituentTriggerCells(s.second.getSTCId()); + HGCalTriggerTools::SubDetectorType subdet = triggerTools_.getSubDetectorType(output_ids.at(0)); if (triggerTools_.isSilicon(output_ids.at(0))) { thickness = triggerTools_.thicknessIndex(output_ids.at(0), true); } else if (triggerTools_.isScintillator(output_ids.at(0))) { thickness = HGCalTriggerTools::kScintillatorPseudoThicknessIndex_; } - for (const auto& id : output_ids) { - if (fixedDataSizePerHGCROC_ && thickness > kHighDensityThickness_ && - id != coarseTCmapping_.getRepresentativeDetId(id)) { + if (((fixedDataSizePerHGCROC_ && thickness > kHighDensityThickness_) || coarsenTriggerCells_[subdet]) && + (id != coarseTCmapping_.getRepresentativeDetId(id))) { continue; } @@ -75,9 +75,7 @@ void HGCalConcentratorSuperTriggerCellImpl::createAllTriggerCells( continue; } } - trigCellVecOutput.push_back(triggerCell); - if (energyDivisionType_ == oneBitFraction) { //Get the 1 bit fractions if (id != s.second.getMaxId()) { @@ -87,7 +85,6 @@ void HGCalConcentratorSuperTriggerCellImpl::createAllTriggerCells( } } } - // assign energy for (l1t::HGCalTriggerCell& tc : trigCellVecOutput) { const auto& stc = STCs[superTCmapping_.getCoarseTriggerCellId(tc.detId())]; @@ -99,16 +96,15 @@ void HGCalConcentratorSuperTriggerCellImpl::assignSuperTriggerCellEnergyAndPosit const SuperTriggerCell& stc) const { //Compress and recalibrate STC energy uint32_t compressed_value = getCompressedSTCEnergy(stc); - + HGCalTriggerTools::SubDetectorType subdet = triggerTools_.getSubDetectorType(c.detId()); int thickness = 0; if (triggerTools_.isSilicon(c.detId())) { thickness = triggerTools_.thicknessIndex(c.detId(), true); } else if (triggerTools_.isScintillator(c.detId())) { - thickness = 3; + thickness = HGCalTriggerTools::kScintillatorPseudoThicknessIndex_; } - GlobalPoint point; - if ((fixedDataSizePerHGCROC_ && thickness > kHighDensityThickness_) || coarsenTriggerCells_) { + if ((fixedDataSizePerHGCROC_ && thickness > kHighDensityThickness_) || coarsenTriggerCells_[subdet]) { point = coarseTCmapping_.getCoarseTriggerCellPosition(coarseTCmapping_.getCoarseTriggerCellId(c.detId())); } else { point = triggerTools_.getTCPosition(c.detId()); @@ -128,7 +124,7 @@ void HGCalConcentratorSuperTriggerCellImpl::assignSuperTriggerCellEnergyAndPosit } } else if (energyDivisionType_ == equalShare) { double coarseTriggerCellSize = - coarsenTriggerCells_ + coarsenTriggerCells_[subdet] ? double( coarseTCmapping_.getConstituentTriggerCells(coarseTCmapping_.getCoarseTriggerCellId(stc.getMaxId())) .size()) diff --git a/L1Trigger/L1THGCalUtilities/python/concentrator.py b/L1Trigger/L1THGCalUtilities/python/concentrator.py index 4c24f176e89af..12af5cf7db8d6 100644 --- a/L1Trigger/L1THGCalUtilities/python/concentrator.py +++ b/L1Trigger/L1THGCalUtilities/python/concentrator.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms import SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi as digiparam -from L1Trigger.L1THGCal.hgcalConcentratorProducer_cfi import threshold_conc_proc, best_conc_proc, supertc_conc_proc, coarsetc_onebitfraction_proc, mixedbcstc_conc_proc +from L1Trigger.L1THGCal.hgcalConcentratorProducer_cfi import threshold_conc_proc, best_conc_proc, supertc_conc_proc, coarsetc_onebitfraction_proc, custom_conc_proc def create_supertriggercell(process, inputs, @@ -73,20 +73,50 @@ def create_onebitfraction(process, inputs, def create_mixedfeoptions(process, inputs, - stcSize=supertc_conc_proc.stcSize, - type_energy_division=supertc_conc_proc.type_energy_division, - fixedDataSizePerHGCROC=supertc_conc_proc.fixedDataSizePerHGCROC, - triggercells=best_conc_proc.NData + stcSize=custom_conc_proc.stcSize, + type_energy_division=custom_conc_proc.type_energy_division, + fixedDataSizePerHGCROC=custom_conc_proc.fixedDataSizePerHGCROC, + triggercells=custom_conc_proc.NData ): producer = process.hgcalConcentratorProducer.clone( InputTriggerCells = cms.InputTag('{}:HGCalVFEProcessorSums'.format(inputs)), InputTriggerSums = cms.InputTag('{}:HGCalVFEProcessorSums'.format(inputs)) ) - producer.ProcessorParameters = mixedbcstc_conc_proc.clone( + producer.ProcessorParameters = custom_conc_proc.clone( stcSize = stcSize, type_energy_division = type_energy_division, fixedDataSizePerHGCROC = fixedDataSizePerHGCROC, - NData = triggercells + NData = triggercells, + Method = cms.vstring('bestChoiceSelect','superTriggerCellSelect','superTriggerCellSelect'), + ) + return producer + + +def create_custom(process, inputs, + stcSize=custom_conc_proc.stcSize, + type_energy_division=custom_conc_proc.type_energy_division, + fixedDataSizePerHGCROC=custom_conc_proc.fixedDataSizePerHGCROC, + triggercells=custom_conc_proc.NData, + threshold_silicon=custom_conc_proc.threshold_silicon, # in mipT + threshold_scintillator=custom_conc_proc.threshold_scintillator, # in mipT + Method = custom_conc_proc.Method, + coarsenTriggerCells=custom_conc_proc.coarsenTriggerCells, + ctcSize=custom_conc_proc.ctcSize, + ): + producer = process.hgcalConcentratorProducer.clone( + InputTriggerCells = cms.InputTag('{}:HGCalVFEProcessorSums'.format(inputs)), + InputTriggerSums = cms.InputTag('{}:HGCalVFEProcessorSums'.format(inputs)) + ) + producer.ProcessorParameters = custom_conc_proc.clone( + stcSize = stcSize, + type_energy_division = type_energy_division, + fixedDataSizePerHGCROC = fixedDataSizePerHGCROC, + NData = triggercells, + threshold_silicon = threshold_silicon, # MipT + threshold_scintillator = threshold_scintillator, # MipT + Method = Method, + coarsenTriggerCells=coarsenTriggerCells, + ctcSize = ctcSize, ) return producer