# | 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 = 1; bin <= puWeight_->GetNbinsX(); bin++) |
13 | > | trimmedMC->SetBinContent (bin, mc->GetBinContent (bin)); |
14 | > | puWeight_->Divide (trimmedMC); |
15 | fin->Close (); | |
16 | delete mc; | |
17 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |