39 emOnly_(iConfig.getParameter<
bool>(
"emOnly")),
40 etCut_(iConfig.getParameter<double>(
"etMin")),
41 preEmId_(iConfig.getParameter<
std::
string>(
"preEmId")),
46 corrector_(iConfig.getParameter<
std::
string>(
"corrector"),
49 : iConfig.getParameter<double>(
"correctorEmfMax")),
58 produces<l1t::PFClusterCollection>();
60 produces<l1t::PFClusterCollection>(
"em");
61 produces<l1t::PFClusterCollection>(
"had");
66 auto out = std::make_unique<l1t::PFClusterCollection>();
67 std::unique_ptr<l1t::PFClusterCollection> outEm, outHad;
69 outEm = std::make_unique<l1t::PFClusterCollection>();
70 outHad = std::make_unique<l1t::PFClusterCollection>();
73 iEvent.getByToken(src_, multiclusters);
75 for (
auto it = multiclusters->
begin(0), ed = multiclusters->
end(0); it != ed; ++it) {
76 float pt = it->pt(),
hoe = it->hOverE();
77 bool isEM = hasEmId_ ? preEmId_(*it) : emOnly_;
88 if (!emVsPUID_.method().empty()) {
89 if (!emVsPUID_.passID(*it, cluster)) {
93 if (!emVsPionID_.method().empty()) {
94 cluster.
setIsEM(emVsPionID_.passID(*it, cluster));
96 if (corrector_.valid())
97 corrector_.correctPt(cluster);
98 cluster.setPtError(resol_(cluster.pt(),
std::abs(cluster.eta())));
100 out->push_back(cluster);
103 (isEM ? outEm : outHad)->push_back(
out->back());