]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing a problem due the fact that MaxPadIndexX might be different
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 21 Oct 2005 10:02:54 +0000 (10:02 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 21 Oct 2005 10:02:54 +0000 (10:02 +0000)
from NofOfPads-1
(Laurent)

MUON/mapping/AliMpSlat.cxx
MUON/mapping/AliMpSlat.h
MUON/mapping/AliMpSlatSegmentation.cxx

index 2b82d57ae86c60b24149e2ecb8781bc50106d8aa..d21b81fde0f86718a0d844130f9e73289650b1fb 100644 (file)
@@ -347,6 +347,18 @@ AliMpSlat::GetMaxNofPadsY() const
   return fMaxNofPadsY;
 }
 
+//_____________________________________________________________________________
+Int_t 
+AliMpSlat::GetMaxPadIndexX() const
+{
+  AliMpPCB* last = GetPCB(GetSize()-1);
+  if (last)
+  {
+    return last->Ixmax();
+  }
+  return 0;
+}
+
 //_____________________________________________________________________________
 const char*
 AliMpSlat::GetName() const
index d9b11a8725bea587da540360062c9861a2610ea9..bccd6bf53583abf20a81ce16f81d3faf1bd563cd 100644 (file)
@@ -114,6 +114,11 @@ class AliMpSlat : public TObject
     */
   Int_t GetMaxNofPadsY() const;
   
+  /** Returns the max index useable in x-direction. 
+    Note that this can be different from GetNofPadsX()-1 for rounded slats.
+    */
+  Int_t GetMaxPadIndexX() const;
+  
   /// Return the number of electronic cards (either manu or local board).
   Int_t GetNofElectronicCards() const;
   
index 2b079f89dbc3bfb3fa5a9c68ef499abee47ac968..a03a65590cd9371d161432b993815fb5bec6aaa1 100644 (file)
@@ -57,7 +57,7 @@ AliMpSlatSegmentation::~AliMpSlatSegmentation()
   //
   // Dtor (empty).
   //
-  // Int_t i(0);//just to be able to put a breakpoint in gdb
+  Int_t i(0);//just to be able to put a breakpoint in gdb
   AliDebug(1,Form("this=%p",this));                    
 }
 
@@ -105,7 +105,7 @@ AliMpSlatSegmentation::MaxPadIndexX()
   // Returns the value of the largest pad index in x-direction.
   //
   
-  return fkSlat->GetNofPadsX()-1;
+  return fkSlat->GetMaxPadIndexX();
 }
 
 //_____________________________________________________________________________