]> git.uio.no Git - u/mrichter/AliRoot.git/blob - CRT/AliCRTConstants.cxx
Simplifying calling test, explicite functions for each type of test
[u/mrichter/AliRoot.git] / CRT / AliCRTConstants.cxx
1  /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Id$ */
17
18 ////////////////////////////////////////////////////////////////////////
19 //
20 // AliCRTConstants class
21 //
22 // This class serves to group constants needed by CRT detector in 1
23 // easily accessible place. All constants are public const static data 
24 // members. The class is never instatiated.
25 // Author: Arturo Fernandez, Enrique Gamez
26 //         FCFM-UAP, Mexico.
27 //
28 ////////////////////////////////////////////////////////////////////////
29
30 #include "AliCRTConstants.h"
31
32 AliCRTConstants* AliCRTConstants::fgInstance = 0;
33
34 const Float_t AliCRTConstants::fgkCageLenght          = 477.6;
35 const Float_t AliCRTConstants::fgkCageWidth           = 166.7;
36 const Float_t AliCRTConstants::fgkCageHeight          =  10.7;
37 const Float_t AliCRTConstants::fgkSinglePaletteLenght = 363.0;
38 const Float_t AliCRTConstants::fgkSinglePaletteWidth  =  19.7;
39 const Float_t AliCRTConstants::fgkSinglePaletteHeight =   1;
40 const Float_t AliCRTConstants::fgkActiveAreaGap       = 0.7;
41 const Float_t AliCRTConstants::fgkActiveAreaLenght    = AliCRTConstants::fgkSinglePaletteLenght;
42 const Float_t AliCRTConstants::fgkActiveAreaWidth     = 156.7;
43 const Float_t AliCRTConstants::fgkActiveAreaHeight    = 2*AliCRTConstants::fgkSinglePaletteHeight + AliCRTConstants::fgkActiveAreaGap;
44 const Float_t AliCRTConstants::fgkMagnetWidth         = 654.4;
45 const Float_t AliCRTConstants::fgkMagnetLenght        = 1200;
46 const Float_t AliCRTConstants::fgkMagMinRadius        = 790;
47 const Float_t AliCRTConstants::fgkMagMaxRadius        = AliCRTConstants::fgkMagMinRadius + 20;
48 const Float_t AliCRTConstants::fgkDepth               =4420; // cm
49
50 ClassImp(AliCRTConstants)
51
52 //_____________________________________________________________________________
53 AliCRTConstants::AliCRTConstants()
54   : TObject()
55 {
56   // Default constructor
57 }
58
59 //_____________________________________________________________________________
60 AliCRTConstants::AliCRTConstants(const AliCRTConstants& ct)
61   : TObject(ct)
62 {
63   // Copy constructor
64 }
65
66 //_____________________________________________________________________________
67 AliCRTConstants& AliCRTConstants::operator=(const AliCRTConstants&)
68 {
69   // Asingment operator
70   return *this;
71 }
72
73 //_____________________________________________________________________________
74 AliCRTConstants* AliCRTConstants::Instance()
75 {
76   if ( !fgInstance ) {
77     fgInstance = new AliCRTConstants;
78   }
79   return fgInstance;
80 }
81
82 //_____________________________________________________________________________
83 AliCRTConstants::~AliCRTConstants()
84 {
85   fgInstance = 0;
86 }
87
88 //_____________________________________________________________________________
89 Float_t AliCRTConstants::CageLenght() const
90 {
91   // Module lenght
92   return fgkCageLenght;
93 }
94
95 //_____________________________________________________________________________
96 Float_t AliCRTConstants::CageWidth() const
97 {
98   // Module width
99   return fgkCageWidth;
100 }
101
102 //_____________________________________________________________________________
103 Float_t AliCRTConstants::CageHeight() const
104 {
105   // Module height
106   return fgkCageHeight;
107 }
108
109 //_____________________________________________________________________________
110 Float_t AliCRTConstants::SinglePaletteLenght() const
111 {
112   // Lenght of the scintillator active zone for a single counter
113   return fgkSinglePaletteLenght;
114 }
115
116 //_____________________________________________________________________________
117 Float_t AliCRTConstants::SinglePaletteWidth() const
118 {
119   // Width of the scintillator active zone for a single counter
120   return fgkSinglePaletteWidth;
121 }
122
123 //_____________________________________________________________________________
124 Float_t AliCRTConstants::SinglePaletteHeight() const
125 {
126   // Height of the scintillator active zone for a single counter
127   return fgkSinglePaletteHeight;
128 }
129
130 //_____________________________________________________________________________
131 Float_t AliCRTConstants::ActiveAreaGap() const
132
133   // Gap betwen scintillators
134   return fgkActiveAreaGap;
135 }
136
137 //_____________________________________________________________________________
138 Float_t AliCRTConstants::ActiveAreaLenght() const
139 {
140   // Lenght of the scintillator active zone
141   return fgkActiveAreaLenght;
142 }
143
144 //_____________________________________________________________________________
145 Float_t AliCRTConstants::ActiveAreaWidth() const
146 {
147   // Width of the scintillator active zone
148   return fgkActiveAreaWidth;
149 }
150
151 //_____________________________________________________________________________
152 Float_t AliCRTConstants::ActiveAreaHeight() const
153 {
154   // Height of the scintillator active zone
155   return fgkActiveAreaHeight;
156 }
157
158 //_____________________________________________________________________________
159 Float_t AliCRTConstants::MagnetWidth() const
160 {
161   // Magnet  width
162   return fgkMagnetWidth;
163 }
164
165 //_____________________________________________________________________________
166 Float_t AliCRTConstants::MagnetLenght() const
167 {
168   // Magnet lenght
169   return fgkMagnetLenght;
170 }
171
172 //_____________________________________________________________________________
173 Float_t AliCRTConstants::MagMinRadius() const
174 {
175   // Magnet Inner radius
176   return fgkMagMinRadius;
177 }
178
179 //_____________________________________________________________________________
180 Float_t AliCRTConstants::MagMaxRadius() const
181 {
182   // Magnet outer radius
183   return fgkMagMaxRadius;
184 }
185
186 //_____________________________________________________________________________
187 Float_t AliCRTConstants::Depth() const
188 {
189   // Alice IP depth
190   return fgkDepth;
191 }