]> git.uio.no Git - u/mrichter/AliRoot.git/blob - VZERO/AliVZERODigitizer.h
Introduction of summable digit class. The implementation of SDigitization and RAW2SDi...
[u/mrichter/AliRoot.git] / VZERO / AliVZERODigitizer.h
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 AliRunDigitizer;
23 class AliCDBManager;
24 class AliCDBStorage;
25 class AliVZEROCalibData;
26
27 class AliVZERODigitizer: public AliDigitizer {
28
29  public:
30
31    AliVZERODigitizer() ;                       // constructor
32    AliVZERODigitizer(AliRunDigitizer *manager);// constructor
33    virtual ~AliVZERODigitizer() ;              // destructor
34   
35    virtual Bool_t Init();
36    virtual void   Exec(Option_t* option=0);
37
38    void AddDigit(Int_t PMnumber, Float_t time, Float_t width, Bool_t integrator, Short_t *chargeADC, Int_t *labels);
39    void ResetDigit();
40                                                 
41    AliVZEROCalibData *GetCalibData() const;
42
43    TF1*   GetSignalShape() const { return fSignalShape; }
44    TF1*   GetPMResponse() const { return fPMResponse; }
45    TF1*   GetSinglePhESpectrum() const { return fSinglePhESpectrum; }
46    double SignalShape(double *x, double *par);
47    double PMResponse(double *x, double *par);
48    double SinglePhESpectrum(double *x, double *par);
49
50    Int_t  Cell2Pmt(Int_t cell) const;
51
52  protected:
53  
54    AliVZEROCalibData *fCalibData;  //! calibration data
55  
56  private:
57  
58    AliVZERODigitizer(const AliVZERODigitizer& /*digitizer*/); 
59       
60    AliVZERODigitizer& operator = (const AliVZERODigitizer& /*digitizer*/); 
61   
62    Float_t  fPhotoCathodeEfficiency; // Photocathode efficiency
63
64    Int_t    fNdigits;                //! Number of digits
65    TClonesArray *fDigits;            //! List of digits
66    
67    TF1*     fSignalShape;            // function which describes the PMT signal shape
68    TF1*     fPMResponse;             // function which describes the PM time response
69    TF1*     fSinglePhESpectrum;      // function which describes the single ph.e. PM response
70
71    Float_t  fAdc[64][kNClocks];      //! Container for ADC samples
72    Float_t  fLeadingTime[64];        //! Leading time container
73    Float_t  fTimeWidth[64];          //! Time width container
74    Float_t  fAdcPedestal[64][2];     //! Pedestals, one per integrator
75    Float_t  fAdcSigma[64][2];        //! Sigma of pedestals
76    Float_t  fPmGain[64];             //! PMT gains
77    Int_t    fNBins[64];              //! Number of bins in fTime container
78    Int_t    fNBinsLT[64];            //! Number of bins in fTime container (match window only)
79    Float_t  fBinSize[64];            //! Bin size in fTime container
80    Float_t  fHptdcOffset[64];        //! HPTDC time offsets channel by channel
81
82    Float_t *fTime[64];               //! Main container used in digitization
83    
84    ClassDef(AliVZERODigitizer,5)     // digitizer for VZERO
85
86 };
87
88 #endif // AliVZERODigitizer_H