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