AddFriend with two chains having the same TTree name

I have a first TChain for a set of files that contains a TTree called “mytree”:
TChain* ch1 = new TChain(“mytree”)

I have a second TChain for another set of files that contains a TTree with the same name “mytree”:
TChain* ch2 = new TChain(“mytree”)

How do I make them friends, since they have the same name ??

Use the 2nd argument of AddFriend to give an alternative name to the second chain.

Cheers,
Philippe