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 Types | Private Member Functions | Private Attributes
MatcherByPullsAlgorithm Class Reference

#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::Tracktrack (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...
 

Detailed Description

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.

Member Enumeration Documentation

Enum to define which track to use.

Enumerator
StaTrack 
TrkTrack 
GlbTrack 

Definition at line 83 of file MatcherByPullsAlgorithm.h.

Constructor & Destructor Documentation

MatcherByPullsAlgorithm::MatcherByPullsAlgorithm ( const edm::ParameterSet iConfig)
explicit

Definition at line 13 of file MatcherByPullsAlgorithm.cc.

MatcherByPullsAlgorithm::~MatcherByPullsAlgorithm ( )

Definition at line 27 of file MatcherByPullsAlgorithm.cc.

Member Function Documentation

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.

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.

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.

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.

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.

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.

const reco::Track * MatcherByPullsAlgorithm::track ( const reco::RecoCandidate src) const
private

Get track out of Candidate, NULL if missing.

Definition at line 136 of file MatcherByPullsAlgorithm.cc.

Member Data Documentation

double MatcherByPullsAlgorithm::cut_
private

Cut on the pull.

Definition at line 92 of file MatcherByPullsAlgorithm.h.

bool MatcherByPullsAlgorithm::diagOnly_
private

Use only the diagonal terms of the covariance matrix.

Definition at line 95 of file MatcherByPullsAlgorithm.h.

double MatcherByPullsAlgorithm::dr2_
private

DeltaR of the matching cone.

Definition at line 89 of file MatcherByPullsAlgorithm.h.

TrackChoice MatcherByPullsAlgorithm::track_
private

Track to be used in matching.

Definition at line 86 of file MatcherByPullsAlgorithm.h.

bool MatcherByPullsAlgorithm::useVertex_
private

Use also dxy / dsz in the matching.

Definition at line 98 of file MatcherByPullsAlgorithm.h.