1 #ifndef PhysicsTools_Utilities_interface_LumiReWeighting_h 2 #define PhysicsTools_Utilities_interface_LumiReWeighting_h 22 #include <boost/shared_ptr.hpp> 45 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. };
108 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. };
174 for (
int ibin=0;ibin<20;ibin++) {
177 Pweight_[ibin] = p0_minus[ibin] + p1_minus[ibin]*Shift + p2_minus[ibin]*Shift*Shift;
180 Pweight_[ibin] = p0_plus[ibin] + p1_plus[ibin]*Shift + p2_plus[ibin]*Shift*Shift;
186 for (
int ibin=20;ibin<25;ibin++) {
188 Pweight_[ibin] = p1_expoM[ibin-20]*
exp(p2_expoM[ibin-20]*Shift);
191 Pweight_[ibin] = p1_expoP[ibin-20]*
exp(p2_expoP[ibin-20]*Shift);
198 if(ibin<25 && ibin>=0) {
return Pweight_[ibin]; }
232 double weight(
int npv ) ;
234 double weight(
float npv ) ;
std::string DataHistName_
boost::shared_ptr< TH1 > MC_distr_
double ShiftWeight(int ibin)
double ShiftWeight(float pvnum)
boost::shared_ptr< TFile > dataFile_
edm::InputTag pileupSumInfoTag_
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_