1 #ifndef RecoBTag_FeatureTools_ChargedCandidateConverter_h 2 #define RecoBTag_FeatureTools_ChargedCandidateConverter_h 14 template <
typename Cand
idateType>
18 const bool& isWeightedJet,
19 const float& drminpfcandsv,
23 const bool flip =
false,
24 const float& distminpfcandsv = 0) {
38 float constituentWeight = 1.;
40 constituentWeight = puppiw;
43 c_pf_features.
ptrel_noclip = (c_pf->pt() * constituentWeight) /
jet.pt();
44 c_pf_features.
erel = (c_pf->energy() * constituentWeight) /
jet.energy();
46 const float etasign =
jet.eta() > 0 ? 1 : -1;
47 c_pf_features.
etarel = etasign * (c_pf->eta() -
jet.eta());
62 c_pf_features.
distminsv = distminpfcandsv;
65 c_pf_features.
drsubjet1 = drSubjetFeatures.first;
66 c_pf_features.
drsubjet2 = drSubjetFeatures.second;
68 c_pf_features.
pt = c_pf->pt();
69 c_pf_features.
eta = c_pf->eta();
70 c_pf_features.
phi = c_pf->phi();
71 c_pf_features.
e = c_pf->energy();
72 c_pf_features.
px = c_pf->px();
73 c_pf_features.
py = c_pf->py();
74 c_pf_features.
pz = c_pf->pz();
79 const TrackInfoBuilder& track_info,
80 const bool isWeightedJet,
81 const float drminpfcandsv,
84 ChargedCandidateFeatures& c_pf_features,
85 const bool flip =
false,
86 const float distminpfcandsv = 0);
90 const TrackInfoBuilder& track_info,
91 const bool isWeightedJet,
92 const float drminpfcandsv,
95 const int pv_ass_quality,
97 ChargedCandidateFeatures& c_pf_features,
98 const bool flip =
false,
99 const float distminpfcandsv = 0);
103 #endif //RecoBTag_FeatureTools_ChargedCandidateConverter_h
float btagPf_trackJetDistVal
const float getTrackJetDistVal() const
const float getTrackSip3dVal() const
float btagPf_trackSip3dSig
float btagPf_trackPtRatio
Base class for all types of Jets.
const float getTrackDeltaR() const
std::pair< float, float > getDRSubjetFeatures(const reco::Jet &jet, const reco::Candidate *cand)
const float getTrackPParRatio() const
const float getTrackPtRatio() const
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)
const float getTrackSip2dVal() const
const float getTrackPtRel() const
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const float getTrackSip3dSig() const
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.
const float getTrackSip2dSig() const
float btagPf_trackSip2dVal
float btagPf_trackPParRatio
Particle reconstructed by the particle flow algorithm.
const float getTrackPPar() const
float btagPf_trackSip3dVal
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)
float btagPf_trackSip2dSig
const float getTrackEtaRel() const