# How to merge trees in a root file

**URL:** <https://root-forum.cern.ch/t/how-to-merge-trees-in-a-root-file/28658>\
**Category:** ROOT\
**Created:** [April 12, 2018, 7:20am UTC](https://root-forum.cern.ch/t/how-to-merge-trees-in-a-root-file/28658 "2018-04-12T07:20:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marziyeh](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/51bf81/32.png) [@Marziyeh](https://root-forum.cern.ch/u/Marziyeh)\
**Post date:** [April 12, 2018, 7:20am UTC](https://root-forum.cern.ch/t/how-to-merge-trees-in-a-root-file/28658/1 "2018-04-12T07:20:40Z")

</div>

Dear Root user  
Good day

I get a root Phase space with Gate with 10 to power of 6 particles. Gate code produce a root file but it have 5 trees. How Can I merge them to each other?  
I attach a screenshot of my root file

Best  
Marziyeh

 ![Screenshot%20from%202018-04-12%2011-44-56](https://root-forum.cern.ch/uploads/default/original/3X/b/9/b9c48ae9f03efe76dc2e7e7cc99ffecd1b8c4f14.png)

---

<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:** [April 12, 2018, 7:23am UTC](https://root-forum.cern.ch/t/how-to-merge-trees-in-a-root-file/28658/2 "2018-04-12T07:23:26Z")

</div>

> [@Aux;1 aux;2 aux3;](https://root-forum.cern.ch/t/aux-1-aux-2-aux3/13345):
>
> Hello! I’m filling a tree and after I, sometimes, get this funny behavior AUX;1 AUX;2 with the same histograms inside but with different events in each ;1 and ;2… Can somebody please tell me why this is happening? Many thanks, Stefanos

---

<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:** [April 26, 2018, 7:23am UTC](https://root-forum.cern.ch/t/how-to-merge-trees-in-a-root-file/28658/3 "2018-04-26T07:23:27Z")

</div>

Closed on April 26, 2018, 7:23am UTC

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