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 */
8 //_________________________________________________________________________
9 // Task Class for making Digits in EMCAL
11 //*-- Author: Sahal Yacoob (LBL)
12 // based on : AliPHOSDigit
13 //_________________________________________________________________________
16 // --- ROOT system ---
18 #include "TObjString.h"
20 // --- Standard library ---
22 // --- AliRoot header files ---
23 class AliEMCALSDigitizer ;
26 class AliEMCALDigitizer: public TTask {
29 AliEMCALDigitizer() ; // ctor
30 AliEMCALDigitizer(const char *headerFile,const char * sDigitsBranchTitle = "Default") ;
31 virtual ~AliEMCALDigitizer() ;
33 void Digitize(Option_t *option); // Make Digits from SDigits stored in fSDigits
34 void Exec(Option_t *option); // Supervising method
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 ;}
43 Int_t DigitizeEnergy(Float_t energy, Int_t absId) ;
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)
48 void SetEMCThreshold(Float_t EMCThreshold) {fEMCDigitThreshold = EMCThreshold;}
49 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
51 void SetDigitsBranch (const char* file) ;
52 void SetSDigitsBranch(const char* file) ;
55 Bool_t Combinator() ; // makes all desirable combination sig+Bg
57 Bool_t ReadSDigits() ; // Read sdigits for particular events
58 void WriteDigits() ; // Writes Digits for particular event
59 void PrintDigits(Option_t * option) ;
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
67 AliEMCALSDigitizer * fSDigitizer ; // ! SDigitizer to extract some sdigitizing parameters
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
73 Float_t fPedestal ; // Calibration parameters
74 Float_t fSlope ; // read from SDigitizer
76 Float_t fPinNoise ; // Electronics noise in EMC
77 Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC
80 ClassDef(AliEMCALDigitizer,1) // description
85 #endif // AliEMCALDigitizer_H