Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:44:31

0001 #ifndef MatchJet_H
0002 #define MatchJet_H
0003 
0004 #include <vector>
0005 #include <string>
0006 
0007 #include "FWCore/Framework/interface/EventSetup.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009 #include "DataFormats/Common/interface/RefToBaseVector.h"
0010 #include "DataFormats/JetReco/interface/Jet.h"
0011 #include "DQMOffline/RecoB/interface/CorrectJet.h"
0012 
0013 /** \class MatchJet
0014  *
0015  *  Match jets
0016  *
0017  */
0018 
0019 class MatchJet {
0020 public:
0021   MatchJet() {}
0022   MatchJet(const edm::ParameterSet& pSet);
0023 
0024   void setThreshold(const double& energy) { threshold = energy; }
0025 
0026   /// match the collections
0027   void matchCollections(const edm::RefToBaseVector<reco::Jet>& refJets,
0028                         const edm::RefToBaseVector<reco::Jet>& recJets,
0029                         const reco::JetCorrector* corrector);
0030 
0031   /// Returns the matched "reference" jet
0032   edm::RefToBase<reco::Jet> operator()(const edm::RefToBase<reco::Jet>& recJet) const;
0033 
0034 private:
0035   std::vector<int> refToRec, recToRef;
0036   edm::RefToBaseVector<reco::Jet> refJets;
0037   edm::RefToBaseVector<reco::Jet> recJets;
0038 
0039   CorrectJet refJetCorrector;
0040   CorrectJet recJetCorrector;
0041 
0042   double maxChi2;
0043   double sigmaDeltaR2;
0044   double sigmaDeltaE2;
0045   double threshold;
0046 };
0047 
0048 #endif