61e0abb5 |
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 | /* $Id$ */ |
7 | |
8 | //_________________________________________________________________________ |
ffa6d63b |
9 | // Task Class for making Digits in EMCAL |
61e0abb5 |
10 | // |
ffa6d63b |
11 | //*-- Author: Sahal Yacoob (LBL) |
12 | // based on : AliPHOSDigit |
13 | //_________________________________________________________________________ |
61e0abb5 |
14 | |
15 | |
16 | // --- ROOT system --- |
17 | #include "TTask.h" |
18 | #include "TObjString.h" |
19 | class TArrayI ; |
20 | // --- Standard library --- |
21 | |
22 | // --- AliRoot header files --- |
23 | class AliEMCALSDigitizer ; |
24 | |
25 | |
26 | class AliEMCALDigitizer: public TTask { |
27 | |
28 | public: |
29 | AliEMCALDigitizer() ; // ctor |
ffa6d63b |
30 | AliEMCALDigitizer(const char *headerFile,const char * sDigitsBranchTitle = "Default") ; |
61e0abb5 |
31 | virtual ~AliEMCALDigitizer() ; |
32 | |
33 | void Digitize(Option_t *option); // Make Digits from SDigits stored in fSDigits |
34 | void Exec(Option_t *option); // Supervising method |
35 | |
36 | Float_t GetEMCThreshold() const { return fEMCDigitThreshold;} |
37 | Float_t GetPedestal() const { return fPedestal; } |
38 | Float_t GetPinNoise() const { return fPinNoise;} |
39 | Float_t GetSlope() const { return fSlope; } |
40 | char * GetDigitsBranch ()const { return (char*)fDigitsTitle.Data() ;} |
41 | TClonesArray * GetHeadersFiles(){ return fHeaderFiles ;} |
42 | TArrayI* GetCurrentEvents() { return fIevent ;} |
ffa6d63b |
43 | Int_t DigitizeEnergy(Float_t energy, Int_t absId) ; |
61e0abb5 |
44 | void MixWith(char* HeaderFile, char* SDigitsTitle =0) ; // Add another one file to mix |
45 | virtual void Print(Option_t* option)const ; |
46 | void Reset() ; //restarts starts event processing from 0 event(s) |
47 | |
48 | void SetEMCThreshold(Float_t EMCThreshold) {fEMCDigitThreshold = EMCThreshold;} |
49 | void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;} |
50 | |
51 | void SetDigitsBranch (const char* file) ; |
52 | void SetSDigitsBranch(const char* file) ; |
53 | |
54 | private: |
55 | Bool_t Combinator() ; // makes all desirable combination sig+Bg |
56 | void Init(); |
57 | Bool_t ReadSDigits() ; // Read sdigits for particular events |
58 | void WriteDigits() ; // Writes Digits for particular event |
59 | void PrintDigits(Option_t * option) ; |
60 | |
61 | private: |
62 | TClonesArray * fSDigitsTitles ; // Titles of sdigits branches |
63 | TClonesArray * fHeaderFiles ; // Names of files with headers to merge |
64 | TString fDigitsTitle ; // Title of the Digits Branch |
65 | TClonesArray * fSDigits ; // ! Lists of SDigits |
66 | TClonesArray * fDigits ; // ! Final list of digits |
ffa6d63b |
67 | AliEMCALSDigitizer * fSDigitizer ; // ! SDigitizer to extract some sdigitizing parameters |
61e0abb5 |
68 | Int_t fNinputs ; // Number of input files |
69 | Bool_t fInitialized ; // |
70 | TArrayI * fIevent ; // events to read at the next ReadSDigits() call |
71 | TArrayI * fIeventMax ; // Maximal number of events in each input file |
72 | |
73 | Float_t fPedestal ; // Calibration parameters |
74 | Float_t fSlope ; // read from SDigitizer |
75 | |
76 | Float_t fPinNoise ; // Electronics noise in EMC |
77 | Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC |
78 | |
79 | |
80 | ClassDef(AliEMCALDigitizer,1) // description |
81 | |
82 | }; |
83 | |
84 | |
85 | #endif // AliEMCALDigitizer_H |