Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 #ifndef _JESUNCERTAINTYPROVIDER_
00053 #define _JESUNCERTAINTYPROVIDER_
00054
00055 #include "TNamed.h"
00056 #include "TFile.h"
00057 #include "TH2D.h"
00058 #include <iostream>
00059 #include <string>
00060 #include <sstream>
00061 #include <cmath>
00062 #include <map>
00063 using std::cout;
00064 using std::map;
00065
00066 class JESUncertaintyProvider : public TNamed
00067 {
00068
00069 public:
00070
00071 enum Components {
00072
00073 CALORIMETER = 1,
00074 NOISETHRESHOLDS = 2,
00075 PERUGIATUNE = 4,
00076 ALPGENHERWIGJIMMY = 8,
00077 ETAINTERCALIBRATION = 16,
00078 CLOSURE = 32,
00079 PILEUP = 64,
00080
00081
00082 NOCLOSURE = 95,
00083 NOPILEUP = 63,
00084 NOPILEUPNOCLOSURE = 31,
00085 ALL = 127
00086 };
00087
00088
00089
00090 JESUncertaintyProvider(std::string CollectionName="AntiKt6H1TopoJets", std::string FileName="JESUncertainty.root");
00091 ~JESUncertaintyProvider();
00092
00093
00094 double getRelUncert(double pT, double Eta, Components UncertComps = JESUncertaintyProvider::NOPILEUP, unsigned int nVtx=1);
00095 double getAbsUncert(double pT, double Eta, Components UncertComps = JESUncertaintyProvider::NOPILEUP, unsigned int nVtx=1);
00096
00097
00098 TH2D* getUncGraphCopy(Components UncertComps = JESUncertaintyProvider::NOPILEUP, unsigned int nVtx=1);
00099
00100
00101 virtual void init();
00102
00103
00104 virtual TFile* openInputFile(std::string FileName = "JESUncertainty.root");
00105
00106 #ifdef JES_STANDALONE
00107 ClassDef(JESUncertaintyProvider,1);
00108 #endif //JES_STANDALONE
00109
00110 protected:
00111
00112
00113 bool setInputCollection(std::string CollectionName);
00114
00115
00116 static const unsigned int m_nUncertainties = 7;
00117
00118
00119 static const unsigned int m_nVertices = 7;
00120
00121
00122 const double m_GeV;
00123
00124
00125 map<int,TH2D*> m_uncGraph;
00126
00127
00128 map<int,TH2D*> m_pileupUncGraph;
00129
00130
00131 TFile* m_inputFile;
00132
00133
00134 double getComponents(int currentBin, Components UncertComps, unsigned int nVtx = 1);
00135
00136
00137 std::string m_collectionName;
00138
00139
00140 std::string m_fileName;
00141
00142
00143 bool m_isInit;
00144
00145 };
00146
00147
00148 #endif