Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:42

0001 #include "L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorThresholdImpl.h"
0002 
0003 HGCalConcentratorThresholdImpl::HGCalConcentratorThresholdImpl(const edm::ParameterSet& conf)
0004     : threshold_silicon_(conf.getParameter<double>("threshold_silicon")),
0005       threshold_scintillator_(conf.getParameter<double>("threshold_scintillator")) {}
0006 
0007 void HGCalConcentratorThresholdImpl::select(const std::vector<l1t::HGCalTriggerCell>& trigCellVecInput,
0008                                             std::vector<l1t::HGCalTriggerCell>& trigCellVecOutput,
0009                                             std::vector<l1t::HGCalTriggerCell>& trigCellVecNotSelected) {
0010   for (const auto& trigCell : trigCellVecInput) {
0011     bool isScintillator = triggerTools_.isScintillator(trigCell.detId());
0012     double threshold = (isScintillator ? threshold_scintillator_ : threshold_silicon_);
0013     if (trigCell.mipPt() >= threshold) {
0014       trigCellVecOutput.push_back(trigCell);
0015     } else {
0016       trigCellVecNotSelected.push_back(trigCell);
0017     }
0018   }
0019 }