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 ---
18 #include "TObjString.h"
22 // --- Standard library ---
24 // --- AliRoot header files ---
25 #include "AliDigitizer.h"
26 class AliPHOSSDigitizer ;
27 class AliRunDigitizer ;
29 class AliPHOSDigitizer: public AliDigitizer {
32 AliPHOSDigitizer() ; // ctor
33 AliPHOSDigitizer(const char *headerFile, const char * name = "Default") ;
34 AliPHOSDigitizer(AliRunDigitizer * ard) ;
35 AliPHOSDigitizer(const AliPHOSDigitizer & dtizer)
36 {( (AliPHOSDigitizer &)dtizer ).Copy(*this) ;}
37 virtual ~AliPHOSDigitizer() ;
39 void Digitize(const Int_t event) ; // Make Digits from SDigits
40 void Exec(Option_t *option); // Supervising method
43 const Float_t GetCPVNoise() const { return fCPVNoise ;}
44 const Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;}
45 const Float_t GetCPVchannel() const { return fADCchanelCpv; }
46 const Float_t GetCPVpedestal() const { return fADCpedestalCpv; }
48 void SetCPVNoise(Float_t CPVNoise) {fCPVNoise = CPVNoise;}
49 void SetCPVThreshold(Float_t CPVThreshold) {fCPVDigitThreshold= CPVThreshold;}
50 void SetNCPVchannels(Int_t n) { fNADCcpv = n; }
51 void SetCPVchannel(Float_t width) { fADCchanelCpv = width; }
52 void SetCPVpedestal(Float_t ped) { fADCpedestalCpv = ped; }
56 const Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
57 const Float_t GetEMCchannel() const { return fADCchanelEmc; }
58 const Float_t GetEMCpedestal() const { return fADCpedestalEmc; }
59 const Float_t GetPinNoise() const { return fPinNoise;}
60 const Float_t GetTimeResolution() const { return fTimeResolution ; }
62 void SetEMCThreshold(Float_t EMCThreshold) {fEMCDigitThreshold = EMCThreshold;}
63 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
64 void SetNEMCchannels(Int_t n) { fNADCemc = n; }
65 void SetEMCchannel(Float_t width) { fADCchanelEmc = width; }
66 void SetEMCpedestal(Float_t ped) { fADCpedestalEmc = ped ; }
69 const Int_t GetDigitsInRun() const { return fDigitsInRun ;}
71 void MixWith(const char* HeaderFile) ; // Add another one file to mix
72 void Print(Option_t* option)const ;
73 void Reset() ; //restarts starts event processing from 0 event(s)
74 void SetSplitFile(const TString splitFileName = "PHOS.Digits.root") ;
75 void SetSDigitsBranch(const char* file) ;
77 AliPHOSDigitizer & operator = (const AliPHOSDigitizer & rvalue) {
78 // assignement operator requested by coding convention but not needed
86 void InitParameters() ;
87 void PrintDigits(Option_t * option) ;
88 void WriteDigits(Int_t evt) ; // Writes Digits for particular event
89 Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise
90 //Calculate the time of crossing of the threshold by front edge
91 Float_t FrontEdgeTime(TClonesArray * ticks) ;
92 //Calculate digitized signal with gived ADC parameters
93 Int_t DigitizeEnergy(Float_t energy, Int_t absId) ;
97 Int_t fEmcCrystals ; // Number of EMC crystalls in the given geometry
99 Float_t fPinNoise ; // Electronics noise in EMC
100 Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC
102 Float_t fCPVNoise ; // Noise in CPV
103 Float_t fCPVDigitThreshold ; // Threshold for storing digits in CPV
105 Int_t fDigitsInRun ; //! Total number of digits in one run
107 Float_t fTimeResolution ; // Time resolution of FEE electronics
108 Float_t fTimeThreshold ; // Threshold to start timing for given crystall
109 Float_t fTimeSignalLength ; // Length of the timing signal
111 Float_t fADCchanelEmc ; // width of one ADC channel in GeV
112 Float_t fADCpedestalEmc ; //
113 Int_t fNADCemc ; // number of channels in EMC ADC
115 Float_t fADCchanelCpv ; // width of one ADC channel in CPV 'popugais'
116 Float_t fADCpedestalCpv ; //
117 Int_t fNADCcpv ; // number of channels in CPV ADC
118 TFile * fSplitFile ; //! file in which Digits will eventually be stored
121 ClassDef(AliPHOSDigitizer,1) // description
126 #endif // AliPHOSDigitizer_H