1 #ifndef RecoBTag_FeatureTools_ChargedCandidateConverter_h
2 #define RecoBTag_FeatureTools_ChargedCandidateConverter_h
12 namespace btagbtvdeep {
14 template <
typename Cand
idateType>
18 const float& drminpfcandsv,
21 const bool flip =
false) {
36 c_pf_features.
erel = c_pf->energy() / jet.
energy();
37 const float etasign = jet.
eta() > 0 ? 1 : -1;
38 c_pf_features.
etarel = etasign * (c_pf->eta() - jet.
eta());
55 c_pf_features.
drsubjet1 = drSubjetFeatures.first;
56 c_pf_features.
drsubjet2 = drSubjetFeatures.second;
61 const TrackInfoBuilder& track_info,
62 const float drminpfcandsv,
64 ChargedCandidateFeatures& c_pf_features,
65 const bool flip =
false);
69 const TrackInfoBuilder& track_info,
70 const float drminpfcandsv,
73 const int pv_ass_quality,
75 ChargedCandidateFeatures& c_pf_features,
76 const bool flip =
false);
80 #endif //RecoBTag_FeatureTools_ChargedCandidateConverter_h
float btagPf_trackJetDistVal
double pt() const final
transverse momentum
float btagPf_trackSip3dSig
float btagPf_trackPtRatio
Base class for all types of Jets.
std::pair< float, float > getDRSubjetFeatures(const reco::Jet &jet, const reco::Candidate *cand)
const float getTrackEtaRel() const
const float getTrackDeltaR() const
const float getTrackPParRatio() const
const float getTrackSip2dSig() 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)
const float getTrackPPar() const
const float getTrackPtRatio() const
const float getTrackSip3dVal() const
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
void packedCandidateToFeatures(const pat::PackedCandidate *c_pf, const pat::Jet &jet, const TrackInfoBuilder &track_info, const float drminpfcandsv, const float jetR, ChargedCandidateFeatures &c_pf_features, const bool flip=false)
const float getTrackJetDistVal() const
void recoCandidateToFeatures(const reco::PFCandidate *c_pf, const reco::Jet &jet, const TrackInfoBuilder &track_info, 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)
Analysis-level calorimeter jet class.
float btagPf_trackSip2dVal
float btagPf_trackPParRatio
Particle reconstructed by the particle flow algorithm.
float btagPf_trackSip3dVal
const float getTrackPtRel() const
float btagPf_trackSip2dSig
const float getTrackSip2dVal() const
void commonCandidateToFeatures(const CandidateType *c_pf, const reco::Jet &jet, const TrackInfoBuilder &track_info, const float &drminpfcandsv, const float &jetR, ChargedCandidateFeatures &c_pf_features, const bool flip=false)
const float getTrackSip3dSig() const
double energy() const final
energy
double eta() const final
momentum pseudorapidity