Be much less verbose when not needed...
authorlaphecet <laphecet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Feb 2011 17:09:45 +0000 (17:09 +0000)
committerlaphecet <laphecet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Feb 2011 17:09:45 +0000 (17:09 +0000)
MUON/AliMUONDigitizerV3.cxx

index 57e7969..c98f1bf 100644 (file)
@@ -325,13 +325,19 @@ AliMUONDigitizerV3::DecalibrateTrackerDigit(const AliMUONVCalibParam& pedestals,
   
   if ( adc < TMath::Nint(pedestalMean + fgNSigmas*pedestalSigma + 0.5) ) 
   {
-    AliErrorClass(Form(" DE %04d Manu %04d Channel %02d "
-                      " a0 %7.2f a1 %7.2f thres %04d ped %7.2f pedsig %7.2f adcNoise %7.2f"
-                      " charge=%7.2f padc=%7.2f adc=%04d ZS=%04d",
-                      pedestals.ID0(),pedestals.ID1(),channel, 
-                      a0, a1, thres, pedestalMean, pedestalSigma, adcNoise,
-                      charge, padc, adc, TMath::Nint(pedestalMean + fgNSigmas*pedestalSigma + 0.5)));
-
+    // this is an error only in specific cases
+    if ( !addNoise || (addNoise && noiseOnly) ) 
+    {
+      AliErrorClass(Form(" DE %04d Manu %04d Channel %02d "
+                         " a0 %7.2f a1 %7.2f thres %04d ped %7.2f pedsig %7.2f adcNoise %7.2f "
+                         " charge=%7.2f padc=%7.2f adc=%04d ZS=%04d fgNSigmas=%e addNoise %d noiseOnly %d ",
+                         pedestals.ID0(),pedestals.ID1(),channel, 
+                         a0, a1, thres, pedestalMean, pedestalSigma, adcNoise,
+                         charge, padc, adc, 
+                         TMath::Nint(pedestalMean + fgNSigmas*pedestalSigma + 0.5),
+                         fgNSigmas,addNoise,noiseOnly));
+    }
+    
     adc = 0;
   }