1 #ifndef ALIEMCALCALIBABS_H
2 #define ALIEMCALCALIBABS_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 basis for absolute calibrations
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 a), b)
25 // ******* internal class definition *************
27 // 1 SuperModule's worth of info: info on where the different APDs are
28 class AliEMCALSuperModuleCalibAbs : public TObject {
31 AliEMCALSuperModuleCalibAbs(const int smNum=0) : TObject(), // just init values
32 fSuperModuleNum(smNum),
37 for (int icol=0; icol<AliEMCALGeoParams::fgkEMCALCols; icol++) {
38 for (int irow=0; irow<AliEMCALGeoParams::fgkEMCALRows; irow++) {
39 fRelativeCalib[icol][irow] = 1.0;
46 void SetSuperModuleNum(Int_t i) { fSuperModuleNum = i;}; //
47 Int_t GetSuperModuleNum() const { return fSuperModuleNum;}; //
48 void SetCalibMethod(Int_t i) { fCalibMethod = i;}; //
49 Int_t GetCalibMethod() const { return fCalibMethod;}; //
50 void SetCalibPass(Int_t i) { fCalibPass = i;}; //
51 Int_t GetCalibPass() const { return fCalibPass;}; //
52 void SetAbsoluteCalib(Float_t f) { fAbsoluteCalib = f;}; //
53 Float_t GetAbsoluteCalib() const { return fAbsoluteCalib;}; //
56 void SetRelativeCalib(int icol, int irow, Float_t f) { fRelativeCalib[icol][irow] = f; }; //
57 Float_t GetRelativeCalib(int icol, int irow) const { return fRelativeCalib[icol][irow]; }; //
60 // first: overall values for the whole SuperModule
61 Int_t fSuperModuleNum; // which SuperModule is this?
62 Int_t fCalibMethod; // a la 0=cosmics, 1=pi0, 2=electrons,3=using ecore,
63 Int_t fCalibPass; // which analysis iteration is this.. 1,2,..N
64 Float_t fAbsoluteCalib; // (ADC>GeV absolute gain/conversion)
66 // third: individual info for each tower
67 Float_t fRelativeCalib[AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows]; // values around 1, if gains are well balanced
69 ClassDef(AliEMCALSuperModuleCalibAbs, 3) // help class
71 // ******* end of internal class definition *************
73 class AliEMCALCalibAbs : public TObject {
77 enum kProblemType {kNoLED=-999};// code in possible problems
79 AliEMCALCalibAbs(const int nSM = AliEMCALGeoParams::fgkEMCALModules);
81 // Read and Write txt I/O methods are normally not used, but are useful for
82 // filling the object before it is saved in OCDB
83 void ReadTextCalibAbsInfo(Int_t nSM, const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCALModules
84 void WriteTextCalibAbsInfo(const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCALModules
85 void ReadRootCalibAbsInfo(const TString &rootFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCALModules
86 void ReadTreeCalibAbsInfo(TTree *tree, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCALModules
87 void WriteRootCalibAbsInfo(const TString &rootFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCALModules
89 virtual ~AliEMCALCalibAbs();
91 // pointer to stored info.
92 Int_t GetNSuperModule() const { return fNSuperModule; };
94 // - via the index in the stored array:
95 virtual AliEMCALSuperModuleCalibAbs * GetSuperModuleCalibAbsId(Int_t smIndex) const
96 { return (AliEMCALSuperModuleCalibAbs*) fSuperModuleData[smIndex]; };
98 // - or via the actual SM number
99 virtual AliEMCALSuperModuleCalibAbs * GetSuperModuleCalibAbsNum(Int_t smNum) const;
103 Int_t fNSuperModule; // Number of supermodules.
104 TObjArray fSuperModuleData; // SuperModule data
108 AliEMCALCalibAbs(const AliEMCALCalibAbs &);
109 AliEMCALCalibAbs &operator = (const AliEMCALCalibAbs &);
111 ClassDef(AliEMCALCalibAbs, 4) //CalibAbs data info