I am trying to add trees with different names using TChain. For eg, I want to add ‘SUSYGluGluToHToAA_AToGG_M_60_TuneCUETP8M1_13TeV_pythia8_13TeV’ and SUSYGluGluToHToAA_AToGG_M_55_TuneCUETP8M1_13TeV_pythia8_13TeV’ together.
Is the following allowed?
for fi,f in enumerate(Files):
ch = TChain('SUSYGluGluToHToAA_AToGG_M_*_TuneCUETP8M1_13TeV_pythia8_13TeV')
ch.Add(f[0])
If this is not allowed, then would an easier solution be to rename the trees, such that it is consistent for all files?
Hi Tanvi,
like @Dilicus says TChain does not support glob patterns for tree names (e.g. no * wildcard allowed).
Renaming the Trees would certainly make things easier.
Otherwise, the way to add trees with different names (but compatible structure) to a TChain is: