1 #ifndef ALIEMCALCALIBMAPAPD_H
2 #define ALIEMCALCALIBMAPAPD_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 #include "AliEMCALGeoParams.h"
15 Objects of this class read txt file with APD data
16 AliEMCALCalibMapAPD inherits TObject only to use AliLog "functions".
19 class AliEMCALCalibMapAPD : public TObject {
23 enum kValType {kCalibTemp=25};// 25 deg C used for all APD calibrations
25 AliEMCALCalibMapAPD();
27 // Read and Write txt I/O methods are normally not used, but are useful for
28 // filling the object before it is saved in OCDB
29 void ReadCalibMapAPDInfo(Int_t nSM, const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to 12 SuperModules
31 void WriteCalibMapAPDInfo(const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to 12 SuperModules
33 virtual ~AliEMCALCalibMapAPD();
35 // values per single APD
36 struct AliEMCALCalibMapAPDVal {
38 Int_t fHardWareId; // HardWareIndex
39 // info from APD calibrations
40 Int_t fAPDNum; // assigned APD-PA number; Catania 10000-, Houston: 20000-
41 Float_t fV30; // Catania/Houston Voltage V30 (V) at T = 25 deg C
42 Float_t fPar[3]; // fit parameters, p0,p1,p2 - for ADC vs bias measurement
43 Float_t fParErr[3]; // error on fit parameters
45 Int_t fBreakDown; // Hamamatsu Breakdown Voltage (V)
46 Float_t fDarkCurrent; // Hamamatsu Dark Current (A)
49 // 1 SuperModule's worth of info: info on where the different APDs are
50 struct AliEMCALSuperModuleCalibMapAPD {
51 Int_t fSuperModuleNum;
52 AliEMCALCalibMapAPDVal fAPDVal[AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];
55 // pointer to stored info.
57 Int_t GetNSuperModule() const { return fNSuperModule; };
58 AliEMCALSuperModuleCalibMapAPD * GetSuperModuleData() const { return fSuperModuleData; };
60 // - via the index in the stored array:
61 virtual AliEMCALSuperModuleCalibMapAPD GetSuperModuleCalibMapAPDId(Int_t smIndex) const;
62 // - or via the actual SM number
63 virtual AliEMCALSuperModuleCalibMapAPD GetSuperModuleCalibMapAPDNum(Int_t smNum) const;
65 // method to calculate gain M from fit parameters, and HV value
66 Float_t GetGain(Float_t fitPar[3], Float_t HV) const
67 { return (fitPar[0] + fitPar[1] * exp(fitPar[2]*HV)); };
68 Float_t GetGain(Float_t fitPar0, Float_t fitPar1, Float_t fitPar2, Float_t HV) const
69 { return (fitPar0 + fitPar1 * exp(fitPar2*HV)); };
73 Int_t fNSuperModule; // Number of supermodules.
74 AliEMCALSuperModuleCalibMapAPD *fSuperModuleData; // SuperModule data
78 AliEMCALCalibMapAPD(const AliEMCALCalibMapAPD &);
79 AliEMCALCalibMapAPD &operator = (const AliEMCALCalibMapAPD &);
81 ClassDef(AliEMCALCalibMapAPD, 1) //MapAPD data reader