4 #include "boost/property_tree/ptree.hpp" 5 #include "boost/property_tree/json_parser.hpp" 9 std::vector<float>
as_vector(boost::property_tree::ptree
const&
pt,
10 boost::property_tree::ptree::key_type
const&
key) {
11 std::vector<float>
ret;
12 for (
const auto&
item :
pt.get_child(
key))
13 ret.push_back(
item.second.get_value<
float>());
20 boost::property_tree::ptree calibration_map;
35 auto n_bins_pt =
pt_bins.size();
37 for (
auto calib_f = calib_data.begin(); calib_f != calib_data.end(); ++calib_f) {
38 auto index = calib_f - calib_data.begin();
46 auto bin_l = container.upper_bound(
value);
47 if (bin_l == container.end()) {
57 if (bin_eta == -1 || bin_pt == -1)
59 auto n_bins_pt =
pt_bins.size();
int etaBin(float eta) const
std::set< float > pt_bins
std::string fullPath() const
ret
prodAgent to be discontinued
int ptBin(float pt) const
std::set< float > eta_bins
std::vector< float > as_vector(boost::property_tree::ptree const &pt, boost::property_tree::ptree::key_type const &key)
L1EGammaEECalibrator(const edm::ParameterSet &)
std::vector< float > calib_factors
float calibrationFactor(const float &pt, const float &eta) const
int bin(const std::set< float > &container, float value) const