CMS 3D CMS Logo

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
MatcherByPullsAlgorithm::~MatcherByPullsAlgorithm
~MatcherByPullsAlgorithm()
Definition: MatcherByPullsAlgorithm.cc:31
good
const auto good
min quality of good
Definition: CAHitNtupletGeneratorKernelsImpl.h:760
MatcherByPullsAlgorithm::StaTrack
Definition: MatcherByPullsAlgorithm.h:83
MatcherByPullsAlgorithm::TrkTrack
Definition: MatcherByPullsAlgorithm.h:83
AlgebraicObjects.h
CaloTowersParam_cfi.mc
mc
Definition: CaloTowersParam_cfi.py:8
MatcherByPullsAlgorithm::GlbTrack
Definition: MatcherByPullsAlgorithm.h:83
MatcherByPullsAlgorithm::useVertex_
bool useVertex_
Use also dxy / dsz in the matching.
Definition: MatcherByPullsAlgorithm.h:98
RecoCandidate.h
MatcherByPullsAlgorithm::cut_
double cut_
Cut on the pull.
Definition: MatcherByPullsAlgorithm.h:92
GenParticle.h
MatcherByPullsAlgorithm::fillInvCov
void fillInvCov(const reco::Track &tk, AlgebraicSymMatrix55 &invCov) const
Fill the inverse covariance matrix for the match(track, candidate, invCov) method.
Definition: MatcherByPullsAlgorithm.cc:143
MatcherByPullsAlgorithm::MatcherByPullsAlgorithm
MatcherByPullsAlgorithm(const edm::ParameterSet &)
Definition: MatcherByPullsAlgorithm.cc:13
Track.h
MatcherByPullsAlgorithm::track
const reco::Track * track(const reco::RecoCandidate &src) const
Get track out of Candidate, NULL if missing.
Definition: MatcherByPullsAlgorithm.cc:131
MatcherByPullsAlgorithm::diagOnly_
bool diagOnly_
Use only the diagonal terms of the covariance matrix.
Definition: MatcherByPullsAlgorithm.h:95
reco::Track
Definition: Track.h:27
HLT_FULL_cff.cands
cands
Definition: HLT_FULL_cff.py:15161
edm::ParameterSet
Definition: ParameterSet.h:47
TrackRefitter_38T_cff.src
src
Definition: TrackRefitter_38T_cff.py:24
MatcherByPullsAlgorithm::dr2_
double dr2_
DeltaR of the matching cone.
Definition: MatcherByPullsAlgorithm.h:89
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
reco::RecoCandidate
Definition: RecoCandidate.h:20
MatcherByPullsAlgorithm
Definition: MatcherByPullsAlgorithm.h:34
reco::Candidate
Definition: Candidate.h:27
MatcherByPullsAlgorithm::match
std::pair< bool, float > match(const reco::Track &tk, const reco::Candidate &mc, const AlgebraicSymMatrix55 &invertedCovariance) const
Definition: MatcherByPullsAlgorithm.cc:40
ParameterSet.h
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
MatcherByPullsAlgorithm::track_
TrackChoice track_
Track to be used in matching.
Definition: MatcherByPullsAlgorithm.h:86
MatcherByPullsAlgorithm::matchMany
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
Definition: MatcherByPullsAlgorithm.cc:99
MatcherByPullsAlgorithm::TrackChoice
TrackChoice
Enum to define which track to use.
Definition: MatcherByPullsAlgorithm.h:83