]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONPad.cxx
bug fixed
[u/mrichter/AliRoot.git] / MUON / AliMUONPad.cxx
index 872519481fcaaf59629361a6ef5c54fba8a3f13f..d92d9758acad1b4d0183eb6e445809b6a044bd93 100644 (file)
@@ -26,6 +26,7 @@
 #include "TVector2.h"
 #include "TMath.h"
 
+//-----------------------------------------------------------------------------
 /// \class AliMUONPad
 ///
 /// Object gathering information about a hit pad.
@@ -37,6 +38,7 @@
 /// get neighboring information.
 ///
 /// \author Laurent Aphecetche
+//-----------------------------------------------------------------------------
 
 /// \cond CLASSIMP
 ClassImp(AliMUONPad)
@@ -54,8 +56,8 @@ namespace
     Double_t xmax = TMath::Min(a.RightBorder(),b.RightBorder());
     Double_t ymin = TMath::Max(a.DownBorder(),b.DownBorder());
     Double_t ymax = TMath::Min(a.UpBorder(),b.UpBorder());
-    AliMpArea c( TVector2( (xmin+xmax)/2.0, (ymin+ymax)/2.0 ),
-                 TVector2( (xmax-xmin)/2.0, (ymax-ymin)/2.0 ) );
+    AliMpArea c( (xmin+xmax)/2.0, (ymin+ymax)/2.0 ,
+                 (xmax-xmin)/2.0, (ymax-ymin)/2.0 );
        
     return c;
   }
@@ -70,7 +72,6 @@ fIsReal(kFALSE),
 fClusterId(-1),
 fCathode(-1),
 fDetElemId(-1),
-fDigitIndex(-1),
 fIx(-1),
 fIy(-1),
 fStatus(0),
@@ -94,7 +95,6 @@ fIsReal(kFALSE),
 fClusterId(-1),
 fCathode(-1),
 fDetElemId(-1),
-fDigitIndex(-1),
 fIx(-1),
 fIy(-1),
 fStatus(0),
@@ -117,7 +117,6 @@ fIsReal(kFALSE),
 fClusterId(-1),
 fCathode(-1),
 fDetElemId(-1),
-fDigitIndex(-1),
 fIx(-1),
 fIy(-1),
 fStatus(0),
@@ -139,7 +138,6 @@ fIsReal(kFALSE),
 fClusterId(-1),
 fCathode(-1),
 fDetElemId(-1),
-fDigitIndex(-1),
 fIx(-1),
 fIy(-1),
 fStatus(0),
@@ -195,8 +193,8 @@ AliMUONPad::AreOverlapping(const AliMUONPad& d1, const AliMUONPad& d2,
   ///   what we call an overlap, e.g. to consider 2 pads touching only by their
   ///   corners to be overlapping.
   
-  AliMpArea a1(d1.Position(),d1.Dimensions());
-  AliMpArea a2(d2.Position(),d2.Dimensions());
+  AliMpArea a1(d1.X(),d1.Y(),d1.DX(),d1.DY());
+  AliMpArea a2(d2.X(),d2.Y(),d2.DX(),d2.DY());
   
   if ( a1.LeftBorder() > a2.RightBorder() - precision.X() ||
        a1.RightBorder() < a2.LeftBorder() + precision.X() )
@@ -385,7 +383,6 @@ AliMUONPad::Init(Int_t detElemId, Int_t cathode,
   fChargeBackup = fCharge;
   
   fClusterId = -1;
-  fDigitIndex = -1;
 
   fStatus = 0;
 }
@@ -395,8 +392,8 @@ AliMpArea
 AliMUONPad::Overlap(const AliMUONPad& d1, const AliMUONPad& d2)
 {  
   /// Return the overlap region between two pads
-  AliMpArea a1(d1.Position(),d1.Dimensions());
-  AliMpArea a2(d2.Position(),d2.Dimensions());
+  AliMpArea a1(d1.X(),d1.Y(),d1.DX(),d1.DY());
+  AliMpArea a2(d2.X(),d2.Y(),d2.DX(),d2.DY());
   return Intersect(a1,a2);
 }