# Merge pt hard bins for jet-jet MC in PWG-JE

**URL:** <https://root-forum.cern.ch/t/merge-pt-hard-bins-for-jet-jet-mc-in-pwg-je/31923>\
**Category:** Newbie\
**Created:** [December 7, 2018, 7:58am UTC](https://root-forum.cern.ch/t/merge-pt-hard-bins-for-jet-jet-mc-in-pwg-je/31923 "2018-12-07T07:58:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haidar](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/96bed5/32.png) [@Haidar](https://root-forum.cern.ch/u/Haidar)\
**Post date:** [December 7, 2018, 7:58am UTC](https://root-forum.cern.ch/t/merge-pt-hard-bins-for-jet-jet-mc-in-pwg-je/31923/1 "2018-12-07T07:58:03Z")

</div>

Hi,  
I run jj MC for 20 different pt hard bins and obtained 20 root files. I am wondering if someone can point where I can get a script to merge the different pt hard and get the pt cross section.  
Thanks

---

<div class="post-metadata">

**Author:** ![ganis](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ganis/32/12484_2.png) [@ganis](https://root-forum.cern.ch/u/ganis)\
**Post date:** [December 7, 2018, 10:56am UTC](https://root-forum.cern.ch/t/merge-pt-hard-bins-for-jet-jet-mc-in-pwg-je/31923/2 "2018-12-07T10:56:46Z")

</div>

Dear Haidar,

You can merge the 20 ROOT files with the `hadd` tool, available together to the `root` command.  
The interpretation of the result depends on your physics case and is beyond ROOT scope.

G Ganis

---

<div class="post-metadata">

**Author:** ![Haidar](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/96bed5/32.png) [@Haidar](https://root-forum.cern.ch/u/Haidar)\
**Post date:** [December 7, 2018, 12:50pm UTC](https://root-forum.cern.ch/t/merge-pt-hard-bins-for-jet-jet-mc-in-pwg-je/31923/3 "2018-12-07T12:50:41Z")

</div>

Hi Ganis,  
Thanks for the reply. I know of hadd command but what I am looking for is how to produce a plot like the one I attached herein. ![rootforum](https://root-forum.cern.ch/uploads/default/original/3X/a/3/a36848f07124f9b2aa8305ef201da18575db16f5.png)  
Thanks
