#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< bool, float > | match (const reco::Track &tk, const reco::Candidate &mc, const AlgebraicSymMatrix55 &invertedCovariance) const |
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 |
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 27 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 147 of file MatcherByPullsAlgorithm.cc.
References reco::TrackBase::covariance(), diagOnly_, mps_fire::i, and useVertex_.
Referenced by match(), and matchMany().
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 39 of file MatcherByPullsAlgorithm.cc.
References reco::Candidate::charge(), reco::TrackBase::charge(), gather_cfg::cout, cut_, hiPixelPairStep_cff::deltaPhi, reco::deltaR2(), diffTreeTool::diff, dr2_, reco::TrackBase::dsz(), reco::TrackBase::dxy(), reco::Candidate::eta(), reco::TrackBase::eta(), mps_fire::i, reco::Candidate::p(), reco::Candidate::phi(), reco::TrackBase::phi(), reco::Candidate::pt(), reco::TrackBase::pt(), reco::TrackBase::qoverp(), mathSSE::sqrt(), reco::Candidate::theta(), reco::TrackBase::theta(), reco::Candidate::vertex(), reco::Candidate::vx(), reco::TrackBase::vx(), reco::Candidate::vy(), reco::TrackBase::vy(), reco::Candidate::vz(), and reco::TrackBase::vz().
Referenced by match(), matchMany(), and pat::MatcherByPulls< T >::produce().
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 match(), 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 84 of file MatcherByPullsAlgorithm.cc.
References fillInvCov(), mps_fire::i, funct::m, match(), and gen::n.
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 103 of file MatcherByPullsAlgorithm.cc.
References 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 113 of file MatcherByPullsAlgorithm.cc.
References fillInvCov(), mps_fire::i, funct::m, match(), and gen::n.
|
private |
Get track out of Candidate, NULL if missing.
Definition at line 136 of file MatcherByPullsAlgorithm.cc.
References reco::RecoCandidate::combinedMuon(), edm::Ref< C, T, F >::get(), GlbTrack, edm::Ref< C, T, F >::isNonnull(), reco::RecoCandidate::standAloneMuon(), StaTrack, reco::RecoCandidate::track(), 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().