/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/ZHelix.h

Go to the documentation of this file.
00001 //
00002 // ZHelix.h
00003 //
00004 // $Author: tianhl $
00005 // $Date: 2007/10/11 07:16:03 $
00006 // $Revision: 1.1.1.1 $
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;    // Type of track
00046   Double_t         fAzim;         // Azimuth
00047   Double_t         fQovR;         // Q/R
00048   Double_t         fQxDh;         // Q*D_h
00049   Double_t         fTDip;         // tan(Dip)
00050   Double_t         fRefX;         // Helix reference point x coordinate
00051   Double_t         fRefY;         // Helix reference point y coordinate
00052   Double_t         fRefZ;         // Helix reference point z coordinate
00053   Double_t         fRange[2];     // Range of helix (in phi)
00054   EZHelixRangeType fRType;        // Helix range type
00055   Float_t          fChi2;         // Chi2 of the fit
00056   Int_t            fNDoF;         // Degrees of freedom
00057   Double_t         fSinAzim;      // Sin(Azimuth)
00058   Double_t         fCosAzim;      // Cos(Azimuth)
00059   // Transient data members
00060   Int_t            fRSign;        
00061   Double_t         fPhiI;         // phi inner
00062   Double_t         fPhiO;         // phi outer
00063   Bool_t           fEnable;       // enable of drawing of helix, could be set false for bad tracks
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; // *MENU*
00087   virtual void Draw(Option_t *option = "3D");
00088   virtual void Paint(Option_t *option = "3D");
00089 
00090   // Dummies
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) // ZeVis Helix
00104 };
00105 
00106 #endif

Generated on Tue Nov 29 23:12:04 2016 for BOSS_7.0.2 by  doxygen 1.4.7