]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALDigitizer.h
Load pythia libraries.
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALDigitizer.h
index 9662c74477f19c8235ae7c1cf607ca76f645164c..13ab83700bbf78f7c8cef87c54cda9572e30e65a 100644 (file)
@@ -10,6 +10,8 @@
 //                  
 //*-- Author: Sahal Yacoob (LBL)
 // based on : AliPHOSDigit
+// July     2003 Yves Schutz : NewIO 
+// November 2003 Aleksei Pavlinov : Shish-Kebab geometry 
 //_________________________________________________________________________ 
 
 
 #include "TObjString.h"
 class TArrayI ;
 class TClonesArray ; 
+class TList;
+class TBrowser;
 
 // --- Standard library ---
-#include <stdlib.h>
 
 // --- AliRoot header files ---
 #include "AliDigitizer.h"
+#include "AliConfig.h"
+#include "AliEMCALCalibData.h"
 class AliEMCALSDigitizer ;
 class AliRunDigitizer ;
 
@@ -30,79 +35,91 @@ class AliEMCALDigitizer: public AliDigitizer {
 
 public:
   AliEMCALDigitizer() ;          // ctor
-  AliEMCALDigitizer(const char *headerFile, const char * sDigitsBranchTitle = "Default", const Bool_t toSplit = kFALSE) ; 
-  AliEMCALDigitizer(AliRunDigitizer * ard) ;
-  AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) 
-                  {( (AliEMCALDigitizer &)dtizer ).Copy(*this) ;} 
+  AliEMCALDigitizer(TString alirunFileNameFile, TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ;  
+  AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) ;
+  AliEMCALDigitizer(AliRunDigitizer * manager) ;
   virtual ~AliEMCALDigitizer() ;       
 
-  void    Digitize(const Int_t event);          // Make Digits from SDigits stored in fSDigits
+  void    Digitize(Int_t event);          // Make Digits from SDigits stored in fSDigits
   void    Exec(Option_t *option);               // Supervising method
 
-  const Float_t GetTowerThreshold() const { return fTowerDigitThreshold;}
-  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 GetTowerchannel() const { return fADCchannelTower ; }
-  const Float_t GetTowerpedestal() const { return fADCpedestalTower ; }
-  const Float_t GetPreShochannel() const { return fADCchannelPreSho ; }
-  const Float_t GetPreShopedestal() const { return fADCpedestalPreSho ; }
-
-  void    SetTowerThreshold(Float_t EMCThreshold)  {fTowerDigitThreshold = EMCThreshold;}
+  Float_t GetDigitThreshold() const { return fDigitThreshold;}
+  Float_t GetPedestal()       const { return fPedestal; }
+  Float_t GetPinNoise()       const { return fPinNoise;}
+  Float_t GetSlope()          const { return fSlope; }
+  Float_t GetTimeResolution() const { return fTimeResolution ; }
+  Float_t GetECAchannel()     const { return fADCchannelEC ; }
+  Float_t GetECApedestal()    const { return fADCpedestalEC ; }
+ void   SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
+  void    SetDigitThreshold(Float_t EMCThreshold)  {fDigitThreshold = EMCThreshold;}
   void    SetPinNoise(Float_t PinNoise )         {fPinNoise = PinNoise;}
 
   //General
-  const Int_t   GetDigitsInRun()  const { return fDigitsInRun; } ;
-  void  MixWith(char* HeaderFile) ; // Add another one file to mix
-  void  Print(Option_t* option)const ;
+  Int_t   GetDigitsInRun()  const { return fDigitsInRun; } 
+  void  MixWith(TString alirunFileName, 
+               TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; // Add another one file to mix
+  void  Print(Option_t* option="") const ;
+  void  Print1(Option_t * option); // *MENU*
  
AliEMCALDigitizer & operator = (const AliEMCALDigitizer & rvalue)  {
 AliEMCALDigitizer & operator = (const AliEMCALDigitizer & /*rvalue*/)  {
     // assignement operator requested by coding convention but not needed
-    abort() ;
-    return *this ; 
+   Fatal("operator =", "not implemented") ;  
+   return *this ; 
   }
 
+  virtual void Browse(TBrowser* b);
+  // hists
+  void   SetControlHists(Int_t var=0) {fControlHists=var;}
+  Int_t  GetControlHist() const {return fControlHists;}
+  TList *GetListOfHists() {return fHists;}
+  TList* BookControlHists(int var=0);
+  void   SaveHists(const char* name="RF/TRD1/Digitizations/DigiVar?",
+  Bool_t kSingleKey=kTRUE, const char* opt="RECREATE"); // *MENU*
+
 private:
 
   Bool_t  Init();                   
   void    InitParameters() ; 
   void    PrintDigits(Option_t * option) ;
-  void    WriteDigits(Int_t evt) ;            // Writes Digits for particular event
-  Float_t TimeOfNoise(void) ;                 // Calculate time signal generated by noise
+  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, Int_t absId) ;
+  Int_t   DigitizeEnergy(Float_t energy, Int_t AbsId) ;
 
 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
-  Float_t fPedestal ;                // Calibration parameters 
-  Float_t fSlope ;                   // read from SDigitizer
-
-  Float_t fPinNoise ;                // Electronics noise in EMC
-  Float_t fTowerDigitThreshold  ;    // Threshold for storing digits in EMC
-  Float_t fPreShowerDigitThreshold ; // Threshold for Preshower digits
-
-  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 fADCchannelTower ;         // width of one ADC channel in Tower (GeV)
-  Float_t fADCpedestalTower ;        //
-  Int_t fNADCTower ;                 // number of channels in Tower ADC
-
-  Float_t fADCchannelPreSho ;        // width of one ADC channel in Pre Shower (GeV)
-  Float_t fADCpedestalPreSho ;       // 
-  Int_t fNADCPreSho ;                // number of channels in Pre Shower ADC
-
-  Bool_t  fToSplit ;                 //! Do we work in the split mode
-  TFile * fSplitFile ;               //! file in which Digits will eventually be stored
-
-  ClassDef(AliEMCALDigitizer,1)  // description 
-
+  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 ;        // pedestal for one ADC channel
+  Int_t   fNADCEC ;               // number of channels in EC section ADC
+
+  TString fEventFolderName;         // skowron: name of EFN to read data from in stand alone mode
+  Int_t   fFirstEvent;        // first event to process
+  Int_t   fLastEvent;         // last  event to process
+  // Control hists
+  Int_t   fControlHists;          //!
+  TList  *fHists;                 //!
+  AliEMCALCalibData * fCalibData; //Calibration data pointer
+
+  ClassDef(AliEMCALDigitizer,6)  // description 
 };