CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/MuonAnalysis/MuonAssociators/interface/MatcherByPullsAlgorithm.h

Go to the documentation of this file.
00001 #ifndef MuonAnalysis_MuonAssociators_src_MatcherByPullsAlgorithm_h
00002 #define MuonAnalysis_MuonAssociators_src_MatcherByPullsAlgorithm_h
00003 // -*- C++ -*-
00004 //
00005 // Package:    MuonAnalysis/MuonAssociators
00006 // Class:      MatcherByPullsAlgorithm
00007 // 
00015 //
00016 // Original Author:  Giovanni Petrucciani (SNS Pisa and CERN PH-CMG)
00017 //         Created:  Sun Nov 16 16:14:09 CET 2008
00018 // $Id: MatcherByPullsAlgorithm.h,v 1.2 2009/11/05 13:20:19 gpetrucc Exp $
00019 //
00020 //
00021 
00022 #include <string>
00023 #include <algorithm>
00024 #include <vector>
00025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00026 
00027 #include "DataFormats/TrackReco/interface/Track.h"
00028 #include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
00029 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
00030 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
00031 
00032 //
00033 // class decleration
00034 
00035 class MatcherByPullsAlgorithm {
00036     public:
00037         explicit MatcherByPullsAlgorithm(const edm::ParameterSet&);
00038         ~MatcherByPullsAlgorithm();
00039 
00042         std::pair<bool,float> match(const reco::Track &tk, 
00043                 const reco::Candidate &mc, 
00044                 const AlgebraicSymMatrix55 &invertedCovariance) const ;
00045 
00048         std::pair<int,float>  match(const reco::RecoCandidate &src, 
00049                 const std::vector<reco::GenParticle> &cands,
00050                 const std::vector<uint8_t>           &good) const ;
00051 
00056         void matchMany(const reco::RecoCandidate &src,
00057                 const std::vector<reco::GenParticle> &cands,
00058                 const std::vector<uint8_t>           &good,
00059                 std::vector<std::pair<double, int> > &matchesToFill) const ;
00060 
00063         std::pair<int,float>  match(const reco::Track &src, 
00064                 const std::vector<reco::GenParticle> &cands,
00065                 const std::vector<uint8_t>           &good) const ;
00066 
00071         void matchMany(const reco::Track &src,
00072                 const std::vector<reco::GenParticle> &cands,
00073                 const std::vector<uint8_t>           &good,
00074                 std::vector<std::pair<double, int> > &matchesToFill) const ;
00075 
00076 
00078         void fillInvCov(const reco::Track &tk, AlgebraicSymMatrix55 &invCov) const ;
00079     private:
00081         const reco::Track *   track(const reco::RecoCandidate &src) const ;
00082 
00084         enum TrackChoice { StaTrack, TrkTrack, GlbTrack };
00085 
00087         TrackChoice track_;
00088 
00090         double dr2_;
00091 
00093         double cut_;
00094 
00096         bool diagOnly_;
00097 
00099         bool useVertex_;  
00100 
00101 };
00102 
00103 #endif
00104