File indexing completed on 2023-03-17 11:21:43
0001
0002 #ifndef L2TAUJETSMERGER_H
0003 #define L2TAUJETSMERGER_H
0004
0005
0006 #include "FWCore/Framework/interface/Frameworkfwd.h"
0007 #include "FWCore/Framework/interface/global/EDProducer.h"
0008 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0009 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0010 #include "FWCore/Framework/interface/Event.h"
0011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0012 #include "FWCore/Utilities/interface/InputTag.h"
0013 #include "DataFormats/Common/interface/Handle.h"
0014 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
0015
0016 #include <map>
0017 #include <vector>
0018
0019 class L2TauJetsMerger : public edm::global::EDProducer<> {
0020 public:
0021 explicit L2TauJetsMerger(const edm::ParameterSet&);
0022 ~L2TauJetsMerger() override;
0023 void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
0024 static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0025
0026 private:
0027 typedef std::vector<edm::InputTag> vtag;
0028 typedef std::vector<edm::EDGetTokenT<reco::CaloJetCollection> > vtoken_cjets;
0029 const vtag jetSrc;
0030 vtoken_cjets jetSrc_token;
0031 const double mEt_Min;
0032
0033 class SorterByPt {
0034 public:
0035 SorterByPt() {}
0036 ~SorterByPt() {}
0037 bool operator()(const reco::CaloJet& jet1, const reco::CaloJet& jet2) { return jet1.pt() > jet2.pt(); }
0038 };
0039 };
0040 #endif