1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
6 // Class AliMUONGeometrySVMap
7 // --------------------------
8 // As the detection element frame is different from the
9 // frame of the sensitive volume(s) defined in Geant,
10 // the sensitive volumes have to be mapped to the detection
11 // elements. In the map, fSVMap, the sensitive voolumes are specified
12 // by the full path in the volume hierarchy, defined as:
13 // /volname.copyNo/volName.copyNo1/...
15 // The array of global positions of sensitive volumes fSVPositions
16 // is included to make easier the verification of the assignements
19 // Author: Ivana Hrivnacova, IPN Orsay
21 #ifndef ALI_MUON_GEOMETRY_SV_MAP_H
22 #define ALI_MUON_GEOMETRY_SV_MAP_H
24 #include <Riostream.h>
26 #include <TObjArray.h>
30 class TGeoTranslation;
32 // Substitutes map <string, int>
33 // which ALICE does not allow to use
35 class AliMUONStringIntMap : public TObject
38 AliMUONStringIntMap();
39 virtual ~AliMUONStringIntMap();
42 Bool_t Add(const TString& first, Int_t second);
43 Int_t Get(const TString& first) const;
44 Int_t GetNofItems() const;
46 virtual void Print(const char* /*option*/ = "") const;
47 void Print(const TString& key, ofstream& out) const;
50 AliMUONStringIntMap(const AliMUONStringIntMap& rhs);
53 AliMUONStringIntMap& operator = (const AliMUONStringIntMap& rhs);
57 Int_t fNofItems; // number of items
58 TObjArray fFirstArray; // first item array
59 TArrayI fSecondArray; // second item array
61 ClassDef(AliMUONStringIntMap,1) // motif map
65 class AliMUONGeometrySVMap : public TObject
68 AliMUONGeometrySVMap(Int_t initSize);
69 AliMUONGeometrySVMap();
70 virtual ~AliMUONGeometrySVMap();
73 void Add(const TString& volumePath,
75 void AddPosition(const TString& volumePath,
76 const TGeoTranslation& globalPosition);
79 void ClearPositions();
81 virtual void Print(Option_t* option) const;
82 void PrintPositions() const;
83 void WriteMap(ofstream& out) const;
86 Int_t GetDetElemId(const TString& volumePath) const;
89 AliMUONGeometrySVMap(const AliMUONGeometrySVMap& rhs);
92 AliMUONGeometrySVMap& operator
93 = (const AliMUONGeometrySVMap& rhs);
96 const TGeoCombiTrans* FindByName(const TString& name) const;
99 AliMUONStringIntMap fSVMap; // Map of sensitive volume paths
100 // and detector element id
101 TObjArray fSVPositions; // The array of transformations
103 ClassDef(AliMUONGeometrySVMap,1) // MUON sensitive volume map
106 #endif //ALI_MUON_GEOMETRY_TRANSFORM_STORE_H