5 namespace btagbtvdeep {
7 constexpr
static int qualityMap[8] = {1, 0, 1, 1, 4, 4, 5, 6};
21 const float catch_infs(
const float in,
const float replace_value) {
24 if (in < -1e32 || in > 1e32)
31 const float replace_value,
32 const float lowerbound,
33 const float upperbound,
35 const bool use_offsets) {
36 float withoutinfs =
catch_infs(in, replace_value);
37 if (withoutinfs + offset < lowerbound)
39 if (withoutinfs + offset > upperbound)
68 return p.Unit().Dot(
d.Unit());
72 float mindrsvpfcand(
const std::vector<reco::VertexCompositePtrCandidate> &svs,
75 for (
unsigned int i0 = 0; i0 < svs.size(); ++i0) {
85 template bool sv_vertex_comparator<reco::VertexCompositePtrCandidate, reco::Vertex>(
101 uint16_t qualityFlags = 0;
117 uint16_t qualityFlags = 0;
123 const auto *patJet =
dynamic_cast<const pat::Jet *
>(&
jet);
127 if (patJet->nSubjetCollections() > 0) {
128 auto subjets = patJet->subjets();
134 features.first = !subjets.empty() ?
reco::deltaR(*cand, *subjets[0]) : -1;
135 features.second = subjets.size() > 1 ?
reco::deltaR(*cand, *subjets[1]) : -1;
138 features.second = -1;
142 features.second = -1;
float quality_from_pfcand(const reco::PFCandidate &pfcand)
Vector momentum() const final
spatial momentum vector
bool isNonnull() const
Checks for non-null.
float vertexDdotP(const reco::VertexCompositePtrCandidate &sv, const reco::Vertex &pv)
Measurement1D vertexD3d(const reco::VertexCompositePtrCandidate &svcand, const reco::Vertex &pv)
math::XYZVector Vector
point in the space
double vz() const override
z coordinate of vertex position
const float catch_infs(const float in, const float replace_value=0.)
Measurement1D distance(const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const override
constexpr bool isNotFinite(T x)
void fillVertexCovariance(CovarianceMatrix &v) const override
fill SMatrix
const reco::Track * bestTrack() const override
uint32_t const *__restrict__ Quality * quality
double y() const
y coordinate
Base class for all types of Jets.
double vy() const override
y coordinate of vertex position
const Point & vertex() const override
vertex position (overwritten by PF...)
std::pair< float, float > getDRSubjetFeatures(const reco::Jet &jet, const reco::Candidate *cand)
math::Error< dimension >::type CovarianceMatrix
covariance error matrix (3x3)
reco::TrackRef trackRef() const
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)
qualityFlagsShiftsAndMasks
float mindrsvpfcand(const std::vector< reco::VertexCompositePtrCandidate > &svs, const reco::Candidate *cand, float mindr=0.4)
std::vector< float > features(const reco::PreId &ecal, const reco::PreId &hcal, double rho, const reco::BeamSpot &spot, noZS::EcalClusterLazyTools &ecalTools)
Measurement1D vertexDxy(const reco::VertexCompositePtrCandidate &svcand, const reco::Vertex &pv)
double z() const
z coordinate
float vtx_ass_from_pfcand(const reco::PFCandidate &pfcand, int pv_ass_quality, const reco::VertexRef &pv)
double vx() const override
x coordinate of vertex position
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Measurement1D distance(const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const override
double x() const
x coordinate
Analysis-level calorimeter jet class.
float lost_inner_hits_from_pfcand(const reco::PFCandidate &pfcand)
Particle reconstructed by the particle flow algorithm.
static constexpr int qualityMap[8]