Bug #92237 fixed as Barth suggested
[u/mrichter/AliRoot.git] / ZDC / AliZDCDigitizer.h
index 27d1a8f..23b3924 100644 (file)
 #include "AliCDBManager.h"
 #include "AliCDBStorage.h"
 #include "AliZDCPedestals.h"
-#include "AliZDCEnCalib.h"
-#include "AliZDCTowerCalib.h"
 
-class AliRunDigitizer;
+class AliDigitizationInput;
 
 class AliZDC;
 class AliZDCHit;
@@ -26,11 +24,11 @@ class AliZDCDigitizer: public AliDigitizer {
 
 public:
   AliZDCDigitizer();
-  AliZDCDigitizer(AliRunDigitizer* manager);
+  AliZDCDigitizer(AliDigitizationInput* digInput);
   virtual ~AliZDCDigitizer();
    
   virtual Bool_t Init();
-  virtual void Exec(Option_t* option=0);    
+  virtual void Digitize(Option_t* option=0);    
 
   //  PM gain
   void    SetPMGain(Int_t det, Int_t pmDet, Int_t pmGain)
@@ -46,16 +44,24 @@ public:
   void   SetCalibrationOn() {fIsCalibration=1;}  
   AliCDBStorage    *SetStorage(const char* uri);
   AliZDCPedestals  *GetPedData() const; 
-  AliZDCEnCalib    *GetEnCalibData() const; 
-  AliZDCTowerCalib *GetTowCalibData() const; 
   
   void    SetSpectators2Track() {fSpectators2Track=kTRUE;}
+  void    SetBeamEnergy(Float_t beamEnergy) {fBeamEnergy = beamEnergy;}
+
+  // Added for p-A simulations
+  void    SetpAsystem() {fIspASystem=kTRUE;}
+
+  // Added for RELDIS
+  void    SetRELDISGenerator() {fIsRELDISgen=kTRUE;}
 
 private:
 
   AliZDCDigitizer(const AliZDCDigitizer&);
   AliZDCDigitizer& operator=(const AliZDCDigitizer&);
 
+  void    CalculatePMTGains();
+  void    ReadPMTGains();
+
   void    Fragmentation(Float_t impPar, Int_t specN, Int_t specP,
                         Int_t &freeSpecN, Int_t &freeSpecP) const;
   void    SpectatorSignal(Int_t SpecType, Int_t numEvents, 
@@ -65,18 +71,24 @@ private:
                     Int_t Res) const;
   Int_t   Pedestal(Int_t Detector, Int_t Quadrant, Int_t Res) const;
 
-  Float_t fPMGain[6][5];       // PM gain
+  Float_t fPMGain[5][5];       // PM gain
   Float_t fADCRes[2];          // ADC conversion factors
   Int_t   fIsCalibration;      // !=0 if simulation creates calibration data
   Bool_t  fIsSignalInADCGate;   // true if signal in ADC gate
   Float_t fFracLostSignal;      // fraction of lost signal
   
   AliZDCPedestals  *fPedData;     //! pedestal calibration data
-  AliZDCEnCalib    *fEnCalibData;  //! energy and equalization calibration data
-  AliZDCTowerCalib *fTowCalibData; //! energy and equalization calibration data
   
   Bool_t  fSpectators2Track;    // should digitizer track spectators
+  Float_t fBeamEnergy;          // beam energy
+  TString fBeamType;           // beam type
+  
+  // Added for p-A simulations
+  Bool_t  fIspASystem;         // true if collision system is p-A
+
+  // Added for RELDIS
+  Bool_t  fIsRELDISgen;        // treu if generator is RELDIS
        
-  ClassDef(AliZDCDigitizer, 10)     // digitizer for ZDC
+  ClassDef(AliZDCDigitizer, 14)     // digitizer for ZDC
 };    
 #endif