CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
reco::tau::qcuts Namespace Reference

Functions

bool AND (const TrackBaseRef &track, const RecoTauQualityCuts::TrackQCutFuncCollection &cuts)
 
bool AND_cand (const PFCandidate &cand, const RecoTauQualityCuts::CandQCutFuncCollection &cuts)
 
bool etMin_cand (const PFCandidate &cand, double cut)
 
bool mapAndCutByType (const PFCandidate &cand, const RecoTauQualityCuts::CandQCutFuncMap &funcMap)
 
bool minTrackVertexWeight (const TrackBaseRef &track, const reco::VertexRef *pv, double cut)
 
bool minTrackVertexWeight_cand (const PFCandidate &cand, const reco::VertexRef *pv, double cut)
 
bool ptMin (const TrackBaseRef &track, double cut)
 
bool ptMin_cand (const PFCandidate &cand, double cut)
 
bool trkChi2 (const TrackBaseRef &track, double cut)
 
bool trkChi2_cand (const PFCandidate &cand, double cut)
 
bool trkLongitudinalImpactParameter (const TrackBaseRef &track, const reco::VertexRef *pv, double cut)
 
bool trkLongitudinalImpactParameter_cand (const PFCandidate &cand, const reco::VertexRef *pv, double cut)
 
bool trkLongitudinalImpactParameterWrtTrack (const TrackBaseRef &track, const reco::TrackBaseRef *leadTrack, const reco::VertexRef *pv, double cut)
 DZ cut, with respect to the current lead rack. More...
 
bool trkLongitudinalImpactParameterWrtTrack_cand (const PFCandidate &cand, const reco::TrackBaseRef *leadTrack, const reco::VertexRef *pv, double cut)
 
bool trkPixelHits (const TrackBaseRef &track, int cut)
 
bool trkPixelHits_cand (const PFCandidate &cand, int cut)
 
bool trkTrackerHits (const TrackBaseRef &track, int cut)
 
bool trkTrackerHits_cand (const PFCandidate &cand, int cut)
 
bool trkTransverseImpactParameter (const TrackBaseRef &track, const reco::VertexRef *pv, double cut)
 
bool trkTransverseImpactParameter_cand (const PFCandidate &cand, const reco::VertexRef *pv, double cut)
 

Function Documentation

bool reco::tau::qcuts::AND ( const TrackBaseRef &  track,
const RecoTauQualityCuts::TrackQCutFuncCollection &  cuts 
)

Definition at line 195 of file RecoTauQualityCuts.cc.

Referenced by egHLT::EgObjTrigCut< T >::pass(), egHLT::EgEvtTrigCut< T >::pass(), dqmservices::TriggerSelector::TreeElement::returnStatus(), and dqmservices::TriggerSelector::TreeElement::TreeElement().

196 {
197  BOOST_FOREACH( const RecoTauQualityCuts::TrackQCutFunc& func, cuts ) {
198  if ( !func(track) ) return false;
199  }
200  return true;
201 }
bool reco::tau::qcuts::AND_cand ( const PFCandidate &  cand,
const RecoTauQualityCuts::CandQCutFuncCollection &  cuts 
)

Definition at line 203 of file RecoTauQualityCuts.cc.

Referenced by mapAndCutByType().

204 {
205  BOOST_FOREACH( const RecoTauQualityCuts::CandQCutFunc& func, cuts ) {
206  if ( !func(cand) ) return false;
207  }
208  return true;
209 }
bool reco::tau::qcuts::etMin_cand ( const PFCandidate &  cand,
double  cut 
)

Definition at line 42 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, reco::LeafCandidate::et(), and LogDebug.

43 {
44  LogDebug("TauQCuts") << "<etMin_cand>: Et = " << cand.et() << ", cut = " << cut ;
45  return (cand.et() > cut);
46 }
#define LogDebug(id)
bool reco::tau::qcuts::mapAndCutByType ( const PFCandidate &  cand,
const RecoTauQualityCuts::CandQCutFuncMap &  funcMap 
)

Definition at line 212 of file RecoTauQualityCuts.cc.

References AND_cand(), Reconstruction_Data_cff::cuts, and reco::PFCandidate::particleId().

213 {
214  // Find the cuts that for this particle type
215  RecoTauQualityCuts::CandQCutFuncMap::const_iterator cuts = funcMap.find(cand.particleId());
216  // Return false if we dont' know how to deal with this particle type
217  if ( cuts == funcMap.end() ) return false;
218  return AND_cand(cand, cuts->second); // Otherwise AND all the cuts
219 }
bool AND_cand(const PFCandidate &cand, const RecoTauQualityCuts::CandQCutFuncCollection &cuts)
bool reco::tau::qcuts::minTrackVertexWeight ( const TrackBaseRef &  track,
const reco::VertexRef pv,
double  cut 
)

Definition at line 152 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, reco::TrackBase::eta(), edm::Ref< C, T, F >::isNull(), LogDebug, reco::TrackBase::phi(), and reco::TrackBase::pt().

Referenced by minTrackVertexWeight_cand().

153 {
154  if ( pv->isNull() ) {
155  edm::LogError("QCutsNoPrimaryVertex") << "Primary vertex Ref in " <<
156  "RecoTauQualityCuts is invalid. - minTrackVertexWeight";
157  return false;
158  }
159  LogDebug("TauQCuts") << " track: Pt = " << track->pt() << ", eta = " << track->eta() << ", phi = " << track->phi() ;
160  LogDebug("TauQCuts") << " vertex: x = " << (*pv)->position().x() << ", y = " << (*pv)->position().y() << ", z = " << (*pv)->position().z() ;
161  LogDebug("TauQCuts") << "--> trackWeight = " << (*pv)->trackWeight(track) << " (cut = " << cut << ")" ;
162  return ((*pv)->trackWeight(track) >= cut);
163 }
#define LogDebug(id)
bool isNull() const
Checks for null.
Definition: Ref.h:247
bool reco::tau::qcuts::minTrackVertexWeight_cand ( const PFCandidate &  cand,
const reco::VertexRef pv,
double  cut 
)

Definition at line 165 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, LogDebug, and minTrackVertexWeight().

166 {
167  auto track = getTrackRef(cand);
168  if ( track.isNonnull() ) {
169  return minTrackVertexWeight(track, pv, cut);
170  } else {
171  LogDebug("TauQCuts") << "<minTrackVertexWeight_cand>: weight = N/A, cut = " << cut ;
172  return false;
173  }
174 }
#define LogDebug(id)
bool minTrackVertexWeight(const TrackBaseRef &track, const reco::VertexRef *pv, double cut)
bool reco::tau::qcuts::ptMin ( const TrackBaseRef &  track,
double  cut 
)

Definition at line 30 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, LogDebug, and reco::TrackBase::pt().

31 {
32  LogDebug("TauQCuts") << "<ptMin>: Pt = " << track->pt() << ", cut = " << cut ;
33  return (track->pt() > cut);
34 }
#define LogDebug(id)
bool reco::tau::qcuts::ptMin_cand ( const PFCandidate &  cand,
double  cut 
)

Definition at line 36 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, LogDebug, and reco::LeafCandidate::pt().

37 {
38  LogDebug("TauQCuts") << "<ptMin_cand>: Pt = " << cand.pt() << ", cut = " << cut ;
39  return (cand.pt() > cut);
40 }
#define LogDebug(id)
bool reco::tau::qcuts::trkChi2 ( const TrackBaseRef &  track,
double  cut 
)

Definition at line 176 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, LogDebug, and reco::TrackBase::normalizedChi2().

Referenced by trkChi2_cand().

177 {
178  LogDebug("TauQCuts") << "<trkChi2>: chi^2 = " << track->normalizedChi2() << ", cut = " << cut ;
179  return (track->normalizedChi2() <= cut);
180 }
#define LogDebug(id)
bool reco::tau::qcuts::trkChi2_cand ( const PFCandidate &  cand,
double  cut 
)

Definition at line 182 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, LogDebug, and trkChi2().

183 {
184  auto track = getTrackRef(cand);
185  if ( track.isNonnull() ) {
186  LogDebug("TauQCuts") << "<trkChi2_cand>: chi^2 = " << track->normalizedChi2() << ", cut = " << cut ;
187  return trkChi2(track, cut);
188  } else {
189  LogDebug("TauQCuts") << "<trkChi2_cand>: chi^2 = N/A, cut = " << cut ;
190  return false;
191  }
192 }
#define LogDebug(id)
bool trkChi2(const TrackBaseRef &track, double cut)
bool reco::tau::qcuts::trkLongitudinalImpactParameter ( const TrackBaseRef &  track,
const reco::VertexRef pv,
double  cut 
)

Definition at line 110 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, reco::TrackBase::dz(), reco::TrackBase::eta(), edm::Ref< C, T, F >::isNull(), LogDebug, reco::TrackBase::phi(), and reco::TrackBase::pt().

Referenced by trkLongitudinalImpactParameter_cand().

111 {
112  if ( pv->isNull() ) {
113  edm::LogError("QCutsNoPrimaryVertex") << "Primary vertex Ref in " <<
114  "RecoTauQualityCuts is invalid. - trkLongitudinalImpactParameter";
115  return false;
116  }
117  LogDebug("TauQCuts") << " track: Pt = " << track->pt() << ", eta = " << track->eta() << ", phi = " << track->phi() ;
118  LogDebug("TauQCuts") << " vertex: x = " << (*pv)->position().x() << ", y = " << (*pv)->position().y() << ", z = " << (*pv)->position().z() ;
119  LogDebug("TauQCuts") << "--> dz = " << std::fabs(track->dz((*pv)->position())) << " (cut = " << cut << ")" ;
120  return (std::fabs(track->dz((*pv)->position())) <= cut);
121 }
#define LogDebug(id)
bool isNull() const
Checks for null.
Definition: Ref.h:247
bool reco::tau::qcuts::trkLongitudinalImpactParameter_cand ( const PFCandidate &  cand,
const reco::VertexRef pv,
double  cut 
)

Definition at line 123 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, LogDebug, and trkLongitudinalImpactParameter().

124 {
125  auto track = getTrackRef(cand);
126  if ( track.isNonnull() ) {
127  return trkLongitudinalImpactParameter(track, pv, cut);
128  } else {
129  LogDebug("TauQCuts") << "<trkLongitudinalImpactParameter_cand>: dZ = N/A, cut = " << cut ;
130  return false;
131  }
132 }
#define LogDebug(id)
bool trkLongitudinalImpactParameter(const TrackBaseRef &track, const reco::VertexRef *pv, double cut)
bool reco::tau::qcuts::trkLongitudinalImpactParameterWrtTrack ( const TrackBaseRef &  track,
const reco::TrackBaseRef leadTrack,
const reco::VertexRef pv,
double  cut 
)

DZ cut, with respect to the current lead rack.

Definition at line 135 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, and reco::TrackBase::dz().

Referenced by trkLongitudinalImpactParameterWrtTrack_cand().

136 {
137  if ( leadTrack->isNull()) {
138  edm::LogError("QCutsNoValidLeadTrack") << "Lead track Ref in " <<
139  "RecoTauQualityCuts is invalid. - trkLongitudinalImpactParameterWrtTrack";
140  return false;
141  }
142  return (std::fabs(track->dz((*pv)->position()) - (*leadTrack)->dz((*pv)->position())) <= cut);
143 }
bool reco::tau::qcuts::trkLongitudinalImpactParameterWrtTrack_cand ( const PFCandidate &  cand,
const reco::TrackBaseRef leadTrack,
const reco::VertexRef pv,
double  cut 
)

Definition at line 145 of file RecoTauQualityCuts.cc.

References trkLongitudinalImpactParameterWrtTrack().

146 {
147  auto track = getTrackRef(cand);
148  if ( track.isNonnull() ) return trkLongitudinalImpactParameterWrtTrack(track, leadTrack, pv, cut);
149  else return false;
150 }
bool trkLongitudinalImpactParameterWrtTrack(const TrackBaseRef &track, const reco::TrackBaseRef *leadTrack, const reco::VertexRef *pv, double cut)
DZ cut, with respect to the current lead rack.
bool reco::tau::qcuts::trkPixelHits ( const TrackBaseRef &  track,
int  cut 
)

Definition at line 48 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, reco::TrackBase::hitPattern(), LogDebug, and reco::HitPattern::numberOfValidPixelHits().

Referenced by trkPixelHits_cand().

49 {
50  // For some reason, the number of hits is signed
51  LogDebug("TauQCuts") << "<trkPixelHits>: #Pxl hits = " << track->hitPattern().numberOfValidPixelHits() << ", cut = " << cut ;
52  return (track->hitPattern().numberOfValidPixelHits() >= cut);
53 }
#define LogDebug(id)
bool reco::tau::qcuts::trkPixelHits_cand ( const PFCandidate &  cand,
int  cut 
)

Definition at line 55 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, LogDebug, and trkPixelHits().

56 {
57  // For some reason, the number of hits is signed
58  auto track = getTrackRef(cand);
59  if ( track.isNonnull() ) {
60  LogDebug("TauQCuts") << "<trkPixelHits_cand>: #Pxl hits = " << trkPixelHits(track, cut) << ", cut = " << cut ;
61  return trkPixelHits(track, cut);
62  } else {
63  LogDebug("TauQCuts") << "<trkPixelHits_cand>: #Pxl hits = N/A, cut = " << cut ;
64  return false;
65  }
66 }
#define LogDebug(id)
bool trkPixelHits(const TrackBaseRef &track, int cut)
bool reco::tau::qcuts::trkTrackerHits ( const TrackBaseRef &  track,
int  cut 
)

Definition at line 68 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, reco::TrackBase::hitPattern(), LogDebug, and reco::HitPattern::numberOfValidHits().

Referenced by trkTrackerHits_cand().

69 {
70  LogDebug("TauQCuts") << "<trkTrackerHits>: #Trk hits = " << track->hitPattern().numberOfValidHits() << ", cut = " << cut ;
71  return (track->hitPattern().numberOfValidHits() >= cut);
72 }
#define LogDebug(id)
bool reco::tau::qcuts::trkTrackerHits_cand ( const PFCandidate &  cand,
int  cut 
)

Definition at line 74 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, LogDebug, and trkTrackerHits().

75 {
76  auto track = getTrackRef(cand);
77  if ( track.isNonnull() ) {
78  LogDebug("TauQCuts") << "<trkTrackerHits>: #Trk hits = " << track->hitPattern().numberOfValidHits() << ", cut = " << cut ;
79  return trkTrackerHits(track, cut);
80  } else {
81  LogDebug("TauQCuts") << "<trkTrackerHits>: #Trk hits = N/A, cut = " << cut ;
82  return false;
83  }
84 }
#define LogDebug(id)
bool trkTrackerHits(const TrackBaseRef &track, int cut)
bool reco::tau::qcuts::trkTransverseImpactParameter ( const TrackBaseRef &  track,
const reco::VertexRef pv,
double  cut 
)

Definition at line 86 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, reco::TrackBase::dxy(), reco::TrackBase::eta(), edm::Ref< C, T, F >::isNull(), LogDebug, reco::TrackBase::phi(), and reco::TrackBase::pt().

Referenced by trkTransverseImpactParameter_cand().

87 {
88  if ( pv->isNull() ) {
89  edm::LogError("QCutsNoPrimaryVertex") << "Primary vertex Ref in " <<
90  "RecoTauQualityCuts is invalid. - trkTransverseImpactParameter";
91  return false;
92  }
93  LogDebug("TauQCuts") << " track: Pt = " << track->pt() << ", eta = " << track->eta() << ", phi = " << track->phi() ;
94  LogDebug("TauQCuts") << " vertex: x = " << (*pv)->position().x() << ", y = " << (*pv)->position().y() << ", z = " << (*pv)->position().z() ;
95  LogDebug("TauQCuts") << "--> dxy = " << std::fabs(track->dxy((*pv)->position())) << " (cut = " << cut << ")" ;
96  return (std::fabs(track->dxy((*pv)->position())) <= cut);
97 }
#define LogDebug(id)
bool isNull() const
Checks for null.
Definition: Ref.h:247
bool reco::tau::qcuts::trkTransverseImpactParameter_cand ( const PFCandidate &  cand,
const reco::VertexRef pv,
double  cut 
)

Definition at line 99 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, LogDebug, and trkTransverseImpactParameter().

100 {
101  auto track = getTrackRef(cand);
102  if ( track.isNonnull() ) {
103  return trkTransverseImpactParameter(track, pv, cut);
104  } else {
105  LogDebug("TauQCuts") << "<trkTransverseImpactParameter_cand>: dXY = N/A, cut = " << cut ;
106  return false;
107  }
108 }
#define LogDebug(id)
bool trkTransverseImpactParameter(const TrackBaseRef &track, const reco::VertexRef *pv, double cut)