Project
Loading...
Searching...
No Matches
CalibParams.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
18
19#ifndef PHOS_CALIBPARAMS_H
20#define PHOS_CALIBPARAMS_H
21
22#include <array>
23#include "TObject.h"
24
25class TH2;
26
27namespace o2
28{
29
30namespace phos
31{
32
34{
35 public:
37 CalibParams() = default;
38
40 CalibParams(int test);
41
44
46
48 ~CalibParams() = default;
49
53 float getGain(short cellID) const { return mGainCalib.at(cellID - OFFSET); }
54
58 void setGain(short cellID, float c) { mGainCalib.at(cellID - OFFSET) = c; }
59
64 bool setGain(TH2* h, char module);
65
69 float getHGLGRatio(short cellID) const { return mHGLGRatio.at(cellID - OFFSET); }
70
74 void setHGLGRatio(short cellID, float r) { mHGLGRatio.at(cellID - OFFSET) = r; }
75
80 bool setHGLGRatio(TH2* h, char module);
81
85 float getHGTimeCalib(short cellID) const { return mHGTimeCalib.at(cellID - OFFSET); }
86
90 void setHGTimeCalib(short cellID, float t) { mHGTimeCalib.at(cellID - OFFSET) = t; }
91
96 bool setHGTimeCalib(TH2* h, char module);
97
101 float getLGTimeCalib(short cellID) const { return mLGTimeCalib.at(cellID - OFFSET); }
102
106 void setLGTimeCalib(short cellID, float t) { mLGTimeCalib.at(cellID - OFFSET) = t; }
107
112 bool setLGTimeCalib(TH2* h, char module);
113
114 private:
115 static constexpr short NCHANNELS = 12544;
116 static constexpr short OFFSET = 1793;
117 std::array<float, NCHANNELS> mGainCalib;
118 std::array<float, NCHANNELS> mHGLGRatio;
119 std::array<float, NCHANNELS> mHGTimeCalib;
120 std::array<float, NCHANNELS> mLGTimeCalib;
121
122 ClassDefNV(CalibParams, 1);
123};
124
125} // namespace phos
126
127} // namespace o2
128#endif
uint32_t c
Definition RawData.h:2
Class for time synchronization of RawReader instances.
float getHGLGRatio(short cellID) const
Get High Gain to Low Gain ratio calibration coefficients.
Definition CalibParams.h:69
void setHGLGRatio(short cellID, float r)
Set High Gain to Low Gain ratio.
Definition CalibParams.h:74
CalibParams()=default
Constructor.
float getGain(short cellID) const
Get High Gain energy calibration coefficients.
Definition CalibParams.h:53
float getLGTimeCalib(short cellID) const
Get Low Gain time calibration coefficient.
CalibParams(CalibParams &a)=default
Constructor for tests.
void setHGTimeCalib(short cellID, float t)
Set High Gain time calibration coefficient.
Definition CalibParams.h:90
float getHGTimeCalib(short cellID) const
Get High Gain time calibration coefficients.
Definition CalibParams.h:85
CalibParams & operator=(const CalibParams &other)=default
void setGain(short cellID, float c)
Set High Gain energy calibration coefficient.
Definition CalibParams.h:58
void setLGTimeCalib(short cellID, float t)
Set time calibration coefficient.
~CalibParams()=default
Destructor.
GLboolean r
Definition glcorearb.h:1233
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
FIXME: do not use data model tables.
VectorOfTObjectPtrs other