#include <Run3ChargeCalibParser.h>
|
template<typename T , typename b = std::is_integral<T>> |
std::function< T(size_t)> | getFunc (const std::vector< std::string > &data) |
| Return function converting a string to number type T at index i of data vector. More...
|
|
template<typename T > |
std::function< T(size_t)> | getFunc (const nlohmann::json &data) |
| Return function converting an item to number type T at index i of json data. More...
|
|
|
static constexpr float | m_chargeLimit = 1e5 |
| If the calculated charge exceeds this limit, a linear extrapolation is used at this point. More...
|
|
Definition at line 23 of file Run3ChargeCalibParser.h.
◆ Run3ChargeCalibParser()
◆ getFunc() [1/2]
template<typename T >
std::function<T(size_t)> PixelChargeCalib::IChargeCalibrationParser::getFunc |
( |
const nlohmann::json & |
data | ) |
|
|
inlineprotectedinherited |
◆ getFunc() [2/2]
template<typename T , typename b = std::is_integral<T>>
std::function<T(size_t)> PixelChargeCalib::IChargeCalibrationParser::getFunc |
( |
const std::vector< std::string > & |
data | ) |
|
|
inlineprotectedinherited |
◆ parse() [1/2]
◆ parse() [2/2]
◆ parseImpl() [1/3]
|
finaloverrideprivatevirtual |
Implements PixelChargeCalib::IChargeCalibrationParser.
Definition at line 23 of file Run3ChargeCalibParser.cxx.
28 ChargeCalibrationBundle
b(numFE);
30 for (
unsigned int j{}; j < numFE; j++) {
31 const auto &calibArray =
data.at(j);
32 if (!calibArray.empty()) {
34 if (calibArray.size() != FEStringSize-1) {
35 std::cout<<
"Parameter size is not consistent(" << FEStringSize <<
") " << calibArray.size() <<
" at (i,j)=(" << moduleHash <<
"," << j <<
")\n";
39 auto getInt = getFunc<int>(calibArray);
40 auto getFloat = getFunc<float>(calibArray);
41 b.threshold.emplace_back(getInt(0), getInt(1), getInt(2), getInt(3));
42 b.thresholdLong.emplace_back(getInt(4), getInt(5), getInt(6), getInt(7));
43 b.thresholdGanged.emplace_back(getInt(8), getInt(9), getInt(10), getInt(11));
44 b.params.emplace_back(getFloat(12), getFloat(13), getFloat(14));
45 b.paramsGanged.emplace_back(getFloat(15), getFloat(16), getFloat(17));
46 b.totRes.emplace_back(getFloat(18), getFloat(19));
53 if (!(element->
isDBM())) {
64 b.lin.emplace_back(0.
f, 0.
f);
65 b.linGanged.emplace_back(0.
f, 0.
f);
68 b.lin.emplace_back(0.
f, 0.
f);
69 b.linGanged.emplace_back(0.
f, 0.
f);
72 std::cout<<
"Array size is zero in " << calibArray <<
" at (i,j)=(" << moduleHash <<
"," << j <<
")\n";
◆ parseImpl() [2/3]
|
inlinefinaloverrideprivatevirtual |
◆ parseImpl() [3/3]
|
inlinefinaloverrideprivatevirtual |
◆ m_chargeLimit
constexpr float PixelChargeCalib::IChargeCalibrationParser::m_chargeLimit = 1e5 |
|
staticconstexprprotectedinherited |
If the calculated charge exceeds this limit, a linear extrapolation is used at this point.
Definition at line 55 of file IChargeCalibrationParser.h.
◆ m_configData
◆ m_elements
◆ m_pixelID
const PixelID* PixelChargeCalib::IChargeCalibrationParser::m_pixelID {} |
|
protectedinherited |
The documentation for this class was generated from the following files: