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