]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PHOS/AliPHOSDigitizer.h
Time of samples is read from raw data
[u/mrichter/AliRoot.git] / PHOS / AliPHOSDigitizer.h
... / ...
CommitLineData
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 */
5
6/* $Id$ */
7
8/* History of cvs commits:
9 *
10 * $Log$
11 * Revision 1.33 2005/05/28 14:19:04 schutz
12 * Compilation warnings fixed by T.P.
13 *
14 */
15
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.
21//
22//*-- Author: Dmitri Peressounko(SUBATECH & KI)
23
24
25// --- ROOT system ---
26//#include "TObjString.h"
27class TArrayI ;
28class TClonesArray ;
29
30// --- Standard library ---
31
32// --- AliRoot header files ---
33#include "AliDigitizer.h"
34class AliPHOSSDigitizer ;
35class AliRunDigitizer ;
36
37class AliPHOSDigitizer: public AliDigitizer {
38
39public:
40 AliPHOSDigitizer() ; // ctor
41 AliPHOSDigitizer(TString alirunFileNameFile, TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ;
42 AliPHOSDigitizer(const AliPHOSDigitizer & dtizer) ;
43 AliPHOSDigitizer(AliRunDigitizer * manager) ;
44 virtual ~AliPHOSDigitizer() ;
45
46 void Digitize(Int_t event) ; // Make Digits from SDigits
47 void Exec(Option_t *option); // Supervising method
48
49 //CPV parameters
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; }
54
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; }
60
61
62 //EMC parameters
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 ; }
68
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; }
77
78 //General
79 Int_t GetDigitsInRun() const { return fDigitsInRun ;}
80 void MixWith(TString alirunFileName,
81 TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; // Add another one file to mix
82
83 void Print(const Option_t * = "")const ;
84
85 AliPHOSDigitizer & operator = (const AliPHOSDigitizer & /*rvalue*/) {
86 // assignement operator requested by coding convention but not needed
87 Fatal("operator =", "not implemented") ;
88 return *this ;
89 }
90
91private:
92
93 virtual Bool_t Init() ;
94 void InitParameters() ;
95 void PrintDigits(Option_t * option) ;
96 void Unload() ;
97 void WriteDigits() ; // Writes Digits for the current event
98 Float_t TimeOfNoise(void) const; // Calculate time signal generated by noise
99
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) ;
105
106private:
107
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
111
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
115
116 Int_t fEmcCrystals ; // Number of EMC crystalls in the given geometry
117
118 Float_t fPinNoise ; // Electronics noise in EMC
119 Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC
120
121 Float_t fCPVNoise ; // Noise in CPV
122 Float_t fCPVDigitThreshold ; // Threshold for storing digits in CPV
123
124
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
128
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
132
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
136
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
140
141 ClassDef(AliPHOSDigitizer,3) // description
142
143};
144
145
146#endif // AliPHOSDigitizer_H