CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
reco::PreId Class Reference

#include <PreId.h>

Public Types

enum  MatchingType {
  NONE = 0, ECALMATCH = 1, ESMATCH = 2, TRACKFILTERING = 3,
  MVA = 4, FINAL = 10
}
 

Public Member Functions

float chi2Ratio () const
 
PFClusterRef clusterRef () const
 
float dpt () const
 
bool ecalMatching (unsigned n=0) const
 
const math::XYZPointecalPos () const
 
float eopMatch () const
 
bool esMatching (unsigned n=0) const
 
float eta () const
 
const std::vector< float > & geomMatching () const
 Access methods. More...
 
float gsfChi2 () const
 
float kfChi2 () const
 
float kfNHits () const
 
bool matching (MatchingType type, unsigned n=0) const
 
const math::XYZPointmeanShower () const
 
float mva (unsigned n=0) const
 
bool mvaSelected (unsigned n=0) const
 
 PreId (unsigned nselection=1)
 
bool preIded (unsigned n=0) const
 
float pt () const
 
void setECALMatching (bool accepted, unsigned n=0)
 
void setECALMatchingProperties (PFClusterRef clusterRef, const math::XYZPoint &ecalpos, const math::XYZPoint &meanShower, float deta, float dphi, float chieta, float chiphi, float chi2, float eop)
 
void setESMatching (bool accepted, unsigned n=0)
 
void setFinalDecision (bool accepted, unsigned n=0)
 
void setMatching (MatchingType type, bool result, unsigned n=0)
 
void setMVA (bool accepted, float mva, unsigned n=0)
 
void setTrack (reco::TrackRef trackref)
 
void setTrackFiltering (bool accepted, unsigned n=0)
 
void setTrackProperties (float newchi2, float chi2ratio, float dpt)
 
bool trackFiltered (unsigned n=0) const
 
reco::TrackRef trackRef () const
 

Private Attributes

float chi2Ratio_
 
PFClusterRef clusterRef_
 
float dpt_
 
math::XYZPoint EcalPos_
 
std::vector< float > geomMatching_
 
float gsfChi2_
 
std::vector< int > matching_
 
float matchingEop_
 
math::XYZPoint meanShower_
 
std::vector< float > mva_
 
reco::TrackRef trackRef_
 

Detailed Description

Definition at line 13 of file PreId.h.

Member Enumeration Documentation

Enumerator
NONE 
ECALMATCH 
ESMATCH 
TRACKFILTERING 
MVA 
FINAL 

Definition at line 15 of file PreId.h.

Constructor & Destructor Documentation

reco::PreId::PreId ( unsigned  nselection = 1)
inline

Definition at line 18 of file PreId.h.

References geomMatching_, matching_, and mva_.

21  matchingEop_(-999.),
24  gsfChi2_(-999.),
25  dpt_(0.),
26  chi2Ratio_(0.) {
27  matching_.resize(nselection, false);
28  mva_.resize(nselection, -999.);
29  geomMatching_.resize(5, -999.);
30  }
math::XYZPoint meanShower_
Definition: PreId.h:109
float matchingEop_
Definition: PreId.h:107
std::vector< int > matching_
Definition: PreId.h:120
math::XYZPoint EcalPos_
Definition: PreId.h:108
float dpt_
Definition: PreId.h:112
float chi2Ratio_
Definition: PreId.h:113
float gsfChi2_
Definition: PreId.h:111
reco::TrackRef trackRef_
Definition: PreId.h:103
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< float > mva_
Definition: PreId.h:114
std::vector< float > geomMatching_
Definition: PreId.h:106
PFClusterRef clusterRef_
Definition: PreId.h:104

Member Function Documentation

float reco::PreId::chi2Ratio ( ) const
inline

Definition at line 88 of file PreId.h.

References chi2Ratio_.

Referenced by lowptgsfeleseed::Features::set().

88 { return chi2Ratio_; }
float chi2Ratio_
Definition: PreId.h:113
PFClusterRef reco::PreId::clusterRef ( ) const
inline

Definition at line 100 of file PreId.h.

References clusterRef_.

Referenced by lowptgsfeleseed::Features::set(), and setECALMatchingProperties().

100 { return clusterRef_; }
PFClusterRef clusterRef_
Definition: PreId.h:104
float reco::PreId::dpt ( ) const
inline

Definition at line 98 of file PreId.h.

References dpt_.

Referenced by lowptgsfeleseed::Features::set(), and setTrackProperties().

98 { return dpt_; }
float dpt_
Definition: PreId.h:112
bool reco::PreId::ecalMatching ( unsigned  n = 0) const
inline

Definition at line 91 of file PreId.h.

References ECALMATCH, matching(), and dqmiodumpmetadata::n.

91 { return matching(ECALMATCH, n); }
bool matching(MatchingType type, unsigned n=0) const
Definition: PreId.h:70
const math::XYZPoint& reco::PreId::ecalPos ( ) const
inline

Definition at line 85 of file PreId.h.

References EcalPos_.

85 { return EcalPos_; }
math::XYZPoint EcalPos_
Definition: PreId.h:108
float reco::PreId::eopMatch ( ) const
inline

Definition at line 79 of file PreId.h.

References matchingEop_.

79 { return matchingEop_; }
float matchingEop_
Definition: PreId.h:107
bool reco::PreId::esMatching ( unsigned  n = 0) const
inline

Definition at line 92 of file PreId.h.

References ESMATCH, matching(), and dqmiodumpmetadata::n.

92 { return matching(ESMATCH, n); }
bool matching(MatchingType type, unsigned n=0) const
Definition: PreId.h:70
float reco::PreId::eta ( ) const
inline

Definition at line 81 of file PreId.h.

References trackRef_.

Referenced by Particle.Particle::__str__(), Jet.Jet::jetID(), and Jet.Jet::puJetId().

81 { return trackRef_->eta(); }
reco::TrackRef trackRef_
Definition: PreId.h:103
const std::vector<float>& reco::PreId::geomMatching ( ) const
inline

Access methods.

Definition at line 78 of file PreId.h.

References geomMatching_.

Referenced by lowptgsfeleseed::Features::set().

78 { return geomMatching_; }
std::vector< float > geomMatching_
Definition: PreId.h:106
float reco::PreId::gsfChi2 ( ) const
inline

Definition at line 89 of file PreId.h.

References gsfChi2_.

Referenced by lowptgsfeleseed::Features::set().

89 { return gsfChi2_; }
float gsfChi2_
Definition: PreId.h:111
float reco::PreId::kfChi2 ( ) const
inline

Definition at line 82 of file PreId.h.

References trackRef_.

82 { return trackRef_->normalizedChi2(); }
reco::TrackRef trackRef_
Definition: PreId.h:103
float reco::PreId::kfNHits ( ) const
inline

Definition at line 83 of file PreId.h.

References trackRef_.

83 { return trackRef_->found(); }
reco::TrackRef trackRef_
Definition: PreId.h:103
bool reco::PreId::matching ( MatchingType  type,
unsigned  n = 0 
) const
inline

Definition at line 70 of file PreId.h.

References matching_, and dqmiodumpmetadata::n.

Referenced by ecalMatching(), esMatching(), mvaSelected(), preIded(), and trackFiltered().

70  {
71  if (n < matching_.size()) {
72  return matching_[n] & (1 << type);
73  }
74  return false;
75  }
type
Definition: HCALResponse.h:21
std::vector< int > matching_
Definition: PreId.h:120
const math::XYZPoint& reco::PreId::meanShower ( ) const
inline

Definition at line 86 of file PreId.h.

References meanShower_.

Referenced by setECALMatchingProperties().

86 { return meanShower_; }
math::XYZPoint meanShower_
Definition: PreId.h:109
float PreId::mva ( unsigned  n = 0) const

Definition at line 18 of file PreId.cc.

References mva_.

Referenced by preIded().

18  {
19  if (n < mva_.size())
20  return mva_[n];
21  return -999.;
22 }
std::vector< float > mva_
Definition: PreId.h:114
bool reco::PreId::mvaSelected ( unsigned  n = 0) const
inline

Definition at line 94 of file PreId.h.

References matching(), MVA, and dqmiodumpmetadata::n.

94 { return matching(MVA, n); }
bool matching(MatchingType type, unsigned n=0) const
Definition: PreId.h:70
bool reco::PreId::preIded ( unsigned  n = 0) const
inline

Definition at line 95 of file PreId.h.

References FINAL, matching(), mva(), and dqmiodumpmetadata::n.

95 { return matching(FINAL, n); }
bool matching(MatchingType type, unsigned n=0) const
Definition: PreId.h:70
float reco::PreId::pt ( ) const
inline
void reco::PreId::setECALMatching ( bool  accepted,
unsigned  n = 0 
)
inline

Definition at line 60 of file PreId.h.

References ECALMATCH, dqmiodumpmetadata::n, and setMatching().

Referenced by GoodSeedProducer::produce().

void setMatching(MatchingType type, bool result, unsigned n=0)
Definition: PreId.cc:6
bool accepted(std::vector< std::string_view > const &, std::string_view)
void reco::PreId::setECALMatchingProperties ( PFClusterRef  clusterRef,
const math::XYZPoint ecalpos,
const math::XYZPoint meanShower,
float  deta,
float  dphi,
float  chieta,
float  chiphi,
float  chi2,
float  eop 
)
inline

Definition at line 33 of file PreId.h.

References hltPixelTracks_cff::chi2, clusterRef(), clusterRef_, EcalPos_, geomMatching_, matchingEop_, meanShower(), and meanShower_.

Referenced by GoodSeedProducer::produce(), and LowPtGsfElectronSeedProducer::propagateTrackToCalo().

41  {
43  EcalPos_ = ecalpos;
45  geomMatching_[0] = deta;
46  geomMatching_[1] = dphi;
47  geomMatching_[2] = chieta;
48  geomMatching_[3] = chiphi;
49  geomMatching_[4] = chi2;
50  matchingEop_ = eop;
51  }
math::XYZPoint meanShower_
Definition: PreId.h:109
float matchingEop_
Definition: PreId.h:107
math::XYZPoint EcalPos_
Definition: PreId.h:108
const math::XYZPoint & meanShower() const
Definition: PreId.h:86
std::vector< float > geomMatching_
Definition: PreId.h:106
PFClusterRef clusterRef() const
Definition: PreId.h:100
PFClusterRef clusterRef_
Definition: PreId.h:104
void reco::PreId::setESMatching ( bool  accepted,
unsigned  n = 0 
)
inline

Definition at line 61 of file PreId.h.

References ESMATCH, dqmiodumpmetadata::n, and setMatching().

void setMatching(MatchingType type, bool result, unsigned n=0)
Definition: PreId.cc:6
bool accepted(std::vector< std::string_view > const &, std::string_view)
void reco::PreId::setFinalDecision ( bool  accepted,
unsigned  n = 0 
)
inline

Definition at line 59 of file PreId.h.

References FINAL, dqmiodumpmetadata::n, and setMatching().

Referenced by GoodSeedProducer::produce().

void setMatching(MatchingType type, bool result, unsigned n=0)
Definition: PreId.cc:6
bool accepted(std::vector< std::string_view > const &, std::string_view)
void PreId::setMatching ( MatchingType  type,
bool  result,
unsigned  n = 0 
)

Definition at line 6 of file PreId.cc.

References gather_cfg::cout, matching_, and dqmiodumpmetadata::n.

Referenced by setECALMatching(), setESMatching(), setFinalDecision(), setMVA(), and setTrackFiltering().

6  {
7  if (n < matching_.size()) {
8  if (result) {
9  matching_[n] |= (1 << type);
10  } else {
11  matching_[n] &= ~(1 << type);
12  }
13  } else {
14  std::cout << " Out of range " << std::endl;
15  }
16 }
type
Definition: HCALResponse.h:21
std::vector< int > matching_
Definition: PreId.h:120
void reco::PreId::setMVA ( bool  accepted,
float  mva,
unsigned  n = 0 
)
inline

Definition at line 63 of file PreId.h.

References MVA, mva_, dqmiodumpmetadata::n, mps_fire::result, and setMatching().

Referenced by lowptgsfeleseed::HeavyObjectCache::eval(), and GoodSeedProducer::produce().

63  {
65  if (n < mva_.size())
66  mva_[n] = mva;
67  }
void setMatching(MatchingType type, bool result, unsigned n=0)
Definition: PreId.cc:6
bool accepted(std::vector< std::string_view > const &, std::string_view)
std::vector< float > mva_
Definition: PreId.h:114
float mva(unsigned n=0) const
Definition: PreId.cc:18
void reco::PreId::setTrack ( reco::TrackRef  trackref)
inline

Definition at line 31 of file PreId.h.

References trackRef_.

Referenced by LowPtGsfElectronSeedProducer::loop(), and GoodSeedProducer::produce().

31 { trackRef_ = trackref; }
reco::TrackRef trackRef_
Definition: PreId.h:103
void reco::PreId::setTrackFiltering ( bool  accepted,
unsigned  n = 0 
)
inline

Definition at line 62 of file PreId.h.

References dqmiodumpmetadata::n, setMatching(), and TRACKFILTERING.

Referenced by GoodSeedProducer::produce().

void setMatching(MatchingType type, bool result, unsigned n=0)
Definition: PreId.cc:6
bool accepted(std::vector< std::string_view > const &, std::string_view)
void reco::PreId::setTrackProperties ( float  newchi2,
float  chi2ratio,
float  dpt 
)
inline

Definition at line 53 of file PreId.h.

References chi2Ratio_, dpt(), dpt_, and gsfChi2_.

Referenced by LowPtGsfElectronSeedProducer::lightGsfTracking(), and GoodSeedProducer::produce().

53  {
54  gsfChi2_ = newchi2;
55  chi2Ratio_ = chi2ratio;
56  dpt_ = dpt;
57  }
float dpt_
Definition: PreId.h:112
float chi2Ratio_
Definition: PreId.h:113
float gsfChi2_
Definition: PreId.h:111
float dpt() const
Definition: PreId.h:98
bool reco::PreId::trackFiltered ( unsigned  n = 0) const
inline

Definition at line 93 of file PreId.h.

References matching(), dqmiodumpmetadata::n, and TRACKFILTERING.

93 { return matching(TRACKFILTERING, n); }
bool matching(MatchingType type, unsigned n=0) const
Definition: PreId.h:70
reco::TrackRef reco::PreId::trackRef ( ) const
inline

Definition at line 99 of file PreId.h.

References trackRef_.

Referenced by lowptgsfeleseed::Features::set().

99 { return trackRef_; }
reco::TrackRef trackRef_
Definition: PreId.h:103

Member Data Documentation

float reco::PreId::chi2Ratio_
private

Definition at line 113 of file PreId.h.

Referenced by chi2Ratio(), and setTrackProperties().

PFClusterRef reco::PreId::clusterRef_
private

Definition at line 104 of file PreId.h.

Referenced by clusterRef(), and setECALMatchingProperties().

float reco::PreId::dpt_
private

Definition at line 112 of file PreId.h.

Referenced by dpt(), and setTrackProperties().

math::XYZPoint reco::PreId::EcalPos_
private

Definition at line 108 of file PreId.h.

Referenced by ecalPos(), and setECALMatchingProperties().

std::vector<float> reco::PreId::geomMatching_
private

Definition at line 106 of file PreId.h.

Referenced by geomMatching(), PreId(), and setECALMatchingProperties().

float reco::PreId::gsfChi2_
private

Definition at line 111 of file PreId.h.

Referenced by gsfChi2(), and setTrackProperties().

std::vector<int> reco::PreId::matching_
private

Definition at line 120 of file PreId.h.

Referenced by matching(), PreId(), and setMatching().

float reco::PreId::matchingEop_
private

Definition at line 107 of file PreId.h.

Referenced by eopMatch(), and setECALMatchingProperties().

math::XYZPoint reco::PreId::meanShower_
private

Definition at line 109 of file PreId.h.

Referenced by meanShower(), and setECALMatchingProperties().

std::vector<float> reco::PreId::mva_
private

Definition at line 114 of file PreId.h.

Referenced by mva(), PreId(), and setMVA().

reco::TrackRef reco::PreId::trackRef_
private

Definition at line 103 of file PreId.h.

Referenced by eta(), kfChi2(), kfNHits(), pt(), setTrack(), and trackRef().