/afs/hep.man.ac.uk/u/markowen/ATLAS/SFrameProof/2011EPS/topUtils/src/JERProvider.h

00001 
00030 #ifndef _JERPROVIDER_
00031 #define _JERPROVIDER_
00032 
00033 #include "TNamed.h"
00034 #include "TFile.h"
00035 #include "TF1.h"
00036 #include <TRandom.h>
00037 #include <iostream>
00038 //#include <stream.h>
00039 #include <cmath>
00040 #include <map>
00041 
00042 using std::cout;
00043 using std::endl;
00044 using std::map;
00045 
00046 class JERProvider : public TNamed
00047 {
00048 
00049  public: 
00050 
00051   // Constructor, destructor
00052   JERProvider() { }
00053   JERProvider(std::string CollectionName, std::string MethodName = "Truth", std::string FileName="JERProviderPlots.root");
00054   virtual ~JERProvider();
00055   
00056   //initialization
00057   void init();
00058 
00059   // Read the parametrization
00060   TF1* getParam(double y);
00061 
00062   // Read sigma
00063   float getSigma(double pt, double y);
00064 
00065   // Read the uncertainty
00066   float getUncert(double pt, double y);
00067 
00068   // inputCollection 
00069   void setInputCollection(std::string CollectionName, std::string MethodName);
00070   
00071 #ifdef JER_STANDALONE
00072         ClassDef(JERProvider,1);
00073 #endif
00074 
00075  private:
00076   
00077   static const int m_nParam = 6;
00078   //static const double m_GeV = 1000.;
00079   static const int m_nY = 6;
00080 
00081   // strings
00082   std::string m_collectionName;
00083   std::string m_methodName;
00084   std::string m_fileName;
00085   
00086   //initialization flag
00087   bool m_isInit;
00088 
00089   // Input file
00090   TFile* m_inputFile; 
00091 
00092   // Pointer to the correct graph
00093   map<int,TF1*> m_jerFunc;
00094 
00095   // Parameters and their errors
00096   map<int,float> m_param;
00097 
00098   // Uncertainty from Data/MC comparison
00099   float m_uncert;
00100 
00101   // Offset from Data/MC comparison
00102   float m_offset;
00103 
00104 };
00105 
00106 #endif

Generated on Thu Jun 30 11:40:04 2011 for manTreeSFrame by  doxygen 1.4.7