CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 14 of file PreId.h.

Member Enumeration Documentation

Enumerator
NONE 
ECALMATCH 
ESMATCH 
TRACKFILTERING 
MVA 
FINAL 

Definition at line 16 of file PreId.h.

16  {
17  NONE=0,
18  ECALMATCH=1,
19  ESMATCH=2,
21  MVA=4,
22  FINAL=10
23  };

Constructor & Destructor Documentation

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

Definition at line 26 of file PreId.h.

References geomMatching_, matching_, and mva_.

29  dpt_(0.),chi2Ratio_(0.){
30  matching_.resize(nselection,false);
31  mva_.resize(nselection,-999.);
32  geomMatching_.resize(5,-999.);
33  }
math::XYZPoint meanShower_
Definition: PreId.h:122
float matchingEop_
Definition: PreId.h:120
std::vector< int > matching_
Definition: PreId.h:133
math::XYZPoint EcalPos_
Definition: PreId.h:121
float dpt_
Definition: PreId.h:125
float chi2Ratio_
Definition: PreId.h:126
float gsfChi2_
Definition: PreId.h:124
reco::TrackRef trackRef_
Definition: PreId.h:115
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< float > mva_
Definition: PreId.h:127
std::vector< float > geomMatching_
Definition: PreId.h:119
PFClusterRef clusterRef_
Definition: PreId.h:116

Member Function Documentation

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

Definition at line 100 of file PreId.h.

References chi2Ratio_.

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

Definition at line 112 of file PreId.h.

References clusterRef_.

Referenced by setECALMatchingProperties().

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

Definition at line 110 of file PreId.h.

References dpt_.

Referenced by setTrackProperties().

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

Definition at line 103 of file PreId.h.

References ECALMATCH, matching(), and n.

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

Definition at line 97 of file PreId.h.

References EcalPos_.

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

Definition at line 91 of file PreId.h.

References matchingEop_.

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

Definition at line 104 of file PreId.h.

References ESMATCH, matching(), and n.

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

Definition at line 93 of file PreId.h.

References trackRef_.

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

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

Access methods.

Definition at line 90 of file PreId.h.

References geomMatching_.

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

Definition at line 101 of file PreId.h.

References gsfChi2_.

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

Definition at line 94 of file PreId.h.

References trackRef_.

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

Definition at line 95 of file PreId.h.

References trackRef_.

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

Definition at line 80 of file PreId.h.

References matching_, and n.

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

81  {
82  if(n<matching_.size())
83  {
84  return matching_[n] & (1 << type);
85  }
86  return false;
87  }
type
Definition: HCALResponse.h:21
std::vector< int > matching_
Definition: PreId.h:133
const math::XYZPoint& reco::PreId::meanShower ( ) const
inline

Definition at line 98 of file PreId.h.

References meanShower_.

Referenced by setECALMatchingProperties().

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

Definition at line 25 of file PreId.cc.

References mva_.

26 {
27  if(n<mva_.size())
28  return mva_[n];
29  return -999.;
30 }
std::vector< float > mva_
Definition: PreId.h:127
bool reco::PreId::mvaSelected ( unsigned  n = 0) const
inline

Definition at line 106 of file PreId.h.

References matching(), MVA, and n.

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

Definition at line 107 of file PreId.h.

References FINAL, matching(), and n.

107 {return matching(FINAL,n);}
bool matching(MatchingType type, unsigned n=0) const
Definition: PreId.h:80
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, n, and setMatching().

Referenced by GoodSeedProducer::produce().

61  {
62  setMatching(ECALMATCH,accepted,n);
63  }
void setMatching(MatchingType type, bool result, unsigned n=0)
Definition: PreId.cc:6
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 38 of file PreId.h.

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

Referenced by GoodSeedProducer::produce().

38  {
40  EcalPos_ = ecalpos;
42  geomMatching_[0] = deta;
43  geomMatching_[1] = dphi;
44  geomMatching_[2] = chieta;
45  geomMatching_[3] = chiphi;
46  geomMatching_[4] = chi2;
47  matchingEop_= eop;
48  }
math::XYZPoint meanShower_
Definition: PreId.h:122
float matchingEop_
Definition: PreId.h:120
math::XYZPoint EcalPos_
Definition: PreId.h:121
const math::XYZPoint & meanShower() const
Definition: PreId.h:98
std::vector< float > geomMatching_
Definition: PreId.h:119
PFClusterRef clusterRef() const
Definition: PreId.h:112
PFClusterRef clusterRef_
Definition: PreId.h:116
void reco::PreId::setESMatching ( bool  accepted,
unsigned  n = 0 
)
inline

Definition at line 64 of file PreId.h.

References ESMATCH, n, and setMatching().

65  {
66  setMatching(ESMATCH,accepted,n);
67  }
void setMatching(MatchingType type, bool result, unsigned n=0)
Definition: PreId.cc:6
void reco::PreId::setFinalDecision ( bool  accepted,
unsigned  n = 0 
)
inline

Definition at line 56 of file PreId.h.

References FINAL, n, and setMatching().

Referenced by GoodSeedProducer::produce().

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

Definition at line 6 of file PreId.cc.

References gather_cfg::cout, matching_, and n.

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

7 {
8  if(n<matching_.size())
9  {
10  if(result)
11  {
12  matching_[n] |= (1 << type);
13  }
14  else
15  {
16  matching_[n] &= ~(1 <<type);
17  }
18  }
19  else
20  {
21  std::cout << " Out of range " << std::endl;
22  }
23 }
type
Definition: HCALResponse.h:21
std::vector< int > matching_
Definition: PreId.h:133
tuple result
Definition: query.py:137
tuple cout
Definition: gather_cfg.py:121
void reco::PreId::setMVA ( bool  accepted,
float  mva,
unsigned  n = 0 
)
inline

Definition at line 72 of file PreId.h.

References MVA, mva_, n, and setMatching().

Referenced by GoodSeedProducer::produce().

73  {
74  setMatching(MVA,accepted,n);
75  if(n<mva_.size())
76  mva_[n]=mva;
77  }
void setMatching(MatchingType type, bool result, unsigned n=0)
Definition: PreId.cc:6
std::vector< float > mva_
Definition: PreId.h:127
float mva(unsigned n=0) const
Definition: PreId.cc:25
void reco::PreId::setTrack ( reco::TrackRef  trackref)
inline

Definition at line 34 of file PreId.h.

References trackRef_.

Referenced by ElectronSeedTrackRefUpdater::produce(), ElectronSeedTrackRefUpdaterAndMerger::produce(), and GoodSeedProducer::produce().

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

Definition at line 68 of file PreId.h.

References n, setMatching(), and TRACKFILTERING.

Referenced by GoodSeedProducer::produce().

69  {
70  setMatching(TRACKFILTERING,accepted,n);
71  }
void setMatching(MatchingType type, bool result, unsigned n=0)
Definition: PreId.cc:6
void reco::PreId::setTrackProperties ( float  newchi2,
float  chi2ratio,
float  dpt 
)
inline

Definition at line 50 of file PreId.h.

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

Referenced by GoodSeedProducer::produce().

50  {
51  gsfChi2_=newchi2;
52  chi2Ratio_ = chi2ratio;
53  dpt_ = dpt;
54  }
float dpt_
Definition: PreId.h:125
float chi2Ratio_
Definition: PreId.h:126
float gsfChi2_
Definition: PreId.h:124
float dpt() const
Definition: PreId.h:110
bool reco::PreId::trackFiltered ( unsigned  n = 0) const
inline

Definition at line 105 of file PreId.h.

References matching(), n, and TRACKFILTERING.

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

Definition at line 111 of file PreId.h.

References trackRef_.

111 {return trackRef_;}
reco::TrackRef trackRef_
Definition: PreId.h:115

Member Data Documentation

float reco::PreId::chi2Ratio_
private

Definition at line 126 of file PreId.h.

Referenced by chi2Ratio(), and setTrackProperties().

PFClusterRef reco::PreId::clusterRef_
private

Definition at line 116 of file PreId.h.

Referenced by clusterRef(), and setECALMatchingProperties().

float reco::PreId::dpt_
private

Definition at line 125 of file PreId.h.

Referenced by dpt(), and setTrackProperties().

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

Definition at line 121 of file PreId.h.

Referenced by ecalPos(), and setECALMatchingProperties().

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

Definition at line 119 of file PreId.h.

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

float reco::PreId::gsfChi2_
private

Definition at line 124 of file PreId.h.

Referenced by gsfChi2(), and setTrackProperties().

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

Definition at line 133 of file PreId.h.

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

float reco::PreId::matchingEop_
private

Definition at line 120 of file PreId.h.

Referenced by eopMatch(), and setECALMatchingProperties().

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

Definition at line 122 of file PreId.h.

Referenced by meanShower(), and setECALMatchingProperties().

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

Definition at line 127 of file PreId.h.

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

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

Definition at line 115 of file PreId.h.

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