1 #ifndef ALIITSV11HYBRID_H
2 #define ALIITSV11HYBRID_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 //========================================================================
8 // Geometry of the Inner Tracking System
10 // This geometry is a mix between the old geometry (originally coded
11 // in AliITSvPPRasymmFMD) and the new TGeo geometry (v11).
13 // Ludovic Gaudichet (gaudichet@to.infn.it)
15 //========================================================================
21 // Revision 1.7 2007/12/17 14:48:24 masera
22 // Thermal shield between SPD and SDD (M. Sitta)
24 // Revision 1.6 2007/10/21 19:22:53 masera
27 // Revision 1.5 2007/08/24 14:32:57 hristov
28 // Introduction of SPD half-stave volumes, cleaning and new code (in relation to new SPD geometry) in AliITSv11Hybrid (Ludovic)
30 // Revision 1.4 2007/06/28 10:17:25 masera
31 // Introduction of the new SSD geometry in simulation (AliITSv11Hybrid) and suppression of overlaps between old and new parts
33 // Revision 1.3 2007/05/08 16:57:42 masera
34 // Updates concerning the geometry: versioning system, new V11hybrid version, bug fixes (B.Nilsend and L. Gaudichet
39 #include "AliITSInitGeometry.h"
41 class AliITSv11GeometrySPD;
42 class AliITSv11GeometrySDD;
43 class AliITSv11GeometrySSD;
44 class AliITSv11GeometrySupport;
46 class TGeoVolumeAssembly;
48 class AliITSv11Hybrid : public AliITS {
52 AliITSv11Hybrid(const char *title);
53 AliITSv11Hybrid(const char *name, const char *title);
54 virtual ~AliITSv11Hybrid() ;
55 virtual void BuildGeometry();
56 virtual void CreateGeometry();
57 virtual void CreateMaterials();
58 virtual Int_t IsVersion() const {// returns the ITS version number
61 virtual void SetDefaults();
62 virtual void DrawModule() const;
63 virtual void StepManager();
64 virtual void AddAlignableVolumes() const;
65 virtual void SetWriteDet(Bool_t det=kFALSE){ // set .det write
67 virtual void SetWriteDet(const char *f){ // set write file
68 strncpy(fWrite,f,60);fGeomDetOut = kTRUE;}
69 virtual void SetReadDet(Bool_t det=kFALSE){ //set .det read
71 virtual void SetReadDet(const char *f){ // set read file
72 strncpy(fRead,f,60);fGeomDetIn = kTRUE;}
73 virtual void SetEUCLIDFileName(const char *f){ // set write file
74 fEuclidGeometry=f; SetEUCLID();}
75 virtual void SetMinorVersion(Int_t v=2){ // Choose between existing minor versions
77 virtual void SetThicknessDet1(Float_t v=200.){
78 // Set detector thickness in layer 1
80 virtual void SetThicknessDet2(Float_t v=200.){
81 // Set detector thickness in layer 2
83 virtual void SetThicknessChip1(Float_t v=150.){
84 // Set chip thickness in layer 1
86 virtual void SetThicknessChip2(Float_t v=150.){
87 // Set chip thickness in layer 2
89 virtual void SetRails(Int_t v=0){
92 virtual void SetCoolingFluid(Int_t v=1){
93 // Set flag for cooling fluid
95 virtual void SetDensityServicesByThickness(){// uses services density
96 // calculation based on the thickness of the services.
98 virtual void SetDensityServicesByMass(){// uses services density
99 // calculation based on the Mass of the services.
101 virtual const char *GetEULIIDFileName() const{ // return .euc file name
102 return fEuclidGeometry.Data();}
103 virtual Bool_t GetWriteDet() const { // returns value GeomDetOut flag.
105 virtual Bool_t GetReadDet() const { // returns value GeomDetIn flag.
107 virtual char *GetReadDetFileName(){ // return .det read file name
108 if(fRead[0]!='\0') return fRead; else return fEuclidGeomDet;}
109 virtual char *GetWriteDetFileName(){ // return .det write file name
110 if(fWrite[0]!='\0') return fWrite; else return fEuclidGeomDet;}
111 virtual Int_t GetMajorVersion() const {// return Major Version Number
112 return fMajorVersion;}
113 virtual Int_t GetMinorVersion() const {// return Major Version Number
114 return fMinorVersion;}
115 virtual Float_t GetThicknessDet1() const {
116 // Get detector thickness in layer 1
118 virtual Float_t GetThicknessDet2() const {
119 // Get detector thickness in layer 2
121 virtual Float_t GetThicknessChip1() const {
122 // Get chip thickness in layer 1
124 virtual Float_t GetThicknessChip2()const {
125 // Get chip thickness in layer 2
127 virtual Int_t GetRails() const {
128 // Get flag for rails
130 virtual Int_t GetCoolingFluid() const{
131 // Get flag for cooling fluid
135 void CreateOldGeometry();
136 void SetT2Lmatrix(Int_t uid, Double_t yShift,
137 Bool_t yFlip, Bool_t yRot180=kFALSE) const; // Set T2L matrix in TGeoPNEntries
138 void CreateSPDThermalShield(TGeoVolume *moth);
139 TGeoVolumeAssembly *CreateSPDThermalShieldAssembly(const char *name,
140 Double_t innerA, Double_t innerB, Double_t innerRadius,
141 Double_t outerA, Double_t outerB, Double_t outerRadius,
142 Double_t halflength, Double_t thickness,
143 Double_t thicknessOmega, Double_t theta);
144 void SPDThermalShape(Double_t a, Double_t b, Double_t r, Double_t d,
145 Double_t t, Double_t *x, Double_t *y);
146 void SPDOmegaShape(Double_t ina, Double_t inb, Double_t inr,
147 Double_t oua, Double_t oub, Double_t our,
148 Double_t dou, Double_t d , Double_t t ,
149 Double_t *x, Double_t *y);
150 void FillSPDXtruShape(Double_t a, Double_t b, Double_t r,
151 Double_t t, Double_t *x, Double_t *y);
154 AliITSv11Hybrid(const AliITSv11Hybrid &source); // copy constructor
155 AliITSv11Hybrid& operator=(const AliITSv11Hybrid &source); // assignment operator
156 void InitAliITSgeom() const;
158 Bool_t fGeomDetOut; // Flag to write .det file out
159 Bool_t fGeomDetIn; // Flag to read .det file or directly from Geat.
160 Bool_t fByThick; // Flag to use services materials by thickness
161 // ture, or mass false.
162 Int_t fMajorVersion; // Major version number == IsVersion
163 Int_t fMinorVersion; // Minor version number
164 char fEuclidGeomDet[60];// file where detector transormation are define.
165 char fRead[60]; //! file name to read .det file
166 char fWrite[60]; //! file name to write .det file
167 Float_t fDet1; // thickness of detector in SPD layer 1
168 Float_t fDet2; // thickness of detector in SPD layer 2
169 Float_t fChip1; // thickness of chip in SPD layer 1
170 Float_t fChip2; // thickness of chip in SPD layer 2
171 Int_t fRails; // flag to switch rails on (=1) and off (=0)
172 Int_t fFluid; // flag to switch between water (=1) and freon (=0)
173 Int_t fIDMother; //! ITS Mother Volume id.
175 AliITSInitGeometry fInitGeom; //! Get access to decoding and AliITSgeom init functins
176 AliITSv11GeometrySPD *fSPDgeom; //! SPD Geometry
177 AliITSv11GeometrySDD *fSDDgeom; //! SDD Geometry
178 AliITSv11GeometrySSD *fSSDgeom; //! SSD Geometry
179 AliITSv11GeometrySupport *fSupgeom; //! Support Geometry
181 ClassDef(AliITSv11Hybrid,0)