GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Tracking » Tracking: Kalman Task with STT,(electron hypo)
Tracking: Kalman Task with STT,(electron hypo) [message #11368] Tue, 21 December 2010 11:47 Go to next message
M.Babai is currently offline  M.Babai
Messages: 46
Registered: January 2008
Location: Netherlands
continuous participant
From: *KVI.nl
Dear all,

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?

index.php?t=getfile&id=6255&private=0
index.php?t=getfile&id=6256&private=0

Best regards,
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11370 is a reply to message #11368] Tue, 21 December 2010 12:03 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 think you are doing nothing wrong. We have seen such behaviour also with tpc+lhe tracking.
We will discuss about on the next evo meeting (tomorrow), I don't know if Lia has already started to take a look.
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11371 is a reply to message #11370] Tue, 21 December 2010 12:11 Go to previous messageGo to next message
Anonymous Poster From: *adsl.alicedsl.de
Hi,

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
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11372 is a reply to message #11370] Tue, 21 December 2010 12:11 Go to previous messageGo to next message
M.Babai is currently offline  M.Babai
Messages: 46
Registered: January 2008
Location: Netherlands
continuous participant
From: *KVI.nl
Okay,
thank you for your fast reply. btw. is this happening only for electrons?
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11374 is a reply to message #11371] Tue, 21 December 2010 12:20 Go to previous messageGo to next message
M.Babai is currently offline  M.Babai
Messages: 46
Registered: January 2008
Location: Netherlands
continuous participant
From: *KVI.nl
Hi Christian,

They are placed in
"PndTools/MVA/macro/"

sim_sttcombi_pgun.C
digi_sttcombi.C
reco_sttcombi.C
selectEvents.cpp

Greets,
MB
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11375 is a reply to message #11374] Tue, 21 December 2010 12:42 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *pv.infn.it
Hi ,
I just read the messages. I did not make tests on this yet.
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 Confused
Lia.
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11382 is a reply to message #11375] Tue, 21 December 2010 19:46 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *pv.infn.it
Hi,
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.
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11383 is a reply to message #11382] Tue, 21 December 2010 19:52 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *5-87-r.retail.telecomitalia.it
I am wondering if maybe some problem could rise from SetSTRA flag in G3, which is giving strange results for MVD.
Is it possible to run some tests using geant4, or maybe without MVD, just to take out this possible source of mess?
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11385 is a reply to message #11368] Wed, 22 December 2010 09:58 Go to previous messageGo to next message
Ronald Kunne is currently offline  Ronald Kunne
Messages: 32
Registered: October 2009
continuous participant
From: *in2p3.fr
I don't know how relevant this is, as the version I use dates from october, but I did a comparison between Kalman reconstruction using the muon hypothesis for all particles versus Kalman using the correct particle hypothesis. Only the reconstruction of electrons supposing they are electrons gives strange results for the resolution.

- 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.



  • Attachment: kalman.pdf
    (Size: 105.99KB, Downloaded 295 times)
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11390 is a reply to message #11368] Wed, 22 December 2010 18:22 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *pv.infn.it
Hi Mohammad and others,
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?).

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:
index.php?t=getfile&id=6266&private=0
index.php?t=getfile&id=6267&private=0

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:

index.php?t=getfile&id=6268&private=0
index.php?t=getfile&id=6269&private=0

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.
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11393 is a reply to message #11390] Thu, 23 December 2010 10:32 Go to previous messageGo to next message
M.Babai is currently offline  M.Babai
Messages: 46
Registered: January 2008
Location: Netherlands
continuous participant
From: *KVI.nl
Hi 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?
I did not use any special flags for Kalman. Btw. how can I do so.
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
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11394 is a reply to message #11390] Thu, 23 December 2010 12:57 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *0-87-r.retail.telecomitalia.it
Hi,
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.

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.
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11395 is a reply to message #11393] Thu, 23 December 2010 13:01 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *pv.infn.it
Hi,

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.
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11396 is a reply to message #11394] Thu, 23 December 2010 13:07 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *pv.infn.it
Hi Stefano,
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.
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11397 is a reply to message #11396] Thu, 23 December 2010 13:30 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *0-87-r.retail.telecomitalia.it
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.
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.
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11400 is a reply to message #11393] Thu, 23 December 2010 14:05 Go to previous messageGo to next message
Jens Sören Lange is currently offline  Jens Sören Lange
Messages: 193
Registered: June 2005
first-grade participant
From: *physik.uni-giessen.de
Hi all, (maybe the question goes directly to Lia),
could it be that the (added) Urban model in Geane creates this difference between electrons and muons?
Soeren
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11404 is a reply to message #11400] Thu, 23 December 2010 21:54 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *47-151.net24.it
Hi Soeren,
sorry for the late reply. I tested the macros without the added Urban, i.e. setting the value of gcalpha = 1 in Geane.C.

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:
index.php?t=getfile&id=6270&private=0
index.php?t=getfile&id=6271&private=0
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 only from the extrapolation of the mean value.
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.


Re: Tracking: Kalman Task with STT,(electron hypo) [message #11405 is a reply to message #11368] Thu, 23 December 2010 22:57 Go to previous messageGo to next message
Jens Sören Lange is currently offline  Jens Sören Lange
Messages: 193
Registered: June 2005
first-grade participant
From: *web.vodafone.de
Hi Lia,
thanks so much for the check.
(and I promise not to ask any more questions even before the new year ...)
Have a nice christmas.

Soeren
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11407 is a reply to message #11405] Fri, 24 December 2010 12:06 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *47-151.net24.it
Smile
Have a nice Christmas you too and everybody!
Lia.
Re: Tracking: Kalman Task with STT,(electron hypo) [message #11409 is a reply to message #11368] Fri, 24 December 2010 14:14 Go to previous message
Alberto Rotondi is currently offline  Alberto Rotondi
Messages: 9
Registered: June 2007
occasional visitor
From: 151.57.156*
Dear All,
perhaps I can help the discussion by recalling the modifications that we made in GEANE concerning the Energy loss. They are summarized in the enclosed report paper.pdf.
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

  • Attachment: paper.pdf
    (Size: 140.26KB, Downloaded 361 times)

[Updated on: Fri, 24 December 2010 14:26]

Report message to a moderator

Previous Topic: alternative to LHE tracking
Next Topic: Tracking with different particle hypothesis
Goto Forum:
  


Current Time: Sun Nov 24 04:51:01 CET 2024

Total time taken to generate the page: 0.00698 seconds