GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » GEANE: Propagate to Plane not implemented
icon5.gif  GEANE: Propagate to Plane not implemented [message #7411] Wed, 15 October 2008 08:08 Go to next message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *ikp.kfa-juelich.de
Dear GEANE-Developers,

unfortunately the PropagateToPlane function is not implemented in GeanePro. I want to propagate particle tracks onto the surface of my MVD sensors. Which function can I use for it if PropagateToVolume is not working for the MVD and PropagateToPlane is not implemented?

Thank you for your help

Tobias
Re: GEANE: Propagate to Plane not implemented [message #7412 is a reply to message #7411] Wed, 15 October 2008 09:11 Go to previous messageGo to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: 217.10.215*
Hallo Tobias,

1. PropagateToVolume:

I am not sure if this will help, but if you use VoulmeId and zero for the copy number then it will propagate to the first node he find with this id!
any way we have to investigate if we could give the full name to Geane!

2. PropagateToPlane

It is implemented, but not fully! if you choose PropagateToPlane then you have to use :

CbmGeanePro::Propagate(CbmTrackParP *TStart, CbmTrackParP *TEnd, Int_t PDG)

and not the Helix presentation! also this should be trivial to extend, but for now you have the tools to change the representation yourself!

I hope this will help you.

Mohammad
Re: GEANE: Propagate to Plane not implemented [message #7413 is a reply to message #7412] Wed, 15 October 2008 09:48 Go to previous messageGo to next message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *ikp.kfa-juelich.de
Hi Mohammad,

thank you for your reply.

I think I solved the PropagateToPlane problem. There was an error in CbmGeanePro::PropagateToPlane.

The position of the final plane was not given correctly. The o-Vector was internally calculated as the cross product of u and v, which is wrong. The o-Vector has to come from the plane itself. With this fix at least the propagated points at the plane look reasonably. I still have to figure out if this is true for the errors as well.

Cheers,

Tobias

Re: GEANE: Propagate to Plane not implemented [message #7414 is a reply to message #7413] Wed, 15 October 2008 10:42 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *pv.infn.it
Hi Tobias,
I think the cross product is correct, since in the PropagateToPlane(TVector3 &v0, TVector3 &v1, TVector3 &v2) you give as input the three vectors o, u and v.

They will be given to the EUFILP routine, which says to GEANE to "propagate to plane" in the Propagate(CbmTrackParP *TStart, CbmTrackParP *TEnd, Int_t PDG) function (as Mohammad said).

To do this a vector is filled Float_t plo[12], in this way:

TVector3 v1u=v1.Unit();
TVector3 v2u=v2.Unit();

// first vector on plane
plo[0]=v1u.X(); 
plo[1]=v1u.Y();
plo[2]=v1u.Z();
// second vector on plane
plo[3]=v2u.X();
plo[4]=v2u.Y();
plo[5]=v2u.Z();
// origin of the plane 
plo[6]=v0.X();
plo[7]=v0.Y();
plo[8]=v0.Z();

// normal to the plane (the third vector to define the reference system u, v, w)
TVector3 v3=v1u.Cross(v2u); 
plo[9]=v3(0);
plo[10]=v3(1);
plo[11]=v3(2);


So what did you exactly change?

Ciao,
Lia.
Re: GEANE: Propagate to Plane not implemented [message #7415 is a reply to message #7414] Wed, 15 October 2008 11:29 Go to previous messageGo to next message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *ikp.kfa-juelich.de
Hi Lia,

you are right. I modified the lines with plo[9] = v0.Dead), plo[10] = v0.Y(), plo[11].v0.Z().

Which is wrong but did not cause any harm, because v0 is orthogonal to v1 and v2.

I corrected it in my code and switched to CbmTrackParP. Now the code runs stable but the results are a puzzling.

I have simulated a 1 GeV proton flying through the MVD. I take Geane to predict the point on the various detector planes from the first point in the MVD. For most of the points the prediction works in the way that the predicted points are close to the MC points from the simulation but some of the points are far outside the detector.

In addition the given errors from Geane are for the x and y coordinate of the points too low and not consistent. For the z coordinate it seems to fit. At least the pull distribution looks reasonable. I have added the two pull distributions to this message. The diagrams are restricted to a range of -10 to 10 otherwise you could not see anything because some pulls get really big.

I hope you have an idea, why this happens.

Cheers

Tobias
Re: GEANE: Propagate to Plane not implemented [message #7416 is a reply to message #7415] Wed, 15 October 2008 12:05 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *pv.infn.it
Quote:


I modified the lines with plo[9] = v0.Dead), plo[10] = v0.Y(), plo[11].v0.Z().
Which is wrong but did not cause any harm, because v0 is orthogonal to v1 and v2.


...ok, just pay attention that you need the triplet v0, v1, v2 to be right handed...

Concerning the results you get, if you plot GeaneTrackPar.fX - GeaneTrackFinal.fX is it correct? I mean, is it centered at 0? Is there a problem only on the error calculation or also on the parameter value?

It' s not easy to understand what happens without looking at to code Confused ... is your code in the svn repository? Can I have a look at (and maybe try to run) it, please?

Ciao,
Lia.

Re: GEANE: Propagate to Plane not implemented [message #7417 is a reply to message #7416] Wed, 15 October 2008 12:26 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *pv.infn.it
Hi again,
one more remark: Susanna suggested also that to plot the pull distributions and correctly compare the MC to the GEANE output you need to change some cuts following the instructions in gconfig/SetCuts.C and rerun both the simulation and GEANE.

We are afraid this will not completely solve the problem, but maybe it will improve a little the results.

Lia.
Re: GEANE: Propagate to Plane not implemented [message #7418 is a reply to message #7417] Wed, 15 October 2008 13:01 Go to previous messageGo to next message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *ikp.kfa-juelich.de
Hi Lia,

here is the class I am using to run GEANE and the corresponding macro.

You have to copy the class into the pandaroot/mvd/MvdTools folder and modify the CMakeLists.txt and MvdLinkDef.h files.

For the macro you have to run first the runMvdSim.C macro. Be sure that the output file of runMvdSim.C matches the input file of runGeane.C.

Thank you very much for your help.

Cheers,

Tobias
Re: GEANE: Propagate to Plane not implemented [message #7422 is a reply to message #7418] Wed, 15 October 2008 19:00 Go to previous messageGo to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *pv.infn.it
Hi Tobias,
I had a look at the code and here is what I found:

1) in the task the fPro->PropagateFromPlane(startU, startV) is missing;

2) GEANE does not see any magnetic field since in the simulation macro runSimMvd.C the lines to save the magnetic field to the parameter file are missing.

After getting the RuntimeDataBase:
CbmRuntimeDb *rtdb=fRun->GetRuntimeDb();
Bool_t kParameterMerged=kTRUE;
CbmParRootFileIo* output=new CbmParRootFileIo(kParameterMerged);
output->open(parOutput.Data(),"RECREATE");
rtdb->setOutput(output);


These lines should be added:
PndMultiFieldPar* fieldPar = (PndMultiFieldPar*) rtdb->getContainer("PndMultiFieldPar");
if ( fField ) { fieldPar->SetParameters(fField); }
fieldPar->setInputVersion(fRun->GetRunId(),1);
fieldPar->setChanged();


In this way GEANE can find the field.

I attach some results I got with this change:
res_withB and res_withoutB are the simple GEANE - MonteCarlo x coordinate; pull_withB and pull_withoutB are the pull distributions.

Ciao,
Lia.
Re: GEANE: Propagate to Plane not implemented [message #7423 is a reply to message #7422] Thu, 16 October 2008 09:13 Go to previous message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *ikp.kfa-juelich.de
Hi Lia,

you are great Very Happy.

Now it looks like I would expect it. There are still a few rare hits outside the detector but the distributions are perfectly fine.

Thank you again for your help.

Ciao,

Tobias
Previous Topic: Materials and radiation lengths in pandaroot
Next Topic: PndFlatParticleGenerator
Goto Forum:
  


Current Time: Mon Apr 29 10:42:06 CEST 2024

Total time taken to generate the page: 0.00604 seconds