89cc3034 |
1 | // $Id$ |
2 | // |
3 | // Class AliMUONGeometryTransformStore |
4 | // ----------------------------------- |
5 | // The class contains the array of transformations fDETransforms |
6 | // of the detection elements from a defined reference frame (MUON chamber ) |
7 | // to the detection element frame. |
8 | // The detection elements numbering: |
9 | // DetElemId = chamberId*100 + [50] + detElemNum |
10 | // where chamberId = 1, 2, ..., 14 |
11 | // detElemNum = 0, 1, ... |
12 | // The number 50 is added to distinguish detector elements |
13 | // in the left and the right hemispheres. |
14 | // |
15 | // Author: Ivana Hrivnacova, IPN Orsay |
16 | |
17 | #ifndef ALI_MUON_GEOMETRY_TRANSFORM_STORE_H |
18 | #define ALI_MUON_GEOMETRY_TRANSFORM_STORE_H |
19 | |
20 | #include <Riostream.h> |
21 | #include <TObject.h> |
22 | #include <TObjArray.h> |
23 | #include <TArrayI.h> |
24 | |
25 | #include "AliMUONGeometrySVMap.h" |
26 | |
27 | class TGeoCombiTrans; |
28 | class TGeoTranslation; |
29 | |
30 | class AliMUONGeometryTransformStore : public TObject |
31 | { |
32 | public: |
33 | AliMUONGeometryTransformStore( |
34 | Int_t firstDetElemId, Int_t nofDetElems, |
35 | AliMUONGeometrySVMap* svMap); |
36 | AliMUONGeometryTransformStore(); |
37 | virtual ~AliMUONGeometryTransformStore(); |
38 | |
39 | // methods |
40 | void Add(Int_t detElemId, |
41 | const TString& alignedVolume, |
42 | const TGeoCombiTrans& transformation); |
43 | |
44 | virtual void Print(Option_t* /*option*/) const; |
45 | |
46 | // get methods |
47 | const TGeoCombiTrans* Get(Int_t detElemId) const; |
48 | const TGeoCombiTrans* FindBySensitiveVolume(const TString& volumePath) const; |
49 | |
50 | protected: |
51 | AliMUONGeometryTransformStore(const AliMUONGeometryTransformStore& rhs); |
52 | |
53 | // operators |
54 | AliMUONGeometryTransformStore& operator |
55 | = (const AliMUONGeometryTransformStore& rhs); |
56 | |
57 | private: |
58 | // methods |
59 | Int_t GetDetElementIndex(Int_t detElemId) const; |
60 | Int_t GetDetElementId(Int_t detElemIndex) const; |
61 | |
62 | // data members |
63 | static const Int_t fgkHemisphere; // The constant to distinguish |
64 | // the left/right hemispere |
65 | |
66 | Int_t fFirstDetElemId; // The first detection element Id |
67 | Int_t fNofDetElems; // Number of detection elements |
68 | TObjArray fDETransforms; // The array of transformations |
69 | AliMUONGeometrySVMap* fSVMap; // The map of sensitive volumes |
70 | // and detector element id |
71 | |
72 | ClassDef(AliMUONGeometryTransformStore,1) // MUON transformations store |
73 | }; |
74 | |
75 | #endif //ALI_MUON_GEOMETRY_TRANSFORM_STORE_H |