Fun with Lorentz Rotations

Root’s been choking on this set of commands that I’ve been feeding it:

root [0] TFile f(“lep3.1.root”)
root [1] TChain* tom1=new TChain(“name1”)
root [2] tom1->Add(“lep3.1.root/OTree”)
(Int_t)1
root [3] tom1->Draw(“H_AllHadrons[0].Eta()”)
TCanvas::MakeDefCanvas: created default TCanvas with name c1
root [4] tom1->Draw("(H_AllHadrons[0].Transform(name1.t_boost)).Eta()")

Here H_AllHadrons is a TClonesArray and t_boost is a TLorentzRotation. Command [3] established at least that the .Eta() method for the TClonesArray was functioning. The error I keep getting running [4] is that the method “Transform” is unknown, even though my rootlogon file loads its appropriate library. The specific message I get it this:

Error in TTreeFormula::DefinedVariable: Unknown method:Transform(name1.t_boost).).Eta()

Is there any reason root is so unhappy with the Transform method?

TTreeFormula (and hence the version of TTree::Draw you are using) can only call functions and member functions that takes as argument and returns numerical value. Tranform in your case return an object and hence is not supported.
In order to use this kind of member function you need to use either MakeSelector, MakeProxy or provide a script to TTree::Draw (see TTree::Draw documentation for details).

Cheers,
Philippe.