]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSDigitizer.h
Merging classes
[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 ---
18#include "TTask.h"
eb6c38ee 19#include "TObjString.h"
8cb3533f 20class TArrayI ;
990119d6 21// --- Standard library ---
22
23// --- AliRoot header files ---
3f81a70b 24#include "AliDigitizer.h"
990119d6 25class AliPHOSSDigitizer ;
3f81a70b 26class AliRunDigitizer ;
8cb3533f 27
990119d6 28class AliPHOSDigitizer: public TTask {
29
30public:
31 AliPHOSDigitizer() ; // ctor
3f81a70b 32 AliPHOSDigitizer(const char *headerFile, const char * name = "Default") ;
33 AliPHOSDigitizer(AliRunDigitizer * ard) ;
34 AliPHOSDigitizer(const AliPHOSDigitizer & dtizer)
35 {( (AliPHOSDigitizer &)dtizer ).Copy(*this) ;}
990119d6 36 virtual ~AliPHOSDigitizer() ;
8cb3533f 37
7b7c1533 38 void Digitize(const Int_t event) ; // Make Digits from SDigits
3758d9fc 39 void Exec(Option_t *option); // Supervising method
8cb3533f 40
3758d9fc 41 //CPV parameters
7b7c1533 42 const Float_t GetCPVNoise() const { return fCPVNoise ;}
43 const Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;}
3758d9fc 44 const Float_t GetCPVchannel() const { return fADCchanelCpv; }
45 const Float_t GetCPVpedestal() const { return fADCpedestalCpv; }
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
7b7c1533 55 const Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
3758d9fc 56 const Float_t GetEMCchannel() const { return fADCchanelEmc; }
57 const Float_t GetEMCpedestal() const { return fADCpedestalEmc; }
7b7c1533 58 const Float_t GetPinNoise() const { return fPinNoise;}
9688c1dd 59 const 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 ; }
66
67 //General
68 const Int_t GetDigitsInRun() const { return fDigitsInRun ;}
69
7b7c1533 70 void MixWith(const char* HeaderFile) ; // Add another one file to mix
3f81a70b 71 void Print(Option_t* option)const ;
8cb3533f 72 void Reset() ; //restarts starts event processing from 0 event(s)
73
8cb3533f 74 void SetSDigitsBranch(const char* file) ;
75
baef0810 76 AliPHOSDigitizer & operator = (const AliPHOSDigitizer & rvalue) {
77 // assignement operator requested by coding convention but not needed
78 abort() ;
79 return *this ;
80 }
81
990119d6 82private:
3758d9fc 83
3f81a70b 84 Bool_t Init() ;
8cb3533f 85 void PrintDigits(Option_t * option) ;
7b7c1533 86 void WriteDigits(Int_t evt) ; // Writes Digits for particular event
9688c1dd 87 Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise
9688c1dd 88 //Calculate the time of crossing of the threshold by front edge
3758d9fc 89 Float_t FrontEdgeTime(TClonesArray * ticks) ;
90 //Calculate digitized signal with gived ADC parameters
91 Int_t DigitizeEnergy(Float_t energy, Int_t absId) ;
990119d6 92
3758d9fc 93private:
8cb3533f 94
3f81a70b 95 AliRunDigitizer * fARD ; //! Pointer to the Digitization Manager class
3758d9fc 96
9688c1dd 97 Int_t fEmcCrystals ; // Number of EMC crystalls in the given geometry
3758d9fc 98
990119d6 99 Float_t fPinNoise ; // Electronics noise in EMC
100 Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC
3758d9fc 101
990119d6 102 Float_t fCPVNoise ; // Noise in CPV
103 Float_t fCPVDigitThreshold ; // Threshold for storing digits in CPV
3758d9fc 104
3f81a70b 105 Int_t fDigitsInRun ; //! Total number of digits in one run
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
112 Float_t fADCpedestalEmc ; //
113 Int_t fNADCemc ; // number of channels in EMC ADC
114
115 Float_t fADCchanelCpv ; // width of one ADC channel in CPV 'popugais'
116 Float_t fADCpedestalCpv ; //
117 Int_t fNADCcpv ; // number of channels in CPV ADC
9688c1dd 118
990119d6 119
120 ClassDef(AliPHOSDigitizer,1) // description
121
122};
123
124
125#endif // AliPHOSDigitizer_H