GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Analysis » vertex fitting
vertex fitting [message #17255] Mon, 08 September 2014 13:26 Go to next message
Alexandros is currently offline  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.Dead));
nd0->Column("vtxposy", (Float_t) d0Vtx.Y());
nd0->Column("vtxposz", (Float_t) d0Vtx.Z());
Re: vertex fitting [message #17256 is a reply to message #17255] Mon, 08 September 2014 14:07 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *gsi.de
Hi Alexandros,

You try to fit a MC-Truth candidate. I have two objections against that: Firstly it does not have a PidCandidate object and not all featureas, esp. Vertexing, are available. Secondly it is the truth and should not be processed by a fitter, because vertex and fourmomenta are true and the truest truth. Smile
Try some reconstructed candidate.

Cheers
Ralf
Re: vertex fitting [message #17257 is a reply to message #17256] Mon, 08 September 2014 14:21 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *lnf.infn.it
I suppose a MC truth has no covariance matrix, then it cannot be fitted.
Re: vertex fitting [message #17263 is a reply to message #17257] Wed, 10 September 2014 11:38 Go to previous messageGo to next message
Alexandros is currently offline  Alexandros
Messages: 51
Registered: January 2014
Location: KVI
continuous participant
From: *kvi-cart.rug.nl
Hi again,
I have one more question..
I am trying to calculate ctau for D0 meson in my analysis(123micrometers)
From the mc the calculation is correct(125micrometers).
From the vertex information I get 185micrometers..
I have looked several times my code and I could not find a single mistake..
Is there a chance, since we are talking about micrometers that the resolution is not good or there is something else wrong??
I attach my code and my results to get an idea..
Thanks!!
Re: vertex fitting [message #17264 is a reply to message #17263] Wed, 10 September 2014 11:57 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *lnf.infn.it
Why you are not fitting in the whole range?
Re: vertex fitting [message #17266 is a reply to message #17264] Wed, 10 September 2014 12:07 Go to previous messageGo to next message
Alexandros is currently offline  Alexandros
Messages: 51
Registered: January 2014
Location: KVI
continuous participant
From: *kvi-cart.rug.nl
It doesn't change anything..
I still have 50-60 micrometers difference Sad
Re: vertex fitting [message #17267 is a reply to message #17266] Wed, 10 September 2014 12:08 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *lnf.infn.it
The mine was a question.
However, to be correct, the reco plot should be corrected for efficiency.
Re: vertex fitting [message #17269 is a reply to message #17267] Wed, 10 September 2014 12:51 Go to previous messageGo to next message
Alexandros is currently offline  Alexandros
Messages: 51
Registered: January 2014
Location: KVI
continuous participant
From: *kvi-cart.rug.nl
I am sorry I didnt get you..
what do you mean by that??
Re: vertex fitting [message #17271 is a reply to message #17269] Wed, 10 September 2014 14:59 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *lnf.infn.it
If you have an efficiency high close to the IP and smaller far, then your fit will be biased. Then, in general, one uses simulation to evaluate the efficiency as a function of the position, and after you use this function to correct your experimental data.
The fact that you have a mean life different from the MC tells you that the reconstruction efficiency is not flat as a function of the distance. But I would not be scared by this.
Re: vertex fitting [message #17272 is a reply to message #17271] Wed, 10 September 2014 15:15 Go to previous message
Alexandros is currently offline  Alexandros
Messages: 51
Registered: January 2014
Location: KVI
continuous participant
From: *kvi-cart.rug.nl
ok then, i will try to find a way of doing what you propose..
thanks a lot!!! Very Happy
Previous Topic: Is there a fast way of histogramming RhoCandLists?
Next Topic: Ds reconstruction - test with trunk rev-25813
Goto Forum:
  


Current Time: Thu Oct 03 15:04:33 CEST 2024

Total time taken to generate the page: 0.00869 seconds