1 #ifndef RecoBTag_FeatureTools_NeutralCandidateConverter_h 2 #define RecoBTag_FeatureTools_NeutralCandidateConverter_h 16 const bool isWeightedJet,
17 const float drminpfcandsv,
20 NeutralCandidateFeatures& n_pf_features);
24 const bool isWeightedJet,
25 const float drminpfcandsv,
28 NeutralCandidateFeatures& n_pf_features);
30 template <
typename Cand
idateType>
33 const bool& isWeightedJet,
34 const float& drminpfcandsv,
39 n_pf_features.
drsubjet1 = drSubjetFeatures.first;
40 n_pf_features.
drsubjet2 = drSubjetFeatures.second;
42 float constituentWeight = 1.;
44 constituentWeight = puppiw;
48 n_pf_features.
ptrel_noclip = (n_pf->pt() * constituentWeight) /
jet.pt();
49 n_pf_features.
erel = (n_pf->energy() * constituentWeight) /
jet.energy();
62 n_pf_features.
pt = n_pf->pt();
63 n_pf_features.
eta = n_pf->eta();
64 n_pf_features.
phi = n_pf->phi();
65 n_pf_features.
e = n_pf->energy();
66 n_pf_features.
px = n_pf->px();
67 n_pf_features.
py = n_pf->py();
68 n_pf_features.
pz = n_pf->pz();
73 #endif //RecoBTag_FeatureTools_NeutralCandidateConverter_h
constexpr double deltaPhi(double phi1, double phi2)
Base class for all types of Jets.
std::pair< float, float > getDRSubjetFeatures(const reco::Jet &jet, const reco::Candidate *cand)
void packedCandidateToFeatures(const pat::PackedCandidate *c_pf, const pat::Jet &jet, const TrackInfoBuilder &track_info, const bool isWeightedJet, const float drminpfcandsv, const float jetR, const float puppiw, ChargedCandidateFeatures &c_pf_features, const bool flip=false, const float distminpfcandsv=0)
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)
Abs< T >::type abs(const T &t)
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
void commonCandidateToFeatures(const CandidateType *c_pf, const reco::Jet &jet, const TrackInfoBuilder &track_info, const bool &isWeightedJet, const float &drminpfcandsv, const float &jetR, const float &puppiw, ChargedCandidateFeatures &c_pf_features, const bool flip=false, const float &distminpfcandsv=0)
Analysis-level calorimeter jet class.
Particle reconstructed by the particle flow algorithm.
void recoCandidateToFeatures(const reco::PFCandidate *c_pf, const reco::Jet &jet, const TrackInfoBuilder &track_info, const bool isWeightedJet, const float drminpfcandsv, const float jetR, const float puppiw, const int pv_ass_quality, const reco::VertexRef &pv, ChargedCandidateFeatures &c_pf_features, const bool flip=false, const float distminpfcandsv=0)