16 std::vector<edm::InputTag> srcLeptonsTags = iConfig.
getParameter<std::vector<edm::InputTag>>(
"srcLeptons");
17 for (std::vector<edm::InputTag>::const_iterator it = srcLeptonsTags.begin(); it != srcLeptonsTags.end(); it++) {
35 if (!srcWeights.
label().empty())
40 produces<double>(
"METSignificance");
64 std::vector<edm::Handle<reco::CandidateView>>
leptons;
69 event.getByToken(*srcLeptons_i, leptons_i);
70 leptons.push_back(leptons_i);
93 double sumPtUnclustered = 0;
98 <<
"MET is weighted (e.g. PUPPI), but no weights given in METSignificanceProducer\n";
113 auto significance = std::make_unique<double>();
114 (*significance) = sig;
117 (*covPtr)(0, 0) = cov(0, 0);
118 (*covPtr)(1, 0) = cov(1, 0);
119 (*covPtr)(1, 1) = cov(1, 1);
121 event.put(
std::move(covPtr),
"METCovariance");
122 event.put(
std::move(significance),
"METSignificance");
static const JetResolutionScaleFactor get(const edm::EventSetup &, const Token &)
int isWeighted() const
boolean if weights were applied by algorithm (e.g. PUPPI weights)
reco::METCovMatrix getCovariance(const edm::View< reco::Jet > &jets, const std::vector< edm::Handle< reco::CandidateView > > &leptons, const edm::Handle< edm::View< reco::Candidate > > &pfCandidates, double rho, JME::JetResolution &resPtObj, JME::JetResolution &resPhiObj, JME::JetResolutionScaleFactor &resSFObj, bool isRealData, double &sumPtUnclustered, edm::ValueMap< float > const *weights=nullptr)
void produce(edm::Event &, const edm::EventSetup &) override
static double getSignificance(const reco::METCovMatrix &cov, const reco::MET &met)
JME::JetResolution::Token jetResPhiTypeToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
ROOT::Math::SMatrix< double, 2 > METCovMatrix
edm::EDGetTokenT< edm::View< reco::Candidate > > pfCandidatesToken_
constexpr bool isUninitialized() const noexcept
std::vector< edm::EDGetTokenT< edm::View< reco::Candidate > > > lepTokens_
tuple METSignificance
____________________________________________________________________________||
edm::EDGetTokenT< double > rhoToken_
std::string jetResPhiType_
~METSignificanceProducer() override
edm::EDGetTokenT< edm::ValueMap< float > > weightsToken_
METSignificanceProducer(const edm::ParameterSet &)
T getParameter(std::string const &) const
metsig::METSignificance * metSigAlgo_
std::string jetResPtType_
edm::EDGetTokenT< edm::View< reco::Jet > > pfjetsToken_
JME::JetResolutionScaleFactor::Token jetSFTypeToken_
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
static const JetResolution get(const edm::EventSetup &, const Token &)
JME::JetResolution::Token jetResPtTypeToken_