CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 // $Id: MatcherByPullsAlgorithm.h,v 1.2 2009/11/05 13:20:19 gpetrucc Exp $
19 //
20 //
21 
22 #include <string>
23 #include <algorithm>
24 #include <vector>
26 
31 
32 //
33 // class decleration
34 
36  public:
39 
42  std::pair<bool,float> match(const reco::Track &tk,
43  const reco::Candidate &mc,
44  const AlgebraicSymMatrix55 &invertedCovariance) const ;
45 
48  std::pair<int,float> match(const reco::RecoCandidate &src,
49  const std::vector<reco::GenParticle> &cands,
50  const std::vector<uint8_t> &good) const ;
51 
56  void matchMany(const reco::RecoCandidate &src,
57  const std::vector<reco::GenParticle> &cands,
58  const std::vector<uint8_t> &good,
59  std::vector<std::pair<double, int> > &matchesToFill) const ;
60 
63  std::pair<int,float> match(const reco::Track &src,
64  const std::vector<reco::GenParticle> &cands,
65  const std::vector<uint8_t> &good) const ;
66 
71  void matchMany(const reco::Track &src,
72  const std::vector<reco::GenParticle> &cands,
73  const std::vector<uint8_t> &good,
74  std::vector<std::pair<double, int> > &matchesToFill) const ;
75 
76 
78  void fillInvCov(const reco::Track &tk, AlgebraicSymMatrix55 &invCov) const ;
79  private:
81  const reco::Track * track(const reco::RecoCandidate &src) const ;
82 
85 
88 
90  double dr2_;
91 
93  double cut_;
94 
96  bool diagOnly_;
97 
99  bool useVertex_;
100 
101 };
102 
103 #endif
104 
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
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
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.
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