1 #ifndef ALIFMDGEOMETRYBUILDER_H
2 #define ALIFMDGEOMETRYBUILDER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
6 * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
8 * See cxx source for full Copyright notice
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.
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
35 //____________________________________________________________________
36 /** @class AliFMDGeometryBuilder
37 @brief Builder of FMD geometry.
38 This class takes care of actually building the geometry using the
39 @b TGeo classes. Various parameters are fecthed from the
40 AliFMDGeometry manager.
43 class AliFMDGeometryBuilder : public TTask
47 AliFMDGeometryBuilder();
49 @param detailed Whether to make a detailed geometry. */
50 AliFMDGeometryBuilder(Bool_t detailed);
51 virtual ~AliFMDGeometryBuilder() {}
53 virtual void Exec(Option_t* option="");
54 /** @param use Wheher to assemblies in the geometry definition */
55 virtual void UseAssembly(Bool_t use=kTRUE) { fUseAssembly = use; }
56 /** Whether to make a detailed geometry or not.
57 @param use If true, make a detailed geometry */
58 virtual void SetDetailed(Bool_t use) { fDetailed = use; }
59 /** @return Sector offset in volume tree */
60 Int_t GetSectorOff() const { return fSectorOff; }
61 /** @return Module offset in volume tree */
62 Int_t GetModuleOff() const { return fModuleOff; }
63 /** @return Ring offset in the volume tree */
64 Int_t GetRingOff() const { return fRingOff; }
65 /** @return Detector offfset in the volume tree */
66 Int_t GetDetectorOff() const { return fDetectorOff; }
69 AliFMDGeometryBuilder(const AliFMDGeometryBuilder& o)
71 fActiveId(o.fActiveId),
72 fDetailed(o.fDetailed),
73 fUseAssembly(o.fUseAssembly),
74 fSectorOff(o.fSectorOff),
75 fModuleOff(o.fModuleOff),
77 fDetectorOff(o.fDetectorOff),
88 /** Assignment operator */
89 AliFMDGeometryBuilder& operator=(const AliFMDGeometryBuilder&){return *this;}
90 /** Make a ring volume
91 @param r Ring geometry
92 @return Ring volume */
93 virtual TGeoVolume* RingGeometry(AliFMDRing* r);
95 /** Make a honey comb shape from passed parameters.
96 @param id Detector identifier (1,2, or 3)
97 @param ring Ring identifier ('I' or 'O')
98 @param r1 Inner radius
99 @param r2 Outer radius
101 @param t Thickness of material
102 @param c Clearing from horizontal.
103 @return Pointer to newly allocated composite shape. */
104 virtual TGeoShape* HoneycombShape(Int_t id, Char_t ring,
105 double r1, double r2,
106 double w, double t, double c=0.3);
107 /** Make a detector volume
108 @param d Detector geometry
109 @param motherTop Mother volume (detector volume)
110 @param motherBot Mother volume (detector volume)
111 @param zmother Z position of mother
112 @param innerTop Inner ring volume
113 @param innerBot Inner ring volume
114 @param outerTop Outer ring volume
115 @param outerBot Outer ring volume
116 @return Detector volume */
117 virtual TGeoVolume* DetectorGeometry(AliFMDDetector* d,
118 TGeoVolume* motherTop,
119 TGeoVolume* motherBot,
121 TGeoVolume* innerTop,
122 TGeoVolume* innerBot,
123 TGeoVolume* outerTop=0,
124 TGeoVolume* outerBot=0);
126 @param d Detector geometry
127 @param innerTop Inner ring volume
128 @param innerBot Inner ring volume
129 @return FMD1 volume */
130 virtual TGeoVolume* FMD1Geometry(AliFMD1* d,
131 TGeoVolume* innerTop,
132 TGeoVolume* innerBot);
134 @param d Detector geometry
135 @param innerTop Inner ring volume
136 @param innerBot Inner ring volume
137 @param outerTop Outer ring volume
138 @param outerBot Outer ring volume
139 @return FMD2 volume */
140 virtual TGeoVolume* FMD2Geometry(AliFMD2* d,
141 TGeoVolume* innerTop,
142 TGeoVolume* innerBot,
143 TGeoVolume* outerTop,
144 TGeoVolume* outerBot);
146 @param d Detector geometry
147 @param innerTop Inner ring volume
148 @param innerBot Inner ring volume
149 @param outerTop Outer ring volume
150 @param outerBot Outer ring volume
151 @return FMD3 volume */
152 virtual TGeoVolume* FMD3Geometry(AliFMD3* d,
153 TGeoVolume* innerTop,
154 TGeoVolume* innerBot,
155 TGeoVolume* outerTop,
156 TGeoVolume* outerBot);
159 TArrayI fActiveId; //! Active volume ID's
160 Bool_t fDetailed; // Whether to make a detailed simulation
161 Bool_t fUseAssembly; // Assembly volumes
162 Int_t fSectorOff; // Sector offset in volume tree
163 Int_t fModuleOff; // Module offset in volume tree
164 Int_t fRingOff; // Ring offset in the volume tree
165 Int_t fDetectorOff; // Detector offfset in the volume tree
167 TGeoMedium* fSi; //! Si Medium
168 TGeoMedium* fC; //! C Medium
169 TGeoMedium* fAl; //! Al Medium
170 TGeoMedium* fPCB; //! PCB Medium
171 TGeoMedium* fChip; //! Chip Medium
172 TGeoMedium* fAir; //! Air Medium
173 TGeoMedium* fPlastic; //! Plastic Medium
174 TGeoMedium* fCopper; //! Copper Medium
175 TGeoMedium* fSteel; //! Steel Medium
177 static const Char_t* fgkActiveName; // Name of Active volumes
178 static const Char_t* fgkSectorName; // Name of Sector volumes
179 static const Char_t* fgkStripName; // Name of Strip volumes
180 static const Char_t* fgkSensorName; // Name of Sensor volumes
181 static const Char_t* fgkPCBName; // Name of PCB volumes
182 static const Char_t* fgkCuName; // Name of copper volumes
183 static const Char_t* fgkChipName; // Name of chip volumes
184 static const Char_t* fgkLongLegName; // Name of LongLeg volumes
185 static const Char_t* fgkShortLegName; // Name of ShortLeg volumes
186 static const Char_t* fgkFrontVName; // Name of Front volumes
187 static const Char_t* fgkBackVName; // Name of Back volumes
188 static const Char_t* fgkRingTopName; // Name of Top ring volumes
189 static const Char_t* fgkRingBotName; // Name of Bottom ring volumes
190 static const Char_t* fgkHCName; // Name of Honeycomb volumes
191 static const Char_t* fgkIHCName; // Name of Inner honeycomb volumes
192 static const Char_t* fgkNoseName; // Name of Nose volumes
193 static const Char_t* fgkBackName; // Name of Back volumes
194 static const Char_t* fgkTopName; // Name of Back volumes
195 static const Char_t* fgkBeamName; // Name of Beam volumes
196 static const Char_t* fgkFlangeName; // Name of Flange volumes
197 static const Char_t* fgkFMDDCuName; // Name of FMDD copper volumes
198 static const Char_t* fgkFMDDPCBName; // Name of FMDD PCB volumes
199 static const Char_t* fgkFMDDChipName; // Name of FMDD chip volumes
200 static const Char_t* fgkFMDDName; // Name of FMDD volumes
201 static const Char_t* fgkFMDName; // Name of Half FMD volumes
203 ClassDef(AliFMDGeometryBuilder,1)
207 //____________________________________________________________________