CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
reco::TrackSelector Class Reference

#include <TrackSelector.h>

Public Member Functions

bool operator() (const reco::Track &track, const reco::TrackIPTagInfo::TrackIPData &ipData, const reco::Jet &jet, const GlobalPoint &pv) const
 
 TrackSelector (const edm::ParameterSet &params)
 
 ~TrackSelector ()
 

Private Attributes

double maxDecayLen
 
double maxDistToAxis
 
double maxJetDeltaR
 
double maxNormChi2
 
unsigned int minPixelHits
 
double minPt
 
unsigned int minTotalHits
 
reco::TrackBase::TrackQuality quality
 
bool selectQuality
 
double sip2dSigMax
 
double sip2dSigMin
 
double sip2dValMax
 
double sip2dValMin
 
double sip3dSigMax
 
double sip3dSigMin
 
double sip3dValMax
 
double sip3dValMin
 

Detailed Description

Definition at line 13 of file TrackSelector.h.

Constructor & Destructor Documentation

TrackSelector::TrackSelector ( const edm::ParameterSet params)

Definition at line 16 of file TrackSelector.cc.

References edm::ParameterSet::getParameter(), quality, reco::TrackBase::qualityByName(), selectQuality, and reco::TrackBase::undefQuality.

16  :
17  minPixelHits(params.getParameter<unsigned int>("pixelHitsMin")),
18  minTotalHits(params.getParameter<unsigned int>("totalHitsMin")),
19  minPt(params.getParameter<double>("ptMin")),
20  maxNormChi2(params.getParameter<double>("normChi2Max")),
21  maxJetDeltaR(params.getParameter<double>("jetDeltaRMax")),
22  maxDistToAxis(params.getParameter<double>("maxDistToAxis")),
23  maxDecayLen(params.getParameter<double>("maxDecayLen")),
24  sip2dValMin(params.getParameter<double>("sip2dValMin")),
25  sip2dValMax(params.getParameter<double>("sip2dValMax")),
26  sip2dSigMin(params.getParameter<double>("sip2dSigMin")),
27  sip2dSigMax(params.getParameter<double>("sip2dSigMax")),
28  sip3dValMin(params.getParameter<double>("sip3dValMin")),
29  sip3dValMax(params.getParameter<double>("sip3dValMax")),
30  sip3dSigMin(params.getParameter<double>("sip3dSigMin")),
31  sip3dSigMax(params.getParameter<double>("sip3dSigMax"))
32 {
33  std::string qualityClass =
34  params.getParameter<std::string>("qualityClass");
35  if (qualityClass == "any" || qualityClass == "Any" ||
36  qualityClass == "ANY" || qualityClass == "") {
37  selectQuality = false;
39  } else {
40  selectQuality = true;
42  }
43 }
T getParameter(std::string const &) const
reco::TrackBase::TrackQuality quality
Definition: TrackSelector.h:25
unsigned int minPixelHits
Definition: TrackSelector.h:26
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:46
unsigned int minTotalHits
Definition: TrackSelector.h:27
reco::TrackSelector::~TrackSelector ( )
inline

Definition at line 16 of file TrackSelector.h.

16 {}

Member Function Documentation

bool TrackSelector::operator() ( const reco::Track track,
const reco::TrackIPTagInfo::TrackIPData ipData,
const reco::Jet jet,
const GlobalPoint pv 
) const

Definition at line 46 of file TrackSelector.cc.

References abs, reco::TrackIPTagInfo::TrackIPData::closestToJetAxis, reco::TrackIPTagInfo::TrackIPData::distanceToJetAxis, reco::TrackBase::hitPattern(), reco::TrackIPTagInfo::TrackIPData::ip2d, reco::TrackIPTagInfo::TrackIPData::ip3d, maxDecayLen, maxDistToAxis, maxJetDeltaR, maxNormChi2, minPixelHits, minPt, minTotalHits, reco::LeafCandidate::momentum(), reco::TrackBase::momentum(), reco::TrackBase::normalizedChi2(), reco::HitPattern::numberOfValidHits(), reco::HitPattern::numberOfValidPixelHits(), reco::TrackBase::pt(), quality, reco::TrackBase::quality(), selectQuality, Measurement1D::significance(), sip2dSigMax, sip2dSigMin, sip2dValMax, sip2dValMin, sip3dSigMax, sip3dSigMin, sip3dValMax, sip3dValMin, and Measurement1D::value().

50 {
51  return (!selectQuality || track.quality(quality)) &&
52  (minPixelHits <= 0 ||
53  track.hitPattern().numberOfValidPixelHits() >= (int)minPixelHits) &&
54  (minTotalHits <= 0 ||
55  track.hitPattern().numberOfValidHits() >= (int)minTotalHits) &&
56  track.pt() >= minPt &&
57  track.normalizedChi2() < maxNormChi2 &&
58  VectorUtil::DeltaR(jet.momentum(),
59  track.momentum()) < maxJetDeltaR &&
61  (ipData.closestToJetAxis - pv).mag() <= maxDecayLen &&
62  ipData.ip2d.value() >= sip2dValMin &&
63  ipData.ip2d.value() <= sip2dValMax &&
64  ipData.ip2d.significance() >= sip2dSigMin &&
65  ipData.ip2d.significance() <= sip2dSigMax &&
66  ipData.ip3d.value() >= sip3dValMin &&
67  ipData.ip3d.value() <= sip3dValMax &&
68  ipData.ip3d.significance() >= sip3dSigMin &&
69  ipData.ip3d.significance() <= sip3dSigMax;
70 }
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:150
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:111
int numberOfValidHits() const
Definition: HitPattern.h:554
virtual Vector momentum() const
spatial momentum vector
#define abs(x)
Definition: mlp_lapack.h:159
reco::TrackBase::TrackQuality quality
Definition: TrackSelector.h:25
double pt() const
track transverse momentum
Definition: TrackBase.h:131
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:223
unsigned int minPixelHits
Definition: TrackSelector.h:26
double significance() const
Definition: Measurement1D.h:32
double value() const
Definition: Measurement1D.h:28
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:377
int numberOfValidPixelHits() const
Definition: HitPattern.h:566
unsigned int minTotalHits
Definition: TrackSelector.h:27

Member Data Documentation

double reco::TrackSelector::maxDecayLen
private

Definition at line 32 of file TrackSelector.h.

Referenced by operator()().

double reco::TrackSelector::maxDistToAxis
private

Definition at line 31 of file TrackSelector.h.

Referenced by operator()().

double reco::TrackSelector::maxJetDeltaR
private

Definition at line 30 of file TrackSelector.h.

Referenced by operator()().

double reco::TrackSelector::maxNormChi2
private

Definition at line 29 of file TrackSelector.h.

Referenced by operator()().

unsigned int reco::TrackSelector::minPixelHits
private

Definition at line 26 of file TrackSelector.h.

Referenced by operator()().

double reco::TrackSelector::minPt
private

Definition at line 28 of file TrackSelector.h.

Referenced by operator()().

unsigned int reco::TrackSelector::minTotalHits
private

Definition at line 27 of file TrackSelector.h.

Referenced by operator()().

reco::TrackBase::TrackQuality reco::TrackSelector::quality
private

Definition at line 25 of file TrackSelector.h.

Referenced by operator()(), and TrackSelector().

bool reco::TrackSelector::selectQuality
private

Definition at line 24 of file TrackSelector.h.

Referenced by operator()(), and TrackSelector().

double reco::TrackSelector::sip2dSigMax
private

Definition at line 36 of file TrackSelector.h.

Referenced by operator()().

double reco::TrackSelector::sip2dSigMin
private

Definition at line 35 of file TrackSelector.h.

Referenced by operator()().

double reco::TrackSelector::sip2dValMax
private

Definition at line 34 of file TrackSelector.h.

Referenced by operator()().

double reco::TrackSelector::sip2dValMin
private

Definition at line 33 of file TrackSelector.h.

Referenced by operator()().

double reco::TrackSelector::sip3dSigMax
private

Definition at line 40 of file TrackSelector.h.

Referenced by operator()().

double reco::TrackSelector::sip3dSigMin
private

Definition at line 39 of file TrackSelector.h.

Referenced by operator()().

double reco::TrackSelector::sip3dValMax
private

Definition at line 38 of file TrackSelector.h.

Referenced by operator()().

double reco::TrackSelector::sip3dValMin
private

Definition at line 37 of file TrackSelector.h.

Referenced by operator()().