]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpSector.h
Reordering includes, forward declarations from most specific to more
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpSector.h
index cb679661a3fbbf3b2e8abd33f4cc51a824619610..9ed69e7b0127a28c1fcf8f131200672367bb84cf 100755 (executable)
@@ -1,21 +1,35 @@
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
 // $Id$
-// Category: sector
-//
-// Class AliMpSector
-// -----------------
-// Class describing the sector of the MUON chamber of station 1.
-//
-// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+// $MpId: AliMpSector.h,v 1.12 2006/03/17 11:38:28 ivana Exp $
+
+/// \ingroup sector
+/// \class AliMpSector
+/// \brief A sector (quadrant) of the MUON chamber of stations 1 and 2.
+///
+/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
 
 #ifndef ALI_MP_SECTOR_H
 #define ALI_MP_SECTOR_H
 
-#include <TObject.h>
+#include <TNamed.h>
+
+#include "AliMpContainers.h"
+
+#include "AliMpDirection.h"
+#include "AliMpPlaneType.h"
+#include "AliMpIntPair.h"
+
 #include <TString.h>
 #include <TVector2.h>
+#ifdef WITH_ROOT
+#include <TObjArray.h>
+#endif
 
-#include "AliMpSectorTypes.h"
-#include "AliMpDirection.h"
+#ifdef WITH_STL
+#include <vector>
+#endif
 
 class AliMpZone;
 class AliMpRow;
@@ -24,11 +38,23 @@ class AliMpVMotif;
 class AliMpVPadIterator;
 class AliMpMotifMap;
 
-class AliMpSector : public TObject
+class TArrayI;
+
+class AliMpSector : public TNamed
 {
+  public:
+#ifdef WITH_STL
+    typedef std::vector<AliMpRow*> RowVector;
+    typedef std::vector<AliMpZone*> ZoneVector;
+#endif
+#ifdef WITH_ROOT
+    typedef TObjArray  RowVector;
+    typedef TObjArray  ZoneVector;
+#endif
+
   public:
     AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
-                AliMpDirection direction);
+                AliMpDirection direction, const TVector2& offset);
     AliMpSector();
     virtual ~AliMpSector();
   
@@ -53,15 +79,32 @@ class AliMpSector : public TObject
     TVector2  Position() const;
     TVector2  Dimensions() const;
    
+    //
     // get methods
+
     Int_t       GetNofZones() const;
     AliMpZone*  GetZone(Int_t i) const;    
+
     Int_t       GetNofRows() const;
     AliMpRow*   GetRow(Int_t i) const;
+
     AliMpDirection  GetDirection() const;  
+    AliMpPlaneType  GetPlaneType() const;  
+
     TVector2        GetMinPadDimensions() const;
+    AliMpIntPair    GetMaxPadIndices() const;
+    Int_t           GetNofPads() const;
+
     AliMpMotifMap*  GetMotifMap() const;
+    void            GetAllMotifPositionsIDs(TArrayI& ecn) const;
+    
+    virtual void Print(Option_t* opt="") const;
     
+    
+  protected:
+    AliMpSector(const AliMpSector& right);
+    AliMpSector&  operator = (const AliMpSector& right);
+
   private:
     // methods
     AliMpVRowSegment* FindRowSegment(const TVector2& position) const;
@@ -69,6 +112,8 @@ class AliMpSector : public TObject
     void SetMotifPositions();
     void SetGlobalIndices();
     void SetMinPadDimensions();
+    void SetMaxPadIndices();
+    void SetNofPads();
 
     // data members        
     TString    fID;       // sector ID
@@ -78,6 +123,9 @@ class AliMpSector : public TObject
     AliMpMotifMap* fMotifMap; // motif map
     AliMpDirection fDirection;// the direction of constant pad size
     TVector2       fMinPadDimensions; // minimal pad dimensions
+    AliMpIntPair   fMaxPadIndices;    // maximum pad indices    
+    Int_t          fNofPads;     //  total number of pads
+
 
   ClassDef(AliMpSector,1)  //Sector
 };
@@ -90,6 +138,12 @@ inline AliMpDirection AliMpSector::GetDirection() const
 inline TVector2   AliMpSector::GetMinPadDimensions() const
 { return fMinPadDimensions; }
 
+inline AliMpIntPair  AliMpSector::GetMaxPadIndices() const
+{ return fMaxPadIndices; }
+
+inline Int_t  AliMpSector::GetNofPads() const
+{ return fNofPads; }
+
 inline AliMpMotifMap* AliMpSector::GetMotifMap() const 
 { return fMotifMap; }