]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Change a comment, and a tiny optimisation (Laurent)
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Feb 2007 14:24:34 +0000 (14:24 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Feb 2007 14:24:34 +0000 (14:24 +0000)
MUON/mapping/AliMpSlat.cxx
MUON/mapping/AliMpSlat.h

index 1cfc47465fdf2c9b316fa692a5cb95c4bde927f8..e42793d1ff99547591e62e8b96b0d9725f2c666d 100644 (file)
@@ -295,11 +295,17 @@ AliMpSlat::FindPCB(Double_t x, Double_t y) const
   for ( Size_t i = 0; i < GetSize(); ++i ) 
        {
                AliMpPCB* pcb = GetPCB(i);
-               if ( x >= pcb->Xmin() && x < pcb->Xmax() &&
-                                y >= pcb->Ymin() && y < pcb->Ymax() )
-               {
-                       return pcb;
-               }
+//             if ( x >= pcb->Xmin() && x < pcb->Xmax() &&
+//                              y >= pcb->Ymin() && y < pcb->Ymax() )
+//             {
+//                     return pcb;
+//             }
+    if ( x < pcb->Xmin() || x >= pcb->Xmax() ||
+         y < pcb->Ymin() || y >= pcb->Ymax() )
+    {
+      continue;
+    }
+    return pcb;
        }
   return 0;
 }
index 254dd98cfbd4b2faf663f5d4bce414bc456d5907..9f2c8128c0d68add9686807bc22ef33a7da6274e 100644 (file)
@@ -86,11 +86,7 @@ class AliMpSlat : public TObject
   /// Find the PCB containing location (x,y).
   AliMpPCB* FindPCB(Double_t x, Double_t y) const;
 
-       /** Find the index of the PCB containing the pad at location (x,y).
-   Should not be needed except to comply with Sector(), Dpx(), Dpy()
-        interface of old AliMUONVGeometrySegmentation.
-        FIXME: Remove me when VGeometrySegmentation dies at last.
-        */
+       /// Find the index of the PCB containing the pad at location (x,y).
        Int_t FindPCBIndex(Double_t x, Double_t y) const;
 
   /// Returns the i-th PCB of this slat.