Line data Source code
1 : #ifndef ALIADDigitizer_H
2 : #define ALIADDigitizer_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 AD
9 : ///_________________________________________________________________________
10 :
11 :
12 : // --- Standard library ---
13 :
14 : // --- AliRoot header files ---
15 :
16 : #include "AliDigitizer.h"
17 : #include "AliADConst.h"
18 : #include "TSpline.h"
19 :
20 : class TClonesArray;
21 : class TF1;
22 : class AliDigitizationInput;
23 : class AliCDBManager;
24 : class AliCDBStorage;
25 : class AliADCalibData;
26 : class AliAD;
27 : class TSpline3;
28 :
29 : class AliADDigitizer: public AliDigitizer {
30 :
31 : public:
32 : enum DigiTask_t {
33 : kHits2Digits,
34 : kHits2SDigits
35 : };
36 :
37 : AliADDigitizer() ; // default constructor
38 : AliADDigitizer(AliAD *AD, DigiTask_t task); // constructor
39 : AliADDigitizer(AliDigitizationInput* digInput); // constructor
40 : virtual ~AliADDigitizer() ; // 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, Bool_t bbFlag, Bool_t bgFlag, 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 : AliADCalibData *GetCalibData() const;
58 : void GetTimeSlewingSplines();
59 : void ExtrapolateSplines();
60 : Float_t UnCorrectLeadingTime(Int_t i, Float_t time, Float_t adc) const;
61 : Float_t SmearLeadingTime(Int_t i, Float_t time) const;
62 :
63 0 : TF1* GetChargeSignalShape() const { return fChargeSignalShape; }
64 0 : TF1* GetTimeSignalShape() const { return fTimeSignalShape; }
65 :
66 : double ChargeSignalShape(double *x, double *par);
67 : double TimeSignalShape(double *x, double *par);
68 : double ThresholdShape(double *x, double *par);
69 :
70 : protected:
71 :
72 : AliADCalibData *fCalibData; //! calibration data
73 :
74 : private:
75 :
76 : AliADDigitizer(const AliADDigitizer& /*digitizer*/);
77 :
78 : AliADDigitizer& operator = (const AliADDigitizer& /*digitizer*/);
79 :
80 : Int_t fNdigits; //! Number of digits
81 : TClonesArray *fDigits; //! List of digits
82 :
83 : TF1* fChargeSignalShape; // function which describes the charge signal shape
84 : Float_t fCssTau[16];
85 : Float_t fCssSigma[16];
86 : Float_t fCssOffset[16];
87 :
88 : TF1* fTimeSignalShape; // function which describes the time response
89 :
90 : TF1* fThresholdShape; // function which describes theshold shape
91 :
92 : Float_t fAdc[16][kADNClocks]; //! Container for ADC samples
93 : Float_t fLeadingTime[16]; //! Leading time container
94 : Float_t fTimeWidth[16]; //! Time width container
95 : Bool_t fBBFlag[16]; //! Container for BB flags
96 : Bool_t fBGFlag[16]; //! Container for BG flags
97 : Float_t fAdcPedestal[16][2]; //! Pedestals, one per integrator
98 : Float_t fAdcSigma[16][2]; //! Sigma of pedestals
99 : Float_t fPmGain[16]; //! PMT gains
100 : Int_t fNBins[16]; //! Number of bins in fTime container
101 : Int_t fNBinsLT[16]; //! Number of bins in fTime container (match window only)
102 : Float_t fBinSize[16]; //! Bin size in fTime container
103 : Float_t fHptdcOffset[16]; //! HPTDC time offsets channel by channel
104 : Float_t fClockOffset[16]; //! Clock offsets channel by channel
105 : TSpline3 *fTimeSlewingSpline[16]; //! Time slewing splines
106 : TF1 *fTimeSlewingExtpol[16]; //! Extrapolation to low charges
107 :
108 : Float_t *fTime[16]; //! Main container used in digitization
109 : Int_t fLabels[16][3]; //! Container for MC labels
110 : Bool_t fEvenOrOdd; //! Choise of integrator in central ADC sample
111 :
112 : DigiTask_t fTask; //! The task (to be) executed by the digitizer
113 : AliAD *fAD; //! Pointer to AliDetector object
114 12 : ClassDef(AliADDigitizer,3) // digitizer for AD
115 :
116 : };
117 :
118 : #endif // AliADDigitizer_H
|