]>
Commit | Line | Data |
---|---|---|
e118b27e | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
89cc3034 | 4 | // $Id$ |
692de412 | 5 | |
6 | /// \ingroup geometry | |
7 | /// \class AliMUONGeometrySVMap | |
8 | /// \brief Map between sensitive volumes and detection element Ids | |
9 | /// | |
10 | /// As the detection element frame is different from the | |
11 | /// frame of the sensitive volume(s) defined in Geant, | |
12 | /// the sensitive volumes have to be mapped to the detection | |
13 | /// elements. In the map, fSVMap, the sensitive voolumes are specified | |
14 | /// by the full path in the volume hierarchy, defined as: | |
15 | /// /volname.copyNo/volName.copyNo1/... | |
16 | /// | |
17 | /// The array of global positions of sensitive volumes fSVPositions | |
18 | /// is included to make easier the verification of the assignements | |
19 | /// in the fSVMap. | |
20 | /// | |
21 | /// Author: Ivana Hrivnacova, IPN Orsay | |
89cc3034 | 22 | |
23 | #ifndef ALI_MUON_GEOMETRY_SV_MAP_H | |
24 | #define ALI_MUON_GEOMETRY_SV_MAP_H | |
25 | ||
89cc3034 | 26 | #include <TObject.h> |
f29ba3e1 | 27 | |
28 | #include "AliMUONStringIntMap.h" | |
89cc3034 | 29 | |
30 | class TGeoCombiTrans; | |
31 | class TGeoTranslation; | |
32 | ||
89cc3034 | 33 | class AliMUONGeometrySVMap : public TObject |
34 | { | |
35 | public: | |
36 | AliMUONGeometrySVMap(Int_t initSize); | |
37 | AliMUONGeometrySVMap(); | |
38 | virtual ~AliMUONGeometrySVMap(); | |
39 | ||
40 | // methods | |
41 | void Add(const TString& volumePath, | |
42 | Int_t detElemId); | |
43 | void AddPosition(const TString& volumePath, | |
44 | const TGeoTranslation& globalPosition); | |
45 | ||
4ebc2323 | 46 | virtual void Clear(Option_t* /*option*/ =""); |
89cc3034 | 47 | void ClearPositions(); |
48 | void SortPositions(); | |
49 | virtual void Print(Option_t* option) const; | |
50 | void PrintPositions() const; | |
51 | void WriteMap(ofstream& out) const; | |
52 | ||
53 | // get methods | |
54 | Int_t GetDetElemId(const TString& volumePath) const; | |
55 | ||
56 | protected: | |
57 | AliMUONGeometrySVMap(const AliMUONGeometrySVMap& rhs); | |
58 | ||
59 | // operators | |
60 | AliMUONGeometrySVMap& operator | |
61 | = (const AliMUONGeometrySVMap& rhs); | |
62 | ||
63 | private: | |
64 | const TGeoCombiTrans* FindByName(const TString& name) const; | |
65 | ||
66 | // data members | |
67 | AliMUONStringIntMap fSVMap; // Map of sensitive volume paths | |
68 | // and detector element id | |
69 | TObjArray fSVPositions; // The array of transformations | |
70 | ||
71 | ClassDef(AliMUONGeometrySVMap,1) // MUON sensitive volume map | |
72 | }; | |
73 | ||
74 | #endif //ALI_MUON_GEOMETRY_TRANSFORM_STORE_H |