Home » PANDA » PandaRoot » Fast Simulations » [FIXED] Problem with mass constraint fit for two gamma
[FIXED] Problem with mass constraint fit for two gamma [message #16868] 
Mon, 30 June 2014 10:56 
donghee
Messages: 385 Registered: January 2009 Location: Germnay

firstgrade participant 
From: *kph.unimainz.de


Hi
I found a strange behaviour with mass constrain fit.
For charged combination (here is e.g. D0>Kpi+), chi2 distribution of mass constrain fit are similar and seems to be OK for both full and fast simulation.
An issue about mass constraint fit has been fixed in few weeks ago. (see message #16518 : Problems with PndKinFitter::AddMassConstraint).
However one more problem is still remaining.
For neural combination (here is e.g. D0>gamma gamma), chi2 distribution and also probability distribution of mass constrain fit are too different in the case of full and fast simulation at scrut14. I have correcly delta function for invariant mass for gamma gamma combination after mass constraint fit.
Only problem is the two low chi2 distribution(distributed in below 0.1) in the full simulation.
full_gg_mass_fit_results_to_forum_charged.eps show the chi2 distribution of the mass fit for D0>Kpi+ in two cases(fast and full).
full_gg_mass_fit_results_to_forum_neutral.eps show the chi2 distribution of the mass fit for D0>gamma gamma.
Below is the accessor what I have commonly used for full and fast with scrut14 version.
//Pnd Kin Mass Fitter
PndKinFitter mfitter(dp[j]); // instantiate the kin fitter in
mfitter.AddMassConstraint(D0Mass); // set 4 constraint
mfitter.Fit(); // do fit
double chi2_m = mfitter.GetChi2(); // get chi2 of fit
double prob_m = mfitter.GetProb(); // access probability of fit
RhoCandidate *dpfit_mass = dp[j]>GetFit(); // get fitted D0
I don't understand why the chi2 distributions are so different for the neutral combination in both case(full and fast)?
I assume that some factors are missing or NDF is handled wrongly for the neutral combination case in the full simulation .
Best wishes,
Donghee
[Updated on: Fri, 12 September 2014 10:12] by Moderator Report message to a moderator



Re: Problem with mass constraint fit for two gamma [message #16869 is a reply to message #16868] 
Mon, 30 June 2014 16:51 
Lu Cao
Messages: 77 Registered: February 2013

continuous participant 
From: *ikp.kfajuelich.de


Hi Donghee and all,
this situation is the same in reconstructing pi0>gamma gamma, as I reported before.
In the fast sim, the invariant mass spectrum of the combination of two photons has a "nice" distribution peaked at pi0 mass, so it's understandable that the mass constraint fit can work as expected. In the full sim, the invariant mass distribution is filled with a significant "background" which may course problems of convergence in mass constraint fit, e.g. too small chi2, prob squeezed to 1.
Since the PndKinFitter:AddMassConstraint() works fine for charged particles as well as the neutral in the fast sim, I'd like to guess the tool itself has no problem but to understand why the twophoton invariant mass distribution has so much "background" in the full sim. Is there any possible incorrect combinatorics, or where're the extra photons coming from?
Donghee, could you also show the gg invarit mass spectrum in your case?
Best regards,
Lu



Re: Problem with mass constraint fit for two gamma [message #16870 is a reply to message #16869] 
Mon, 30 June 2014 17:51 
StefanoSpataro
Messages: 2736 Registered: June 2005 Location: Torino

firstgrade participant 
From: 140.181.11*


I repeat for the nth time: the EMC covariance matrix in full simulation was never filled properly, and there is currently nobody from EMC groups working to have a proper implementation.
In fast everything is fine since the error matrix is what you impose in the simulation.
Lu, your plot is wrong, if you use a mass constraint fit then you forse your background to stay inside your peak. The fit is not done to remove background, but to select your events once you have already removed the background.
[Updated on: Mon, 30 June 2014 17:54] Report message to a moderator









Re: Problem with mass constraint fit for two gamma [message #16885 is a reply to message #16872] 
Tue, 01 July 2014 11:06 
Dima Melnychuk
Messages: 213 Registered: April 2004 Location: National Centre for Nucle...

firstgrade participant 
From: *fuw.edu.pl


Hi Donghee,
The EMC error matrix is accessed via class /emc/EmcReco/PndEmcErrorMatrix.cxx and it is used in PndPidCorrelator to actually set error matrix for neutral candidates. The parameters used in this parametrization are stored in /input/emc_error_matrix_default.root and /input/emc_error_matrix_1.root
Error matrix is parametrized on energy and position of the cluster with independent parametrizations for Barrel Forward and Backward endcaps. I have attached the presentation from Mark Pelizaeus (I hope he does not mind) who did it in old framework and I adapted it for pandaroot. I remember he had another presentation on the subject but I cannot find it now.
emc_error_matrix_default.root contain parameters obtained by Marc in old framework and in emc_error_matrix_1.root there are parameters which I calculated for one emc geometry ("emc_module12.dat","emc_module3new.root","emc_module4_StraightGeo24.4.root ","emc_module5_fsc.root"), but it is not exactly the one used by default now. For forward endcap it was modified to "emc_module3_2012_new.root".
There are several macros related to emc error matrix in /macro/emc/dedicated/
error_matrix_data_production.C  produces photons in the whole emc range to calculate error matrices
error_matrix_fit.C  to actually calculate error matrices, fit them, and store parameters in PndEmcErrorMatrixParObject containers.
fill_error_matrix_param.C  to fill PndEmcErrorMatrixParObject container with given parameters.
I just found that in PndEmcErrorMatrix.cxx the emc_error_matrix_default.root was used and not emc_error_matrix_1.root for default geometry and I will correct it now (within one hour) and you can try if this can solve the problem.
Otherwise it makes sense to start with some QA macros to test pull distribution of pi0 before and after 4Cfit as suggested in Mark's presentation and if there is actually a problem with error matrices, to produce photons, recalculate error matrices, parametrize them and test again.
Dima








Re: Problem with mass constraint fit for two gamma [message #16899 is a reply to message #16897] 
Wed, 02 July 2014 12:26 
Dima Melnychuk
Messages: 213 Registered: April 2004 Location: National Centre for Nucle...

firstgrade participant 
From: *fuw.edu.pl


Hi,
It's pity that it does not help, i.e. usage of emc_error_matrix_1.root instead of emc_error_matrix_default.root.
Comment to Stefano, that emc_error_matrix_1.root was calculated for geometry which is different from current only for forward endcap and modification in reconstruction code should not be (?) relevant for this case.
Comment to Donghee
> It means that in fast simulation the error matrix "emc_error_matrix_1.root" has been accessed correclty but in full simulation old parameterization emc_error_matrix_default.root was used up to now.
No, in fast simuilation the error matrices were calculated/parametrized independently.
> Did you make parametrizations for Barrel, Forward endcap, Backward endcap, forward EMC, all 4 parts separately?
There is a separate parametrization for each EMC part but I calculated them in one macro.
But the conclusion is that error matrices should be recalculated at least for modified forward endcap, but parametrization/fit should be checked anyway, since I do not suppose that only forward endcap introduces problems.
So it makes sense to start with some QA macro to look for pull distribution for pi0 before/after 4Cfit and only later to recalculate error matrices.
Dima










Re: Problem with mass constraint fit for two gamma [message #16956 is a reply to message #16868] 
Mon, 07 July 2014 11:04 
donghee
Messages: 385 Registered: January 2009 Location: Germnay

firstgrade participant 
From: *kph.unimainz.de


Hi Stefano and Dima,
I am now looking your posting for the neutral candidate in pid correlator.
Launching the PID macro, Error message doesn't have serious meaning because we didn't store the emc parameter (PndEmcErrorMatrixPar) into the data base.
Quote:
// Get Emc error matrix parameter container
fEmcErrorMatrixPar = (PndEmcErrorMatrixPar*) db>getContainer("PndEmcErrorMatrixPar");
We can ignore this alarm, or we can make inactive thie matrix parameter container before initialization, because we will access error matrix from the input reading file later on.
Quote:
void PndPidCorrelator::SetParContainers() {
...
// Get Emc error matrix parameter container
fEmcErrorMatrixPar = (PndEmcErrorMatrixPar*) db>getContainer("PndEmcErrorMatrixPar");
...
}
I find a potential problem for miss matching of neutral candidate.
When we construct a neutral candidate using EMC, we build candidates from "bump" information based, not EMC "cluster".
But error calculation is previously made by EMC cluster.
I don't know exactly which one has more fundamental information and is placed more high rank.
Best wishes,
Donghee
[Updated on: Mon, 07 July 2014 11:10] Report message to a moderator














Goto Forum:
Current Time: Tue Apr 16 06:07:35 CEST 2024
Total time taken to generate the page: 0.01293 seconds
