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