GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Fast Simulations » [FIXED] Problems with PndKinFitter::AddMassConstraint
icon8.gif  [FIXED] Problems with PndKinFitter::AddMassConstraint [message #16518] Mon, 05 May 2014 17:54 Go to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Dear all,
most probably the "analysis" topic would be better, but since I did the tests with fast sim then I report here.

I run the standard psi(2S) -> J/psi pi+ pi- which you can find in macro/scrut simulation macros. I modified the analysis macro (ana_ste.C) in order to have montecarlo ID and to plot some variables from the fit. The analysis macro is attached.

If I take my J/psi pi+pi- combinations (psi) and put a 4 constraint fit:

	PndKinFitter kinfit(psi2s[j]);
        kinfit.Add4MomConstraint(ini);
	kinfit.Fit();


I have decent results:

index.php?t=getfile&id=7840&private=0

You can see the original invariant mass, the fitted invariant mass (RMS from 48 MeV to 50 KeV), chi2 peaked around 3 (4 degrees of freedom), flat probability between 0 and 1.

But if I try to apply a mass constraint fit to only the mu+mu- (J/psi):

	PndKinFitter mfitter(jpsi[j]);		// instantiate the PndKinFitter in psi(2S)
	mfitter.AddMassConstraint(m0_jpsi);	// add the mass constraint
	mfitter.Fit();						// do fit
			



Then the results are not so fine:

index.php?t=getfile&id=7841&private=0

Invariant mass before and after the fit (RMS from 46 MeV top 6 MeV, which is a big value considering that it is a mass constraint fit and it should be a delta, 1 NDF), chi2 peaked at very low values, and prob not flat.

I would say tht the AddMassConstraint function has some problems.
  • Attachment: psi.gif
    (Size: 12.89KB, Downloaded 862 times)
  • Attachment: jpsi.gif
    (Size: 11.51KB, Downloaded 912 times)
  • Attachment: ana_ste.C
    (Size: 6.94KB, Downloaded 487 times)

[Updated on: Fri, 12 September 2014 10:33]

Report message to a moderator

Re: Problems with PndKinFitter::AddMassConstraint [message #16519 is a reply to message #16518] Tue, 06 May 2014 10:39 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
For completeness I attach here the plots obtained with full reco. The behavious is the same of the fast sim.

psi(2S)

index.php?t=getfile&id=7843&private=0

J/psi

index.php?t=getfile&id=7844&private=0
  • Attachment: psi_full.gif
    (Size: 17.97KB, Downloaded 614 times)
  • Attachment: jpsi_full.gif
    (Size: 20.09KB, Downloaded 534 times)
Re: Problems with PndKinFitter::AddMassConstraint [message #16537 is a reply to message #16518] Wed, 07 May 2014 15:36 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: *pool.mediaWays.net
Hi Stefano.

Why should the mass after the fit be a delta peak? The fitter tries to match the constraint by adjusting the final state four-momenta within the errors in a linearized way. The fitted composites are then recalculated by that adjusted final state. As you can see the resolution is much better after the fit.

Cheers
Ralf
Re: Problems with PndKinFitter::AddMassConstraint [message #16540 is a reply to message #16537] Wed, 07 May 2014 17:32 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
This is a mass constraint fit, you force the total mass being a defined value, and then you use the modified parameters to check other distributions (i.e. you fit the j/psi mass and check the improvement in the resolution of psi mass). The mass must be a delta, or must have sigma much narrower than resolution... in this case you have only one moderate improvement. The 4C fitter works nicely and you have a delta there, or better a very narrow distribution. A broader distribution means that the fit did not converge to a global minimum, and I am not surprised seeing that chi2 distribution.

The main question is: why the chi2 distribution is screwed? Once fixing this, I believe the fitter will produce good results. The fact that the 4C fitters works nicely, in both full and fast sim, means that covariances are fine.
Re: Problems with PndKinFitter::AddMassConstraint [message #16566 is a reply to message #16540] Fri, 09 May 2014 17:05 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Hi,
I have received this answer from Vishwajeet:

Quote:
Dear Stefano,

What you are looking at is a simplistic Mass constraint fit which fixes everything with respect to the constrained mass.
I had a look at the PndKinFitter class.

The delta mass peak can be obtained by replacing ( line : 339 -348 Trunk version ( rev: 21681) by the following code snippet


fmD[fNc+0][kN+0] = -2.*Px;
fmD[fNc+0][kN+1] = -2.*Py;;
fmD[fNc+0][kN+2] = -2.*Pz;
fmD[fNc+0][kN+3] = 2.*Etot;
fmD[fNc+0][kN+4] = 2.*a*Py;
fmD[fNc+0][kN+5] = -2.*a*Px;
fmD[fNc+0][kN+6] = 0.0;

I have tested it with the macro in /macro/run/ana_complete.C Unfortunately my wiki and forum login access is no longer there ( as it was with my FZ email) .

Actually the full mass constraint fit should include the vertex information and this can be implemented with not much effort.
I will see if I can do that. In that case, what Ralf pointed out in the forum is right.

Please tell me if it is fine.

cheers,
Vishwajeet
Re: Problems with PndKinFitter::AddMassConstraint [message #16575 is a reply to message #16518] Mon, 12 May 2014 12:26 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: *pool.mediaWays.net
Hi Stefano,

I tried these matrices and find a good behaviour in the Compond system mass.
index.php?t=getfile&id=7866&private=0
index.php?t=getfile&id=7867&private=0

You see the Psi(2S) is reconstructed "as a needle". However, the pion masses differ, which is expected because their masses are no constrain entereing the fit.

Shall I submit those changes to the trunk?


Cheers
Ralf
  • Attachment: kftest.gif
    (Size: 9.90KB, Downloaded 491 times)
  • Attachment: kfdtst.gif
    (Size: 9.38KB, Downloaded 620 times)

[Updated on: Mon, 12 May 2014 12:32]

Report message to a moderator

Re: Problems with PndKinFitter::AddMassConstraint [message #16576 is a reply to message #16518] Mon, 12 May 2014 12:33 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: *pool.mediaWays.net
Hi Stefano,

I tried these matrices and find a good behaviour in the Compond system mass.
index.php?t=getfile&id=7866&private=0
index.php?t=getfile&id=7867&private=0

You see the Psi(2S) is reconstructed "as a needle". However, the pion masses differ, which is expected because their masses are no constrain entereing the fit.

Shall I submit those changes to the trunk?


Cheers
Ralf
Re: Problems with PndKinFitter::AddMassConstraint [message #16577 is a reply to message #16575] Mon, 12 May 2014 12:34 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *rz.uni-frankfurt.de
Mass and probability seems fine, still the chi2 is strange. But checking the code it seems it is calculated in the same way of other constraint fits, I don't understand...
Re: Problems with PndKinFitter::AddMassConstraint [message #16578 is a reply to message #16577] Mon, 12 May 2014 14:22 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: *pool.mediaWays.net
Well, the chi2 function should look like that for ndf=1.
See: http://en.wikipedia.org/wiki/Chi-squared_distribution

Ralf
Re: Problems with PndKinFitter::AddMassConstraint [message #16579 is a reply to message #16578] Mon, 12 May 2014 14:27 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *rz.uni-frankfurt.de
Ok, then you can commit Smile
Re: Problems with PndKinFitter::AddMassConstraint [message #16581 is a reply to message #16518] Mon, 12 May 2014 15:33 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: *pool.mediaWays.net
Well.

I submitted it to both, the trunk and scrut14. Isuppose people want to use it today.

Ralf
Re: Problems with PndKinFitter::AddMassConstraint [message #16602 is a reply to message #16581] Tue, 13 May 2014 16:57 Go to previous message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *rz.uni-frankfurt.de
To close the topic,
I put here the new J/psi plots for fast simulation:

index.php?t=getfile&id=7873&private=0

and for full:

index.php?t=getfile&id=7874&private=0

Everything seems fine now. Only one comment: in full I found one combination with negative chi2 over 10k events. I suppose the cut in probability will take it away.
Previous Topic: PID arrays in Fast Sim
Next Topic: [FIXED] 4Cfit
Goto Forum:
  


Current Time: Thu Dec 19 14:23:40 CET 2024

Total time taken to generate the page: 0.00773 seconds