library: libGraf3d #include "THelix.h" |
Inheritance Chart: | |||||||||||||||||
|
protected:
Double_t FindClosestPhase(Double_t phi0, Double_t cosine) THelix& operator=(const THelix&) void SetRotMatrix() public:
THelix() THelix(Double_t x, Double_t y, Double_t z, Double_t vx, Double_t vy, Double_t vz, Double_t w) THelix(Double_t* xyz, Double_t* v, Double_t w, Double_t* range = 0, EHelixRangeType rtype = kHelixZ, Double_t* axis = 0) THelix(const THelix& helix) virtual ~THelix() static TClass* Class() virtual void Copy(TObject& helix) const virtual void Draw(Option_t* option = "") virtual Option_t* GetOption() const virtual TClass* IsA() const virtual void Print(Option_t* option = "") const virtual void SavePrimitive(ostream& out, Option_t* option = "") virtual void SetAxis(Double_t* axis) virtual void SetAxis(Double_t x, Double_t y, Double_t z) void SetHelix(Double_t* xyz, Double_t* v, Double_t w, Double_t* range = 0, EHelixRangeType type = kUnchanged, Double_t* axis = 0) virtual void SetOption(Option_t* option = "") virtual void SetRange(Double_t* range, EHelixRangeType rtype = kHelixZ) virtual void SetRange(Double_t r1, Double_t r2, EHelixRangeType rtype = kHelixZ) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)
protected:
Double_t fX0 Initial X position Double_t fY0 Initial Y position Double_t fZ0 Initial Z position Double_t fVt Transverse velocity (constant of motion) Double_t fPhi0 Initial phase, so vx0 = fVt*cos(fPhi0) Double_t fVz Z velocity (constant of motion) Double_t fW Angular frequency Double_t fAxis[3] Direction unit vector of the helix axis TRotMatrix* fRotMat Rotation matrix: axis // z --> axis // fAxis Double_t fRange[2] Range of helix parameter t static Int_t fgMinNSeg minimal number of segments in polyline
______________________________________________________________________________ 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 = new TView(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
Set all helix parameters.
Helix normal constructor.
Helix normal constructor.
Save primitive as a C++ statement(s) on output stream out.
Set a new range for the helix. This will remake the polyline.
Finds the closest phase to phi0 that gives cos(phase) = cosine