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