19 useUserData_(iConfig.exists(
"userData"))
30 if (addEfficiencies_) {
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)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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.
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
pat::helper::EfficiencyLoader efficiencyLoader_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
pat::helper::KinResolutionsLoader resolutionLoader_
edm::EDGetTokenT< edm::View< reco::GenMET > > genMETToken_
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
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.