00001
00051 #ifndef TELECTRONMCSHIFTERTOOL_H
00052 #define TELECTRONMCSHIFTERTOOL_H
00053
00054 #include <map>
00055 #include <vector>
00056
00057
00062 namespace ElePIDNames{
00068 enum Var {
00069 DeltaPoverP
00070 ,TRTHighTOutliersRatio
00071 ,d0significance
00072 ,deltaeta1
00073 ,deltaphi2
00074 ,deltaphiRescaled
00075 ,eratio
00076 ,f1
00077 ,f3
00078 ,fside
00079 ,reta
00080 ,rhad
00081 ,rphi
00082 ,trackd0pvunbiased
00083 ,weta2
00084 ,ws3
00085 ,wstot
00086 ,e277
00087 ,DeltaE
00088 };
00089 }
00090
00092
00095 class TElectronMCShifterTool{
00096 public:
00098 TElectronMCShifterTool();
00099
00101 ~TElectronMCShifterTool();
00102
00104
00114 double getShiftDelta(double eT, double eta, ElePIDNames::Var var){
00115 int ibin_combined = getShifterEtBin(eT)*6+getShifterEtaBin(eta);
00116 return Shifts[var].at(ibin_combined);
00117 };
00118
00120
00127 double getShiftDeltaByBin(int eT, int eta, ElePIDNames::Var var){
00128 int ibin_combined = getShifterEtBin(eT)*6+getShifterEtaBin(eta);
00129 return Shifts[var].at(ibin_combined);
00130 };
00131
00133
00145 double shiftVar(double eT,double eta,ElePIDNames::Var var,double val);
00146
00148
00156 double shiftVarByBin(int eTBin,int etaBin,ElePIDNames::Var var,double val);
00157
00159
00168 void shiftAll( float eT,
00169 float eta,
00170 float& rhad1 ,
00171 float& rhad ,
00172 float& reta ,
00173 float& rphi ,
00174 float& weta2 ,
00175 float& f1 ,
00176 float& f3 ,
00177 float& fside ,
00178 float& ws3 ,
00179 float& wstot ,
00180 float& eratio ,
00181 float& e277 ,
00182 float& DeltaE ,
00183 float& deltaeta1,
00184 float& deltaphiRescaled
00185 );
00186
00187
00188 std::map<ElePIDNames::Var, std::vector<float> > Shifts;
00190 std::map<ElePIDNames::Var, std::vector<float> > Widths;
00191
00192 private :
00194
00199
00200
00204 unsigned int getShifterEtBin(double eT) const;
00205
00207
00211 unsigned int getShifterEtaBin(double eta) const;
00212
00213 };
00214
00215 #endif