Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Stage1Layer2TauAlgorithmImp_h
0002 #define Stage1Layer2TauAlgorithmImp_h
0003 
0004 #include "L1Trigger/L1TCalorimeter/interface/Stage1Layer2TauAlgorithm.h"
0005 #include "L1Trigger/L1TCalorimeter/interface/Stage1Layer2JetAlgorithmImp.h"
0006 #include "L1Trigger/L1TCalorimeter/interface/CaloParamsHelper.h"
0007 
0008 #include "L1Trigger/L1TCalorimeter/interface/Stage1TauIsolationLUT.h"
0009 
0010 #include <memory>
0011 //  This is the implementation of the Stage1Layer2TauAlgorithm abstract base class.
0012 //  This class will be used to find sngle high pt tracks in heavy ion collisions.
0013 
0014 namespace l1t {
0015 
0016   class Stage1Layer2SingleTrackHI : public Stage1Layer2TauAlgorithm {
0017   public:
0018     Stage1Layer2SingleTrackHI(CaloParamsHelper const* params);
0019     ~Stage1Layer2SingleTrackHI() override = default;
0020     void processEvent(const std::vector<l1t::CaloEmCand>& clusters,
0021                       const std::vector<l1t::CaloRegion>& regions,
0022                       std::vector<l1t::Tau>* isoTaus,
0023                       std::vector<l1t::Tau>* taus) override;
0024 
0025   private:
0026     CaloParamsHelper const* const params_;
0027   };
0028 
0029   class Stage1Layer2TauAlgorithmImpPP : public Stage1Layer2TauAlgorithm {
0030   public:
0031     Stage1Layer2TauAlgorithmImpPP(CaloParamsHelper const* params);
0032     ~Stage1Layer2TauAlgorithmImpPP() override = default;
0033     void processEvent(const std::vector<l1t::CaloEmCand>& EMCands,
0034                       const std::vector<l1t::CaloRegion>& regions,
0035                       std::vector<l1t::Tau>* isoTaus,
0036                       std::vector<l1t::Tau>* taus) override;
0037 
0038   private:
0039     CaloParamsHelper const* const params_;
0040 
0041     string findNESW(int ieta, int iphi, int neta, int nphi) const;
0042 
0043     double JetIsolation(int et, int ieta, int iphi, const std::vector<l1t::Jet>& jets) const;
0044 
0045     unsigned isoLutIndex(unsigned int tauPt, unsigned int jetPt) const;
0046 
0047     int AssociatedJetPt(int ieta, int iphi, const std::vector<l1t::Jet>* jets) const;
0048   };
0049 
0050   class Stage1Layer2TauAlgorithmImpHW : public Stage1Layer2TauAlgorithm {
0051   public:
0052     Stage1Layer2TauAlgorithmImpHW(CaloParamsHelper const* params);
0053     ~Stage1Layer2TauAlgorithmImpHW() override = default;
0054     void processEvent(const std::vector<l1t::CaloEmCand>& EMCands,
0055                       const std::vector<l1t::CaloRegion>& regions,
0056                       std::vector<l1t::Tau>* isoTaus,
0057                       std::vector<l1t::Tau>* taus) override;
0058 
0059   private:
0060     CaloParamsHelper const* const params_;
0061     std::unique_ptr<Stage1TauIsolationLUT> isoTauLut;
0062 
0063     string findNESW(int ieta, int iphi, int neta, int nphi) const;
0064 
0065     double JetIsolation(int et, int ieta, int iphi, const std::vector<l1t::Jet>& jets) const;
0066 
0067     unsigned isoLutIndex(unsigned int tauPt, unsigned int jetPt) const;
0068 
0069     int AssociatedJetPt(int ieta, int iphi, const std::vector<l1t::Jet>* jets) const;
0070   };
0071 }  // namespace l1t
0072 #endif