# | Line 8 | Line 8 | PUWeight::PUWeight (const string &puFile | |
---|---|---|
8 | mc->SetDirectory (0); | |
9 | puWeight_->SetDirectory (0); | |
10 | mc->Scale (puWeight_->Integral () / mc->Integral ()); | |
11 | < | puWeight_->Divide (mc); |
11 | > | TH1D *trimmedMC = new TH1D("bla","bla",puWeight_->GetNbinsX(),0,puWeight_->GetNbinsX()); |
12 | > | for(int bin = 0; bin != puWeight_->GetNbinsX(); bin++){ |
13 | > | trimmedMC->SetBinContent(bin,puWeight_->GetBinContent(bin)); |
14 | > | } |
15 | > | puWeight_->Divide (trimmedMC); |
16 | fin->Close (); | |
17 | delete mc; | |
18 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |