3 // Class AliMUONGeometrySVMap
4 // -----------------------------------
5 // As the detection element frame is different from the
6 // frame of the sensitive volume(s) defined in Geant,
7 // the sensitive volumes have to be mapped to the detection
8 // elements. In the map, fSVMap, the sensitive voolumes are specified
9 // by the full path in the volume hierarchy, defined as:
10 // /volname.copyNo/volName.copyNo1/...
12 // The array of global positions of sensitive volumes fSVPositions
13 // is included to make easier the verification of the assignements
16 // Author: Ivana Hrivnacova, IPN Orsay
18 #ifndef ALI_MUON_GEOMETRY_SV_MAP_H
19 #define ALI_MUON_GEOMETRY_SV_MAP_H
21 #include <Riostream.h>
23 #include <TObjArray.h>
27 class TGeoTranslation;
29 // Substitutes map <string, int>
30 // which ALICE does not allow to use
32 class AliMUONStringIntMap : public TObject
35 AliMUONStringIntMap();
36 virtual ~AliMUONStringIntMap();
39 Bool_t Add(const TString& first, Int_t second);
40 Int_t Get(const TString& first) const;
41 Int_t GetNofItems() const;
43 virtual void Print(const char* /*option*/ = "") const;
44 void Print(const TString& key, ofstream& out) const;
47 AliMUONStringIntMap(const AliMUONStringIntMap& rhs);
50 AliMUONStringIntMap& operator = (const AliMUONStringIntMap& rhs);
54 Int_t fNofItems; // number of items
55 TObjArray fFirstArray; // first item array
56 TArrayI fSecondArray; // second item array
58 ClassDef(AliMUONStringIntMap,1) // motif map
62 class AliMUONGeometrySVMap : public TObject
65 AliMUONGeometrySVMap(Int_t initSize);
66 AliMUONGeometrySVMap();
67 virtual ~AliMUONGeometrySVMap();
70 void Add(const TString& volumePath,
72 void AddPosition(const TString& volumePath,
73 const TGeoTranslation& globalPosition);
76 void ClearPositions();
78 virtual void Print(Option_t* option) const;
79 void PrintPositions() const;
80 void WriteMap(ofstream& out) const;
83 Int_t GetDetElemId(const TString& volumePath) const;
86 AliMUONGeometrySVMap(const AliMUONGeometrySVMap& rhs);
89 AliMUONGeometrySVMap& operator
90 = (const AliMUONGeometrySVMap& rhs);
93 const TGeoCombiTrans* FindByName(const TString& name) const;
96 AliMUONStringIntMap fSVMap; // Map of sensitive volume paths
97 // and detector element id
98 TObjArray fSVPositions; // The array of transformations
100 ClassDef(AliMUONGeometrySVMap,1) // MUON sensitive volume map
103 #endif //ALI_MUON_GEOMETRY_TRANSFORM_STORE_H