1 #ifndef ALIEMCALSDIGITIZER_H
2 #define ALIEMCALSDIGITIZER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 //_________________________________________________________________________
7 // This is a class that makes SDigits out of Hits
8 // A Summable Digits is the sum of all hits originating
9 // from one in one tower of the EMCAL
10 // A threshold for assignment of the primary to SDigit is applied
12 // SDigits need to hold the energy sum of the hits, but AliEMCALDigit
13 // can (should) only store amplitude. Therefore, the SDigit energy is
14 // "digitized" before being stored and must be "calibrated" back to an
15 // energy before SDigits are summed to form true Digits
18 //*-- Author: Sahal Yacoob (LBL)
19 // based on : AliPHOSSDigitizer
20 //_________________________________________________________________________
22 // --- ROOT system ---
26 // --- Standard library ---
28 // --- AliRoot header files ---
29 #include "AliConfig.h"
31 class AliEMCALSDigitizer: public TNamed {
34 AliEMCALSDigitizer() ; // ctor
35 AliEMCALSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::GetDefaultEventFolderName()) ;
36 AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) ;
37 AliEMCALSDigitizer& operator = (const AliEMCALSDigitizer& source) ;
38 virtual ~AliEMCALSDigitizer(); // dtor
40 Float_t Digitize(Float_t energy)const; //convert energy in GeV to int amplitude
41 Float_t Calibrate(Float_t amp)const; //opposite of Digitize()
43 virtual void Digitize(Option_t *option="");
44 Int_t GetSDigitsInRun() const {return fSDigitsInRun ;}
45 virtual void Print(Option_t *option="") const;
46 void Print1(Option_t *option="all"); // *MENU*
47 void SetEventFolderName(TString name) { fEventFolderName = name ; }
48 void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
50 Bool_t operator == (const AliEMCALSDigitizer & sd) const ;
52 virtual void Browse(TBrowser* b);
56 void InitParameters() ;
57 void PrintSDigits(Option_t * option) ;
61 Float_t fA ; // Pedestal parameter
62 Float_t fB ; // Slope Digitizition parameters
63 Float_t fECPrimThreshold ; // To store primary if EC Shower Elos > threshold
64 Bool_t fDefaultInit; //! Says if the object was created by defaut ctor (only parameters are initialized)
65 TString fEventFolderName; // event folder name
66 Bool_t fInit ; //! tells if initialisation went OK, will revent exec if not
67 Int_t fSDigitsInRun ; //! Total number of sdigits in one run
68 Int_t fFirstEvent; // first event to process
69 Int_t fLastEvent; // last event to process
70 Float_t fSampling; // See AliEMCALGeometry
71 TClonesArray* fHits; //-> Temporal array with hits
73 ClassDef(AliEMCALSDigitizer,8) // description
76 #endif // AliEMCALSDIGITIZER_H