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.

]]>

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

Cheers!]]>

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

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

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

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

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

Lia.

]]>

Thank you very much that you checked it!

I will have a look at the GeaneTrackRep...

Have a nice evening!

Cheers! Sebastian.]]>

With the modifications you gave me for the GeaneTrackRep I still see the divergence.

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:

GeaneTrackRep:

]]>

Please let me know!

Ciao,

Lia.]]>

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

Great what you found out!

For positive particles indeed it works also for me!

GeaneTrackRep with mu+:

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