]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - ZDC/AliZDCDigitizer.h
SVN keyword Id is set
[u/mrichter/AliRoot.git] / ZDC / AliZDCDigitizer.h
... / ...
CommitLineData
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#include "AliZDCEnCalib.h"
17#include "AliZDCTowerCalib.h"
18
19class AliRunDigitizer;
20
21class AliZDC;
22class AliZDCHit;
23class AliZDCDigit;
24
25class AliZDCDigitizer: public AliDigitizer {
26
27public:
28 AliZDCDigitizer();
29 AliZDCDigitizer(AliRunDigitizer* manager);
30 virtual ~AliZDCDigitizer();
31
32 virtual Bool_t Init();
33 virtual void Exec(Option_t* option=0);
34
35 // PM gain
36 void SetPMGain(Int_t det, Int_t pmDet, Int_t pmGain)
37 {fPMGain[det][pmDet] = pmGain;}
38 Float_t GetPMGain(Int_t det, Int_t pmDet) const
39 {return fPMGain[det][pmDet];}
40 // Conversion factor from charge to ADC channels
41 // F = 1.6E-19 / Resolution [Coulomb/ch]
42 void SetADCRes(Int_t *adcRes) {for (Int_t i=0;i<2;i++) fADCRes[i] = adcRes[i];}
43 // Two conversion factor are needed for ADC CAEN V965
44 Float_t GetADCRes(Int_t i) const {return fADCRes[i];}
45
46 void SetCalibrationOn() {fIsCalibration=1;}
47 AliCDBStorage *SetStorage(const char* uri);
48 AliZDCPedestals *GetPedData() const;
49 AliZDCEnCalib *GetEnCalibData() const;
50 AliZDCTowerCalib *GetTowCalibData() const;
51
52 void SetSpectators2Track() {fSpectators2Track=kTRUE;}
53
54private:
55
56 AliZDCDigitizer(const AliZDCDigitizer&);
57 AliZDCDigitizer& operator=(const AliZDCDigitizer&);
58
59 void Fragmentation(Float_t impPar, Int_t specN, Int_t specP,
60 Int_t &freeSpecN, Int_t &freeSpecP) const;
61 void SpectatorSignal(Int_t SpecType, Int_t numEvents,
62 Float_t pm[3][5]) const;
63
64 Int_t Phe2ADCch(Int_t Detector, Int_t Quadrant, Float_t Light,
65 Int_t Res) const;
66 Int_t Pedestal(Int_t Detector, Int_t Quadrant, Int_t Res) const;
67
68 Float_t fPMGain[6][5]; // PM gain
69 Float_t fADCRes[2]; // ADC conversion factors
70 Int_t fIsCalibration; // !=0 if simulation creates calibration data
71 Bool_t fIsSignalInADCGate; // true if signal in ADC gate
72 Float_t fFracLostSignal; // fraction of lost signal
73
74 AliZDCPedestals *fPedData; //! pedestal calibration data
75 AliZDCEnCalib *fEnCalibData; //! energy and equalization calibration data
76 AliZDCTowerCalib *fTowCalibData; //! energy and equalization calibration data
77
78 Bool_t fSpectators2Track; // should digitizer track spectators
79
80 ClassDef(AliZDCDigitizer, 10) // digitizer for ZDC
81};
82#endif