]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSDigitizer.h
GetRandom returning impact parameter bin and flag for hard process added.
[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 ---
eb6c38ee 18#include "TObjString.h"
8cb3533f 19class TArrayI ;
fb43c866 20class TClonesArray ;
3e357865 21class TFile ;
fb43c866 22
990119d6 23// --- Standard library ---
24
25// --- AliRoot header files ---
3f81a70b 26#include "AliDigitizer.h"
990119d6 27class AliPHOSSDigitizer ;
3f81a70b 28class AliRunDigitizer ;
8cb3533f 29
93aeb834 30class AliPHOSDigitizer: public AliDigitizer {
990119d6 31
32public:
33 AliPHOSDigitizer() ; // ctor
fbf811ec 34 AliPHOSDigitizer(const char *headerFile, const char * name = "Default", const Bool_t toSplit = kFALSE ) ;
3f81a70b 35 AliPHOSDigitizer(AliRunDigitizer * ard) ;
36 AliPHOSDigitizer(const AliPHOSDigitizer & dtizer)
37 {( (AliPHOSDigitizer &)dtizer ).Copy(*this) ;}
990119d6 38 virtual ~AliPHOSDigitizer() ;
8cb3533f 39
7b7c1533 40 void Digitize(const Int_t event) ; // Make Digits from SDigits
3758d9fc 41 void Exec(Option_t *option); // Supervising method
8cb3533f 42
3758d9fc 43 //CPV parameters
7b7c1533 44 const Float_t GetCPVNoise() const { return fCPVNoise ;}
45 const Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;}
3758d9fc 46 const Float_t GetCPVchannel() const { return fADCchanelCpv; }
47 const Float_t GetCPVpedestal() const { return fADCpedestalCpv; }
48
49 void SetCPVNoise(Float_t CPVNoise) {fCPVNoise = CPVNoise;}
50 void SetCPVThreshold(Float_t CPVThreshold) {fCPVDigitThreshold= CPVThreshold;}
51 void SetNCPVchannels(Int_t n) { fNADCcpv = n; }
52 void SetCPVchannel(Float_t width) { fADCchanelCpv = width; }
53 void SetCPVpedestal(Float_t ped) { fADCpedestalCpv = ped; }
54
55
56 //EMC parameters
7b7c1533 57 const Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
3758d9fc 58 const Float_t GetEMCchannel() const { return fADCchanelEmc; }
59 const Float_t GetEMCpedestal() const { return fADCpedestalEmc; }
7b7c1533 60 const Float_t GetPinNoise() const { return fPinNoise;}
9688c1dd 61 const Float_t GetTimeResolution() const { return fTimeResolution ; }
7b7c1533 62
3758d9fc 63 void SetEMCThreshold(Float_t EMCThreshold) {fEMCDigitThreshold = EMCThreshold;}
64 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
65 void SetNEMCchannels(Int_t n) { fNADCemc = n; }
66 void SetEMCchannel(Float_t width) { fADCchanelEmc = width; }
67 void SetEMCpedestal(Float_t ped) { fADCpedestalEmc = ped ; }
fbf811ec 68 void SetTimeResolution(Float_t res){ fTimeResolution = res ; }
3758d9fc 69
70 //General
71 const Int_t GetDigitsInRun() const { return fDigitsInRun ;}
58649d9d 72 void MixWith(const char* HeaderFile,const char* brname = 0) ; // Add another one file to mix
3f81a70b 73 void Print(Option_t* option)const ;
548f0134 74
baef0810 75 AliPHOSDigitizer & operator = (const AliPHOSDigitizer & rvalue) {
76 // assignement operator requested by coding convention but not needed
f1611b7c 77 Fatal("operator =", "not implemented") ;
baef0810 78 return *this ;
79 }
80
990119d6 81private:
3758d9fc 82
3f81a70b 83 Bool_t Init() ;
8d0f3f77 84 void InitParameters() ;
8cb3533f 85 void PrintDigits(Option_t * option) ;
7b7c1533 86 void WriteDigits(Int_t evt) ; // Writes Digits for particular event
0bc3b8ed 87 Float_t TimeOfNoise(void) const; // Calculate time signal generated by noise
9688c1dd 88 //Calculate the time of crossing of the threshold by front edge
0bc3b8ed 89 Float_t FrontEdgeTime(TClonesArray * ticks) const ;
3758d9fc 90 //Calculate digitized signal with gived ADC parameters
91 Int_t DigitizeEnergy(Float_t energy, Int_t absId) ;
990119d6 92
3758d9fc 93private:
8cb3533f 94
92f521a9 95 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
548f0134 96 Int_t fDigitsInRun ; //! Total number of digits in one run
97
9688c1dd 98 Int_t fEmcCrystals ; // Number of EMC crystalls in the given geometry
3758d9fc 99
990119d6 100 Float_t fPinNoise ; // Electronics noise in EMC
101 Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC
3758d9fc 102
990119d6 103 Float_t fCPVNoise ; // Noise in CPV
104 Float_t fCPVDigitThreshold ; // Threshold for storing digits in CPV
3758d9fc 105
990119d6 106
9688c1dd 107 Float_t fTimeResolution ; // Time resolution of FEE electronics
9688c1dd 108 Float_t fTimeThreshold ; // Threshold to start timing for given crystall
109 Float_t fTimeSignalLength ; // Length of the timing signal
110
3758d9fc 111 Float_t fADCchanelEmc ; // width of one ADC channel in GeV
0bc3b8ed 112 Float_t fADCpedestalEmc ; // value of the EMC ADC pedestal
3758d9fc 113 Int_t fNADCemc ; // number of channels in EMC ADC
114
0bc3b8ed 115 Float_t fADCchanelCpv ; // width of one ADC channel in CPV units
116 Float_t fADCpedestalCpv ; // value of the CPV ADC pedestal in CPV units
3758d9fc 117 Int_t fNADCcpv ; // number of channels in CPV ADC
fbf811ec 118
119 Bool_t fToSplit ; //! Do we work in the split mode
120 TFile * fSplitFile ; //! file in which Digits will eventually be stored
9688c1dd 121
990119d6 122
123 ClassDef(AliPHOSDigitizer,1) // description
124
125};
126
127
128#endif // AliPHOSDigitizer_H