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 /* History of cvs commits:
11 * Revision 1.33 2005/05/28 14:19:04 schutz
12 * Compilation warnings fixed by T.P.
16 //_________________________________________________________________________
17 // Task Class for making SDigits in PHOS
18 // Class performs digitization of Summable digits (in the PHOS case this is just
19 // sum of contributions of all primary particles into given cell).
20 // In addition it performs mixing of summable digits from different events.
22 //*-- Author: Dmitri Peressounko(SUBATECH & KI)
25 // --- ROOT system ---
26 //#include "TObjString.h"
30 // --- Standard library ---
32 // --- AliRoot header files ---
33 #include "AliDigitizer.h"
34 class AliPHOSSDigitizer ;
35 class AliRunDigitizer ;
37 class AliPHOSDigitizer: public AliDigitizer {
40 AliPHOSDigitizer() ; // ctor
41 AliPHOSDigitizer(TString alirunFileNameFile, TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ;
42 AliPHOSDigitizer(const AliPHOSDigitizer & dtizer) ;
43 AliPHOSDigitizer(AliRunDigitizer * manager) ;
44 virtual ~AliPHOSDigitizer() ;
46 void Digitize(Int_t event) ; // Make Digits from SDigits
47 void Exec(Option_t *option); // Supervising method
50 Float_t GetCPVNoise() const { return fCPVNoise ;}
51 Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;}
52 Float_t GetCPVchannel() const { return fADCchanelCpv; }
53 Float_t GetCPVpedestal() const { return fADCpedestalCpv; }
55 void SetCPVNoise(Float_t CPVNoise) {fCPVNoise = CPVNoise;}
56 void SetCPVThreshold(Float_t CPVThreshold) {fCPVDigitThreshold= CPVThreshold;}
57 void SetNCPVchannels(Int_t n) { fNADCcpv = n; }
58 void SetCPVchannel(Float_t width) { fADCchanelCpv = width; }
59 void SetCPVpedestal(Float_t ped) { fADCpedestalCpv = ped; }
63 Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
64 Float_t GetEMCchannel() const { return fADCchanelEmc; }
65 Float_t GetEMCpedestal() const { return fADCpedestalEmc; }
66 Float_t GetPinNoise() const { return fPinNoise;}
67 Float_t GetTimeResolution() const { return fTimeResolution ; }
69 void SetEMCThreshold(Float_t EMCThreshold) {fEMCDigitThreshold = EMCThreshold;}
70 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
71 void SetNEMCchannels(Int_t n) { fNADCemc = n; }
72 void SetEMCchannel(Float_t width) { fADCchanelEmc = width; }
73 void SetEMCpedestal(Float_t ped) { fADCpedestalEmc = ped ; }
74 void SetEventFolderName(TString name) { fEventFolderName = name ; }
75 void SetTimeResolution(Float_t res){ fTimeResolution = res ; }
76 void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
79 Int_t GetDigitsInRun() const { return fDigitsInRun ;}
80 void MixWith(TString alirunFileName,
81 TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; // Add another one file to mix
83 void Print(const Option_t * = "")const ;
85 AliPHOSDigitizer & operator = (const AliPHOSDigitizer & /*rvalue*/) {
86 // assignement operator requested by coding convention but not needed
87 Fatal("operator =", "not implemented") ;
93 virtual Bool_t Init() ;
94 void InitParameters() ;
95 void PrintDigits(Option_t * option) ;
97 void WriteDigits() ; // Writes Digits for the current event
98 Float_t TimeOfNoise(void) const; // Calculate time signal generated by noise
100 //Calculate the time of crossing of the threshold by front edge
101 Float_t FrontEdgeTime(TClonesArray * ticks) const ;
102 //Calculate digitized signal with gived ADC parameters
103 void DecalibrateEMC(AliPHOSDigit * digit);
104 Int_t DigitizeCPV(Float_t charge, Int_t absId) ;
108 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
109 Int_t fDigitsInRun ; //! Total number of digits in one run
110 Bool_t fInit ; //! To avoid overwriting existing files
112 Int_t fInput ; // Number of files to merge
113 TString * fInputFileNames ; //[fInput] List of file names to merge
114 TString * fEventNames ; //[fInput] List of event names to merge
116 Int_t fEmcCrystals ; // Number of EMC crystalls in the given geometry
118 Float_t fPinNoise ; // Electronics noise in EMC
119 Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC
121 Float_t fCPVNoise ; // Noise in CPV
122 Float_t fCPVDigitThreshold ; // Threshold for storing digits in CPV
125 Float_t fTimeResolution ; // Time resolution of FEE electronics
126 Float_t fTimeThreshold ; // Threshold to start timing for given crystall
127 Float_t fTimeSignalLength ; // Length of the timing signal
129 Float_t fADCchanelEmc ; // width of one ADC channel in GeV
130 Float_t fADCpedestalEmc ; // value of the EMC ADC pedestal
131 Int_t fNADCemc ; // number of channels in EMC ADC
133 Float_t fADCchanelCpv ; // width of one ADC channel in CPV units
134 Float_t fADCpedestalCpv ; // value of the CPV ADC pedestal in CPV units
135 Int_t fNADCcpv ; // number of channels in CPV ADC
137 TString fEventFolderName; // skowron: name of EFN to read data from in stand alone mode
138 Int_t fFirstEvent; // first event to process
139 Int_t fLastEvent; // last event to process
141 ClassDef(AliPHOSDigitizer,3) // description
146 #endif // AliPHOSDigitizer_H