]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONResponseV0.cxx
Reorganization + comment added
[u/mrichter/AliRoot.git] / MUON / AliMUONResponseV0.cxx
index 496f7061360087113f132395639a2aba724ee203..089d2e5d752fce7cf2c4a527ca5abc3f6d348c09 100644 (file)
 
 /* $Id$ */
 
-#include "AliMUONResponseV0.h"
-#include "AliSegmentation.h"
 #include <TMath.h>
 #include <TRandom.h>
 
+#include "AliMUONResponseV0.h"
+#include "AliSegmentation.h"
 
 ClassImp(AliMUONResponseV0)
        
+//__________________________________________________________________________
+AliMUONResponseV0::AliMUONResponseV0()
+  : AliMUONResponse() 
+{
+// Default constructor
+
+  fChargeCorrel = 0;
+}
+
   //__________________________________________________________________________
 void AliMUONResponseV0::SetSqrtKx3AndDeriveKx2Kx4(Float_t SqrtKx3)
 {
@@ -53,7 +62,7 @@ Float_t AliMUONResponseV0::IntPH(Float_t eloss)
 {
   // Calculate charge from given ionization energy loss
   Int_t nel;
-  nel= Int_t(eloss*1.e9/32.);
+  nel= Int_t(eloss*1.e9/27.4);
   Float_t charge=0;
   if (nel == 0) nel=1;
   for (Int_t i=1;i<=nel;i++) {
@@ -98,11 +107,13 @@ Int_t  AliMUONResponseV0::DigitResponse(Int_t digit, AliMUONTransientDigit* /*wh
 //     Float_t meanNoise = gRandom->Gaus(1, 0.2);
     // correct noise for slat chambers;
     // one more field to add to AliMUONResponseV0 to allow different noises ????
-    Float_t meanNoise = gRandom->Gaus(1.5, 0.2);
-    Float_t noise     = gRandom->Gaus(0, meanNoise);
+    Float_t meanNoise = gRandom->Gaus(1., 0.2);
+    Float_t noise     = gRandom->Gaus(0., meanNoise);
     digit+=(Int_t)noise; 
     if ( digit <= ZeroSuppression()) digit = 0;
-    if ( digit >  MaxAdc())          digit=MaxAdc();
+    // if ( digit >  MaxAdc())          digit=MaxAdc();
+    if ( digit >  Saturation())          digit=Saturation();
+
     return digit;
 }