#include <MuonAnalysis/MuonAssociators/interface/MatcherByPullsAlgorithm.cc>
Public Member Functions | |
void | fillInvCov (const reco::Track &tk, AlgebraicSymMatrix55 &invCov) const |
Fill the inverse covariance matrix for the match(track, candidate, invCov) method. More... | |
std::pair< int, float > | match (const reco::RecoCandidate &src, const std::vector< reco::GenParticle > &cands, const std::vector< uint8_t > &good) const |
std::pair< int, float > | match (const reco::Track &src, const std::vector< reco::GenParticle > &cands, const std::vector< uint8_t > &good) const |
std::pair< bool, float > | match (const reco::Track &tk, const reco::Candidate &mc, const AlgebraicSymMatrix55 &invertedCovariance) const |
MatcherByPullsAlgorithm (const edm::ParameterSet &) | |
void | matchMany (const reco::RecoCandidate &src, const std::vector< reco::GenParticle > &cands, const std::vector< uint8_t > &good, std::vector< std::pair< double, int > > &matchesToFill) const |
void | matchMany (const reco::Track &src, const std::vector< reco::GenParticle > &cands, const std::vector< uint8_t > &good, std::vector< std::pair< double, int > > &matchesToFill) const |
~MatcherByPullsAlgorithm () | |
Private Types | |
enum | TrackChoice { StaTrack, TrkTrack, GlbTrack } |
Enum to define which track to use. More... | |
Private Member Functions | |
const reco::Track * | track (const reco::RecoCandidate &src) const |
Get track out of Candidate, NULL if missing. More... | |
Private Attributes | |
double | cut_ |
Cut on the pull. More... | |
bool | diagOnly_ |
Use only the diagonal terms of the covariance matrix. More... | |
double | dr2_ |
DeltaR of the matching cone. More... | |
TrackChoice | track_ |
Track to be used in matching. More... | |
bool | useVertex_ |
Use also dxy / dsz in the matching. More... | |
Description: Matches a RecoCandidate to a GenParticle (or any other Candidate) using the pulls of the helix parameters
Implementation: <Notes on="" implementation>="">
Definition at line 34 of file MatcherByPullsAlgorithm.h.
|
private |
Enum to define which track to use.
Enumerator | |
---|---|
StaTrack | |
TrkTrack | |
GlbTrack |
Definition at line 83 of file MatcherByPullsAlgorithm.h.
|
explicit |
Definition at line 13 of file MatcherByPullsAlgorithm.cc.
References Exception, edm::ParameterSet::getParameter(), GlbTrack, StaTrack, AlCaHLTBitMon_QueryRunRegistry::string, track(), track_, and TrkTrack.
MatcherByPullsAlgorithm::~MatcherByPullsAlgorithm | ( | ) |
Definition at line 31 of file MatcherByPullsAlgorithm.cc.
void MatcherByPullsAlgorithm::fillInvCov | ( | const reco::Track & | tk, |
AlgebraicSymMatrix55 & | invCov | ||
) | const |
Fill the inverse covariance matrix for the match(track, candidate, invCov) method.
Definition at line 143 of file MatcherByPullsAlgorithm.cc.
References reco::TrackBase::covariance(), diagOnly_, mps_fire::i, dqmiolumiharvest::j, and useVertex_.
Referenced by match(), and matchMany().
std::pair< int, float > MatcherByPullsAlgorithm::match | ( | const reco::RecoCandidate & | src, |
const std::vector< reco::GenParticle > & | cands, | ||
const std::vector< uint8_t > & | good | ||
) | const |
Match Reco Candidate to MC Candidates, skipping the ones which are not good Return index of matchin and pull, or (-1,9e9)
Definition at line 73 of file MatcherByPullsAlgorithm.cc.
References HLT_2018_cff::cands, match(), TrackRefitter_38T_cff::src, and track().
std::pair< int, float > MatcherByPullsAlgorithm::match | ( | const reco::Track & | src, |
const std::vector< reco::GenParticle > & | cands, | ||
const std::vector< uint8_t > & | good | ||
) | const |
Match Reco Track to MC Tracks, skipping the ones which are not good Return index of matchin and pull, or (-1,9e9)
Definition at line 80 of file MatcherByPullsAlgorithm.cc.
References HLT_2018_cff::cands, fillInvCov(), mps_fire::i, visualization-live-secondInstance_cfg::m, match(), and dqmiodumpmetadata::n.
std::pair< bool, float > MatcherByPullsAlgorithm::match | ( | const reco::Track & | tk, |
const reco::Candidate & | mc, | ||
const AlgebraicSymMatrix55 & | invertedCovariance | ||
) | const |
Match Track to MC Candidate, using already inverted covariance matrix Return status of match and pull, or (-1,9e9)
Definition at line 40 of file MatcherByPullsAlgorithm.cc.
References HltBtagPostValidation_cff::c, reco::TrackBase::charge(), gather_cfg::cout, cut_, SiPixelRawToDigiRegional_cfi::deltaPhi, HLTMuonOfflineAnalyzer_cfi::deltaR2, change_name::diff, dr2_, reco::TrackBase::dsz(), reco::TrackBase::dxy(), reco::TrackBase::eta(), mps_fire::i, reco::TrackBase::phi(), reco::TrackBase::pt(), reco::TrackBase::qoverp(), mathSSE::sqrt(), reco::TrackBase::theta(), reco::TrackBase::vx(), reco::TrackBase::vy(), and reco::TrackBase::vz().
Referenced by match(), and matchMany().
void MatcherByPullsAlgorithm::matchMany | ( | const reco::RecoCandidate & | src, |
const std::vector< reco::GenParticle > & | cands, | ||
const std::vector< uint8_t > & | good, | ||
std::vector< std::pair< double, int > > & | matchesToFill | ||
) | const |
Match Reco Candidate to MC Candidates, allowing multiple matches and skipping the ones which are not good It will fill in the vector of <double,int> with pull and index for all matching candidates, already sorted by pulls. This method assumes that matchesToFill is empty when the method is called
Definition at line 99 of file MatcherByPullsAlgorithm.cc.
References HLT_2018_cff::cands, TrackRefitter_38T_cff::src, and track().
void MatcherByPullsAlgorithm::matchMany | ( | const reco::Track & | src, |
const std::vector< reco::GenParticle > & | cands, | ||
const std::vector< uint8_t > & | good, | ||
std::vector< std::pair< double, int > > & | matchesToFill | ||
) | const |
Match Reco Track to MC Tracks, allowing multiple matches and skipping the ones which are not good It will fill in the vector of <double,int> with pull and index for all matching candidates, already sorted by pulls. This method assumes that matchesToFill is empty when the method is called
Definition at line 108 of file MatcherByPullsAlgorithm.cc.
References HLT_2018_cff::cands, fillInvCov(), mps_fire::i, visualization-live-secondInstance_cfg::m, match(), and dqmiodumpmetadata::n.
|
private |
Get track out of Candidate, NULL if missing.
Definition at line 131 of file MatcherByPullsAlgorithm.cc.
References cms::cuda::assert(), GlbTrack, StaTrack, track_, and TrkTrack.
Referenced by match(), MatcherByPullsAlgorithm(), and matchMany().
|
private |
|
private |
Use only the diagonal terms of the covariance matrix.
Definition at line 95 of file MatcherByPullsAlgorithm.h.
Referenced by fillInvCov().
|
private |
DeltaR of the matching cone.
Definition at line 89 of file MatcherByPullsAlgorithm.h.
Referenced by match().
|
private |
Track to be used in matching.
Definition at line 86 of file MatcherByPullsAlgorithm.h.
Referenced by MatcherByPullsAlgorithm(), and track().
|
private |
Use also dxy / dsz in the matching.
Definition at line 98 of file MatcherByPullsAlgorithm.h.
Referenced by fillInvCov().