Hi,
Is it possible to do a vector of TLorentzVector, and if yes, how do it ?
(I must put it in a tree)
I have do the following code, but it don't work:
...
TLorentzVector *p4_ph[7] = new TLorentzVector; // array of 7 elements
TTree *res = new TTree("res","res di prova"); // Definisco il tree.
...
res->Branch("p4_ph" ,"TLorentzVector" ,&p4_ph);
for (Int_t j=0; j<7; j++)
{
r = sqrt(eta_fin_par[j*5+1]*eta_fin_par[j*5+1]+
eta_fin_par[j*5+2]*eta_fin_par[j*5+2]+
eta_fin_par[j*5+3]*eta_fin_par[j*5+3]);
p4_ph[j]->SetPxPyPzE((eta_fin_par[j*5]*eta_fin_par[j*5+1])/r,
(eta_fin_par[j*5]*eta_fin_par[j*5+2])/r,
(eta_fin_par[j*5]*eta_fin_par[j*5+3])/r,
eta_fin_par[j*5]);
}
When execute it I have the following error:
*** Break *** segmentation violation
Root > Function Loop() busy flag cleared
Ciao, Francesco.
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:21 MET