I have a few TTrees (in separate TFile’s) that contain aliases. The alias formula changes from TFile to TFile, but the alias name remains the same. It appears that formula this is not entirely carried over if I try to TChain each of these trees together.
e.g.
TTree #1 in TFile=“file1.root”:
T->SetAlias("blah","branch1*1.0+branch2*2.0");
TTree #2 in TFile=“file2.root”:
T->SetAlias("blah","branch1*1.5-branch2*2.5");
Now chain the two trees together…
TChain *ch = new TChain("T");
ch->Add("file1.root");
ch->Add("file2.root");
Drawing blah from the TChain, ends up using just the first alias that I defined in TTree #1.
Hmph. Is the only solution to get rid of the aliases all together and just define a new TBranch using the alias formula, when I fill each TTree?
I’d rather use aliases because it allows me to check the formula used in each TTree…