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