Produces the pat::MET.
The PATMETProducer produces the analysis-level pat::MET starting from a collection of objects of METType.
- Author
- Steven Lowette
- Version
- Id
- PATMETProducer.h,v 1.10 2009/06/25 23:49:35 gpetrucc Exp
Definition at line 35 of file PATMETProducer.cc.
Definition at line 85 of file PATMETProducer.cc.
References addEfficiencies_, addGenMET_, addResolutions_, calculateMETSignificance_, efficiencyLoader_, deDxTools::esConsumes(), genMETToken_, edm::ParameterSet::getParameter(), jetResPhiToken_, jetResPtToken_, jetSFToken_, jetToken_, lepTokens_, metSigAlgo_, METSignificance_cfi::METSignificance, metSrc_, metToken_, pfCandToken_, resolutionLoader_, rhoToken_, HLT_2022v14_cff::srcWeights, AlCaHLTBitMon_QueryRunRegistry::string, userDataHelper_, useUserData_, and weightsToken_.
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++) {
135 produces<std::vector<MET>>();
Assists in assimilating all pat::UserData into pat objects.
T getParameter(std::string const &) const
metsig::METSignificance * metSigAlgo_
pat::PATUserDataHelper< pat::MET > userDataHelper_
std::vector< edm::EDGetTokenT< edm::View< reco::Candidate > > > lepTokens_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::ESGetToken< JME::JetResolutionObject, JetResolutionRcd > jetResPtToken_
edm::ESGetToken< JME::JetResolutionObject, JetResolutionRcd > jetResPhiToken_
bool calculateMETSignificance_
edm::EDGetTokenT< edm::View< reco::Candidate > > pfCandToken_
edm::EDGetTokenT< double > rhoToken_
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken_
edm::EDGetTokenT< edm::ValueMap< float > > weightsToken_
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
pat::helper::EfficiencyLoader efficiencyLoader_
edm::ESGetToken< JME::JetResolutionObject, JetResolutionScaleFactorRcd > jetSFToken_
pat::helper::KinResolutionsLoader resolutionLoader_
edm::EDGetTokenT< edm::View< reco::GenMET > > genMETToken_
METSignificance
____________________________________________________________________________||
Definition at line 140 of file PATMETProducer.cc.
References pat::PATUserDataHelper< ObjectType >::add(), addGenMET_, calculateMETSignificance_, efficiencyLoader_, pat::helper::EfficiencyLoader::enabled(), pat::helper::KinResolutionsLoader::enabled(), edm::InputTag::encode(), genMETToken_, getMETCovMatrix(), metsig::METSignificance::getSignificance(), heavyIonCSV_trainingSettings::idx, iEvent, singleTopDQM_cfi::mets, metSigAlgo_, metSrc_, metToken_, eostools::move(), pat::helper::EfficiencyLoader::newEvent(), pat::helper::KinResolutionsLoader::newEvent(), metProducer_cfi::patMETs, resolutionLoader_, pat::helper::EfficiencyLoader::setEfficiencies(), pat::MET::setGenMET(), pat::MET::setMETSignificance(), pat::MET::setMETSumPtUnclustered(), pat::helper::KinResolutionsLoader::setResolutions(), reco::MET::setSignificanceMatrix(), met_cff::sumPtUnclustered, userDataHelper_, and useUserData_.
145 if (
mets->size() != 1)
147 <<
mets->size() <<
" instead of 1 as it should.\n";
160 std::vector<MET>*
patMETs =
new std::vector<MET>();
163 unsigned int idx = itMET -
mets->begin();
169 amet.setGenMET((*genMETs)[
idx]);
175 amet.setSignificanceMatrix(sigcov);
177 amet.setMETSignificance(metSig);
202 std::unique_ptr<std::vector<MET>> myMETs(
patMETs);
Analysis-level MET class.
bool enabled() const
'true' if this there is at least one efficiency configured
void newEvent(const edm::Event &event)
To be called for each new event, reads in the ValueMaps for efficiencies.
metsig::METSignificance * metSigAlgo_
static double getSignificance(const reco::METCovMatrix &cov, const reco::MET &met)
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
pat::PATUserDataHelper< pat::MET > userDataHelper_
ROOT::Math::SMatrix< double, 2 > METCovMatrix
const reco::METCovMatrix getMETCovMatrix(const edm::Event &event, const edm::EventSetup &iSetup, const reco::MET &met, double &sumPtUnclustered) const
bool calculateMETSignificance_
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
bool enabled() const
'true' if this there is at least one efficiency configured
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
pat::helper::EfficiencyLoader efficiencyLoader_
void add(ObjectType &patObject, edm::Event const &iEvent, edm::EventSetup const &iSetup)
pat::helper::KinResolutionsLoader resolutionLoader_
edm::EDGetTokenT< edm::View< reco::GenMET > > genMETToken_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator