]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONGeometrySegmentation.h
From Laurent:
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometrySegmentation.h
index ff8bad16b88bea92ad635bc6e66f9aa22d6e40c0..819b34e33ae6c3e05ac79407d718c4bfb5fc970d 100644 (file)
 
 #include <TObject.h>
 
+#include "AliMUONGeometryDirection.h"
+
 class TObjArray;
 class TF1;
 
-class AliSegmentation;
-
 class AliMUONGeometryModule;
 class AliMUONGeometryStore;
 class AliMUONGeometryDetElement;
+class AliMUONVGeometryDESegmentation;
+class AliMUONSegmentManuIndex;
 
 class AliMUONGeometrySegmentation : public TObject
 {
@@ -34,7 +36,16 @@ class AliMUONGeometrySegmentation : public TObject
     virtual ~AliMUONGeometrySegmentation();
 
     // methods
-    void Add(Int_t detElemId, AliSegmentation* segmentation);  
+    void Add(Int_t detElemId, 
+             AliMUONVGeometryDESegmentation* segmentation); 
+    // get methods
+    AliMUONGeometryModule* GetGeometry() const;              
+    virtual const AliMUONVGeometryDESegmentation* GetDESegmentation(Int_t detElemId) const;
+                       // DE segmentation
+    virtual AliMUONGeometryDirection GetDirection(Int_t detElemId) const;
+                       // Direction with a constant pad size  
+                      // (Direction or coordinate where the resolution is the best)
     
     //    
     // redefined methods from AliSegmentation interface
@@ -51,15 +62,22 @@ class AliMUONGeometrySegmentation : public TObject
     //
     virtual Float_t GetAnod(Int_t detElemId, Float_t xlhit) const;
                        // Anode wire coordinate closest to xhit
-    virtual void  GetPadI(Int_t detElemId,
+    virtual Bool_t  GetPadI(Int_t detElemId,
                           Float_t xg, Float_t yg, Float_t  zg, 
                           Int_t& ix, Int_t& iy);
                        // Transform from pad to real coordinates
-    virtual void  GetPadC(Int_t detElemId,
+    virtual Bool_t  GetPadC(Int_t detElemId,
                           Int_t ix, Int_t iy,
                           Float_t& x, Float_t& y, Float_t& z);
                        // Transform from real to pad coordinates
 
+    virtual Bool_t HasPad(Int_t detElemId, Int_t ix, Int_t iy);
+       
+                       // get pad for a given connection
+    virtual Bool_t     GetPadE(Int_t detElemId, Int_t &ix, Int_t &iy,  AliMUONSegmentManuIndex* connect);
+    virtual AliMUONSegmentManuIndex*     GetMpConnection(Int_t detElemId, Int_t ix, Int_t iy); 
+                       // get electronics connection for given pad
+
     // Initialisation
     //
     virtual void Init(Int_t chamber);
@@ -138,8 +156,8 @@ class AliMUONGeometrySegmentation : public TObject
     virtual void GiveTestPoints(Int_t detElemId,
                           Int_t& n, Float_t* xg, Float_t* yg) const;
                    // Test points for auto calibration
-    virtual void Draw(Int_t detElemId,
-                          const char *opt = "") const;
+    virtual void Draw(const char *opt = "");
+    virtual void Draw(Int_t detElemId, const char *opt = "");
                    // Draw the segmentation zones
 
     // Function for systematic corrections
@@ -149,7 +167,8 @@ class AliMUONGeometrySegmentation : public TObject
                    // Set the correction function
     virtual TF1* CorrFunc(Int_t detElemId, Int_t isec) const;
                    // Get the correction Function
+    virtual void Print(Option_t* ="") const;
+       
   protected:
     AliMUONGeometrySegmentation(const AliMUONGeometrySegmentation& rhs);
   
@@ -158,18 +177,23 @@ class AliMUONGeometrySegmentation : public TObject
 
   private:
     // methods
-    Bool_t Notify(Int_t detElemId) const;
+    Bool_t OwnNotify(Int_t detElemId) const;
   
     // data members
-    mutable  Int_t            fCurrentDetElemId;  
-    mutable  AliMUONGeometryDetElement* fCurrentDetElement;  
-    mutable  AliSegmentation* fCurrentSegmentation;
+    mutable  Int_t                           fCurrentDetElemId;  
+    mutable  AliMUONGeometryDetElement*      fCurrentDetElement;  
+    mutable  AliMUONVGeometryDESegmentation* fCurrentSegmentation;
     AliMUONGeometryModule*    fGeometryModule;
     AliMUONGeometryStore*     fDESegmentations;
  
-   ClassDef(AliMUONGeometrySegmentation,1) // Station1 segmentation
+   ClassDef(AliMUONGeometrySegmentation,2) // Geometry segmentation
 };
 
+// inline functions
+
+inline AliMUONGeometryModule* AliMUONGeometrySegmentation::GetGeometry() const
+{ return fGeometryModule; }          
+
 #endif //ALI_MUON_GEOMETRY_SEGMENTATION_H