]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDGeometryBuilder.h
117113023375bf67627458eee3137b37e931e41a
[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 #ifndef ROOT_TTask
11 # include <TTask.h>
12 #endif
13 #ifndef ROOT_TArrayI
14 # include <TArrayI.h>
15 #endif
16 class TGeoVolume;
17 class TGeoMedium;
18 class AliFMD;
19 class AliFMDRing;
20 class AliFMDDetector;
21 class AliFMD1;
22 class AliFMD2;
23 class AliFMD3;
24
25 //____________________________________________________________________
26 /** @class AliFMDGeometryBuilder 
27     @brief Builder of FMD geometry. 
28     This class takes care of actually building the geometry using the
29     @b TGeo classes.  Various parameters are fecthed from the
30     AliFMDGeometry manager. 
31     @ingroup FMD_sim
32  */
33 class AliFMDGeometryBuilder : public TTask
34 {
35 public:
36   /** CTOR */
37   AliFMDGeometryBuilder();
38   /** CTOR 
39       @param detailed Whether to make a detailed geometry. */
40   AliFMDGeometryBuilder(Bool_t detailed);
41   virtual ~AliFMDGeometryBuilder() {}
42   /** Register */
43   virtual void Exec(Option_t* option="");
44   /** @param use Wheher to assemblies in the geometry definition */
45   virtual void UseAssembly(Bool_t use=kTRUE) { fUseAssembly = use; }
46   /** Whether to make a detailed geometry or not. 
47       @param use If true, make a detailed geometry */
48   virtual void SetDetailed(Bool_t use) { fDetailed = use; }
49   /** @return Sector offset in volume tree  */
50   Int_t GetSectorOff() const { return fSectorOff; }
51     /** @return Module offset in volume tree */
52   Int_t GetModuleOff() const { return fModuleOff; }
53     /** @return Ring offset in the volume tree  */
54   Int_t GetRingOff() const { return fRingOff; }
55     /** @return Detector offfset in the volume tree  */
56   Int_t GetDetectorOff() const { return fDetectorOff; }
57 protected:
58   /** Make a ring volume 
59       @param r Ring geometry 
60       @return  Ring volume */
61   virtual TGeoVolume* RingGeometry(AliFMDRing* r);
62   /** Make a detector volume 
63       @param d Detector geometry 
64       @param motherTop Mother volume (detector volume)
65       @param motherBot Mother volume (detector volume)
66       @param zmother Z position of mother 
67       @param innerTop Inner ring volume 
68       @param innerBot Inner ring volume 
69       @param outerTop Outer ring volume 
70       @param outerBot Outer ring volume 
71       @return  Detector volume */
72   virtual TGeoVolume* DetectorGeometry(AliFMDDetector* d, 
73                                        TGeoVolume* motherTop, 
74                                        TGeoVolume* motherBot, 
75                                        Double_t    zmother, 
76                                        TGeoVolume* innerTop, 
77                                        TGeoVolume* innerBot, 
78                                        TGeoVolume* outerTop=0,
79                                        TGeoVolume* outerBot=0);
80   /** Make FMD1 volume 
81       @param d Detector geometry 
82       @param innerTop Inner ring volume 
83       @param innerBot Inner ring volume 
84       @return FMD1 volume  */
85   virtual TGeoVolume* FMD1Geometry(AliFMD1* d, 
86                                    TGeoVolume* innerTop,
87                                    TGeoVolume* innerBot);
88   /** Make FMD2 volume 
89       @param d Detector geometry 
90       @param innerTop Inner ring volume 
91       @param innerBot Inner ring volume 
92       @param outerTop Outer ring volume 
93       @param outerBot Outer ring volume 
94       @return FMD2 volume  */
95   virtual TGeoVolume* FMD2Geometry(AliFMD2* d, 
96                                    TGeoVolume* innerTop, 
97                                    TGeoVolume* innerBot, 
98                                    TGeoVolume* outerTop,
99                                    TGeoVolume* outerBot);
100   /** Make FMD3 volume 
101       @param d Detector geometry 
102       @param innerTop Inner ring volume 
103       @param innerBot Inner ring volume 
104       @param outerTop Outer ring volume 
105       @param outerBot Outer ring volume 
106       @return FMD3 volume  */
107   virtual TGeoVolume* FMD3Geometry(AliFMD3* d, 
108                                    TGeoVolume* innerTop, 
109                                    TGeoVolume* innerBot, 
110                                    TGeoVolume* outerTop,
111                                    TGeoVolume* outerBot);
112
113
114   TArrayI     fActiveId;      //! Active volume ID's
115   Bool_t      fDetailed;      // Whether to make a detailed simulation 
116   Bool_t      fUseAssembly;   // Assembly volumes
117   Int_t       fSectorOff;     // Sector offset in volume tree 
118   Int_t       fModuleOff;     // Module offset in volume tree
119   Int_t       fRingOff;       // Ring offset in the volume tree 
120   Int_t       fDetectorOff;   // Detector offfset in the volume tree 
121
122   TGeoMedium* fSi;       //! Si Medium
123   TGeoMedium* fC;        //! C Medium
124   TGeoMedium* fAl;       //! Al Medium
125   TGeoMedium* fPCB;      //! PCB Medium
126   TGeoMedium* fChip;     //! Chip Medium
127   TGeoMedium* fAir;      //! Air Medium
128   TGeoMedium* fPlastic;  //! Plastic Medium
129   TGeoMedium* fCopper;   //! Copper Medium
130
131   static const Char_t* fgkActiveName;   // Name of Active volumes
132   static const Char_t* fgkSectorName;   // Name of Sector volumes
133   static const Char_t* fgkStripName;    // Name of Strip volumes
134   static const Char_t* fgkSensorName;   // Name of Sensor volumes
135   static const Char_t* fgkPCBName;      // Name of PCB volumes
136   static const Char_t* fgkCuName;       // Name of copper volumes
137   static const Char_t* fgkChipName;     // Name of chip volumes
138   static const Char_t* fgkLongLegName;  // Name of LongLeg volumes
139   static const Char_t* fgkShortLegName; // Name of ShortLeg volumes
140   static const Char_t* fgkFrontVName;   // Name of Front volumes
141   static const Char_t* fgkBackVName;    // Name of Back volumes
142   static const Char_t* fgkRingTopName;  // Name of Top ring volumes
143   static const Char_t* fgkRingBotName;  // Name of Bottom ring volumes
144   static const Char_t* fgkHCName;       // Name of Honeycomb volumes
145   static const Char_t* fgkIHCName;      // Name of Inner honeycomb volumes
146   static const Char_t* fgkNoseName;     // Name of Nose volumes
147   static const Char_t* fgkBackName;     // Name of Back volumes
148   static const Char_t* fgkBeamName;     // Name of Beam volumes
149   static const Char_t* fgkFlangeName;   // Name of Flange volumes
150   static const Char_t* fgkFMDName;      // Name of Half FMD volumes
151
152   ClassDef(AliFMDGeometryBuilder,1)
153 };
154
155 #endif
156 //____________________________________________________________________
157 //
158 // Local Variables:
159 //   mode: C++
160 // End:
161 //
162 // EOF
163 //
164