]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALDigitizer.h
Fixing problems in the generation of HTML documentation
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALDigitizer.h
index 3acd700932e9ab0851b5c3ecc5db156f211aebfc..fb9043491138a0d8363e5efe4d938770437d5058 100644 (file)
 //                  
 //*-- Author: Sahal Yacoob (LBL)
 // based on : AliPHOSDigit
+// July 2003 Yves Schutz : NewIO 
 //_________________________________________________________________________ 
 
 
 // --- ROOT system ---
-#include "TTask.h"
 #include "TObjString.h"
 class TArrayI ;
+class TClonesArray ; 
+
 // --- Standard library ---
 
 // --- AliRoot header files ---
+#include "AliDigitizer.h"
+#include "AliConfig.h"
 class AliEMCALSDigitizer ;
+class AliRunDigitizer ;
 
-
-class AliEMCALDigitizer: public TTask {
+class AliEMCALDigitizer: public AliDigitizer {
 
 public:
   AliEMCALDigitizer() ;          // ctor
-  AliEMCALDigitizer(const char *headerFile,const char * sDigitsBranchTitle = "Default") ; 
+  AliEMCALDigitizer(const TString alirunFileNameFile, const TString eventFolderName = AliConfig::fgkDefaultEventFolderName) ;  
+  AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) ;
+  AliEMCALDigitizer(AliRunDigitizer * manager) ;
   virtual ~AliEMCALDigitizer() ;       
 
-  void    Digitize(Option_t *option);            // Make Digits from SDigits stored in fSDigits
-  void    Exec(Option_t *option);                // Supervising method
-
-  Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
-  Float_t GetPedestal()     const { return fPedestal; }
-  Float_t GetPinNoise()     const { return fPinNoise;}
-  Float_t GetSlope()        const { return fSlope; }
-  char *  GetDigitsBranch ()const { return (char*)fDigitsTitle.Data() ;}
-  TClonesArray * GetHeadersFiles(){ return fHeaderFiles ;}
-  TArrayI*    GetCurrentEvents()  { return fIevent ;}
-  Int_t   DigitizeEnergy(Float_t energy, Int_t absId) ;
-  void    MixWith(char* HeaderFile, char* SDigitsTitle =0) ; // Add another one file to mix
-  virtual void    Print(Option_t* option)const ;
-  void    Reset() ;   //restarts starts event processing from 0 event(s)
-
-  void    SetEMCThreshold(Float_t EMCThreshold)  {fEMCDigitThreshold = EMCThreshold;}
-  void    SetPinNoise(Float_t PinNoise )         {fPinNoise = PinNoise;}
+  void    Digitize(const Int_t event);          // Make Digits from SDigits stored in fSDigits
+  void    Exec(Option_t *option);               // Supervising method
 
-  void    SetDigitsBranch (const char* file) ;
-  void    SetSDigitsBranch(const char* file) ;
+  const Float_t GetDigitThreshold() const { return fDigitThreshold;}
+  const Float_t GetPedestal()       const { return fPedestal; }
+  const Float_t GetPinNoise()       const { return fPinNoise;}
+  const Float_t GetSlope()          const { return fSlope; }
+  const Float_t GetTimeResolution() const { return fTimeResolution ; }
+  const Float_t GetECAchannel()     const { return fADCchannelEC ; }
+  const Float_t GetECApedestal()    const { return fADCpedestalEC ; }
 
-private:
-  Bool_t  Combinator() ;                         // makes all desirable combination sig+Bg
-  void    Init();                   
-  Bool_t  ReadSDigits() ;            // Read sdigits for particular events
-  void    WriteDigits() ;            // Writes Digits for particular event
-  void    PrintDigits(Option_t * option) ;
+  void    SetDigitThreshold(Float_t EMCThreshold)  {fDigitThreshold = EMCThreshold;}
+  void    SetPinNoise(Float_t PinNoise )         {fPinNoise = PinNoise;}
 
-private:
-  TClonesArray * fSDigitsTitles ;   // Titles of sdigits branches 
-  TClonesArray * fHeaderFiles ;     // Names of files with headers to merge 
-  TString        fDigitsTitle ;     // Title of the Digits Branch  
-  TClonesArray * fSDigits ;         // ! Lists of SDigits 
-  TClonesArray * fDigits ;          // ! Final list of digits
-  AliEMCALSDigitizer * fSDigitizer ; // ! SDigitizer to extract some sdigitizing parameters
-  Int_t   fNinputs ;                // Number of input files
-  Bool_t  fInitialized ;            // 
-  TArrayI * fIevent ;               // events to read at the next ReadSDigits() call
-  TArrayI * fIeventMax ;            // Maximal number of events in each input file
+  //General
+  const Int_t   GetDigitsInRun()  const { return fDigitsInRun; } 
+  void  MixWith(const TString alirunFileName, 
+               const TString eventFolderName = AliConfig::fgkDefaultEventFolderName) ; // Add another one file to mix
+  void  Print()const ;
+  AliEMCALDigitizer & operator = (const AliEMCALDigitizer & /*rvalue*/)  {
+    // assignement operator requested by coding convention but not needed
+   Fatal("operator =", "not implemented") ;  
+   return *this ; 
+  }
 
-  Float_t fPedestal ;                // Calibration parameters 
-  Float_t fSlope ;                   // read from SDigitizer
+private:
 
-  Float_t fPinNoise ;               // Electronics noise in EMC
-  Float_t fEMCDigitThreshold  ;     // Threshold for storing digits in EMC
+  Bool_t  Init();                   
+  void    InitParameters() ; 
+  void    PrintDigits(Option_t * option) ;
+  void    Unload() ; 
+  void    WriteDigits() ;         // Writes Digits the current event
+  Float_t TimeOfNoise(void) ;     // Calculate time signal generated by noise
 
+  //Calculate the time of crossing of the threshold by front edge
+  Float_t FrontEdgeTime(TClonesArray * ticks) ;
+  Int_t   DigitizeEnergy(Float_t energy) ;
 
-  ClassDef(AliEMCALDigitizer,1)  // description 
+private:
+  
+  Bool_t  fDefaultInit;           //! Says if the task was created by defaut ctor (only parameters are initialized)
+  Int_t   fDigitsInRun ;          //! Total number of digits in one run
+  Bool_t  fInit ;                 //! To avoid overwriting existing files
+
+  Int_t   fInput ;                // Number of files to merge
+  TString * fInputFileNames ;     //[fInput] List of file names to merge 
+  TString * fEventNames ;         //[fInput] List of event names to merge
+
+  Float_t fDigitThreshold  ;      // Threshold for storing digits in EMC
+  Int_t   fMeanPhotonElectron ;   // number of photon electrons per GeV deposited energy 
+  Float_t fPedestal ;             // Calibration parameters 
+  Float_t fSlope ;                // read from SDigitizer
+  Float_t fPinNoise ;             // Electronics noise in EMC
+  Float_t fTimeResolution ;       // Time resolution of FEE electronics
+  Float_t fTimeThreshold ;        // Threshold to start timing for given crystall
+  Float_t fTimeSignalLength ;     // Length of the timing signal 
+  Float_t fADCchannelEC ;         // width of one ADC channel in EC section (GeV)
+  Float_t fADCpedestalEC ;        //
+  Int_t   fNADCEC ;               // number of channels in EC section ADC
+
+  TString fEventFolderName;         // skowron: name of EFN to read data from in stand alone mode
+
+  ClassDef(AliEMCALDigitizer,4)  // description 
 
 };