ROOT » GRAF3D » G3D » THelix

class THelix: public TPolyLine3D

 THelix has two different constructors.

   If a particle with charge q passes through a point (x,y,z)
   with momentum (px,py,pz) with magnetic field B along an axis (nx,ny,nz),
   this helix can be constrcuted like

      THelix p(x,y,z, px,py,pz, q*B, nx,ny,nz);

     (nx,ny,nz) defaults to (0,0,1).

   A helix in its own frame can be defined with a pivotal point
   (x0,y0,z0), the velocity at that point (vx0,vy0,vz0), and
   an angular frequency w.  Combining vx0 and vy0 to a transverse
   velocity vt0 one can parametrize the helix as

    x(t) = x0 - vt0 / w * sin(-w * t + phi0)
    y(t) = y0 + vt0 / w * cos(-w * t + phi0)
    z(t) = z0 + vz0 * t

   The second constructor has 6 parameters,

                 THelix pl1(xyz, v, w, range, rtype, axis);

             xyz  : array of initial position
             v    : array of initial velocity
             w    : angular frequency
             range: helix range
             rtype: kHelixZ specifies allowed drawing range in helix Z direction, i.e., along B field.
                    kLabZ specifies drawing range in lab frame.
                    kHelixX, kHelixY, kLabX, kLabY, kUnchanged ... etc can also be specified
             axis : helix axis

 Example constructing a helix with several default values and drawing it:

   TCanvas* helix_example_c1 = new TCanvas("helix_example_c1");
   TView *view = TView::CreateView(1);
   THelix *helix = new THelix(0., 0., 0., 1., 0., 0.3, 10.);

 This initializes a helix with its axis in Z direction (rtype=kHelixZ).

Function Members (Methods)

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
virtual voidCopy(TObject& helix) const
virtual voidTObject::Delete(Option_t* option = "")MENU
Int_tTAttLine::DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
virtual Int_tTPolyLine3D::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidDraw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
static voidTPolyLine3D::DrawOutlineCube(TList* outline, Double_t* rmin, Double_t* rmax)
virtual voidTPolyLine3D::DrawPolyLine(Int_t n, Float_t* p, Option_t* option = "")
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 voidTPolyLine3D::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
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
Int_tTPolyLine3D::GetLastPoint() const
virtual Color_tTAttLine::GetLineColor() const
virtual Style_tTAttLine::GetLineStyle() const
virtual Width_tTAttLine::GetLineWidth() const
Int_tTPolyLine3D::GetN() 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*GetOption() const
Float_t*TPolyLine3D::GetP() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() 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
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
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTPolyLine3D::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Int_tTPolyLine3D::Merge(TCollection* list)
virtual voidTAttLine::Modify()
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
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 voidTPolyLine3D::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidTAttLine::ResetAttLine(Option_t* option = "")
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTAttLine::SaveLineAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t widdef = 1)
virtual voidSavePrimitive(ostream& out, Option_t* option = "")
virtual voidSetAxis(Double_t* axis)
virtual voidSetAxis(Double_t x, Double_t y, Double_t z)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetHelix(Double_t* xyz, Double_t* v, Double_t w, Double_t* range = 0, EHelixRangeType type = kUnchanged, Double_t* axis = 0)
virtual voidTAttLine::SetLineAttributes()MENU
virtual voidTAttLine::SetLineColor(Color_t lcolor)
virtual voidTAttLine::SetLineColorAlpha(Color_t lcolor, Float_t lalpha)
virtual voidTAttLine::SetLineStyle(Style_t lstyle)
virtual voidTAttLine::SetLineWidth(Width_t lwidth)
virtual Int_tTPolyLine3D::SetNextPoint(Double_t x, Double_t y, Double_t z)MENU
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidSetOption(Option_t* option = "")
virtual voidTPolyLine3D::SetPoint(Int_t point, Double_t x, Double_t y, Double_t z)MENU
virtual voidTPolyLine3D::SetPolyLine(Int_t n, Option_t* option = "")
virtual voidTPolyLine3D::SetPolyLine(Int_t n, Float_t* p, Option_t* option = "")
virtual voidTPolyLine3D::SetPolyLine(Int_t n, Double_t* p, Option_t* option = "")
virtual voidSetRange(Double_t* range, EHelixRangeType rtype = kHelixZ)
virtual voidSetRange(Double_t r1, Double_t r2, EHelixRangeType rtype = kHelixZ)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTPolyLine3D::Size() const
virtual voidTAtt3D::Sizeof3D() const
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
THelix(const THelix& helix)
THelix(Double_t* xyz, Double_t* v, Double_t w, Double_t* range = 0, EHelixRangeType rtype = kHelixZ, Double_t* axis = 0)
THelix(Double_t x, Double_t y, Double_t z, Double_t vx, Double_t vy, Double_t vz, Double_t w)
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
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Double_tFindClosestPhase(Double_t phi0, Double_t cosine)
THelix&operator=(const THelix&)

Data Members

static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
Double_tfAxis[3]Direction unit vector of the helix axis
Int_tTPolyLine3D::fLastPointThe index of the last filled point
Color_tTAttLine::fLineColorline color
Style_tTAttLine::fLineStyleline style
Width_tTAttLine::fLineWidthline width
Int_tTPolyLine3D::fNNumber of points
Float_t*TPolyLine3D::fP[3*fN] Array of 3-D coordinates (x,y,z)
Double_tfPhi0Initial phase, so vx0 = fVt*cos(fPhi0)
Double_tfRange[2]Range of helix parameter t
TRotMatrix*fRotMatRotation matrix: axis // z --> axis // fAxis
Double_tfVtTransverse velocity (constant of motion)
Double_tfVzZ velocity (constant of motion)
Double_tfWAngular frequency
Double_tfX0Pivot's x position (see parametrization in class doc)
Double_tfY0Pivot's y position (see parametrization in class doc)
Double_tfZ0Pivot's z position (see parametrization in class doc)
static Int_tfgMinNSegminimal number of segments in polyline

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void SetHelix(Double_t* xyz, Double_t* v, Double_t w, Double_t* range = 0, EHelixRangeType type = kUnchanged, Double_t* axis = 0)
 Set all helix parameters.
 Helix default constructor.
THelix(Double_t x, Double_t y, Double_t z, Double_t vx, Double_t vy, Double_t vz, Double_t w)
 Helix normal constructor.
THelix(Double_t* xyz, Double_t* v, Double_t w, Double_t* range = 0, EHelixRangeType rtype = kHelixZ, Double_t* axis = 0)
 Helix normal constructor.
THelix(const THelix& helix)
 Helix copy constructor.
THelix& operator=(const THelix& )
assignement operator
 Helix destructor.
void Copy(TObject& helix) const
 Copy this helix to obj.
void Draw(Option_t* option = "")
 Draw this helix with its current attributes.
void Print(Option_t* option = "") const
 Dump this helix with its attributes.
void SavePrimitive(ostream& out, Option_t* option = "")
 Save primitive as a C++ statement(s) on output stream out.
void SetAxis(Double_t* axis)
 Set a new axis for the helix.  This will make a new rotation matrix.
void SetAxis(Double_t x, Double_t y, Double_t z)
 Set axis.
void SetRange(Double_t* range, EHelixRangeType rtype = kHelixZ)
 Set a new range for the helix.  This will remake the polyline.
void SetRange(Double_t r1, Double_t r2, EHelixRangeType rtype = kHelixZ)
 Set range.
void SetRotMatrix()
 Set the rotational matrix according to the helix axis.
Double_t FindClosestPhase(Double_t phi0, Double_t cosine)
 Finds the closest phase to phi0 that gives cos(phase) = cosine
void Streamer(TBuffer& )
 Stream an object of class THelix.
Option_t * GetOption() const
{return fOption.Data();}
void SetOption(Option_t* option = "")
{fOption = option;}