CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/CondFormats/JetMETObjects/interface/JetResolution.h

Go to the documentation of this file.
00001 #ifndef JETRESOLUTION_H
00002 #define JETRESOLUTION_H
00003 
00004 #include <string>
00005 #include <vector>
00006 
00007 #include <TF1.h>
00008 
00009 
00010 class JetCorrectorParameters;
00011 
00012 
00013 class JetResolution
00014 {
00015   //
00016   // construction / destruction
00017   //
00018 public:
00019   JetResolution();
00020   JetResolution(const std::string& fileName,bool doGaussian=false);
00021   virtual ~JetResolution();
00022   
00023 
00024   double parameterEtaEval(const std::string& parameterName,float eta, float pt);
00025 
00026   //
00027   // member functions
00028   //
00029 public:
00030   void initialize(const std::string& fileName,bool doGaussian=false);
00031   
00032   const std::string& name() const { return name_; }
00033   
00034   TF1* resolutionEtaPt(float eta,float pt) const;
00035   TF1* resolution(const std::vector<float>&x, const std::vector<float>&y) const;
00036   
00037   TF1* parameterEta(const std::string& parameterName,float eta);
00038   TF1* parameter(const std::string& parameterName,const std::vector<float>&x);
00039   
00040   const JetCorrectorParameters& parameters(int i) const { return *(parameters_[i]); }
00041   
00042   
00043   //
00044   // data members
00045   //
00046 private:
00047   std::string                          name_;
00048   mutable TF1*                         resolutionFnc_;
00049   std::vector<TF1*>                    parameterFncs_;
00050   std::vector<JetCorrectorParameters*> parameters_;
00051   
00052 };
00053 
00054 
00055 #endif