Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:04

0001 #ifndef CommonTools_Egamma_EffectiveAreas_h
0002 #define CommonTools_Egamma_EffectiveAreas_h
0003 
0004 #include <vector>
0005 #include <string>
0006 
0007 class EffectiveAreas {
0008 public:
0009   // Constructor, destructor
0010   EffectiveAreas(const std::string& filename, const bool quadraticEAflag = false);
0011 
0012   // Accessors
0013   const float getEffectiveArea(float eta) const;
0014   const float getLinearEA(float eta) const;
0015   const float getQuadraticEA(float eta) const;
0016 
0017   // Utility functions
0018   void printEffectiveAreas() const;
0019   void checkConsistency() const;
0020 
0021 private:
0022   // Data members
0023   const std::string filename_;              // effective areas source file name
0024   std::vector<float> absEtaMin_;            // low limit of the eta range
0025   std::vector<float> absEtaMax_;            // upper limit of the eta range
0026   std::vector<float> effectiveAreaValues_;  // effective area for this eta range
0027 
0028   // Following members are for quadratic PU-correction (introduced for cutBasedPhotonID in Run3_122X)
0029   const bool quadraticEAflag_;
0030   std::vector<float> linearEffectiveAreaValues_;
0031   std::vector<float> quadraticEffectiveAreaValues_;
0032 };
0033 
0034 #endif