File indexing completed on 2025-01-18 10:12:19
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TPCON
0013 #define ROOT_TPCON
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #include "TShape.h"
0028
0029
0030 const Int_t kDiv = 20;
0031
0032
0033 class TPCON : public TShape {
0034 protected:
0035
0036 mutable Double_t *fSiTab;
0037 mutable Double_t *fCoTab;
0038
0039 Float_t fPhi1;
0040 Float_t fDphi1;
0041 Int_t fNdiv;
0042 Int_t fNz;
0043 Float_t *fRmin;
0044 Float_t *fRmax;
0045 Float_t *fDz;
0046
0047 TPCON(const TPCON&);
0048 TPCON& operator=(const TPCON&);
0049
0050 virtual void MakeTableOfCoSin() const;
0051 virtual void FillTableOfCoSin(Double_t phi, Double_t angstep,Int_t n) const;
0052 void SetPoints(Double_t *points) const override;
0053 virtual Bool_t SetSegsAndPols(TBuffer3D & buffer) const;
0054
0055 public:
0056 TPCON();
0057 TPCON(const char *name, const char *title, const char *material, Float_t phi1, Float_t dphi1, Int_t nz);
0058 ~TPCON() override;
0059
0060 virtual void DefineSection(Int_t secNum, Float_t z, Float_t rmin, Float_t rmax);
0061 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
0062 const TBuffer3D &GetBuffer3D(Int_t reqSections) const override;
0063 virtual Int_t GetNumberOfDivisions () const {if (fNdiv) return fNdiv; else return kDiv;}
0064 virtual Float_t GetPhi1() const {return fPhi1;}
0065 virtual Float_t GetDhi1() const {return fDphi1;}
0066 virtual Int_t GetNz() const {return fNz;}
0067 virtual Float_t *GetRmin() const {return fRmin;}
0068 virtual Float_t *GetRmax() const {return fRmax;}
0069 virtual Float_t *GetDz() const {return fDz;}
0070 virtual Int_t GetNdiv() const {return fNdiv;}
0071 virtual void SetNumberOfDivisions (Int_t p);
0072 void Sizeof3D() const override;
0073
0074 ClassDefOverride(TPCON,2)
0075 };
0076
0077 #endif