68 std::vector<edm::EDGetTokenT<edm::View<reco::Candidate>>>
lepTokens_;
122 std::vector<edm::InputTag> srcLeptonsTags = iConfig.
getParameter<std::vector<edm::InputTag>>(
"srcLeptons");
123 for (std::vector<edm::InputTag>::const_iterator it = srcLeptonsTags.begin(); it != srcLeptonsTags.end(); it++) {
135 produces<std::vector<MET>>();
145 if (
mets->size() != 1)
147 <<
mets->size() <<
" instead of 1 as it should.\n";
160 std::vector<MET>*
patMETs =
new std::vector<MET>();
163 unsigned int idx = itMET -
mets->begin();
202 std::unique_ptr<std::vector<MET>> myMETs(
patMETs);
215 iDesc.
add<
bool>(
"addGenMET",
false);
223 iDesc.
add(
"efficiencies", efficienciesPSet);
224 iDesc.
add<
bool>(
"addEfficiencies",
false);
232 iDesc.
add<
bool>(
"addMuonCorrections",
false);
240 std::vector<edm::Handle<reco::CandidateView>>
leptons;
245 event.getByToken(*srcLeptons_i, leptons_i);
269 if (
met.isWeighted()) {
271 throw cms::Exception(
"InvalidInput") <<
"MET is weighted (e.g. PUPPI), but no weights given in PATMETProducer\n";
Analysis-level MET class.
bool enabled() const
'true' if this there is at least one efficiency configured
void newEvent(const edm::Event &event)
To be called for each new event, reads in the ValueMaps for efficiencies.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T getParameter(std::string const &) const
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)
metsig::METSignificance * metSigAlgo_
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
static double getSignificance(const reco::METCovMatrix &cov, const reco::MET &met)
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
void setAllowAnything()
allow any parameter label/value pairs
#define DEFINE_FWK_MODULE(type)
pat::PATUserDataHelper< pat::MET > userDataHelper_
ROOT::Math::SMatrix< double, 2 > METCovMatrix
void setSignificanceMatrix(const reco::METCovMatrix &matrix)
const reco::METCovMatrix getMETCovMatrix(const edm::Event &event, const edm::EventSetup &iSetup, const reco::MET &met, double &sumPtUnclustered) const
std::vector< edm::EDGetTokenT< edm::View< reco::Candidate > > > lepTokens_
edm::ESGetToken< JME::JetResolutionObject, JetResolutionRcd > jetResPtToken_
constexpr bool isUninitialized() const noexcept
edm::ESGetToken< JME::JetResolutionObject, JetResolutionRcd > jetResPhiToken_
bool calculateMETSignificance_
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
edm::EDGetTokenT< edm::View< reco::Candidate > > pfCandToken_
static void fillDescription(edm::ParameterSetDescription &iDesc)
void setComment(std::string const &value)
GreaterByEt< MET > eTComparator_
edm::EDGetTokenT< double > rhoToken_
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken_
edm::EDGetTokenT< edm::ValueMap< float > > weightsToken_
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
bool enabled() const
'true' if this there is at least one efficiency configured
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
pat::helper::EfficiencyLoader efficiencyLoader_
bool getData(T &iHolder) const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(ObjectType &patObject, edm::Event const &iEvent, edm::EventSetup const &iSetup)
edm::ESGetToken< JME::JetResolutionObject, JetResolutionScaleFactorRcd > jetSFToken_
void setMETSumPtUnclustered(const double &sumPtUnclustered)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
pat::helper::KinResolutionsLoader resolutionLoader_
edm::EDGetTokenT< edm::View< reco::GenMET > > genMETToken_
METSignificance
____________________________________________________________________________||
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
void setGenMET(const reco::GenMET &gm)
set the associated GenMET
PATMETProducer(const edm::ParameterSet &iConfig)
void setMETSignificance(const double &metSig)
~PATMETProducer() override