5#ifndef ECAL_MYCLUSTERWEIGHT_H_
6#define ECAL_MYCLUSTERWEIGHT_H_
10#include "Ecal/Event/EcalHit.h"
38 double dzchar = 100.0;
57 double dij_t = std::sqrt(std::pow(a_x - b_x, 2) + std::pow(a_y - b_y, 2));
59 double weight_t = std::exp(std::pow(dij_t / rmol, 2)) - 1;
60 double weight_z = std::exp(std::abs(dijz) / dzchar) - 1;
63 return std::max(weight_t, weight_z);
In-memory tool for working on clusters during reconstruction.
Computes the weight (distance) between two Ecal clusters.
double operator()(const ClusterType &a, const ClusterType &b)
Compute the weight between two clusters.
double centroidY() const
Get the centroid Y position (energy-weighted).
double centroidX() const
Get the centroid X position (energy-weighted).
double centroidZ() const
Get the centroid Z position (energy-weighted).
double energy() const
Get the total energy of the cluster.