19 useUserData_(iConfig.exists(
"userData"))
30 if (addEfficiencies_) {
56 std::vector<edm::InputTag> srcLeptonsTags = iConfig.
getParameter< std::vector<edm::InputTag> >(
"srcLeptons");
57 for(std::vector<edm::InputTag>::const_iterator it=srcLeptonsTags.begin();it!=srcLeptonsTags.end();it++) {
63 produces<std::vector<MET> >();
77 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";
88 std::vector<MET> *
patMETs =
new std::vector<MET>();
91 unsigned int idx = itMET - mets->begin();
122 patMETs->push_back(amet);
129 std::auto_ptr<std::vector<MET> > myMETs(patMETs);
144 iDesc.
add<
bool>(
"addGenMET",
false);
152 iDesc.
add(
"efficiencies", efficienciesPSet);
153 iDesc.
add<
bool>(
"addEfficiencies",
false);
161 iDesc.
add<
bool>(
"addMuonCorrections",
false);
168 std::vector< edm::Handle<reco::CandidateView> >
leptons;
170 srcLeptons_i !=
lepTokens_.end(); ++srcLeptons_i ) {
172 event.getByToken(*srcLeptons_i, leptons_i);
173 leptons.push_back( leptons_i );
177 event.getByToken(
jetToken_, inputJets );
192 *rho, resPtObj, resPhiObj, resSFObj, event.
isRealData());
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.
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)
metsig::METSignificance * metSigAlgo_
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
static const JetResolution get(const edm::EventSetup &, const std::string &)
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::string jetResPtType_
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
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const reco::METCovMatrix getMETCovMatrix(const edm::Event &event, const edm::EventSetup &iSetup) const
static void fillDescription(edm::ParameterSetDescription &iDesc)
tuple METSignificance
____________________________________________________________________________||
void setComment(std::string const &value)
edm::EDGetTokenT< double > rhoToken_
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
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
pat::helper::KinResolutionsLoader resolutionLoader_
edm::EDGetTokenT< edm::View< reco::GenMET > > genMETToken_
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.
std::string jetResPhiType_
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.
static const JetResolutionScaleFactor get(const edm::EventSetup &, const std::string &)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
double getSignificance(const reco::METCovMatrix &cov, const reco::MET &met) const
void setGenMET(const reco::GenMET &gm)
set the associated GenMET
PATMETProducer(const edm::ParameterSet &iConfig)
reco::METCovMatrix getCovariance(const edm::View< reco::Jet > &jets, const std::vector< edm::Handle< reco::CandidateView > > &leptons, const edm::View< reco::Candidate > &pfCandidates, double rho, JME::JetResolution &resPtObj, JME::JetResolution &resPhiObj, JME::JetResolutionScaleFactor &resSFObj, bool isRealData)
void setMETSignificance(const double &metSig)