CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
reco::TrackSelector Class Reference

#include <TrackSelector.h>

Public Member Functions

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

Private Member Functions

bool trackSelection (const reco::Track &track, const reco::btag::TrackIPData &ipData, const reco::Jet &jet, const GlobalPoint &pv) const
 

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
 
bool useVariableJTA_
 
reco::btag::variableJTAParameters varJTApars
 

Detailed Description

Definition at line 14 of file TrackSelector.h.

Constructor & Destructor Documentation

◆ TrackSelector()

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

Definition at line 11 of file TrackSelector.cc.

12  : minPixelHits(params.getParameter<unsigned int>("pixelHitsMin")),
13  minTotalHits(params.getParameter<unsigned int>("totalHitsMin")),
14  minPt(params.getParameter<double>("ptMin")),
15  maxNormChi2(params.getParameter<double>("normChi2Max")),
16  maxJetDeltaR(params.getParameter<double>("jetDeltaRMax")),
17  maxDistToAxis(params.getParameter<double>("maxDistToAxis")),
18  maxDecayLen(params.getParameter<double>("maxDecayLen")),
19  sip2dValMin(params.getParameter<double>("sip2dValMin")),
20  sip2dValMax(params.getParameter<double>("sip2dValMax")),
21  sip2dSigMin(params.getParameter<double>("sip2dSigMin")),
22  sip2dSigMax(params.getParameter<double>("sip2dSigMax")),
23  sip3dValMin(params.getParameter<double>("sip3dValMin")),
24  sip3dValMax(params.getParameter<double>("sip3dValMax")),
25  sip3dSigMin(params.getParameter<double>("sip3dSigMin")),
26  sip3dSigMax(params.getParameter<double>("sip3dSigMax")),
27  useVariableJTA_(params.existsAs<bool>("useVariableJTA") ? params.getParameter<bool>("useVariableJTA") : false) {
28  std::string qualityClass = params.getParameter<std::string>("qualityClass");
29  if (qualityClass == "any" || qualityClass == "Any" || qualityClass == "ANY" || qualityClass.empty()) {
30  selectQuality = false;
32  } else {
33  selectQuality = true;
35  }
36  if (useVariableJTA_) {
37  varJTApars = {params.getParameter<double>("a_dR"),
38  params.getParameter<double>("b_dR"),
39  params.getParameter<double>("a_pT"),
40  params.getParameter<double>("b_pT"),
41  params.getParameter<double>("min_pT"),
42  params.getParameter<double>("max_pT"),
43  params.getParameter<double>("min_pT_dRcut"),
44  params.getParameter<double>("max_pT_dRcut"),
45  params.getParameter<double>("max_pT_trackPTcut")};
46  }
47 }

References CalibrationSummaryClient_cfi::params, quality, reco::TrackBase::qualityByName(), HLT_FULL_cff::qualityClass, selectQuality, AlCaHLTBitMon_QueryRunRegistry::string, reco::TrackBase::undefQuality, useVariableJTA_, and varJTApars.

◆ ~TrackSelector()

reco::TrackSelector::~TrackSelector ( )
inline

Definition at line 17 of file TrackSelector.h.

17 {}

Member Function Documentation

◆ operator()() [1/3]

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

Definition at line 64 of file TrackSelector.cc.

67  {
68  bool jtaPassed = false;
69  if (useVariableJTA_) {
71  varJTApars, jet.pt(), track->pt(), reco::deltaR(jet.momentum(), track->momentum()));
72  } else
73  jtaPassed = true;
74 
75  return track->pt() >= minPt && reco::deltaR2(jet.momentum(), track->momentum()) < maxJetDeltaR * maxJetDeltaR &&
76  jtaPassed && trackSelection(*reco::btag::toTrack(track), ipData, jet, pv);
77 }

References reco::deltaR(), reco::deltaR2(), metsig::jet, maxJetDeltaR, minPt, reco::IPTagInfo< Container, Base >::passVariableJTA(), MetAnalyzer::pv(), reco::btag::toTrack(), HLT_FULL_cff::track, trackSelection(), useVariableJTA_, and varJTApars.

◆ operator()() [2/3]

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

Definition at line 49 of file TrackSelector.cc.

52  {
53  bool jtaPassed = false;
54  if (useVariableJTA_) {
56  varJTApars, jet.pt(), track.pt(), reco::deltaR(jet.momentum(), track.momentum()));
57  } else
58  jtaPassed = true;
59 
60  return track.pt() >= minPt && reco::deltaR2(jet.momentum(), track.momentum()) < maxJetDeltaR * maxJetDeltaR &&
61  jtaPassed && trackSelection(track, ipData, jet, pv);
62 }

References reco::deltaR(), reco::deltaR2(), metsig::jet, maxJetDeltaR, minPt, reco::IPTagInfo< Container, Base >::passVariableJTA(), MetAnalyzer::pv(), HLT_FULL_cff::track, trackSelection(), useVariableJTA_, and varJTApars.

◆ operator()() [3/3]

bool reco::TrackSelector::operator() ( const reco::TrackRef track,
const reco::btag::TrackIPData ipData,
const reco::Jet jet,
const GlobalPoint pv 
) const
inline

Definition at line 29 of file TrackSelector.h.

32  {
33  return (*this)(*track, ipData, jet, pv);
34  }

References metsig::jet, MetAnalyzer::pv(), and HLT_FULL_cff::track.

◆ trackSelection()

bool TrackSelector::trackSelection ( const reco::Track track,
const reco::btag::TrackIPData ipData,
const reco::Jet jet,
const GlobalPoint pv 
) const
private

Member Data Documentation

◆ maxDecayLen

double reco::TrackSelector::maxDecayLen
private

Definition at line 50 of file TrackSelector.h.

Referenced by trackSelection().

◆ maxDistToAxis

double reco::TrackSelector::maxDistToAxis
private

Definition at line 49 of file TrackSelector.h.

Referenced by trackSelection().

◆ maxJetDeltaR

double reco::TrackSelector::maxJetDeltaR
private

Definition at line 48 of file TrackSelector.h.

Referenced by operator()().

◆ maxNormChi2

double reco::TrackSelector::maxNormChi2
private

Definition at line 47 of file TrackSelector.h.

Referenced by trackSelection().

◆ minPixelHits

unsigned int reco::TrackSelector::minPixelHits
private

Definition at line 44 of file TrackSelector.h.

Referenced by trackSelection().

◆ minPt

double reco::TrackSelector::minPt
private

Definition at line 46 of file TrackSelector.h.

Referenced by operator()().

◆ minTotalHits

unsigned int reco::TrackSelector::minTotalHits
private

Definition at line 45 of file TrackSelector.h.

Referenced by trackSelection().

◆ quality

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

Definition at line 43 of file TrackSelector.h.

Referenced by trackSelection(), and TrackSelector().

◆ selectQuality

bool reco::TrackSelector::selectQuality
private

Definition at line 42 of file TrackSelector.h.

Referenced by trackSelection(), and TrackSelector().

◆ sip2dSigMax

double reco::TrackSelector::sip2dSigMax
private

Definition at line 54 of file TrackSelector.h.

Referenced by trackSelection().

◆ sip2dSigMin

double reco::TrackSelector::sip2dSigMin
private

Definition at line 53 of file TrackSelector.h.

Referenced by trackSelection().

◆ sip2dValMax

double reco::TrackSelector::sip2dValMax
private

Definition at line 52 of file TrackSelector.h.

Referenced by trackSelection().

◆ sip2dValMin

double reco::TrackSelector::sip2dValMin
private

Definition at line 51 of file TrackSelector.h.

Referenced by trackSelection().

◆ sip3dSigMax

double reco::TrackSelector::sip3dSigMax
private

Definition at line 58 of file TrackSelector.h.

Referenced by trackSelection().

◆ sip3dSigMin

double reco::TrackSelector::sip3dSigMin
private

Definition at line 57 of file TrackSelector.h.

Referenced by trackSelection().

◆ sip3dValMax

double reco::TrackSelector::sip3dValMax
private

Definition at line 56 of file TrackSelector.h.

Referenced by trackSelection().

◆ sip3dValMin

double reco::TrackSelector::sip3dValMin
private

Definition at line 55 of file TrackSelector.h.

Referenced by trackSelection().

◆ useVariableJTA_

bool reco::TrackSelector::useVariableJTA_
private

Definition at line 59 of file TrackSelector.h.

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

◆ varJTApars

reco::btag::variableJTAParameters reco::TrackSelector::varJTApars
private

Definition at line 60 of file TrackSelector.h.

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

reco::btag::TrackIPData::distanceToJetAxis
Measurement1D distanceToJetAxis
Definition: IPTagInfo.h:33
reco::TrackSelector::sip3dSigMax
double sip3dSigMax
Definition: TrackSelector.h:58
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
reco::TrackSelector::minPt
double minPt
Definition: TrackSelector.h:46
reco::TrackSelector::minTotalHits
unsigned int minTotalHits
Definition: TrackSelector.h:45
reco::TrackSelector::sip2dValMax
double sip2dValMax
Definition: TrackSelector.h:52
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
reco::btag::toTrack
const reco::Track * toTrack(const reco::TrackBaseRef &t)
Definition: IPTagInfo.h:24
Measurement1D::value
double value() const
Definition: Measurement1D.h:25
reco::TrackBase::undefQuality
Definition: TrackBase.h:151
reco::TrackSelector::minPixelHits
unsigned int minPixelHits
Definition: TrackSelector.h:44
reco::TrackSelector::sip3dValMin
double sip3dValMin
Definition: TrackSelector.h:55
reco::TrackSelector::sip2dSigMin
double sip2dSigMin
Definition: TrackSelector.h:53
reco::TrackSelector::maxDistToAxis
double maxDistToAxis
Definition: TrackSelector.h:49
reco::TrackSelector::sip2dSigMax
double sip2dSigMax
Definition: TrackSelector.h:54
reco::TrackSelector::useVariableJTA_
bool useVariableJTA_
Definition: TrackSelector.h:59
reco::TrackSelector::varJTApars
reco::btag::variableJTAParameters varJTApars
Definition: TrackSelector.h:60
reco::IPTagInfo::passVariableJTA
static bool passVariableJTA(const btag::variableJTAParameters &params, double jetpt, double trackpt, double jettrackdr)
Definition: IPTagInfo.h:295
reco::TrackSelector::sip2dValMin
double sip2dValMin
Definition: TrackSelector.h:51
reco::TrackSelector::maxDecayLen
double maxDecayLen
Definition: TrackSelector.h:50
reco::btag::TrackIPData::closestToJetAxis
GlobalPoint closestToJetAxis
Definition: IPTagInfo.h:29
reco::TrackSelector::maxJetDeltaR
double maxJetDeltaR
Definition: TrackSelector.h:48
Measurement1D::significance
double significance() const
Definition: Measurement1D.h:29
reco::deltaR2
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
reco::TrackSelector::selectQuality
bool selectQuality
Definition: TrackSelector.h:42
createfilelist.int
int
Definition: createfilelist.py:10
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
reco::TrackSelector::sip3dValMax
double sip3dValMax
Definition: TrackSelector.h:56
reco::TrackSelector::trackSelection
bool trackSelection(const reco::Track &track, const reco::btag::TrackIPData &ipData, const reco::Jet &jet, const GlobalPoint &pv) const
Definition: TrackSelector.cc:79
HLT_FULL_cff.qualityClass
qualityClass
Definition: HLT_FULL_cff.py:6726
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
reco::TrackBase::qualityByName
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
reco::TrackSelector::maxNormChi2
double maxNormChi2
Definition: TrackSelector.h:47
metsig::jet
Definition: SignAlgoResolutions.h:47
reco::btag::TrackIPData::ip2d
Measurement1D ip2d
Definition: IPTagInfo.h:31
reco::deltaR
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
reco::btag::TrackIPData::ip3d
Measurement1D ip3d
Definition: IPTagInfo.h:32
reco::TrackSelector::quality
reco::TrackBase::TrackQuality quality
Definition: TrackSelector.h:43
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
reco::TrackSelector::sip3dSigMin
double sip3dSigMin
Definition: TrackSelector.h:57