# Appending two different branches from two different Tree into one tree

**URL:** <https://root-forum.cern.ch/t/appending-two-different-branches-from-two-different-tree-into-one-tree/55805>\
**Category:** Newbie\
**Tags:** tree\
**Created:** [July 24, 2023, 10:03am UTC](https://root-forum.cern.ch/t/appending-two-different-branches-from-two-different-tree-into-one-tree/55805 "2023-07-24T10:03:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pjana](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/9d8465/32.png) [@pjana](https://root-forum.cern.ch/u/pjana)\
**Post date:** [July 24, 2023, 10:03am UTC](https://root-forum.cern.ch/t/appending-two-different-branches-from-two-different-tree-into-one-tree/55805/1 "2023-07-24T10:03:31Z")

</div>

I have two different branches b1 and b2 in a Tree T1 and another root file with different branches b3, and b4 inside a Tree T2. Is there any way I can append b1 and b2 to T2 Tree?

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [July 24, 2023, 10:47am UTC](https://root-forum.cern.ch/t/appending-two-different-branches-from-two-different-tree-into-one-tree/55805/2 "2023-07-24T10:47:45Z")

</div>

If T2 has more entries that you’d like to process after processing the entries of T1 then use a TChain. If the entries of T2 contain additional information for each corresponding entry of T1 then use `TTree::AddFriend()`.

Let me know if this doesn’t answer your question!
