00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef ZEVIS_ZHelix
00010 #define ZEVIS_ZHelix
00011
00012 #include <TPolyLine3D.h>
00013 #include <TString.h>
00014 #include <TMath.h>
00015 #include <TPad.h>
00016 #include "BesView.h"
00017
00018 #ifndef ZEVIS_EZHelixRangeType
00019 #define ZEVIS_EZHelixRangeType
00020 enum EZHelixRangeType {
00021 kHelixPhi,
00022 kHelixX,
00023 kHelixY,
00024 kHelixZ,
00025 kHelixR
00026 };
00027 #endif
00028
00029 #ifndef ZEVIS_TrackType
00030 #define ZEVIS_TrackType
00031 enum TrackType {
00032 kVctrhl,
00033 kVctpar,
00034 kVcparsec,
00035 kZtprhl,
00036 kZttrhl,
00037 kZttrprm,
00038 kZttrsec
00039 };
00040 #endif
00041
00042 class ZHelix : public TPolyLine3D {
00043
00044 protected:
00045 TrackType fTrackType;
00046 Double_t fAzim;
00047 Double_t fQovR;
00048 Double_t fQxDh;
00049 Double_t fTDip;
00050 Double_t fRefX;
00051 Double_t fRefY;
00052 Double_t fRefZ;
00053 Double_t fRange[2];
00054 EZHelixRangeType fRType;
00055 Float_t fChi2;
00056 Int_t fNDoF;
00057 Double_t fSinAzim;
00058 Double_t fCosAzim;
00059
00060 Int_t fRSign;
00061 Double_t fPhiI;
00062 Double_t fPhiO;
00063 Bool_t fEnable;
00064
00065
00066 public:
00067 ZHelix();
00068 ZHelix(Double_t Azim, Double_t QovR, Double_t QxDh, Double_t refx,
00069 Double_t refy, Double_t refz, Double_t TDip, Double_t phii,
00070 Double_t phio, Float_t Chi2, Int_t NDoF,
00071 EZHelixRangeType RangeType = kHelixPhi,
00072 Double_t RangeMin = 0, Double_t RangeMax = 2*TMath::Pi());
00073 virtual ~ZHelix();
00074
00075 void Phi2XYZ(Double_t phi, Double_t& x, Double_t& y, Double_t& z);
00076 void Phi2ZR(Double_t phi, Double_t& z, Double_t& r);
00077 void SetRange(EZHelixRangeType RangeType,
00078 Double_t RangeMin, Double_t RangeMax);
00079 void SetTrackType(TrackType tt) {fTrackType = tt;};
00080 virtual void SetPoints(Option_t *option = "3D");
00081 Double_t X2Phi(Double_t x);
00082 Double_t Y2Phi(Double_t y);
00083 Double_t Z2Phi(Double_t z);
00084 Double_t R2Phi(Double_t r);
00085 Double_t Phi2S(Double_t phi);
00086 virtual void Print(Option_t *option = "") const;
00087 virtual void Draw(Option_t *option = "3D");
00088 virtual void Paint(Option_t *option = "3D");
00089
00090
00091 inline virtual Int_t SetNextPoint(Double_t x, Double_t y, Double_t z) {
00092 return TPolyLine3D::SetNextPoint(x, y, z);
00093 }
00094 inline virtual void SetPoint(Int_t point, Double_t x, Double_t y, Double_t z) {
00095 TPolyLine3D::SetPoint(point, x, y, z);
00096 }
00097 inline virtual void Delete(Option_t *option) { TObject::Delete(option); }
00098 inline virtual void DrawClass() { TObject::DrawClass(); }
00099 inline virtual void DrawClone(Option_t *option) { TObject::DrawClone(option); }
00100 inline virtual void SetDrawOption(Option_t *option) { TObject::SetDrawOption(option); }
00101 inline virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) {;}
00102
00103 ClassDef(ZHelix,8)
00104 };
00105
00106 #endif