37 emOnly_(iConfig.getParameter<
bool>(
"emOnly")),
38 etCut_(iConfig.getParameter<double>(
"etMin")),
39 preEmId_(iConfig.getParameter<
std::
string>(
"preEmId")),
44 corrector_(iConfig.getParameter<
std::
string>(
"corrector"),
47 : iConfig.getParameter<double>(
"correctorEmfMax")),
56 produces<l1t::PFClusterCollection>();
58 produces<l1t::PFClusterCollection>(
"em");
59 produces<l1t::PFClusterCollection>(
"had");
64 auto out = std::make_unique<l1t::PFClusterCollection>();
65 std::unique_ptr<l1t::PFClusterCollection> outEm, outHad;
71 iEvent.getByToken(src_, multiclusters);
73 for (
auto it = multiclusters->
begin(0), ed = multiclusters->
end(0); it != ed; ++it) {
74 float pt = it->pt(),
hoe = it->hOverE();
75 bool isEM = hasEmId_ ? preEmId_(*it) : emOnly_;
86 if (!emVsPUID_.method().empty()) {
87 if (!emVsPUID_.passID(*it, cluster)) {
91 if (!emVsPionID_.method().empty()) {
92 cluster.
setIsEM(emVsPionID_.passID(*it, cluster));
94 if (corrector_.valid())
95 corrector_.correctPt(cluster);
96 cluster.setPtError(resol_(cluster.pt(),
std::abs(cluster.eta())));
98 out->push_back(cluster);
101 (isEM ? outEm : outHad)->push_back(
out->back());