Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sHelix.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file sHelix.h
1 //===========================================================
5 //===========================================================
6 
7 #include "TMath.h"
8 
9 class sHelix {
10  public:
11  sHelix();
12  sHelix(float x0, float y0, float z0, float px, float py, float pz, float q, float b=1.5);
13  virtual ~sHelix() {}
14  float x(float t) {return u(t)+fX0+fR*TMath::Sin(fPhi);}
15  float y(float t) {return v(t)+fY0-fR*TMath::Cos(fPhi);}
16  float z(float t) {return w(t)+fZ0;}
17  float r(float t) {return TMath::Sqrt(x(t)*x(t)+y(t)*y(t));}
18 
19  float u(float t) {return -fR*TMath::Sin(fPhi-fW*t);}
20  float v(float t) {return fR*TMath::Cos(fPhi-fW*t);}
21  float w(float t) {return fC*t;}
22 
23  float k() {return fR/(fR*fR+fC*fC);}
24  float s(float t1,float t2) {return TMath::Sqrt(fR*fW*fR*fW+fC*fC)*(t2-t1);} // sqrt( x'^2 + y'^2 + z'^2 ) DeltaT
25  void breakIntoPieces(float t1, float t2, float x[100][3]);
26 
27  float findFirstInterceptTo(float rd, float hz);
28  void SaveTracktoRootScript(float ri, float ro, float z, char *filec);
29 
30  float W() {return fW;}
31  float R() {return fR;}
32  float C() {return fC;}
33  float Phi() {return fPhi;}
34  void Debug() {fDebug = true;}
35 
36  protected:
37  float fW;
38  float fR;
39  float fC;
40  float fPhi;
41  float fX0;
42  float fY0;
43  float fZ0;
44  float fDebug;
45 };