1 #ifndef ALIEMCALCALIBTEMPCOEFF_H
2 #define ALIEMCALCALIBTEMPCOEFF_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 #include <TObjArray.h>
11 #include "AliEMCALGeoParams.h"
16 Objects of this class contain temperature-dependence coefficients
19 // total calibration factor is a product of
20 // a) overall calibration factor [fAbsoluteCalib]
21 // b) individual gain factor per tower [fRelativeCalib]
22 // c) time-dependent correction
23 // In this class we store factors needed for c)
25 // ******* internal class definition *************
27 // 1 SuperModule's worth of info: info on where the different APDs are
28 class AliEMCALSuperModuleCalibTempCoeff : public TObject {
31 AliEMCALSuperModuleCalibTempCoeff(const int smNum=0) : TObject(), // just init values
32 fSuperModuleNum(smNum)
34 for (int icol=0; icol<AliEMCALGeoParams::fgkEMCALCols; icol++) {
35 for (int irow=0; irow<AliEMCALGeoParams::fgkEMCALRows; irow++) {
36 fTC[icol][irow] = 1.0;
44 void SetSuperModuleNum(Int_t i) { fSuperModuleNum = i;}; //
45 Int_t GetSuperModuleNum() const { return fSuperModuleNum;}; //
46 void SetTC(int icol, int irow, Float_t f) { fTC[icol][irow] = f; }; //
47 Float_t GetTC(int icol, int irow) const { return fTC[icol][irow]; }; //
48 void SetSrc(int icol, int irow, Int_t i) { fSrc[icol][irow] = i; }; //
49 Int_t GetSrc(int icol, int irow) const { return fSrc[icol][irow]; }; //
52 Int_t fSuperModuleNum; // which SuperModule is this?
53 // individual info for each tower
54 Float_t fTC[AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows]; // Temperature Coefficient values (nominally around 2% change per deg C)
55 Int_t fSrc[AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows]; // from DarkCurrent, or LED or ..
57 ClassDef(AliEMCALSuperModuleCalibTempCoeff, 1) // help class
59 // ******* end of internal class definition *************
61 class AliEMCALCalibTempCoeff : public TObject {
65 enum kSrcType {kDarkCurrent=0, kLED=1};// code in possible sources
67 AliEMCALCalibTempCoeff(const int nSM = AliEMCALGeoParams::fgkEMCALModules);
69 // Read and Write txt I/O methods are normally not used, but are useful for
70 // filling the object before it is saved in OCDB
71 void ReadTextCalibTempCoeffInfo(Int_t nSM, const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCalModules
72 void WriteTextCalibTempCoeffInfo(const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCalModules
73 void ReadRootCalibTempCoeffInfo(const TString &rootFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCalModules
74 void ReadTreeCalibTempCoeffInfo(TTree *tree, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCalModules
75 void WriteRootCalibTempCoeffInfo(const TString &rootFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCalModules
77 virtual ~AliEMCALCalibTempCoeff();
79 // pointer to stored info.
80 Int_t GetNSuperModule() const { return fNSuperModule; };
82 // - via the index in the stored array:
83 virtual AliEMCALSuperModuleCalibTempCoeff * GetSuperModuleCalibTempCoeffId(Int_t smIndex) const
84 { return (AliEMCALSuperModuleCalibTempCoeff*) fSuperModuleData[smIndex]; };
86 // - or via the actual SM number
87 virtual AliEMCALSuperModuleCalibTempCoeff * GetSuperModuleCalibTempCoeffNum(Int_t smNum) const;
91 Int_t fNSuperModule; // Number of supermodules.
92 TObjArray fSuperModuleData; // SuperModule data
96 AliEMCALCalibTempCoeff(const AliEMCALCalibTempCoeff &);
97 AliEMCALCalibTempCoeff &operator = (const AliEMCALCalibTempCoeff &);
99 ClassDef(AliEMCALCalibTempCoeff, 1) //CalibTempCoeff data info