Separating run-dependent mapping data from data, which are not
[u/mrichter/AliRoot.git] / MUON / AliMUONSt1GeometryBuilderV2.h
CommitLineData
d1cd2474 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
4// $Id$
30178c30 5// Revision of includes 07/05/2004
d1cd2474 6//
5398f946 7/// \ingroup sim
090443dd 8/// \class AliMUONSt1GeometryBuilderV2
9/// \brief MUON Station1 detailed geometry construction class
10///
11/// \author David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
d1cd2474 12
13#ifndef ALI_MUON_ST1_GEOMETRY_BUILDER_V2_H
14#define ALI_MUON_ST1_GEOMETRY_BUILDER_V2_H
15
86488ea7 16
d1cd2474 17#include "AliMUONVGeometryBuilder.h"
18
86488ea7 19#include "AliMpContainers.h"
20
630711ed 21#include <TExMap.h>
86488ea7 22
23#ifdef WITH_STL
24 #include <map>
25#endif
26
71a2d3aa 27// typedef Float_t GReal_t; // for AliGeant3
d1cd2474 28typedef Double_t GReal_t; // for VirtualMC
29
adbabf6d 30class AliMUON;
31class AliMpSector;
32
d1cd2474 33class TTree;
34class TVector2;
35class TVector3;
36
d1cd2474 37class AliMUONSt1GeometryBuilderV2 : public AliMUONVGeometryBuilder
38{
39 public:
40 AliMUONSt1GeometryBuilderV2(AliMUON* muon);
d1cd2474 41 AliMUONSt1GeometryBuilderV2();
42 virtual ~AliMUONSt1GeometryBuilderV2();
43
44 virtual void CreateMaterials();
45 virtual void CreateGeometry();
b96f7067 46 virtual void SetVolumes();
d1cd2474 47 virtual void SetTransformations();
48 virtual void SetSensitiveVolumes();
49
50 protected:
d1cd2474 51
52 private:
71a2d3aa 53 /// Not implemented
161d3338 54 AliMUONSt1GeometryBuilderV2(const AliMUONSt1GeometryBuilderV2& rMUON);
71a2d3aa 55 /// Not implemented
161d3338 56 AliMUONSt1GeometryBuilderV2& operator = (const AliMUONSt1GeometryBuilderV2& rhs);
71a2d3aa 57
d1cd2474 58 // Constants
59 //
18b6b8c7 60 static const GReal_t fgkHzPadPlane; ///< Pad plane
61 static const GReal_t fgkHzFoam; ///< Foam of mechanicalplane
62 static const GReal_t fgkHzFR4; ///< FR4 of mechanical plane
63 static const GReal_t fgkHzSnPb; ///< Pad/Kapton connection (66 pt)
64 static const GReal_t fgkHzKapton; ///< Kapton
65 static const GReal_t fgkHzBergPlastic; ///< Berg connector
66 static const GReal_t fgkHzBergCopper; ///< Berg connector (80 pt)
67 static const GReal_t fgkHzDaughter; ///< Daughter board
68 static const GReal_t fgkHzGas; ///< ArCO2 Gas
d1cd2474 69
70 // Sensitive copper pads, foam layer, PCB and electronics model parameters
18b6b8c7 71 static const GReal_t fgkHxHole; ///< foam hole paremeter
72 static const GReal_t fgkHyHole; ///< foam hole paremeter
73 static const GReal_t fgkHxBergPlastic; ///< Berg connector parameter
74 static const GReal_t fgkHyBergPlastic; ///< Berg connector parameter
75 static const GReal_t fgkHxBergCopper; ///< Berg connector parameter
76 static const GReal_t fgkHyBergCopper; ///< Berg connector parameter
77 static const GReal_t fgkHxKapton; ///< Kapton parameter
78 static const GReal_t fgkHyKapton; ///< Kapton parameter
79 static const GReal_t fgkHxDaughter; ///< Electronics parameter
80 static const GReal_t fgkHyDaughter; ///< Electronics parameter
81 static const GReal_t fgkOffsetX; ///< Offset X
82 static const GReal_t fgkOffsetY; ///< Offset Y
83 static const GReal_t fgkDeltaFilleEtamX; ///< Electronics parameter
84 static const GReal_t fgkDeltaFilleEtamY; ///< Electronics parameter
85
86 static const GReal_t fgkDeltaQuadLHC; ///< LHC Origin wrt Quadrant Origin
87 static const GReal_t fgkFrameOffset; ///< Frame offset
d1cd2474 88
b367fd8f 89 // Pad planes offsets
18b6b8c7 90 static const GReal_t fgkPadXOffsetBP; ///< Horizontal offset in bending plane
91 static const GReal_t fgkPadYOffsetBP; ///< Vertical offset in bending plane
b367fd8f 92
d1cd2474 93 // Quadrant Mother volume - TUBS1
18b6b8c7 94 static const GReal_t fgkMotherIR1; ///< Middle Layer Rin
95 static const GReal_t fgkMotherOR1; ///< Middle Layer Rout
96 static const GReal_t fgkMotherThick1; ///< Middle Layer Hz
97 static const GReal_t fgkMotherPhiL1; ///< Middle Layer Sphi
98 static const GReal_t fgkMotherPhiU1; ///< Middle Layer Endphi
d1cd2474 99
100 // Quadrant Mother volume - TUBS2 (2 copies at different Z's)
18b6b8c7 101 static const GReal_t fgkMotherIR2; ///< Near and Far Layer Rin
102 static const GReal_t fgkMotherOR2; ///< Near and Far Layer Rout
103 static const GReal_t fgkMotherThick2; ///< Near and Far Layer Hz
104 static const GReal_t fgkMotherPhiL2; ///< Near and Far Layer Sphi
105 static const GReal_t fgkMotherPhiU2; ///< Near and Far Layer Endphi
106
107 static const char* fgkHoleName; ///< prefix for automatic volume naming
108 static const char* fgkQuadrantEnvelopeName; ///< prefix for automatic volume naming
109 static const char* fgkQuadrantMLayerName;///< prefix for automatic volume naming
110 static const char* fgkQuadrantNLayerName;///< prefix for automatic volume naming
111 static const char* fgkQuadrantFLayerName;///< prefix for automatic volume naming
5ae5869b 112 static const char* fgkQuadrantMFLayerName; ///< prefix for automatic volume naming
18b6b8c7 113 static const char* fgkDaughterName; ///< prefix for automatic volume naming
114 static const Int_t fgkFoamBoxNameOffset; ///< coefficient for automatic volume naming
115 static const Int_t fgkFR4BoxNameOffset; ///< coefficient for automatic volume naming
116 static const Int_t fgkDaughterCopyNoOffset; ///< \brief copy number offset for daughter
117 /// boards positions in non-bending plane
d1cd2474 118
119 // Methods
120 //
121 void CreateHole();
122 void CreateDaughterBoard();
123 void CreateInnerLayers();
fdbaed6e 124 void CreateSpacer0();
125 void CreateSpacer();
d1cd2474 126 void CreateQuadrant(Int_t chamber);
62c708bf 127 void CreateFoamBox(Int_t segNumber, const TVector2& dimensions);
128 void CreatePlaneSegment(Int_t segNumber, const TVector2& dimensions,
d1cd2474 129 Int_t nofHoles);
5ae5869b 130 void CreateQuadrantLayersAsVolumes(Int_t chamber);
131 void CreateQuadrantLayersAsAssemblies(Int_t chamber);
d1cd2474 132 void CreateFrame(Int_t chamber);
133
134 void PlaceInnerLayers(Int_t chamber);
fdbaed6e 135 void PlaceSpacer0(Int_t chamber);
5ae5869b 136 void PlaceSector(const AliMpSector* sector, TExMap specialMap,
d1cd2474 137 const TVector3& where, Bool_t reflectZ, Int_t chamber);
138
b367fd8f 139 TString QuadrantEnvelopeName(Int_t chamber, Int_t quadrant) const;
d1cd2474 140 TString QuadrantMLayerName(Int_t chamber) const;
141 TString QuadrantNLayerName(Int_t chamber) const;
142 TString QuadrantFLayerName(Int_t chamber) const;
5ae5869b 143 TString QuadrantMFLayerName(Int_t chamber) const;
62c708bf 144 TString PlaneSegmentName(Int_t segNumber) const;
145 TString FoamBoxName(Int_t segNumber) const;
146 TString FR4BoxName(Int_t segNumber) const;
d1cd2474 147 TString GasVolumeName(const TString& name, Int_t chamber) const;
148
5398f946 149 GReal_t TotalHzPlane() const ;
150 GReal_t TotalHzDaughter() const ;
151 GReal_t TotalHz() const ;
d1cd2474 152
153 // Data members
154 //
155 //Float_t fRadlCopper; //! copper computed radiation length
156 //Float_t fRadlFoam; //! foam computed radiation length
157 //Float_t fRadlFR4; //! FR4 computed radiation length
18b6b8c7 158 AliMUON* fMUON; ///< the MUON detector class
d1cd2474 159
160 ClassDef(AliMUONSt1GeometryBuilderV2,1) // MUON Detector base class
161};
162
163// inline functions
164
5398f946 165/// Return total mechanical plane half Size
d1cd2474 166inline GReal_t AliMUONSt1GeometryBuilderV2::TotalHzPlane() const
167//{ return fgkHzPadPlane + fgkHzFoam + fgkHzFR4; }
168{ return fgkHzFoam + fgkHzFR4; }
169
5398f946 170/// Return total daughter plane half Size
d1cd2474 171inline GReal_t AliMUONSt1GeometryBuilderV2::TotalHzDaughter() const
172{ return fgkHzBergPlastic + fgkHzDaughter; }
173
5398f946 174/// Return total plane half Size
d1cd2474 175inline GReal_t AliMUONSt1GeometryBuilderV2::TotalHz() const
176{ return TotalHzPlane() + TotalHzDaughter(); }
177
5398f946 178/// Return middle quadrant layer name for chamber \a chamber
d1cd2474 179inline TString AliMUONSt1GeometryBuilderV2::QuadrantMLayerName(Int_t chamber) const
180{ return Form("%s%d",fgkQuadrantMLayerName,chamber); }
5ae5869b 181
182/// Return middle quadrant frame layer name for chamber \a chamber
183inline TString AliMUONSt1GeometryBuilderV2::QuadrantMFLayerName(Int_t chamber) const
184{ return Form("%s%d",fgkQuadrantMFLayerName,chamber); }
d1cd2474 185
5398f946 186/// Return nearer quadrant layer name for chamber \a chamber
d1cd2474 187inline TString AliMUONSt1GeometryBuilderV2::QuadrantNLayerName(Int_t chamber) const
188{ return Form("%s%d",fgkQuadrantNLayerName,chamber); }
189
5398f946 190/// Return farther quadrant layer name for chamber \a chamber
d1cd2474 191inline TString AliMUONSt1GeometryBuilderV2::QuadrantFLayerName(Int_t chamber) const
192{ return Form("%s%d",fgkQuadrantFLayerName,chamber); }
193
5398f946 194/// Return plane segment name for segment \a segNumber
62c708bf 195inline TString AliMUONSt1GeometryBuilderV2::PlaneSegmentName(Int_t segNumber) const
196{ return Form("S%.3d", segNumber); }
197
5398f946 198/// Return foam box name for segment \a segNumber
62c708bf 199inline TString AliMUONSt1GeometryBuilderV2::FoamBoxName(Int_t segNumber) const
200{ return Form("S%.3d", segNumber + fgkFoamBoxNameOffset); }
201
5398f946 202/// Return FR4 box name for segment \a segNumber
62c708bf 203inline TString AliMUONSt1GeometryBuilderV2::FR4BoxName(Int_t segNumber) const
204{ return Form("S%.3d", segNumber + fgkFR4BoxNameOffset); }
205
d1cd2474 206#endif //ALI_MUON_ST1_GEOMETRY_BUILDER_V2_H