1 #ifndef ALIPHOSDigitizer_H
2 #define ALIPHOSDigitizer_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 SDigits in PHOS
10 // Class performs digitization of Summable digits (in the PHOS case this is just
11 // sum of contributions of all primary particles into given cell).
12 // In addition it performs mixing of summable digits from different events.
14 //*-- Author: Dmitri Peressounko(SUBATECH & KI)
17 // --- ROOT system ---
19 #include "TObjString.h"
21 // --- Standard library ---
23 // --- AliRoot header files ---
24 class AliPHOSSDigitizer ;
27 class AliPHOSDigitizer: public TTask {
30 AliPHOSDigitizer() ; // ctor
31 AliPHOSDigitizer(const char *headerFile,const char * sDigitsBranchTitle = 0) ;
32 AliPHOSDigitizer(const AliPHOSDigitizer & dtizer) {( (AliPHOSDigitizer &)dtizer ).Copy(*this) ;} // cpy ctor
33 virtual ~AliPHOSDigitizer() ;
35 void Digitize(Option_t *option); // Make Digits from SDigits stored in fSDigits
36 void Exec(Option_t *option); // Supervising method
38 Float_t GetCPVNoise() const { return fCPVNoise ;}
39 Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;}
40 Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
41 Float_t GetPedestal() const { return fPedestal; }
42 Float_t GetPinNoise() const { return fPinNoise;}
43 Float_t GetPPSDNoise() const { return fPPSDNoise ;}
44 Float_t GetPPSDThreshold()const { return fPPSDDigitThreshold ;}
45 Float_t GetSlope() const { return fSlope; }
46 char * GetDigitsBranch ()const { return (char*)fDigitsTitle.Data() ;}
47 char * GetSDigitsBranch()const { return (char*)((TObjString*)fSDigitsTitles->At(0))->GetString().Data() ;}
48 TClonesArray * GetHeadersFiles() const { return fHeaderFiles ;}
49 TArrayI * GetCurrentEvents()const { return fIevent ;}
51 void MixWith(char* HeaderFile, char* SDigitsTitle =0) ; // Add another one file to mix
52 virtual void Print(Option_t* option)const ;
53 void Reset() ; //restarts starts event processing from 0 event(s)
55 void SetCPVNoise(Float_t CPVNoise) {fCPVNoise = CPVNoise;}
56 void SetCPVThreshold(Float_t CPVThreshold) {fCPVDigitThreshold= CPVThreshold;}
57 void SetEMCThreshold(Float_t EMCThreshold) {fEMCDigitThreshold = EMCThreshold;}
58 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
59 void SetPPSDNoise(Float_t PPSDNoise) {fPPSDNoise = PPSDNoise;}
60 void SetPPSDThreshold(Float_t PPSDThreshold){fPPSDDigitThreshold = PPSDThreshold;}
62 void SetDigitsBranch (const char* file) ;
63 void SetSDigitsBranch(const char* file) ;
65 AliPHOSDigitizer & operator = (const AliPHOSDigitizer & rvalue) {
66 // assignement operator requested by coding convention but not needed
72 Bool_t Combinator() ; // makes all desirable combination sig+Bg
74 Bool_t ReadSDigits() ; // Read sdigits for particular events
75 void WriteDigits() ; // Writes Digits for particular event
76 void PrintDigits(Option_t * option) ;
79 TClonesArray * fSDigitsTitles ; // Titles of sdigits branches
80 TClonesArray * fHeaderFiles ; // Names of files with headers to merge
81 TString fDigitsTitle ; // Title of the Digits Branch
82 TClonesArray * fSDigits ; // ! Lists of SDigits
83 TClonesArray * fDigits ; // ! Final list of digits
84 AliPHOSSDigitizer * fSDigitizer ; // ! SDigitizer to extarct some sdigitizing parameters
85 Int_t fNinputs ; // Number of input files
86 Bool_t fInitialized ; // kTRUE if AliPHOSDigitizer is initialized
87 TArrayI * fIevent ; // events to read at the next ReadSDigits() call
88 TArrayI * fIeventMax ; // Maximal number of events in each input file
90 Float_t fPedestal ; // Calibration parameters
91 Float_t fSlope ; // read from SDigitizer
93 Float_t fPinNoise ; // Electronics noise in EMC
94 Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC
95 Float_t fCPVNoise ; // Noise in CPV
96 Float_t fCPVDigitThreshold ; // Threshold for storing digits in CPV
97 Float_t fPPSDNoise ; // Noise in PPSD
98 Float_t fPPSDDigitThreshold ; // Threshold for storing digits in PPSD
101 ClassDef(AliPHOSDigitizer,1) // description
106 #endif // AliPHOSDigitizer_H