00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TGeoHelix
00013 #define ROOT_TGeoHelix
00014
00015
00016 #ifndef ROOT_TObject
00017 #include "TObject.h"
00018 #endif
00019
00020 class TGeoHMatrix;
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class TGeoHelix : public TObject
00036 {
00037 private :
00038 Double_t fC;
00039 Double_t fS;
00040 Double_t fStep;
00041 Double_t fPhi;
00042 Double_t fPointInit[3];
00043 Double_t fDirInit[3];
00044 Double_t fPoint[3];
00045 Double_t fDir[3];
00046 Double_t fB[3];
00047 Int_t fQ;
00048 TGeoHMatrix *fMatrix;
00049
00050 public:
00051 enum EGeoHelixTypes {
00052 kHelixNeedUpdate = BIT(16),
00053 kHelixStraigth = BIT(17),
00054 kHelixCircle = BIT(18)
00055 };
00056
00057 TGeoHelix();
00058 TGeoHelix(Double_t curvature, Double_t step, Int_t charge=1);
00059
00060 virtual ~TGeoHelix();
00061
00062 void InitPoint(Double_t x0, Double_t y0, Double_t z0);
00063 void InitPoint(Double_t *point);
00064 void InitDirection(Double_t dirx, Double_t diry, Double_t dirz, Bool_t is_normalized=kTRUE);
00065 void InitDirection(Double_t *dir, Bool_t is_normalized=kTRUE);
00066
00067 Double_t ComputeSafeStep(Double_t epsil=1E-6) const;
00068 const Double_t *GetCurrentPoint() const {return fPoint;}
00069 const Double_t *GetCurrentDirection() const {return fDir;}
00070 Double_t GetXYcurvature() const {return fC;}
00071 Double_t GetStep() const {return fStep;}
00072 Double_t GetTotalCurvature() const;
00073 Bool_t IsRightHanded() const {return (fQ>0)?kFALSE:kTRUE;}
00074
00075 void ResetStep();
00076 Double_t StepToPlane(Double_t *point, Double_t *norm);
00077
00078
00079 void SetCharge(Int_t charge);
00080 void SetXYcurvature(Double_t curvature);
00081 void SetField(Double_t bx, Double_t by, Double_t bz, Bool_t is_normalized=kTRUE);
00082 void SetHelixStep(Double_t hstep);
00083
00084 void Step(Double_t step);
00085
00086 void UpdateHelix();
00087
00088 ClassDef(TGeoHelix, 1)
00089 };
00090
00091 #endif
00092