Hello,
I am trying to write a root tree containing TClonesArrays of TParticles.
It seems like I cannot set the split mode for the branch correctly.
When I try to plot for instance the energy distribution of the particles
in the array, I am getting an histogram with always the same value
(62.3). However when I read the tree with a macro and fill a histogram,
I get the correct distribution.
When I run the executable, I get the following error message:
Warning in <TTree::Bronch>: Using split mode on a class: TParticle with
a custom Streamer
Any idea ?
Thanks a lot
Anne-Sylvie
Here is the way I am defining the tree:
TClonesArray* genphotons = new TClonesArray("TParticle");
tree->Branch("genphotons",&genphotons,16000,10);
...................
for(ParticleTree::const_iterator iloop=Genphotons.begin();
iloop!=Genphotons.end();iloop++)
{ (....)
(*genphotons)[genphotons->GetEntries()] = new
TParticle((*iloop)->HepId(),(*iloop)->Status(),
first_mother,last_mother,first_daughter,last_daughter,
(*iloop)->px(),(*iloop)->py(),(*iloop)->pz(),(*iloop)->Energy(),
(*iloop)->x(),(*iloop)->y(),(*iloop)->z(),(*iloop)->t()
);
}
tree->Fill();
--
---------------------------------------------------------
Anne-Sylvie Nicollerat
Swiss Federal Insitute of technology (ETHZ)
Building 32, Office 3-C21, Phone +41 22 767 3585
CERN, CH-1211 Geneva 23
Switzerland
"Pour le croyant Dieu se trouve au début, pour le physicien au terme de
toute pensée." (Planck)
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:20 MET