Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-08 22:26:30

0001 #ifndef __L1Trigger_L1THGCal_HGCalConcentratorCoarsenerImpl_h__
0002 #define __L1Trigger_L1THGCal_HGCalConcentratorCoarsenerImpl_h__
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "L1Trigger/L1THGCal/interface/HGCalTriggerTools.h"
0006 #include "L1Trigger/L1THGCal/interface/HGCalCoarseTriggerCellMapping.h"
0007 #include "L1Trigger/L1THGCal/interface/HGCalVFECompressionImpl.h"
0008 #include "L1Trigger/L1THGCal/interface/HGCalTriggerCellCalibration.h"
0009 
0010 class HGCalConcentratorCoarsenerImpl {
0011 public:
0012   HGCalConcentratorCoarsenerImpl(const edm::ParameterSet& conf);
0013 
0014   void coarsen(const std::vector<l1t::HGCalTriggerCell>& trigCellVecInput,
0015                std::vector<l1t::HGCalTriggerCell>& trigCellVecOutput);
0016   void setGeometry(const HGCalTriggerGeometryBase* const geom) {
0017     triggerTools_.setGeometry(geom);
0018     coarseTCmapping_.setGeometry(geom);
0019     calibration_.setGeometry(geom);
0020   }
0021 
0022 private:
0023   HGCalTriggerTools triggerTools_;
0024   bool fixedDataSizePerHGCROC_;
0025   HGCalCoarseTriggerCellMapping coarseTCmapping_;
0026   static constexpr int kHighDensityThickness_ = 0;
0027 
0028   HGCalTriggerCellCalibration calibration_;
0029   HGCalVFECompressionImpl vfeCompression_;
0030 
0031   struct CoarseTC {
0032     float sumPt;
0033     float maxMipPt;
0034     int sumHwPt;
0035     float sumMipPt;
0036     unsigned maxId;
0037   };
0038 
0039   std::unordered_map<uint32_t, CoarseTC> coarseTCs_;
0040 
0041   void updateCoarseTriggerCellMaps(const l1t::HGCalTriggerCell& tc, uint32_t ctcid);
0042   void assignCoarseTriggerCellEnergy(l1t::HGCalTriggerCell& c, const CoarseTC& ctc) const;
0043 };
0044 
0045 #endif