]>
Commit | Line | Data |
---|---|---|
54e415a8 | 1 | #ifndef ALIFMDGEOMETRYBUILDER_H |
2 | #define ALIFMDGEOMETRYBUILDER_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights | |
4 | * reserved. | |
5 | * | |
6 | * Latest changes by Christian Holm Christensen <cholm@nbi.dk> | |
7 | * | |
8 | * See cxx source for full Copyright notice | |
9 | */ | |
02a27b50 | 10 | // Builder of FMD geometry. |
11 | // This class takes care of actually building the geometry using the | |
12 | // TGeo classes. Various parameters are fecthed from the | |
13 | // AliFMDGeometry manager. | |
c2fc1258 | 14 | /** @file AliFMDGeometryBuilder.h |
15 | @author Christian Holm Christensen <cholm@nbi.dk> | |
16 | @date Mon Mar 27 12:41:17 2006 | |
17 | @brief Class to build the FMD geometry | |
18 | */ | |
54e415a8 | 19 | #ifndef ROOT_TTask |
20 | # include <TTask.h> | |
21 | #endif | |
22 | #ifndef ROOT_TArrayI | |
23 | # include <TArrayI.h> | |
24 | #endif | |
25 | class TGeoVolume; | |
26 | class TGeoMedium; | |
27 | class AliFMD; | |
28 | class AliFMDRing; | |
29 | class AliFMDDetector; | |
30 | class AliFMD1; | |
31 | class AliFMD2; | |
32 | class AliFMD3; | |
33 | ||
34 | //____________________________________________________________________ | |
9f662337 | 35 | /** @class AliFMDGeometryBuilder |
36 | @brief Builder of FMD geometry. | |
37 | This class takes care of actually building the geometry using the | |
38 | @b TGeo classes. Various parameters are fecthed from the | |
39 | AliFMDGeometry manager. | |
40 | @ingroup FMD_sim | |
41 | */ | |
54e415a8 | 42 | class AliFMDGeometryBuilder : public TTask |
43 | { | |
44 | public: | |
54e415a8 | 45 | /** CTOR */ |
9f662337 | 46 | AliFMDGeometryBuilder(); |
47 | /** CTOR | |
48 | @param detailed Whether to make a detailed geometry. */ | |
54e415a8 | 49 | AliFMDGeometryBuilder(Bool_t detailed); |
50 | virtual ~AliFMDGeometryBuilder() {} | |
51 | /** Register */ | |
52 | virtual void Exec(Option_t* option=""); | |
53 | /** @param use Wheher to assemblies in the geometry definition */ | |
54 | virtual void UseAssembly(Bool_t use=kTRUE) { fUseAssembly = use; } | |
55 | /** Whether to make a detailed geometry or not. | |
56 | @param use If true, make a detailed geometry */ | |
57 | virtual void SetDetailed(Bool_t use) { fDetailed = use; } | |
58 | /** @return Sector offset in volume tree */ | |
59 | Int_t GetSectorOff() const { return fSectorOff; } | |
60 | /** @return Module offset in volume tree */ | |
61 | Int_t GetModuleOff() const { return fModuleOff; } | |
62 | /** @return Ring offset in the volume tree */ | |
63 | Int_t GetRingOff() const { return fRingOff; } | |
64 | /** @return Detector offfset in the volume tree */ | |
65 | Int_t GetDetectorOff() const { return fDetectorOff; } | |
66 | protected: | |
02a27b50 | 67 | /** Copy CTOR */ |
b5ee4425 | 68 | AliFMDGeometryBuilder(const AliFMDGeometryBuilder& o) |
69 | : TTask(o), | |
70 | fActiveId(o.fActiveId), | |
71 | fDetailed(o.fDetailed), | |
72 | fUseAssembly(o.fUseAssembly), | |
73 | fSectorOff(o.fSectorOff), | |
74 | fModuleOff(o.fModuleOff), | |
75 | fRingOff(o.fRingOff), | |
76 | fDetectorOff(o.fDetectorOff), | |
77 | fSi(o.fSi), | |
78 | fC(o.fC), | |
79 | fAl(o.fAl), | |
80 | fPCB(o.fPCB), | |
81 | fChip(o.fChip), | |
82 | fAir(o.fAir), | |
83 | fPlastic(o.fPlastic), | |
84 | fCopper(o.fCopper) | |
85 | {} | |
02a27b50 | 86 | /** Assignment operator */ |
87 | AliFMDGeometryBuilder& operator=(const AliFMDGeometryBuilder&){return *this;} | |
54e415a8 | 88 | /** Make a ring volume |
89 | @param r Ring geometry | |
90 | @return Ring volume */ | |
91 | virtual TGeoVolume* RingGeometry(AliFMDRing* r); | |
92 | /** Make a detector volume | |
93 | @param d Detector geometry | |
f8616692 | 94 | @param motherTop Mother volume (detector volume) |
95 | @param motherBot Mother volume (detector volume) | |
54e415a8 | 96 | @param zmother Z position of mother |
f8616692 | 97 | @param innerTop Inner ring volume |
98 | @param innerBot Inner ring volume | |
99 | @param outerTop Outer ring volume | |
100 | @param outerBot Outer ring volume | |
54e415a8 | 101 | @return Detector volume */ |
102 | virtual TGeoVolume* DetectorGeometry(AliFMDDetector* d, | |
bf000c32 | 103 | TGeoVolume* motherTop, |
104 | TGeoVolume* motherBot, | |
105 | Double_t zmother, | |
106 | TGeoVolume* innerTop, | |
107 | TGeoVolume* innerBot, | |
108 | TGeoVolume* outerTop=0, | |
109 | TGeoVolume* outerBot=0); | |
54e415a8 | 110 | /** Make FMD1 volume |
111 | @param d Detector geometry | |
f8616692 | 112 | @param innerTop Inner ring volume |
113 | @param innerBot Inner ring volume | |
54e415a8 | 114 | @return FMD1 volume */ |
bf000c32 | 115 | virtual TGeoVolume* FMD1Geometry(AliFMD1* d, |
116 | TGeoVolume* innerTop, | |
117 | TGeoVolume* innerBot); | |
54e415a8 | 118 | /** Make FMD2 volume |
119 | @param d Detector geometry | |
f8616692 | 120 | @param innerTop Inner ring volume |
121 | @param innerBot Inner ring volume | |
122 | @param outerTop Outer ring volume | |
123 | @param outerBot Outer ring volume | |
54e415a8 | 124 | @return FMD2 volume */ |
bf000c32 | 125 | virtual TGeoVolume* FMD2Geometry(AliFMD2* d, |
126 | TGeoVolume* innerTop, | |
127 | TGeoVolume* innerBot, | |
128 | TGeoVolume* outerTop, | |
129 | TGeoVolume* outerBot); | |
54e415a8 | 130 | /** Make FMD3 volume |
131 | @param d Detector geometry | |
f8616692 | 132 | @param innerTop Inner ring volume |
133 | @param innerBot Inner ring volume | |
134 | @param outerTop Outer ring volume | |
135 | @param outerBot Outer ring volume | |
54e415a8 | 136 | @return FMD3 volume */ |
bf000c32 | 137 | virtual TGeoVolume* FMD3Geometry(AliFMD3* d, |
138 | TGeoVolume* innerTop, | |
139 | TGeoVolume* innerBot, | |
140 | TGeoVolume* outerTop, | |
141 | TGeoVolume* outerBot); | |
54e415a8 | 142 | |
143 | ||
144 | TArrayI fActiveId; //! Active volume ID's | |
145 | Bool_t fDetailed; // Whether to make a detailed simulation | |
146 | Bool_t fUseAssembly; // Assembly volumes | |
147 | Int_t fSectorOff; // Sector offset in volume tree | |
148 | Int_t fModuleOff; // Module offset in volume tree | |
149 | Int_t fRingOff; // Ring offset in the volume tree | |
150 | Int_t fDetectorOff; // Detector offfset in the volume tree | |
151 | ||
152 | TGeoMedium* fSi; //! Si Medium | |
153 | TGeoMedium* fC; //! C Medium | |
154 | TGeoMedium* fAl; //! Al Medium | |
155 | TGeoMedium* fPCB; //! PCB Medium | |
156 | TGeoMedium* fChip; //! Chip Medium | |
157 | TGeoMedium* fAir; //! Air Medium | |
158 | TGeoMedium* fPlastic; //! Plastic Medium | |
159 | TGeoMedium* fCopper; //! Copper Medium | |
160 | ||
161 | static const Char_t* fgkActiveName; // Name of Active volumes | |
162 | static const Char_t* fgkSectorName; // Name of Sector volumes | |
163 | static const Char_t* fgkStripName; // Name of Strip volumes | |
bf000c32 | 164 | static const Char_t* fgkSensorName; // Name of Sensor volumes |
54e415a8 | 165 | static const Char_t* fgkPCBName; // Name of PCB volumes |
bf000c32 | 166 | static const Char_t* fgkCuName; // Name of copper volumes |
167 | static const Char_t* fgkChipName; // Name of chip volumes | |
54e415a8 | 168 | static const Char_t* fgkLongLegName; // Name of LongLeg volumes |
169 | static const Char_t* fgkShortLegName; // Name of ShortLeg volumes | |
170 | static const Char_t* fgkFrontVName; // Name of Front volumes | |
171 | static const Char_t* fgkBackVName; // Name of Back volumes | |
bf000c32 | 172 | static const Char_t* fgkRingTopName; // Name of Top ring volumes |
173 | static const Char_t* fgkRingBotName; // Name of Bottom ring volumes | |
174 | static const Char_t* fgkHCName; // Name of Honeycomb volumes | |
175 | static const Char_t* fgkIHCName; // Name of Inner honeycomb volumes | |
54e415a8 | 176 | static const Char_t* fgkNoseName; // Name of Nose volumes |
177 | static const Char_t* fgkBackName; // Name of Back volumes | |
178 | static const Char_t* fgkBeamName; // Name of Beam volumes | |
179 | static const Char_t* fgkFlangeName; // Name of Flange volumes | |
bf000c32 | 180 | static const Char_t* fgkFMDName; // Name of Half FMD volumes |
54e415a8 | 181 | |
182 | ClassDef(AliFMDGeometryBuilder,1) | |
183 | }; | |
184 | ||
185 | #endif | |
186 | //____________________________________________________________________ | |
187 | // | |
188 | // Local Variables: | |
189 | // mode: C++ | |
190 | // End: | |
191 | // | |
192 | // EOF | |
193 | // | |
194 |