GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Tracking » LSLTrackrep covariances are zero
LSLTrackrep covariances are zero [message #8540] Wed, 13 May 2009 11:03 Go to next message
asanchez is currently offline  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 Go to previous messageGo to next message
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 Go to previous messageGo to next message
asanchez is currently offline  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 256 times)
Re: LSLTrackrep covariances are zero [message #8548 is a reply to message #8544] Wed, 13 May 2009 17:50 Go to previous messageGo to next message
Anonymous Poster From: *pool.einsundeins.de
Uhhh, this seems to be a question that maybe Sebastian could know about. I didnt develop LSLtrackRep.

Cheers, Christian
Re: LSLTrackrep covariances are zero [message #8549 is a reply to message #8548] Wed, 13 May 2009 19:06 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *gsi.de
OK,
but if i well remmmenber you have been the one who has modified
genfit up to now right?
That is any critik. Only i want to know
beacuse running the genfit version 3834 i get
a covariances matrix where after the fitting all the elements are filled, and now not.

Ok, i will continue to investigate
what can be the reason.

Anyway thanks a lot.

ALicia.
Re: LSLTrackrep covariances are zero [message #8550 is a reply to message #8549] Wed, 13 May 2009 20:10 Go to previous messageGo to next message
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 #8552 is a reply to message #8550] Thu, 14 May 2009 10:22 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *kph.uni-mainz.de
Hi Christian, sorry for delay.
Ok here we go.

first you should update the hyp , the geometry
and the macro hyp directories.
Substitute the geo file for HYP detector in sim_pid.C by
the new one HypST_newxy3C.geo

Then run sim_pid.C MC points
then run hit_pid.C Ideal clusters reco
then run runReco.C which should call the ideal patternreco
and the Kalman task.

I hope everything works without problems.
Thank you again for your time and help;)

GOOD LUCK! and let me know!!

best regarrds
ALicia.

You should be aware, that the gsi will switch off
power, computers (lxi machines )and also internet conexion around 17:00 today.
Re: LSLTrackrep covariances are zero [message #8570 is a reply to message #8550] Thu, 14 May 2009 16:09 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *kph.uni-mainz.de
Hi Christian, i have noticed there is
an error in LSLTrackRep.cxx line 177
Sorry can you comment out this line?

Maybe that is the reason why the asymmetric elements are not apearing.

best regarrds
ALicia.
Re: LSLTrackrep covariances are zero [message #8574 is a reply to message #8570] Mon, 18 May 2009 00:51 Go to previous messageGo to next message
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 #8575 is a reply to message #8574] Mon, 18 May 2009 08:30 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *54-82-r.retail.telecomitalia.it
One question: is somebody still using LSLTrackRep?

As far as I have understood there are several problems, such as the field is not taken from the maps but it is constant, or that the representation is not good for detectors such as MVD. GeaneTrackRep is the standard representation. I supposed LSLTrackRep was somehow not used anymore and then maybe the code was not currently updated.

Can somebody comment about the status of LSLTrackRep?
Re: LSLTrackrep covariances are zero [message #8577 is a reply to message #8575] Mon, 18 May 2009 11:07 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *gsi.de
Hi i'm using LSLtrackrep
because geane trackrep doesn't fullfill yet my
requirements.

Christian is by the time the person
who is taking also cares of possible
updates.

cheers ALicia.
Re: LSLTrackrep covariances are zero [message #8578 is a reply to message #8574] Mon, 18 May 2009 11:12 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *gsi.de
Hi Christian actually it was my fault Smile.
thanks in advance
and gute Besserung.

ALicia.
Re: LSLTrackrep covariances are zero [message #8581 is a reply to message #8578] Mon, 18 May 2009 13:45 Go to previous messageGo to next message
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 #8582 is a reply to message #8581] Mon, 18 May 2009 15:07 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *gsi.de
Well,
yes the problem seems to be solved.

Ok, with geane i don't manage yet to really fit the track.
It breaks after some hundred events.
In the future of course i would like to use geane trackrep, because the magnetic field , multi scattering and the energy losses in material aspects are well treated (i hope).

With LSLtrackrep, at least i get some feeling of the tracking
even if the magnetic field is considered constant.

I can say that at the moement LSLtrack rep is a good approximation for me.
I"m trying to get running with geane track rep also.

So i would appreciate if you don't remove LSLtrack rep, even if it is not going to be updated.

thanks in advance

ALicia.

Re: LSLTrackrep covariances are zero [message #8583 is a reply to message #8582] Mon, 18 May 2009 15:28 Go to previous messageGo to next message
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 #8584 is a reply to message #8540] Mon, 18 May 2009 15:38 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *to.infn.it
Hello everyone,

I'm trying to use the GeaneTrackRep Tracks in the following step of the procedure: Rho. There is a class AnalysisTools/PndMicroWriter which uses LSLTrackRep so far for filling the TCandidate objects. I was looking if it is easy to apply the GeaneTrackRep, but I see it takes some thinking first.

Is ist forseen in GeaneTrackRep to have an accessor which calculates the error (covariance) values to the position (the vertex?) & momentum vectors? With that I might apply it like the LSLTrackRep.

Cheers,
Ralf.
Re: LSLTrackrep covariances are zero [message #8585 is a reply to message #8584] Mon, 18 May 2009 15:59 Go to previous messageGo to next message
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 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 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" Wink)

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! Very Happy ) 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 Go to previous messageGo to next message
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 Go to previous message
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 Wink ).

Cheers, Christian
Previous Topic: Dch tracking in forward spectrometer
Next Topic: Inconsistency geant3/gcons/gpart.F and TGean3.cxx
Goto Forum:
  


Current Time: Sun Apr 28 14:49:21 CEST 2024

Total time taken to generate the page: 0.00953 seconds