Udated for removing AliMUONSt1Types.h, AliMUONSt1Containers.h
[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//
7// Class AliMUONSt1GeometryBuilderV2
8// ---------------------------------
9// MUON Station1 detailed geometry construction class.
10//
11// Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
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
21#ifdef WITH_ROOT
22 #include "TExMap.h"
23#endif
24
25#ifdef WITH_STL
26 #include <map>
27#endif
28
29#ifdef WITH_ROOT
30 typedef TExMap SpecialMap;
31#endif
32
33#ifdef WITH_STL
34 typedef map<Int_t , AliMUONSt1SpecialMotif> SpecialMap;
35#endif
36
d1cd2474 37//typedef Float_t GReal_t; // for AliGeant3
38typedef Double_t GReal_t; // for VirtualMC
39
adbabf6d 40class AliMUON;
41class AliMpSector;
42
d1cd2474 43class TTree;
44class TVector2;
45class TVector3;
46
d1cd2474 47class AliMUONSt1GeometryBuilderV2 : public AliMUONVGeometryBuilder
48{
49 public:
50 AliMUONSt1GeometryBuilderV2(AliMUON* muon);
51 AliMUONSt1GeometryBuilderV2(const AliMUONSt1GeometryBuilderV2& rMUON);
52 AliMUONSt1GeometryBuilderV2();
53 virtual ~AliMUONSt1GeometryBuilderV2();
54
55 virtual void CreateMaterials();
56 virtual void CreateGeometry();
57 virtual void SetTransformations();
58 virtual void SetSensitiveVolumes();
59
60 protected:
61 AliMUONSt1GeometryBuilderV2& operator = (const AliMUONSt1GeometryBuilderV2& rhs);
62
63 private:
d1cd2474 64 // Constants
65 //
66 static const GReal_t fgkHzPadPlane; // Pad plane
67 static const GReal_t fgkHzFoam; // Foam of mechanicalplane
68 static const GReal_t fgkHzFR4; // FR4 of mechanical plane
69 static const GReal_t fgkHzSnPb; // Pad/Kapton connection (66 pt)
70 static const GReal_t fgkHzKapton; // Kapton
71 static const GReal_t fgkHzBergPlastic; // Berg connector
72 static const GReal_t fgkHzBergCopper; // Berg connector (80 pt)
73 static const GReal_t fgkHzDaughter; // Daughter board
74 static const GReal_t fgkHzGas; // ArCO2 Gas
75
76 // Sensitive copper pads, foam layer, PCB and electronics model parameters
77 static const GReal_t fgkHxHole; // foam hole paremeter
78 static const GReal_t fgkHyHole; // foam hole paremeter
79 static const GReal_t fgkHxBergPlastic; // Berg connector parameter
80 static const GReal_t fgkHyBergPlastic; // Berg connector parameter
81 static const GReal_t fgkHxBergCopper; // Berg connector parameter
82 static const GReal_t fgkHyBergCopper; // Berg connector parameter
83 static const GReal_t fgkHxKapton; // Kapton parameter
84 static const GReal_t fgkHyKapton; // Kapton parameter
85 static const GReal_t fgkHxDaughter; // Electronics parameter
86 static const GReal_t fgkHyDaughter; // Electronics parameter
87 static const GReal_t fgkOffsetX; // Offset X
88 static const GReal_t fgkOffsetY; // Offset Y
89 static const GReal_t fgkDeltaFilleEtamX; // Electronics parameter
90 static const GReal_t fgkDeltaFilleEtamY; // Electronics parameter
91
92 static const GReal_t fgkDeltaQuadLHC; // LHC Origin wrt Quadrant Origin
93 static const GReal_t fgkFrameOffset; // Frame offset
94
b367fd8f 95 // Pad planes offsets
96 static const GReal_t fgkPadXOffsetBP; // Horizontal offset in bending plane
97 static const GReal_t fgkPadYOffsetBP; // Vertical offset in bending plane
98
d1cd2474 99 // Quadrant Mother volume - TUBS1
100 static const GReal_t fgkMotherIR1; // Middle Layer Rin
101 static const GReal_t fgkMotherOR1; // Middle Layer Rout
102 static const GReal_t fgkMotherThick1; // Middle Layer Hz
103 static const GReal_t fgkMotherPhiL1; // Middle Layer Sphi
104 static const GReal_t fgkMotherPhiU1; // Middle Layer Endphi
105
106 // Quadrant Mother volume - TUBS2 (2 copies at different Z's)
107 static const GReal_t fgkMotherIR2; // Near and Far Layer Rin
108 static const GReal_t fgkMotherOR2; // Near and Far Layer Rout
109 static const GReal_t fgkMotherThick2; // Near and Far Layer Hz
110 static const GReal_t fgkMotherPhiL2; // Near and Far Layer Sphi
111 static const GReal_t fgkMotherPhiU2; // Near and Far Layer Endphi
112
113 static const char* fgkHoleName; // prefix for automatic volume naming
b367fd8f 114 static const char* fgkQuadrantEnvelopeName; // prefix for automatic volume naming
d1cd2474 115 static const char* fgkQuadrantMLayerName;// prefix for automatic volume naming
116 static const char* fgkQuadrantNLayerName;// prefix for automatic volume naming
117 static const char* fgkQuadrantFLayerName;// prefix for automatic volume naming
118 static const char* fgkDaughterName; // prefix for automatic volume naming
119 static const char fgkFoamLayerSuffix; // suffix for automatic volume naming
e8c253a0 120 static const Int_t fgkDaughterCopyNoOffset; // copy number offset for daugher
121 // boards positions in non-bending plane
d1cd2474 122
123 // Methods
124 //
125 void CreateHole();
126 void CreateDaughterBoard();
127 void CreateInnerLayers();
128 void CreateQuadrant(Int_t chamber);
129 void CreateFoamBox(const char* name,const TVector2& dimensions);
130 void CreatePlaneSegment(const char* name,const TVector2& dimensions,
131 Int_t nofHoles);
132 void CreateFrame(Int_t chamber);
133
134 void PlaceInnerLayers(Int_t chamber);
135 void PlaceSector(AliMpSector* sector, SpecialMap specialMap,
136 const TVector3& where, Bool_t reflectZ, Int_t chamber);
137
b367fd8f 138 TString QuadrantEnvelopeName(Int_t chamber, Int_t quadrant) const;
d1cd2474 139 TString QuadrantMLayerName(Int_t chamber) const;
140 TString QuadrantNLayerName(Int_t chamber) const;
141 TString QuadrantFLayerName(Int_t chamber) const;
142 TString GasVolumeName(const TString& name, Int_t chamber) const;
143
144 void AddChamberGid(Int_t id,Int_t volName,Int_t idx);
145 //Bool_t IsInChamber(Int_t ich, Int_t volGid) const;
146
147 GReal_t TotalHzPlane() const ; // Total mechanical plane half Size
148 GReal_t TotalHzDaughter() const ; // Total daughter plane half Size
149 GReal_t TotalHz() const ; // Total plane half Size
150
151 // Data members
152 //
153 //Float_t fRadlCopper; //! copper computed radiation length
154 //Float_t fRadlFoam; //! foam computed radiation length
155 //Float_t fRadlFR4; //! FR4 computed radiation length
156 AliMUON* fMUON; // the MUON detector class
157
158 ClassDef(AliMUONSt1GeometryBuilderV2,1) // MUON Detector base class
159};
160
161// inline functions
162
163inline GReal_t AliMUONSt1GeometryBuilderV2::TotalHzPlane() const
164//{ return fgkHzPadPlane + fgkHzFoam + fgkHzFR4; }
165{ return fgkHzFoam + fgkHzFR4; }
166
167inline GReal_t AliMUONSt1GeometryBuilderV2::TotalHzDaughter() const
168{ return fgkHzBergPlastic + fgkHzDaughter; }
169
170inline GReal_t AliMUONSt1GeometryBuilderV2::TotalHz() const
171{ return TotalHzPlane() + TotalHzDaughter(); }
172
173inline TString AliMUONSt1GeometryBuilderV2::QuadrantMLayerName(Int_t chamber) const
174{ return Form("%s%d",fgkQuadrantMLayerName,chamber); }
175
176inline TString AliMUONSt1GeometryBuilderV2::QuadrantNLayerName(Int_t chamber) const
177{ return Form("%s%d",fgkQuadrantNLayerName,chamber); }
178
179inline TString AliMUONSt1GeometryBuilderV2::QuadrantFLayerName(Int_t chamber) const
180{ return Form("%s%d",fgkQuadrantFLayerName,chamber); }
181
182#endif //ALI_MUON_ST1_GEOMETRY_BUILDER_V2_H