]>
Commit | Line | Data |
---|---|---|
3b7275e7 | 1 | #ifndef ALIG3VOLUME_H |
2 | #define ALIG3VOLUME_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | #include <TGListTree.h> | |
9 | #include "TROOT.h" | |
10 | ||
11 | #include "THIGZ.h" | |
12 | #include "TGeant3.h" | |
13 | #include "TArrayF.h" | |
14 | #include "TNamed.h" | |
15 | #include "TList.h" | |
16 | ||
17 | class TShape; | |
18 | class TMaterial; | |
19 | ||
20 | class AliG3Volume : public TNamed | |
21 | { | |
22 | public: | |
23 | AliG3Volume() {;} | |
24 | AliG3Volume(const char* name); | |
25 | virtual ~AliG3Volume(){;} | |
26 | // G3 the volume | |
27 | virtual void Draw(Option_t * option =0); | |
28 | // G3 volume specs | |
29 | virtual void DrawSpec(); | |
30 | // Set volume parameter i | |
31 | virtual void SetParam(Int_t i, Float_t param); | |
32 | // Get volume parameters i | |
33 | virtual Float_t GetParam(Int_t i); | |
34 | // Set volume id | |
35 | virtual void SetIdVolume(Int_t id) {fIdVolume = id;} | |
36 | // Set volume copy number | |
37 | virtual void SetIdCopy(Int_t id) {fIdCopy = id;} | |
38 | // Set volume medium number | |
39 | virtual void SetIdMedium(Int_t id) {fIdMedium = id;} | |
40 | // Set volume material number | |
41 | virtual void SetIdMaterial(Int_t id) {fIdMaterial = id;} | |
42 | // Get volume id | |
43 | virtual Int_t GetIdVolume() const {return fIdVolume;} | |
44 | // Get copy number | |
45 | virtual Int_t GetIdCopy() const {return fIdCopy;} | |
46 | // Get medium number | |
47 | virtual Int_t Medium() const {return fIdMedium;} | |
48 | // Get material number | |
49 | virtual Int_t Material() const {return fIdMaterial;} | |
50 | // Increase copy number by one | |
51 | virtual void AddCopy() {fIdCopy ++;} | |
52 | // Set link to ListTree Item | |
53 | virtual void SetItem(TObject *item) {fItem = item;} | |
54 | // Get link to ListTree Item | |
55 | virtual void SetPosition(Float_t x, Float_t y, Float_t z); | |
56 | virtual TArrayF Position(Int_t i) const; | |
57 | ||
58 | virtual void SetRotMatrix(Int_t irot) {fRotMatrix = irot;} | |
59 | virtual Int_t RotMatrix() const {return fRotMatrix;} | |
60 | virtual void SetShape(Int_t shape) {fShape = shape;} | |
61 | virtual Int_t Shape() const {return fShape;} | |
62 | virtual void SetParameters(Int_t np, Float_t* param); | |
63 | virtual Int_t NParam() const {return fNParam;} | |
64 | virtual void Parameters(Int_t i, TArrayF& param) const; | |
65 | virtual TList* Copies() const {return fCopies;} | |
66 | virtual void AddCopy(AliG3Volume* volume); | |
67 | virtual AliG3Volume* Copy(Int_t i); | |
68 | ||
69 | virtual Int_t NCopies() const {return fNCopies;} | |
70 | virtual Bool_t Posp() const {return fPosp;} | |
71 | virtual void SetPosp(Bool_t flag) {fPosp = flag;} | |
72 | virtual void CreateTShape(char* nameV, TMaterial* mat); | |
73 | virtual void SetDivision(Int_t ndiv, Int_t axis, Float_t start, Float_t step); | |
74 | virtual void Division(Int_t& ndiv, Int_t& axis, Float_t& start, Float_t& step) const; | |
75 | virtual Int_t Axis() {return fAxis;} | |
76 | virtual Int_t Ndiv() {return fNdiv;} | |
77 | virtual Float_t Step() {return fStep;} | |
78 | virtual Float_t StartC() {return fStartC;} | |
79 | ||
80 | ||
81 | ||
82 | virtual TObject* GetItem() {return fItem;} | |
83 | ||
84 | AliG3Volume(const AliG3Volume&); | |
85 | ||
86 | ||
87 | private: | |
88 | ||
89 | TArrayF fPosition; // position with respect to mother volume | |
90 | TArrayF fParameters; // volume parameters | |
91 | TList* fCopies; // volume copies | |
92 | Bool_t fPosp; // flag for G3 POSP | |
93 | Int_t fNCopies; // number of copies | |
94 | Int_t fRotMatrix; // rotation with respect to mother volume | |
95 | Int_t fNParam; // number of volume parameters | |
96 | Int_t fAxis; // division axis | |
97 | Int_t fNdiv; // number of divisions | |
98 | Float_t fStep; // number of steps | |
99 | Float_t fStartC; // start coordinate | |
100 | Int_t fShape; // G3 volume shape | |
101 | Float_t fTheta; // theta-angle for drawing | |
102 | Float_t fPhi; // phi-angle for drawing | |
103 | Float_t fPsi; // psi-angle for drawing | |
104 | Float_t fU; // u-position | |
105 | Float_t fV; // v-position | |
106 | Float_t fUscale; // u-scaling factor | |
107 | Float_t fVscale; // v-scaling factor | |
108 | Bool_t fHide; // hide flag | |
109 | Bool_t fShadow; // shadow flag | |
110 | Int_t fFill; // fill option 1-6 | |
111 | Int_t fSeen; // seen option -2 - 1 | |
112 | Bool_t fClip; // clipping flag | |
113 | Float_t fClipXmin; // clip box range xmin | |
114 | Float_t fClipXmax; // clip box range xmax | |
115 | Float_t fClipYmin; // clip box range ymin | |
116 | Float_t fClipYmax; // clip box range ymax | |
117 | Float_t fClipZmin; // clip box range zmin | |
118 | Float_t fClipZmax; // clip box range zmax | |
119 | Int_t fIdVolume; // geant volume id | |
120 | Int_t fIdMedium; // geant medium id | |
121 | Int_t fIdMaterial; // geant material id | |
122 | Int_t fIdCopy; // copy flag | |
123 | TObject* fItem; //!current item | |
124 | AliG3Volume & operator=(const AliG3Volume&) {return *this;} | |
125 | ||
126 | ClassDef(AliG3Volume,1) // Volume Object for Drawing | |
127 | }; | |
128 | ||
129 | // | |
130 | // Drawing parameter tags | |
131 | enum AliDrawParamId { | |
132 | kTheta, | |
133 | kPhi, | |
134 | kPsi, | |
135 | kU, | |
136 | kV, | |
137 | kUscale, | |
138 | kVscale, | |
139 | kShadow, | |
140 | kHide, | |
141 | kFill, | |
142 | kSeen, | |
143 | kClip, | |
144 | kClipXmin, | |
145 | kClipXmax, | |
146 | kClipYmin, | |
147 | kClipYmax, | |
148 | kClipZmin, | |
149 | kClipZmax | |
150 | }; | |
151 | ||
152 | ||
153 | #endif |