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();
40 int pt_bin =
ptBin(pt_l[index]);
46 auto bin_l = container.upper_bound(value);
47 if (bin_l == container.end()) {
56 int bin_pt =
ptBin(pt);
57 if (bin_eta == -1 || bin_pt == -1)
59 auto n_bins_pt =
pt_bins.size();
tuple ret
prodAgent to be discontinued
std::set< float > pt_bins
float calibrationFactor(const float &pt, const float &eta) 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)
tuple key
prepare the HTCondor submission files and eventually submit them
int ptBin(float pt) const
int etaBin(float eta) const
T getParameter(std::string const &) const
L1EGammaEECalibrator(const edm::ParameterSet &)
std::vector< float > calib_factors
std::string fullPath() const
int bin(const std::set< float > &container, float value) const