ROOT logo
ROOT » GEOM » GEOM » TGeoHelix

class TGeoHelix: public TObject

   TGeoHelix - class representing a helix curve

  A helix is a curve defined by the following equations:
     x = (1/c) * COS(q*phi)
     y = (1/c) * SIN(q*phi)
     z = s * alfa
 where:
     c = 1/Rxy  - curvature in XY plane
     phi        - phi angle
     S = 2*PI*s - vertical separation between helix loops
     q = +/- 1  - (+)=left-handed, (-)=right-handed

   In particular, a helix describes the trajectory of a charged particle in magnetic
 field. In such case, the helix is right-handed for negative particle charge.
 To define a helix, one must define:
   - the curvature - positive defined
   - the Z step made after one full turn of the helix
   - the particle charge sign
   - the initial particle position and direction (force normalization to unit)
   - the magnetic field direction

 A helix provides:
   - propagation to a given Z position (in global frame)
   Double_t *point = TGeoHelix::PropagateToZ(Double_t z);
   - propagation to an arbitrary plane, returning also the new point
   - propagation in a geometry until the next crossed surface
   - computation of the total track length along a helix

Function Members (Methods)

public:
TGeoHelix()
TGeoHelix(Double_t curvature, Double_t step, Int_t charge = 1)
virtual~TGeoHelix()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
Double_tComputeSafeStep(Double_t epsil = 1E-6) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
const Double_t*GetCurrentDirection() const
const Double_t*GetCurrentPoint() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Double_tGetStep() const
virtual const char*TObject::GetTitle() const
Double_tGetTotalCurvature() const
virtual UInt_tTObject::GetUniqueID() const
Double_tGetXYcurvature() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
voidInitDirection(Double_t* dir, Bool_t is_normalized = kTRUE)
voidInitDirection(Double_t dirx, Double_t diry, Double_t dirz, Bool_t is_normalized = kTRUE)
voidInitPoint(Double_t* point)
voidInitPoint(Double_t x0, Double_t y0, Double_t z0)
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
Bool_tIsRightHanded() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
voidResetStep()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetCharge(Int_t charge)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetField(Double_t bx, Double_t by, Double_t bz, Bool_t is_normalized = kTRUE)
voidSetHelixStep(Double_t hstep)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetXYcurvature(Double_t curvature)
virtual voidShowMembers(TMemberInspector&)
voidStep(Double_t step)
Double_tStepToPlane(Double_t* point, Double_t* norm)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
voidUpdateHelix()
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
TGeoHelix(const TGeoHelix&)
TGeoHelix&operator=(const TGeoHelix&)

Data Members

public:
enum EGeoHelixTypes { kHelixNeedUpdate
kHelixStraigth
kHelixCircle
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
private:
Double_tfB[3]normalized direction for magnetic field
Double_tfCcurvature in XY plane
Double_tfDir[3]direction after a step
Double_tfDirInit[3]normalized initial direction
TGeoHMatrix*fMatrixtransformation of local helix frame to MARS
Double_tfPhiphi angle
Double_tfPoint[3]point after a step
Double_tfPointInit[3]initial point
Int_tfQright/left-handed (+/- 1) - "charge"
Double_tfSZ step of the helix / 2*PI
Double_tfStepcurrent step

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGeoHelix()
 Dummy constructor
TGeoHelix(Double_t curvature, Double_t step, Int_t charge = 1)
 Normal constructor
~TGeoHelix()
 Destructor
Double_t ComputeSafeStep(Double_t epsil = 1E-6) const
 Compute safe linear step that can be made such that the error
 between linear-helix extrapolation is less than EPSIL.
void InitPoint(Double_t x0, Double_t y0, Double_t z0)
 Initialize coordinates of a point on the helix
void InitPoint(Double_t* point)
 Set initial point on the helix.
void InitDirection(Double_t dirx, Double_t diry, Double_t dirz, Bool_t is_normalized = kTRUE)
 Initialize particle direction (tangent on the helix in initial point)
void InitDirection(Double_t* dir, Bool_t is_normalized = kTRUE)
 Initialize particle direction (tangent on the helix in initial point)
Double_t GetTotalCurvature() const
 Compute helix total curvature
void SetXYcurvature(Double_t curvature)
 Set XY curvature: c = 1/Rxy
void SetCharge(Int_t charge)
 Positive charge means left-handed helix.
void SetField(Double_t bx, Double_t by, Double_t bz, Bool_t is_normalized = kTRUE)
 Initialize particle direction (tangent on the helix in initial point)
void SetHelixStep(Double_t hstep)
 Set Z step of the helix on a complete turn. Positive or null.
void ResetStep()
 Reset current point/direction to initial values
void Step(Double_t step)
 Make a step from current point along the helix and compute new point, direction and angle
 To reach a plane/ shape boundary, one has to:
  1. Compute the safety to the plane/boundary
  2. Define / update a helix according local field and particle state (position, direction, charge)
  3. Compute the magnetic safety (maximum distance for which the field can be considered constant)
  4. Call TGeoHelix::Step() having as argument the minimum between 1. and 3.
  5. Repeat from 1. until the step to be made is small enough.
  6. Add to the total step the distance along a straigth line from the last point
     to the plane/shape boundary
Double_t StepToPlane(Double_t* point, Double_t* norm)
 Propagate initial point up to a given Z position in MARS.
void UpdateHelix()
 Update the local helix matrix.
TGeoHelix(const TGeoHelix& )
TGeoHelix & operator=(const TGeoHelix& )
const Double_t * GetCurrentPoint() const
{return fPoint;}
const Double_t * GetCurrentDirection() const
{return fDir;}
Double_t GetXYcurvature() const
{return fC;}
Double_t GetStep() const
{return fStep;}
Bool_t IsRightHanded() const
{return (fQ>0)?kFALSE:kTRUE;}