]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONClusterSplitterMLEM.cxx
bugfix: correct range of DDL for specified detector
[u/mrichter/AliRoot.git] / MUON / AliMUONClusterSplitterMLEM.cxx
index feca1e2d75e38c33cb8e3f513e71513f6c8424ba..c27028b281c5bc93aaee6ee091fce228c97cf87b 100644 (file)
@@ -48,6 +48,8 @@
 #include <TRandom.h>
 #include <Riostream.h>
 
+using std::endl;
+using std::cout;
 /// \cond CLASSIMP
 ClassImp(AliMUONClusterSplitterMLEM)
 /// \endcond
@@ -233,7 +235,11 @@ AliMUONClusterSplitterMLEM::Fcn1(const AliMUONCluster& cluster,
     delta /= pad->Charge(); 
     chi2 += delta;
   } // for (Int_t j=0;
-  if (iflag == 0) qAver = qTot / npads;
+  if (iflag == 0 && npads) qAver = qTot / npads;
+  if (!npads)
+  {
+    AliError(Form("Got npads=0. Please check"));
+  }
   f = chi2 / qAver;
 }