]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSDigitizer.h
The standalone QA data maker is called from AliSimulation and AliReconstruction outsi...
[u/mrichter/AliRoot.git] / PHOS / AliPHOSDigitizer.h
CommitLineData
990119d6 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
702ab87e 8/* History of cvs commits:
9 *
10 * $Log$
c65c502a 11 * Revision 1.37 2007/10/10 09:05:10 schutz
12 * Changing name QualAss to QA
13 *
b8274834 14 * Revision 1.36 2007/09/30 17:08:20 schutz
15 * Introducing the notion of QA data acquisition cycle (needed by online)
16 *
5b188f2f 17 * Revision 1.35 2007/08/07 14:12:03 kharlov
18 * Quality assurance added (Yves Schutz)
19 *
ddd1a39c 20 * Revision 1.34 2006/04/29 20:25:30 hristov
21 * Decalibration is implemented (Yu.Kharlov)
22 *
877695e7 23 * Revision 1.33 2005/05/28 14:19:04 schutz
24 * Compilation warnings fixed by T.P.
25 *
702ab87e 26 */
27
990119d6 28//_________________________________________________________________________
29// Task Class for making SDigits in PHOS
baef0810 30// Class performs digitization of Summable digits (in the PHOS case this is just
31// sum of contributions of all primary particles into given cell).
32// In addition it performs mixing of summable digits from different events.
990119d6 33//
34//*-- Author: Dmitri Peressounko(SUBATECH & KI)
35
36
37// --- ROOT system ---
e957fea8 38//#include "TObjString.h"
8cb3533f 39class TArrayI ;
fb43c866 40class TClonesArray ;
41
990119d6 42// --- Standard library ---
43
44// --- AliRoot header files ---
3f81a70b 45#include "AliDigitizer.h"
990119d6 46class AliPHOSSDigitizer ;
c65c502a 47//class AliPHOSQADataMaker ;
3f81a70b 48class AliRunDigitizer ;
8cb3533f 49
93aeb834 50class AliPHOSDigitizer: public AliDigitizer {
990119d6 51
52public:
53 AliPHOSDigitizer() ; // ctor
e191bb57 54 AliPHOSDigitizer(TString alirunFileNameFile, TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ;
88cb7938 55 AliPHOSDigitizer(const AliPHOSDigitizer & dtizer) ;
56 AliPHOSDigitizer(AliRunDigitizer * manager) ;
990119d6 57 virtual ~AliPHOSDigitizer() ;
8cb3533f 58
fc7e2f43 59 void Digitize(Int_t event) ; // Make Digits from SDigits
3758d9fc 60 void Exec(Option_t *option); // Supervising method
8cb3533f 61
3758d9fc 62 //CPV parameters
fc7e2f43 63 Float_t GetCPVNoise() const { return fCPVNoise ;}
64 Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;}
65 Float_t GetCPVchannel() const { return fADCchanelCpv; }
66 Float_t GetCPVpedestal() const { return fADCpedestalCpv; }
3758d9fc 67
68 void SetCPVNoise(Float_t CPVNoise) {fCPVNoise = CPVNoise;}
69 void SetCPVThreshold(Float_t CPVThreshold) {fCPVDigitThreshold= CPVThreshold;}
70 void SetNCPVchannels(Int_t n) { fNADCcpv = n; }
71 void SetCPVchannel(Float_t width) { fADCchanelCpv = width; }
72 void SetCPVpedestal(Float_t ped) { fADCpedestalCpv = ped; }
73
74
75 //EMC parameters
fc7e2f43 76 Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
77 Float_t GetEMCchannel() const { return fADCchanelEmc; }
78 Float_t GetEMCpedestal() const { return fADCpedestalEmc; }
79 Float_t GetPinNoise() const { return fPinNoise;}
80 Float_t GetTimeResolution() const { return fTimeResolution ; }
7b7c1533 81
3758d9fc 82 void SetEMCThreshold(Float_t EMCThreshold) {fEMCDigitThreshold = EMCThreshold;}
83 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
84 void SetNEMCchannels(Int_t n) { fNADCemc = n; }
85 void SetEMCchannel(Float_t width) { fADCchanelEmc = width; }
86 void SetEMCpedestal(Float_t ped) { fADCpedestalEmc = ped ; }
88cb7938 87 void SetEventFolderName(TString name) { fEventFolderName = name ; }
fbf811ec 88 void SetTimeResolution(Float_t res){ fTimeResolution = res ; }
212d1c0f 89 void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
3758d9fc 90
91 //General
fc7e2f43 92 Int_t GetDigitsInRun() const { return fDigitsInRun ;}
93 void MixWith(TString alirunFileName,
e191bb57 94 TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; // Add another one file to mix
702ab87e 95
96 void Print(const Option_t * = "")const ;
548f0134 97
8c140292 98 AliPHOSDigitizer & operator = (const AliPHOSDigitizer & /*rvalue*/) {
baef0810 99 // assignement operator requested by coding convention but not needed
f1611b7c 100 Fatal("operator =", "not implemented") ;
baef0810 101 return *this ;
102 }
103
ddd1a39c 104
990119d6 105private:
c65c502a 106// AliPHOSQADataMaker * GetQADataMaker() const { return fQADM ; }
3758d9fc 107
88cb7938 108 virtual Bool_t Init() ;
8d0f3f77 109 void InitParameters() ;
8cb3533f 110 void PrintDigits(Option_t * option) ;
88cb7938 111 void Unload() ;
90cceaf6 112 void WriteDigits() ; // Writes Digits for the current event
0bc3b8ed 113 Float_t TimeOfNoise(void) const; // Calculate time signal generated by noise
88cb7938 114
9688c1dd 115 //Calculate the time of crossing of the threshold by front edge
0bc3b8ed 116 Float_t FrontEdgeTime(TClonesArray * ticks) const ;
3758d9fc 117 //Calculate digitized signal with gived ADC parameters
877695e7 118 void DecalibrateEMC(AliPHOSDigit * digit);
119 Int_t DigitizeCPV(Float_t charge, Int_t absId) ;
990119d6 120
3758d9fc 121private:
8cb3533f 122
92f521a9 123 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
88cb7938 124 Int_t fDigitsInRun ; //! Total number of digits in one run
125 Bool_t fInit ; //! To avoid overwriting existing files
126
127 Int_t fInput ; // Number of files to merge
128 TString * fInputFileNames ; //[fInput] List of file names to merge
129 TString * fEventNames ; //[fInput] List of event names to merge
548f0134 130
9688c1dd 131 Int_t fEmcCrystals ; // Number of EMC crystalls in the given geometry
3758d9fc 132
990119d6 133 Float_t fPinNoise ; // Electronics noise in EMC
134 Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC
3758d9fc 135
990119d6 136 Float_t fCPVNoise ; // Noise in CPV
137 Float_t fCPVDigitThreshold ; // Threshold for storing digits in CPV
3758d9fc 138
990119d6 139
9688c1dd 140 Float_t fTimeResolution ; // Time resolution of FEE electronics
9688c1dd 141 Float_t fTimeThreshold ; // Threshold to start timing for given crystall
142 Float_t fTimeSignalLength ; // Length of the timing signal
143
3758d9fc 144 Float_t fADCchanelEmc ; // width of one ADC channel in GeV
0bc3b8ed 145 Float_t fADCpedestalEmc ; // value of the EMC ADC pedestal
3758d9fc 146 Int_t fNADCemc ; // number of channels in EMC ADC
147
0bc3b8ed 148 Float_t fADCchanelCpv ; // width of one ADC channel in CPV units
149 Float_t fADCpedestalCpv ; // value of the CPV ADC pedestal in CPV units
3758d9fc 150 Int_t fNADCcpv ; // number of channels in CPV ADC
fbf811ec 151
88cb7938 152 TString fEventFolderName; // skowron: name of EFN to read data from in stand alone mode
ddd1a39c 153 Int_t fFirstEvent; // first event to process
154 Int_t fLastEvent; // last event to process
c65c502a 155// AliPHOSQADataMaker * fQADM ; //!Quality Assurance Data Maker
ddd1a39c 156 Int_t fEventCounter ; //! counts the events processed
5b188f2f 157
158 //QA stuff
c65c502a 159// static const Int_t fgkCycles = 9999 ; // QA data accumulation cycle
ddd1a39c 160
5b188f2f 161 ClassDef(AliPHOSDigitizer,4) // description
990119d6 162
163};
164
165
166#endif // AliPHOSDigitizer_H