]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- Added new method NofPads()
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Mar 2006 09:53:03 +0000 (09:53 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Mar 2006 09:53:03 +0000 (09:53 +0000)
- Methods MaxPadIndexX,Y() changed to constant

MUON/mapping/AliMpSectorSegmentation.cxx
MUON/mapping/AliMpSectorSegmentation.h
MUON/mapping/AliMpVSegmentation.h

index 3bf2876d8e2790170bb1981567d68d94e7d27d66..db4645a02c95557c7c45fc75f92c40db1f65af0b 100755 (executable)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 // $Id$
-// $MpId: AliMpSectorSegmentation.cxx,v 1.11 2006/03/02 16:35:12 ivana Exp $
+// $MpId: AliMpSectorSegmentation.cxx,v 1.12 2006/03/14 09:03:52 ivana Exp $
 // Category: sector
 //
 // Class AliMpSectorSegmentation
@@ -372,7 +372,7 @@ AliMpSectorSegmentation::Dimensions() const
 AliMpPlaneType
 AliMpSectorSegmentation::PlaneType() const
 {
-  return GetSector()->PlaneType();
+  return GetSector()->GetPlaneType();
 }
 
 //______________________________________________________________________________
@@ -507,31 +507,27 @@ AliMpSectorSegmentation::PadByDirection(const TVector2& startPosition,
 }
 
 //______________________________________________________________________________
-Int_t  AliMpSectorSegmentation::MaxPadIndexX()
+Int_t  AliMpSectorSegmentation::MaxPadIndexX() const
 {
 /// Return maximum pad index in x
 
-  if (fMaxIndexInX) return fMaxIndexInX;
-  
-  for (Int_t i=0; i<fkSector->GetNofRows(); i++) {
-    Int_t ixh = fkSector->GetRow(i)->GetHighIndicesLimit().GetFirst();
-    if ( ixh > fMaxIndexInX ) fMaxIndexInX = ixh;
-  }  
-  return fMaxIndexInX;
+  return fkSector->GetMaxPadIndices().GetFirst();
 }
 
 //______________________________________________________________________________
-Int_t  AliMpSectorSegmentation::MaxPadIndexY()
+Int_t  AliMpSectorSegmentation::MaxPadIndexY() const
 {
 /// Return maximum pad index in y
 
-  if (fMaxIndexInY) return fMaxIndexInY;
-  
-  for (Int_t i=0; i<fkSector->GetNofRows(); i++) {
-    Int_t iyh = fkSector->GetRow(i)->GetHighIndicesLimit().GetSecond();
-    if ( iyh > fMaxIndexInY ) fMaxIndexInY = iyh;
-  }  
-  return fMaxIndexInY;
+  return fkSector->GetMaxPadIndices().GetSecond();
+}
+
+//______________________________________________________________________________
+Int_t  AliMpSectorSegmentation::NofPads() const
+{
+/// Return number of pads defined in the sector
+
+  return fkSector->GetNofPads();
 }
 
 //______________________________________________________________________________
index 1d2246ee10ef468856ad929837d6eeacf4b5ad3a..98ee1d6e57287b9870d3e4d8305f91e608850ec9 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpSectorSegmentation.h,v 1.11 2006/03/02 16:35:06 ivana Exp $
+// $MpId: AliMpSectorSegmentation.h,v 1.12 2006/03/14 09:03:48 ivana Exp $
 
 /// \ingroup sector
 /// \class AliMpSectorSegmentation
@@ -71,8 +71,9 @@ class AliMpSectorSegmentation : public AliMpVSegmentation
     virtual AliMpPad PadByDirection(const TVector2& startPosition, 
                                Double_t distance) const;
  
-    virtual Int_t  MaxPadIndexX();
-    virtual Int_t  MaxPadIndexY();
+    virtual Int_t  MaxPadIndexX() const;
+    virtual Int_t  MaxPadIndexY() const;
+    virtual Int_t  NofPads() const;
 
     virtual Int_t    Zone(const AliMpPad& pad, Bool_t warning = kTRUE) const;
     virtual TVector2 PadDimensions(Int_t zone, Bool_t warning = kTRUE) const;
index 07a6cc7f0248f0c21ee95878f9390d3c4bb258a2..8a978aacc9b08488cf3eedba5bbb0ebc88cb7d06 100644 (file)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpVSegmentation.h,v 1.8 2006/03/02 16:29:11 ivana Exp $
+// $MpId: AliMpVSegmentation.h,v 1.9 2006/03/14 09:03:44 ivana Exp $
 
 /// \ingroup basic
 /// \class AliMpVSegmentation
@@ -52,8 +52,9 @@ class AliMpVSegmentation : public TObject
     virtual AliMpPadPair PadsLeft(const AliMpPad& pad) const;
     virtual AliMpPadPair PadsRight(const AliMpPad& pad) const;
 
-    virtual Int_t  MaxPadIndexX() = 0;
-    virtual Int_t  MaxPadIndexY() = 0;
+    virtual Int_t  MaxPadIndexX() const = 0;
+    virtual Int_t  MaxPadIndexY() const = 0;
+    virtual Int_t  NofPads() const = 0;
 
     virtual Bool_t HasPad(const AliMpIntPair& indices) const = 0;