1 #ifndef RecoBTag_FeatureTools_deep_helpers_h 2 #define RecoBTag_FeatureTools_deep_helpers_h 28 #include <nlohmann/json.hpp> 33 const float catch_infs(
const float in,
const float replace_value = 0.);
37 const float replace_value,
38 const float lowerbound,
39 const float upperbound,
41 const bool use_offsets =
true);
53 template <
typename SVType,
typename PVType>
57 float aval = adxy.value();
58 float bval = bdxy.value();
59 float aerr = adxy.error();
60 float berr = bdxy.error();
73 for (
size_t i = 0;
i < vals.size();
i++) {
81 float mindrsvpfcand(
const std::vector<reco::VertexCompositePtrCandidate> &svs,
127 std::vector<float> &datavec,
137 unsigned target_length,
138 std::vector<float> &datavec,
147 std::vector<std::string> &input_names_,
148 std::unordered_map<std::string, PreprocessParams> &prep_info_map_,
150 std::vector<unsigned> &input_sizes_,
154 #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)
Measurement1D vertexDxy(const reco::VertexCompositePtrCandidate &svcand, const reco::Vertex &pv)
std::vector< TaggingValue > getList(btau::TaggingVariableName tag, bool throwOnEmptyList=true) const
float vtx_ass_from_pfcand(const reco::PFCandidate &pfcand, int pv_ass_quality, const reco::VertexRef &pv)
float mindistsvpfcand(const std::vector< reco::VertexCompositePtrCandidate > &svs, const reco::TransientTrack track)
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)