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