diff --git a/src/cutFlow.cc b/src/cutFlow.cc index b77e58b..29cf4a6 100644 --- a/src/cutFlow.cc +++ b/src/cutFlow.cc @@ -115,7 +115,7 @@ int main(int argc, char** argv){ for( int iCut = 0 ; iCut < cutFlow.size() ; iCut++ ){ if( ! cutFlow[iCut](ntuple) ) break; for( int iPlot = 0 ; iPlot < plots[iCut].size() ; iPlot++ ){ - weight = ntuple->Weight*lumi*ntuple->puWeight; + weight = ntuple->Weight*lumi*customPUweights(ntuple); if( sampleNames[iSample] == "GJets" ){ weight*=photonTriggerWeight(ntuple)*GJets0p4Weights(ntuple)*dRweights(ntuple); plots[iCut][iPlot].fill(ntuple,weight); diff --git a/src/fragmentationFits.cc b/src/fragmentationFits.cc index 7fe9827..f8a71f5 100644 --- a/src/fragmentationFits.cc +++ b/src/fragmentationFits.cc @@ -104,15 +104,15 @@ int main(int argc, char** argv){ if( ntuple->Photons->at(0).Pt() < 200. ) continue; } - weight = lumi*ntuple->Weight*ntuple->puWeight; + weight = lumi*ntuple->Weight*customPUweights(ntuple); if( reg == skimSamples::kPhoton || reg == skimSamples::kPhotonLDP ) weight*=photonTriggerWeight(ntuple); if( skims.sampleName[iSample] == "GJets" ) weight*=GJets0p4Weights(ntuple)*dRweights(ntuple); - analysisBin = Bins46plot.fill(ntuple,lumi*ntuple->Weight*ntuple->puWeight); - nJetBin = NJetsplot.fill(ntuple,lumi*ntuple->Weight*ntuple->puWeight); - PhotonMinDeltaR_inc.fill(ntuple,lumi*ntuple->Weight*ntuple->puWeight); + analysisBin = Bins46plot.fill(ntuple,lumi*ntuple->Weight*customPUweights(ntuple)); + nJetBin = NJetsplot.fill(ntuple,lumi*ntuple->Weight*customPUweights(ntuple)); + PhotonMinDeltaR_inc.fill(ntuple,lumi*ntuple->Weight*customPUweights(ntuple)); if( analysisBin > 0 && analysisBin <= 46 ){ diff --git a/src/plotObs_baseline.cc b/src/plotObs_baseline.cc index 0bb59a2..b2acfbe 100644 --- a/src/plotObs_baseline.cc +++ b/src/plotObs_baseline.cc @@ -171,7 +171,7 @@ int main(int argc, char** argv){ int numEvents = ntuple->fChain->GetEntries(); ntupleBranchStatus(ntuple); - double weight = 1.; + double weight = 1.0; for( int iEvt = 0 ; iEvt < min(MAX_EVENTS,numEvents) ; iEvt++ ){ //cout << "sample: " << skims.sampleName[iSample] << endl; @@ -189,7 +189,7 @@ int main(int argc, char** argv){ } for( int iPlot = 0 ; iPlot < plotsAllEvents.size() ; iPlot++ ){ - weight = lumi*ntuple->Weight*ntuple->puWeight; + weight = lumi*ntuple->Weight*customPUweights(ntuple); if( reg == skimSamples::kPhoton || reg == skimSamples::kPhotonLDP ) weight *= photonTriggerWeight(ntuple); if( skims.sampleName[iSample] == "GJets" ){ diff --git a/src/plotRzGamma.cc b/src/plotRzGamma.cc index 65c207a..b57b787 100644 --- a/src/plotRzGamma.cc +++ b/src/plotRzGamma.cc @@ -156,7 +156,7 @@ int main(int argc, char** argv){ if( sampleNames[iSample] == "GJets" && ntuple->Photons->at(0).Pt() < 200. ) continue; if( ( region == 0 && !RA2bBaselineCut(ntuple) ) || ( region == 1 && !RA2bLDPBaselineCut(ntuple) ) ) continue; - weight = lumi*ntuple->Weight*ntuple->puWeight;//*photonTriggerWeight(ntuple)); + weight = lumi*ntuple->Weight*customPUweights(ntuple);//*photonTriggerWeight(ntuple)); if( sampleNames[iSample] == "GJets" && DR0p4 ) weight*=GJets0p4Weights(ntuple)*dRweights(ntuple); diff --git a/src/triggerUncertainties.cc b/src/triggerUncertainties.cc index 1fbf97c..47cf7c5 100644 --- a/src/triggerUncertainties.cc +++ b/src/triggerUncertainties.cc @@ -93,9 +93,9 @@ int main(int argc, char** argv){ if( ( region == 0 && !RA2bBaselineCut(ntuple) ) || ( region == 1 && !RA2bLDPBaselineCut(ntuple) ) ) continue; for( int i=0 ; i<100 ; i++ ){ - MHTplot->Fill(ntuple->MHT,photonTriggerWeightRand(ntuple),ntuple->Weight*ntuple->puWeight); - Bins46plot->Fill(fillRA2b46Bins(ntuple),photonTriggerWeightRand(ntuple),ntuple->Weight*ntuple->puWeight); - Bins59plot->Fill(fillRA2b59Bins(ntuple),photonTriggerWeightRand(ntuple),ntuple->Weight*ntuple->puWeight); + MHTplot->Fill(ntuple->MHT,photonTriggerWeightRand(ntuple),ntuple->Weight*customPUweights(ntuple)); + Bins46plot->Fill(fillRA2b46Bins(ntuple),photonTriggerWeightRand(ntuple),ntuple->Weight*customPUweights(ntuple)); + Bins59plot->Fill(fillRA2b59Bins(ntuple),photonTriggerWeightRand(ntuple),ntuple->Weight*customPUweights(ntuple)); } }