]>
Commit | Line | Data |
---|---|---|
451f5018 | 1 | #ifndef ALIITSUGEOMTGEO_H |
2 | #define ALIITSUGEOMTGEO_H | |
a11ef2e4 | 3 | |
451f5018 | 4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | ///////////////////////////////////////////////////////////////////////// | |
852af72e | 8 | // AliITSUGeomTGeo is a simple interface class to TGeoManager // |
451f5018 | 9 | // It is used in the simulation and reconstruction in order to // |
10 | // query the TGeo ITS geometry // | |
11 | // // | |
12 | // author - cvetan.cheshkov@cern.ch // | |
13 | // 15/02/2007 // | |
14 | // adapted to ITSupg 18/07/2012 - ruben.shahoyan@cern.ch // | |
15 | // RS: in order to preserve the static character of the class but // | |
16 | // make it dynamically access geometry, we need to check in every // | |
17 | // method if the structures are initialized. To be converted to // | |
18 | // singleton at later stage. // | |
19 | // // | |
852af72e | 20 | // Note on the upgrade chip types: // |
21 | // The coarse type defines chips served by different classes, // | |
22 | // like Pix. Each such a chip type can have kMaxSegmPerChipType // | |
451f5018 | 23 | // segmentations (pitch etc.) whose parameteres are stored in the // |
75875328 | 24 | // AliITSsegmentation derived class (like AliITSUSegmentationPix) // |
852af72e | 25 | // This allows to have in the setup chips served by the same // |
451f5018 | 26 | // classes but with different segmentations. // |
852af72e | 27 | // The full chip type is composed as: // |
28 | // CoarseType*kMaxSegmPerChipType + segmentationType // | |
451f5018 | 29 | // The only requirement on the segmentationType that should be // |
852af72e | 30 | // < kMaxSegmPerChipType. // |
31 | // The methods like GetLayerChipTypeID return the full chip type // | |
451f5018 | 32 | // // |
33 | // // | |
34 | ///////////////////////////////////////////////////////////////////////// | |
35 | ||
36 | #include <TObject.h> | |
37 | #include <TGeoMatrix.h> | |
38 | #include <TString.h> | |
a11ef2e4 | 39 | #include <TObjArray.h> |
43361342 | 40 | #include "AliITSUAux.h" |
451f5018 | 41 | |
42 | class TGeoPNEntry; | |
43 | class TDatime; | |
546d00d8 | 44 | class AliITSsegmentation; |
451f5018 | 45 | |
46 | class AliITSUGeomTGeo : public TObject { | |
47 | ||
48 | public: | |
49 | enum {kITSVNA, kITSVUpg}; // ITS version | |
852af72e | 50 | enum {kChipTypePix=0, kNChipTypes, kMaxSegmPerChipType=10}; // defined detector chip types (each one can have different segmentations) |
451f5018 | 51 | // |
546d00d8 | 52 | AliITSUGeomTGeo(Bool_t build = kFALSE, Bool_t loadSegmentations = kTRUE); |
451f5018 | 53 | virtual ~AliITSUGeomTGeo(); |
54 | AliITSUGeomTGeo(const AliITSUGeomTGeo &src); | |
55 | AliITSUGeomTGeo& operator=(const AliITSUGeomTGeo &geom); | |
56 | // | |
852af72e | 57 | Int_t GetNChips() const {return fNChips;} |
fbc36e55 | 58 | Int_t GetNChipRowsPerModule(Int_t lay) const {return fNChipRowsPerModule[lay];} |
59 | Int_t GetNChipColsPerModule(Int_t lay) const {return fNChipRowsPerModule[lay] ? fNChipsPerModule[lay]/fNChipRowsPerModule[lay] : -1;} | |
852af72e | 60 | Int_t GetNChipsPerModule(Int_t lay) const {return fNChipsPerModule[lay];} |
44730824 | 61 | Int_t GetNChipsPerHalfStave(Int_t lay) const {return fNChipsPerHalfStave[lay];} |
852af72e | 62 | Int_t GetNChipsPerStave(Int_t lay) const {return fNChipsPerStave[lay];} |
63 | Int_t GetNChipsPerLayer(Int_t lay) const {return fNChipsPerLayer[lay];} | |
64 | Int_t GetNModules(Int_t lay) const {return fNModules[lay];} | |
44730824 | 65 | Int_t GetNHalfStaves(Int_t lay) const {return fNHalfStaves[lay];} |
852af72e | 66 | Int_t GetNStaves(Int_t lay) const {return fNStaves[lay];} |
67 | Int_t GetNLayers() const {return fNLayers;} | |
451f5018 | 68 | |
852af72e | 69 | Int_t GetChipIndex(Int_t lay,int detInLay) const {return GetFirstChipIndex(lay)+detInLay;} |
70 | Int_t GetChipIndex(Int_t lay,Int_t sta,Int_t detInSta) const; | |
71 | Int_t GetChipIndex(Int_t lay,Int_t sta, Int_t subSta, Int_t detInSubSta) const; | |
72 | Int_t GetChipIndex(Int_t lay,Int_t sta, Int_t subSta, Int_t md, Int_t detInMod) const; | |
73 | Bool_t GetChipId(Int_t index,Int_t &lay,Int_t &sta,Int_t &ssta,Int_t &mod,Int_t &chip) const; | |
74 | Int_t GetLayer(Int_t index) const; | |
75 | Int_t GetStave(Int_t index) const; | |
44730824 | 76 | Int_t GetHalfStave(Int_t index) const; |
852af72e | 77 | Int_t GetModule(Int_t index) const; |
78 | Int_t GetChipIdInLayer(Int_t index) const; | |
79 | Int_t GetChipIdInStave(Int_t index) const; | |
44730824 | 80 | Int_t GetChipIdInHalfStave(Int_t index) const; |
852af72e | 81 | Int_t GetChipIdInModule(Int_t index) const; |
451f5018 | 82 | // |
852af72e | 83 | Int_t GetLastChipIndex(Int_t lay) const {return fLastChipIndex[lay];} |
84 | Int_t GetFirstChipIndex(Int_t lay) const {return (lay==0) ? 0:fLastChipIndex[lay-1]+1;} | |
451f5018 | 85 | // |
86 | const char *GetSymName(Int_t index) const; | |
852af72e | 87 | const char *GetSymName(Int_t lay,Int_t sta,Int_t det) const; |
451f5018 | 88 | // |
852af72e | 89 | // Attention: these are the matrices for the alignable volumes of the chips, i.e. not necessarily the sensors |
451f5018 | 90 | TGeoHMatrix* GetMatrix(Int_t index) const; |
852af72e | 91 | TGeoHMatrix* GetMatrix(Int_t lay,Int_t sta,Int_t det) const; |
451f5018 | 92 | Bool_t GetTranslation(Int_t index, Double_t t[3]) const; |
852af72e | 93 | Bool_t GetTranslation(Int_t lay,Int_t sta,Int_t det, Double_t t[3]) const; |
451f5018 | 94 | Bool_t GetRotation(Int_t index, Double_t r[9]) const; |
852af72e | 95 | Bool_t GetRotation(Int_t lay,Int_t sta,Int_t det, Double_t r[9]) const; |
451f5018 | 96 | Bool_t GetOrigMatrix(Int_t index, TGeoHMatrix &m) const; |
852af72e | 97 | Bool_t GetOrigMatrix(Int_t lay,Int_t sta,Int_t det, TGeoHMatrix &m) const; |
451f5018 | 98 | Bool_t GetOrigTranslation(Int_t index, Double_t t[3]) const; |
852af72e | 99 | Bool_t GetOrigTranslation(Int_t lay,Int_t sta,Int_t det, Double_t t[3]) const; |
451f5018 | 100 | Bool_t GetOrigRotation(Int_t index, Double_t r[9]) const; |
852af72e | 101 | Bool_t GetOrigRotation(Int_t lay,Int_t sta,Int_t det, Double_t r[9]) const; |
451f5018 | 102 | // |
cf457606 | 103 | const TGeoHMatrix* GetMatrixT2L(Int_t index); |
852af72e | 104 | const TGeoHMatrix* GetMatrixT2L(Int_t lay,Int_t sta,Int_t det) {return GetMatrixT2L( GetChipIndex(lay,sta,det) );} |
cf457606 | 105 | const TGeoHMatrix* GetMatrixSens(Int_t index); |
852af72e | 106 | const TGeoHMatrix* GetMatrixSens(Int_t lay,Int_t sta,Int_t det) {return GetMatrixSens( GetChipIndex(lay,sta,det) );} |
451f5018 | 107 | // |
cf457606 | 108 | Bool_t GetTrackingMatrix(Int_t index, TGeoHMatrix &m); |
852af72e | 109 | Bool_t GetTrackingMatrix(Int_t lay,Int_t sta,Int_t det, TGeoHMatrix &m); |
451f5018 | 110 | // |
111 | // Attention: these are transformations wrt sensitive volume! | |
cf457606 | 112 | void LocalToGlobal(Int_t index, const Double_t *loc, Double_t *glob); |
852af72e | 113 | void LocalToGlobal(Int_t lay, Int_t sta, Int_t det,const Double_t *loc, Double_t *glob); |
451f5018 | 114 | // |
cf457606 | 115 | void GlobalToLocal(Int_t index, const Double_t *glob, Double_t *loc); |
852af72e | 116 | void GlobalToLocal(Int_t lay, Int_t sta, Int_t det,const Double_t *glob, Double_t *loc); |
451f5018 | 117 | // |
cf457606 | 118 | void LocalToGlobalVect(Int_t index, const Double_t *loc, Double_t *glob); |
119 | void GlobalToLocalVect(Int_t index, const Double_t *glob, Double_t *loc); | |
852af72e | 120 | Int_t GetLayerChipTypeID(Int_t lr) const; |
121 | Int_t GetChipChipTypeID(Int_t id) const; | |
451f5018 | 122 | // |
546d00d8 | 123 | const AliITSsegmentation* GetSegmentationByID(Int_t id) const; |
124 | const AliITSsegmentation* GetSegmentation(Int_t lr) const; | |
125 | TObjArray* GetSegmentations() const {return (TObjArray*)fSegm;} | |
02d6eccc | 126 | virtual void Print(Option_t *opt="") const; |
e1f00b9d RS |
127 | // |
128 | static UInt_t GetUIDShift() {return fgUIDShift;} | |
129 | static void SetUIDShift(UInt_t s=16) {fgUIDShift = s<16 ? s:16;} | |
130 | // | |
852af72e | 131 | static const char* GetITSVolPattern() {return fgITSVolName.Data();} |
132 | static const char* GetITSLayerPattern() {return fgITSLrName.Data();} | |
133 | static const char* GetITSWrapVolPattern() {return fgITSWrapVolName.Data();} | |
134 | static const char* GetITSStavePattern() {return fgITSStaveName.Data();} | |
44730824 | 135 | static const char* GetITSHalfStavePattern() {return fgITSHalfStaveName.Data();} |
852af72e | 136 | static const char* GetITSModulePattern() {return fgITSModuleName.Data();} |
137 | static const char* GetITSChipPattern() {return fgITSChipName.Data();} | |
138 | static const char* GetITSSensorPattern() {return fgITSSensName.Data();} | |
cf457606 | 139 | static const char* GetITSsegmentationFileName() {return fgITSsegmFileName.Data();} |
852af72e | 140 | static const char* GetChipTypeName(Int_t i); |
141 | ||
142 | static void SetITSVolPattern(const char* nm) {fgITSVolName = nm;} | |
143 | static void SetITSLayerPattern(const char* nm) {fgITSLrName = nm;} | |
144 | static void SetITSWrapVolPattern(const char* nm) {fgITSWrapVolName = nm;} | |
145 | static void SetITSStavePattern(const char* nm) {fgITSStaveName = nm;} | |
44730824 | 146 | static void SetITSHalfStavePattern(const char* nm) {fgITSHalfStaveName = nm;} |
852af72e | 147 | static void SetITSModulePattern(const char* nm) {fgITSModuleName = nm;} |
148 | static void SetITSChipPattern(const char* nm) {fgITSChipName = nm;} | |
149 | static void SetITSSensorPattern(const char* nm) {fgITSSensName = nm;} | |
150 | static void SetChipTypeName(Int_t i,const char* nm); | |
cf457606 | 151 | static void SetITSsegmentationFileName(const char* nm) {fgITSsegmFileName = nm;} |
852af72e | 152 | static UInt_t ComposeChipTypeID(UInt_t segmId); |
451f5018 | 153 | // |
392efe73 | 154 | static const char *ComposeSymNameITS(); |
155 | static const char *ComposeSymNameLayer(Int_t lr); | |
852af72e | 156 | static const char *ComposeSymNameStave(Int_t lr, Int_t sta); |
44730824 | 157 | static const char *ComposeSymNameHalfStave(Int_t lr, Int_t sta, Int_t ssta); |
852af72e | 158 | static const char *ComposeSymNameModule(Int_t lr, Int_t sta, Int_t ssta, Int_t mod); |
159 | static const char *ComposeSymNameChip(Int_t lr, Int_t sta, Int_t ssta, Int_t mod, Int_t chip); | |
392efe73 | 160 | // |
02d6eccc | 161 | // hack to avoid using AliGeomManager |
852af72e | 162 | Int_t LayerToVolUID(Int_t lay,int detInLay) const {return ChipVolUID(GetChipIndex(lay,detInLay));} |
163 | static Int_t ChipVolUID(Int_t mod) {return (mod&0xffff)<<fgUIDShift;} | |
cf457606 | 164 | // |
165 | protected: | |
166 | void FetchMatrices(); | |
af4b47c9 | 167 | void CreateT2LMatrices(); |
cf457606 | 168 | TGeoHMatrix* ExtractMatrixT2L(Int_t index) const; |
169 | TGeoHMatrix* ExtractMatrixSens(Int_t index) const; | |
170 | Bool_t GetLayer(Int_t index,Int_t &lay,Int_t &index2) const; | |
171 | TGeoPNEntry* GetPNEntry(Int_t index) const; | |
fbc36e55 | 172 | Int_t ExtractNChipsPerModule(Int_t lay, Int_t &nrow) const; |
852af72e | 173 | Int_t ExtractNumberOfStaves(Int_t lay) const; |
44730824 | 174 | Int_t ExtractNumberOfHalfStaves(Int_t lay) const; |
852af72e | 175 | Int_t ExtractNumberOfModules(Int_t lay) const; |
176 | Int_t ExtractLayerChipType(Int_t lay) const; | |
43361342 | 177 | Int_t ExtractNumberOfLayers(); |
546d00d8 | 178 | void BuildITS(Bool_t loadSegm); |
02d6eccc | 179 | // |
546d00d8 | 180 | protected: |
af4b47c9 | 181 | // |
451f5018 | 182 | // |
183 | Int_t fVersion; // ITS Version | |
184 | Int_t fNLayers; // number of layers | |
852af72e | 185 | Int_t fNChips; // The total number of chips |
186 | Int_t *fNStaves; //[fNLayers] Array of the number of staves/layer(layer) | |
44730824 | 187 | Int_t *fNHalfStaves; //[fNLayers] Array of the number of substaves/stave(layer) |
852af72e | 188 | Int_t *fNModules; //[fNLayers] Array of the number of modules/substave(layer) |
189 | Int_t *fNChipsPerModule; //[fNLayers] Array of the number of chips per module (group of chips on the substaves) | |
fbc36e55 | 190 | Int_t *fNChipRowsPerModule; //[fNLayers] Array of the number of chips rows per module (relevant for OB modules) |
44730824 | 191 | Int_t *fNChipsPerHalfStave; //[fNLayers] Array of the number of chips per substave |
852af72e | 192 | Int_t *fNChipsPerStave; //[fNLayers] Array of the number of chips per stave |
193 | Int_t *fNChipsPerLayer; //[fNLayers] Array of the number of chips per stave | |
194 | ||
195 | // | |
196 | Int_t *fLrChipType; //[fNLayers] Array of layer chip types | |
197 | Int_t *fLastChipIndex; //[fNLayers] max ID of the detctor in the layer | |
43361342 | 198 | Char_t fLr2Wrapper[AliITSUAux::kMaxLayers]; // layer -> wrapper correspondence |
451f5018 | 199 | // |
cf457606 | 200 | TObjArray* fMatSens; // Sensor's matrices pointers in the geometry |
201 | TObjArray* fMatT2L; // Tracking to Local matrices pointers in the geometry | |
546d00d8 | 202 | TObjArray* fSegm; // segmentations |
cf457606 | 203 | // |
852af72e | 204 | static UInt_t fgUIDShift; // bit shift to go from mod.id to modUUID for TGeo |
205 | static TString fgITSVolName; // ITS mother volume name | |
206 | static TString fgITSLrName; // ITS Layer name | |
207 | static TString fgITSStaveName; // ITS Stave name | |
44730824 | 208 | static TString fgITSHalfStaveName; // ITS HalfStave name |
852af72e | 209 | static TString fgITSModuleName; // ITS Module name |
210 | static TString fgITSChipName; // ITS Chip name | |
211 | static TString fgITSSensName; // ITS Sensor name | |
212 | static TString fgITSWrapVolName; // ITS Wrapper volume name | |
213 | static TString fgITSChipTypeName[kNChipTypes]; // ITS upg detType Names | |
451f5018 | 214 | // |
852af72e | 215 | static TString fgITSsegmFileName; // file name for segmentations |
451f5018 | 216 | // |
e1f00b9d | 217 | ClassDef(AliITSUGeomTGeo, 2) // ITS geometry based on TGeo |
451f5018 | 218 | }; |
219 | ||
220 | //_____________________________________________________________________________________________ | |
852af72e | 221 | inline const char *AliITSUGeomTGeo::GetSymName(Int_t lay,Int_t sta,Int_t det) const |
451f5018 | 222 | { |
223 | // sym name | |
852af72e | 224 | return GetSymName(GetChipIndex(lay,sta,det)); |
451f5018 | 225 | } |
226 | ||
227 | //_____________________________________________________________________________________________ | |
852af72e | 228 | inline TGeoHMatrix* AliITSUGeomTGeo::GetMatrix(Int_t lay,Int_t sta,Int_t det) const |
451f5018 | 229 | { |
852af72e | 230 | // chip current matrix |
231 | return GetMatrix(GetChipIndex(lay,sta,det)); | |
451f5018 | 232 | } |
233 | ||
234 | //_____________________________________________________________________________________________ | |
852af72e | 235 | inline Bool_t AliITSUGeomTGeo::GetTranslation(Int_t lay,Int_t sta,Int_t det, Double_t t[3]) const |
451f5018 | 236 | { |
237 | // translation | |
852af72e | 238 | return GetTranslation(GetChipIndex(lay,sta,det),t); |
451f5018 | 239 | } |
240 | ||
241 | //_____________________________________________________________________________________________ | |
852af72e | 242 | inline Bool_t AliITSUGeomTGeo::GetRotation(Int_t lay,Int_t sta,Int_t det, Double_t r[9]) const |
451f5018 | 243 | { |
244 | // rot | |
852af72e | 245 | return GetRotation(GetChipIndex(lay,sta,det),r); |
451f5018 | 246 | } |
247 | ||
248 | //_____________________________________________________________________________________________ | |
852af72e | 249 | inline Bool_t AliITSUGeomTGeo::GetOrigMatrix(Int_t lay,Int_t sta,Int_t det, TGeoHMatrix &m) const |
451f5018 | 250 | { |
251 | // orig matrix | |
852af72e | 252 | return GetOrigMatrix(GetChipIndex(lay,sta,det),m); |
451f5018 | 253 | } |
254 | ||
255 | //_____________________________________________________________________________________________ | |
852af72e | 256 | inline Bool_t AliITSUGeomTGeo::GetOrigTranslation(Int_t lay,Int_t sta,Int_t det, Double_t t[3]) const |
451f5018 | 257 | { |
258 | // orig trans | |
852af72e | 259 | return GetOrigTranslation(GetChipIndex(lay,sta,det),t); |
451f5018 | 260 | } |
261 | ||
262 | //_____________________________________________________________________________________________ | |
852af72e | 263 | inline Bool_t AliITSUGeomTGeo::GetOrigRotation(Int_t lay,Int_t sta,Int_t det, Double_t r[9]) const |
451f5018 | 264 | { |
265 | // orig rot | |
852af72e | 266 | return GetOrigRotation(GetChipIndex(lay,sta,det),r); |
451f5018 | 267 | } |
268 | ||
269 | //_____________________________________________________________________________________________ | |
852af72e | 270 | inline Bool_t AliITSUGeomTGeo::GetTrackingMatrix(Int_t lay,Int_t sta,Int_t det, TGeoHMatrix &m) |
451f5018 | 271 | { |
cf457606 | 272 | // tracking mat |
852af72e | 273 | return GetTrackingMatrix(GetChipIndex(lay,sta,det),m); |
451f5018 | 274 | } |
275 | ||
276 | //_____________________________________________________________________________________________ | |
852af72e | 277 | inline Int_t AliITSUGeomTGeo::GetLayerChipTypeID(Int_t lr) const |
451f5018 | 278 | { |
cf457606 | 279 | // detector type ID of layer |
852af72e | 280 | return fLrChipType[lr]; |
451f5018 | 281 | } |
282 | ||
283 | //_____________________________________________________________________________________________ | |
852af72e | 284 | inline Int_t AliITSUGeomTGeo::GetChipChipTypeID(Int_t id) const |
451f5018 | 285 | { |
852af72e | 286 | // detector type ID of chip |
287 | return GetLayerChipTypeID(GetLayer(id)); | |
cf457606 | 288 | } |
451f5018 | 289 | |
290 | //_____________________________________________________________________________________________ | |
cf457606 | 291 | inline const TGeoHMatrix* AliITSUGeomTGeo::GetMatrixSens(Int_t index) |
451f5018 | 292 | { |
cf457606 | 293 | // access global to sensor matrix |
294 | if (!fMatSens) FetchMatrices(); | |
295 | return (TGeoHMatrix*)fMatSens->At(index); | |
451f5018 | 296 | } |
297 | ||
298 | //_____________________________________________________________________________________________ | |
cf457606 | 299 | inline const TGeoHMatrix* AliITSUGeomTGeo::GetMatrixT2L(Int_t index) |
451f5018 | 300 | { |
cf457606 | 301 | // access tracking to local matrix |
302 | if (!fMatT2L) FetchMatrices(); | |
303 | return (TGeoHMatrix*)fMatT2L->At(index); | |
304 | } | |
305 | ||
306 | //______________________________________________________________________ | |
307 | inline void AliITSUGeomTGeo::LocalToGlobal(Int_t index,const Double_t *loc, Double_t *glob) | |
308 | { | |
309 | // sensor local to global | |
310 | GetMatrixSens(index)->LocalToMaster(loc,glob); | |
311 | } | |
312 | ||
313 | //______________________________________________________________________ | |
314 | inline void AliITSUGeomTGeo::GlobalToLocal(Int_t index, const Double_t *glob, Double_t *loc) | |
315 | { | |
316 | // global to sensor local | |
317 | GetMatrixSens(index)->MasterToLocal(glob,loc); | |
318 | } | |
319 | ||
320 | //______________________________________________________________________ | |
321 | inline void AliITSUGeomTGeo::LocalToGlobalVect(Int_t index, const Double_t *loc, Double_t *glob) | |
322 | { | |
323 | // sensor local to global | |
324 | GetMatrixSens(index)->LocalToMasterVect(loc,glob); | |
325 | } | |
326 | ||
327 | //______________________________________________________________________ | |
328 | inline void AliITSUGeomTGeo::GlobalToLocalVect(Int_t index, const Double_t *glob, Double_t *loc) | |
329 | { | |
330 | // global to sensor local | |
331 | GetMatrixSens(index)->MasterToLocalVect(glob,loc); | |
451f5018 | 332 | } |
333 | ||
334 | //_____________________________________________________________________________________________ | |
852af72e | 335 | inline void AliITSUGeomTGeo::LocalToGlobal(Int_t lay, Int_t sta, Int_t det,const Double_t *loc, Double_t *glob) |
451f5018 | 336 | { |
cf457606 | 337 | // Local2Master (sensor) |
852af72e | 338 | LocalToGlobal(GetChipIndex(lay,sta,det), loc, glob); |
451f5018 | 339 | } |
340 | ||
341 | //_____________________________________________________________________________________________ | |
852af72e | 342 | inline void AliITSUGeomTGeo::GlobalToLocal(Int_t lay, Int_t sta, Int_t det,const Double_t *glob, Double_t *loc) |
451f5018 | 343 | { |
cf457606 | 344 | // master2local (sensor) |
852af72e | 345 | GlobalToLocal(GetChipIndex(lay,sta,det), glob, loc); |
346 | } | |
347 | ||
348 | //_____________________________________________________________________________________________ | |
349 | inline const char* AliITSUGeomTGeo::GetChipTypeName(Int_t i) | |
350 | { | |
351 | if (i>=kNChipTypes) i/=kMaxSegmPerChipType; // full type is provided | |
352 | return fgITSChipTypeName[i].Data(); | |
cf457606 | 353 | } |
451f5018 | 354 | |
75875328 | 355 | //_____________________________________________________________________________________________ |
852af72e | 356 | inline void AliITSUGeomTGeo::SetChipTypeName(Int_t i, const char* nm) |
75875328 | 357 | { |
852af72e | 358 | if (i>=kNChipTypes) i/=kMaxSegmPerChipType; // full type is provided |
359 | fgITSChipTypeName[i] = nm; | |
75875328 | 360 | } |
451f5018 | 361 | |
546d00d8 | 362 | //_____________________________________________________________________________________________ |
363 | inline const AliITSsegmentation* AliITSUGeomTGeo::GetSegmentationByID(Int_t id) const | |
364 | { | |
365 | // get segmentation by ID | |
366 | return fSegm ? (AliITSsegmentation*)fSegm->At(id) : 0; | |
367 | } | |
368 | ||
369 | //_____________________________________________________________________________________________ | |
370 | inline const AliITSsegmentation* AliITSUGeomTGeo::GetSegmentation(Int_t lr) const | |
371 | { | |
372 | // get segmentation of layer | |
852af72e | 373 | return fSegm ? (AliITSsegmentation*)fSegm->At( GetLayerChipTypeID(lr) ) : 0; |
546d00d8 | 374 | } |
375 | ||
451f5018 | 376 | #endif |