Line data Source code
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 */
5 : /* $Id$ */
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
11 : //
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
16 : //
17 : //
18 : //*-- Author: Sahal Yacoob (LBL)
19 : // based on : AliPHOSSDigitizer
20 : //_________________________________________________________________________
21 :
22 : // --- ROOT system ---
23 : #include "TNamed.h"
24 : class TBrowser;
25 :
26 : // --- Standard library ---
27 :
28 : // --- AliRoot header files ---
29 : #include "AliConfig.h"
30 :
31 : class AliEMCALSDigitizer: public TNamed {
32 :
33 : public:
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
39 :
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()
42 :
43 : virtual void Digitize(Option_t *option="");
44 0 : Int_t GetSDigitsInRun() const {return fSDigitsInRun ;}
45 : virtual void Print(Option_t *option="") const;
46 : void Print1(Option_t *option="all"); // *MENU*
47 0 : void SetEventFolderName(TString name) { fEventFolderName = name ; }
48 10 : void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
49 :
50 : Bool_t operator == (const AliEMCALSDigitizer & sd) const ;
51 :
52 : virtual void Browse(TBrowser* b);
53 :
54 : private:
55 : void Init() ;
56 : void InitParameters() ;
57 : void PrintSDigits(Option_t * option) ;
58 : void Unload() const ;
59 :
60 : private:
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
72 :
73 162 : ClassDef(AliEMCALSDigitizer,8) // description
74 : };
75 :
76 : #endif // AliEMCALSDIGITIZER_H
77 :
|