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

◆ MatchingType

Enumerator
NONE 
ECALMATCH 
ESMATCH 
TRACKFILTERING 
MVA 
FINAL 

Definition at line 15 of file PreId.h.

Constructor & Destructor Documentation

◆ PreId()

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

◆ chi2Ratio()

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

Definition at line 88 of file PreId.h.

References chi2Ratio_.

88 { return chi2Ratio_; }
float chi2Ratio_
Definition: PreId.h:113

◆ clusterRef()

PFClusterRef reco::PreId::clusterRef ( ) const
inline

Definition at line 100 of file PreId.h.

References clusterRef_.

Referenced by setECALMatchingProperties().

100 { return clusterRef_; }
PFClusterRef clusterRef_
Definition: PreId.h:104

◆ dpt()

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

Definition at line 98 of file PreId.h.

References dpt_.

Referenced by setTrackProperties().

98 { return dpt_; }
float dpt_
Definition: PreId.h:112

◆ ecalMatching()

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

◆ ecalPos()

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

◆ eopMatch()

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

◆ esMatching()

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

◆ eta()

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

Definition at line 81 of file PreId.h.

References trackRef_.

Referenced by Particle.Particle::__str__(), datamodel.Object::DeltaR(), Jet.Jet::jetID(), datamodel.Object::p4(), and Jet.Jet::puJetId().

81 { return trackRef_->eta(); }
reco::TrackRef trackRef_
Definition: PreId.h:103

◆ geomMatching()

const std::vector<float>& reco::PreId::geomMatching ( ) const
inline

Access methods.

Definition at line 78 of file PreId.h.

References geomMatching_.

78 { return geomMatching_; }
std::vector< float > geomMatching_
Definition: PreId.h:106

◆ gsfChi2()

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

Definition at line 89 of file PreId.h.

References gsfChi2_.

89 { return gsfChi2_; }
float gsfChi2_
Definition: PreId.h:111

◆ kfChi2()

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

◆ kfNHits()

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

◆ matching()

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  }
std::vector< int > matching_
Definition: PreId.h:120

◆ meanShower()

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

◆ mva()

float PreId::mva ( unsigned  n = 0) const

Definition at line 18 of file PreId.cc.

References mva_, and dqmiodumpmetadata::n.

Referenced by setMVA().

18  {
19  if (n < mva_.size())
20  return mva_[n];
21  return -999.;
22 }
std::vector< float > mva_
Definition: PreId.h:114

◆ mvaSelected()

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

◆ preIded()

bool reco::PreId::preIded ( unsigned  n = 0) const
inline

Definition at line 95 of file PreId.h.

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

95 { return matching(FINAL, n); }
bool matching(MatchingType type, unsigned n=0) const
Definition: PreId.h:70

◆ pt()

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

◆ setECALMatching()

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().

60 { setMatching(ECALMATCH, accepted, n); }
void setMatching(MatchingType type, bool result, unsigned n=0)
Definition: PreId.cc:6

◆ setECALMatchingProperties()

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
PFClusterRef clusterRef() const
Definition: PreId.h:100
std::vector< float > geomMatching_
Definition: PreId.h:106
PFClusterRef clusterRef_
Definition: PreId.h:104

◆ setESMatching()

void reco::PreId::setESMatching ( bool  accepted,
unsigned  n = 0 
)
inline

Definition at line 61 of file PreId.h.

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

61 { setMatching(ESMATCH, accepted, n); }
void setMatching(MatchingType type, bool result, unsigned n=0)
Definition: PreId.cc:6

◆ setFinalDecision()

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().

59 { setMatching(FINAL, accepted, n); }
void setMatching(MatchingType type, bool result, unsigned n=0)
Definition: PreId.cc:6

◆ setMatching()

void PreId::setMatching ( MatchingType  type,
bool  result,
unsigned  n = 0 
)

Definition at line 6 of file PreId.cc.

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

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 }
std::vector< int > matching_
Definition: PreId.h:120

◆ setMVA()

void reco::PreId::setMVA ( bool  accepted,
float  mva,
unsigned  n = 0 
)
inline

Definition at line 63 of file PreId.h.

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

Referenced by GoodSeedProducer::produce().

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

◆ setTrack()

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

◆ setTrackFiltering()

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().

62 { setMatching(TRACKFILTERING, accepted, n); }
void setMatching(MatchingType type, bool result, unsigned n=0)
Definition: PreId.cc:6

◆ setTrackProperties()

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() const
Definition: PreId.h:98
float dpt_
Definition: PreId.h:112
float chi2Ratio_
Definition: PreId.h:113
float gsfChi2_
Definition: PreId.h:111

◆ trackFiltered()

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

◆ trackRef()

reco::TrackRef reco::PreId::trackRef ( ) const
inline

Definition at line 99 of file PreId.h.

References trackRef_.

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

Member Data Documentation

◆ chi2Ratio_

float reco::PreId::chi2Ratio_
private

Definition at line 113 of file PreId.h.

Referenced by chi2Ratio(), and setTrackProperties().

◆ clusterRef_

PFClusterRef reco::PreId::clusterRef_
private

Definition at line 104 of file PreId.h.

Referenced by clusterRef(), and setECALMatchingProperties().

◆ dpt_

float reco::PreId::dpt_
private

Definition at line 112 of file PreId.h.

Referenced by dpt(), and setTrackProperties().

◆ EcalPos_

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

Definition at line 108 of file PreId.h.

Referenced by ecalPos(), and setECALMatchingProperties().

◆ geomMatching_

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

Definition at line 106 of file PreId.h.

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

◆ gsfChi2_

float reco::PreId::gsfChi2_
private

Definition at line 111 of file PreId.h.

Referenced by gsfChi2(), and setTrackProperties().

◆ matching_

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

Definition at line 120 of file PreId.h.

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

◆ matchingEop_

float reco::PreId::matchingEop_
private

Definition at line 107 of file PreId.h.

Referenced by eopMatch(), and setECALMatchingProperties().

◆ meanShower_

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

Definition at line 109 of file PreId.h.

Referenced by meanShower(), and setECALMatchingProperties().

◆ mva_

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

Definition at line 114 of file PreId.h.

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

◆ trackRef_

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

Definition at line 103 of file PreId.h.

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