28#ifndef ALICEO2_ZDC_INTERCALIB_H
29#define ALICEO2_ZDC_INTERCALIB_H
52 void clear(
int ih = -1);
53 int process(
const gsl::span<const o2::zdc::BCRecData>& bcrec,
54 const gsl::span<const o2::zdc::ZDCEnergy>& energy,
55 const gsl::span<const o2::zdc::ZDCTDCData>& tdc,
56 const gsl::span<const uint16_t>& info);
59 int process(
const char* hname,
int ic);
60 void replay(
int ih, THnSparse* hs,
int ic);
69 static void fcn(
int& npar,
double* gin,
double& chi,
double* par,
int iflag);
70 void cumulate(
int ih,
double tc,
double t1,
double t2,
double t3,
double t4,
double w);
89 static constexpr const char*
mHUncN[2 *
NH] = {
"hZNAS",
"hZPAS",
"hZNCS",
"hZPCS",
"hZEM2",
"",
"",
"hZPASX",
"hZPCSX",
90 "hZNAC",
"hZPAC",
"hZNCC",
"hZPCC",
"hZEM1",
"",
"",
"hZPACX",
"hZPCCX"};
91 static constexpr const char*
mHUncT[2 *
NH] = {
"ZNA sum",
"ZPA sum",
"ZNC sum",
"ZPC sum",
"ZEM2",
"",
"",
"ZPA sum",
"ZPC sum",
92 "ZNA TC",
"ZPA TC",
"ZNC TC",
"ZPC TC",
"ZEM1",
"",
"",
"ZPA TC",
"ZPC TC"};
93 static constexpr const char*
mCUncN[
NH] = {
"cZNA",
"cZPA",
"cZNC",
"cZPC",
"cZEM",
"cZNI",
"cZPI",
"cZPAX",
"cZPCX"};
94 static constexpr const char*
mCUncT[
NH] = {
"ZNA;TC;SUM",
"ZPA;TC;SUM",
"ZNC;TC;SUM",
"ZPC;TC;SUM",
"ZEM;ZEM1;ZEM2",
"ZN;ZNAC;ZNCC",
"ZP;ZPAC;ZPCC",
"ZPA (x cut);TC;SUM",
"ZPC (x cut);TC;SUM"};
97 std::array<o2::dataformats::FlatHisto1D<float>*, 2 *
NH> mHUnc{};
98 std::array<o2::dataformats::FlatHisto2D<float>*,
NH> mCUnc{};
99 std::array<std::unique_ptr<TH1>,
NH> mHCorr{};
100 std::array<std::unique_ptr<TH2>,
NH> mCCorr{};
101 std::array<std::unique_ptr<TMinuit>,
NH> mMn{};
102 InterCalibData mData;
103 bool mInitDone =
false;
104 bool mSaveDebugHistos =
false;
106 static std::mutex mMtx;
107 double mPar[
NH][
NPAR] = {0};
108 double mErr[
NH][
NPAR] = {0};
109 const InterCalibConfig* mInterCalibConfig =
nullptr;
110 const ZDCEnergyParam* mEnergyParam =
nullptr;
111 const ZDCTowerParam* mTowerParam =
nullptr;
112 ZDCTowerParam mTowerParamUpd;
114 void assign(
int ih,
bool ismod);
1D messeageable histo class
2D messeageable histo class
Configuration of ZDC Tower intercalibration procedure.
Intercalibration intermediate data.
Class to describe reconstructed ZDC event (single BC with signal in one of detectors)
static constexpr int HidZEM
void replay(int ih, THnSparse *hs, int ic)
static constexpr int HidZNA
static double mAdd[NPAR][NPAR]
void cumulate(int ih, double tc, double t1, double t2, double t3, double t4, double w)
static void fcn(int &npar, double *gin, double &chi, double *par, int iflag)
Temporary copy of cumulated sums.
static constexpr int HidZPI
const InterCalibConfig * getInterCalibConfig() const
void setSaveDebugHistos()
static constexpr const char * mHUncT[2 *NH]
const ZDCTowerParam * getTowerParam() const
void add(int ih, o2::dataformats::FlatHisto1D< float > &h1)
CcdbObjectInfo & getCcdbObjectInfo()
int saveDebugHistos(const std::string fn="ZDCInterCalib.root")
static constexpr const char * mHUncN[2 *NH]
void setInterCalibConfig(const InterCalibConfig *param)
static constexpr int NPAR
void setDontSaveDebugHistos()
static constexpr int HidZPC
void setTowerParam(const ZDCTowerParam *param)
static constexpr int HidZNI
static constexpr int HidZNC
static constexpr int HidZPA
static constexpr int HidZPAX
static constexpr int HidZPCX
void setEnergyParam(const ZDCEnergyParam *param)
static constexpr const char * mCUncT[NH]
const ZDCTowerParam & getTowerParamUpd() const
InterCalibData & getData()
static constexpr const char * mCUncN[NH]
const ZDCEnergyParam * getEnergyParam() const
GLubyte GLubyte GLubyte GLubyte w
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
struct o2::upgrades_utils::@463 zdc
structure to keep FT0 information
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static constexpr int NH
Dimension of matrix (1 + 4 coefficients + offset)
static constexpr int NPAR