TChain between files with different file names

So I need to TChain different folders in order to perform some analysis on all of them…
The problem is that in these folders there are variables (leaves) with different names.

For example, I need to link together the MonteCarlo simulations for the B->K*gamma and Bs->Phi gamma decays, but they have variables (leaves) such as B0_MM and B_s0_MM etc. respectively.
Therefore, when performing a TChain on them, it happens that the programme calls (for example) B0_MM on a Bs->Phi gamma tree and doesn’t find it. So it complains.

Is there a way of saying “If you don’t find it, move on”?

duplicate of [ … c7383824bf](<TTree::SetBranchStatus>: unknown branch ->