hi rooters,
When I use say:
const Double_t* p = helix.GetCurrentPoint();
all p[0],p[1],p[2] values are equal to zero.
Any Advice?
Can you be more precise ? what is “helix” ?
Hi cout,
I am trying to describe the trajectory of charged particles passing through magnetic field. I used TGeoHelix function:
TGeoHelix helix(Double_t curvature, Double_t step, Int_t charge = 1);
I was following this example,
root.cern.ch/root/roottalk/roott … gltracks.C
and didn’t get any errors but all points have zero value.
Hi,
You have to properly initialize the helix object, assuming you have called the non-default constructor:
fieldp->InitPoint(x,y,z);
fieldp->InitDirection(dx,dy,dz);
fieldp->UpdateHelix();
fieldp->Step(crtstep);
then get current point and direction.
Best,
Hi Andrei,
That worked… Thanks a lot