20 calculateSignificance_(iConfig.getParameter<
bool>(
"calculateSignificance")),
21 globalThreshold_(iConfig.getParameter<double>(
"globalThreshold")),
22 applyWeight_(iConfig.getParameter<
bool>(
"applyWeight")),
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);
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)
T getParameter(std::string const &) const
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)
edm::ESGetToken< JME::JetResolutionObject, JetResolutionRcd > jetResPtToken_
const_reference_type get(ProductID id, size_t idx) const
ROOT::Math::SMatrix< double, 2 > METCovMatrix
void setSignificanceMatrix(const reco::METCovMatrix &matrix)
std::vector< edm::EDGetTokenT< edm::View< reco::Candidate > > > lepTokens_
PFMETProducer(const edm::ParameterSet &)
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken_
static std::string const input
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
reco::METCovMatrix getMETCovMatrix(const edm::Event &event, const edm::EventSetup &, const edm::Handle< edm::View< reco::Candidate >> &input) const
edm::ValueMap< float > const * weights_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool calculateSignificance_
void produce(edm::Event &, const edm::EventSetup &) override
metsig::METSignificance * metSigAlgo_
#define DEFINE_FWK_MODULE(type)
Structure containing data common to all types of MET.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
MET made from Particle Flow Candidates.
edm::ESGetToken< JME::JetResolutionObject, JetResolutionScaleFactorRcd > jetSFToken_
Namespace of DDCMS conversion namespace.
METSignificance
____________________________________________________________________________||
XYZPointD XYZPoint
point in space with cartesian internal representation
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_