]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONGeometryModule.h
Fixes for #86059: Install data when ALICE_ROOT does not point to source (Christian)
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryModule.h
index 5dda9805bf6e564ba5126af8e8dc387c38a8e552..dce48e7ce24945d9b07665703f9f22b96f4d9659 100644 (file)
@@ -4,34 +4,35 @@
 /* $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:
@@ -39,50 +40,35 @@ class AliMUONGeometryModule : public TObject
     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  SetVolume(const TString& volumeName);
-    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
-    Bool_t                 IsVirtual() const;  
-    Int_t                  GetModuleId() const;
-    TString                GetMotherVolume() const;
-    TString                GetVolume() 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:
@@ -90,56 +76,49 @@ class AliMUONGeometryModule : public TObject
     Int_t  GetSVIndex(Int_t svVolId) const; 
   
     // data members
-    Bool_t           fIsVirtual;     // true if module is not represented
-                                     // by a real volume
-    Int_t            fModuleId;      // the module Id
-    TString          fMotherVolume;  // mother volume name
-    TString          fVolume;        // the volume name if not virtual
-    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; }
 
+/// Return true if module is not represented by a real volume
 inline Bool_t AliMUONGeometryModule::IsVirtual() const
 { return fIsVirtual; }  
 
+/// Return module ID
 inline Int_t  AliMUONGeometryModule::GetModuleId() const
-{ return fModuleId; }
-
-inline TString  AliMUONGeometryModule::GetMotherVolume() const
-{ return fMotherVolume; }
+{ return fTransformer->GetModuleId(); }
 
-inline TString  AliMUONGeometryModule::GetVolume() const
-{ return fVolume; }
+/// Return the full path of aligned module volume or envelope in geometry
+inline TString AliMUONGeometryModule::GetVolumePath() const
+{ return fTransformer->GetVolumePath(); }
 
-inline const TGeoCombiTrans* AliMUONGeometryModule::GetTransformation() const 
-{ return fTransformation; }
-
-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