]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fix in Area() method (Sasha)
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 18 Oct 2007 10:58:59 +0000 (10:58 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 18 Oct 2007 10:58:59 +0000 (10:58 +0000)
MUON/AliMUONCluster.cxx

index 68654dffbf48e417b905724596da0cce38f5be76..4df1d8cd695655d3a1c102306e3625affdd4c37a 100644 (file)
@@ -290,15 +290,18 @@ AliMUONCluster::Area(Int_t cathode) const
   TVector2 lowerLeft(1E9,1E9);
   TVector2 upperRight(-1E9,-1E9);
   
-  for ( Int_t i = 0; i < Multiplicity(cathode); ++i )
+  for ( Int_t i = 0; i < Multiplicity(); ++i )
   {
     AliMUONPad* pad = Pad(i);
-    TVector2 ll = pad->Position() - pad->Dimensions();
-    TVector2 ur = pad->Position() + pad->Dimensions();
-    lowerLeft.Set( TMath::Min(ll.X(),lowerLeft.X()),
-                   TMath::Min(ll.Y(),lowerLeft.Y()) );
-    upperRight.Set( TMath::Max(ur.X(),upperRight.X()),
-                    TMath::Max(ur.Y(),upperRight.Y()) );
+    if ( pad->Cathode() == cathode ) 
+    {
+      TVector2 ll = pad->Position() - pad->Dimensions();
+      TVector2 ur = pad->Position() + pad->Dimensions();
+      lowerLeft.Set( TMath::Min(ll.X(),lowerLeft.X()),
+                     TMath::Min(ll.Y(),lowerLeft.Y()) );
+      upperRight.Set( TMath::Max(ur.X(),upperRight.X()),
+                      TMath::Max(ur.Y(),upperRight.Y()) );
+    }
   }
   
   // then construct the area from those limits