19 useUserData_(iConfig.exists(
"userData"))
30 if (addEfficiencies_) {
52 std::vector<edm::InputTag> srcLeptonsTags = iConfig.
getParameter< std::vector<edm::InputTag> >(
"srcLeptons");
53 for(std::vector<edm::InputTag>::const_iterator it=srcLeptonsTags.begin();it!=srcLeptonsTags.end();it++) {
59 produces<std::vector<MET> >();
73 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";
84 std::vector<MET> *
patMETs =
new std::vector<MET>();
87 unsigned int idx = itMET - mets->begin();
118 patMETs->push_back(amet);
125 std::auto_ptr<std::vector<MET> > myMETs(patMETs);
140 iDesc.
add<
bool>(
"addGenMET",
false);
148 iDesc.
add(
"efficiencies", efficienciesPSet);
149 iDesc.
add<
bool>(
"addEfficiencies",
false);
157 iDesc.
add<
bool>(
"addMuonCorrections",
false);
164 std::vector< edm::Handle<reco::CandidateView> >
leptons;
166 srcLeptons_i !=
lepTokens_.end(); ++srcLeptons_i ) {
168 event.getByToken(*srcLeptons_i, leptons_i);
169 leptons.push_back( leptons_i );
173 event.getByToken(
jetToken_, inputJets );
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.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
metsig::METSignificance * metSigAlgo_
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 setSignificanceMatrix(const reco::METCovMatrix &matrix)
bool calculateMETSignificance_
ROOT::Math::SMatrix< double, 2 > METCovMatrix
std::vector< edm::EDGetTokenT< edm::View< reco::Candidate > > > lepTokens_
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_
bool enabled() const
'true' if this there is at least one efficiency configured
static void fillDescription(edm::ParameterSetDescription &iDesc)
tuple METSignificance
____________________________________________________________________________||
void setComment(std::string const &value)
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken_
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)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
reco::METCovMatrix getCovariance(const edm::View< reco::Jet > &jets, const std::vector< edm::Handle< reco::CandidateView > > &leptons, const edm::View< reco::Candidate > &pfCandidates)
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.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
const reco::METCovMatrix getMETCovMatrix(const edm::Event &event) const
double getSignificance(const reco::METCovMatrix &cov, const reco::MET &met) const
void setGenMET(const reco::GenMET &gm)
set the associated GenMET
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
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 setMETSignificance(const double &metSig)
void newEvent(const edm::Event &event) const
To be called for each new event, reads in the ValueMaps for efficiencies.