18 : src_(iConfig.getParameter<edm::
InputTag>(
"src")),
20 calculateSignificance_(iConfig.getParameter<bool>(
"calculateSignificance")),
21 globalThreshold_(iConfig.getParameter<double>(
"globalThreshold")),
22 applyWeight_(iConfig.getParameter<bool>(
"applyWeight")),
26 if (srcWeights.
label().empty())
27 throw cms::Exception(
"InvalidInput") <<
"applyWeight set to True, but no weights given in PFMETProducer\n";
30 <<
"Particle and weights collection have the same label. You may be applying the same weights twice.\n";
37 std::vector<edm::InputTag> srcLeptonsTags = iConfig.
getParameter<std::vector<edm::InputTag>>(
"srcLeptons");
38 for (std::vector<edm::InputTag>::const_iterator it = srcLeptonsTags.begin(); it != srcLeptonsTags.end(); it++) {
50 produces<reco::PFMETCollection>().setBranchAlias(alias);
80 auto pfmetcoll = std::make_unique<reco::PFMETCollection>();
82 pfmetcoll->push_back(pfmet);
90 std::vector<edm::Handle<reco::CandidateView>>
leptons;
95 event.getByToken(*srcLeptons_i, leptons_i);
96 leptons.push_back(leptons_i);
117 double sumPtUnclustered = 0;
135 desc.
add<
double>(
"globalThreshold", 0.);
137 desc.
add<
bool>(
"calculateSignificance",
false);
139 desc.
addOptional<std::vector<edm::InputTag>>(
"srcLeptons");
145 params.setAllowAnything();
149 desc1.add<
bool>(
"applyWeight",
false);
151 descriptions.
add(
"pfMet", desc1);
152 desc2.
add<
bool>(
"applyWeight",
true);
154 descriptions.
add(
"pfMetPuppi", desc2);
void setIsWeighted(bool isWeighted)
Set boolean if weights were applied by algorithm (e.g. PUPPI weights)
SpecificPFMETData run(const edm::View< reco::Candidate > &pfCands, edm::ValueMap< float > const *weights=nullptr)
reco::METCovMatrix getCovariance(const edm::View< reco::Jet > &jets, const std::vector< edm::Handle< reco::CandidateView > > &leptons, const edm::Handle< edm::View< reco::Candidate > > &pfCandidates, double rho, JME::JetResolution &resPtObj, JME::JetResolution &resPhiObj, JME::JetResolutionScaleFactor &resSFObj, bool isRealData, double &sumPtUnclustered, edm::ValueMap< float > const *weights=nullptr)
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
edm::ESGetToken< JME::JetResolutionObject, JetResolutionRcd > jetResPtToken_
#define DEFINE_FWK_MODULE(type)
ROOT::Math::SMatrix< double, 2 > METCovMatrix
void setSignificanceMatrix(const reco::METCovMatrix &matrix)
std::vector< edm::EDGetTokenT< edm::View< reco::Candidate > > > lepTokens_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
PFMETProducer(const edm::ParameterSet &)
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken_
static std::string const input
bool getData(T &iHolder) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
tuple METSignificance
____________________________________________________________________________||
edm::ValueMap< float > const * weights_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool calculateSignificance_
void produce(edm::Event &, const edm::EventSetup &) override
metsig::METSignificance * metSigAlgo_
Structure containing data common to all types of MET.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const_reference_type get(ProductID id, size_t idx) const
MET made from Particle Flow Candidates.
edm::ESGetToken< JME::JetResolutionObject, JetResolutionScaleFactorRcd > jetSFToken_
reco::METCovMatrix getMETCovMatrix(const edm::Event &event, const edm::EventSetup &, const edm::Handle< edm::View< reco::Candidate >> &input) const
T const * product() const
XYZPointD XYZPoint
point in space with cartesian internal representation
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< edm::View< reco::Candidate > > inputToken_
edm::EDGetTokenT< double > rhoToken_
edm::ESGetToken< JME::JetResolutionObject, JetResolutionRcd > jetResPhiToken_
edm::EDGetTokenT< edm::ValueMap< float > > weightsToken_