CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
btagbtvdeep::SeedingTrackInfoBuilder Class Reference

#include <SeedingTrackInfoBuilder.h>

Public Member Functions

void buildSeedingTrackInfo (const reco::TransientTrack *it, const reco::Vertex &pv, const reco::Jet &jet, float mass, const std::pair< bool, Measurement1D > &ip, const std::pair< bool, Measurement1D > &ip2d, float jet_distance, float jaxis_dlength, HistogramProbabilityEstimator *m_probabilityEstimator, bool m_computeProbabilities)
 
const float chi2reduced () const
 
const float dxy () const
 
const float dz () const
 
const float eta () const
 
const float ip2d () const
 
const float ip2d_Signed () const
 
const float ip3d () const
 
const float ip3d_Signed () const
 
const float jetAxisDistance () const
 
const float jetAxisDlength () const
 
const float mass () const
 
const float nHits () const
 
const float nPixelHits () const
 
const float phi () const
 
const float pt () const
 
 SeedingTrackInfoBuilder ()
 
const float sip2d () const
 
const float sip2d_Signed () const
 
const float sip3d () const
 
const float sip3d_Signed () const
 
const float trackProbability2D () const
 
const float trackProbability3D () const
 

Private Attributes

float chi2reduced_
 
float dxy_
 
float dz_
 
float eta_
 
float ip2D_
 
float ip2D_signed_
 
float ip3D_
 
float ip3D_signed_
 
float jetAxisDistance_
 
float jetAxisDlength_
 
float mass_
 
float nHits_
 
float nPixelHits_
 
float phi_
 
float pt_
 
float sip2D_
 
float sip2D_signed_
 
float sip3D_
 
float sip3D_signed_
 
float trackProbability2D_
 
float trackProbability3D_
 

Detailed Description

Definition at line 10 of file SeedingTrackInfoBuilder.h.

Constructor & Destructor Documentation

btagbtvdeep::SeedingTrackInfoBuilder::SeedingTrackInfoBuilder ( )

Definition at line 11 of file SeedingTrackInfoBuilder.cc.

11  :
12  pt_(0),
13  eta_(0),
14  phi_(0),
15  mass_(0),
16  dz_(0),
17  dxy_(0),
18  ip3D_(0),
19  sip3D_(0),
20  ip2D_(0),
21  sip2D_(0),
22  ip3D_signed_(0),
23  sip3D_signed_(0),
24  ip2D_signed_(0),
25  sip2D_signed_(0),
26  chi2reduced_(0),
27  nPixelHits_(0),
28  nHits_(0),
30  jetAxisDlength_(0),
33 {
34 
35 }

Member Function Documentation

void btagbtvdeep::SeedingTrackInfoBuilder::buildSeedingTrackInfo ( const reco::TransientTrack it,
const reco::Vertex pv,
const reco::Jet jet,
float  mass,
const std::pair< bool, Measurement1D > &  ip,
const std::pair< bool, Measurement1D > &  ip2d,
float  jet_distance,
float  jaxis_dlength,
HistogramProbabilityEstimator m_probabilityEstimator,
bool  m_computeProbabilities = false 
)

Definition at line 38 of file SeedingTrackInfoBuilder.cc.

References chi2reduced_, dxy_, dz_, eta_, ip2D_, ip2D_signed_, ip3D_, ip3D_signed_, edm::isFinite(), metsig::jet, jetAxisDistance_, jetAxisDlength_, mass(), mass_, nHits_, nPixelHits_, phi_, reco::Vertex::position(), HistogramProbabilityEstimator::probability(), pt_, MetAnalyzer::pv(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), reco::LeafCandidate::pz(), IPTools::signedImpactParameter3D(), IPTools::signedTransverseImpactParameter(), sip2D_, sip2D_signed_, sip3D_, sip3D_signed_, reco::TransientTrack::track(), trackProbability2D_, trackProbability3D_, reco::Vertex::x(), reco::Vertex::y(), and reco::Vertex::z().

Referenced by btagbtvdeep::seedingTracksToFeatures().

40  {
41 
42  GlobalPoint pvp(pv.x(),pv.y(),pv.z());
43  GlobalVector jetdirection(jet.px(),jet.py(),jet.pz());
44 
45  auto const& aTrack = it->track();
46 
47  pt_=aTrack.pt();
48  eta_=aTrack.eta();
49  phi_=aTrack.phi();
50  dz_=aTrack.dz(pv.position());
51  dxy_=aTrack.dxy(pv.position());
52  mass_=mass;
53 
54  std::pair<bool,Measurement1D> ipSigned = IPTools::signedImpactParameter3D(*it,jetdirection, pv);
55  std::pair<bool,Measurement1D> ip2dSigned = IPTools::signedTransverseImpactParameter(*it,jetdirection, pv);
56 
57  ip3D_=ip.second.value();
58  sip3D_=ip.second.significance();
59  ip2D_=ip2d.second.value();
60  sip2D_=ip2d.second.significance();
61  ip3D_signed_=ipSigned.second.value();
62  sip3D_signed_=ipSigned.second.significance();
63  ip2D_signed_=ip2dSigned.second.value();
64  sip2D_signed_=ip2dSigned.second.significance();
65 
66  chi2reduced_=aTrack.normalizedChi2();
67  nPixelHits_=aTrack.hitPattern().numberOfValidPixelHits();
68  nHits_=aTrack.hitPattern().numberOfValidHits();
69 
70  jetAxisDistance_=std::fabs(jet_distance);
71  jetAxisDlength_=jaxis_dlength;
72 
75 
76  if (m_computeProbabilities) {
77 
78  //probability with 3D ip
79  std::pair<bool,double> probability = m_probabilityEstimator->probability(false,0,ip.second.significance(),aTrack,jet,pv);
80  double prob3D=(probability.first ? probability.second : -1.);
81 
82  //probability with 2D ip
83  probability = m_probabilityEstimator->probability(false,1,ip2d.second.significance(),aTrack,jet,pv);
84  double prob2D=(probability.first ? probability.second : -1.);
85 
86  trackProbability3D_=prob3D;
87  trackProbability2D_=prob2D;
88 
89  }
90 
93 
94 
95  }
double y() const
y coordinate
Definition: Vertex.h:113
double px() const final
x coordinate of momentum vector
std::pair< bool, Measurement1D > signedTransverseImpactParameter(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:50
std::pair< bool, Measurement1D > signedImpactParameter3D(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:71
constexpr bool isFinite(T x)
const Point & position() const
position
Definition: Vertex.h:109
double pz() const final
z coordinate of momentum vector
def pv(vc)
Definition: MetAnalyzer.py:7
double z() const
z coordinate
Definition: Vertex.h:115
double x() const
x coordinate
Definition: Vertex.h:111
const Track & track() const
double py() const final
y coordinate of momentum vector
std::pair< bool, double > probability(bool quality, int ipType, float significance, const reco::Track &, const reco::Jet &, const reco::Vertex &) const
const float btagbtvdeep::SeedingTrackInfoBuilder::chi2reduced ( ) const
inline

Definition at line 32 of file SeedingTrackInfoBuilder.h.

References chi2reduced_.

const float btagbtvdeep::SeedingTrackInfoBuilder::dxy ( ) const
inline

Definition at line 23 of file SeedingTrackInfoBuilder.h.

References dxy_.

Referenced by ntupleDataFormat.Track::dxyPull().

const float btagbtvdeep::SeedingTrackInfoBuilder::dz ( ) const
inline

Definition at line 22 of file SeedingTrackInfoBuilder.h.

References dz_.

Referenced by ntupleDataFormat.Track::dzPull().

const float btagbtvdeep::SeedingTrackInfoBuilder::eta ( void  ) const
inline
const float btagbtvdeep::SeedingTrackInfoBuilder::ip2d ( ) const
inline

Definition at line 26 of file SeedingTrackInfoBuilder.h.

References ip2D_.

const float btagbtvdeep::SeedingTrackInfoBuilder::ip2d_Signed ( ) const
inline

Definition at line 30 of file SeedingTrackInfoBuilder.h.

References ip2D_signed_.

const float btagbtvdeep::SeedingTrackInfoBuilder::ip3d ( ) const
inline

Definition at line 24 of file SeedingTrackInfoBuilder.h.

References ip3D_.

const float btagbtvdeep::SeedingTrackInfoBuilder::ip3d_Signed ( ) const
inline

Definition at line 28 of file SeedingTrackInfoBuilder.h.

References ip3D_signed_.

const float btagbtvdeep::SeedingTrackInfoBuilder::jetAxisDistance ( ) const
inline
const float btagbtvdeep::SeedingTrackInfoBuilder::jetAxisDlength ( ) const
inline

Definition at line 36 of file SeedingTrackInfoBuilder.h.

References jetAxisDlength_.

const float btagbtvdeep::SeedingTrackInfoBuilder::mass ( ) const
inline
const float btagbtvdeep::SeedingTrackInfoBuilder::nHits ( ) const
inline

Definition at line 34 of file SeedingTrackInfoBuilder.h.

References nHits_.

const float btagbtvdeep::SeedingTrackInfoBuilder::nPixelHits ( ) const
inline

Definition at line 33 of file SeedingTrackInfoBuilder.h.

References nPixelHits_.

const float btagbtvdeep::SeedingTrackInfoBuilder::phi ( void  ) const
inline
const float btagbtvdeep::SeedingTrackInfoBuilder::pt ( ) const
inline
const float btagbtvdeep::SeedingTrackInfoBuilder::sip2d ( ) const
inline

Definition at line 27 of file SeedingTrackInfoBuilder.h.

References sip2D_.

const float btagbtvdeep::SeedingTrackInfoBuilder::sip2d_Signed ( ) const
inline

Definition at line 31 of file SeedingTrackInfoBuilder.h.

References sip2D_signed_.

const float btagbtvdeep::SeedingTrackInfoBuilder::sip3d ( ) const
inline

Definition at line 25 of file SeedingTrackInfoBuilder.h.

References sip3D_.

const float btagbtvdeep::SeedingTrackInfoBuilder::sip3d_Signed ( ) const
inline
const float btagbtvdeep::SeedingTrackInfoBuilder::trackProbability2D ( ) const
inline
const float btagbtvdeep::SeedingTrackInfoBuilder::trackProbability3D ( ) const
inline

Member Data Documentation

float btagbtvdeep::SeedingTrackInfoBuilder::chi2reduced_
private

Definition at line 57 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and chi2reduced().

float btagbtvdeep::SeedingTrackInfoBuilder::dxy_
private

Definition at line 48 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and dxy().

float btagbtvdeep::SeedingTrackInfoBuilder::dz_
private

Definition at line 47 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and dz().

float btagbtvdeep::SeedingTrackInfoBuilder::eta_
private

Definition at line 44 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and eta().

float btagbtvdeep::SeedingTrackInfoBuilder::ip2D_
private

Definition at line 51 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and ip2d().

float btagbtvdeep::SeedingTrackInfoBuilder::ip2D_signed_
private

Definition at line 55 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and ip2d_Signed().

float btagbtvdeep::SeedingTrackInfoBuilder::ip3D_
private

Definition at line 49 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and ip3d().

float btagbtvdeep::SeedingTrackInfoBuilder::ip3D_signed_
private

Definition at line 53 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and ip3d_Signed().

float btagbtvdeep::SeedingTrackInfoBuilder::jetAxisDistance_
private

Definition at line 60 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and jetAxisDistance().

float btagbtvdeep::SeedingTrackInfoBuilder::jetAxisDlength_
private

Definition at line 61 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and jetAxisDlength().

float btagbtvdeep::SeedingTrackInfoBuilder::mass_
private

Definition at line 46 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and mass().

float btagbtvdeep::SeedingTrackInfoBuilder::nHits_
private

Definition at line 59 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and nHits().

float btagbtvdeep::SeedingTrackInfoBuilder::nPixelHits_
private

Definition at line 58 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and nPixelHits().

float btagbtvdeep::SeedingTrackInfoBuilder::phi_
private

Definition at line 45 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and phi().

float btagbtvdeep::SeedingTrackInfoBuilder::pt_
private

Definition at line 43 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and pt().

float btagbtvdeep::SeedingTrackInfoBuilder::sip2D_
private

Definition at line 52 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and sip2d().

float btagbtvdeep::SeedingTrackInfoBuilder::sip2D_signed_
private

Definition at line 56 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and sip2d_Signed().

float btagbtvdeep::SeedingTrackInfoBuilder::sip3D_
private

Definition at line 50 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and sip3d().

float btagbtvdeep::SeedingTrackInfoBuilder::sip3D_signed_
private

Definition at line 54 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and sip3d_Signed().

float btagbtvdeep::SeedingTrackInfoBuilder::trackProbability2D_
private

Definition at line 63 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and trackProbability2D().

float btagbtvdeep::SeedingTrackInfoBuilder::trackProbability3D_
private

Definition at line 62 of file SeedingTrackInfoBuilder.h.

Referenced by buildSeedingTrackInfo(), and trackProbability3D().