#ifndef ROOT_TGeoHelix
#define ROOT_TGeoHelix
#ifndef ROOT_TObject
#include "TObject.h"
#endif
class TGeoHMatrix;
class TGeoHelix : public TObject
{
private :
Double_t fC;
Double_t fS;
Double_t fStep;
Double_t fPhi;
Double_t fPointInit[3];
Double_t fDirInit[3];
Double_t fPoint[3];
Double_t fDir[3];
Double_t fB[3];
Int_t fQ;
TGeoHMatrix *fMatrix;
TGeoHelix(const TGeoHelix&);
TGeoHelix &operator=(const TGeoHelix&);
public:
enum EGeoHelixTypes {
kHelixNeedUpdate = BIT(16),
kHelixStraigth = BIT(17),
kHelixCircle = BIT(18)
};
TGeoHelix();
TGeoHelix(Double_t curvature, Double_t step, Int_t charge=1);
virtual ~TGeoHelix();
void InitPoint(Double_t x0, Double_t y0, Double_t z0);
void InitPoint(Double_t *point);
void InitDirection(Double_t dirx, Double_t diry, Double_t dirz, Bool_t is_normalized=kTRUE);
void InitDirection(Double_t *dir, Bool_t is_normalized=kTRUE);
Double_t ComputeSafeStep(Double_t epsil=1E-6) const;
const Double_t *GetCurrentPoint() const {return fPoint;}
const Double_t *GetCurrentDirection() const {return fDir;}
Double_t GetXYcurvature() const {return fC;}
Double_t GetStep() const {return fStep;}
Double_t GetTotalCurvature() const;
Bool_t IsRightHanded() const {return (fQ>0)?kFALSE:kTRUE;}
void ResetStep();
Double_t StepToPlane(Double_t *point, Double_t *norm);
void SetCharge(Int_t charge);
void SetXYcurvature(Double_t curvature);
void SetField(Double_t bx, Double_t by, Double_t bz, Bool_t is_normalized=kTRUE);
void SetHelixStep(Double_t hstep);
void Step(Double_t step);
void UpdateHelix();
ClassDef(TGeoHelix, 1)
};
#endif