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.

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

Constructor & Destructor Documentation

◆ PreId()

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

Definition at line 18 of file PreId.h.

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  }

References geomMatching_, matching_, and mva_.

Member Function Documentation

◆ chi2Ratio()

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

Definition at line 88 of file PreId.h.

88 { return chi2Ratio_; }

References chi2Ratio_.

◆ clusterRef()

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

Definition at line 100 of file PreId.h.

100 { return clusterRef_; }

References clusterRef_.

Referenced by setECALMatchingProperties().

◆ dpt()

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

Definition at line 98 of file PreId.h.

98 { return dpt_; }

References dpt_.

Referenced by setTrackProperties().

◆ ecalMatching()

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

Definition at line 91 of file PreId.h.

91 { return matching(ECALMATCH, n); }

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

◆ ecalPos()

const math::XYZPoint& reco::PreId::ecalPos ( ) const
inline

Definition at line 85 of file PreId.h.

85 { return EcalPos_; }

References EcalPos_.

◆ eopMatch()

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

Definition at line 79 of file PreId.h.

79 { return matchingEop_; }

References matchingEop_.

◆ esMatching()

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

Definition at line 92 of file PreId.h.

92 { return matching(ESMATCH, n); }

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

◆ eta()

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

Definition at line 81 of file PreId.h.

81 { return trackRef_->eta(); }

References trackRef_.

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

◆ geomMatching()

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

Access methods.

Definition at line 78 of file PreId.h.

78 { return geomMatching_; }

References geomMatching_.

◆ gsfChi2()

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

Definition at line 89 of file PreId.h.

89 { return gsfChi2_; }

References gsfChi2_.

◆ kfChi2()

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

Definition at line 82 of file PreId.h.

82 { return trackRef_->normalizedChi2(); }

References trackRef_.

◆ kfNHits()

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

Definition at line 83 of file PreId.h.

83 { return trackRef_->found(); }

References trackRef_.

◆ matching()

bool reco::PreId::matching ( MatchingType  type,
unsigned  n = 0 
) const
inline

Definition at line 70 of file PreId.h.

70  {
71  if (n < matching_.size()) {
72  return matching_[n] & (1 << type);
73  }
74  return false;
75  }

References matching_, and dqmiodumpmetadata::n.

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

◆ meanShower()

const math::XYZPoint& reco::PreId::meanShower ( ) const
inline

Definition at line 86 of file PreId.h.

86 { return meanShower_; }

References meanShower_.

Referenced by setECALMatchingProperties().

◆ mva()

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

Definition at line 18 of file PreId.cc.

18  {
19  if (n < mva_.size())
20  return mva_[n];
21  return -999.;
22 }

References mva_, and dqmiodumpmetadata::n.

Referenced by setMVA().

◆ mvaSelected()

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

Definition at line 94 of file PreId.h.

94 { return matching(MVA, n); }

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

◆ preIded()

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

Definition at line 95 of file PreId.h.

95 { return matching(FINAL, n); }

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

◆ 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 cms::dd::accepted(), ECALMATCH, dqmiodumpmetadata::n, and setMatching().

Referenced by GoodSeedProducer::produce().

◆ 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.

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  }

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

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

◆ setESMatching()

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

Definition at line 61 of file PreId.h.

References cms::dd::accepted(), ESMATCH, dqmiodumpmetadata::n, and setMatching().

◆ setFinalDecision()

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

Definition at line 59 of file PreId.h.

References cms::dd::accepted(), FINAL, dqmiodumpmetadata::n, and setMatching().

Referenced by GoodSeedProducer::produce().

◆ setMatching()

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

Definition at line 6 of file PreId.cc.

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 }

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

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

◆ setMVA()

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

Definition at line 63 of file PreId.h.

63  {
65  if (n < mva_.size())
66  mva_[n] = mva;
67  }

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

Referenced by GoodSeedProducer::produce().

◆ setTrack()

void reco::PreId::setTrack ( reco::TrackRef  trackref)
inline

Definition at line 31 of file PreId.h.

31 { trackRef_ = trackref; }

References trackRef_.

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

◆ setTrackFiltering()

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

◆ setTrackProperties()

void reco::PreId::setTrackProperties ( float  newchi2,
float  chi2ratio,
float  dpt 
)
inline

Definition at line 53 of file PreId.h.

53  {
54  gsfChi2_ = newchi2;
55  chi2Ratio_ = chi2ratio;
56  dpt_ = dpt;
57  }

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

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

◆ trackFiltered()

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

Definition at line 93 of file PreId.h.

93 { return matching(TRACKFILTERING, n); }

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

◆ trackRef()

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

Definition at line 99 of file PreId.h.

99 { return trackRef_; }

References trackRef_.

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

reco::PreId::mva
float mva(unsigned n=0) const
Definition: PreId.cc:18
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
reco::PreId::meanShower
const math::XYZPoint & meanShower() const
Definition: PreId.h:86
reco::PreId::setMatching
void setMatching(MatchingType type, bool result, unsigned n=0)
Definition: PreId.cc:6
reco::PreId::clusterRef_
PFClusterRef clusterRef_
Definition: PreId.h:104
gather_cfg.cout
cout
Definition: gather_cfg.py:144
reco::PreId::geomMatching_
std::vector< float > geomMatching_
Definition: PreId.h:106
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
reco::PreId::MVA
Definition: PreId.h:15
edm::Ref< TrackCollection >
reco::PreId::meanShower_
math::XYZPoint meanShower_
Definition: PreId.h:109
reco::PreId::mva_
std::vector< float > mva_
Definition: PreId.h:114
reco::PreId::TRACKFILTERING
Definition: PreId.h:15
reco::PreId::EcalPos_
math::XYZPoint EcalPos_
Definition: PreId.h:108
cms::dd::accepted
bool accepted(std::vector< std::regex > const &, std::string_view)
reco::PreId::trackRef_
reco::TrackRef trackRef_
Definition: PreId.h:103
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
reco::PreId::ESMATCH
Definition: PreId.h:15
reco::PreId::matchingEop_
float matchingEop_
Definition: PreId.h:107
reco::PreId::matching
bool matching(MatchingType type, unsigned n=0) const
Definition: PreId.h:70
reco::PreId::ECALMATCH
Definition: PreId.h:15
reco::PreId::clusterRef
PFClusterRef clusterRef() const
Definition: PreId.h:100
type
type
Definition: HCALResponse.h:21
reco::PreId::matching_
std::vector< int > matching_
Definition: PreId.h:120
reco::PreId::dpt
float dpt() const
Definition: PreId.h:98
reco::PreId::NONE
Definition: PreId.h:15
reco::PreId::dpt_
float dpt_
Definition: PreId.h:112
mps_fire.result
result
Definition: mps_fire.py:303
reco::PreId::FINAL
Definition: PreId.h:15
reco::PreId::gsfChi2_
float gsfChi2_
Definition: PreId.h:111
reco::PreId::chi2Ratio_
float chi2Ratio_
Definition: PreId.h:113