88 auto out = std::make_unique<l1t::PFClusterCollection>();
89 auto outEgamma = std::make_unique<l1t::PFClusterCollection>();
90 std::unique_ptr<l1t::PFClusterCollection> outEm, outHad;
92 outEm = std::make_unique<l1t::PFClusterCollection>();
93 outHad = std::make_unique<l1t::PFClusterCollection>();
98 for (
auto it = multiclusters->
begin(0), ed = multiclusters->
end(0); it != ed; ++it) {
99 float pt = it->pt(),
hoe = it->hOverE();
114 it->iPt(l1t::HGCalMulticluster::EnergyInterpretation::EM), it->eta(), it->phi(),
hoe,
false);
117 outEgamma->push_back(egcluster);
123 float pt_new = it->iPt(l1t::HGCalMulticluster::EnergyInterpretation::EM);
125 cluster =
l1t::PFCluster(pt_new, it->eta(), it->phi(), hoe_new, isEM);
128 float had_old =
pt - cluster.emEt();
130 float em_new = it->iPt(l1t::HGCalMulticluster::EnergyInterpretation::EM);
131 float pt_new = had_old + em_new;
133 float hoe_new = em_new > 0 ? (had_old / em_new) : 999;
134 cluster =
l1t::PFCluster(pt_new, it->eta(), it->phi(), hoe_new, isEM);
139 float em_new = it->iPt(l1t::HGCalMulticluster::EnergyInterpretation::EM);
140 float hoe_new = em_new > 0 ? (it->pt() / em_new - 1) : -1;
141 cluster =
l1t::PFCluster(it->pt(), it->eta(), it->phi(), hoe_new, isEM);
154 cluster.setHwQual((isEM ? 1 : 0) + (it->hwQual() << 1));
158 cluster.setPtError(
resol_(cluster.pt(),
std::abs(cluster.eta())));
161 cluster.setAbsZBarycenter(fabs(it->zBarycenter()));
162 cluster.setSigmaRR(it->sigmaRRTot());
164 out->push_back(cluster);
unsigned int key(const_iterator &iter) const
const_iterator begin(int bx) const
void correctPt(l1t::PFCluster &cluster, float preserveEmEt=true) const
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
StringCutObjectSelector< l1t::HGCalMulticluster > preEmId_
float passID(l1t::HGCalMulticluster c, l1t::PFCluster &cpf)