CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/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   //
00025   // member functions
00026   //
00027 public:
00028   void initialize(const std::string& fileName,bool doGaussian=false);
00029   
00030   const std::string& name() const { return name_; }
00031   
00032   TF1* resolutionEtaPt(float eta,float pt) const;
00033   TF1* resolution(const std::vector<float>&x, const std::vector<float>&y) const;
00034   
00035   TF1* parameterEta(const std::string& parameterName,float eta);
00036   TF1* parameter(const std::string& parameterName,const std::vector<float>&x);
00037   
00038   const JetCorrectorParameters& parameters(int i) const { return *(parameters_[i]); }
00039   
00040   
00041   //
00042   // data members
00043   //
00044 private:
00045   std::string                          name_;
00046   mutable TF1*                         resolutionFnc_;
00047   std::vector<TF1*>                    parameterFncs_;
00048   std::vector<JetCorrectorParameters*> parameters_;
00049   
00050 };
00051 
00052 
00053 #endif