Update for the value of the density of the foam inside the support cylinder between...
[u/mrichter/AliRoot.git] / VZERO / AliVZERO.cxx
index ff99a01..0e69e9d 100755 (executable)
@@ -52,7 +52,7 @@
 #include "AliVZEROLoader.h"
 #include "AliVZERODigitizer.h"
 #include "AliVZEROBuffer.h"
-#include "AliRunDigitizer.h"
+#include "AliDigitizationInput.h"
 #include "AliVZEROdigit.h"
 #include "AliVZEROSDigit.h"
 #include "AliDAQ.h"
@@ -247,12 +247,12 @@ void AliVZERO::SetTreeAddress()
 }
 
 //_____________________________________________________________________________
-AliDigitizer* AliVZERO::CreateDigitizer(AliRunDigitizer* manager) const
+AliDigitizer* AliVZERO::CreateDigitizer(AliDigitizationInput* digInput) const
 {
   //
   // Creates a digitizer for VZERO
   //
-  return new AliVZERODigitizer(manager);
+  return new AliVZERODigitizer(digInput);
 }
 
 //_____________________________________________________________________________
@@ -264,8 +264,10 @@ void AliVZERO::Hits2Digits(){
   AliVZERODigitizer* dig = new AliVZERODigitizer(this,AliVZERODigitizer::kHits2Digits);
 
   // Creates the digits
-  dig->Exec("");
+  dig->Digitize("");
 
+  // deletes the digitizer
+  delete dig;
 }
 
 //_____________________________________________________________________________
@@ -277,8 +279,10 @@ void AliVZERO::Hits2SDigits(){
   AliVZERODigitizer* dig = new AliVZERODigitizer(this,AliVZERODigitizer::kHits2SDigits);
 
   // Creates the sdigits
-  dig->Exec("");
+  dig->Digitize("");
 
+  // deletes the digitizer
+  delete dig;
 }
 
 //_____________________________________________________________________________
@@ -382,8 +386,8 @@ void AliVZERO::Digits2Raw()
           aBBflag[iChannel] = (aBBflagsV0A >> (fVZERODigit->PMNumber()-32)) & 0x1;
           aBGflag[iChannel] = (aBGflagsV0A >> (fVZERODigit->PMNumber()-32)) & 0x1;
         }
-         AliDebug(1,Form("DDL: %s\tdigit number: %d\tPM number: %d\tADC: %f\tTime: %f",
-                        fileName,k,fVZERODigit->PMNumber(),aADC[k],aTime[k])); 
+         AliDebug(1,Form("DDL: %s\tdigit number: %d\tPM number: %d\tADC: %d\tTime: %f",
+                        fileName,k,fVZERODigit->PMNumber(),aADC[iChannel][AliVZEROdigit::kNClocks/2],aTime[iChannel])); 
      }        
    }
 
@@ -571,7 +575,7 @@ Float_t AliVZERO::CorrectLeadingTime(Int_t i, Float_t time, Float_t adc) const
   if (adc < 1e-6) return time;
 
   // Slewing correction
-  Float_t thr = fCalibData->GetDiscriThr(i);
+  Float_t thr = fCalibData->GetCalibDiscriThr(i,kTRUE);
   time -= fTimeSlewing->Eval(adc/thr);
 
   return time;