Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef JETRESOLUTION_H
0002 #define JETRESOLUTION_H
0003 
0004 #include <string>
0005 #include <vector>
0006 
0007 #include <TF1.h>
0008 
0009 class JetCorrectorParameters;
0010 
0011 class JetResolution {
0012   //
0013   // construction / destruction
0014   //
0015 public:
0016   JetResolution();
0017   JetResolution(const std::string& fileName, bool doGaussian = false);
0018   virtual ~JetResolution();
0019 
0020   double parameterEtaEval(const std::string& parameterName, float eta, float pt);
0021 
0022   //
0023   // member functions
0024   //
0025 public:
0026   void initialize(const std::string& fileName, bool doGaussian = false);
0027 
0028   const std::string& name() const { return name_; }
0029 
0030   TF1* resolutionEtaPt(float eta, float pt) const;
0031   TF1* resolution(const std::vector<float>& x, const std::vector<float>& y) const;
0032 
0033   TF1* parameterEta(const std::string& parameterName, float eta);
0034   TF1* parameter(const std::string& parameterName, const std::vector<float>& x);
0035 
0036   const JetCorrectorParameters& parameters(int i) const { return *(parameters_[i]); }
0037 
0038   //
0039   // data members
0040   //
0041 private:
0042   std::string name_;
0043   mutable TF1* resolutionFnc_;
0044   std::vector<TF1*> parameterFncs_;
0045   std::vector<JetCorrectorParameters*> parameters_;
0046 };
0047 
0048 #endif