Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:54

0001 #ifndef RecoEgamma_EgammaIsolationAlgos_EgammaL1TkIsolation_h
0002 #define RecoEgamma_EgammaIsolationAlgos_EgammaL1TkIsolation_h
0003 
0004 #include "DataFormats/L1TrackTrigger/interface/L1Track.h"
0005 #include "DataFormats/TrackReco/interface/TrackBase.h"
0006 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0009 
0010 //author S. Harper (RAL/CERN)
0011 //based on the work of Swagata Mukherjee and Giulia Sorrentino
0012 
0013 class EgammaL1TkIsolation {
0014 public:
0015   explicit EgammaL1TkIsolation(const edm::ParameterSet& para);
0016 
0017   static void fillPSetDescription(edm::ParameterSetDescription& desc);
0018   static edm::ParameterSetDescription makePSetDescription() {
0019     edm::ParameterSetDescription desc;
0020     fillPSetDescription(desc);
0021     return desc;
0022   }
0023 
0024   std::pair<int, double> calIsol(const reco::TrackBase& trk, const L1TrackCollection& l1Tks) const;
0025 
0026   std::pair<int, double> calIsol(const double objEta,
0027                                  const double objPhi,
0028                                  const double objZ,
0029                                  const L1TrackCollection& l1Tks) const;
0030 
0031   //little helper function for the two calIsol functions for it to directly return the pt
0032   template <typename... Args>
0033   double calIsolPt(Args&&... args) const {
0034     return calIsol(std::forward<Args>(args)...).second;
0035   }
0036 
0037 private:
0038   struct TrkCuts {
0039     float minPt;
0040     float minDR2;
0041     float maxDR2;
0042     float minDEta;
0043     float maxDZ;
0044     explicit TrkCuts(const edm::ParameterSet& para);
0045     static edm::ParameterSetDescription makePSetDescription();
0046   };
0047 
0048   size_t etaBinNr(double eta) const;
0049   static bool passTrkSel(const L1Track& trk,
0050                          const double trkPt,
0051                          const TrkCuts& cuts,
0052                          const double objEta,
0053                          const double objPhi,
0054                          const double objZ);
0055 
0056   bool useAbsEta_;
0057   std::vector<double> etaBoundaries_;
0058   std::vector<TrkCuts> trkCuts_;
0059 };
0060 
0061 #endif