]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONGeometryDetElement.h
Bug fixes (some outliers in central events) (from Redmer)
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryDetElement.h
index 0272f9d63e301a40f9fb079c7aea3a0381b29a79..6b07be1a53b5f1999d87b37527df0bae138bb39e 100644 (file)
@@ -2,29 +2,33 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-//
-// Class AliMUONGeometryDetElement
-// --------------------------------
-// The class defines the detection element.
-//
-// Author: Ivana Hrivnacova, IPN Orsay
+
+/// \ingroup geometry
+/// \class AliMUONGeometryDetElement
+/// \brief Class for storing detection element transformations 
+///
+/// \author Ivana Hrivnacova, IPN Orsay
 
 #ifndef ALI_MUON_GEOMETRY_DET_ELEMENT_H
 #define ALI_MUON_GEOMETRY_DET_ELEMENT_H
 
 #include <TObject.h>
+#include <TString.h>
 
-class TGeoCombiTrans;
+class TGeoHMatrix;
 
 class AliMUONGeometryDetElement : public TObject
 {
   public:
-    AliMUONGeometryDetElement(Int_t detElemId,
-                              const TString& alignedVolume, 
-                             const TGeoCombiTrans& relTransform);
-    AliMUONGeometryDetElement();
+    AliMUONGeometryDetElement(Int_t detElemId);
+    AliMUONGeometryDetElement(Int_t detElemId, const TString& volumePath);
+    AliMUONGeometryDetElement(TRootIOCtor* /*ioCtor*/);
     virtual ~AliMUONGeometryDetElement();
 
+    // static methods
+    static const TString& GetDENamePrefix();
+    static TString GetDEName(Int_t detElemId);
+
     // methods
     void Global2Local(
                  Float_t xg, Float_t yg, Float_t zg, 
@@ -43,46 +47,66 @@ class AliMUONGeometryDetElement : public TObject
     void PrintGlobalTransform() const;
 
     // set methods
-    void SetGlobalTransformation(const TGeoCombiTrans& transform);
+    void SetLocalTransformation(const TGeoHMatrix& transform, Bool_t warn = true);
+    void SetGlobalTransformation(const TGeoHMatrix& transform, Bool_t warn = true);
+    void SetVolumePath(const TString& volumePath);
     
     // get methods
-    Int_t  GetId() const;
-    const TString&        GetAlignedVolume() const;
-    const TGeoCombiTrans* GetLocalTransformation() const;
-    const TGeoCombiTrans* GetGlobalTransformation() const;
+    Int_t    GetId() const;
+    TString  GetDEName() const;
+    TString  GetVolumePath() const;
+    TString  GetVolumeName() const;
+    Int_t    GetVolumeCopyNo() const;
+    const TGeoHMatrix*  GetLocalTransformation() const;
+    const TGeoHMatrix*  GetGlobalTransformation() const;
 
   protected:
+    /// Not implemented
+    AliMUONGeometryDetElement();
+    /// Not implemented
     AliMUONGeometryDetElement(const AliMUONGeometryDetElement& rhs);
-
-    // operators  
+    /// Not implemented
     AliMUONGeometryDetElement& operator = (const AliMUONGeometryDetElement& rhs);
   
   private:
     // methods
-    void PrintTransform(const TGeoCombiTrans* transform) const;
-  
+    void PrintTransform(const TGeoHMatrix* transform) const;
     // data members
-    TString          fAlignedVolume; // the name of aligned volume or envelope
-                                      // representing this detection element
-    TGeoCombiTrans*  fLocalTransformation;  // the transformation wrt module
-    TGeoCombiTrans*  fGlobalTransformation; // the transformation wrt world
+    TString       fDEName;     ///< detection element name
+    TString       fVolumePath; ///< \brief the full path of aligned volume
+                               ///  or envelope in geometry
+    TGeoHMatrix*  fLocalTransformation;  ///< the transformation wrt module
+    TGeoHMatrix*  fGlobalTransformation; ///< the transformation wrt world
 
-  ClassDef(AliMUONGeometryDetElement,1) // MUON transformations store
+  ClassDef(AliMUONGeometryDetElement,2) // MUON det element transformations
 };
 
 // inline functions
 
+/// Set the full path of the aligned volume or envelope in geometry
+inline void AliMUONGeometryDetElement::SetVolumePath(const TString& volumePath)
+{ fVolumePath = volumePath; }
+
+/// Return detection element ID
 inline Int_t AliMUONGeometryDetElement::GetId() const
 { return GetUniqueID(); }
 
-inline const TString& AliMUONGeometryDetElement::GetAlignedVolume() const
-{ return fAlignedVolume; }
+/// Return detection element ID
+inline TString AliMUONGeometryDetElement::GetDEName() const
+{ return fDEName; }
+
+/// Return the full path of the aligned volume or envelope in geometry
+inline TString AliMUONGeometryDetElement::GetVolumePath() const
+{ return fVolumePath; }
 
-inline const TGeoCombiTrans* 
+/// Return the detection element transformation wrt module
+inline const TGeoHMatrix* 
 AliMUONGeometryDetElement::GetLocalTransformation() const
 { return fLocalTransformation; }
 
-inline const TGeoCombiTrans* 
+/// Return the detection element transformation wrt world
+inline const TGeoHMatrix* 
 AliMUONGeometryDetElement::GetGlobalTransformation() const
 { return fGlobalTransformation; }