]>
Commit | Line | Data |
---|---|---|
ab2f6604 | 1 | #ifndef ALIGTUBE_H |
2 | #define ALIGTUBE_H | |
3da30618 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
ab2f6604 | 8 | |
9 | #include "AliGShape.h" | |
10 | ||
11 | const Int_t kDivNum = 20; //default number of divisions | |
12 | ||
13 | class AliGTube: public AliGShape { | |
14 | ||
15 | protected: | |
16 | Double_t* fCoTab; // Table of cos(fPhi1) .... cos(fPhil+fDphi1) | |
17 | Float_t fAspectRatio; // defines (the ellipse semi-axis in Y)/(the ellipse semi-axis in X) | |
18 | Float_t fDz; // half length in z | |
19 | Int_t fNdiv; // number of segments (precision) | |
20 | Float_t fRmax; // ellipse semi-axis in X outside | |
21 | Float_t fRmin; // ellipse semi-axis in X inside | |
22 | Double_t* fSiTab; // Table of sin(fPhi1) .... sin(fPhil+fDphi1) | |
23 | ||
24 | virtual void MakeTableOfCoSin(); // Create the table of the fSiTab; fCoTab | |
25 | ||
26 | public: | |
27 | AliGTube(); /* Default Constructor */ | |
28 | AliGTube( Text_t *name, Text_t *title, Float_t rmin, Float_t rmax, Float_t dz, Float_t aspect=1); /* Constructor*/ | |
29 | AliGTube( Text_t *name, Text_t *title, Float_t rmax, Float_t dz); /* Constructor */ | |
30 | AliGTube( AliGTube *tube ); | |
31 | ~AliGTube(); /* Destructor */ | |
32 | ||
33 | void Draw(Option_t *option); | |
34 | void DrawShape(Option_t *option); // *MENU* | |
35 | Float_t GetAspectRatio(){return fAspectRatio;} | |
36 | Float_t GetDz() {return fDz;} | |
37 | Int_t GetNdiv() {return fNdiv;} | |
38 | Int_t GetNumberOfDivisions () const {if (fNdiv) return fNdiv; else return kDivNum;} | |
39 | Float_t GetRmax() {return fRmax;} | |
40 | Float_t GetRmin() {return fRmin;} | |
41 | void Paint(Option_t *option); | |
42 | void PaintGLPoints(Float_t *vertex); | |
43 | void SetDz(Float_t dz) {fDz= dz;} | |
44 | void SetPoints(Float_t *buff); | |
45 | void SetRmin(Float_t rmin) {fRmin= rmin;} | |
46 | void SetRmax(Float_t rmax) {fRmax= rmax;} | |
47 | void Sizeof3D() const; | |
48 | ||
49 | ClassDef(AliGTube,1) // Simple cone class | |
50 | }; | |
51 | ||
52 | #endif |