I am not sure I understand how you plan to use the resulting tree (if you had succeeded in filling it). Almost all the tools used to analyze TTrees requires each ‘corresponding’ entry of all the Branches to be semantically associated. Usually this means that the same entry in each branch belongs to the same ‘Event’ and they can all be retrieved using a single call (eg tree->GetEntry(3) )
If the entry of the branches are not correlated we recommend to use 2 trees:
fTreeMuonInfo = new TTree("fTreeMuonInfo","fTreeMuonInfo");
fTreeMuonInfo->Branch("Single_Muon",&single.runNumber,"runNumber/I:SPDtracklets:pt/F");
fTreeMuonInfoOpposite = new TTree("fTreeMuonInfoOpposite","fTreeMuonInfo");
fTreeMuonInfoOpposite->Branch("Opposite_Muon",&opposite.runNumber,"runNumber/I:SPDtracklets:m/F:pt");and fTreeMuonInfo->Fill(); fTreeMuonInfoOpposite->Fill();
If the entries are correlated then you ought to just call Fill on the single tree …
Cheers,
Philippe.
PS. If the entries are correlated but you are really unable to call TTree::Fill, check TTree::SetEntries