A more efficient way of volume creations and other minor improvements (Mario)
[u/mrichter/AliRoot.git] / ITS / UPGRADE / ITSUpgradeSim / AliITSUv1Layer.h
CommitLineData
b705c75b 1#ifndef ALIITSUV1LAYER_H
2#define ALIITSUV1LAYER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6
7//*************************************************************************
8// This class Defines the Geometry for the ITS Upgrade using TGeo
9// This is a work class used to study different configurations
10// during the development of the new ITS structure.
11//
12// Mario Sitta <sitta@to.infn.it>
13//*************************************************************************
14
15
16/*
17 $Id: AliITSUv1Layer.h
18 */
19
20#include "AliITSv11Geometry.h"
21#include "AliITSUv1.h"
22#include <TGeoManager.h>
23#include <TGeoCompositeShape.h>
24#include <TGeoXtru.h>
25
26class TGeoVolume;
27
28class AliITSUv1Layer : public AliITSv11Geometry {
29 public:
68b7631d 30 enum {kStave,kHalfStave,kModule,kChip,kNHLevels};
31
32 public:
b705c75b 33 AliITSUv1Layer();
34 AliITSUv1Layer(Int_t debug);
35 AliITSUv1Layer(Int_t lay, Int_t debug);
36 AliITSUv1Layer(Int_t lay, Bool_t turbo, Int_t debug);
37 AliITSUv1Layer(const AliITSUv1Layer &source);
38 AliITSUv1Layer& operator=(const AliITSUv1Layer &source);
39 virtual ~AliITSUv1Layer();
40 //
41 Bool_t IsTurbo() const {return fIsTurbo;};
42
1fc6eff6 43 Double_t GetChipThick() const {return fChipThick;};
44 Double_t GetStaveTilt() const {return fStaveTilt;};
45 Double_t GetStaveWidth() const {return fStaveWidth;};
b705c75b 46 Double_t GetSensorThick() const {return fSensorThick;};
1fc6eff6 47 Double_t GetNStaves() const {return fNStaves;};
68b7631d 48 Double_t GetNChips() const {return fNChips;};
b705c75b 49 Double_t GetRadius() const {return fLayRadius;};
50 Double_t GetPhi0() const {return fPhi0;};
51 Double_t GetZLength() const {return fZLength;};
68b7631d 52 Int_t GetChipType() const {return fChipTypeID;}
53 //
54 Int_t GetNStavesPerParent() const {return fHierarchy[kStave];}
55 Int_t GetNHalfStavesPerParent() const {return fHierarchy[kHalfStave];}
56 Int_t GetNModulesPerParent() const {return fHierarchy[kModule];}
57 Int_t GetNChipsPerParent() const {return fHierarchy[kChip];}
58 //
1fc6eff6 59 Int_t GetBuildLevel() const {return fBuildLevel;}
b705c75b 60 AliITSUv1::AliITSUModel_t GetStaveModel() const {return fStaveModel;}
61 //
1fc6eff6 62 void SetChipThick(Double_t t) {fChipThick = t;};
852af72e 63 void SetStaveTilt(Double_t t);
64 void SetStaveWidth(Double_t w);
68b7631d 65 void SetSensorThick(Double_t t) {fSensorThick = t;};
66 void SetNStaves(Int_t n) {fHierarchy[kStave] = fNStaves = n;};
67 void SetNUnits(Int_t u);
68 void SetRadius(Double_t r) {fLayRadius = r;};
69 void SetPhi0(Double_t phi) {fPhi0 = phi;}
70 void SetZLength(Double_t z) {fZLength = z;};
852af72e 71 void SetChipType(Int_t tp) {fChipTypeID = tp;}
b705c75b 72 void SetBuildLevel(Int_t buildLevel){fBuildLevel=buildLevel;}
73 void SetStaveModel(AliITSUv1::AliITSUModel_t model) {fStaveModel=model;}
74 virtual void CreateLayer(TGeoVolume *moth);
75
76 private:
77 void CreateLayerTurbo(TGeoVolume *moth);
78
852af72e 79 TGeoVolume* CreateStave(const TGeoManager *mgr=gGeoManager);
80 //TGeoVolume* CreateChip(Double_t x, Double_t z, const TGeoManager *mgr=gGeoManager);
68b7631d 81 TGeoVolume* CreateModuleInnerB(Double_t x,Double_t y, Double_t z, const TGeoManager *mgr=gGeoManager);
852af72e 82 TGeoVolume* CreateChipInnerB(Double_t x,Double_t y, Double_t z, const TGeoManager *mgr=gGeoManager);
68b7631d 83 TGeoVolume* CreateModuleOuterB(const TGeoManager *mgr=gGeoManager);
b705c75b 84
85
68b7631d 86 TGeoVolume* CreateStaveInnerB(Double_t x, Double_t y, Double_t z, const TGeoManager *mgr=gGeoManager);
b705c75b 87 TGeoVolume* CreateStaveStructInnerB(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
88 TGeoVolume* CreateStaveModelInnerBDummy(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager) const;
89 TGeoVolume* CreateStaveModelInnerB0(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
90 TGeoVolume* CreateStaveModelInnerB1(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
91 TGeoVolume* CreateStaveModelInnerB21(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
92 TGeoVolume* CreateStaveModelInnerB22(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
93 TGeoVolume* CreateStaveModelInnerB3(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
019dc90c 94 TGeoVolume* CreateStaveModelInnerB4(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
b705c75b 95
89efcdb3 96 TGeoVolume* CreateStaveOuterB(const TGeoManager *mgr=gGeoManager);
97 TGeoVolume* CreateStaveModelOuterBDummy(const TGeoManager *mgr=gGeoManager) const;
98 TGeoVolume* CreateStaveModelOuterB0(const TGeoManager *mgr=gGeoManager);
1fc6eff6 99 TGeoVolume* CreateStaveModelOuterB12(const TGeoManager *mgr=gGeoManager);
89efcdb3 100 TGeoVolume* CreateSpaceFrameOuterB(const TGeoManager *mgr=gGeoManager);
101 TGeoVolume* CreateSpaceFrameOuterBDummy(const TGeoManager *mgr=gGeoManager) const;
102 TGeoVolume* CreateSpaceFrameOuterB1(const TGeoManager *mgr=gGeoManager);
e14c51b6 103 void CreateOBSpaceFrameObjects(const TGeoManager *mgr=gGeoManager);
b705c75b 104
94fc91be 105 TGeoXtru* CreateStaveSide(const char *name,
106 Double_t dz, Double_t alpha, Double_t beta,
107 Double_t L, Double_t H, Bool_t top);
b705c75b 108 TGeoCombiTrans* CreateCombiTrans( const char *name,
109 Double_t dy, Double_t dz, Double_t dphi,
110 Bool_t planeSym=kFALSE);
111 void AddTranslationToCombiTrans( TGeoCombiTrans* ct,
112 Double_t dx=0, Double_t dy=0,
113 Double_t dz=0) const;
114
115
116 Int_t fLayerNumber; // Current layer number
852af72e 117 Double_t fPhi0; // lab phi of 1st stave, in degrees!!!
b705c75b 118 Double_t fLayRadius; // Inner radius of this layer
119 Double_t fZLength; // Z length of this layer
120 Double_t fSensorThick; // Sensor thickness
1fc6eff6 121 Double_t fChipThick; // Chip thickness
68b7631d 122 Double_t fStaveWidth; // Stave width (for turbo layers only)
123 Double_t fStaveTilt; // Stave tilt angle (for turbo layers only) in degrees
124 Int_t fNStaves; // Number of staves in this layer
125 Int_t fNModules; // Number of modules per container if defined (HalfStave, Stave, whatever is container)
126 Int_t fNChips; // N. chips per container (module, HalfStave, Stave, whatever is container)
127 Int_t fHierarchy[kNHLevels]; // array to query number of staves, hstaves, modules, chips per its parent volume
128 //
129 UInt_t fChipTypeID; // detector type id
b705c75b 130 Bool_t fIsTurbo; // True if this layer is a "turbo" layer
131 Int_t fBuildLevel; // Used for material studies
132
133 AliITSUv1::AliITSUModel_t fStaveModel; // The stave model
134
135 // Parameters for the Upgrade geometry
136
68b7631d 137 // General Parameters
138 static const Int_t fgkNumberOfInnerLayers;// Number of IB Layers
139
b705c75b 140 static const Double_t fgkDefaultSensorThick; // Default sensor thickness
1fc6eff6 141 static const Double_t fgkDefaultChipThick; // Default chip thickness
68b7631d 142
143 // Inner Barrel Parameters
144 static const Int_t fgkIBChipsPerRow; // IB chips per row in module
145 static const Int_t fgkIBNChipRows; // IB chip rows in module
146
019dc90c 147 static const Double_t fgkIBFlexCableAlThick; // Thickness of FPC Aluminum
148 static const Double_t fgkIBFlexCableKapThick;// Thickness of FPC Kapton
149 static const Double_t fgkIBGlueThick; // IB glue thickness
150 static const Double_t fgkIBCarbonFleeceThick;// IB carbon fleece thickness
151 static const Double_t fgkIBCarbonPaperThick; // IB Carbon Paper Thickness
152 static const Double_t fgkIBK13D2UThick; // IB k13d2u prepreg thickness
153 static const Double_t fgkIBCoolPipeInnerD; // IB cooling inner diameter
154 static const Double_t fgkIBCoolPipeThick; // IB cooling pipe thickness
155 static const Double_t fgkIBCoolPipeXDist; // IB cooling pipe separation
156 static const Double_t fgkIBTopVertexWidth; // IB TopVertex width
157 static const Double_t fgkIBTopVertexHeight; // IB TopVertex height
158 static const Double_t fgkIBSideVertexWidth; // IB SideVertex width
159 static const Double_t fgkIBSideVertexHeight; // IB SideVertex height
160 static const Double_t fgkIBTopFilamentLength;// IB TopFilament length
161 static const Double_t fgkIBTopFilamentSide; // IB TopFilament side
162 static const Double_t fgkIBTopFilamentAlpha; // IB TopFilament angle
163
164 static const Double_t fgkIBStaveHeight; // IB Stave Total Y Height
165
68b7631d 166 // Outer Barrel Parameters
167 static const Int_t fgkOBChipsPerRow; // OB chips per row in module
168 static const Int_t fgkOBNChipRows; // OB chip rows in module
b705c75b 169
170 static const Double_t fgkOBHalfStaveWidth; // OB Half Stave Width
68b7631d 171 static const Double_t fgkOBModuleWidth; // OB Module Width
172 static const Double_t fgkOBModuleGap; // Gap between OB modules
173 static const Double_t fgkOBChipXGap; // Gap between OB chips on X
174 static const Double_t fgkOBChipZGap; // Gap between OB chips on Z
175 static const Double_t fgkOBFlexCableAlThick; // Thickness of FPC Aluminum
1fc6eff6 176 static const Double_t fgkOBFlexCableCuThick; // Thickness of FPC Copper
f1496ca7 177 static const Double_t fgkOBFlexCableKapThick1;// Thickness of FPC Kapton
68b7631d 178 static const Double_t fgkOBFlexCableKapThick;// Thickness of FPC Kapton
179 static const Double_t fgkOBBusCableAlThick; // Thickness of Bus Aluminum
180 static const Double_t fgkOBBusCableKapThick; // Thickness of Bus Kapton
b705c75b 181 static const Double_t fgkOBCarbonPlateThick; // OB Carbon Plate Thickness
182 static const Double_t fgkOBColdPlateThick; // OB Cold Plate Thickness
1fc6eff6 183 static const Double_t fgkOBGlueThickM1; // OB Glue total Thickness
184 static const Double_t fgkOBGlueThick; // OB Glue Thickness in Model2
68b7631d 185 static const Double_t fgkOBModuleZLength; // OB Chip Length along Z
94fc91be 186 static const Double_t fgkOBHalfStaveYPos; // OB half staves Y position
68b7631d 187 static const Double_t fgkOBHalfStaveYTrans; // OB half staves Y transl.
188 static const Double_t fgkOBHalfStaveXOverlap;// OB half staves X overlap
189 static const Double_t fgkOBGraphiteFoilThick;// OB graphite foil thickness
1fc6eff6 190 static const Double_t fgkOBCarbonFleeceThick;// OB carbon fleece thickness
191 static const Double_t fgkOBCoolTubeInnerDM1; // OB cooling inner diameter
68b7631d 192 static const Double_t fgkOBCoolTubeInnerD; // OB cooling inner diameter
193 static const Double_t fgkOBCoolTubeThick; // OB cooling tube thickness
194 static const Double_t fgkOBCoolTubeXDist; // OB cooling tube separation
195
94fc91be 196 static const Double_t fgkOBSpaceFrameZLen[2];// OB Space Frame Length
197 static const Int_t fgkOBSpaceFrameNUnits[2];//OB Number of SF Units
198 static const Double_t fgkOBSpaceFrameUnitLen;// OB Space Frame Unit length
68b7631d 199 static const Double_t fgkOBSpaceFrameWidth; // OB Space Frame Width
5402be00 200 static const Double_t fgkOBSpaceFrameHeight; // OB Space Frame Height
94fc91be 201 static const Double_t fgkOBSpaceFrameTopVL; // Parameters defining...
202 static const Double_t fgkOBSpaceFrameTopVH; // ...the Top V shape
203 static const Double_t fgkOBSpaceFrameSideVL; // Parameters defining...
204 static const Double_t fgkOBSpaceFrameSideVH; // ...the Side V shape
205 static const Double_t fgkOBSpaceFrameVAlpha; // Angles of aperture...
206 static const Double_t fgkOBSpaceFrameVBeta; // ...of the V shapes
207 static const Double_t fgkOBSFrameBaseRibDiam;// OB SFrame Base Rib Diam
208 static const Double_t fgkOBSFrameBaseRibPhi; // OB SF base beam angle
209 static const Double_t fgkOBSFrameSideRibDiam;// OB SFrame Side Rib Diam
210 static const Double_t fgkOBSFrameSideRibPhi; // OB SF side beam angle
5402be00 211 static const Double_t fgkOBSFrameULegLen; // OB SF U-Leg length
212 static const Double_t fgkOBSFrameULegWidth; // OB SF U-Leg width
213 static const Double_t fgkOBSFrameULegHeight1;// OB SF U-Leg height
214 static const Double_t fgkOBSFrameULegHeight2;// OB SF U-Leg height
215 static const Double_t fgkOBSFrameULegThick; // OB SF U-Leg thickness
216 static const Double_t fgkOBSFrameULegXPos; // OB SF U-Leg X position
68b7631d 217
b705c75b 218
219 ClassDef(AliITSUv1Layer,0) // ITS Upgrade v1 geometry
220};
221
222#endif