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],
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.
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.
Q_EXPORT QTSManip setprecision(int p)
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.
static int max(int a, int b)
PlaneID_t Plane
Index of the plane within its TPC.
Q_EXPORT QTSManip setw(int w)
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.
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
DoubleProduct operator+(DoubleProduct const &left, DoubleProduct const right)
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.