20 useUserData_(iConfig.exists(
"userData"))
30 if (addEfficiencies_) {
35 addResolutions_ = iConfig.
getParameter<
bool>(
"addResolutions");
36 if (addResolutions_) {
47 produces<std::vector<MET> >();
61 if (mets->size() != 1)
throw cms::Exception(
"Corrupt Data") <<
"The input MET collection " <<
metSrc_.
encode() <<
" has size " << mets->size() <<
" instead of 1 as it should.\n";
72 std::vector<MET> *
patMETs =
new std::vector<MET>();
75 unsigned int idx = itMET - mets->begin();
98 patMETs->push_back(amet);
105 std::auto_ptr<std::vector<MET> > myMETs(patMETs);
120 iDesc.
add<
bool>(
"addGenMET",
false);
128 iDesc.
add(
"efficiencies", efficienciesPSet);
129 iDesc.
add<
bool>(
"addEfficiencies",
false);
137 iDesc.
add<
bool>(
"addMuonCorrections",
false);
bool enabled() const
'true' if this there is at least one efficiency configured
Analysis-level MET class.
T getParameter(std::string const &) const
Assists in assimilating all pat::UserData into pat objects.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
void setAllowAnything()
allow any parameter label/value pairs
#define DEFINE_FWK_MODULE(type)
pat::PATUserDataHelper< pat::MET > userDataHelper_
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
bool enabled() const
'true' if this there is at least one efficiency configured
static void fillDescription(edm::ParameterSetDescription &iDesc)
void setComment(std::string const &value)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
pat::helper::EfficiencyLoader efficiencyLoader_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
pat::helper::KinResolutionsLoader resolutionLoader_
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
void setGenMET(const reco::GenMET &gm)
set the associated GenMET
void newEvent(const edm::Event &event, const edm::EventSetup &setup) const
To be called for each new event, reads in the EventSetup object.
PATMETProducer(const edm::ParameterSet &iConfig)
void newEvent(const edm::Event &event) const
To be called for each new event, reads in the ValueMaps for efficiencies.
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)