]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDGeometryBuilder.h
Compilation warnings
[u/mrichter/AliRoot.git] / FMD / AliFMDGeometryBuilder.h
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  */
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 
18 */
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 //____________________________________________________________________
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  */
42 class AliFMDGeometryBuilder : public TTask
43 {
44 public:
45   /** CTOR */
46   AliFMDGeometryBuilder();
47   /** CTOR 
48       @param detailed Whether to make a detailed geometry. */
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:
67   /** Copy CTOR */
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       fSteel(o.fSteel)
86   {}
87   /** Assignment operator */
88   AliFMDGeometryBuilder& operator=(const AliFMDGeometryBuilder&){return *this;}
89   /** Make a ring volume 
90       @param r Ring geometry 
91       @return  Ring volume */
92   virtual TGeoVolume* RingGeometry(AliFMDRing* r);
93   /** Make a detector volume 
94       @param d Detector geometry 
95       @param motherTop Mother volume (detector volume)
96       @param motherBot Mother volume (detector volume)
97       @param zmother Z position of mother 
98       @param innerTop Inner ring volume 
99       @param innerBot Inner ring volume 
100       @param outerTop Outer ring volume 
101       @param outerBot Outer ring volume 
102       @return  Detector volume */
103   virtual TGeoVolume* DetectorGeometry(AliFMDDetector* d, 
104                                        TGeoVolume* motherTop, 
105                                        TGeoVolume* motherBot, 
106                                        Double_t    zmother, 
107                                        TGeoVolume* innerTop, 
108                                        TGeoVolume* innerBot, 
109                                        TGeoVolume* outerTop=0,
110                                        TGeoVolume* outerBot=0);
111   /** Make FMD1 volume 
112       @param d Detector geometry 
113       @param innerTop Inner ring volume 
114       @param innerBot Inner ring volume 
115       @return FMD1 volume  */
116   virtual TGeoVolume* FMD1Geometry(AliFMD1* d, 
117                                    TGeoVolume* innerTop,
118                                    TGeoVolume* innerBot);
119   /** Make FMD2 volume 
120       @param d Detector geometry 
121       @param innerTop Inner ring volume 
122       @param innerBot Inner ring volume 
123       @param outerTop Outer ring volume 
124       @param outerBot Outer ring volume 
125       @return FMD2 volume  */
126   virtual TGeoVolume* FMD2Geometry(AliFMD2* d, 
127                                    TGeoVolume* innerTop, 
128                                    TGeoVolume* innerBot, 
129                                    TGeoVolume* outerTop,
130                                    TGeoVolume* outerBot);
131   /** Make FMD3 volume 
132       @param d Detector geometry 
133       @param innerTop Inner ring volume 
134       @param innerBot Inner ring volume 
135       @param outerTop Outer ring volume 
136       @param outerBot Outer ring volume 
137       @return FMD3 volume  */
138   virtual TGeoVolume* FMD3Geometry(AliFMD3* d, 
139                                    TGeoVolume* innerTop, 
140                                    TGeoVolume* innerBot, 
141                                    TGeoVolume* outerTop,
142                                    TGeoVolume* outerBot);
143
144
145   TArrayI     fActiveId;      //! Active volume ID's
146   Bool_t      fDetailed;      // Whether to make a detailed simulation 
147   Bool_t      fUseAssembly;   // Assembly volumes
148   Int_t       fSectorOff;     // Sector offset in volume tree 
149   Int_t       fModuleOff;     // Module offset in volume tree
150   Int_t       fRingOff;       // Ring offset in the volume tree 
151   Int_t       fDetectorOff;   // Detector offfset in the volume tree 
152
153   TGeoMedium* fSi;       //! Si Medium
154   TGeoMedium* fC;        //! C Medium
155   TGeoMedium* fAl;       //! Al Medium
156   TGeoMedium* fPCB;      //! PCB Medium
157   TGeoMedium* fChip;     //! Chip Medium
158   TGeoMedium* fAir;      //! Air Medium
159   TGeoMedium* fPlastic;  //! Plastic Medium
160   TGeoMedium* fCopper;   //! Copper Medium
161   TGeoMedium* fSteel;    //! Steel Medium
162
163   static const Char_t* fgkActiveName;   // Name of Active volumes
164   static const Char_t* fgkSectorName;   // Name of Sector volumes
165   static const Char_t* fgkStripName;    // Name of Strip volumes
166   static const Char_t* fgkSensorName;   // Name of Sensor volumes
167   static const Char_t* fgkPCBName;      // Name of PCB volumes
168   static const Char_t* fgkCuName;       // Name of copper volumes
169   static const Char_t* fgkChipName;     // Name of chip volumes
170   static const Char_t* fgkLongLegName;  // Name of LongLeg volumes
171   static const Char_t* fgkShortLegName; // Name of ShortLeg volumes
172   static const Char_t* fgkFrontVName;   // Name of Front volumes
173   static const Char_t* fgkBackVName;    // Name of Back volumes
174   static const Char_t* fgkRingTopName;  // Name of Top ring volumes
175   static const Char_t* fgkRingBotName;  // Name of Bottom ring volumes
176   static const Char_t* fgkHCName;       // Name of Honeycomb volumes
177   static const Char_t* fgkIHCName;      // Name of Inner honeycomb volumes
178   static const Char_t* fgkNoseName;     // Name of Nose volumes
179   static const Char_t* fgkBackName;     // Name of Back volumes
180   static const Char_t* fgkTopName;      // Name of Back volumes
181   static const Char_t* fgkBeamName;     // Name of Beam volumes
182   static const Char_t* fgkFlangeName;   // Name of Flange volumes
183   static const Char_t* fgkFMDDCuName;   // Name of FMDD copper volumes
184   static const Char_t* fgkFMDDPCBName;  // Name of FMDD PCB volumes 
185   static const Char_t* fgkFMDDChipName; // Name of FMDD chip volumes
186   static const Char_t* fgkFMDDName;     // Name of FMDD volumes
187   static const Char_t* fgkFMDName;      // Name of Half FMD volumes
188
189   ClassDef(AliFMDGeometryBuilder,1)
190 };
191
192 #endif
193 //____________________________________________________________________
194 //
195 // Local Variables:
196 //   mode: C++
197 // End:
198 //
199 // EOF
200 //
201