1 #ifndef RecoBTag_FeatureTools_ChargedCandidateConverter_h 2 #define RecoBTag_FeatureTools_ChargedCandidateConverter_h 14 template <
typename Cand
idateType>
18 const float & drminpfcandsv,
const float & jetR,
20 const bool flip =
false) {
37 c_pf_features.
erel = c_pf->energy() / jet.
energy();
38 const float etasign = jet.
eta() > 0 ? 1 : -1;
39 c_pf_features.
etarel = etasign * (c_pf->eta() - jet.
eta());
56 const auto* patJet =
dynamic_cast<const pat::Jet*
>(&
jet);
61 if (patJet->nSubjetCollections() > 0) {
62 auto subjets = patJet->subjets();
65 return p1->
pt() >
p2->pt();
79 const float drminpfcandsv,
const float jetR,
81 const bool flip =
false) ;
87 const float drminpfcandsv,
const float jetR,
const float puppiw,
88 const int pv_ass_quality,
91 const bool flip =
false) ;
96 #endif //RecoBTag_FeatureTools_ChargedCandidateConverter_h
double eta() const final
momentum pseudorapidity
float btagPf_trackJetDistVal
float btagPf_trackSip3dSig
float btagPf_trackPtRatio
Base class for all types of Jets.
double pt() const final
transverse momentum
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
double energy() const final
energy
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