Update HFE v2 analyses
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryModule.h
CommitLineData
e118b27e 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
4/* $Id$ */
5// Revision of includes 07/05/2004
6
692de412 7/// \ingroup geometry
8/// \class AliMUONGeometryModule
9/// \brief Geometry parameters for detector module
10///
11/// Class for definition of the detector module parameters
12/// (the transformations of detection elements, mapping between
13/// sensitive volumes and detection elements).
14///
a9aad96e 15/// \author Ivana Hrivnacova, IPN Orsay
e118b27e 16
f29ba3e1 17#ifndef ALI_MUON_GEOMETRY_MODULE_H
18#define ALI_MUON_GEOMETRY_MODULE_H
e118b27e 19
fbdfcd24 20#include "AliMUONGeometryModuleTransformer.h"
21
e118b27e 22#include <TObject.h>
23#include <TString.h>
24
fbdfcd24 25class AliMUONGeometryEnvelope;
26class AliMUONGeometryEnvelopeStore;
27class AliMUONGeometryDetElement;
fbdfcd24 28class AliMUONStringIntMap;
6cfb12b4 29
e118b27e 30class TGeoTranslation;
31class TGeoRotation;
32class TGeoCombiTrans;
33class TObjArray;
34class TArrayI;
35
e118b27e 36class AliMUONGeometryModule : public TObject
37{
38 public:
39 AliMUONGeometryModule(Int_t moduleId);
40 AliMUONGeometryModule();
41 virtual ~AliMUONGeometryModule();
42
e118b27e 43 // set methods
6cfb12b4 44 //
6cfb12b4 45 void SetTransformation(const TGeoCombiTrans& transform);
fbdfcd24 46 void SetVolumePath(const TString& volumePath);
47 void SetIsVirtual(Bool_t isVirtual);
e118b27e 48
49 void SetSensitiveVolume(Int_t volId);
50 void SetSensitiveVolume(const TString& name);
51 void SetAlign(Bool_t align);
52
53 // get methods
6cfb12b4 54 //
55 Bool_t IsVirtual() const;
56 Int_t GetModuleId() const;
fbdfcd24 57 TString GetVolumePath() const;
6cfb12b4 58
e118b27e 59 AliMUONGeometryDetElement* FindBySensitiveVolume(
60 const TString& volumePath) const;
e118b27e 61 Bool_t IsSensitiveVolume(Int_t volId) const;
62 Bool_t IsSensitiveVolume(const TString& volName) const;
63
6cfb12b4 64 AliMUONGeometryEnvelopeStore* GetEnvelopeStore() const;
fbdfcd24 65 AliMUONStringIntMap* GetSVMap() const;
6cfb12b4 66 AliMUONGeometryModuleTransformer* GetTransformer() const;
67
e118b27e 68 protected:
71a2d3aa 69 /// Not implemented
e118b27e 70 AliMUONGeometryModule(const AliMUONGeometryModule& rhs);
71a2d3aa 71 /// Not implemented
fbdfcd24 72 AliMUONGeometryModule& operator = (const AliMUONGeometryModule& rhs);
e118b27e 73
74 private:
75 // methods
76 Int_t GetSVIndex(Int_t svVolId) const;
77
78 // data members
829425a5 79 Bool_t fIsVirtual; ///< \brief true if module is not represented
80 /// by a real volume
81 Int_t fNofSVs; ///< number of sensitive volumes
82 TArrayI* fSVVolumeIds; ///< sensitive volumes IDs
83
84 AliMUONGeometryEnvelopeStore* fEnvelopes; ///< envelopes
85 AliMUONStringIntMap* fSVMap; ///< sensitive volumes map
86 AliMUONGeometryModuleTransformer* fTransformer;///< geometry transformations
e118b27e 87
fbdfcd24 88 ClassDef(AliMUONGeometryModule,4) // MUON geometry module class
e118b27e 89};
90
91// inline functions
92
a9aad96e 93/// Set virtuality (true if module is not represented by a real volume)
fbdfcd24 94inline void AliMUONGeometryModule::SetIsVirtual(Bool_t isVirtual)
95{ fIsVirtual = isVirtual; }
e118b27e 96
a9aad96e 97/// Return true if module is not represented by a real volume
cfbf2f7d 98inline Bool_t AliMUONGeometryModule::IsVirtual() const
99{ return fIsVirtual; }
100
a9aad96e 101/// Return module ID
e118b27e 102inline Int_t AliMUONGeometryModule::GetModuleId() const
6cfb12b4 103{ return fTransformer->GetModuleId(); }
e118b27e 104
a9aad96e 105/// Return the full path of aligned module volume or envelope in geometry
fbdfcd24 106inline TString AliMUONGeometryModule::GetVolumePath() const
107{ return fTransformer->GetVolumePath(); }
cfbf2f7d 108
a9aad96e 109/// Return envelopes associated with this module
6cfb12b4 110inline
111AliMUONGeometryEnvelopeStore* AliMUONGeometryModule::GetEnvelopeStore() const
e118b27e 112{ return fEnvelopes; }
113
a9aad96e 114/// Return sensitive volume map
6cfb12b4 115inline
fbdfcd24 116AliMUONStringIntMap* AliMUONGeometryModule::GetSVMap() const
e118b27e 117{ return fSVMap; }
118
a9aad96e 119/// Return transformer
6cfb12b4 120inline
121AliMUONGeometryModuleTransformer* AliMUONGeometryModule::GetTransformer() const
122{ return fTransformer; }
123
f29ba3e1 124#endif //ALI_MUON_GEOMETRY_MODULE_H