I was playing around to produce new datasets for the EMC pid stuf. Using the PndRecoKalmanTask I could get the reconstructed momentum for each track. Also, I saw that it is possible to change the particle hypothesis. As I could see the default value is set to muon.

I have changed this to electron for electron simulations to see either the results get better or not. Unfortunately I saw that changing the hypothesis leads to even worse results for electrons. The graphs are included here (p_mc = Monte Carlo momentum and p = momentum obtained from the track after Kalman ); the macro's are available in "PndTools/MVA/macro/". Am I doing something wrong or is it expected to be like this?

Best regards,]]>

We will discuss about on the next evo meeting (tomorrow), I don't know if Lia has already started to take a look.]]>

this is a very interesting point. I know from my studies that the GEANE track follower which is used when you perform the Kalman fit performs quite nicely on electrons, meaning that the performance should be better if you make the right particle hypothesis. So this looks like some kind of bug in our code. Maybe Lia could confirm whether the PID information is passed correctly yo GEANE in all places where this is needed in GeaneTrackRep?

Could you tell us what the exact macros are you are using to get to these results?

Cheers, Christian]]>

They are placed in

"PndTools/MVA/macro/"

sim_sttcombi_pgun.C

digi_sttcombi.C

reco_sttcombi.C

selectEvents.cpp

Greets,

MB]]>

What I can say is that the GEANE propagation with electron hypothesis is not good as for the other kind of particles.

Anyway, in principle it is true that with the correct particle hypo you should get better results, so if this happens only for electrons it will be fixed by inserting the bremmstrahlung treatment, but if this happens also for other particles it is a more problematic thing.

I will try to make some tests soon, but I am a little busy in these days so I am not sure I will be able to give you some answers in a short time

Lia.

]]>

Quote: |

Maybe Lia could confirm whether the PID information is passed correctly yo GEANE in all places where this is needed in GeaneTrackRep |

I checked this directly in FairGeanePro, where the Geant code is given as input to the ertrak, which is the link between the interface and the fortran part, and that part is right: GEANE takes the correct code. So the tracking is done with the correct particle hypothesis.

...more tests are required...

Lia.]]>

- Pandaroot trunk version 9969

- Geant3

- pgun generator with vertex (0,0,0)

- theta = 5-140°, phi = 0-360° momentum = 0.2-5 GeV/c

- one primary track per event, only primary tracks are taken into account in the analyses

- 10,000 events per particle

- MVD+TPC+GEM tracking detectors

- macros:

run_sim_tpccombi_pgun.C

run_sim_tpccombi_evtgen.C

run_digi_tpccombi.C

run_reco_tpccombi.C

Attached pdf file with five plots:

p1: sigma(p)/p = (p_MC-p_reco)/p_MC as a function of p (in GeV/c) for four bins in theta. This is mu reconstucted as mu and sigma(p) is the width if the gaussian fitted to the residues. It has to be noted that dp/p ought to be proportional to p, at least for momenta where multiple scattering is not important, and this is not the case.

p2: sigma(p)/p (e- reconstructed as mu-) Note that for the first angle the points scatter a bit, as there are not many events.

p3: sigma(p)/p (e- reconstructed as e-) These are the reconstructions that come out wrong

p4: sigma(p)/p (pi- reconstructed as mu-)

p5: sigma(p)/p (pi- reconstructed as pi-) The behaviour is comparable in both reconstructions.

]]>

The first two figures show the momentum distributions for a simulated electron with momentum in the range 1. - 1.5 GeV/c. It is reconstructed with kalman with electron and muon mass hypothesis respectively:

The electron reconstructed as electron distribution has a more gaussian shape, the electron reconstructed as a muon is more peaked, but the tail is more evident.

My first question is: did you use the kalman flag check to throw away badly reconstructed tracks?

The other two figures are the pull distributions: (p_MC - p_RECO)/sigma_from_kalman in the two cases again:

here you can see that the electron reconstructed as electron is almost a gaussian with mean = 0 (from the fit I get 0.087) and sigma = 1 (from the fit again I get 0.85). Sorry, I did the test with just 1000 events, so the statistics is quite low... The electron reconstructed as muon has a very bad shape: here it should be more evident that the right choice is the electron mass.

This happens even thought the bremsstrahlung is not yet treated in a complete way.

Now, from Ronald post we can also see that pions behave the same way when reconstructed with muon and pion hypothesis, but this is ok, since they are not distinguishable from dedx, so they are expected to behave like this.

What is missing is just a test with kaons and protons...

Bye bye and Buon Natale to everyone!

Lia.]]>

Quote: |

here I attach the results of some tests made with the PndTools/MVD/macro macros (except for the selectEvents.cpp, do I have to compile it?). |

Eh!, yes it is indeed needed to compile that one, you can just use ACLiC. This one just selects events that have the same pdg as the initial particle when hitting emc.

My simulations were in the range 0.05 - 14.0 GeV/c.

Quote: |

did you use the kalman flag check to throw away badly reconstructed tracks? |

The Kalman part is as follows:

PndRecoKalmanTask* recoKalman = new PndRecoKalmanTask(); recoKalman->SetTrackInBranchName("SttMvdTrack"); recoKalman->SetTrackOutBranchName("SttMvdGenTrack"); recoKalman->SetParticleHypo("electron"); fRun->AddTask(recoKalman);

Kind wishes,

MB]]>

Moreover, "high" momenta are less sensitive to energy loss and particle hypothesis. I would be curious to see what is the difference at 0.5GeV/c.]]>

Quote: |

Eh!, yes it is indeed needed to compile that one, you can just use ACLiC. This one just selects events that have the same pdg as the initial particle when hitting emc. |

Ok, thank you I will try it!

Quote: |

My simulations were in the range 0.05 - 14.0 GeV/c. |

Maybe it is better to make these tests with a smaller range of momenta to avoid any momentum dependent behaviour.

Quote: |

I did not use any special flags for Kalman. Btw. how can I do so. |

The tracks output of the kalman are PndTrack with a flag assigned. This has not to be < 0: if it is < 0 then something wrong happened in the fitting procedure. You should check this before filling the histograms or the ntuples:

PndTrack* genfittrk = (PndTrack*) genfittrackarray->At(i); if(gtrk->GetFlag() < 0) ...then skip it...; else ...fill the histo/ntuple...

Cheers,

Lia.]]>

Quote: |

the "right" choice is electron only if you consider a mathematical point of view... in analysis we need a better momentum reconstruction and from plots I would use muon hypothesis to have a better invariant mass peak. And it would be interesting to know why the momentum is much better in this case. Maybe also a plot of chi2/ndf would be interesting. |

But consider the kinematic fit: you have to give also the covariance matrix as input there, and with the muon hypo for a "true" electron it is clearly wrong (see the pull distribution), so you will not get good results with it. Probably with the electron hypo and the good covariance matrix the result will be better.

If the pull is wrong, then the result is not reliable... ok, that should come out also from the chi2...

Lia.

]]>

Muon: p_rec - p_mc narrower, p_rec - p_mv / sigma broader

EWlectrons: p_rec - p_mc broader, p_rec - p_mc / sigma narrower

->

Muons: sigma smaller

Electrons: sigma bigger

Muons have a better residulas, but small errors (why?)

Electrons have larger residuals, and larger errors.

I would suppose that errors for muons should be larger, and also the residuals, considering that this is the wrong hypothesis. Electrons should fit better the points, with a reduced residual and properly calculated errors. But this does not appear.

I continue to think that there is something wrong somewhere for electrons.

Let's remember that track parameters are used not only for kinematical fit, but also for pid and for correlation, where we do not need covariance matrix.

]]>

Soeren

]]>

In the reconstruction of the electron as a muon nothing changes, while the distribution and the pull of the electron reconstructed as an electron changes:

The momentum distribution is much more similar to the one reconstructed as a muon, but the pull distribution is not good.

It seems that the reason for the electron behaviour is indeed the Urban model correction, but the shape of the momentum distribution and the pull distribution are better with the Urban correction, though the peak is larger.

Answering also to Stefano:

Quote: |

I still do not understand; let's forget about the tails, for the moment: Muon: p_rec - p_mc narrower, p_rec - p_mv / sigma broader EWlectrons: p_rec - p_mc broader, p_rec - p_mc / sigma narrower -> Muons: sigma smaller Electrons: sigma bigger Muons have a better residulas, but small errors (why?) Electrons have larger residuals, and larger errors. I would suppose that errors for muons should be larger, and also the residuals, considering that this is the wrong hypothesis. Electrons should fit better the points, with a reduced residual and properly calculated errors. But this does not appear. I continue to think that there is something wrong somewhere for electrons. |

the errors are smaller for the muons because the bremsstrahlung contribution is not taken into account, while it is for the electron.

The point is that here we are considering the kalman fitted result, so a different error means also a different result when you compare the extrapolated error to the measured hit one. Then if you have different errors, you get different results after the filtering step and then different momentum distributions. The momentum itself does not come

To understand completely the GEANE contribution, I think we should consider the pull distribution just after an extrapolation, without the kalman procedure, maybe just extrapolating the tracks on a plane, taking as starting momentum and position the MC ones.

Regards,

Lia.

]]>

(and I promise not to ask any more questions even before the new year ...)

Have a nice christmas.

Soeren]]>

Have a nice Christmas you too and everybody!

Lia.]]>

The original GEANE deals correctly the average energy loss for every particle. Electrons and positrons are tracked also taking correctly into account the bremsstrahlung process (see the enclosed report, table 2).

Therefore, no new implementations are necessary for the total energy loss. I recall that, when one studies a detector response, usually only the ionization energy loss is taken into account, whereas, while tracking, it is essential to consider the total energy loss, that is ionization plus bremsstrahlung, which is the main source of dE/dx for high energy electrons. This is considered with electrons, but not for muons (for energies below 10 GeV). Hence, to track an electron as a muon underestimates heavily the current particle energy. Note that the curves (pmc – pGeane)/pmc when electron is tracked as muon, have all the wrong mean and the peak is shifted.

Concerning the errors, we found in the original GEANE only the energy loss straggling by ionization in the Gaussian approximation (eq . 4 of the report). This approximation is absolutely insufficient for a correct error propagation!

Therefore (see the report), we implemented the energy loss by collision straggling with the Urban model and added the bremsstrahlung straggling to electron and positrons. All the formulae implemented by us can be found in the routine ERLAND of GEANE or in the enclosed report.

The bremsstrahlung straggling deals correctly the sigma, but, since the shape is pathological and not Gaussian (see fig.5 of the report), the Kalman algorithm gives biased results. This is well known, and the remedy is to parametrize the bremsstrahlung straggling with a sum of Gaussian, to perform multiple tracking and to weight the results with the area of the Gaussians. The method is called Gaussian Sum Filter (GSF). At present this method is missing in our tracking. However, also with the actual implementations, the pulls of electrons are not so bad.

In the result reported in this discussion I see that the pulls for electrons and the other particles are acceptable when Urban fluctuations by ionization and the present version of bremsstrahlung straggling are on.

When an electron is tracked as a muon, the energy loss is wrong and the tracking error is underestimated. In the Kalman filter, the result is shifted more toward the tracking values than in the case of electrons. The errors used in Kalman is wrong and too small in any case. The results show that the pulls are bad (and this is expected, since the errors are wrong because the bremsstrahlung straggling is missing), and that the absolute differences are sharper. The mean is shifted (and I understand why) and the width is smaller (this is not completely clear to me).

I checked with Lia the code during these days and we did not find bugs.

Merry Christmas and Happy new year to all

Alberto

]]>