]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONPreClusterFinderV3.cxx
more fixes in the addtask
[u/mrichter/AliRoot.git] / MUON / AliMUONPreClusterFinderV3.cxx
index 6f438b6ff64cef527934b278c9dbed1acc549366..83f3cefc0c25859327fe17308d6fd8cca0faf49b 100644 (file)
 /// \author Laurent Aphecetche
 //-----------------------------------------------------------------------------
 
+using std::endl;
+using std::cout;
 ClassImp(AliMUONPreClusterFinderV3)
 
-namespace
-{
-  //___________________________________________________________________________
-  Bool_t
-  AreOverlapping(const AliMUONPad& pad, const AliMUONCluster& cluster)
-  {
-    /// Whether the pad overlaps with the cluster
-    
-    static Double_t precision = 1E-4; // cm
-    static TVector2 precisionAdjustment(precision,precision);//-precision,-precision);
-      for ( Int_t i = 0; i < cluster.Multiplicity(); ++i )
-      {
-        AliMUONPad* testPad = cluster.Pad(i);
-        // Note: we use negative precision numbers, meaning
-        // the area of the pads will be *increased* by these small numbers
-        // prior to check the overlap by the AreOverlapping method,
-        // so pads touching only by the corners will be considered as
-        // overlapping.    
-        if ( AliMUONPad::AreOverlapping(*testPad,pad,precisionAdjustment) )
-        {
-          return kTRUE;
-        }
-      }
-      return kFALSE;
-  }
-}
-
 //_____________________________________________________________________________
 AliMUONPreClusterFinderV3::AliMUONPreClusterFinderV3()
 : AliMUONVClusterFinder(),
@@ -86,7 +61,7 @@ AliMUONPreClusterFinderV3::AliMUONPreClusterFinderV3()
   fIterator(0x0)
 {
     /// ctor
-    AliInfo("")
+  AliInfo("");
   for ( Int_t i = 0; i < 2; ++i )
   {
     fPreClusters[i] = new TClonesArray("AliMUONCluster",10);
@@ -232,7 +207,8 @@ AliMUONPreClusterFinderV3::AddPad(AliMUONCluster& cluster, AliMUONPad* pad)
   
   Int_t cathode = pad->Cathode();
   TObjArray& padArray = *fPads[cathode];
-  padArray.Remove(pad);
+  delete padArray.Remove(pad);
+  
   TIter next(&padArray);
   AliMUONPad* testPad;