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