14 : moduleLabel_(cfg.getParameter<std::string>(
"@module_label")),
21 TString corrPxFormula = cfgCorrParameter.
getParameter<std::string>(
"px");
22 TString corrPyFormula = cfgCorrParameter.getParameter<std::string>(
"py").
data();
23 if ( corrPxFormula.Contains(
"Nvtx") || corrPyFormula.Contains(
"Nvtx") ) {
27 <<
"Configuration Parameter 'srcVertices' must be non-empty !!\n";
30 corrPxFormula.ReplaceAll(
"sumEt",
"x");
31 corrPxFormula.ReplaceAll(
"Nvtx",
"y");
33 corrPx_ =
new TFormula(corrPxName.data(), corrPxFormula.Data());
35 corrPyFormula.ReplaceAll(
"sumEt",
"x");
36 corrPyFormula.ReplaceAll(
"Nvtx",
"y");
37 std::string corrPyName = std::string(
moduleLabel_).append(
"_corrPy");
38 corrPy_ =
new TFormula(corrPyName.data(), corrPyFormula.Data());
40 produces<CorrMETData>();
55 if ( met->size() != 1 )
57 <<
"Failed to find unique MET object !!\n";
59 double sumEt = met->front().sumEt();
66 Nvtx = vertices->size();
70 std::auto_ptr<CorrMETData> metCorr(
new CorrMETData());
71 metCorr->mex = -
corrPx_->Eval(sumEt, Nvtx);
72 metCorr->mey = -
corrPy_->Eval(sumEt, Nvtx);
T getParameter(std::string const &) const
void append(Exception const &another)
#define DEFINE_FWK_MODULE(type)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
char data[epos_bytes_allocation]