Dear ROOT experts,
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')
If this is not allowed, then would an easier solution be to rename the trees, such that it is consistent for all files?
Thanks in advance!
I checked the TChain page and what you are proposing shouldn’t work.
Rename the tree instead for sure will work.
Thanks Stefano! I will try that solution.
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:
(see the doc).
Thanks Enrico! This worked perfectly for my case.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.