Home » PANDA » PandaRoot » Tracking » GEANE extrpolate to point of closest approach
GEANE extrpolate to point of closest approach [message #6345] |
Thu, 10 April 2008 15:42 |
Anonymous Poster
|
|
From: *visi.ucl.ac.uk
|
|
Hi GEANE experts,
I am interested in extrapolations to points of closest approach to arbitrary space points. I am very new to using GEANE, so a detailed answer (a.k.a. GEANE for dummies) would be very helpful
I can see that there are methods like
Bool_t SetWire(TVector3 extremity1, TVector3 extremity2);
Bool_t SetPoint(TVector3 pnt);
Bool_t PropagateToPCA(Int_t pca);
int FindPCA(Int_t pca, Int_t PDGCode, TVector3 point, TVector3 wire1, TVector3 wire2, Double_t maxdistance, Double_t &Ra
d, TVector3 &vpf, TVector3 &vwi, Double_t &Di, Float_t &trklength);
TVector3 GetPCAOnWire() { return vwi; }
TVector3 GetPCAOnTrack() { return vpf; }
Float_t GetLengthAtPCA() { return trklength; }
Bool_t PropagateToVirtualPlaneAtPCA(Int_t pca);
Bool_t BackTrackToVertex();
Bool_t BackTrackToVirtualPlaneAtPCA(Int_t pca);
So, I guess that some combination of these will be my answer. An example code I would need would have this as an input:
TVector3 mySpacePoint(x0,y0,z0);
And the output:
TVector3
pointInPOCAPlane
vectorPerp1ToTrackInPOCA
vectorPerp2ToTrackInPOCA
or
TVector3
pointInPOCAPlane
vectorInTrackDirectionInPOCA
Thanks you very much in advance!!
Bye, Christian
|
|
|
|
Re: GEANE extrpolate to point of closest approach [message #6355 is a reply to message #6351] |
Thu, 10 April 2008 17:29 |
Anonymous Poster
|
|
From: *visi.ucl.ac.uk
|
|
Hi,
well I see that you can extrapolate to some plane with these macros. But this is not what I would want to do here. I specifially need to look for a point od closest approach.
For getting a quick start on SpacePointHits in genfit it would be really nice to have some more specific info, i.e. a few lines of code which will do the job. I guess it's really easy and could be found out by myself by looking at many examples and trying out, but it would be more efficient to get some more specific input, if possible.
Bye Christian
|
|
|
Re: GEANE extrpolate to point of closest approach [message #6362 is a reply to message #6355] |
Fri, 11 April 2008 10:55 |
Lia Lavezzi
Messages: 291 Registered: May 2007 Location: Torino
|
first-grade participant |
From: *PV.INFN.IT
|
|
Hi Christian,
I tried to set up an example to better explain the propagation to the point of closest approach.
I attach to this message the tar file geanepca.tar.gz which contains the directory geanepca.
This directory contains the task CbmGeaneTrC which performs an example of propagation to point of closest approach to a point, the macro to run the simulation runMC.C and to run GEANE rungeane.C.
This example uses the same planes as in tutorial/ex1 (an array of planes perpendicular to the x axis), so you must set up the same environment, i.e.:
1) copy the geometry file plane3.geo to the geometry directory
2) add the plane directory (in which the plane is defined as a detector) to general CMakeLists.txt
3) add the geanepca to the list too.
This should allow you to run this example.
To do this you simply can run the runMC.C macro, which simulates 1000 muons from vertex (0,0,0) with momentum (1,0.01,0.01) (this is only to simplify things, but can be generalized). Then you can directly run the rungeane.C macro, which performs the propagation to the point of closest approach to a chosen point on the plane.
The plane is set at 135 cm from the origin in the x direction, perpendicular to it. The point is chosen after having a look to the montecarlo points: if you open the output file of runMC.C you will see that the fX coordinate is 135, wile the fY and fZ are smeared (due to the magnetic field) around 72 and 2 cm (this is why I chose these values to set the space point with respect to which calculate the closest approach). You can try with other values and modify the task in order to have a more realistic case.
The key part of the task is in these lines:
// ----- propagation: I use propagate to closest ------
TVector3 v0 = TVector3(135, 72, 2);
fPro->SetPoint(v0);
TVector3 wire1 = TVector3(0, 0, 0);
TVector3 wire2 = TVector3(0, 0, 0);
fPro->SetWire(wire1, wire2);
fPro->PropagateToPCA(1); // 1 if point; 2 if wire
Bool_t rc = fPro->Propagate(fStart, fRes, PDGCode);
- v0 is the space point with respect to which you want to calculate the point of closest approach and then extrapolate the track
- fPro->SetPoint(v0); tells this to GEANE
- TVector3 wire1 = TVector3(0, 0, 0);
TVector3 wire2 = TVector3(0, 0, 0);
fPro->SetWire(wire1, wire2);
these lines can also be avoided since you want the point of closest approach to a point and not to a wire.
- fPro->PropagateToPCA(1); // 1 if point; 2 if wire
tells GEANE you want to propagate to the PCA to a point and not to a wire
- Bool_t rc = fPro->Propagate(fStart, fRes, PDGCode);
performs the actual propagation: it extrapolates the track to a very high track length and stops when the point of closest approach to your defined space point has been found.
I hope this can be useful, if something does not work, please tell me, also because I set up this example in a short time, so maybe I lost something (let' s hope I did not )
Pay attention to one point:
two propagation to the point of closest approach are set up in GEANE: PCA to a space point and to a wire: the first one uses the CbmTrackParH representation and works in the SC frame; the second one uses the CbmTrackParP representation and works in the SD one.
Ciao,
Lia.
|
|
|
|
Goto Forum:
Current Time: Tue Dec 10 18:11:55 CET 2024
Total time taken to generate the page: 0.00885 seconds
|