CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MatcherByPullsAlgorithm.h
Go to the documentation of this file.
1 #ifndef MuonAnalysis_MuonAssociators_src_MatcherByPullsAlgorithm_h
2 #define MuonAnalysis_MuonAssociators_src_MatcherByPullsAlgorithm_h
3 // -*- C++ -*-
4 //
5 // Package: MuonAnalysis/MuonAssociators
6 // Class: MatcherByPullsAlgorithm
7 //
15 //
16 // Original Author: Giovanni Petrucciani (SNS Pisa and CERN PH-CMG)
17 // Created: Sun Nov 16 16:14:09 CET 2008
18 //
19 //
20 
21 #include <string>
22 #include <algorithm>
23 #include <vector>
25 
30 
31 //
32 // class decleration
33 
35 public:
38 
41  std::pair<bool, float> match(const reco::Track &tk,
42  const reco::Candidate &mc,
43  const AlgebraicSymMatrix55 &invertedCovariance) const;
44 
47  std::pair<int, float> match(const reco::RecoCandidate &src,
48  const std::vector<reco::GenParticle> &cands,
49  const std::vector<uint8_t> &good) const;
50 
55  void matchMany(const reco::RecoCandidate &src,
56  const std::vector<reco::GenParticle> &cands,
57  const std::vector<uint8_t> &good,
58  std::vector<std::pair<double, int> > &matchesToFill) const;
59 
62  std::pair<int, float> match(const reco::Track &src,
63  const std::vector<reco::GenParticle> &cands,
64  const std::vector<uint8_t> &good) const;
65 
70  void matchMany(const reco::Track &src,
71  const std::vector<reco::GenParticle> &cands,
72  const std::vector<uint8_t> &good,
73  std::vector<std::pair<double, int> > &matchesToFill) const;
74 
76  void fillInvCov(const reco::Track &tk, AlgebraicSymMatrix55 &invCov) const;
77 
78 private:
80  const reco::Track *track(const reco::RecoCandidate &src) const;
81 
84 
87 
89  double dr2_;
90 
92  double cut_;
93 
95  bool diagOnly_;
96 
98  bool useVertex_;
99 };
100 
101 #endif
bool diagOnly_
Use only the diagonal terms of the covariance matrix.
MatcherByPullsAlgorithm(const edm::ParameterSet &)
std::pair< bool, float > match(const reco::Track &tk, const reco::Candidate &mc, const AlgebraicSymMatrix55 &invertedCovariance) const
double dr2_
DeltaR of the matching cone.
bool useVertex_
Use also dxy / dsz in the matching.
void fillInvCov(const reco::Track &tk, AlgebraicSymMatrix55 &invCov) const
Fill the inverse covariance matrix for the match(track, candidate, invCov) method.
double cut_
Cut on the pull.
auto const good
min quality of good
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
TrackChoice track_
Track to be used in matching.
TrackChoice
Enum to define which track to use.
const reco::Track * track(const reco::RecoCandidate &src) const
Get track out of Candidate, NULL if missing.
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