Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 ///
0002 /// Description: Firmware headers
0003 ///
0004 /// Implementation:
0005 ///    Concrete firmware implementations
0006 ///
0007 /// \author: Jim Brooke - University of Bristol
0008 ///
0009 
0010 //
0011 //
0012 
0013 #ifndef Stage2Layer2EGammaAlgorithmFirmware_H
0014 #define Stage2Layer2EGammaAlgorithmFirmware_H
0015 
0016 #include "L1Trigger/L1TCalorimeter/interface/Stage2Layer2EGammaAlgorithm.h"
0017 #include "L1Trigger/L1TCalorimeter/interface/CaloParamsHelper.h"
0018 
0019 namespace l1t {
0020 
0021   // Imp1 is for v1 and v2
0022   class Stage2Layer2EGammaAlgorithmFirmwareImp1 : public Stage2Layer2EGammaAlgorithm {
0023   public:
0024     Stage2Layer2EGammaAlgorithmFirmwareImp1(CaloParamsHelper const* params);  //const CaloMainProcessorParams & dbPars);
0025     ~Stage2Layer2EGammaAlgorithmFirmwareImp1() override = default;
0026     void processEvent(const std::vector<CaloCluster>& clusters,
0027                       const std::vector<CaloTower>& towers,
0028                       std::vector<EGamma>& egammas) override;
0029 
0030   private:
0031     // trimming
0032     l1t::CaloCluster trimCluster(const l1t::CaloCluster& clus);
0033     unsigned int trimmingLutIndex(unsigned int shape, int iEta);
0034     // shape
0035     unsigned int returnShape(const l1t::CaloCluster& clus);
0036     // shape
0037     int returnHoE(const l1t::CaloTower& tow);
0038     // identification
0039     bool idShape(const l1t::CaloCluster& clus, int hwPt);
0040     unsigned int idShapeLutIndex(int iEta, int E, int shape);
0041     // isolation
0042     int isoCalEgHwFootPrint(const l1t::CaloCluster&, const std::vector<l1t::CaloTower>&);
0043     unsigned isoLutIndex(int iEta, unsigned int nrTowers, int E);
0044     // calibration
0045     int calibratedPt(const l1t::CaloCluster& clus, int hwPt);
0046     unsigned int calibrationLutIndex(int iEta, int E, int shape);
0047     bool idHoverE_ext(const l1t::CaloTower tow);
0048 
0049   private:
0050     CaloParamsHelper const* params_;
0051   };
0052 
0053 }  // namespace l1t
0054 
0055 #endif