LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
recob::Cluster Class Reference

Set of hits with a 2D structure. More...

#include "Cluster.h"

Classes

struct  SentryArgument_t
 Type of sentry argument. More...
 

Public Types

enum  ClusterEnds_t { clStart, clEnd, NEnds, clFirstEnd = 0 }
 
enum  ChargeMode_t { cmFit, cmADC, NChargeModes, cmFirstMode = 0 }
 
typedef int ID_t
 Type of cluster ID. More...
 

Public Member Functions

 Cluster ()
 Default constructor: an empty cluster. More...
 
 Cluster (float start_wire, float sigma_start_wire, float start_tick, float sigma_start_tick, float start_charge, float start_angle, float start_opening, float end_wire, float sigma_end_wire, float end_tick, float sigma_end_tick, float end_charge, float end_angle, float end_opening, float integral, float integral_stddev, float summedADC, float summedADC_stddev, unsigned int n_hits, float multiple_hit_density, float width, ID_t ID, geo::View_t view, geo::PlaneID const &plane, SentryArgument_t sentry=Sentry)
 Constructor: assigns all the fields. More...
 
 Cluster (Cluster const &)=default
 Copy constructor: automatically generated. More...
 
 Cluster (Cluster &&from)
 Move constructor: as copy, but source cluster gets an invalid ID. More...
 
Clusteroperator= (Cluster const &)=default
 Copy assignment: automatically generated. More...
 
Clusteroperator= (Cluster &&from)
 Move assignment: as copy, but source cluster gets an invalid ID. More...
 
 ~Cluster ()=default
 Destructor: automatically generated. More...
 
float StartCharge () const
 Returns the charge on the first wire of the cluster. More...
 
float StartAngle () const
 Returns the starting angle of the cluster. More...
 
float StartOpeningAngle () const
 Returns the opening angle at the start of the cluster. More...
 
float EndCharge () const
 Returns the charge on the last wire of the cluster. More...
 
float EndAngle () const
 Returns the ending angle of the cluster. More...
 
float EndOpeningAngle () const
 Returns the opening angle at the end of the cluster. More...
 
float Integral () const
 Returns the total charge of the cluster from hit shape. More...
 
float IntegralStdDev () const
 Returns the standard deviation of the charge of the cluster hits. More...
 
float IntegralAverage () const
 Returns the average charge of the cluster hits. More...
 
float SummedADC () const
 Returns the total charge of the cluster from signal ADC counts. More...
 
float SummedADCstdDev () const
 Returns the standard deviation of the signal ADC counts of the cluster hits. More...
 
float SummedADCaverage () const
 Returns the average signal ADC counts of the cluster hits. More...
 
float MultipleHitDensity () const
 Density of wires in the cluster with more than one hit. More...
 
float Width () const
 A measure of the cluster width, in homogenized units. More...
 
ID_t ID () const
 Identifier of this cluster. More...
 
geo::View_t View () const
 Returns the view for this cluster. More...
 
geo::PlaneID Plane () const
 Returns the plane ID this cluster lies on. More...
 
bool hasPlane () const
 Returns whether geometry plane is valid. More...
 
bool isValid () const
 Returns if the cluster is valid (that is, if its ID is not invalid) More...
 
Accessors
unsigned int NHits () const
 Number of hits in the cluster. More...
 
float StartWire () const
 Returns the wire coordinate of the start of the cluster. More...
 
float StartTick () const
 Returns the tick coordinate of the start of the cluster. More...
 
float SigmaStartWire () const
 Returns the uncertainty on wire coordinate of the start of the cluster. More...
 
float SigmaStartTick () const
 Returns the uncertainty on tick coordinate of the start of the cluster. More...
 
float EndWire () const
 Returns the wire coordinate of the end of the cluster. More...
 
float EndTick () const
 Returns the tick coordinate of the end of the cluster. More...
 
float SigmaEndWire () const
 Returns the uncertainty on wire coordinate of the end of the cluster. More...
 
float SigmaEndTick () const
 Returns the uncertainty on tick coordinate of the end of the cluster. More...
 
float WireCoord (ClusterEnds_t side) const
 Returns the wire coordinate of one of the end sides of the cluster. More...
 
float WireCoord (unsigned int side) const
 Number of hits in the cluster. More...
 
float TickCoord (ClusterEnds_t side) const
 Returns the tick coordinate of one of the end sides of the cluster. More...
 
float TickCoord (unsigned int side) const
 Returns the tick coordinate of one of the end sides of the cluster. More...
 
float SigmaWireCoord (ClusterEnds_t side) const
 Returns the uncertainty on wire coordinate of one of the end sides of the cluster. More...
 
float SigmaWireCoord (unsigned int side) const
 Returns the uncertainty on wire coordinate of one of the end sides of the cluster. More...
 
float SigmaTickCoord (ClusterEnds_t side) const
 Returns the uncertainty on tick coordinate of one of the end sides of the cluster. More...
 
float SigmaTickCoord (unsigned int side) const
 Returns the uncertainty on tick coordinate of one of the end sides of the cluster. More...
 
float EdgeCharge (ClusterEnds_t side) const
 Returns the charge on the first or last wire of the cluster. More...
 
float EdgeCharge (unsigned int side) const
 Returns the charge on the first or last wire of the cluster. More...
 
float Angle (ClusterEnds_t side) const
 Returns the angle at either end of the cluster. More...
 
float Angle (unsigned int side) const
 Returns the angle at either end of the cluster. More...
 
float OpeningAngle (ClusterEnds_t side) const
 Returns the opening angle at either end of the cluster. More...
 
float OpeningAngle (unsigned int side) const
 Returns the opening angle at either end of the cluster. More...
 
float Charge (ChargeMode_t mode) const
 Returns the total charge of the cluster. More...
 
float Charge (unsigned int mode) const
 Returns the total charge of the cluster. More...
 
float ChargeStdDev (ChargeMode_t mode) const
 Returns the standard deviation of charge of the cluster hits. More...
 
float ChargeStdDev (unsigned int mode) const
 Returns the standard deviation of charge of the cluster hits. More...
 
float ChargeAverage (ChargeMode_t mode) const
 Returns the average charge of the cluster hits. More...
 
float ChargeAverage (unsigned int mode) const
 Returns the average charge of the cluster hits. More...
 

Static Public Attributes

static constexpr ID_t InvalidID = -1
 Value for an invalid cluster ID. More...
 
static const SentryArgument_t Sentry
 An instance of the sentry object. More...
 

Private Attributes

unsigned int fNHits
 Number of hits in the cluster. More...
 
float fMultipleHitDensity
 Density of wires in the cluster with more than one hit. More...
 
float fWidth
 A measure of the cluster width, in homogenized units. More...
 
ID_t fID
 
geo::View_t fView
 View for this cluster. More...
 
geo::PlaneID fPlaneID
 Location of the start of the cluster. More...
 
Data referring to start and end of the cluster

Wire coordinate of the start and end of the cluster (may lie between wires); index is intended to be of type ClusterEnds_t.

float fEndWires [NEnds]
 
float fSigmaEndWires [NEnds]
 
float fEndTicks [NEnds]
 
float fSigmaEndTicks [NEnds]
 
float fEndCharges [NEnds]
 
float fAngles [NEnds]
 
float fOpeningAngles [NEnds]
 
Data derived from hit charge

Sum of the charge of all hits in the cluster. Index is intended to be of type ChargeMode_t

float fChargeSum [NChargeModes]
 
float fChargeStdDev [NChargeModes]
 
float fChargeAverage [NChargeModes]
 

Friends

std::ostream & operator<< (std::ostream &o, Cluster const &c)
 
bool operator< (Cluster const &a, Cluster const &b)
 

Detailed Description

Set of hits with a 2D structure.

A cluster is a set of reconstructed hits supposed to originate from the same physical entity. A cluster lies in a single plane (of a single TPC).

Clusters provide the base of reconstructed 3D objects: tracks and showers. The cluster class contains information that helps characterizing the originating particle and discriminating its signature as track-like or shower-like.

A cluster is supposed to describe the reconstruction of a transiting particle, and can therefore be thought as having a start, the location where it is first seen in time, and an end, the location where it is seen last. In practice, it is often hard to determine by the shape which tip is which, and in case of showers the end might be hard to determine. As a consequence, although the two tips are called "start" and "end", their order is not unerringly; the tip labelled "start" is still deemed to be more likely the beginning of the cluster rather than the end. In the extreme case the "end" should be considered just as an alternative cluster start.

Note
A cluster lives in a plane of inhomogeneous coordinates: wire number and tick number. Different ways to make them homogeneous are available. For example, knowing the drift velocity (assuming it constant) and the wire pitch, it is possible to convert both coordinates in a measure of distance. Where the wire and time coordinates need to be compared, they are converted into physical distances. Wire coordinate includes the wire pitch information and it can be defined as the distance (in centimetres) from the wire #0 (and negative if it lies on the opposite side than wire #0 with respect to wire #0) of the point. The tick coordinate is converted into a distance from the wire plane (in centimetres) by including the drift velocity. The absolute time for which this coordinate is 0 is defined to be as an "absolute trigger time". This is still ambiguous enough, but matter of fact there should be no need of absolute wire or tick coordinates but only of their difference; for example, to define angles, dT/dW (or some similar quantity) is used. More advanced knowledge of the geometry or status of the detector may lead to different wire pitch or drift velocity: in that case, these quantities need to be recomputed, although it is conceivable that the ones with simple constant pitch and drift are often an approximation close enough.

Definition at line 69 of file Cluster.h.

Member Typedef Documentation

typedef int recob::Cluster::ID_t

Type of cluster ID.

Definition at line 72 of file Cluster.h.

Member Enumeration Documentation

Enumerator
cmFit 

Sums from the fitted hit values.

cmADC 

Sums directly from ADC counts.

NChargeModes 

End count.

cmFirstMode 

Just an alias for loops.

Definition at line 81 of file Cluster.h.

81  {
82  cmFit,
83  cmADC,
84  NChargeModes,
85  cmFirstMode = 0
86  } ChargeMode_t;
Sums from the fitted hit values.
Definition: Cluster.h:82
Just an alias for loops.
Definition: Cluster.h:85
Sums directly from ADC counts.
Definition: Cluster.h:83
Enumerator
clStart 

Represents the most likely start of the cluster.

clEnd 

Represents the end, or the alternative start, of the cluster.

NEnds 

End count.

clFirstEnd 

Just an alias for loops.

Definition at line 74 of file Cluster.h.

74  {
75  clStart,
76  clEnd,
77  NEnds,
78  clFirstEnd = 0
79  } ClusterEnds_t;
End count.
Definition: Cluster.h:77
Represents the most likely start of the cluster.
Definition: Cluster.h:75
Just an alias for loops.
Definition: Cluster.h:78
Represents the end, or the alternative start, of the cluster.
Definition: Cluster.h:76

Constructor & Destructor Documentation

recob::Cluster::Cluster ( )

Default constructor: an empty cluster.

Definition at line 34 of file Cluster.cxx.

Referenced by Cluster().

35  : fNHits(0)
36  , fEndWires{0., 0.}
37  , fSigmaEndWires{0., 0.}
38  , fEndTicks{0., 0.}
39  , fSigmaEndTicks{0., 0.}
40  , fEndCharges{0., 0.}
41  , fAngles{0., 0.}
42  , fOpeningAngles{0., 0.}
43  , fChargeSum{0., 0.}
44  , fChargeStdDev{0., 0.}
45  , fChargeAverage{0., 0.}
47  , fWidth(0.)
48  , fID(InvalidID)
50  , fPlaneID()
51  {} // Cluster::Cluster()
float fWidth
A measure of the cluster width, in homogenized units.
Definition: Cluster.h:154
static constexpr ID_t InvalidID
Value for an invalid cluster ID.
Definition: Cluster.h:171
float fMultipleHitDensity
Density of wires in the cluster with more than one hit.
Definition: Cluster.h:151
float fEndTicks[NEnds]
Definition: Cluster.h:106
Unknown view.
Definition: geo_types.h:142
float fEndCharges[NEnds]
Definition: Cluster.h:115
float fEndWires[NEnds]
Definition: Cluster.h:98
float fSigmaEndTicks[NEnds]
Definition: Cluster.h:110
float fSigmaEndWires[NEnds]
Definition: Cluster.h:102
geo::PlaneID fPlaneID
Location of the start of the cluster.
Definition: Cluster.h:163
float fChargeSum[NChargeModes]
Definition: Cluster.h:139
float fChargeAverage[NChargeModes]
Definition: Cluster.h:147
float fAngles[NEnds]
Definition: Cluster.h:125
unsigned int fNHits
Number of hits in the cluster.
Definition: Cluster.h:92
float fOpeningAngles[NEnds]
Definition: Cluster.h:132
float fChargeStdDev[NChargeModes]
Definition: Cluster.h:143
geo::View_t fView
View for this cluster.
Definition: Cluster.h:161
recob::Cluster::Cluster ( float  start_wire,
float  sigma_start_wire,
float  start_tick,
float  sigma_start_tick,
float  start_charge,
float  start_angle,
float  start_opening,
float  end_wire,
float  sigma_end_wire,
float  end_tick,
float  sigma_end_tick,
float  end_charge,
float  end_angle,
float  end_opening,
float  integral,
float  integral_stddev,
float  summedADC,
float  summedADC_stddev,
unsigned int  n_hits,
float  multiple_hit_density,
float  width,
ID_t  ID,
geo::View_t  view,
geo::PlaneID const &  plane,
SentryArgument_t  sentry = Sentry 
)

Constructor: assigns all the fields.

Parameters
start_wirewire coordinate of the start of the cluster
sigma_start_wireuncertainty on start_wire
start_ticktick coordinate of the start of the cluster
sigma_start_tickuncertainty on start_tick
start_chargecharge on the start wire
start_angleangle of the start of the cluster, in [-pi,pi]
start_openingopening angle at the start of the cluster
end_wirewire coordinate of the end of the cluster
sigma_end_wireuncertainty on end_wire
end_ticktick coordinate of the end of the cluster
sigma_end_tickuncertainty on end_tick
end_chargecharge on the end wire
end_angleangle of the end of the cluster, in [-pi,pi]
end_openingopening angle at the end of the cluster
integraltotal charge from fitted shape of hits
integral_stddevstandard deviation of hit charge from fitted shape
summedADCtotal charge from signal ADC of hits
summedADC_stddevstandard deviation of signal ADC of hits
n_hitsnumber of hits in the cluster
multiple_hit_densitydensity of wires with more than one hit
widtha measure of the cluster width
IDcluster ID
viewview for this cluster
planelocation of the start of the cluster
sentrya sentry instance

Coordinates are in homogenized units.

See the documentation of the relative data members for more details on the definition and constraints of the various constructor arguments.

Note
The sentry parameter can be optionally specified so that the compiler will realize if the number of parameters in the constructor has varied.

Definition at line 54 of file Cluster.cxx.

References ChargeAverage(), ChargeStdDev(), Cluster(), cmADC, cmFirstMode, cmFit, EndTick(), EndWire(), fAngles, fChargeAverage, fChargeStdDev, fChargeSum, fEndCharges, fEndTicks, fID, fMultipleHitDensity, fNHits, fOpeningAngles, fPlaneID, fSigmaEndTicks, fSigmaEndWires, fView, fWidth, hasPlane(), ID(), Integral(), InvalidID, NChargeModes, NHits(), operator+(), fhicl::other, Plane(), sqr(), StartTick(), StartWire(), SummedADC(), and View().

80  : fNHits(n_hits)
81  , fEndWires{start_wire, end_wire}
82  , fSigmaEndWires{sigma_start_wire, sigma_end_wire}
83  , fEndTicks{start_tick, end_tick}
84  , fSigmaEndTicks{sigma_start_tick, sigma_end_tick}
85  , fEndCharges{start_charge, end_charge}
86  , fAngles{start_angle, end_angle}
87  , fOpeningAngles{start_opening, end_opening}
88  , fChargeSum{integral, summedADC}
89  , fChargeStdDev{integral_stddev, summedADC_stddev}
90  , fChargeAverage{}
91  , fMultipleHitDensity(multiple_hit_density)
92  , fWidth(width)
93  , fID(ID)
94  , fView(view)
95  , fPlaneID(plane)
96  {
97 
98  for (unsigned int mode = cmFirstMode; mode < NChargeModes; ++mode)
99  fChargeAverage[mode] = (fNHits > 0) ? fChargeSum[mode] / fNHits : 0.;
100 
101  } // Cluster::Cluster(float...)
float fWidth
A measure of the cluster width, in homogenized units.
Definition: Cluster.h:154
float fMultipleHitDensity
Density of wires in the cluster with more than one hit.
Definition: Cluster.h:151
Just an alias for loops.
Definition: Cluster.h:85
float fEndTicks[NEnds]
Definition: Cluster.h:106
float fEndCharges[NEnds]
Definition: Cluster.h:115
float fEndWires[NEnds]
Definition: Cluster.h:98
float fSigmaEndTicks[NEnds]
Definition: Cluster.h:110
float fSigmaEndWires[NEnds]
Definition: Cluster.h:102
geo::PlaneID fPlaneID
Location of the start of the cluster.
Definition: Cluster.h:163
float fChargeSum[NChargeModes]
Definition: Cluster.h:139
float fChargeAverage[NChargeModes]
Definition: Cluster.h:147
float fAngles[NEnds]
Definition: Cluster.h:125
ID_t ID() const
Identifier of this cluster.
Definition: Cluster.h:711
unsigned int fNHits
Number of hits in the cluster.
Definition: Cluster.h:92
float fOpeningAngles[NEnds]
Definition: Cluster.h:132
float fChargeStdDev[NChargeModes]
Definition: Cluster.h:143
geo::View_t fView
View for this cluster.
Definition: Cluster.h:161
recob::Cluster::Cluster ( Cluster const &  )
default

Copy constructor: automatically generated.

recob::Cluster::Cluster ( Cluster &&  from)
inline

Move constructor: as copy, but source cluster gets an invalid ID.

Definition at line 243 of file Cluster.h.

References fID, InvalidID, and operator=().

243 : Cluster(from) { from.fID = InvalidID; }
static constexpr ID_t InvalidID
Value for an invalid cluster ID.
Definition: Cluster.h:171
Cluster()
Default constructor: an empty cluster.
Definition: Cluster.cxx:34
recob::Cluster::~Cluster ( )
default

Destructor: automatically generated.

Referenced by operator=().

Member Function Documentation

float recob::Cluster::Angle ( ClusterEnds_t  side) const
inline

Returns the angle at either end of the cluster.

Parameters
sideclStart for start, clEnd for end of the cluster
Returns
angle in radians
See also
StartAngle(), EndAngle()

The angle of the group of hits at the specified position of the cluster is returned, defined $ \alpha \in [ -\pi, \pi ]$ and so that $ \tan(\alpha) = dT/dW $ (or, more precisely, angle = atan2(dT, dW)). The elements are expressed in physical distances and therefore this represents a physical angle on the plane orthogonal to the wires in the view and containing the drift direction ("x"); the angle is 0 or $ \pi $ when lying on the wire plane, $ \pm\pi/2 $ when pointing into/from the wire plane. The angle is pointing so that increasing wire number yields positive $ dW $. This value can be result of extrapolation or average from a range of hits.

Definition at line 553 of file Cluster.h.

Referenced by cluster::ClusterMerger::AdoptEnd().

553 { return fAngles[side]; }
float fAngles[NEnds]
Definition: Cluster.h:125
float recob::Cluster::Angle ( unsigned int  side) const
inline

Returns the angle at either end of the cluster.

Parameters
sideclStart for start, clEnd for end of the cluster
Returns
angle in radians
See also
StartAngle(), EndAngle()

The angle of the group of hits at the specified position of the cluster is returned, defined $ \alpha \in [ -\pi, \pi ]$ and so that $ \tan(\alpha) = dT/dW $ (or, more precisely, angle = atan2(dT, dW)). The elements are expressed in physical distances and therefore this represents a physical angle on the plane orthogonal to the wires in the view and containing the drift direction ("x"); the angle is 0 or $ \pi $ when lying on the wire plane, $ \pm\pi/2 $ when pointing into/from the wire plane. The angle is pointing so that increasing wire number yields positive $ dW $. This value can be result of extrapolation or average from a range of hits.

Definition at line 554 of file Cluster.h.

554 { return fAngles[side]; }
float fAngles[NEnds]
Definition: Cluster.h:125
float recob::Cluster::Charge ( ChargeMode_t  mode) const
inline

Returns the total charge of the cluster.


Parameters
modecmFit to use fitted hit shape, cmADC for signal ADCs
Returns
total charge of the cluster, in ADC counts
See also
ChargeStdDev(), ChargeAverage(), SummedADC(), Integral()

The total charge is computed as the sum of the charge of all the hits. The charge of a single hit comes from the fitted hit shape (recob::Hit::Integral()) for cmFit, and signal ADC counts (recob::Hit::SummedADC()) for cmADC.

Note
Cluster class older than version 14 had a Charge() method too; the new one is not strictly equivalent, although in practice replacing the old Charge() with Charge(cmFit) should do the trick. The recommended update is to use Integral() instead.

Definition at line 655 of file Cluster.h.

655 { return fChargeSum[mode]; }
float fChargeSum[NChargeModes]
Definition: Cluster.h:139
float recob::Cluster::Charge ( unsigned int  mode) const
inline

Returns the total charge of the cluster.


Parameters
modecmFit to use fitted hit shape, cmADC for signal ADCs
Returns
total charge of the cluster, in ADC counts
See also
ChargeStdDev(), ChargeAverage(), SummedADC(), Integral()

The total charge is computed as the sum of the charge of all the hits. The charge of a single hit comes from the fitted hit shape (recob::Hit::Integral()) for cmFit, and signal ADC counts (recob::Hit::SummedADC()) for cmADC.

Note
Cluster class older than version 14 had a Charge() method too; the new one is not strictly equivalent, although in practice replacing the old Charge() with Charge(cmFit) should do the trick. The recommended update is to use Integral() instead.

Definition at line 656 of file Cluster.h.

656 { return fChargeSum[mode]; }
float fChargeSum[NChargeModes]
Definition: Cluster.h:139
float recob::Cluster::ChargeAverage ( ChargeMode_t  mode) const
inline

Returns the average charge of the cluster hits.

Returns
average of the charge of the cluster hits, in ADC counts
See also
Charge(), ChargeStdDev(), SummedADCaverage(), IntegralAverage()

The charge of a single hit comes from the fitted hit shape (recob::Hit::Integral()) for cmFit, and signal ADC counts (recob::Hit::SummedADC()) for cmADC. It should return 0 if no hit is available.

Definition at line 685 of file Cluster.h.

Referenced by Cluster().

685 { return fChargeAverage[mode]; }
float fChargeAverage[NChargeModes]
Definition: Cluster.h:147
float recob::Cluster::ChargeAverage ( unsigned int  mode) const
inline

Returns the average charge of the cluster hits.

Returns
average of the charge of the cluster hits, in ADC counts
See also
Charge(), ChargeStdDev(), SummedADCaverage(), IntegralAverage()

The charge of a single hit comes from the fitted hit shape (recob::Hit::Integral()) for cmFit, and signal ADC counts (recob::Hit::SummedADC()) for cmADC. It should return 0 if no hit is available.

Definition at line 686 of file Cluster.h.

686 { return fChargeAverage[mode]; }
float fChargeAverage[NChargeModes]
Definition: Cluster.h:147
float recob::Cluster::ChargeStdDev ( ChargeMode_t  mode) const
inline

Returns the standard deviation of charge of the cluster hits.

Returns
standard deviation of charge of the cluster hits, in ADC counts
See also
Charge(), ChargeAverage(), SummedADCstdDev(), IntegralStdDev()

The charge of a single hit comes from the fitted hit shape (recob::Hit::Integral()) for cmFit, and signal ADC counts (recob::Hit::SummedADC()) for cmADC. It should return 0 if less than two hits are available.

Definition at line 670 of file Cluster.h.

Referenced by Cluster().

670 { return fChargeStdDev[mode]; }
float fChargeStdDev[NChargeModes]
Definition: Cluster.h:143
float recob::Cluster::ChargeStdDev ( unsigned int  mode) const
inline

Returns the standard deviation of charge of the cluster hits.

Returns
standard deviation of charge of the cluster hits, in ADC counts
See also
Charge(), ChargeAverage(), SummedADCstdDev(), IntegralStdDev()

The charge of a single hit comes from the fitted hit shape (recob::Hit::Integral()) for cmFit, and signal ADC counts (recob::Hit::SummedADC()) for cmADC. It should return 0 if less than two hits are available.

Definition at line 671 of file Cluster.h.

671 { return fChargeStdDev[mode]; }
float fChargeStdDev[NChargeModes]
Definition: Cluster.h:143
float recob::Cluster::EdgeCharge ( ClusterEnds_t  side) const
inline

Returns the charge on the first or last wire of the cluster.

Parameters
sideclStart for start, clEnd for end of the cluster
Returns
charge on the requested wire in ADC counts, negative if not available
See also
StartCharge(), EndCharge()

The returned value is in unit of ADC count, although it may be fractional. This value can be result of extrapolation or average from a range of hits.

Definition at line 528 of file Cluster.h.

Referenced by cluster::ClusterMerger::AdoptEnd().

528 { return fEndCharges[side]; }
float fEndCharges[NEnds]
Definition: Cluster.h:115
float recob::Cluster::EdgeCharge ( unsigned int  side) const
inline

Returns the charge on the first or last wire of the cluster.

Parameters
sideclStart for start, clEnd for end of the cluster
Returns
charge on the requested wire in ADC counts, negative if not available
See also
StartCharge(), EndCharge()

The returned value is in unit of ADC count, although it may be fractional. This value can be result of extrapolation or average from a range of hits.

Definition at line 529 of file Cluster.h.

529 { return fEndCharges[side]; }
float fEndCharges[NEnds]
Definition: Cluster.h:115
float recob::Cluster::EndAngle ( ) const
inline

Returns the ending angle of the cluster.

Returns
angle in radians
See also
StartAngle(), Angle()

The angle of the group of hits at the end position of the cluster is returned, defined $ \alpha \in [ -\pi, \pi ]$ and so that $ \tan(\alpha) = dT/dW $ (or, more precisely, angle = atan2(dT, dW)). The elements are expressed in physical distances and therefore this represents a physical angle on the plane orthogonal to the wires in the view and containing the drift direction ("x"); the angle is 0 or $ \pi $ when lying on the wire plane, $ \pm\pi/2 $ when pointing into/from the wire plane. The angle is pointing toward the outside of the cluster (that is, $ dW $ is positive going toward the last wire). This value can be result of extrapolation or average from a range of hits.

Definition at line 504 of file Cluster.h.

References clEnd.

Referenced by trkf::CCTrackMaker::produce().

504 { return fAngles[clEnd]; }
float fAngles[NEnds]
Definition: Cluster.h:125
Represents the end, or the alternative start, of the cluster.
Definition: Cluster.h:76
float recob::Cluster::EndCharge ( ) const
inline

Returns the charge on the last wire of the cluster.

Returns
charge on the last wire in ADC counts, negative if not available
See also
StartCharge(), EdgeCharge()

The returned value is in unit of ADC count, although it may be fractional. This value can be result of extrapolation or average from a range of hits.

Definition at line 483 of file Cluster.h.

References clEnd.

Referenced by trkf::CCTrackMaker::produce().

483 { return fEndCharges[clEnd]; }
float fEndCharges[NEnds]
Definition: Cluster.h:115
Represents the end, or the alternative start, of the cluster.
Definition: Cluster.h:76
float recob::Cluster::EndOpeningAngle ( ) const
inline

Returns the opening angle at the end of the cluster.

Returns
opening angle in radians
See also
StartOpeningAngle(), OpeningAngle()

The returned value is from homogenized coordinates and in the range $[ 0, \pi ]$.

Definition at line 514 of file Cluster.h.

References clEnd.

514 { return fOpeningAngles[clEnd]; }
float fOpeningAngles[NEnds]
Definition: Cluster.h:132
Represents the end, or the alternative start, of the cluster.
Definition: Cluster.h:76
float recob::Cluster::EndTick ( ) const
inline

Returns the tick coordinate of the end of the cluster.

Returns
tick coordinate of the end of the cluster (may be fractional)
See also
StartTick(), TickCoord(), EndWire()

The "end" of the cluster is, in the more ambiguous cluster shapes, defined as an alternative cluster start. The tick coordinate is in tick units (the homogenized coordinate), but can have a fractional part describing the relative time from the previous tick.

Definition at line 331 of file Cluster.h.

References clEnd.

Referenced by Cluster(), filter::MuonFilter::filter(), shwf::ShowerReco::GetVertexAndAnglesFromCluster(), recob::operator<(), recob::operator<<(), cosmic::CosmicClusterTagger::produce(), and trkf::CCTrackMaker::produce().

331 { return fEndTicks[clEnd]; }
float fEndTicks[NEnds]
Definition: Cluster.h:106
Represents the end, or the alternative start, of the cluster.
Definition: Cluster.h:76
float recob::Cluster::EndWire ( ) const
inline

Returns the wire coordinate of the end of the cluster.


Returns
wire coordinate of the end of the cluster (may lie between wires)
See also
StartWire(), WireCoord(), EndTick()

The "end" of the cluster is, in the more ambiguous cluster shapes, defined as an alternative cluster start. The wire coordinate is in wire units (the homogenized coordinate), but can have a fractional part describing the relative distance from the previous wire.

Definition at line 318 of file Cluster.h.

References clEnd.

Referenced by cluster::ClusterMerger::Add(), Cluster(), filter::MuonFilter::filter(), shwf::ShowerReco::GetVertexAndAnglesFromCluster(), recob::operator<<(), and trkf::CCTrackMaker::produce().

318 { return fEndWires[clEnd]; }
float fEndWires[NEnds]
Definition: Cluster.h:98
Represents the end, or the alternative start, of the cluster.
Definition: Cluster.h:76
bool recob::Cluster::hasPlane ( ) const
inline

Returns whether geometry plane is valid.

Definition at line 722 of file Cluster.h.

References geo::CryostatID::isValid.

Referenced by cluster::ClusterMerger::Add(), Cluster(), and recob::operator<().

722 { return fPlaneID.isValid; }
bool isValid
Whether this ID points to a valid element.
Definition: geo_types.h:210
geo::PlaneID fPlaneID
Location of the start of the cluster.
Definition: Cluster.h:163
ID_t recob::Cluster::ID ( ) const
inline

Identifier of this cluster.

Returns
the identifier of this cluster
See also
isValid()

The identifier should be unique per event and per algorithm. An invalid cluster can be defined by having an ID Cluster::InvalidID.

Definition at line 711 of file Cluster.h.

References fID.

Referenced by cluster::ClusterMatchAlg::AppendClusterInfo(), Cluster(), isValid(), recob::operator<(), recob::operator<<(), lar_pandora::LArPandoraEventDump::PrintCluster(), shwf::ShowerFinder::produce(), and cluster::LineMerger::produce().

711 { return fID; }
float recob::Cluster::Integral ( ) const
inline

Returns the total charge of the cluster from hit shape.


Returns
total charge of the cluster from hit shape, in ADC counts
See also
IntegralStdDev(), IntegralAverage(), SummedADC(), Charge()

The total charge is computed as the sum of the charge of all the hits. The charge of a single hit includes the hit shape (fit) and is obtained by recob::Hit::Integral().

Definition at line 581 of file Cluster.h.

References cmFit.

Referenced by Cluster(), recob::operator<<(), and trkf::CCTrackMaker::produce().

581 { return fChargeSum[cmFit]; }
Sums from the fitted hit values.
Definition: Cluster.h:82
float fChargeSum[NChargeModes]
Definition: Cluster.h:139
float recob::Cluster::IntegralAverage ( ) const
inline

Returns the average charge of the cluster hits.

Returns
average of the charge of the cluster hits, in ADC counts
See also
Integral(), IntegralStdDev(), SummedADCaverage(), ChargeAverage()

The charge of a single hit includes the hit shape (fit) and is obtained by recob::Hit::Integral(). It should return 0 if no hit is available.

Definition at line 603 of file Cluster.h.

References cmFit.

603 { return fChargeAverage[cmFit]; }
Sums from the fitted hit values.
Definition: Cluster.h:82
float fChargeAverage[NChargeModes]
Definition: Cluster.h:147
float recob::Cluster::IntegralStdDev ( ) const
inline

Returns the standard deviation of the charge of the cluster hits.

Returns
standard deviation of the charge of the cluster hits, in ADC counts
See also
Integral(), IntegralAverage(), SummedADCstdDev(), ChargeStdDev()

The charge of a single hit includes the hit shape (fit) and is obtained by recob::Hit::Integral(). It should return 0 if less than two hits are available.

Definition at line 592 of file Cluster.h.

References cmFit.

592 { return fChargeStdDev[cmFit]; }
Sums from the fitted hit values.
Definition: Cluster.h:82
float fChargeStdDev[NChargeModes]
Definition: Cluster.h:143
bool recob::Cluster::isValid ( ) const
inline

Returns if the cluster is valid (that is, if its ID is not invalid)

Definition at line 725 of file Cluster.h.

References ID(), InvalidID, operator<, and operator<<.

Referenced by cluster::ClusterMerger::Add().

725 { return ID() != InvalidID; }
static constexpr ID_t InvalidID
Value for an invalid cluster ID.
Definition: Cluster.h:171
ID_t ID() const
Identifier of this cluster.
Definition: Cluster.h:711
float recob::Cluster::MultipleHitDensity ( ) const
inline

Density of wires in the cluster with more than one hit.

Returns
density of wires in the cluster with more than one hit

Returns a quantity defined as NMultiHitWires / Length, where NMultiHitWires is the number of wires which have more than just one hit amd Length is an estimation of the length of the cluster, in centimetres.

Definition at line 698 of file Cluster.h.

References fMultipleHitDensity.

698 { return fMultipleHitDensity; }
float fMultipleHitDensity
Density of wires in the cluster with more than one hit.
Definition: Cluster.h:151
unsigned int recob::Cluster::NHits ( ) const
inline

Number of hits in the cluster.

Definition at line 265 of file Cluster.h.

References fNHits.

Referenced by Cluster(), and recob::operator<<().

265 { return fNHits; }
unsigned int fNHits
Number of hits in the cluster.
Definition: Cluster.h:92
float recob::Cluster::OpeningAngle ( ClusterEnds_t  side) const
inline

Returns the opening angle at either end of the cluster.

Returns
opening angle in radians
See also
StartOpeningAngle(), EndOpeningAngle()

The returned value is from homogenized coordinates and in the range $[ 0, \pi ]$. This value can be result of extrapolation or average from a range of hits.

Definition at line 568 of file Cluster.h.

Referenced by cluster::ClusterMerger::AdoptEnd().

568 { return fOpeningAngles[side]; }
float fOpeningAngles[NEnds]
Definition: Cluster.h:132
float recob::Cluster::OpeningAngle ( unsigned int  side) const
inline

Returns the opening angle at either end of the cluster.

Returns
opening angle in radians
See also
StartOpeningAngle(), EndOpeningAngle()

The returned value is from homogenized coordinates and in the range $[ 0, \pi ]$. This value can be result of extrapolation or average from a range of hits.

Definition at line 569 of file Cluster.h.

569 { return fOpeningAngles[side]; }
float fOpeningAngles[NEnds]
Definition: Cluster.h:132
Cluster& recob::Cluster::operator= ( Cluster const &  )
default

Copy assignment: automatically generated.

Referenced by Cluster(), and operator=().

Cluster& recob::Cluster::operator= ( Cluster &&  from)
inline

Move assignment: as copy, but source cluster gets an invalid ID.

Definition at line 249 of file Cluster.h.

References InvalidID, operator=(), and ~Cluster().

250  {
251  if (&from != this) {
252  operator=(from);
253  from.fID = InvalidID;
254  }
255  return *this;
256  }
static constexpr ID_t InvalidID
Value for an invalid cluster ID.
Definition: Cluster.h:171
Cluster & operator=(Cluster const &)=default
Copy assignment: automatically generated.
geo::PlaneID recob::Cluster::Plane ( ) const
inline

Returns the plane ID this cluster lies on.

Definition at line 717 of file Cluster.h.

References fPlaneID.

Referenced by cluster::ClusterMerger::Add(), nnet::PointIdEffTest::analyze(), shower::EMShowerAlg::CheckShowerPlanes(), Cluster(), filter::MuonFilter::filter(), recob::operator<(), and recob::operator<<().

717 { return fPlaneID; }
geo::PlaneID fPlaneID
Location of the start of the cluster.
Definition: Cluster.h:163
float recob::Cluster::SigmaEndTick ( ) const
inline

Returns the uncertainty on tick coordinate of the end of the cluster.

Returns
uncertainty on tick coordinate of the end of the cluster
See also
EndTick()

The tick uncertainty is in tick units (as for EndTick()).

Definition at line 349 of file Cluster.h.

References clEnd.

349 { return fSigmaEndTicks[clEnd]; }
float fSigmaEndTicks[NEnds]
Definition: Cluster.h:110
Represents the end, or the alternative start, of the cluster.
Definition: Cluster.h:76
float recob::Cluster::SigmaEndWire ( ) const
inline

Returns the uncertainty on wire coordinate of the end of the cluster.

Returns
uncertainty on wire coordinate of the end of the cluster
See also
EndWire()

The wire uncertainty is in wire units (as for EndWire()).

Definition at line 340 of file Cluster.h.

References clEnd.

340 { return fSigmaEndWires[clEnd]; }
float fSigmaEndWires[NEnds]
Definition: Cluster.h:102
Represents the end, or the alternative start, of the cluster.
Definition: Cluster.h:76
float recob::Cluster::SigmaStartTick ( ) const
inline

Returns the uncertainty on tick coordinate of the start of the cluster.

Returns
uncertainty on tick coordinate of the start of the cluster
See also
StartTick()

The tick uncertainty is in tick units (as for StartTick()).

Definition at line 305 of file Cluster.h.

References clStart.

Referenced by shwf::ShowerReco::GetVertexAndAnglesFromCluster().

305 { return fSigmaEndTicks[clStart]; }
float fSigmaEndTicks[NEnds]
Definition: Cluster.h:110
Represents the most likely start of the cluster.
Definition: Cluster.h:75
float recob::Cluster::SigmaStartWire ( ) const
inline

Returns the uncertainty on wire coordinate of the start of the cluster.

Returns
uncertainty on wire coordinate of the start of the cluster
See also
StartWire()

The wire uncertainty is in wire units (as for StartWire()).

Definition at line 296 of file Cluster.h.

References clStart.

Referenced by shwf::ShowerReco::GetVertexAndAnglesFromCluster().

296 { return fSigmaEndWires[clStart]; }
float fSigmaEndWires[NEnds]
Definition: Cluster.h:102
Represents the most likely start of the cluster.
Definition: Cluster.h:75
float recob::Cluster::SigmaTickCoord ( ClusterEnds_t  side) const
inline

Returns the uncertainty on tick coordinate of one of the end sides of the cluster.

Parameters
sideclStart for start, clEnd for end of the cluster
Returns
uncertainty on tick coordinate of the requested end of the cluster
See also
SigmaStartTick(), SigmaEndTick(), SigmaWireCoord(), TimeCoord()

Usage of this method is similar to TimeCoord().

Definition at line 427 of file Cluster.h.

Referenced by cluster::ClusterMerger::AdoptEnd().

427 { return fSigmaEndTicks[side]; }
float fSigmaEndTicks[NEnds]
Definition: Cluster.h:110
float recob::Cluster::SigmaTickCoord ( unsigned int  side) const
inline

Returns the uncertainty on tick coordinate of one of the end sides of the cluster.

Parameters
sideclStart for start, clEnd for end of the cluster
Returns
uncertainty on tick coordinate of the requested end of the cluster
See also
SigmaStartTick(), SigmaEndTick(), SigmaWireCoord(), TimeCoord()

Usage of this method is similar to TimeCoord().

Definition at line 428 of file Cluster.h.

428 { return fSigmaEndTicks[side]; }
float fSigmaEndTicks[NEnds]
Definition: Cluster.h:110
float recob::Cluster::SigmaWireCoord ( ClusterEnds_t  side) const
inline

Returns the uncertainty on wire coordinate of one of the end sides of the cluster.

Parameters
sideclStart for start, clEnd for end of the cluster
Returns
uncertainty on wire coordinate of the requested end of the cluster
See also
SigmaStartWire(), SigmaEndWire(), SigmaTickCoord(), TimeCoord()

Usage of this method is similar to WireCoord().

Definition at line 414 of file Cluster.h.

Referenced by cluster::ClusterMerger::AdoptEnd().

414 { return fSigmaEndWires[side]; }
float fSigmaEndWires[NEnds]
Definition: Cluster.h:102
float recob::Cluster::SigmaWireCoord ( unsigned int  side) const
inline

Returns the uncertainty on wire coordinate of one of the end sides of the cluster.

Parameters
sideclStart for start, clEnd for end of the cluster
Returns
uncertainty on wire coordinate of the requested end of the cluster
See also
SigmaStartWire(), SigmaEndWire(), SigmaTickCoord(), TimeCoord()

Usage of this method is similar to WireCoord().

Definition at line 415 of file Cluster.h.

415 { return fSigmaEndWires[side]; }
float fSigmaEndWires[NEnds]
Definition: Cluster.h:102
float recob::Cluster::StartAngle ( ) const
inline

Returns the starting angle of the cluster.

Returns
angle in radians
See also
EndAngle(), Angle()

The angle of the group of hits at the start position of the cluster is returned, defined $ \alpha \in [ -\pi, \pi ]$ and so that $ \tan(\alpha) = dT/dW $ (or, more precisely, angle = atan2(dT, dW)). The elements are expressed in physical distances and therefore this represents a physical angle on the plane orthogonal to the wires in the view and containing the drift direction ("x"); the angle is 0 or $ \pi $ when lying on the wire plane, $ \pm\pi/2 $ when pointing into/from the wire plane. The angle is pointing toward the inside of the cluster (that is, $ dW $ is positive going from the first wire on). This value can be result of extrapolation or average from a range of hits.

Definition at line 461 of file Cluster.h.

References clStart.

Referenced by shwf::ShowerReco::GetVertexAndAnglesFromCluster(), trkf::SpacePts::produce(), and trkf::CCTrackMaker::produce().

461 { return fAngles[clStart]; }
Represents the most likely start of the cluster.
Definition: Cluster.h:75
float fAngles[NEnds]
Definition: Cluster.h:125
float recob::Cluster::StartCharge ( ) const
inline

Returns the charge on the first wire of the cluster.


Returns
charge on the first wire in ADC counts, negative if not available
See also
EndCharge(), EdgeCharge()

The returned value is in unit of ADC count, although it may be fractional. This value can be result of extrapolation or average from a range of hits.

Definition at line 440 of file Cluster.h.

References clStart.

Referenced by trkf::CCTrackMaker::produce().

440 { return fEndCharges[clStart]; }
float fEndCharges[NEnds]
Definition: Cluster.h:115
Represents the most likely start of the cluster.
Definition: Cluster.h:75
float recob::Cluster::StartOpeningAngle ( ) const
inline

Returns the opening angle at the start of the cluster.

Returns
opening angle in radians
See also
EndOpeningAngle(), OpeningAngle()

The returned value is from physical coordinates and in the range $[ 0, \pi ]$.

Definition at line 471 of file Cluster.h.

References clStart.

471 { return fOpeningAngles[clStart]; }
Represents the most likely start of the cluster.
Definition: Cluster.h:75
float fOpeningAngles[NEnds]
Definition: Cluster.h:132
float recob::Cluster::StartTick ( ) const
inline

Returns the tick coordinate of the start of the cluster.

Returns
tick coordinate of the start of the cluster (may br fractional)
See also
EndTick(), TickCoord(), StartWire()

The tick coordinate is in tick units (the homogenized coordinate), but can have a fractional part describing the relative time from the previous tick.

Definition at line 287 of file Cluster.h.

References clStart.

Referenced by Cluster(), filter::MuonFilter::filter(), shwf::ShowerReco::GetVertexAndAnglesFromCluster(), recob::operator<(), recob::operator<<(), cosmic::CosmicClusterTagger::produce(), trkf::SpacePts::produce(), and trkf::CCTrackMaker::produce().

287 { return fEndTicks[clStart]; }
float fEndTicks[NEnds]
Definition: Cluster.h:106
Represents the most likely start of the cluster.
Definition: Cluster.h:75
float recob::Cluster::StartWire ( ) const
inline

Returns the wire coordinate of the start of the cluster.


Returns
wire coordinate of the start of the cluster (may lie between wires)
See also
EndWire(), WireCoord(), StartTick()

The wire coordinate is in wire units (the homogenized coordinate), but can have a fractional part describing the relative distance from the previous wire.

Definition at line 276 of file Cluster.h.

References clStart.

Referenced by cluster::ClusterMerger::Add(), Cluster(), filter::MuonFilter::filter(), shwf::ShowerReco::GetVertexAndAnglesFromCluster(), recob::operator<<(), trkf::SpacePts::produce(), and trkf::CCTrackMaker::produce().

276 { return fEndWires[clStart]; }
float fEndWires[NEnds]
Definition: Cluster.h:98
Represents the most likely start of the cluster.
Definition: Cluster.h:75
float recob::Cluster::SummedADC ( ) const
inline

Returns the total charge of the cluster from signal ADC counts.


Returns
total charge of the cluster from signal ADC, in ADC counts
See also
SummedADCstdDev(), SummedADCaverage(), Integral(), Charge()

The total charge is computed as the sum of the charge of all the hits. The charge of a single hit includes the signal ADC counts and is obtained by recob::Hit::SummedADC().

Definition at line 614 of file Cluster.h.

References cmADC.

Referenced by Cluster(), and recob::operator<<().

614 { return fChargeSum[cmADC]; }
Sums directly from ADC counts.
Definition: Cluster.h:83
float fChargeSum[NChargeModes]
Definition: Cluster.h:139
float recob::Cluster::SummedADCaverage ( ) const
inline

Returns the average signal ADC counts of the cluster hits.

Returns
average of the signal of the cluster hits, in ADC counts
See also
SummedADC(), SummedADCstdDev(), IntegralAverage(), ChargeAverage()

The charge of a single hit includes the signal ADC counts and is obtained by recob::Hit::SummedADC(). It should return 0 if no hit is available.

Definition at line 636 of file Cluster.h.

References cmADC.

636 { return fChargeAverage[cmADC]; }
Sums directly from ADC counts.
Definition: Cluster.h:83
float fChargeAverage[NChargeModes]
Definition: Cluster.h:147
float recob::Cluster::SummedADCstdDev ( ) const
inline

Returns the standard deviation of the signal ADC counts of the cluster hits.

Returns
standard deviation of the signal of the cluster hits, in ADC counts
See also
SummedADC(), SummedADCaverage(), IntegralStdDev(), ChargeStdDev()

The charge of a single hit includes the signal ADC counts and is obtained by recob::Hit::SummedADC(). It should return 0 if less than two hits are available.

Definition at line 625 of file Cluster.h.

References cmADC.

625 { return fChargeStdDev[cmADC]; }
Sums directly from ADC counts.
Definition: Cluster.h:83
float fChargeStdDev[NChargeModes]
Definition: Cluster.h:143
float recob::Cluster::TickCoord ( ClusterEnds_t  side) const
inline

Returns the tick coordinate of one of the end sides of the cluster.

Parameters
sideclStart for start, clEnd for end of the cluster
Returns
tick coordinate of the requested end of the cluster (may be fractional)
See also
StartTick(), EndTick(), WireCoord()

The tick coordinate is in tick units (the homogenized coordinate), but can have a fractional part describing the relative time from the previous tick.

For algorithms not distinguishing start and end, all the ends can be tested by the loop:

for (unsigned int side = recob::Cluster::clFirstEnd;
  side < recob::Cluster::NEnds; ++side)
{
  float wire = cluster.WireCoord(side);
  float tick = cluster.TickCoord(side);
  // ...
} // for

Definition at line 401 of file Cluster.h.

Referenced by cluster::ClusterMerger::AdoptEnd().

401 { return fEndTicks[side]; }
float fEndTicks[NEnds]
Definition: Cluster.h:106
float recob::Cluster::TickCoord ( unsigned int  side) const
inline

Returns the tick coordinate of one of the end sides of the cluster.

Parameters
sideclStart for start, clEnd for end of the cluster
Returns
tick coordinate of the requested end of the cluster (may be fractional)
See also
StartTick(), EndTick(), WireCoord()

The tick coordinate is in tick units (the homogenized coordinate), but can have a fractional part describing the relative time from the previous tick.

For algorithms not distinguishing start and end, all the ends can be tested by the loop:

for (unsigned int side = recob::Cluster::clFirstEnd;
  side < recob::Cluster::NEnds; ++side)
{
  float wire = cluster.WireCoord(side);
  float tick = cluster.TickCoord(side);
  // ...
} // for

Definition at line 402 of file Cluster.h.

402 { return fEndTicks[side]; }
float fEndTicks[NEnds]
Definition: Cluster.h:106
float recob::Cluster::Width ( ) const
inline

A measure of the cluster width, in homogenized units.

Definition at line 701 of file Cluster.h.

References fWidth.

Referenced by cluster::ClusterMerger::Add(), and recob::operator<<().

701 { return fWidth; }
float fWidth
A measure of the cluster width, in homogenized units.
Definition: Cluster.h:154
float recob::Cluster::WireCoord ( ClusterEnds_t  side) const
inline

Returns the wire coordinate of one of the end sides of the cluster.


Parameters
sideclStart for start, clEnd for end of the cluster
Returns
wire coordinate of the requested end of the cluster (may lie between wires)
See also
StartWire(), EndWire(), TickCoord()

The wire coordinate is in wire units (the homogenized coordinate), but can have a fractional part describing the relative distance from the previous wire.

For algorithms not distinguishing start and end, all the ends can be tested by the loop:

for (unsigned int side = recob::Cluster::clFirstEnd;
  side < recob::Cluster::NEnds; ++side)
{
  float wire = cluster.WireCoord(side);
  float tick = cluster.TickCoord(side);
  // ...
} // for

Definition at line 374 of file Cluster.h.

Referenced by cluster::ClusterMerger::AdoptEnd().

374 { return fEndWires[side]; }
float fEndWires[NEnds]
Definition: Cluster.h:98
float recob::Cluster::WireCoord ( unsigned int  side) const
inline

Number of hits in the cluster.

Definition at line 375 of file Cluster.h.

375 { return fEndWires[side]; }
float fEndWires[NEnds]
Definition: Cluster.h:98

Friends And Related Function Documentation

bool operator< ( Cluster const &  a,
Cluster const &  b 
)
friend

Definition at line 188 of file Cluster.cxx.

Referenced by isValid().

189  {
190 
191  if (a.hasPlane() && b.hasPlane() && a.Plane() != b.Plane()) return a.Plane() < b.Plane();
192  if (a.View() != b.View()) return a.View() < b.View();
193  if (a.ID() != b.ID()) return a.ID() < b.ID();
194  if (a.StartTick() != b.StartTick()) return a.StartTick() < b.StartTick();
195  if (a.EndTick() != b.EndTick()) return a.EndTick() < b.EndTick();
196 
197  return false; // they are equal enough
198  } // operator < (Cluster, Cluster)
std::ostream& operator<< ( std::ostream &  o,
Cluster const &  c 
)
friend

Definition at line 168 of file Cluster.cxx.

Referenced by isValid().

169  {
170  o << std::setiosflags(std::ios::fixed) << std::setprecision(2);
171  o << "Cluster ID " << std::setw(5) << std::right << c.ID() << " : Cryo = " << std::setw(3)
172  << std::right << c.Plane().Cryostat << " TPC = " << std::setw(3) << std::right
173  << c.Plane().TPC << " Plane = " << std::setw(3) << std::right << c.Plane().Plane
174  << " View = " << std::setw(3) << std::right << c.View() << " StartWire = " << std::setw(7)
175  << std::right << c.StartWire() << " EndWire = " << std::setw(7) << std::right << c.EndWire()
176  << " StartTime = " << std::setw(9) << std::right << c.StartTick()
177  << " EndTime = " << std::setw(9) << std::right << c.EndTick()
178  << " N hits = " << std::setw(5) << std::right << c.NHits()
179  << " Width = " << std::setw(5) << std::right << c.Width()
180  << " Charge(fit) = " << std::setw(10) << std::right << c.Integral()
181  << " Charge(ADC) = " << std::setw(10) << std::right << c.SummedADC();
182  return o;
183  } // operator<< (ostream, Cluster)
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:102

Member Data Documentation

float recob::Cluster::fAngles[NEnds]
private

Angle of the start and end of the cluster, defined in [-pi,pi] and so that tan(angle) = dT/dW (or, more precisely, angle = atan2(dT, dW)). The elements are expressed in physical distances and therefore this represents a physical angle on the plane orthogonal to the wires in the view and containing the drift direction ("x"); the angle is 0 or $ \pi $ when lying on the wire plane, $ \pm\pi/2 $ when pointing into/from the wire plane. Index is intended to be of type ClusterEnds_t.

Definition at line 125 of file Cluster.h.

Referenced by Cluster().

float recob::Cluster::fChargeAverage[NChargeModes]
private

Standard deviation of the charge of hits. Index is intended to be of type ChargeMode_t Average of the charge of all hits in the cluster (fChargeSum/NHits()). Index is intended to be of type ChargeMode_t

Definition at line 147 of file Cluster.h.

Referenced by Cluster().

float recob::Cluster::fChargeStdDev[NChargeModes]
private

Standard deviation of the charge of hits. Index is intended to be of type ChargeMode_t Average of the charge of all hits in the cluster (fChargeSum/NHits()). Index is intended to be of type ChargeMode_t

Definition at line 143 of file Cluster.h.

Referenced by Cluster().

float recob::Cluster::fChargeSum[NChargeModes]
private

Standard deviation of the charge of hits. Index is intended to be of type ChargeMode_t Average of the charge of all hits in the cluster (fChargeSum/NHits()). Index is intended to be of type ChargeMode_t

Definition at line 139 of file Cluster.h.

Referenced by Cluster().

float recob::Cluster::fEndCharges[NEnds]
private

Charge on the start and end wire of the cluster. This value can be result of extrapolation or average from a range of hits. index is intended to be of type ClusterEnds_t.

Definition at line 115 of file Cluster.h.

Referenced by Cluster().

float recob::Cluster::fEndTicks[NEnds]
private

Tick coordinate of the start and end of the cluster (may be set between ticks); index is intended to be of type ClusterEnds_t.

Definition at line 106 of file Cluster.h.

Referenced by Cluster().

float recob::Cluster::fEndWires[NEnds]
private

Uncertainty on wire coordinate of the start and end of the cluster; index is intended to be of type ClusterEnds_t.

Definition at line 98 of file Cluster.h.

ID_t recob::Cluster::fID
private

Identifier of this cluster. It should be unique per event and per algorithm. An invalid cluster can be defined by having an ID Cluster::InvalidID.

Definition at line 159 of file Cluster.h.

Referenced by Cluster(), and ID().

float recob::Cluster::fMultipleHitDensity
private

Density of wires in the cluster with more than one hit.

Definition at line 151 of file Cluster.h.

Referenced by Cluster(), and MultipleHitDensity().

unsigned int recob::Cluster::fNHits
private

Number of hits in the cluster.

Definition at line 92 of file Cluster.h.

Referenced by Cluster(), and NHits().

float recob::Cluster::fOpeningAngles[NEnds]
private

Opening angle of the cluster shape at the start and end of the cluster. The coordinates are expressed in physical distances and therefore this represents a physical opening angle on the plane orthogonal to the wires in the view and containing the drift direction ("x"). Index is intended to be of type ClusterEnds_t.

Definition at line 132 of file Cluster.h.

Referenced by Cluster().

geo::PlaneID recob::Cluster::fPlaneID
private

Location of the start of the cluster.

Definition at line 163 of file Cluster.h.

Referenced by Cluster(), and Plane().

float recob::Cluster::fSigmaEndTicks[NEnds]
private

Uncertainty on tick coordinate of the start and end of the cluster; index is intended to be of type ClusterEnds_t.

Definition at line 110 of file Cluster.h.

Referenced by Cluster().

float recob::Cluster::fSigmaEndWires[NEnds]
private

Uncertainty on wire coordinate of the start and end of the cluster; index is intended to be of type ClusterEnds_t.

Definition at line 102 of file Cluster.h.

Referenced by Cluster().

geo::View_t recob::Cluster::fView
private

View for this cluster.

Definition at line 161 of file Cluster.h.

Referenced by Cluster(), and View().

float recob::Cluster::fWidth
private

A measure of the cluster width, in homogenized units.

Definition at line 154 of file Cluster.h.

Referenced by Cluster(), and Width().

constexpr ID_t recob::Cluster::InvalidID = -1
static

Value for an invalid cluster ID.

Definition at line 171 of file Cluster.h.

Referenced by Cluster(), isValid(), and operator=().


The documentation for this class was generated from the following files: