]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpSectorAreaHPadIterator.cxx
In Print(): added an option to print area borders
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpSectorAreaHPadIterator.cxx
index 365e5b013461f2254fa5db17da07b5cdf19f52f6..0889c802b0b62bb922176cd4c017b671685ef43a 100755 (executable)
 // $Id$
 // $MpId: AliMpSectorAreaHPadIterator.cxx,v 1.7 2006/05/24 13:58:46 ivana Exp $
 // Category: sector
-//
+
+//-----------------------------------------------------------------------------
 // Class AliMpSectorAreaHPadIterator
 // ---------------------------------
 // Class, which defines an iterator over the pads 
 // inside a given area in a sector in horizontal direction.
 // Included in AliRoot: 2003/05/02
 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+//-----------------------------------------------------------------------------
 
 #include "AliMpSectorAreaHPadIterator.h"
 #include "AliMpSectorSegmentation.h"
@@ -119,12 +121,12 @@ void AliMpSectorAreaHPadIterator::MoveUp()
 {
 /// Increase the current row position and searches the first valid pad.
 
-  Double_t step = 2.* fkSegmentation->GetMinPadDimensions().Y();
+  Double_t dy = fkSegmentation->GetMinPadDimensions().Y();
 
   while ( !fCurrentPad.IsValid() && 
-          fCurrentRowPosition + step < fkArea.UpBorder())
+          fCurrentRowPosition + dy < fkArea.UpBorder())
   {
-    fCurrentRowPosition += step;
+    fCurrentRowPosition += 2.*dy;
     TVector2 position = TVector2(fkArea.LeftBorder(), fCurrentRowPosition);
     
     fCurrentPad = fkSegmentation->PadByDirection(position, fkArea.RightBorder());
@@ -150,7 +152,7 @@ void AliMpSectorAreaHPadIterator::First()
   //
   fCurrentRowPosition = fkArea.DownBorder();
   TVector2 position(fkArea.LeftDownCorner()); 
-  
+
   fCurrentPad = fkSegmentation->PadByDirection(position, fkArea.RightBorder());
 
   MoveUp();