]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALCalibAbs.h
first version of new classes for time-dependent corrections; not yet used in Preproce...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALCalibAbs.h
CommitLineData
d81e6423 1#ifndef ALIEMCALCALIBABS_H
2#define ALIEMCALCALIBABS_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id: $ */
8
9#include <TObject.h>
10#include "AliEMCALGeoParams.h"
11class TString;
12
13/*
14 Objects of this class contain basis for absolute calibrations
15 AliEMCALCalibAbs inherits TObject only to use AliLog "functions".
16*/
17
18class AliEMCALCalibAbs : public TObject {
19
20public:
21
22 enum kProblemType {kNoLED=-999};// code in possible problems
23
24 AliEMCALCalibAbs();
25
26 // Read and Write txt I/O methods are normally not used, but are useful for
27 // debug purposes
28 void ReadCalibAbsInfo(Int_t nSM, const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to 12 SuperModules
29
30 void WriteCalibAbsInfo(const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to 12 SuperModules
31
32 virtual ~AliEMCALCalibAbs();
33
34 // total calibration factor is a product of
35 // a) overall calibration factor [fAbsoluteGain]
36 // b) individual gain factor per tower [fRelativeGain]
37 // c) time-dependent correction
38 // In this class we store a), b) and the needed static ingredients for c)
39
40 // values per single tower
41 struct AliEMCALCalibAbsVal {
42 Float_t fRelativeGain; // (ADC>GeV relative gain/conversion), value around 1
43 Float_t fHighLowRatio; // value around 16 or so
44 Int_t fHighLow; // 0 (low) or 1 (high) gain, used for LEDAmp info
45 Float_t fLEDAmp; // LED amplitude
46 Float_t fLEDAmpRMS; // RMS
47 };
48
49 // 1 SuperModule's worth of info: info on where the different APDs are
50 struct AliEMCALSuperModuleCalibAbs {
51 // first: overall values for the whole SuperModule
52 Int_t fSuperModuleNum; // which SuperModule is this?
53 Int_t fCalibMethod; // a la 0=cosmics, 1=pi0, 2=electrons,3=using ecore,
54 Int_t fCalibPass; // which analysis iteration is this.. 1,2,..N
55 Int_t fCalibTime; // t0, unix timestamp
56 Float_t fAbsoluteGain; // (ADC>GeV absolute gain/conversion)
57
58 // second: additional info for LED Reference and SM temperature
59 Float_t fLEDRefAmp[AliEMCALGeoParams::fgkEMCALLEDRefs]; // LED amplitude at t0, low gain equivalent
60 Float_t fLEDRefAmpRMS[AliEMCALGeoParams::fgkEMCALLEDRefs]; // RMS
61 Float_t fLEDRefHighLowRatio[AliEMCALGeoParams::fgkEMCALLEDRefs]; // value around 16 or so
62 Int_t fLEDRefHighLow[AliEMCALGeoParams::fgkEMCALLEDRefs]; // 0 (low) or 1 (high) gain
63
64 Float_t fTemperature[AliEMCALGeoParams::fgkEMCALTempSensors]; // temperature at t0
65 Float_t fTemperatureRMS[AliEMCALGeoParams::fgkEMCALTempSensors]; // RMS
66
67 // third: individual info for each tower
68 AliEMCALCalibAbsVal fAPDVal[AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows]; // at t0
69 };
70
71 // pointer to stored info.
72
73 Int_t GetNSuperModule() const { return fNSuperModule; };
74 AliEMCALSuperModuleCalibAbs * GetSuperModuleData() const { return fSuperModuleData; };
75
76 // - via the index in the stored array:
77 virtual AliEMCALSuperModuleCalibAbs GetSuperModuleCalibAbsId(Int_t smIndex) const;
78 // - or via the actual SM number
79 virtual AliEMCALSuperModuleCalibAbs GetSuperModuleCalibAbsNum(Int_t smNum) const;
80
81protected:
82
83 Int_t fNSuperModule; // Number of supermodules.
84 AliEMCALSuperModuleCalibAbs *fSuperModuleData; // SuperModule data
85
86private:
87
88 AliEMCALCalibAbs(const AliEMCALCalibAbs &);
89 AliEMCALCalibAbs &operator = (const AliEMCALCalibAbs &);
90
91 ClassDef(AliEMCALCalibAbs, 1) //CalibAbs data reader
92};
93
94#endif