]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONGeometryModule.h
- The part of JETAN dealing with ESD data has been separated from the one using MC...
[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:
69 AliMUONGeometryModule(const AliMUONGeometryModule& rhs);
fbdfcd24 70 AliMUONGeometryModule& operator = (const AliMUONGeometryModule& rhs);
e118b27e 71
72 private:
73 // methods
74 Int_t GetSVIndex(Int_t svVolId) const;
75
76 // data members
829425a5 77 Bool_t fIsVirtual; ///< \brief true if module is not represented
78 /// by a real volume
79 Int_t fNofSVs; ///< number of sensitive volumes
80 TArrayI* fSVVolumeIds; ///< sensitive volumes IDs
81
82 AliMUONGeometryEnvelopeStore* fEnvelopes; ///< envelopes
83 AliMUONStringIntMap* fSVMap; ///< sensitive volumes map
84 AliMUONGeometryModuleTransformer* fTransformer;///< geometry transformations
e118b27e 85
fbdfcd24 86 ClassDef(AliMUONGeometryModule,4) // MUON geometry module class
e118b27e 87};
88
89// inline functions
90
a9aad96e 91/// Set virtuality (true if module is not represented by a real volume)
fbdfcd24 92inline void AliMUONGeometryModule::SetIsVirtual(Bool_t isVirtual)
93{ fIsVirtual = isVirtual; }
e118b27e 94
a9aad96e 95/// Return true if module is not represented by a real volume
cfbf2f7d 96inline Bool_t AliMUONGeometryModule::IsVirtual() const
97{ return fIsVirtual; }
98
a9aad96e 99/// Return module ID
e118b27e 100inline Int_t AliMUONGeometryModule::GetModuleId() const
6cfb12b4 101{ return fTransformer->GetModuleId(); }
e118b27e 102
a9aad96e 103/// Return the full path of aligned module volume or envelope in geometry
fbdfcd24 104inline TString AliMUONGeometryModule::GetVolumePath() const
105{ return fTransformer->GetVolumePath(); }
cfbf2f7d 106
a9aad96e 107/// Return envelopes associated with this module
6cfb12b4 108inline
109AliMUONGeometryEnvelopeStore* AliMUONGeometryModule::GetEnvelopeStore() const
e118b27e 110{ return fEnvelopes; }
111
a9aad96e 112/// Return sensitive volume map
6cfb12b4 113inline
fbdfcd24 114AliMUONStringIntMap* AliMUONGeometryModule::GetSVMap() const
e118b27e 115{ return fSVMap; }
116
a9aad96e 117/// Return transformer
6cfb12b4 118inline
119AliMUONGeometryModuleTransformer* AliMUONGeometryModule::GetTransformer() const
120{ return fTransformer; }
121
f29ba3e1 122#endif //ALI_MUON_GEOMETRY_MODULE_H