Home » PANDA » PandaRoot » Tracking » Problems with GEANE and trackbase
Problems with GEANE and trackbase [message #6010] |
Fri, 07 March 2008 02:40 ![Go to next message Go to next message](/theme/gsi/images/down.png) |
Sebastian Neubert
Messages: 282 Registered: March 2006 Location: Munich
|
first-grade participant |
![basti.neubert](/theme/gsi/images/skype.png) From: *dip.t-dialin.net
|
|
Hi!
After some hours of fruitless debugging I came back to the following problem:
I have a script (look at recotasks/demo/geaneDemo.C) with these lines:
// Setup a trackrep which uses geane
CbmGeanePro* gePro=new CbmGeanePro();
TVector3 pos(0.1,0.1,0.1);
TVector3 mom(0.1,0.1,1.);
TVector3 poserr=TVector3(0.1,0.1,0.1);
TVector3 momerr=0.2*mom;
DetPlane initplane(TVector3(pos),TVector3(1.,0.,0.),TVector3(0.,1.,0.));
double q=-1;
CbmTrackParP par(pos,mom,poserr,momerr,q,
initplane.getO(),initplane.getU(),initplane.getV());
par.Print();
Note that px=py!
These lines lead to the following output:
======================================================
Position : (0.1, 0.1, 0.1)
Slopes : dx/dz = 0.0008, dy/dz = 0.0004
q/p = -0.99
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Note that dx/dz!=dy/dz. Something is going really wrong!
When I tried to track the problem I stumbled over the following lines. What the hack is meant with y-z-plane???
// Tranform error matrix
// FROM MASTER VARIABLES (px, py,pz, x, y, z)
// TO SD (transverse or local system)
// VARIABLES (1/p, v', w', v, w)
//
// Method: the MARS system is considered as a detector system SD1 with
// y-z as the detector plane. Hence eq (79) of the
// report CMS 2006/001 is used to go from canonical to SD1 variables.
// Then, the SD1 to SD routine is used.
// In this way the track length variation and the magnetic field
// effects are correctly taken into account.
//
// Authors: A. Rotondi and A. Fontana (July 2007)
Another issue: trackbase uses the magnetic field. It get's this from the CbmRun singleton object. This construct creates nasty dependencies which make it unnecessarily hard to write tests for the code. It was always advertized that PandaRoot is getting rid of the cross-dependencies.
Best Regards, Sebastian.
PS: Please allow me the comment, that I am quite disappointed, that after one year this is still not in order! And that I have to dig into other people's code while at the same time apparently nobody from the geane community ever even had a look at GeaneTrackRep. It is YOUR responsibility that this works!
I needed to say that. Now let's go and get the damn tracking running!
Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
|
|
|
|
|
Re: Problems with GEANE and trackbase [message #6030 is a reply to message #6010] |
Tue, 11 March 2008 11:12 ![Go to previous message Go to previous message](/theme/gsi/images/up.png) ![Go to next message Go to next message](/theme/gsi/images/down.png) |
Andrea Fontana
Messages: 32 Registered: May 2007
|
continuous participant |
From: *PV.INFN.IT
|
|
Dear Sebastian,
I focus only on the technical issues that you are raising with your
email, since I am certainly not in a position to tell you what your
responsibilities and duties are!
Our routines were carefully debugged and tested, but this does not
exclude exceptions of course, which we can always fix. However we have
looked at this particular case and the problem seems not to be in the
code, but in the compiler's flags: the current CMakelists.txt calls a
macro named Compiler_Check() that causes your error.
The problem showed up after january 29th 2008, long after we released
the code: we did not receive any complaint before and the same routine
worked well for us (it is actually extensively used both in tutorial2
and in our Kalman filter).
I do not know the purpose of this compiler macro, but it is a recent change
in the svn (it was not there at the KVI workshop): I would like to
ask to Mohammad what is this new makefile macro for.
As a correction I think we can put a workaround by switching this flag
off for geane (if this is possible).
Regarding y-z, in this case it is exactly the y-z plane in MARS (you
shoot along x) which is used as starting plane for the SD1 to SD2
conversion.
Regards,
Andrea Fontana
|
|
|
|
|
Re: Problems with GEANE and trackbase [message #6037 is a reply to message #6035] |
Tue, 11 March 2008 15:26 ![Go to previous message Go to previous message](/theme/gsi/images/up.png) ![Go to next message Go to next message](/theme/gsi/images/down.png) |
Andrea Fontana
Messages: 32 Registered: May 2007
|
continuous participant |
From: *pv.infn.it
|
|
Hi Sebastian,
regarding the CbmTrackParP, we can help you and we will have a look.
Regarding the division of tasks, what you say is not totally correct: what
we agreed whas that our group was providing the track follower and integrating
it with the interface developed by Mohammad and that your group was
developing the Kalman filter structure and use Geane as a track follower.
It was always intended by us that this job was to be done together:
this means that we help you, by trying out your Demo class for instance.
As far as I remember, in september, when we sat together, you were not helping
me in integrating geane in genfit but we were helping each other, because you are
not familiar with geane and we are not with genfit.
I think we sent you a modified version last october where we suggested you
how to change the code to be able to shoot along any direction. This did
not have any follow up and we assumed it was ok for you. We can do
other tests, but you are the main developer of this part.
Anyway, all this discussion is not constructive: we will look into
GeaneTrackRep. But if you need help on specific topics, just ask and we
will help you.
Regards,
Andrea
|
|
|
|
|
|
|
|
Re: Problems with GEANE and trackbase [message #6114 is a reply to message #6111] |
Wed, 19 March 2008 12:36 ![Go to previous message Go to previous message](/theme/gsi/images/up.png) ![Go to next message Go to next message](/theme/gsi/images/down.png) |
Lia Lavezzi
Messages: 291 Registered: May 2007 Location: Torino
|
first-grade participant |
![calliroe](/theme/gsi/images/skype.png) From: *PV.INFN.IT
|
|
Hallo Mohammad,
just a remark on the -O2 flag: it is connected only to the wrong values of the slopes Sebastian was talking about, not to the crash of the code.
In fact, running just his simplified code:
// Setup a trackrep which uses geane
CbmGeanePro* gePro=new CbmGeanePro();
CbmTrackParP dummy;
TVector3 pos(0.1,0.1,0.1);
TVector3 mom(0.1,0.1,1.);
TVector3 poserr=TVector3(0.1,0.1,0.1);
TVector3 momerr=0.2*mom;
DetPlane initplane(TVector3(pos),TVector3(1.,0.,0.),TVector3(0.,1.,0.));
double q=-1;
CbmTrackParP par(pos,mom,poserr,momerr,q, initplane.getO(),initplane.getU(),initplane.getV());
par.Print();
here is what I get:
1) if I run it with the Check_Compiler and with the -O2 flag, I get the wrong values of the slopes dx/dz and dy/dz (the same values Sebastian talked about)
2) if I run it with the macro but deleting the -O2 flag in CMAKE_CXX_FLAGS_DEBUG, I get the correct values of the slopes.
I am using Scientific Linux CERN SLC 4.6, gcc 3.4.6.
Best regards,
Lia.
|
|
|
|
|
Re: Problems with GEANE and trackbase [message #6294 is a reply to message #6293] |
Tue, 08 April 2008 14:27 ![Go to previous message Go to previous message](/theme/gsi/images/up.png) ![Go to next message Go to next message](/theme/gsi/images/down.png) |
Sebastian Neubert
Messages: 282 Registered: March 2006 Location: Munich
|
first-grade participant |
![basti.neubert](/theme/gsi/images/skype.png) From: *e18.physik.tu-muenchen.de
|
|
Hi!
In CbmTrackParP (SD system) I found this inconsistency (at least it is an inconsistency with my understanding):
TVector3 positionsd = util.FromMARSToSDCoord(TVector3(fX, fY, fZ), forigin, fiver, fjver, fkver);
fU = positionsd.X();
fV = positionsd.Y();
fW = positionsd.Z();
The SD system is defined in such a way, that v and w span the detector plane. However this should correspond to x and y when I define a Detectorplane like this:
DetPlane plane(TVector3(0.0,0.0,0.0),TVector3(1.,0.,0.),TVector3(0.,1.,0.));
Looking to the paper by Andrea and Pablo it is clear to me that this is indeed connected to the SP representation where the beam IS a special direction and is assumed to be the x-axis instead of the z-axis as we have in PANDA.
Ideas how to solve this are most welcome!
Cheers!
Sebastian.
Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
[Updated on: Tue, 08 April 2008 14:32] Report message to a moderator
|
|
|
|
Re: Problems with GEANE and trackbase [message #6299 is a reply to message #6294] |
Tue, 08 April 2008 15:59 ![Go to previous message Go to previous message](/theme/gsi/images/up.png) ![Go to next message Go to next message](/theme/gsi/images/down.png) |
Lia Lavezzi
Messages: 291 Registered: May 2007 Location: Torino
|
first-grade participant |
![calliroe](/theme/gsi/images/skype.png) From: *pv.infn.it
|
|
Hi Sebastian,
I don' t know if I understood well the problem, but first of all a remark on the SP system: the SP system is only a particular case of the SD system, which can be used when the detector planes are placed perpendicularly to the x-axis. Please note that here in the GEANE classes we never use the SP system, but only the SD (CbmTrackParP) and the SC (CbmTrackParH).
Concerning the inconsistency you are talking about: is it the fact that in CbmTrackParP, where the frame is (u,v,w), the plane is spanned by v and w, while in DetPlane where the frame is (x, y, z) it is spanned by x and y?
Actually I think that this would not be so dangerous if we are aware about it and treat carefully the transition from DetPlane to CbmTrackParP and vice-versa...
In GEANE it has been chosen this description for the SD just to keep the old fortran GEANE one and to be able to rewrite in C++ the fortran routines (see CbmGeaneUtil) without the need to rewrite all the mathematics!
Please let me know if I completely misunderstood your mail
Lia.
|
|
|
Re: Problems with GEANE and trackbase [message #6312 is a reply to message #6299] |
Wed, 09 April 2008 12:12 ![Go to previous message Go to previous message](/theme/gsi/images/up.png) ![Go to next message Go to next message](/theme/gsi/images/down.png) |
Sebastian Neubert
Messages: 282 Registered: March 2006 Location: Munich
|
first-grade participant |
![basti.neubert](/theme/gsi/images/skype.png) From: *e18.physik.tu-muenchen.de
|
|
Hi!
I have found a bug in CbmTrackParP. There is an array which is uncoorrectly initalized:
- Double_t PD[3], RD[6][6], H[3], CH, SP1, PC[3], RC[3];
+ Double_t PD[3], RD[6][6], H[3], CH, SP1, PC[3], RC[15];
The lower row is the fix.
With this the initialization problem is solved.
GeaneTrackRep is running now. However I still do not get the correct results as on my old system. TBC...
Cheers! Sebastian.
Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sun Sep 01 14:38:14 CEST 2024
Total time taken to generate the page: 0.00681 seconds
|