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