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 /// Collects concrete algorithm implmentations.
0006 ///
0007 /// \author: R. Alex Barbieri MIT
0008 ///          Kalanand Mishra, Fermilab
0009 ///
0010 
0011 //
0012 // This header file contains the class definitions for all of the concrete
0013 // implementations of the firmware interface. The Stage1Layer2FirmwareFactory
0014 // selects the appropriate implementation based on the firmware version in the
0015 // configuration.
0016 //
0017 
0018 #ifndef L1TCALOSTAGE1EGAMMAALGORITHMIMP_H
0019 #define L1TCALOSTAGE1EGAMMAALGORITHMIMP_H
0020 
0021 #include "L1Trigger/L1TCalorimeter/interface/Stage1Layer2EGammaAlgorithm.h"
0022 #include "L1Trigger/L1TCalorimeter/interface/CaloParamsHelper.h"
0023 
0024 namespace l1t {
0025 
0026   class Stage1Layer2EGammaAlgorithmImpPP : public Stage1Layer2EGammaAlgorithm {
0027   public:
0028     Stage1Layer2EGammaAlgorithmImpPP(CaloParamsHelper const* params);
0029     ~Stage1Layer2EGammaAlgorithmImpPP() override = default;
0030     void processEvent(const std::vector<l1t::CaloEmCand>& EMCands,
0031                       const std::vector<l1t::CaloRegion>& regions,
0032                       const std::vector<l1t::Jet>* jets,
0033                       std::vector<l1t::EGamma>* egammas) override;
0034 
0035   private:
0036     CaloParamsHelper const* const params_;
0037     double Isolation(int ieta, int iphi, const std::vector<l1t::CaloRegion>& regions) const;
0038     double HoverE(int et, int ieta, int iphi, const std::vector<l1t::CaloRegion>& regions) const;
0039     int AssociatedJetPt(int ieta, int iphi, const std::vector<l1t::Jet>* jets) const;
0040 
0041     unsigned isoLutIndex(unsigned int etaPt, unsigned int jetPt) const;
0042   };
0043 
0044   class Stage1Layer2EGammaAlgorithmImpHI : public Stage1Layer2EGammaAlgorithm {
0045   public:
0046     Stage1Layer2EGammaAlgorithmImpHI(CaloParamsHelper const* params);
0047     ~Stage1Layer2EGammaAlgorithmImpHI() override = default;
0048     void processEvent(const std::vector<l1t::CaloEmCand>& EMCands,
0049                       const std::vector<l1t::CaloRegion>& regions,
0050                       const std::vector<l1t::Jet>* jets,
0051                       std::vector<l1t::EGamma>* egammas) override;
0052 
0053   private:
0054     CaloParamsHelper const* const params_;
0055     double Isolation(int ieta, int iphi, const std::vector<l1t::CaloRegion>& regions) const;
0056     double HoverE(int et, int ieta, int iphi, const std::vector<l1t::CaloRegion>& regions) const;
0057     int AssociatedJetPt(int ieta, int iphi, const std::vector<l1t::Jet>* jets) const;
0058 
0059     unsigned isoLutIndex(unsigned int etaPt, unsigned int jetPt) const;
0060   };
0061 
0062   class Stage1Layer2EGammaAlgorithmImpHW : public Stage1Layer2EGammaAlgorithm {
0063   public:
0064     Stage1Layer2EGammaAlgorithmImpHW(CaloParamsHelper const* params);
0065     ~Stage1Layer2EGammaAlgorithmImpHW() override = default;
0066     void processEvent(const std::vector<l1t::CaloEmCand>& EMCands,
0067                       const std::vector<l1t::CaloRegion>& regions,
0068                       const std::vector<l1t::Jet>* jets,
0069                       std::vector<l1t::EGamma>* egammas) override;
0070 
0071   private:
0072     CaloParamsHelper const* const params_;
0073     int AssociatedJetPt(int ieta, int iphi, const std::vector<l1t::Jet>* jets) const;
0074 
0075     unsigned isoLutIndex(unsigned int etaPt, unsigned int jetPt) const;
0076   };
0077 
0078 }  // namespace l1t
0079 
0080 #endif