1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
7 /// \class AliMUONGeometryDEIndexing
8 /// \brief Conversion between the detection element Id and the array index
10 /// The class that provides conversion between the detection element Id
11 /// and the index in the array.
12 /// Used in storing DE transformations and segmentations.
13 /// The detection elements numbering:
14 /// DetElemId = chamberId*100 + [50] + detElemNum
15 /// where chamberId = 1, 2, ..., 14
16 /// detElemNum = 0, 1, ...
17 /// The number 50 is added to distinguish detector elements
18 /// in the left and the right hemispheres.
20 /// Author: Ivana Hrivnacova, IPN Orsay
22 #ifndef ALI_MUON_GEOMETRY_DE_INDEXING_H
23 #define ALI_MUON_GEOMETRY_DE_INDEXING_H
25 #include "AliMUONVGeometryDEIndexing.h"
27 class AliMUONGeometryDEIndexing : public AliMUONVGeometryDEIndexing
30 AliMUONGeometryDEIndexing(Int_t moduleId, Int_t nofDetElements);
31 AliMUONGeometryDEIndexing();
32 virtual ~AliMUONGeometryDEIndexing();
34 // methods for conversion between det element Id and index
35 virtual Int_t GetDetElementIndex(Int_t detElemId) const;
36 virtual Int_t GetDetElementId(Int_t detElemIndex) const;
39 virtual Int_t GetNofDetElements() const ;
40 virtual void SetNofDetElements(Int_t nofDetElements);
43 Int_t GetFirstDetElemId() const;
45 // static data members
46 static const Int_t fgkHemisphere; // The constant to distinguish
47 // the left/right hemispere
50 Int_t fModuleId; // module Id
51 Int_t fNofDetElements; // number of detection elements in the module
53 ClassDef(AliMUONGeometryDEIndexing,1) // Conversion between the DE Id and the array index
58 inline Int_t AliMUONGeometryDEIndexing::GetNofDetElements() const
59 { return fNofDetElements; }
61 inline void AliMUONGeometryDEIndexing::SetNofDetElements(Int_t nofDetElements)
62 { fNofDetElements = nofDetElements; }
64 #endif //ALI_MUON_GEOMETRY_DE_INDEXING_H