Line data Source code
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 :
6 : ///_________________________________________________________________________
7 : ///
8 : /// Class for making Digits in VZERO
9 : ///_________________________________________________________________________
10 :
11 :
12 : // --- Standard library ---
13 :
14 : // --- AliRoot header files ---
15 :
16 : #include "AliDigitizer.h"
17 :
18 : #include "AliVZEROConst.h"
19 :
20 : class TClonesArray;
21 : class TF1;
22 : class AliDigitizationInput;
23 : class AliCDBManager;
24 : class AliCDBStorage;
25 : class AliVZEROCalibData;
26 : class AliVZERO;
27 :
28 : class AliVZERODigitizer: public AliDigitizer {
29 :
30 : public:
31 :
32 : enum DigiTask_t {
33 : kHits2Digits,
34 : kHits2SDigits
35 : };
36 :
37 : AliVZERODigitizer() ; // default constructor
38 : AliVZERODigitizer(AliVZERO *vzero, DigiTask_t task); // constructor
39 : AliVZERODigitizer(AliDigitizationInput* digInput); // constructor
40 : virtual ~AliVZERODigitizer() ; // destructor
41 :
42 : virtual Bool_t Init();
43 : virtual void Digitize(Option_t* option=0);
44 :
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();
56 :
57 : AliVZEROCalibData *GetCalibData() const;
58 :
59 0 : TF1* GetSignalShape() const { return fSignalShape; }
60 0 : TF1* GetPMResponse() const { return fPMResponse; }
61 0 : TF1* GetSinglePhESpectrum() const { return fSinglePhESpectrum; }
62 : double SignalShape(double *x, double *par);
63 : double PMResponse(double *x, double *par);
64 : double SinglePhESpectrum(double *x, double *par);
65 :
66 : Int_t Cell2Pmt(Int_t cell) const;
67 :
68 : protected:
69 :
70 : AliVZEROCalibData *fCalibData; //! calibration data
71 :
72 : private:
73 :
74 : AliVZERODigitizer(const AliVZERODigitizer& /*digitizer*/);
75 :
76 : AliVZERODigitizer& operator = (const AliVZERODigitizer& /*digitizer*/);
77 :
78 : Float_t fPhotoCathodeEfficiency; // Photocathode efficiency
79 :
80 : Int_t fNdigits; //! Number of digits
81 : TClonesArray *fDigits; //! List of digits
82 :
83 : TF1* fSignalShape; // function which describes the PMT signal shape
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
97 : Float_t fClockOffset[64]; //! Clock offsets channel by channel
98 :
99 : Float_t *fTime[64]; //! Main container used in digitization
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 :
106 30774 : ClassDef(AliVZERODigitizer,7) // digitizer for VZERO
107 :
108 : };
109 :
110 : #endif // AliVZERODigitizer_H
|