Remove stale email recipient.
[u/mrichter/AliRoot.git] / VZERO / AliVZERODigitizer.h
CommitLineData
2434abb9 1#ifndef ALIVZERODigitizer_H
2#define ALIVZERODigitizer_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
b0d2c2d3 6///_________________________________________________________________________
7///
8/// Class for making Digits in VZERO
9///_________________________________________________________________________
2434abb9 10
11
b0d2c2d3 12// --- Standard library ---
13
14// --- AliRoot header files ---
15
2434abb9 16#include "AliDigitizer.h"
2434abb9 17
4e2652e8 18#include "AliVZEROConst.h"
19
2434abb9 20class TClonesArray;
9672d66e 21class TF1;
f21fc003 22class AliDigitizationInput;
ce7090f5 23class AliCDBManager;
24class AliCDBStorage;
25class AliVZEROCalibData;
72da5ce8 26class AliVZERO;
2434abb9 27
28class AliVZERODigitizer: public AliDigitizer {
29
ce7090f5 30 public:
2434abb9 31
72da5ce8 32 enum DigiTask_t {
33 kHits2Digits,
34 kHits2SDigits
35 };
2434abb9 36
72da5ce8 37 AliVZERODigitizer() ; // default constructor
38 AliVZERODigitizer(AliVZERO *vzero, DigiTask_t task); // constructor
f21fc003 39 AliVZERODigitizer(AliDigitizationInput* digInput); // constructor
72da5ce8 40 virtual ~AliVZERODigitizer() ; // destructor
41
ce7090f5 42 virtual Bool_t Init();
f21fc003 43 virtual void Digitize(Option_t* option=0);
2434abb9 44
72da5ce8 45 void DigitizeHits();
46 void DigitizeSDigits();
47 void WriteDigits(AliLoader *loader);
48 void WriteSDigits(AliLoader *loader);
49 void ReadSDigits();
50
51 void AddDigit(Int_t pmnumber, Float_t time, Float_t width, Bool_t integrator, Short_t *chargeADC, Int_t *labels);
52 void AddSDigit(Int_t pmnumber, Int_t nbins, Float_t *charges, Int_t *labels);
53 TClonesArray* DigitsArray();
54 TClonesArray* SDigitsArray();
55 void ResetDigits();
fe0adf2a 56
ce7090f5 57 AliVZEROCalibData *GetCalibData() const;
8adc9b44 58
9672d66e 59 TF1* GetSignalShape() const { return fSignalShape; }
4e2652e8 60 TF1* GetPMResponse() const { return fPMResponse; }
61 TF1* GetSinglePhESpectrum() const { return fSinglePhESpectrum; }
9672d66e 62 double SignalShape(double *x, double *par);
4e2652e8 63 double PMResponse(double *x, double *par);
64 double SinglePhESpectrum(double *x, double *par);
65
66 Int_t Cell2Pmt(Int_t cell) const;
9672d66e 67
ce7090f5 68 protected:
69
70 AliVZEROCalibData *fCalibData; //! calibration data
71
2434abb9 72 private:
ce7090f5 73
0b2bea8b 74 AliVZERODigitizer(const AliVZERODigitizer& /*digitizer*/);
75
76 AliVZERODigitizer& operator = (const AliVZERODigitizer& /*digitizer*/);
2434abb9 77
fe0adf2a 78 Float_t fPhotoCathodeEfficiency; // Photocathode efficiency
2434abb9 79
fe0adf2a 80 Int_t fNdigits; //! Number of digits
81 TClonesArray *fDigits; //! List of digits
82
9672d66e 83 TF1* fSignalShape; // function which describes the PMT signal shape
4e2652e8 84 TF1* fPMResponse; // function which describes the PM time response
85 TF1* fSinglePhESpectrum; // function which describes the single ph.e. PM response
86
87 Float_t fAdc[64][kNClocks]; //! Container for ADC samples
88 Float_t fLeadingTime[64]; //! Leading time container
89 Float_t fTimeWidth[64]; //! Time width container
90 Float_t fAdcPedestal[64][2]; //! Pedestals, one per integrator
91 Float_t fAdcSigma[64][2]; //! Sigma of pedestals
92 Float_t fPmGain[64]; //! PMT gains
93 Int_t fNBins[64]; //! Number of bins in fTime container
94 Int_t fNBinsLT[64]; //! Number of bins in fTime container (match window only)
95 Float_t fBinSize[64]; //! Bin size in fTime container
96 Float_t fHptdcOffset[64]; //! HPTDC time offsets channel by channel
72789100 97 Float_t fClockOffset[64]; //! Clock offsets channel by channel
4e2652e8 98
99 Float_t *fTime[64]; //! Main container used in digitization
72da5ce8 100 Int_t fLabels[64][3]; //! Container for MC labels
101 Bool_t fEvenOrOdd; //! Choise of integrator in central ADC sample
102
103 DigiTask_t fTask; //! The task (to be) executed by the digitizer
104 AliVZERO *fVZERO; //! Pointer to AliDetector object
105
72789100 106 ClassDef(AliVZERODigitizer,7) // digitizer for VZERO
2434abb9 107
108};
109
110#endif // AliVZERODigitizer_H