]>
Commit | Line | Data |
---|---|---|
8309c1ab | 1 | #ifndef ALIZDCDIGITIZER_H |
2 | #define ALIZDCDIGITIZER_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 | // Digitizer class for ZDC // | |
10 | //////////////////////////////////////////////// | |
11 | ||
12 | #include "AliDigitizer.h" | |
48642b09 | 13 | #include "AliCDBManager.h" |
14 | #include "AliCDBStorage.h" | |
6024ec85 | 15 | #include "AliZDCPedestals.h" |
8309c1ab | 16 | |
94ff33bf | 17 | class TFile; |
f21fc003 | 18 | class AliDigitizationInput; |
8309c1ab | 19 | |
20 | class AliZDC; | |
21 | class AliZDCHit; | |
8309c1ab | 22 | class AliZDCDigit; |
23 | ||
24 | class AliZDCDigitizer: public AliDigitizer { | |
25 | ||
26 | public: | |
27 | AliZDCDigitizer(); | |
f21fc003 | 28 | AliZDCDigitizer(AliDigitizationInput* digInput); |
8309c1ab | 29 | virtual ~AliZDCDigitizer(); |
30 | ||
31 | virtual Bool_t Init(); | |
f21fc003 | 32 | virtual void Digitize(Option_t* option=0); |
8309c1ab | 33 | |
34 | // PM gain | |
35 | void SetPMGain(Int_t det, Int_t pmDet, Int_t pmGain) | |
36 | {fPMGain[det][pmDet] = pmGain;} | |
37 | Float_t GetPMGain(Int_t det, Int_t pmDet) const | |
38 | {return fPMGain[det][pmDet];} | |
39 | // Conversion factor from charge to ADC channels | |
40 | // F = 1.6E-19 / Resolution [Coulomb/ch] | |
abf60186 | 41 | void SetADCRes(Int_t *adcRes) {for (Int_t i=0;i<2;i++) fADCRes[i] = adcRes[i];} |
8309c1ab | 42 | // Two conversion factor are needed for ADC CAEN V965 |
8309c1ab | 43 | Float_t GetADCRes(Int_t i) const {return fADCRes[i];} |
48642b09 | 44 | |
abf60186 | 45 | void SetCalibrationOn() {fIsCalibration=1;} |
73bc3a3f | 46 | AliCDBStorage *SetStorage(const char* uri); |
47 | AliZDCPedestals *GetPedData() const; | |
70ecaffe | 48 | |
49 | void SetSpectators2Track() {fSpectators2Track=kTRUE;} | |
5d24ec95 | 50 | void SetBeamEnergy(Float_t beamEnergy) {fBeamEnergy = beamEnergy;} |
8309c1ab | 51 | |
f2e2aa97 | 52 | // Added for p-A simulations |
53 | void SetpAsystem() {fIspASystem=kTRUE;} | |
54 | ||
5d24ec95 | 55 | // Added for RELDIS |
56 | void SetRELDISGenerator() {fIsRELDISgen=kTRUE;} | |
57 | ||
94ff33bf | 58 | void SpectatorSignal(Int_t SpecType, Int_t numEvents, Float_t pm[3][5]); |
59 | ||
60 | ||
8309c1ab | 61 | private: |
cc2abffd | 62 | |
63 | AliZDCDigitizer(const AliZDCDigitizer&); | |
64 | AliZDCDigitizer& operator=(const AliZDCDigitizer&); | |
65 | ||
5d24ec95 | 66 | void CalculatePMTGains(); |
25175f38 | 67 | void ReadPMTGains(); |
5d24ec95 | 68 | |
8309c1ab | 69 | void Fragmentation(Float_t impPar, Int_t specN, Int_t specP, |
70 | Int_t &freeSpecN, Int_t &freeSpecP) const; | |
8309c1ab | 71 | |
72 | Int_t Phe2ADCch(Int_t Detector, Int_t Quadrant, Float_t Light, | |
73 | Int_t Res) const; | |
48642b09 | 74 | Int_t Pedestal(Int_t Detector, Int_t Quadrant, Int_t Res) const; |
8309c1ab | 75 | |
edb4e893 | 76 | Float_t fPMGain[5][5]; // PM gain |
78d18275 | 77 | Float_t fADCRes[2]; // ADC conversion factors |
abf60186 | 78 | Int_t fIsCalibration; // !=0 if simulation creates calibration data |
fd9afd60 | 79 | Bool_t fIsSignalInADCGate; // true if signal in ADC gate |
80 | Float_t fFracLostSignal; // fraction of lost signal | |
6024ec85 | 81 | |
94ff33bf | 82 | AliZDCPedestals *fPedData; //! pedestal calibration data |
70ecaffe | 83 | |
84 | Bool_t fSpectators2Track; // should digitizer track spectators | |
5d24ec95 | 85 | Float_t fBeamEnergy; // beam energy |
86 | TString fBeamType; // beam type | |
f2e2aa97 | 87 | |
88 | // Added for p-A simulations | |
89 | Bool_t fIspASystem; // true if collision system is p-A | |
5d24ec95 | 90 | |
91 | // Added for RELDIS | |
94ff33bf | 92 | Bool_t fIsRELDISgen; // true if generator is RELDIS |
93 | ||
94 | TFile *fSpectatorData; // pointer to stored spectator data files | |
8309c1ab | 95 | |
94ff33bf | 96 | ClassDef(AliZDCDigitizer, 15) // digitizer for ZDC |
8309c1ab | 97 | }; |
98 | #endif |