1 #ifndef RecoBTag_FeatureTools_deep_helpers_h 2 #define RecoBTag_FeatureTools_deep_helpers_h 27 #include <nlohmann/json.hpp> 32 const float catch_infs(
const float in,
const float replace_value = 0.);
36 const float replace_value,
37 const float lowerbound,
38 const float upperbound,
40 const bool use_offsets =
true);
52 template <
typename SVType,
typename PVType>
56 float aval = adxy.value();
57 float bval = bdxy.value();
58 float aerr = adxy.error();
59 float berr = bdxy.error();
72 for (
size_t i = 0;
i < vals.size();
i++) {
80 float mindrsvpfcand(
const std::vector<reco::VertexCompositePtrCandidate> &svs,
123 std::vector<float> &datavec,
133 unsigned target_length,
134 std::vector<float> &datavec,
143 std::vector<std::string> &input_names_,
144 std::unordered_map<std::string, PreprocessParams> &prep_info_map_,
146 std::vector<unsigned> &input_sizes_,
150 #endif //RecoBTag_FeatureTools_deep_helpers_h
int center_norm_pad_halfRagged(const std::vector< float > &input, float center, float scale, unsigned target_length, std::vector< float > &datavec, int startval, float pad_value=0, float replace_inf_value=0, float min=0, float max=-1)
float quality_from_pfcand(const reco::PFCandidate &pfcand)
float vertexDdotP(const reco::VertexCompositePtrCandidate &sv, const reco::Vertex &pv)
std::vector< std::string > var_names
Measurement1D vertexD3d(const reco::VertexCompositePtrCandidate &svcand, const reco::Vertex &pv)
VarInfo info(const std::string &name) const
std::unordered_map< std::string, VarInfo > var_info_map
const float catch_infs(const float in, const float replace_value=0.)
Base class for all types of Jets.
int dump_vector(reco::TaggingVariableList &from, T *to, reco::btau::TaggingVariableName name, const size_t max)
std::pair< float, float > getDRSubjetFeatures(const reco::Jet &jet, const reco::Candidate *cand)
std::vector< std::vector< float > > FloatArrays
static std::string const input
const float catch_infs_and_bound(const float in, const float replace_value, const float lowerbound, const float upperbound, const float offset=0., const bool use_offsets=true)
void ParticleNetConstructor(const edm::ParameterSet &Config_, bool doExtra, std::vector< std::string > &input_names_, std::unordered_map< std::string, PreprocessParams > &prep_info_map_, std::vector< std::vector< int64_t >> &input_shapes_, std::vector< unsigned > &input_sizes_, cms::Ort::FloatArrays *data_)
float mindrsvpfcand(const std::vector< reco::VertexCompositePtrCandidate > &svs, const reco::Candidate *cand, float mindr=0.4)
std::vector< TaggingValue > getList(TaggingVariableName tag, bool throwOnEmptyList=true) const
Measurement1D vertexDxy(const reco::VertexCompositePtrCandidate &svcand, const reco::Vertex &pv)
float vtx_ass_from_pfcand(const reco::PFCandidate &pfcand, int pv_ass_quality, const reco::VertexRef &pv)
bool sv_vertex_comparator(const SVType &sva, const SVType &svb, const PVType &pv)
int center_norm_pad(const std::vector< float > &input, float center, float scale, unsigned min_length, unsigned max_length, std::vector< float > &datavec, int startval, float pad_value=0, float replace_inf_value=0, float min=0, float max=-1)
float lost_inner_hits_from_pfcand(const reco::PFCandidate &pfcand)
Particle reconstructed by the particle flow algorithm.
VarInfo(float median, float norm_factor, float replace_inf_value, float lower_bound, float upper_bound, float pad)