]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSv11Hybrid.h
The v11 geometry can now be used instead the v11hybrid. This is just a clean-up....
[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.7  2007/12/17 14:48:24  masera
22 // Thermal shield between SPD and SDD (M. Sitta)
23 //
24 // Revision 1.6  2007/10/21 19:22:53  masera
25 // Coding conventions
26 //
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)
29 //
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
32 //
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
35 //
36
37  
38 #include "AliITS.h"
39 #include "AliITSInitGeometry.h"
40
41 class  AliITSv11GeometrySPD;
42 class  AliITSv11GeometrySDD;
43 class  AliITSv11GeometrySSD;
44 class  AliITSv11GeometrySupport;
45 class  TGeoVolume;
46 class TGeoVolumeAssembly;
47
48 class AliITSv11Hybrid : public AliITS {
49
50  public:
51     AliITSv11Hybrid();
52     AliITSv11Hybrid(const char *title);
53     AliITSv11Hybrid(const char *name, const char *title);
54     virtual       ~AliITSv11Hybrid() ;
55     virtual void   CreateGeometry();
56     virtual void   CreateMaterials();
57     virtual Int_t  IsVersion() const {// returns the ITS version number 
58                                       return 110;} 
59     virtual void   Init(); 
60     virtual void   SetDefaults();
61     virtual void   StepManager();
62     virtual void   AddAlignableVolumes() const;
63     virtual void   SetMinorVersion(Int_t v=2){ // Choose between existing minor versions
64         fMinorVersion = v;}
65     virtual void   SetThicknessDet1(Float_t v=200.){ 
66          // Set detector thickness in layer 1
67          fDet1 = v;}
68     virtual void   SetThicknessDet2(Float_t v=200.){ 
69          // Set detector thickness in layer 2
70          fDet2 = v;}
71     virtual void   SetThicknessChip1(Float_t v=150.){ 
72          // Set chip thickness in layer 1
73          fChip1 = v;}            
74     virtual void   SetThicknessChip2(Float_t v=150.){ 
75          // Set chip thickness in layer 2
76          fChip2 = v;}
77     virtual void   SetRails(Int_t v=0){ 
78          // Set flag for rails
79          fRails = v;}    
80     virtual void   SetCoolingFluid(Int_t v=1){
81          // Set flag for cooling fluid
82          fFluid = v;}
83     virtual void SetDensityServicesByThickness(){// uses services density
84         // calculation based on the thickness of the services.
85         fByThick = kTRUE;}
86     virtual void SetDensityServicesByMass(){// uses services density
87         // calculation based on the Mass of the services.
88         fByThick = kFALSE;}
89     virtual Int_t GetMajorVersion() const {// return Major Version Number
90         return fMajorVersion;}
91     virtual Int_t GetMinorVersion() const {// return Major Version Number
92         return fMinorVersion;}
93     virtual Float_t GetThicknessDet1() const { 
94          // Get detector thickness in layer 1
95          return fDet1;}
96     virtual Float_t GetThicknessDet2() const { 
97          // Get detector thickness in layer 2
98          return fDet2;}
99     virtual Float_t GetThicknessChip1() const { 
100          // Get chip thickness in layer 1
101          return fChip1;}                 
102     virtual Float_t GetThicknessChip2()const { 
103          // Get chip thickness in layer 2
104          return fChip2;}
105     virtual Int_t GetRails() const {
106          // Get flag for rails
107          return fRails;}
108     virtual Int_t GetCoolingFluid() const{ 
109          // Get flag for cooling fluid
110          return fFluid;}
111
112  protected:
113     void CreateOldGeometry();
114     void SetT2Lmatrix(Int_t uid, Double_t yShift,
115                       Bool_t yFlip, Bool_t yRot180=kFALSE) const; // Set T2L matrix in TGeoPNEntries
116     void CreateSPDThermalShield(TGeoVolume *moth);
117     TGeoVolumeAssembly *CreateSPDThermalShieldAssembly(const char *name,
118                    Double_t innerA, Double_t innerB, Double_t innerRadius,
119                    Double_t outerA, Double_t outerB, Double_t outerRadius,
120                    Double_t halflength, Double_t thickness,
121                    Double_t thicknessOmega, Double_t theta);
122     void SPDThermalShape(Double_t a, Double_t b, Double_t r, Double_t d,
123                          Double_t t, Double_t *x, Double_t *y);
124     void SPDOmegaShape(Double_t ina, Double_t inb, Double_t inr,
125                        Double_t oua, Double_t oub, Double_t our,
126                        Double_t dou, Double_t d  , Double_t t  ,
127                        Double_t *x, Double_t *y);
128     void FillSPDXtruShape(Double_t a, Double_t  b, Double_t  r,
129                           Double_t t, Double_t *x, Double_t *y);
130
131  private:
132     AliITSv11Hybrid(const AliITSv11Hybrid &source); // copy constructor
133     AliITSv11Hybrid& operator=(const AliITSv11Hybrid &source); // assignment operator
134
135     Bool_t fByThick;          // Flag to use services materials by thickness
136                               // ture, or mass false.
137     Int_t  fMajorVersion;     // Major version number == IsVersion
138     Int_t  fMinorVersion;     // Minor version number
139     Float_t  fDet1;           // thickness of detector in SPD layer 1
140     Float_t  fDet2;           // thickness of detector in SPD layer 2
141     Float_t  fChip1;          // thickness of chip in SPD layer 1   
142     Float_t  fChip2;          // thickness of chip in SPD layer 2   
143     Int_t    fRails;          // flag to switch rails on (=1) and off (=0)
144     Int_t    fFluid;          // flag to switch between water (=1) and freon (=0)
145     Int_t fIDMother;          //! ITS Mother Volume id.
146
147     AliITSInitGeometry fInitGeom;   //! Get access to decoding and AliITSgeom init functins
148     AliITSv11GeometrySPD *fSPDgeom; //! SPD Geometry
149     AliITSv11GeometrySDD *fSDDgeom; //! SDD Geometry
150     AliITSv11GeometrySSD *fSSDgeom; //! SSD Geometry
151     AliITSv11GeometrySupport *fSupgeom; //! Support Geometry
152
153     ClassDef(AliITSv11Hybrid,0)                          
154 };
155  
156 #endif