492 for (
i = 0;
i < ncells; ++
i) {
498 for (
int ineigh = 0; ineigh < 8; ++ineigh) {
508 CombinedCluster cluster;
510 for (
i = 0;
i < ncells; ++
i) {
514 cluster.constituents.emplace_back(+
i + 1, 1);
519 cluster.ecal_et =
ecal.et;
520 cluster.hcal_et =
hcal.et;
521 cluster.et = cluster.ecal_et + cluster.hcal_et;
522 float wecal = cluster.ecal_et / cluster.et, whcal = 1.0 - wecal;
523 cluster.eta =
ecal.eta * wecal +
hcal.eta * whcal;
524 cluster.phi =
ecal.phi * wecal +
hcal.phi * whcal;
527 cluster.constituents.emplace_back(-
i - 1, 1);
531 float myet =
hcal.et;
535 for (
int ineigh = 0; ineigh < 8; ++ineigh) {
537 if (ineighcell == -1)
545 cluster.constituents.emplace_back(-
i - 1, fracet /
ecal_.
cluster(ineighcell).
et);
548 cluster.hcal_et =
hcal.et;
549 cluster.ecal_et = etot;
550 cluster.et = myet + etot;
551 cluster.eta =
hcal.eta + avg_eta / cluster.et;
552 cluster.phi =
hcal.phi + avg_phi / cluster.et;
557 if (cluster.et > 0) {
565 for (
i = 0;
i < ncells; ++
i) {
569 cluster.ecal_et =
ecal.et;
570 cluster.hcal_et = hraw[
i];
571 cluster.et = cluster.ecal_et + cluster.hcal_et;
572 cluster.eta =
ecal.eta;
573 cluster.phi =
ecal.phi;
574 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