#include "HIEventUtils/HIEventSelectionToolRun3.h"
#include <fstream>
#include <nlohmann/json.hpp>
#include "PathResolver/PathResolver.h"
Go to the source code of this file.
|
| static const double | MeV = 1. |
| static const double | GeV = 1e3 |
| static const double | TeV = 1e6 |
◆ ENUMDEF [1/3]
Value: case HI::IonDataType::_N: \
return #_N;
◆ ENUMDEF [2/3]
Value: case HI::PileupVariation::_N: \
return #_N;
◆ ENUMDEF [3/3]
Value: case HI::SelectionMask::_N: \
return #_N;
◆ loadHist()
| std::unique_ptr< TH1D > loadHist |
( |
const std::string & | file | ) |
|
Definition at line 74 of file HIEventSelectionToolRun3.cxx.
74 {
75 const std::string
path =
77 std::ifstream
i(path);
78 if (not i) {
79 throw std::runtime_error(path + " does nto exist");
80 }
81
85
86 const size_t nbins =
j.at(
"fNbins").get<
size_t>();
87
88 auto h = std::make_unique<TH1D>(
j.at(
"fName").get<std::string>().c_str(),
89 j.at(
"fTitle").get<std::string>().c_str(),
90 nbins,
j.at(
"fXmin").get<
double>(),
91 j.at(
"fXmax").get<
double>());
92 const std::vector<double>
bins =
j.at(
"fArray").get<std::vector<double>>();
93 if (
bins.size() !=
j.at(
"fNbins").get<
size_t>() + 2) {
94 throw std::runtime_error(
95 "Histogram " +
j.at(
"fName").get<std::string>() +
96 " has inconsistent number of bins and fNbins (should +2) value " +
97 std::to_string(
bins.size()) +
" and " + std::to_string(nbins));
98 }
99
102 }
105}
static const std::vector< std::string > bins
Header file for AthHistogramAlgorithm.
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
path
python interpreter configuration --------------------------------------—
◆ GeV
◆ MeV
◆ TeV