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