1 #ifndef PhysicsTools_Utilities_interface_LumiReWeighting_h
2 #define PhysicsTools_Utilities_interface_LumiReWeighting_h
22 #include <boost/shared_ptr.hpp>
44 constexpr double p0_minus[20] = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. };
107 constexpr double p0_plus[20] = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. };
173 for (
int ibin=0;ibin<20;ibin++) {
176 Pweight_[ibin] = p0_minus[ibin] + p1_minus[ibin]*Shift + p2_minus[ibin]*Shift*Shift;
179 Pweight_[ibin] = p0_plus[ibin] + p1_plus[ibin]*Shift + p2_plus[ibin]*Shift*Shift;
185 for (
int ibin=20;ibin<25;ibin++) {
187 Pweight_[ibin] = p1_expoM[ibin-20]*
exp(p2_expoM[ibin-20]*Shift);
190 Pweight_[ibin] = p1_expoP[ibin-20]*
exp(p2_expoP[ibin-20]*Shift);
197 if(ibin<25 && ibin>=0) {
return Pweight_[ibin]; }
226 LumiReWeighting( std::vector< float > MC_distr, std::vector< float > Lumi_distr);
230 double weight(
int npv ) ;
232 double weight(
float npv ) ;
std::string DataHistName_
boost::shared_ptr< TH1 > MC_distr_
double ShiftWeight(int ibin)
double weightOOT(const edm::EventBase &e)
double ShiftWeight(float pvnum)
boost::shared_ptr< TFile > dataFile_
boost::shared_ptr< TFile > generatedFile_
boost::shared_ptr< TH1 > Data_distr_
std::string dataFileName_
boost::shared_ptr< TH1 > weights_
PoissonMeanShifter(float Shift)
std::string generatedFileName_