[ROOT] TTree::Draw and TLorentzVectors

From: André Holzner (Andre.Georg.Holzner@cern.ch)
Date: Thu Nov 20 2003 - 17:09:53 MET


Hello,

I create a tree containing two TLorentzVectors per event:

   TLorentzVector *tau1 = new TLorentzVector;
   TLorentzVector *tau2 = new TLorentzVector;

   tree->Branch("tau1","TLorentzVector",&tau1);
   tree->Branch("tau2","TLorentzVector",&tau2);


   for (...)
     {
       tau1->Set...
       tau2->Set...

       tree->Fill();
     }


Is it possible to plot e.g. the invariant mass of tau1 and
tau2 in each event (without having to loop over each event
by hand) ?

I tried things like:

   tree->Draw("(tau1 + tau2).Mag()")

but it seems not to work (using 3.10/01)...


thanks for any advice,

André



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET