Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-30 08:50:51

0001 #include "CommonTools/UtilAlgos/interface/PhysObjectMatcher.h"
0002 #include "CommonTools/UtilAlgos/interface/MCMatchSelector.h"
0003 #include "CommonTools/UtilAlgos/interface/MatchByDRDPt.h"
0004 #include "CommonTools/UtilAlgos/interface/MatchLessByDPt.h"
0005 
0006 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
0007 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
0008 #include "DataFormats/JetReco/interface/GenJetCollection.h"
0009 #include "DataFormats/JetReco/interface/GenJet.h"
0010 
0011 // Match by deltaR and deltaPt, ranking by deltaR (default)
0012 typedef reco::PhysObjectMatcher<
0013     reco::CandidateView,
0014     reco::GenParticleCollection,
0015     reco::MCMatchSelector<reco::CandidateView::value_type, reco::GenParticleCollection::value_type>,
0016     reco::MatchByDRDPt<reco::CandidateView::value_type, reco::GenParticleCollection::value_type> >
0017     MCMatcher;
0018 
0019 // Alternative: match by deltaR and deltaPt, ranking by deltaPt
0020 typedef reco::PhysObjectMatcher<
0021     reco::CandidateView,
0022     reco::GenParticleCollection,
0023     reco::MCMatchSelector<reco::CandidateView::value_type, reco::GenParticleCollection::value_type>,
0024     reco::MatchByDRDPt<reco::CandidateView::value_type, reco::GenParticleCollection::value_type>,
0025     reco::MatchLessByDPt<reco::CandidateView, reco::GenParticleCollection> >
0026     MCMatcherByPt;
0027 
0028 // JET Match by deltaR, ranking by deltaR (default)
0029 typedef reco::PhysObjectMatcher<
0030     reco::CandidateView,
0031     reco::GenJetCollection,
0032     reco::MCMatchSelector<reco::CandidateView::value_type, reco::GenJetCollection::value_type>,
0033     reco::MatchByDR<reco::CandidateView::value_type, reco::CandidateView::value_type> >
0034     GenJetMatcher;
0035 
0036 // JET Match by deltaR and dPt, ranking by deltaR
0037 typedef reco::PhysObjectMatcher<
0038     reco::CandidateView,
0039     reco::GenJetCollection,
0040     reco::MCMatchSelector<reco::CandidateView::value_type, reco::GenJetCollection::value_type>,
0041     reco::MatchByDRDPt<reco::CandidateView::value_type, reco::GenJetCollection::value_type> >
0042     GenJetMatcherDRPtByDR;
0043 
0044 #include "FWCore/Framework/interface/MakerMacros.h"
0045 DEFINE_FWK_MODULE(MCMatcher);
0046 DEFINE_FWK_MODULE(MCMatcherByPt);
0047 DEFINE_FWK_MODULE(GenJetMatcher);
0048 DEFINE_FWK_MODULE(GenJetMatcherDRPtByDR);