LCOV - code coverage report
Current view: top level - EMCAL/EMCALbase - AliEMCALDigitizer.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 15 6.7 %
Date: 2016-06-14 17:26:59 Functions: 2 17 11.8 %

          Line data    Source code
       1             : #ifndef ALIEMCALDIGITIZER_H
       2             : #define ALIEMCALDIGITIZER_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : //_________________________________________________________________________
       7             : // Class that performs digitization of Summable digits from simulated data
       8             : //  
       9             : // In addition it performs mixing of summable digits from different events.
      10             : //
      11             : // For each event two branches are created in TreeD:
      12             : //   "EMCAL" - list of digits
      13             : //   "EMCALTRG" - list of trigger digits
      14             : //   "AliEMCALDigitizer" - AliEMCALDigitizer with all parameters used in digitization
      15             : //
      16             : //*-- Author: Sahal Yacoob (LBL)
      17             : // based on : AliPHOSDigit
      18             : // July     2003 Yves Schutz : NewIO 
      19             : // November 2003 Aleksei Pavlinov : Shish-Kebab geometry 
      20             : //
      21             : // July 2011 GCB: Digitizer modified to accomodate embedding. 
      22             : //                Time calibration added. Decalibration possibility of energy and time added
      23             : //_________________________________________________________________________ 
      24             : 
      25             : 
      26             : // --- ROOT system ---
      27             : class TClonesArray ; 
      28             : class TBrowser;
      29             : 
      30             : // --- Standard library ---
      31             : 
      32             : // --- AliRoot header files ---
      33             : #include "AliDigitizer.h"
      34             : #include "AliConfig.h"
      35             : class AliEMCALCalibData ;
      36             : class AliEMCALCalibTime ;
      37             : class AliEMCALSDigitizer ;
      38             : class AliDigitizationInput ;
      39             : 
      40             : class AliEMCALDigitizer: public AliDigitizer {
      41             : 
      42             : public:
      43             :   AliEMCALDigitizer() ;            // ctor
      44             :   AliEMCALDigitizer(TString alirunFileNameFile, 
      45             :                     TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ;  
      46             :   AliEMCALDigitizer(const AliEMCALDigitizer & dtizer) ;
      47             :   AliEMCALDigitizer(AliDigitizationInput * manager) ;
      48             :   virtual ~AliEMCALDigitizer() ;       
      49             : 
      50             :   void     Digitize(Int_t event);   // Make Digits from SDigits stored in fSDigits
      51             :   void     Digitize(Option_t *option);  // Supervising method
      52             : 
      53           0 :   Int_t    GetDigitThreshold()     const { return fDigitThreshold     ; }
      54           0 :   Float_t  GetPinNoise()           const { return fPinNoise           ; }
      55           0 :   Float_t  GetTimeNoise()          const { return fTimeNoise          ; }  
      56             :   Float_t  GetTimeResolution(Float_t energy) const;
      57           0 :   Double_t GetTimeResolutionPar0() const { return fTimeResolutionPar0 ; }
      58           0 :   Double_t GetTimeResolutionPar1() const { return fTimeResolutionPar1 ; }
      59           0 :   Double_t GetTimeDelay()          const { return fTimeDelay          ; }
      60           0 :   Double_t IsTimeDelay()           const { return fTimeDelayFromOCDB  ; }
      61           0 :   Float_t  GetECAchannel()         const { return fADCchannelEC       ; }
      62           0 :   Float_t  GetECApedestal()        const { return fADCpedestalEC      ; }
      63             :   
      64           0 :   void     SetEventRange(Int_t first=0, Int_t last=-1) { fFirstEvent     = first ; 
      65           0 :                                                          fLastEvent      = last  ; }
      66             : 
      67             : 
      68             :   // General
      69           0 :   Int_t    GetDigitsInRun()  const { return fDigitsInRun; } 
      70             :   void     Print (Option_t * option = "") const ;
      71             :   void     Print1(Option_t * option)            ; // *MENU*
      72             :                    
      73             : 
      74             :   AliEMCALDigitizer & operator = (const AliEMCALDigitizer & /*rvalue*/)  {
      75             :     // assignement operator requested by coding convention but not needed
      76           0 :    AliFatal("not implemented") ;  
      77           0 :    return *this ; 
      78             :   }
      79             : 
      80             : private:
      81             : 
      82             :   Bool_t   Init();                   
      83             :   void     InitParameters() ; 
      84             :   void     PrintDigits(Option_t * option) ;
      85             :   void     Unload() ; 
      86             :   void     WriteDigits() ;         // Writes Digits the current event
      87             :   void     WriteDigits(TClonesArray* digits, const char* branchName = "EMTRG"); //
      88             :   Float_t  TimeOfNoise(void) ;     // Calculate time signal generated by noise
      89             :   
      90             :   void     CalibrateADCTime  (Float_t & adc ,   Float_t & time, Int_t absId) ;
      91             :   void     DigitizeEnergyTime(Float_t & energy, Float_t & time, Int_t absId) ;
      92             : 
      93             :   void     Digits2FastOR(TClonesArray*digitsTMP, TClonesArray* digitsTRG);
      94             :   void     DigitalFastOR(Double_t time, Double_t dE, Int_t timeSamples[], Int_t nSamples);      
      95             :   void     DecalibrateTrigger(AliEMCALDigit *digit);
      96             :   Bool_t   IsDead(AliEMCALDigit *digit);
      97             :   Bool_t   IsDead(Int_t absId);
      98             :         
      99             : private:
     100             :   
     101             :   Bool_t   fDefaultInit;           //! Says if the task was created by defaut ctor (only parameters are initialized)
     102             :   Int_t    fDigitsInRun ;          //! Total number of digits in one run
     103             :   Bool_t   fInit ;                 //! To avoid overwriting existing files
     104             : 
     105             :   Int_t    fInput ;                // Number of files to merge
     106             :   TString *fInputFileNames ;       //[fInput] List of file names to merge 
     107             :   TString *fEventNames ;           //[fInput] List of event names to merge
     108             : 
     109             :   Int_t    fDigitThreshold  ;      // Threshold for storing digits in EMC, ACD units
     110             :   Int_t    fMeanPhotonElectron ;   // number of photon electrons per GeV deposited energy 
     111             :   Float_t  fGainFluctuations ;     // correct fMeanPhotonElectron by the gain fluctuations
     112             :   Float_t  fPinNoise ;             // Electronics noise in EMC, APD
     113             :   Double_t fTimeNoise;             // Electronics noise in EMC, time
     114             :   Double_t fTimeDelay;             // Time delay to mimick roughly data delay
     115             :   Bool_t   fTimeDelayFromOCDB;     // Recover time delay from data
     116             :   Double_t fTimeResolutionPar0 ;   // Time resolution of FEE electronics
     117             :   Double_t fTimeResolutionPar1 ;   // Time resolution of FEE electronics
     118             :   Float_t  fADCchannelEC ;         // calibration width of one ADC channel in EC section (GeV)
     119             :   Float_t  fADCpedestalEC ;        // calibration pedestal for one ADC channel
     120             :   Float_t  fADCchannelECDecal ;    // decalibration width of one ADC channel in EC section (GeV)
     121             :   Float_t  fTimeChannel ;          // calibration time width for one channel  
     122             :   Float_t  fTimeChannelDecal ;     // calibration time width for one channel  
     123             :   Int_t    fNADCEC ;               // number of channels in EC section ADC
     124             : 
     125             :   TString  fEventFolderName;       // skowron: name of EFN to read data from in stand alone mode
     126             :   Int_t    fFirstEvent;            // first event to process
     127             :   Int_t    fLastEvent;             // last  event to process
     128             :         
     129             :   AliEMCALCalibData * fCalibData;  // Energy Calibration data pointer
     130             :   AliEMCALCalibTime * fCalibTime;  // Time Calibration data pointer
     131             :   AliEMCALSDigitizer* fSDigitizer; // SDigitization object
     132             :   
     133      146684 :   ClassDef(AliEMCALDigitizer,15)  
     134             : };
     135             : 
     136             : 
     137             : #endif // AliEMCALDIGITIZER_H

Generated by: LCOV version 1.11