GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Analysis » PndKinVtxFitter. Does FitAll() work?
PndKinVtxFitter. Does FitAll() work? [message #16102] Fri, 28 March 2014 12:10 Go to next message
Dima Melnychuk is currently offline  Dima Melnychuk
Messages: 213
Registered: April 2004
Location: National Centre for Nucle...
first-grade participant
From: *fuw.edu.pl
Hi,

I try at the moment to make a comparison of full vs fast simulation for eta_c-> phi phi -> K+ K- K+ K- decay.
I did this analysis for central tracker TDR and I am updating the analysis macro.

I have a problem with vertex fitter PndKinVtxFitter if I want to access fitted daughter particles after the fit.

The code
PndKinVtxFitter vtxfitter(etac_vtx[j]);
vtxfitter.Fit();

works, but dauthers are unfitted:

RhoCandidate *etacfit=etac_vtx[j]->GetFit();
k1 = etacfit->Daughter(0);


I tried
k1 = etacfit->Daughter(0)->GetFit();

and it returns 0.

But the code
PndKinVtxFitter vtxfitter(etac_vtx[j]);
vtxfitter.FitAll();

which should work according to documentation
( https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootAnalysisJu ly13#A_5.1_PndKinVtxFitter_45_Vertex_and_kinematic_fitting)
produce the
chi2_vtx=-9999 (chi2_vtx=vtxfitter.GetChi2()),

whereas with vtxfitter.Fit() chi2 were reasonable values.

So did anybody (means Ralf or Klaus) check PndKinVtxFitter::FitAll()?

Dima
Re: PndKinVtxFitter. Does FitAll() work? [message #16110 is a reply to message #16102] Fri, 28 March 2014 13:25 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
Hello Dima,

It is supposed to work. Please send me a data sample and your analysis macro. I'll check from there.

Cheers
Ralf
Re: PndKinVtxFitter. Does FitAll() work? [message #16112 is a reply to message #16102] Fri, 28 March 2014 13:41 Go to previous messageGo to next message
Dima Melnychuk is currently offline  Dima Melnychuk
Messages: 213
Registered: April 2004
Location: National Centre for Nucle...
first-grade participant
From: *fuw.edu.pl
Hi Ralf,

I put data sample (100 events) and analysis macro (run_ana_etac.C) at gsi network under
/d/panda02/dmelnych/etac_data.tar.gz

Dima
Re: PndKinVtxFitter. Does FitAll() work? [message #16115 is a reply to message #16102] Fri, 28 March 2014 15:02 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 Dima,

I found some issues.

First: I fixed the FitAll() to also fit the head of the decay tree. It was a "logic bug", just update (at least rho).
Second: In your special case Fit() would have sufficed as you only have one decay node in your etac_vtx candidate list.
Third: When selecting your best kaons you tried to access the Fit() of a fitted kaon (etacfit has the fitted daughters), giving you the null pointer.
Fourth: After fixing these things I got more errors in the block which was never reached before. I leave that to you to fix. Wink

Cheers
Ralf
Re: PndKinVtxFitter. Does FitAll() work? [message #16116 is a reply to message #16102] Fri, 28 March 2014 15:20 Go to previous messageGo to next message
Dima Melnychuk is currently offline  Dima Melnychuk
Messages: 213
Registered: April 2004
Location: National Centre for Nucle...
first-grade participant
From: *fuw.edu.pl
Many thanks, Ralf.

So for certanity I would like to clarify how to access fitted daughters.

k1 = etacfit->Daughter(0);

or

k1 = etacfit->Daughter(0)->GetFit();

Or more specific if I do:
PndKinVtxFitter vtxfitter(etac_vtx[j]);
vtxfitter.Fit();
RhoCandidate *etacfit=etac_vtx[j]->GetFit();
k1 = etacfit->Daughter(0);


k1 is fitted or not?

Dima
Re: PndKinVtxFitter. Does FitAll() work? [message #16117 is a reply to message #16116] Fri, 28 March 2014 15:29 Go to previous message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *gsi.de
Dima Melnychuk wrote on Fri, 28 March 2014 15:20

PndKinVtxFitter vtxfitter(etac_vtx[j]);
vtxfitter.Fit();
RhoCandidate *etacfit=etac_vtx[j]->GetFit();
k1 = etacfit->Daughter(0);


k1 is fitted or not?

k1 is fitted.

To understand this concept: The decay tree is copied internally. The fitted tree can be accessed via one call of GetFit(). Then you navigate in the fitted tree via Mother/Daughters relations.

Cheers
Ralf
Previous Topic: invariant mass
Next Topic: PndChiVtxFitter available?
Goto Forum:
  


Current Time: Fri Apr 19 09:01:10 CEST 2024

Total time taken to generate the page: 0.00841 seconds