New hybrid geometry using both new code and old parts. Improved SDD geometry (L....
[u/mrichter/AliRoot.git] / ITS / AliITSv11Hybrid.h
CommitLineData
108bd0fe 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#include "AliITS.h"
18
19class AliITSv11GeometrySDD;
20
21class AliITSv11Hybrid : public AliITS {
22
23 public:
24 AliITSv11Hybrid();
25 AliITSv11Hybrid(const char *name, const char *title);
26 virtual ~AliITSv11Hybrid() ;
27 virtual void BuildGeometry();
28 virtual void CreateGeometry();
29 virtual void CreateMaterials();
30 virtual Int_t IsVersion() const {// returns the ITS version number
31 return 110;}
32 virtual void Init();
33 virtual void SetDefaults();
34 virtual void DrawModule() const;
35 virtual void StepManager();
36 virtual void AddAlignableVolumes() const;
37 virtual void SetWriteDet(Bool_t det=kFALSE){ // set .det write
38 fGeomDetOut = det;}
39 virtual void SetWriteDet(const char *f){ // set write file
40 strncpy(fWrite,f,60);fGeomDetOut = kTRUE;}
41 virtual void SetReadDet(Bool_t det=kFALSE){ //set .det read
42 fGeomDetIn = det;}
43 virtual void SetReadDet(const char *f){ // set read file
44 strncpy(fRead,f,60);fGeomDetIn = kTRUE;}
45 virtual void SetEUCLIDFileName(const char *f){ // set write file
46 fEuclidGeometry=f; SetEUCLID();}
47 virtual void SetMinorVersion(Int_t v=2){ // Choose between existing minor versions
48 fMinorVersion = v;}
49 virtual void SetThicknessDet1(Float_t v=200.){
50 // Set detector thickness in layer 1
51 fDet1 = v;}
52 virtual void SetThicknessDet2(Float_t v=200.){
53 // Set detector thickness in layer 2
54 fDet2 = v;}
55 virtual void SetThicknessChip1(Float_t v=150.){
56 // Set chip thickness in layer 1
57 fChip1 = v;}
58 virtual void SetThicknessChip2(Float_t v=150.){
59 // Set chip thickness in layer 2
60 fChip2 = v;}
61 virtual void SetRails(Int_t v=0){
62 // Set flag for rails
63 fRails = v;}
64 virtual void SetCoolingFluid(Int_t v=1){
65 // Set flag for cooling fluid
66 fFluid = v;}
67 virtual void SetDensityServicesByThickness(){// uses services density
68 // calculation based on the thickness of the services.
69 fByThick = kTRUE;}
70 virtual void SetDensityServicesByMass(){// uses services density
71 // calculation based on the Mass of the services.
72 fByThick = kFALSE;}
73 virtual const char *GetEULIIDFileName() const{ // return .euc file name
74 return fEuclidGeometry.Data();}
75 virtual Bool_t GetWriteDet() const { // returns value GeomDetOut flag.
76 return fGeomDetOut;}
77 virtual Bool_t GetReadDet() const { // returns value GeomDetIn flag.
78 return fGeomDetIn;}
79 virtual char *GetReadDetFileName(){ // return .det read file name
80 if(fRead[0]!='\0') return fRead; else return fEuclidGeomDet;}
81 virtual char *GetWriteDetFileName(){ // return .det write file name
82 if(fWrite[0]!='\0') return fWrite; else return fEuclidGeomDet;}
83 virtual Int_t GetMajorVersion() const {// return Major Version Number
84 return fMajorVersion;}
85 virtual Int_t GetMinorVersion() const {// return Major Version Number
86 return fMinorVersion;}
87 virtual Float_t GetThicknessDet1() const {
88 // Get detector thickness in layer 1
89 return fDet1;}
90 virtual Float_t GetThicknessDet2() const {
91 // Get detector thickness in layer 2
92 return fDet2;}
93 virtual Float_t GetThicknessChip1() const {
94 // Get chip thickness in layer 1
95 return fChip1;}
96 virtual Float_t GetThicknessChip2()const {
97 // Get chip thickness in layer 2
98 return fChip2;}
99 virtual Int_t GetRails() const {
100 // Get flag for rails
101 return fRails;}
102 virtual Int_t GetCoolingFluid() const{
103 // Get flag for cooling fluid
104 return fFluid;}
105
106 protected:
107 void CreateOldGeometry();
108 void SetT2Lmatrix(const char *name, Double_t dAlpha, Double_t dxSign,
109 Double_t yShift, Bool_t yFlip) const; // Set T2L matrix in TGeoPNEntries
110
111 private:
112 AliITSv11Hybrid(const AliITSv11Hybrid &source); // copy constructor
113 AliITSv11Hybrid& operator=(const AliITSv11Hybrid &source); // assignment operator
114 void InitAliITSgeom();
115
116 // TString fEuclidGeomtery,fEuclidMaterial defined in AliModule.
117 Bool_t fGeomDetOut; // Flag to write .det file out
118 Bool_t fGeomDetIn; // Flag to read .det file or directly from Geat.
119 Bool_t fByThick; // Flag to use services materials by thickness
120 // ture, or mass false.
121 Int_t fMajorVersion; // Major version number == IsVersion
122 Int_t fMinorVersion; // Minor version number
123 char fEuclidGeomDet[60];// file where detector transormation are define.
124 char fRead[60]; //! file name to read .det file
125 char fWrite[60]; //! file name to write .det file
126 Float_t fDet1; // thickness of detector in SPD layer 1
127 Float_t fDet2; // thickness of detector in SPD layer 2
128 Float_t fChip1; // thickness of chip in SPD layer 1
129 Float_t fChip2; // thickness of chip in SPD layer 2
130 Int_t fRails; // flag to switch rails on (=1) and off (=0)
131 Int_t fFluid; // flag to switch between water (=1) and freon (=0)
132 Int_t fIDMother; //! ITS Mother Volume id.
133
134 AliITSv11GeometrySDD *fSDDgeom; //! SDD Geometry
135
136 ClassDef(AliITSv11Hybrid,1)
137};
138
139#endif