CMS 3D CMS Logo

LostTracksConverter.h
Go to the documentation of this file.
1 #ifndef RecoBTag_FeatureTools_LostTracksConverter_h
2 #define RecoBTag_FeatureTools_LostTracksConverter_h
3 
7 
11 
12 namespace btagbtvdeep {
13 
14  template <typename CandidateType>
15  void commonCandidateToFeatures(const CandidateType* c_pf,
16  const reco::Jet& jet,
17  const TrackInfoBuilder& track_info,
18  const bool& isWeightedJet,
19  const float& drminpfcandsv,
20  const float& jetR,
21  const float& puppiw,
22  LostTracksFeatures& lt_features,
23  const bool flip = false,
24  const float& distminpfcandsv = 0) {
25  float trackSip2dVal = track_info.getTrackSip2dVal();
26  float trackSip2dSig = track_info.getTrackSip2dSig();
27  float trackSip3dVal = track_info.getTrackSip3dVal();
28  float trackSip3dSig = track_info.getTrackSip3dSig();
29  if (flip == true) {
34  }
35 
36  lt_features.btagPf_trackEtaRel = catch_infs_and_bound(track_info.getTrackEtaRel(), 0, -5, 15);
37  lt_features.btagPf_trackPtRel = catch_infs_and_bound(track_info.getTrackPtRel(), 0, -1, 4);
38  lt_features.btagPf_trackPPar = catch_infs_and_bound(track_info.getTrackPPar(), 0, -1e5, 1e5);
39  lt_features.btagPf_trackDeltaR = catch_infs_and_bound(track_info.getTrackDeltaR(), 0, -5, 5);
40  lt_features.btagPf_trackPParRatio = catch_infs_and_bound(track_info.getTrackPParRatio(), 0, -10, 100);
45  lt_features.btagPf_trackJetDistVal = catch_infs_and_bound(track_info.getTrackJetDistVal(), 0, -20, 1);
46 
47  lt_features.drminsv = catch_infs_and_bound(drminpfcandsv, 0, -1. * jetR, 0, -1. * jetR);
48 
49  lt_features.pt = c_pf->pt();
50  lt_features.eta = c_pf->eta();
51  lt_features.phi = c_pf->phi();
52  lt_features.e = c_pf->energy();
53  }
54 
56  const pat::Jet& jet,
57  const TrackInfoBuilder& track_info,
58  const bool isWeightedJet,
59  const float drminpfcandsv,
60  const float jetR,
61  const float puppiw,
62  LostTracksFeatures& lt_features,
63  const bool flip = false,
64  const float distminpfcandsv = 0);
65 
67  const reco::Jet& jet,
68  const TrackInfoBuilder& track_info,
69  const bool isWeightedJet,
70  const float drminpfcandsv,
71  const float jetR,
72  const float puppiw,
73  const int pv_ass_quality,
74  const reco::VertexRef& pv,
75  LostTracksFeatures& lt_features,
76  const bool flip = false,
77  const float distminpfcandsv = 0);
78 
79 } // namespace btagbtvdeep
80 
81 #endif //RecoBTag_FeatureTools_LostTracksConverter_h
const float getTrackJetDistVal() const
const float getTrackSip3dVal() const
Base class for all types of Jets.
Definition: Jet.h:20
const float getTrackDeltaR() const
const float getTrackPParRatio() 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)
Definition: deep_helpers.cc:43
const float getTrackSip2dVal() const
const float getTrackPtRel() const
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.
Definition: Jet.h:77
const float getTrackSip2dSig() const
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
const float getTrackPPar() const
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)
const float getTrackEtaRel() const