#ifndef ROOT_THelix
#define ROOT_THelix
#ifndef ROOT_TPolyLine3D
#include "TPolyLine3D.h"
#endif
#ifndef ROOT_TRotMatrix
#include "TRotMatrix.h"
#endif
enum EHelixRangeType {
kHelixT, kHelixX, kHelixY, kHelixZ, kLabX, kLabY, kLabZ, kUnchanged
};
class THelix : public TPolyLine3D {
protected:
Double_t fX0;
Double_t fY0;
Double_t fZ0;
Double_t fVt;
Double_t fPhi0;
Double_t fVz;
Double_t fW;
Double_t fAxis[3];
TRotMatrix *fRotMat;
Double_t fRange[2];
THelix& operator=(const THelix&);
void SetRotMatrix();
Double_t FindClosestPhase(Double_t phi0, Double_t cosine);
static Int_t fgMinNSeg;
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();
virtual void Copy(TObject &helix) const;
virtual void Draw(Option_t *option="");
Option_t *GetOption() const {return fOption.Data();}
virtual void Print(Option_t *option="") const;
virtual void SavePrimitive(ostream &out, Option_t *option = "");
virtual void SetOption(Option_t *option="") {fOption = option;}
virtual void SetAxis(Double_t * axis);
virtual void SetAxis(Double_t x, Double_t y, Double_t z);
virtual void SetRange(Double_t * range, EHelixRangeType rtype=kHelixZ);
virtual void SetRange(Double_t r1, Double_t r2, EHelixRangeType rtype=kHelixZ);
void SetHelix(Double_t *xyz, Double_t *v, Double_t w,
Double_t *range=0, EHelixRangeType type=kUnchanged,
Double_t *axis=0);
ClassDef(THelix,2)
};
#endif