559 for (
i = 0;
i < ncells; ++
i) {
565 for (
int ineigh = 0; ineigh < 8; ++ineigh) {
575 CombinedCluster cluster;
577 for (
i = 0;
i < ncells; ++
i) {
581 cluster.constituents.emplace_back(+
i + 1, 1);
586 cluster.ecal_et =
ecal.et;
587 cluster.hcal_et =
hcal.et;
588 cluster.et = cluster.ecal_et + cluster.hcal_et;
589 float wecal = cluster.ecal_et / cluster.et, whcal = 1.0 - wecal;
590 cluster.eta =
ecal.eta * wecal +
hcal.eta * whcal;
591 cluster.phi =
ecal.phi * wecal +
hcal.phi * whcal;
592 cluster.ecal_eta = cluster.eta;
593 cluster.ecal_phi = cluster.phi;
596 cluster.constituents.emplace_back(-
i - 1, 1);
600 float myet =
hcal.et;
604 for (
int ineigh = 0; ineigh < 8; ++ineigh) {
606 if (ineighcell == -1)
614 cluster.constituents.emplace_back(-
i - 1, fracet /
ecal_.
cluster(ineighcell).
et);
617 cluster.hcal_et =
hcal.et;
618 cluster.ecal_et = etot;
619 cluster.et = myet + etot;
620 cluster.eta =
hcal.eta + avg_eta / cluster.et;
621 cluster.phi =
hcal.phi + avg_phi / cluster.et;
622 cluster.ecal_eta = cluster.eta;
623 cluster.ecal_phi = cluster.phi;
628 if (cluster.et > 0) {
636 for (
i = 0;
i < ncells; ++
i) {
640 cluster.ecal_et =
ecal.et;
641 cluster.hcal_et = hraw[
i];
642 cluster.et = cluster.ecal_et + cluster.hcal_et;
643 cluster.eta =
ecal.eta;
644 cluster.phi =
ecal.phi;
645 cluster.constituents.emplace_back(-
i - 1, 1);
std::vector< CombinedCluster > clusters_
float ptOverNeighLocalMaxSum
float eta(int icell) const
constexpr T reduceRange(T x)
const SingleCaloClusterer & hcal_
const IndexGrid & indexGrid() const
PreClusterGrid ecalToHCal_
int neighbour(int icell, unsigned int idx) const
float phi(int icell) const
const SingleCaloClusterer & ecal_
const T & neigh(int icell, unsigned int idx) const
const EtGrid & raw() const
GridData< int > IndexGrid
const Cluster & cluster(int i) const
unsigned int size() const