25 inline T
sqr(T v) {
return v*v; }
58 float sigma_start_wire,
60 float sigma_start_tick,
72 float integral_stddev,
74 float summedADC_stddev,
76 float multiple_hit_density,
89 ,
fAngles{ start_angle, end_angle }
119 if (other.
View() !=
View())
return {};
123 const unsigned int n_hits =
NHits() + other.
NHits();
124 double charge_stddev[2];
129 const double other_variance
135 +
NHits() * this_variance
136 + other.
NHits() * other_variance
139 charge_stddev[mode] = std::sqrt(e2);
154 charge_stddev[
cmFit],
156 charge_stddev[
cmADC],
174 o << std::setiosflags(std::ios::fixed) << std::setprecision(2);
175 o <<
"Cluster ID " << std::setw(5) <<
std::right << c.
ID()
202 if (a.
ID() != b.
ID())
203 return a.
ID() < b.
ID();
Sums from the fitted hit values.
float fWidth
A measure of the cluster width, in homogenized units.
static constexpr ID_t InvalidID
Value for an invalid cluster ID.
float fMultipleHitDensity
Density of wires in the cluster with more than one hit.
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Reconstruction base classes.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
friend std::ostream & operator<<(std::ostream &o, Cluster const &c)
float fSigmaEndTicks[NEnds]
The data type to uniquely identify a Plane.
float StartWire() const
Returns the wire coordinate of the start of the cluster.
float fSigmaEndWires[NEnds]
CryostatID_t Cryostat
Index of cryostat.
Set of hits with a 2D structure.
float EndTick() const
Returns the tick coordinate of the end of the cluster.
geo::PlaneID Plane() const
Returns the plane ID this cluster lies on.
geo::PlaneID fPlaneID
Location of the start of the cluster.
Sums directly from ADC counts.
static const SentryArgument_t Sentry
An instance of the sentry object.
float fChargeSum[NChargeModes]
float fChargeAverage[NChargeModes]
float SummedADC() const
Returns the total charge of the cluster from signal ADC counts.
float ChargeStdDev(ChargeMode_t mode) const
Returns the standard deviation of charge of the cluster hits.
float Width() const
A measure of the cluster width, in homogenized units.
PlaneID_t Plane
Index of the plane within its TPC.
Declaration of cluster object.
friend bool operator<(Cluster const &a, Cluster const &b)
float ChargeAverage(ChargeMode_t mode) const
Returns the average charge of the cluster hits.
geo::View_t View() const
Returns the view for this cluster.
QuadExpr operator+(double v, const QuadExpr &e)
ID_t ID() const
Identifier of this cluster.
unsigned int fNHits
Number of hits in the cluster.
float fOpeningAngles[NEnds]
bool hasPlane() const
Returns whether geometry plane is valid.
Cluster()
Default constructor: an empty cluster.
unsigned int NHits() const
Number of hits in the cluster.
TPCID_t TPC
Index of the TPC within its cryostat.
float StartTick() const
Returns the tick coordinate of the start of the cluster.
float fChargeStdDev[NChargeModes]
geo::View_t fView
View for this cluster.
int ID_t
Type of cluster ID.
float Integral() const
Returns the total charge of the cluster from hit shape.
float EndWire() const
Returns the wire coordinate of the end of the cluster.