]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONClusterFinderCOG.cxx
Removing a comma that gcc 3.4 does not like ;-)
[u/mrichter/AliRoot.git] / MUON / AliMUONClusterFinderCOG.cxx
index 539693cfb29da3b2a2a477c6cf71350d56207e32..274fcac294a928be46ef87c4e935e43acfe363f2 100644 (file)
@@ -25,6 +25,7 @@
 #include "TVector2.h"
 #include "AliMUONVDigitStore.h"
 
+//-----------------------------------------------------------------------------
 /// \class AliMUONClusterFinderCOG
 ///
 /// A very basic (and mostly useless, probably) cluster finder.
@@ -37,6 +38,7 @@
 /// direction with the better resolution.
 ///
 /// \author Laurent Aphecetche
+//-----------------------------------------------------------------------------
 
 /// \cond CLASSIMP
 ClassImp(AliMUONClusterFinderCOG)
@@ -59,31 +61,13 @@ AliMUONClusterFinderCOG::~AliMUONClusterFinderCOG()
 
 //_____________________________________________________________________________
 Bool_t 
-AliMUONClusterFinderCOG::Prepare(const AliMpVSegmentation* segmentations[2],
-                                 const AliMUONVDigitStore& digitStore)
+AliMUONClusterFinderCOG::Prepare(Int_t detElemId,
+                                 TClonesArray* pads[2],
+                                 const AliMpArea& area)
 {
   /// Prepare for clustering
   
-  // Find out the DetElemId
-  Int_t detElemId(-1);
-  
-  TIter next(digitStore.CreateIterator());
-  AliMUONVDigit* d;
-
-  d = static_cast<AliMUONVDigit*>(next());
-
-  if (d)
-  {
-    detElemId = d->DetElemId();
-  }
-  
-  if ( detElemId < 0 )
-  {
-    AliWarning("Could not find DE. Probably no digits at all ?");
-    return kFALSE;
-  }
-  
-  return fPreClusterFinder->Prepare(segmentations,digitStore);
+  return fPreClusterFinder->Prepare(detElemId,pads,area);
 }
 
 //_____________________________________________________________________________
@@ -130,7 +114,7 @@ AliMUONClusterFinderCOG::ComputePosition(AliMUONCluster& cluster)
     {
       AliMUONPad* pad = cluster.Pad(i);
       TVector2 padPosition = pad->Position();
-      AliMpArea area(pad->Position(),pad->Dimensions());
+      AliMpArea area(pad->X(), pad->Y(), pad->DX(), pad->DY());
       xmin = TMath::Min(area.LeftBorder(),xmin);
       xmax = TMath::Max(area.RightBorder(),xmax);
       ymin = TMath::Min(area.DownBorder(),ymin);