Class merging clusters: recomputes start and end position and hit list. More...
Public Types | |
using | HitPtr_t = art::Ptr< recob::Hit > |
type of pointer to hits More... | |
using | HitVector_t = std::vector< HitPtr_t > |
vector of pointers to hits More... | |
Public Types inherited from cluster::ClusterMerger | |
using | HitPtr_t = art::Ptr< recob::Hit > |
type of pointer to hits More... | |
using | HitVector_t = std::vector< HitPtr_t > |
vector of pointers to hits More... | |
using | ID_t = recob::Cluster::ID_t |
Type of cluster ID. More... | |
using | ClusterEnds_t = recob::Cluster::ClusterEnds_t |
Public Member Functions | |
ClusterAndHitMerger ()=default | |
ClusterAndHitMerger (recob::Cluster const &cluster, HitVector_t const &cluster_hits) | |
bool | Add (recob::Cluster const &cluster, HitVector_t const &cluster_hits, bool prepend=false) |
Merges a single cluster into this object. More... | |
Accessors | |
HitVector_t const & | Hits () const |
Returns a constant reference to the current list of hits. More... | |
unsigned int | NHits () const |
Number of hits in the cluster. More... | |
Public Member Functions inherited from cluster::ClusterMerger | |
ClusterMerger ()=default | |
ClusterMerger (recob::Cluster const &cluster) | |
bool | Add (recob::Cluster const &cluster) |
Merges a single cluster into this object. 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 |
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 | TickCoord (ClusterEnds_t 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 | SigmaTickCoord (ClusterEnds_t side) const |
Returns the uncertainty on tick coordinate of one of the end sides of the cluster. 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 | EdgeCharge (ClusterEnds_t 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 | OpeningAngle (ClusterEnds_t side) const |
Returns the opening angle at either end of the cluster. More... | |
float | Width () const |
A measure of the cluster width, in homogenized units. 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... | |
Protected Member Functions | |
void | AddHits (HitVector_t const &cluster_hits, bool prepend) |
Protected Member Functions inherited from cluster::ClusterMerger | |
void | AdoptEnd (recob::Cluster const &cluster, ClusterEnds_t iEnd) |
Imports all the member of the corresponding end. More... | |
Protected Attributes | |
HitVector_t | hits |
hits in the cluster More... | |
Protected Attributes inherited from cluster::ClusterMerger | |
float | fEndWires [ClusterEnds_t::NEnds] |
Data referring to start and end of the cluster. More... | |
float | fSigmaEndWires [ClusterEnds_t::NEnds] |
Uncertainty on wire coordinate of the start and end of the cluster. More... | |
float | fEndTicks [ClusterEnds_t::NEnds] |
Tick coordinate of the start and end of the cluster. More... | |
float | fSigmaEndTicks [ClusterEnds_t::NEnds] |
Uncertainty on tick coordinate of the start and end of the cluster. More... | |
float | fEndCharges [ClusterEnds_t::NEnds] |
Charge on the start and end wire of the cluster. More... | |
float | fAngles [ClusterEnds_t::NEnds] |
Angle of the start and end of the cluster, defined in [-pi,pi]. More... | |
float | fOpeningAngles [ClusterEnds_t::NEnds] |
Opening angle of the cluster shape at the start and end of the cluster. More... | |
float | fWidth |
A measure of the cluster width, in homogenized units. More... | |
geo::View_t | fView |
View for this cluster. More... | |
geo::PlaneID | fPlaneID |
Location of the start of the cluster. More... | |
unsigned int | n_clusters = 0 |
number of clusters added so far More... | |
Class merging clusters: recomputes start and end position and hit list.
Definition at line 394 of file LineMerger_module.cc.
using cluster::ClusterAndHitMerger::HitPtr_t = art::Ptr<recob::Hit> |
type of pointer to hits
Definition at line 399 of file LineMerger_module.cc.
using cluster::ClusterAndHitMerger::HitVector_t = std::vector<HitPtr_t> |
vector of pointers to hits
Definition at line 400 of file LineMerger_module.cc.
|
default |
|
inline |
Definition at line 404 of file LineMerger_module.cc.
bool cluster::ClusterAndHitMerger::Add | ( | recob::Cluster const & | cluster, |
HitVector_t const & | cluster_hits, | ||
bool | prepend = false |
||
) |
Merges a single cluster into this object.
cluster | the cluster to be merged |
cluster_hits | the list of hits in this cluster |
prepend | if true, hits are inserted at the beginning of the list |
The two ends of the cluster are merged into this one, that gets extended. Hit lists are merged too: no check on existing hits nor double addition.
Note that this code is crap unless the cluster is track-like.
Definition at line 455 of file LineMerger_module.cc.
|
inlineprotected |
Definition at line 447 of file LineMerger_module.cc.
|
inline |
Returns a constant reference to the current list of hits.
Definition at line 429 of file LineMerger_module.cc.
|
inline |
Number of hits in the cluster.
Definition at line 436 of file LineMerger_module.cc.
|
protected |
hits in the cluster
Definition at line 444 of file LineMerger_module.cc.