]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALDigitizer.cxx
effc++ warnings
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALDigitizer.cxx
index f3bce117a70a7805cd7a9e3341f8e17786c6b1dc..dfe5ea132878911c5a4827cc8cc0abc906f7d53e 100644 (file)
@@ -68,6 +68,7 @@
 #include <TBrowser.h>
 #include <TObjectTable.h>
 #include <TRandom.h>
+#include <cassert>
 
 // --- AliRoot header files ---
 #include "AliLog.h"
@@ -143,7 +144,7 @@ AliEMCALDigitizer::AliEMCALDigitizer(TString alirunFileName, TString eventFolder
     fFirstEvent(0),
     fLastEvent(0),
     fControlHists(0),
-    fHists(0)
+    fHists(0),fCalibData(0x0)
 {
   // ctor
   InitParameters() ; 
@@ -204,7 +205,7 @@ AliEMCALDigitizer::AliEMCALDigitizer(AliRunDigitizer * rd)
     fFirstEvent(0),
     fLastEvent(0),
     fControlHists(0),
-    fHists(0)
+    fHists(0),fCalibData(0x0)
 {
   // ctor Init() is called by RunDigitizer
   fManager = rd ; 
@@ -266,7 +267,7 @@ void AliEMCALDigitizer::Digitize(Int_t event)
     AliFatal("Could not get AliRun from runLoader");
 
   if(isTrd1Geom < 0) { 
-    AliInfo(Form(" get Geometry %s : %s ", geom->GetName(),geom->GetTitle()));
+    AliDebug(1, Form(" get Geometry %s : %s ", geom->GetName(),geom->GetTitle()));
     TString ng(geom->GetName());
     isTrd1Geom = 0;
     if(ng.Contains("SHISH") &&  ng.Contains("TRD1")) isTrd1Geom = 1;
@@ -614,19 +615,21 @@ Bool_t AliEMCALDigitizer::Init()
 //____________________________________________________________________________ 
 void AliEMCALDigitizer::InitParameters()
 { 
-  //parameter initialization for digitizer
-  // Tune parameters - 24-nov-04
+  // Parameter initialization for digitizer
+  // Tune parameters - 24-nov-04; Apr 29, 2007
 
-  fMeanPhotonElectron = 3300 ; // electrons per GeV 
-  fPinNoise           = 0.004; 
+  fMeanPhotonElectron = 3300 // electrons per GeV 
+  fPinNoise           = 0.010; // pin noise in GEV from analysis test beam data 
   if (fPinNoise == 0. ) 
     Warning("InitParameters", "No noise added\n") ; 
   fDigitThreshold     = fPinNoise * 3; // 3 * sigma
   fTimeResolution     = 0.3e-9 ; // 300 psc
   fTimeSignalLength   = 1.0e-9 ;
 
-  fADCchannelEC    = 0.00305; // 200./65536 - width of one ADC channel in GeV
-  fADCpedestalEC   = 0.009 ;  // GeV
+  // These defaults are normally not used. 
+  // Values are read from calibration database instead
+  fADCchannelEC    = 0.0153; // Update 24 Apr 2007: 250./16/1024 - width of one ADC channel in GeV
+  fADCpedestalEC   = 0.0 ;  // GeV
   fNADCEC          = (Int_t) TMath::Power(2,16) ;  // number of channels in Tower ADC - 65536
 
   fTimeThreshold      = 0.001*10000000 ; // Means 1 MeV in terms of SDigits amplitude ??