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