When I use say:
const Double_t* p = helix.GetCurrentPoint();
all p,p,p values are equal to zero.
Can you be more precise ? what is “helix” ?
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.
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.
That worked… Thanks a lot