# Pile up reweighting for different binning

**URL:** <https://root-forum.cern.ch/t/pile-up-reweighting-for-different-binning/29536>\
**Category:** ROOT\
**Tags:** hist\
**Created:** [June 27, 2018, 1:37pm UTC](https://root-forum.cern.ch/t/pile-up-reweighting-for-different-binning/29536 "2018-06-27T13:37:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amandip\_De](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/f08c70/32.png) [@Amandip\_De](https://root-forum.cern.ch/u/Amandip_De)\
**Post date:** [June 27, 2018, 1:37pm UTC](https://root-forum.cern.ch/t/pile-up-reweighting-for-different-binning/29536/1 "2018-06-27T13:37:34Z")

</div>

Dear All,

For pile up reweighting is it possible to use a reweighting file having a different binning with respect to true pile up distribution having equidistant binning in event? While making reweighting file equidistant in bin will defeat the purpose of variation of weight factor as a function of pile up.

Thanks,  
Amandip

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [June 27, 2018, 8:46pm UTC](https://root-forum.cern.ch/t/pile-up-reweighting-for-different-binning/29536/2 "2018-06-27T20:46:13Z")

</div>

Hi Amandip,

what is exactly the concrete feature of ROOT histograms you are after?

Cheers,  
Danilo

---

<div class="post-metadata">

**Author:** ![Amandip\_De](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/f08c70/32.png) [@Amandip\_De](https://root-forum.cern.ch/u/Amandip_De)\
**Post date:** [June 27, 2018, 9:29pm UTC](https://root-forum.cern.ch/t/pile-up-reweighting-for-different-binning/29536/3 "2018-06-27T21:29:04Z")

</div>

Actually for pile up reweighting I have the root file given by twiki of 0-80 with 800 bins. And for my analyzer I need euidistant binning i.e 0-80 80 bins for nPU . Using Rebin will kill the artifact of weight variation per bin. So should I need to generate my own re-weighting root file or I can use this as the binning for both the distribution have to be same.  
[[https://twiki.cern.ch/twiki/bin/viewauth/CMS/HiggsToTauTauWorking2016#PU\_reweighting](https://twiki.cern.ch/twiki/bin/viewauth/CMS/HiggsToTauTauWorking2016#PU_reweighting)]

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [June 28, 2018, 7:15am UTC](https://root-forum.cern.ch/t/pile-up-reweighting-for-different-binning/29536/4 "2018-06-28T07:15:32Z")

</div>

Hi,

the page you link is protected. Isn’t this a question for the CMS community? This forum is dedicated to the ROOT support: is there a missing feature or a problem you’d like to point out with ROOT itself?

Best,  
D

---

<div class="post-metadata">

**Author:** ![Amandip\_De](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/f08c70/32.png) [@Amandip\_De](https://root-forum.cern.ch/u/Amandip_De)\
**Post date:** [June 28, 2018, 10:24am UTC](https://root-forum.cern.ch/t/pile-up-reweighting-for-different-binning/29536/5 "2018-06-28T10:24:26Z")

</div>

Thats right but basically I am trying to change a root file of 0-80 with 800 bins to equidistant binning. Not using Rebin. Using features GetBinCenter(). What can be best way doing that ?

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [June 28, 2018, 10:33am UTC](https://root-forum.cern.ch/t/pile-up-reweighting-for-different-binning/29536/6 "2018-06-28T10:33:13Z")

</div>

For some ideas, see:

> [@Problem in 2D histograms calculations](https://root-forum.cern.ch/t/problem-in-2d-histograms-calculations/26029/11):
>
> Until a proper “rebin” method for 2-D histograms is implemented (if ever), you can try to use the attached macro. [nt2.cc](https://root-forum.cern.ch/uploads/default/original/2X/e/e4dadb39641dc7aade37004e90fc77c33a5a7206.cc) (5.6 KB)

See also the [TH1::Merge](https://root.cern.ch/doc/master/classTH1.html#a79f98f2c56178f4fa07fff0d86171fb6) and this [TH1::Add](https://root.cern.ch/doc/master/classTH1.html#a6da1513d03e7352438bd8356f5038e37) and that [TH1::Add](https://root.cern.ch/doc/master/classTH1.html#a1913bea50293a57b9ee65bf7f65a26e1) method descriptions.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [July 12, 2018, 10:33am UTC](https://root-forum.cern.ch/t/pile-up-reweighting-for-different-binning/29536/7 "2018-07-12T10:33:13Z")

</div>

Closed on July 12, 2018, 10:33am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
