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:
13 //_________________________________________________________________________
14 // Task Class for making SDigits in PHOS
15 // Class performs digitization of Summable digits (in the PHOS case this is just
16 // sum of contributions of all primary particles into given cell).
17 // In addition it performs mixing of summable digits from different events.
19 //*-- Author: Dmitri Peressounko(SUBATECH & KI)
22 // --- ROOT system ---
23 //#include "TObjString.h"
27 // --- Standard library ---
29 // --- AliRoot header files ---
30 #include "AliDigitizer.h"
31 class AliPHOSSDigitizer ;
32 class AliRunDigitizer ;
34 class AliPHOSDigitizer: public AliDigitizer {
37 AliPHOSDigitizer() ; // ctor
38 AliPHOSDigitizer(TString alirunFileNameFile, TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ;
39 AliPHOSDigitizer(const AliPHOSDigitizer & dtizer) ;
40 AliPHOSDigitizer(AliRunDigitizer * manager) ;
41 virtual ~AliPHOSDigitizer() ;
43 void Digitize(Int_t event) ; // Make Digits from SDigits
44 void Exec(Option_t *option); // Supervising method
47 Float_t GetCPVNoise() const { return fCPVNoise ;}
48 Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;}
49 Float_t GetCPVchannel() const { return fADCchanelCpv; }
50 Float_t GetCPVpedestal() const { return fADCpedestalCpv; }
52 void SetCPVNoise(Float_t CPVNoise) {fCPVNoise = CPVNoise;}
53 void SetCPVThreshold(Float_t CPVThreshold) {fCPVDigitThreshold= CPVThreshold;}
54 void SetNCPVchannels(Int_t n) { fNADCcpv = n; }
55 void SetCPVchannel(Float_t width) { fADCchanelCpv = width; }
56 void SetCPVpedestal(Float_t ped) { fADCpedestalCpv = ped; }
60 Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
61 Float_t GetEMCchannel() const { return fADCchanelEmc; }
62 Float_t GetEMCpedestal() const { return fADCpedestalEmc; }
63 Float_t GetPinNoise() const { return fPinNoise;}
64 Float_t GetTimeResolution() const { return fTimeResolution ; }
66 void SetEMCThreshold(Float_t EMCThreshold) {fEMCDigitThreshold = EMCThreshold;}
67 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
68 void SetNEMCchannels(Int_t n) { fNADCemc = n; }
69 void SetEMCchannel(Float_t width) { fADCchanelEmc = width; }
70 void SetEMCpedestal(Float_t ped) { fADCpedestalEmc = ped ; }
71 void SetEventFolderName(TString name) { fEventFolderName = name ; }
72 void SetTimeResolution(Float_t res){ fTimeResolution = res ; }
73 void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
76 Int_t GetDigitsInRun() const { return fDigitsInRun ;}
77 void MixWith(TString alirunFileName,
78 TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; // Add another one file to mix
80 void Print(const Option_t * = "")const ;
82 AliPHOSDigitizer & operator = (const AliPHOSDigitizer & /*rvalue*/) {
83 // assignement operator requested by coding convention but not needed
84 Fatal("operator =", "not implemented") ;
90 virtual Bool_t Init() ;
91 void InitParameters() ;
92 void PrintDigits(Option_t * option) ;
94 void WriteDigits() ; // Writes Digits for the current event
95 Float_t TimeOfNoise(void) const; // Calculate time signal generated by noise
97 //Calculate the time of crossing of the threshold by front edge
98 Float_t FrontEdgeTime(TClonesArray * ticks) const ;
99 //Calculate digitized signal with gived ADC parameters
100 Int_t DigitizeEnergy(Float_t energy, Int_t absId) ;
104 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
105 Int_t fDigitsInRun ; //! Total number of digits in one run
106 Bool_t fInit ; //! To avoid overwriting existing files
108 Int_t fInput ; // Number of files to merge
109 TString * fInputFileNames ; //[fInput] List of file names to merge
110 TString * fEventNames ; //[fInput] List of event names to merge
112 Int_t fEmcCrystals ; // Number of EMC crystalls in the given geometry
114 Float_t fPinNoise ; // Electronics noise in EMC
115 Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC
117 Float_t fCPVNoise ; // Noise in CPV
118 Float_t fCPVDigitThreshold ; // Threshold for storing digits in CPV
121 Float_t fTimeResolution ; // Time resolution of FEE electronics
122 Float_t fTimeThreshold ; // Threshold to start timing for given crystall
123 Float_t fTimeSignalLength ; // Length of the timing signal
125 Float_t fADCchanelEmc ; // width of one ADC channel in GeV
126 Float_t fADCpedestalEmc ; // value of the EMC ADC pedestal
127 Int_t fNADCemc ; // number of channels in EMC ADC
129 Float_t fADCchanelCpv ; // width of one ADC channel in CPV units
130 Float_t fADCpedestalCpv ; // value of the CPV ADC pedestal in CPV units
131 Int_t fNADCcpv ; // number of channels in CPV ADC
133 TString fEventFolderName; // skowron: name of EFN to read data from in stand alone mode
134 Int_t fFirstEvent; // first event to process
135 Int_t fLastEvent; // last event to process
137 ClassDef(AliPHOSDigitizer,3) // description
142 #endif // AliPHOSDigitizer_H