File indexing completed on 2024-04-06 12:26:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef PFMETProducer_h
0019 #define PFMETProducer_h
0020
0021
0022 #include "FWCore/Framework/interface/Frameworkfwd.h"
0023 #include "FWCore/Framework/interface/stream/EDProducer.h"
0024 #include "FWCore/Framework/interface/Event.h"
0025 #include "FWCore/Framework/interface/MakerMacros.h"
0026 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0027 #include "FWCore/Framework/interface/ConsumesCollector.h"
0028
0029 #include "DataFormats/Common/interface/View.h"
0030 #include "DataFormats/Candidate/interface/Candidate.h"
0031 #include "DataFormats/JetReco/interface/PFJet.h"
0032 #include "DataFormats/Common/interface/Handle.h"
0033 #include "DataFormats/METReco/interface/METFwd.h"
0034 #include "DataFormats/METReco/interface/PFMET.h"
0035 #include "DataFormats/METReco/interface/PFMETFwd.h"
0036 #include "DataFormats/METReco/interface/CommonMETData.h"
0037
0038 #include "RecoMET/METAlgorithms/interface/METAlgo.h"
0039 #include "RecoMET/METAlgorithms/interface/SignAlgoResolutions.h"
0040 #include "RecoMET/METAlgorithms/interface/PFSpecificAlgo.h"
0041 #include "RecoMET/METAlgorithms/interface/SignPFSpecificAlgo.h"
0042 #include "RecoMET/METAlgorithms/interface/METSignificance.h"
0043
0044 #include "CondFormats/DataRecord/interface/JetResolutionRcd.h"
0045 #include "CondFormats/DataRecord/interface/JetResolutionScaleFactorRcd.h"
0046 #include "JetMETCorrections/Modules/interface/JetResolution.h"
0047
0048 #include <string>
0049
0050
0051 namespace metsig {
0052 class SignAlgoResolutions;
0053 }
0054
0055
0056 namespace cms {
0057 class PFMETProducer : public edm::stream::EDProducer<> {
0058 public:
0059 explicit PFMETProducer(const edm::ParameterSet&);
0060 ~PFMETProducer() override {}
0061 void produce(edm::Event&, const edm::EventSetup&) override;
0062 static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0063
0064 private:
0065 reco::METCovMatrix getMETCovMatrix(const edm::Event& event,
0066 const edm::EventSetup&,
0067 const edm::Handle<edm::View<reco::Candidate>>& input) const;
0068 edm::InputTag src_;
0069 edm::EDGetTokenT<edm::View<reco::Candidate>> inputToken_;
0070
0071 bool calculateSignificance_;
0072 metsig::METSignificance* metSigAlgo_;
0073
0074 double globalThreshold_;
0075 double jetThreshold_;
0076
0077 edm::EDGetTokenT<edm::View<reco::Jet>> jetToken_;
0078 std::vector<edm::EDGetTokenT<edm::View<reco::Candidate>>> lepTokens_;
0079
0080 edm::ESGetToken<JME::JetResolutionObject, JetResolutionScaleFactorRcd> jetSFToken_;
0081 edm::ESGetToken<JME::JetResolutionObject, JetResolutionRcd> jetResPtToken_;
0082 edm::ESGetToken<JME::JetResolutionObject, JetResolutionRcd> jetResPhiToken_;
0083 edm::EDGetTokenT<double> rhoToken_;
0084 bool applyWeight_;
0085 edm::EDGetTokenT<edm::ValueMap<float>> weightsToken_;
0086 edm::ValueMap<float> const* weights_;
0087 };
0088 }
0089
0090
0091 #endif