Calibration object updated
[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]
41 void SetADCRes(Int_t *adcRes)
42 // Two conversion factor are needed for ADC CAEN V965
43 {for (Int_t i=0;i<2;i++) fADCRes[i] = adcRes[i];}
44 Float_t GetADCRes(Int_t i) const {return fADCRes[i];}
48642b09 45
46 void GetStorage(const char* uri) {fStorage = AliCDBManager::Instance()->GetStorage(uri);}
78d18275 47 AliCDBStorage *SetStorage(const char* uri);
48642b09 48 AliZDCCalibData *GetCalibData(int runNumber) const;
8309c1ab 49
50private:
51 void Fragmentation(Float_t impPar, Int_t specN, Int_t specP,
52 Int_t &freeSpecN, Int_t &freeSpecP) const;
53 void SpectatorSignal(Int_t SpecType, Int_t numEvents,
54 Float_t pm[3][5]) const;
55
56 Int_t Phe2ADCch(Int_t Detector, Int_t Quadrant, Float_t Light,
57 Int_t Res) const;
48642b09 58 Int_t Pedestal(Int_t Detector, Int_t Quadrant, Int_t Res) const;
8309c1ab 59
78d18275 60 Float_t fPMGain[3][5]; // PM gain
61 Float_t fADCRes[2]; // ADC conversion factors
48642b09 62
78d18275 63 AliCDBStorage *fStorage; //! storage
64 AliZDCCalibData *fCalibData; //! calibration data
8309c1ab 65
48642b09 66 ClassDef(AliZDCDigitizer, 3) // digitizer for ZDC
8309c1ab 67};
68#endif