Re: write vector<TLorentzVector> in a branch

From: Asif Saddique <asaddiqu_at_ualberta.ca>
Date: Tue, 27 Mar 2012 17:34:15 -0600


Hi Venkat,

I also tried gSystem->Load("libPhysics.so") but doesn't help & error remains the same.

Thanks for your reply.

Cheers, Asif

On Tue, Mar 27, 2012 at 5:11 PM, Venkatesh Kaushik <venkat.kaushik_at_cern.ch>wrote:

> you might want to
> gSystem->Load("libPhysics.so") if you haven't already.
> cheers,
> Venkat
>
>
> Asif Saddique wrote:
> > Hi Rooters,
> >
> > I am trying to write a vector of TLorentzVector as a branch in a root
> > tree but getting some error. I don't get any compilation error but
> > error when i run the code over the data. I am using root 5.28.
> >
> > The structure of my code is like this:
> >
> > ============================================
> > TFile *file = new TFile("myfile.root","recreate");
> > TTree tcal("tcal","Calibration Tree");
> > vector<TLorentzVector> theJets;
> > tcal.Branch("theJets",&theJets);
> >
> > // EventLoop
> > {
> > //JetLoop
> > {....
> > TLorentzVector jet.............
> > theJets.push_back(jet)
> > }
> > tcal.Fill();
> > }
> > tcal.Write();
> > =============================================
> >
> > When i run this code i get following error:
> > ===============================
> > Error in <TTree::Branch>: The pointer specified for theJets is not of
> > a class or type known to ROOT
> > ===============================
> >
> > Can anyone suggest what's going wrong?
> >
> > Cheers, Asif
> >
> >
>
> --
> =========================================================
> Venkatesh Kaushik
> Research Associate
>
> University of Arizona ATLAS Experiment_at_CERN
> Office: PAS 334 40-1-C11
> Tucson, Arizona Genève, Switzerland
> Tel: +1 520 626 7042 +41 22 76 79137
> venkat_at_physics.arizona.edu venkat.kaushik_at_cern.ch
> http://atlas.physics.arizona.edu/~venkat
> =========================================================
>
>
Received on Wed Mar 28 2012 - 01:34:33 CEST

This archive was generated by hypermail 2.2.0 : Wed Mar 28 2012 - 05:50:02 CEST