/* $Id$ */
// Revision of includes 07/05/2004
-//
-// Class AliMUONGeometryModule
-// -----------------------------
-// Class for definition of the detector module parameters
-// (the transformations of detection elements, mapping between
-// sensitive volumes and detection elements).
-//
-// Author: Ivana Hrivnacova, IPN Orsay
-
-#ifndef ALI_MUON_MODULE_GEOMETRY_H
-#define ALI_MUON_MODULE_GEOMETRY_H
+/// \ingroup geometry
+/// \class AliMUONGeometryModule
+/// \brief Geometry parameters for detector module
+///
+/// Class for definition of the detector module parameters
+/// (the transformations of detection elements, mapping between
+/// sensitive volumes and detection elements).
+///
+/// \author Ivana Hrivnacova, IPN Orsay
+
+#ifndef ALI_MUON_GEOMETRY_MODULE_H
+#define ALI_MUON_GEOMETRY_MODULE_H
+
+#include "AliMUONGeometryModuleTransformer.h"
#include <TObject.h>
#include <TString.h>
+class AliMUONGeometryEnvelope;
+class AliMUONGeometryEnvelopeStore;
+class AliMUONGeometryDetElement;
+class AliMUONStringIntMap;
+
class TGeoTranslation;
class TGeoRotation;
class TGeoCombiTrans;
class TObjArray;
class TArrayI;
-class AliMUONGeometryEnvelope;
-class AliMUONGeometryEnvelopeStore;
-class AliMUONGeometryDetElement;
-class AliMUONGeometryStore;
-class AliMUONGeometrySVMap;
-class AliMUONVGeometryDEIndexing;
-
class AliMUONGeometryModule : public TObject
{
public:
AliMUONGeometryModule();
virtual ~AliMUONGeometryModule();
- // methods
- void Global2Local(Int_t detElemId,
- Float_t xg, Float_t yg, Float_t zg,
- Float_t& xl, Float_t& yl, Float_t& zl) const;
- void Global2Local(Int_t detElemId,
- Double_t xg, Double_t yg, Double_t zg,
- Double_t& xl, Double_t& yl, Double_t& zl) const;
-
- void Local2Global(Int_t detElemId,
- Float_t xl, Float_t yl, Float_t zl,
- Float_t& xg, Float_t& yg, Float_t& zg) const;
- void Local2Global(Int_t detElemId,
- Double_t xl, Double_t yl, Double_t zl,
- Double_t& xg, Double_t& yg, Double_t& zg) const;
-
// set methods
- void SetMotherVolume(const TString& motherVolumeName);
- void SetTranslation(const TGeoTranslation& translation);
- void SetRotation(const TGeoRotation& rotation);
+ //
+ void SetTransformation(const TGeoCombiTrans& transform);
+ void SetVolumePath(const TString& volumePath);
+ void SetIsVirtual(Bool_t isVirtual);
void SetSensitiveVolume(Int_t volId);
void SetSensitiveVolume(const TString& name);
void SetAlign(Bool_t align);
// get methods
- Int_t GetModuleId() const;
- TString GetMotherVolume() const;
- const TGeoCombiTrans* GetTransformation() const;
+ //
+ Bool_t IsVirtual() const;
+ Int_t GetModuleId() const;
+ TString GetVolumePath() const;
+
AliMUONGeometryDetElement* FindBySensitiveVolume(
const TString& volumePath) const;
- AliMUONVGeometryDEIndexing* GetDEIndexing() const;
- AliMUONGeometryEnvelopeStore* GetEnvelopeStore() const;
- AliMUONGeometryStore* GetDetElementStore() const;
- AliMUONGeometryDetElement* GetDetElement(Int_t detElemId) const;
- AliMUONGeometrySVMap* GetSVMap() const;
Bool_t IsSensitiveVolume(Int_t volId) const;
Bool_t IsSensitiveVolume(const TString& volName) const;
+ AliMUONGeometryEnvelopeStore* GetEnvelopeStore() const;
+ AliMUONStringIntMap* GetSVMap() const;
+ AliMUONGeometryModuleTransformer* GetTransformer() const;
+
protected:
+ /// Not implemented
AliMUONGeometryModule(const AliMUONGeometryModule& rhs);
- // operators
+ /// Not implemented
AliMUONGeometryModule& operator = (const AliMUONGeometryModule& rhs);
private:
Int_t GetSVIndex(Int_t svVolId) const;
// data members
- Int_t fModuleId; // the module Id
- TString fMotherVolume; // mother volume name
- Int_t fNofSVs; // number of sensitive volumes
- TArrayI* fSVVolumeIds; // densitive volumes IDs
- TGeoCombiTrans* fTransformation;// the module transformation wrt to mother
- // volume
- AliMUONGeometryEnvelopeStore* fEnvelopes; // envelopes
- AliMUONVGeometryDEIndexing* fDEIndexing; // DE indexing
- AliMUONGeometryStore* fDetElements;// detection elements
- AliMUONGeometrySVMap* fSVMap; // sensitive volumes map
+ Bool_t fIsVirtual; ///< \brief true if module is not represented
+ /// by a real volume
+ Int_t fNofSVs; ///< number of sensitive volumes
+ TArrayI* fSVVolumeIds; ///< sensitive volumes IDs
+
+ AliMUONGeometryEnvelopeStore* fEnvelopes; ///< envelopes
+ AliMUONStringIntMap* fSVMap; ///< sensitive volumes map
+ AliMUONGeometryModuleTransformer* fTransformer;///< geometry transformations
- ClassDef(AliMUONGeometryModule,2) // MUON geometry module class
+ ClassDef(AliMUONGeometryModule,4) // MUON geometry module class
};
// inline functions
-inline void
-AliMUONGeometryModule::SetMotherVolume(const TString& motherVolumeName)
-{ fMotherVolume = motherVolumeName; }
+/// Set virtuality (true if module is not represented by a real volume)
+inline void AliMUONGeometryModule::SetIsVirtual(Bool_t isVirtual)
+{ fIsVirtual = isVirtual; }
-inline Int_t AliMUONGeometryModule::GetModuleId() const
-{ return fModuleId; }
+/// Return true if module is not represented by a real volume
+inline Bool_t AliMUONGeometryModule::IsVirtual() const
+{ return fIsVirtual; }
-inline TString AliMUONGeometryModule::GetMotherVolume() const
-{ return fMotherVolume; }
+/// Return module ID
+inline Int_t AliMUONGeometryModule::GetModuleId() const
+{ return fTransformer->GetModuleId(); }
-inline const TGeoCombiTrans* AliMUONGeometryModule::GetTransformation() const
-{ return fTransformation; }
+/// Return the full path of aligned module volume or envelope in geometry
+inline TString AliMUONGeometryModule::GetVolumePath() const
+{ return fTransformer->GetVolumePath(); }
-inline AliMUONGeometryEnvelopeStore*
-AliMUONGeometryModule::GetEnvelopeStore() const
+/// Return envelopes associated with this module
+inline
+AliMUONGeometryEnvelopeStore* AliMUONGeometryModule::GetEnvelopeStore() const
{ return fEnvelopes; }
-inline AliMUONVGeometryDEIndexing*
-AliMUONGeometryModule::GetDEIndexing() const
-{ return fDEIndexing; }
-
-inline AliMUONGeometryStore* AliMUONGeometryModule::GetDetElementStore() const
-{ return fDetElements; }
-
-inline AliMUONGeometrySVMap* AliMUONGeometryModule::GetSVMap() const
+/// Return sensitive volume map
+inline
+AliMUONStringIntMap* AliMUONGeometryModule::GetSVMap() const
{ return fSVMap; }
-#endif //ALI_MUON_MODULE_GEOMETRY_H
+/// Return transformer
+inline
+AliMUONGeometryModuleTransformer* AliMUONGeometryModule::GetTransformer() const
+{ return fTransformer; }
+
+#endif //ALI_MUON_GEOMETRY_MODULE_H