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);
unsigned int key(const_iterator &iter) const
#define DEFINE_FWK_MODULE(type)
PFClusterProducerFromHGC3DClusters(const edm::ParameterSet &)
const_iterator begin(int bx) const
BXVector< HGCalMulticluster > HGCalMulticlusterBxCollection
Abs< T >::type abs(const T &t)
l1tpf::HGC3DClusterEgID emVsPionID_
l1tpf::HGC3DClusterEgID emVsPUID_
l1tpf::ParametricResolution resol_
l1tpf::corrector corrector_
edm::EDGetTokenT< l1t::HGCalMulticlusterBxCollection > src_
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
const_iterator end(int bx) const
void produce(edm::Event &, const edm::EventSetup &) override
StringCutObjectSelector< l1t::HGCalMulticluster > preEmId_
~PFClusterProducerFromHGC3DClusters() override