vertex fitting [message #17255] |
Mon, 08 September 2014 13:26 |
Alexandros
Messages: 51 Registered: January 2014 Location: KVI
|
continuous participant |
From: *kvi-cart.rug.nl
|
|
Hi all,
Is there something wrong with the code below??Because I get a segmentation break with these lines and without everything works perfectly..
The problem seems to be in the red line...
Any ideas??
// store the 4-vector of the truth matched candidate (or a dummy, if not matched to keep ntuple consistent)
RhoCandidate *truth = d0[j]->GetMcTruth();
TLorentzVector lv;
if (truth) lv = truth->P4();
qa.qaP4("trd0", lv, nd0);
PndKinVtxFitter *vtxfitter=new PndKinVtxFitter(truth); // instantiate a vertex fitter
vtxfitter->Fit();
RhoCandidate *d0fitvtx = truth->GetFit(); // access the fitted cand
Float_t chi2_vtx = vtxfitter->GetChi2(); // access chi2 of fit
Float_t prob_vtx = vtxfitter->GetProb(); // access probability of fit
TVector3 d0Vtx = d0fitvtx->Pos(); // and the decay vertex position
nd0->Column("vtxprob", (Float_t) prob_vtx);
nd0->Column("vtxchi2", (Float_t) chi2_vtx);
nd0->Column("vtxposx", (Float_t) d0Vtx.));
nd0->Column("vtxposy", (Float_t) d0Vtx.Y());
nd0->Column("vtxposz", (Float_t) d0Vtx.Z());
|
|
|
|
|
|
|
|
|
|
|
|