class THelix: public TPolyLine3D

 Helix is, hmmm, well, a helix.  It has 3 different constructors.

 Comments/suggestions/etc on this class should be sent to the author:
             pyeh@cdfsga.fnal.gov (Ping Yeh)

   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(x0,y0,z0, 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 initial position
   (x0,y0,z0) and "velocity" (vx0,vy0,vz0), both 3-vectors, and
   an angular frequency w.  The parametric equation of the helix is

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


   The 'normal constructor' has 6 parameters,

       Example:
                 THelix pl1(xyz0, v0, w, range, rtype, axis);

         where:
             xyz0  : array of initial position
             v0    : 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



 A Third constructor uses several default values:

       Example:
   c1 = new TCanvas("c1");
   TView *view = TView::CreateView(1);
   view->SetRange(-1,-1,-1,1,1,1);
   THelix *helix = new THelix(0.0, 0.0, 0.0, 1.0, 0.0, 0.3, 10.0);
   helix->Draw();

 will initializes a helix with its axis in Z direction (rtype=kHelixZ).
 range[0] = 0 and range[1] = 1

Function Members (Methods)

public:
THelix()
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~THelix()
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 = "")
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() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
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() const
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() const
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()
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 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 = "") const
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 = "")
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()
virtual voidTAttLine::SetLineColor(Color_t lcolor)
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)
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)
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, char* parent)
virtual Int_tTPolyLine3D::Size() const
virtual voidTAtt3D::Sizeof3D() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& 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
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
Double_tFindClosestPhase(Double_t phi0, Double_t cosine)
voidTObject::MakeZombie()
THelix&operator=(const THelix&)
voidSetRotMatrix()

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Double_tfAxis[3]Direction unit vector of the helix axis
UInt_tTPolyLine3D::fGLList!The list number for OpenGL view
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
TStringTPolyLine3D::fOptionoptions
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_tfX0Initial X position
Double_tfY0Initial Y position
Double_tfZ0Initial Z position
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.
THelix(const THelix& helix)
 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
~THelix()
 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& b)
 Stream an object of class THelix.
Option_t * GetOption()
{return fOption.Data();}
void SetOption(Option_t* option = "")
{fOption = option;}

Author: Ping Yeh 19/12/97
Last update: root/g3d:$Id: THelix.h 20882 2007-11-19 11:31:26Z rdm $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.