Important bugfix. Missing reset of the equipment header data. It was causing a wrong...
[u/mrichter/AliRoot.git] / ZDC / AliZDCDigitizer.h
CommitLineData
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"
15#include "AliZDCCalibData.h"
8309c1ab 16
17class AliRunDigitizer;
18
19class AliZDC;
20class AliZDCHit;
21class AliZDCMergedHit;
22class AliZDCDigit;
23
24class AliZDCDigitizer: public AliDigitizer {
25
26public:
27 AliZDCDigitizer();
28 AliZDCDigitizer(AliRunDigitizer* manager);
29 virtual ~AliZDCDigitizer();
30
31 virtual Bool_t Init();
32 virtual void Exec(Option_t* option=0);
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;}
78d18275 46 AliCDBStorage *SetStorage(const char* uri);
7f73eb6b 47 AliZDCCalibData *GetCalibData() const;
8309c1ab 48
49private:
50 void Fragmentation(Float_t impPar, Int_t specN, Int_t specP,
51 Int_t &freeSpecN, Int_t &freeSpecP) const;
52 void SpectatorSignal(Int_t SpecType, Int_t numEvents,
53 Float_t pm[3][5]) const;
54
55 Int_t Phe2ADCch(Int_t Detector, Int_t Quadrant, Float_t Light,
56 Int_t Res) const;
48642b09 57 Int_t Pedestal(Int_t Detector, Int_t Quadrant, Int_t Res) const;
8309c1ab 58
a017f01b 59 Float_t fPMGain[6][5]; // PM gain
78d18275 60 Float_t fADCRes[2]; // ADC conversion factors
48642b09 61
abf60186 62 Int_t fIsCalibration; // !=0 if simulation creates calibration data
78d18275 63 AliZDCCalibData *fCalibData; //! calibration data
8309c1ab 64
abf60186 65 ClassDef(AliZDCDigitizer, 5) // digitizer for ZDC
8309c1ab 66};
67#endif