Home » PANDA » PandaRoot » Tracking » LSLTrackrep covariances are zero
LSLTrackrep covariances are zero [message #8540] |
Wed, 13 May 2009 11:03 |
asanchez
Messages: 350 Registered: March 2006
|
first-grade participant |
From: *gsi.de
|
|
Dear Christian, i was for a while not not
working with the tracking.
Today i have seen that there is some problems
during the fitting
if one uses the LSLtrack representation as it is now.
The main point is that when the Kalman is calling the routine
ProcessHit at line 219 (Kalman.cxx)
the covariance elements returned by rep->extrapolate(pl,state,cov);
are zero.
Then the kalman is trowing the following error message
if(cov[0][0]<1.E-50){
228 FitterException exc(COVEXC,__LINE__,__FILE__);
229 throw exc;
230 }
I wonder this actual situation because it was working fine.
I was investigating by myself
and i realized that
at LSLTrackrep.cxx the cov elements are not
filled anymore.
(Ofcourse if one uses the geanetrackrep
than the covariance matrix are filled by geane.)
So i did the following check, i have modified the routine
extrapolate(const DetPlane& pl,
TMatrixT<double>& statePred,
TMatrixT<double>& covPred)
of LSLtrackrep.cxx as follows (by adding red marked text
and commenting out the blue text):
extrapolate(const DetPlane& pl,
TMatrixT<double>& statePred,
TMatrixT<double>& covPred)
{
TMatrixT<double> jacobian;
//std::cout << "Extr from To: " << s << " " << sExtrapolateTo << std::endl;
double l=extrapolate(pl,statePred);
// covPred=JCovJ^T with J being Jacobian
jacobian.ResizeTo(5,5);
Jacobian(pl,statePred,jacobian);
TMatrixT<double> dummy(cov,TMatrixT<double>::kMultTranspose,jacobian);
covPred=jacobian*dummy;
covPred=cov;
return l;
}
And after this modifications it works again fine.
best regrads
ALicia S.
|
|
|
Re: LSLTrackrep covariances are zero [message #8542 is a reply to message #8540] |
Wed, 13 May 2009 14:05 |
Anonymous Poster
|
|
From: *pool.einsundeins.de
|
|
Dear Alicia,
I put in your suggested changes. Could you please test that it works fine now, and I didnt misunderstand anything?
Thanks a lot for pointing this mistake out. I really appreciate it!!
Cheers, Christian
|
|
|
Re: LSLTrackrep covariances are zero [message #8544 is a reply to message #8542] |
Wed, 13 May 2009 15:14 |
asanchez
Messages: 350 Registered: March 2006
|
first-grade participant |
From: *gsi.de
|
|
Dear Christian,
i have checked it now the modifications.
And it works fine, but i see something strange, maybe you can tell
me what is the reason?
I show you that with an example:
that is the output of the LSLtrackrep as it comes from
the initialization(DemoPatternRecoTask.cxx)
PndHypDPatternRecoTask::Exec
<<<<< Event 44 <<<
particle -211
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AbsTrackRep::Parameters at reference plane DetPlane: O(0.344825,1.1159,-76.427) u(1,0,0) v(0,1,0) n(0,0,1)
AbsTrackRep::State
5x1 matrix is as follows
| 0 |
------------------
0 | 0.3448
1 | 1.116
2 | -1.309
3 | 1.916
4 | -7.383
AbsTrackRep::Covariances
5x5 matrix is as follows
| 0 | 1 | 2 | 3 | 4 |
----------------------------------------------------------------------
0 | 0.01 0 0 0 0
1 | 0 0.01 0 0 0
2 | 0 0 0.1 0 0
3 | 0 0 0 0.1 0
4 | 0 0 0 0 0.1
AbsTrackRep::chi^2
0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
And that is the output of the Kalman task,
PndHypDKalmanTask::Exec Event 44
18 hits in track 0
Quote: | SUCESSFULL FIT!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AbsTrackRep::Parameters at reference plane DetPlane: O(0.33394,1.14308,-76.4169) u(0.707099,0.707099,0.00478064) v(0.70689,-0.706688,-0.0299813) n(-0.0178213,0.0245791,-0.999539)
AbsTrackRep::State
5x1 matrix is as follows
| 0 |
------------------
0 | 0.7668
1 | -0.971
2 | -1.362
3 | 1.879
4 | -7.383
AbsTrackRep::Covariances
5x5 matrix is as follows
| 0 | 1 | 2 | 3 | 4 |
----------------------------------------------------------------------
0 | 0.02639 -2.799e-19 0 0 0
1 | -2.799e-19 0.02639 0 0 0
2 | 0 0 3.2e+05 0 0
3 | 0 0 0 3.2e+05 0
4 | 0 0 0 0 3.2e+05
AbsTrackRep::chi^2
20.5819
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
momentum 0.13544
|
So my question is related to the fact that the diagonal elements
(red marked ones) of the cov matrix changes a little bit or nothing,
and i would expect that the asymmtric elements of the matrix were not zero.
Do you any idea, why ?
thanks a lot in advance
ALicia S.
-
Attachment: covEle.txt
(Size: 2.63KB, Downloaded 294 times)
|
|
|
|
|
Re: LSLTrackrep covariances are zero [message #8550 is a reply to message #8549] |
Wed, 13 May 2009 20:10 |
Anonymous Poster
|
|
From: *pool.einsundeins.de
|
|
Hi Alicia,
ah OK, if it came along with the reorganization, then I should take a look. In that case there are only a few possible places where it could go wrong.
Could you please provide me with some macro chain to reproduce this behaviour?
Cheers, Christian
|
|
|
|
|
Re: LSLTrackrep covariances are zero [message #8574 is a reply to message #8570] |
Mon, 18 May 2009 00:51 |
Anonymous Poster
|
|
From: *pool.einsundeins.de
|
|
Hi,
I want to thank you a lot for looking at the code. What a stupid mistake I made here! I corrected it. Please let me know if the problem persists. I havent looked at it yet, since I was ill the whole week.
Cheers, Christian
|
|
|
|
|
|
Re: LSLTrackrep covariances are zero [message #8581 is a reply to message #8578] |
Mon, 18 May 2009 13:45 |
Anonymous Poster
|
|
From: *natpool.mwn.de
|
|
Hi,
so just that I understand you correctly: Did your problem go away after the last fix?
In some sense Stefano is right, and LSL track rep is not so much supported anymore. GeaneTrackRep is now the default.
Alicia: What is the characteristics of LSL that you need and GeaneTrackRep does not provide?
Cheers, Christian
|
|
|
|
Re: LSLTrackrep covariances are zero [message #8583 is a reply to message #8582] |
Mon, 18 May 2009 15:28 |
Anonymous Poster
|
|
From: *natpool.mwn.de
|
|
Hi,
OK no problem. LSLtrackRep will stay. It is also needed for some TPC studies we are doing. But it should be clear do every genfit users that it is somewhat imperfect.
GeaneTrackRep has improved a lot in the last months. There were many crashes which have been fixed. I hope you will get along with it better than in the past.... Please report all trouble you have with it. My goal is to make it more stable, which I cant do without users finding those nasty failure scenarios.
Keep it up!!
CU, Christian
|
|
|
|
Re: LSLTrackrep covariances are zero [message #8585 is a reply to message #8584] |
Mon, 18 May 2009 15:59 |
Anonymous Poster
|
|
From: *e18.physik.tu-muenchen.de
|
|
Hi,
I think we should have such an accessors. In fact I think, it should be a requirement to all trackReps to have it, so that we can have such an accessors of the Track object (as a standard for the trackRep which is chosen to be the 'cardinal rep'). Can I ask the opinion of the Pavia group? If I provide the interface to the trackRep, can you provide an implementation for these error calculations? In the moment I wouldnt know how to do it. But I am sure it isnt a real problem.
Cheers, Christian
|
|
|
Re: LSLTrackrep covariances are zero [message #8589 is a reply to message #8585] |
Mon, 18 May 2009 18:20 |
Lia Lavezzi
Messages: 291 Registered: May 2007 Location: Torino
|
first-grade participant |
From: *47-151.net24.it
|
|
Hi Ralf and Christian,
the position and momentum errors in the master reference system, i.e. the 6 X 6 covariance matrix
which contains x,y,z,px,py,pz variances (and covariances), in a well defined point of the track can be easily obtained by using the utility functions in FairGeaneUtil, which provides the tools to convert both the status vector and covariance matrix from a frame to another: in this case we would use the FromSDToMars function which would transform our track description from the one on the plane to the one in the master reference system.
Moreover, if we have the parameters in, for example, the last track point, and we want it at the vertex, we just have to
use GEANE to propagate the track to the desired point and perform the conversion (from SD to MARS) there.
Ok, at the moment in GeaneTrackRep we can get the momentum and the position, but not the covariance matrix 6 X 6, but I think this could be added in quite an easy way (I hope these are not the "famous last words" )
Obviously any kind of propagation could be used to bring the track description to the desired point (not only GEANE,
but I support this one! ) and then the same utility functions can be applied to calculate the conversion; there is only one constraint: the starting description of the track must be the SC ("helix" representation) or the SD ("parabola" one). FairGeaneUtil gives you the opportunity to convert these two representations to the mars representation, since these are the ones usually used to describe the track.
So, if I well understood your requests (if not, please tell me) I think that if you, Christian, give me the interface I could fill it with the error calculation.
Ciao,
Lia.
|
|
|
Re: LSLTrackrep covariances are zero [message #8590 is a reply to message #8589] |
Mon, 18 May 2009 19:26 |
Anonymous Poster
|
|
From: *pool.einsundeins.de
|
|
Hi Lia,
that is exactly what I meant to say. I will tell you, when I am finished with the interface. I want to think this through a little, because it is a very general thing. More news in the next days...
Cheers, Christian
|
|
|
Re: LSLTrackrep covariances are zero [message #8694 is a reply to message #8590] |
Wed, 27 May 2009 12:16 |
Anonymous Poster
|
|
From: *pool.einsundeins.de
|
|
Hi,
I just made the interface for our 6x6 covariance:
In Track you now have
void getPosMomCov(const DetPlane& pl,TVector3& pos,TVector3& mom,TMatrixT<double>& cov)
that will call of the cardinal TrackRep the method also called
void getPosMomCov(const DetPlane& pl,TVector3& pos,TVector3& mom,TMatrixT<double>& cov).
I made a definition in GeaneTrackRep.cxx already, which is just a dummy. It would be great if you could put an implementation there. In this method, you should also fill pos and mom and then the 6x6 matrix (dont forget to resize it ).
Cheers, Christian
|
|
|
Goto Forum:
Current Time: Sun Dec 01 13:27:14 CET 2024
Total time taken to generate the page: 0.00682 seconds
|