GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Tracking » Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP.
Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP. [message #6836] Wed, 04 June 2008 17:13 Go to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *PV.INFN.IT
Hi geane users!
A new version of the CbmGeaneUtil has been uploaded on the svn repository. In this revised version the functions performing the transformation from/to the Mars (FromMarsToSC/ FromMarsToSD/ FromSDToMars/ FromSCToMars) have been rewritten with Alberto Rotondi in order to perform the transformation without affecting the track length (a more detailed explanation can be found in the comments to the functions).

In addition to this new functions have been added to the CbmTrackParP and CbmGeanePro classes in order to retrieve:
1) the MARS covariance matrix
2) the Transport matrix
3) the momentum in SD system

The new routines and functions have been tested, but obviously any additional test is welcome!
To be able to use them, please update your trackbase and geane directories and if you find some strange behaviour please let us know.
Best regards,
Lia.
Re: Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP. [message #6838 is a reply to message #6836] Wed, 04 June 2008 19:22 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *e18.physik.tu-muenchen.de
Hi Lia!

I cannot compile your latest checkin:

/afs/e18/panda/SIM/sneubert/pandaroot/trackbase/CbmGeaneUtil.cxx: In member function ‘void CbmGeaneUtil::FromMarsToSD(Double_t*, Double_t (*)[6], Double_t*, Double_t, Double_t*, Double_t*, Int_t&, Double_t&, Double_t*, Double_t*)’:
/afs/e18/panda/SIM/sneubert/pandaroot/trackbase/CbmGeaneUtil.cxx:1194: error: expected unqualified-id before ‘;’ token
make[2]: *** [trackbase/CMakeFiles/TrkBase.dir/CbmGeaneUtil.o] Error 1
make[1]: *** [trackbase/CMakeFiles/TrkBase.dir/all] Error 2
make: *** [all] Error 2


Any idea?

Seabstian.


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP. [message #6839 is a reply to message #6838] Wed, 04 June 2008 19:24 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *e18.physik.tu-muenchen.de
I have fixed it. It was a comma too much.

Cheers!


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP. [message #6842 is a reply to message #6839] Thu, 05 June 2008 10:13 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *PV.INFN.IT
Ok, thank you for fixing it... I am wondering why my compiler does not notice this Confused
Lia.
Re: Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP. [message #6851 is a reply to message #6842] Fri, 06 June 2008 16:56 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *e18.physik.tu-muenchen.de
Hi Lia!

Christian an me are working on the genfit Kalman Filter with the GeaneTrackRep. We have veryfied that genfit and the kalman are working correctly with the LSLTrackRep.

With GeaneTrackRep we get a strange behaviour. The bug could be in the interface between GeaneTrackRep -- TrackParP -- Geane.

What we observe is, that after we have made the first update of the covariance matrix in the Kalman Filter Update Step in the following Prediction Step there is a change of sign in some of the correlations in the covariance matrix. This subsequently leeds to a divergence of the momentum parameter.

Could you maybe check if the off-diagonals in the covariance matrix are calculated correctly in TrackParP!?

Are there any conditions, that the covariance matrix must satisfy in order to be "physical"? (Apart from being diag).

Cheers! Sebastian.


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP. [message #6857 is a reply to message #6851] Mon, 09 June 2008 10:29 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *pv.infn.it
Hi Sebastian,
which macro exactly do I have to run to see this behaviour?

Quote:

What we observe is, that after we have made the first update of the covariance matrix in the Kalman Filter Update Step in the following Prediction Step there is a change of sign in some of the correlations in the covariance matrix. This subsequently leeds to a divergence of the momentum parameter.


Do you mean that the updated covariance matrix (the one associated with the Kalman point), when used as input to the next extrapolation, changes the sign of some of its elements? Or does the sign change after the extrapolation?

Ciao,
Lia.
Re: Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP. [message #6861 is a reply to message #6857] Mon, 09 June 2008 14:33 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *adsl.alicedsl.de
Hi Lia!

I am working on an update for genfit and I have not checked in things (because it will effect some packages I have no access to). So unfortunately I cannot supply you with the exact version of the macro I am using (recotasks/demo/runDemo.C).

I will check in my stuff in the next days, but I would like to clarify this point before if possible.

The change in sign happens during the extrapolation after I have updated the covariance matrix in the previous Kalman step.

Could it be that I produce ill-conditioned covariances in the update step? Have you ever seen anything like that?

Let me point out that this happens for all tracks in my example - it is not a very special case.

I will also try some more things but maybe you have an idea what could be problematic about the covariances...

Cheers!
Sebastian.


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP. [message #6866 is a reply to message #6861] Mon, 09 June 2008 16:58 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *adsl.alicedsl.de
Lia,

how can I check if the covariances I get are reasonable? Is there any standard procedure that you use?

What seems to cause the trouble for me is that the value cov[0][4] -- the covariance between q/p and the v-coordinate -- is changing sign. I do not understand why covariances between the coordinate and the momentum should change sign after ane xtrapolation at all... do you have an idea?

Cheers!
Sebastian.


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP. [message #6873 is a reply to message #6866] Mon, 09 June 2008 18:35 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *pv.infn.it
Hi Sebastian,
I' m checking if I see the same behaviour in the STT case, but I don' t. Here is an example:

1) after the first kalman point, before the next prediction:

     |      0    |      1    |      2    |      3    |      4    |
----------------------------------------------------------------------
   0 |   0.001582   9.935e-05    3.01e-06  -5.364e-07  -2.429e-05 
   1 |  9.935e-05   0.0001191  -7.835e-05  -1.265e-05   0.0004208 
   2 |   3.01e-06  -7.835e-05    0.002611   4.307e-07    -0.02196 
   3 | -5.364e-07  -1.265e-05   4.307e-07   0.0002249  -8.773e-07 
   4 | -2.429e-05   0.0004208    -0.02196  -8.773e-07        1.31 

2) after the prediction

     |      0    |      1    |      2    |      3    |      4    |
----------------------------------------------------------------------
   0 |   0.001582     0.00011   2.891e-06  -0.0001012  -2.728e-05 
   1 |    0.00011   0.0001211  -8.652e-05  -0.0001285   0.0005712 
   2 |  2.891e-06  -8.652e-05    0.002611   7.891e-05    -0.02447 
   3 | -0.0001012  -0.0001285   7.891e-05   0.0003601  -0.0004655 
   4 | -2.728e-05   0.0005712    -0.02447  -0.0004655       1.355 


so no change in sign... I attach the modified version of GeaneTrackRep.cxx I use to this message (I wrote "CHECK" near to my changes, so they' re well recognizable), I don' t know if this can help. The trackbase and geane are the same as the repository ones (actually they are slightly different but the different should affect only the STT case).

Concerning the covariance matrices: in the extrapolation they are calculated directly into GEANE and their transformation between the different reference systems is handled by the CbmGeaneUtil routines, which have been checked applying the routine and its inverse routine successively and looking to find in output the same track parameters given as input; in the kalman filter step the only way to check their correctness is to check if the calculations are performed correctly: I don' t have any other way to see it the covariance matrices are ok, you can have a look to the values (if they are too big or too small you should notice it) and obviously the diagonal elements must be positive.

I will check again the code and I will also ask to Alberto Rotondi if he has some suggestion...
If I have some (good, I hope) news I will let you know Smile
Lia.

Re: Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP. [message #6874 is a reply to message #6873] Mon, 09 June 2008 19:52 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *adsl.alicedsl.de
Hi Lia!

Thank you very much that you checked it!
I will have a look at the GeaneTrackRep...

Have a nice evening!
Cheers! Sebastian.


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP. [message #6876 is a reply to message #6874] Mon, 09 June 2008 21:04 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *adsl.alicedsl.de
Hi!

With the modifications you gave me for the GeaneTrackRep I still see the divergence. Sad
I have check my stuff in now. So you can try the demo andf have a look.

The pictures below show the convergence behaviour of the genfit kalman for the LSLTrackRep (first plot) and the GeaneTrackRep. Both plots show q/p as a function of the Kalman Steps.

For both plots the same events were processed in the demo.

At the moment I have no idea...
Sebastian.

LSLTrackRep:
index.php?t=getfile&id=4536&private=0

GeaneTrackRep:
index.php?t=getfile&id=4537&private=0


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP. [message #6892 is a reply to message #6876] Tue, 10 June 2008 16:48 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *pv.infn.it
Hi Sebastian,
I think the problem might be in the Kalman calculation since q/p is used instead of 1/p as first parameter. I say this because using the mu+ in the runDemo.C I get good results. I tried changing the Kalman.cxx code in order to use 1/p (I attach here the changed file, if you search for the word CHECK you' ll find my changes) and it seems to me that it works for both negative and positive particles. Please check if it works also for you and if yes I think that the covariance change of sign is not a problem (I checked more accurately and also in STT it happens sometimes).
Please let me know!
Ciao,
Lia.
  • Attachment: Kalman.cxx
    (Size: 11.73KB, Downloaded 298 times)
Re: Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP. [message #6893 is a reply to message #6892] Tue, 10 June 2008 17:37 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *pv.infn.it
Hi Sebastian!
I talked to Alberto Rotondi and so I can add these additional comments.

First, the change in sign of the covariance elements should not be a problem: in principle during the extrapolation this is possible.

Second, concerning q/p and 1/p, this is the problem: the original GEANE routines are written with 1/p and not q/p, so the covariance matrix refers to 1/p. This is the reason why there is this problem with negative charge, because we are using the state vector with q/p together with the covariance matrix with 1/p.
So the exact solution if we want to change everything to q/p is to check all the routines in the interface which handle the covariance matrix and change them to q/p: we can do this here in Pavia.

So I think my previous solution of the changed Kalman.cxx is not completely exact, because it fixes the problem within the Kalman filtering step, but if in the end you change back to q/p you would still have the covariance matrix in 1/p. The correct choice would be:
1) change everything (also covariances) to q/p;
or
2) change everything (also the state) to 1/p.

It would be better to make tests with the positive particles for the moment.

What do you think?
Do we have to change the routines to q/p or we decide to use 1/p?
Lia.
Re: Revised CbmGeaneUtil, CbmGeanePro and CbmTrackParP. [message #6894 is a reply to message #6893] Tue, 10 June 2008 18:20 Go to previous message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *adsl.alicedsl.de
Hi Lia!

Great what you found out!
For positive particles indeed it works also for me!

GeaneTrackRep with mu+:

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

I do not know how much work it is to incorporate q/p into the GeaneInterface. This would be mainly done in trackbase, wouldn't it?

It would be great if you could take care of this!

Thanks again!!!

Best Regards!
Sebastian.


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Previous Topic: Revised genfit
Next Topic: floating point exception in geane
Goto Forum:
  


Current Time: Tue Apr 23 11:18:32 CEST 2024

Total time taken to generate the page: 0.00896 seconds