LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Algorithm collection class computing cluster parameters. More...
#include "StandardClusterParamsAlg.h"
Public Types | |
using | Measure_t = ClusterParamsAlgBase::Measure_t |
Public Member Functions | |
StandardClusterParamsAlg () | |
Constructor. More... | |
virtual | ~StandardClusterParamsAlg ()=default |
Destructor. More... | |
void | Clear () override |
Restores the class to post-configuration, pre-initialization state. More... | |
void | SetHitsFromPointers (util::GeometryUtilities const &gser, std::vector< recob::Hit const * > const &hits) override |
Sets the list of input hits. More... | |
void | SetHits (util::GeometryUtilities const &gser, std::vector< recob::Hit > const &hits) override |
Sets the list of input hits. More... | |
void | SetVerbose (int level=1) override |
Set the verbosity level. More... | |
size_t | NHits () override |
Returns the number of hits in the cluster. More... | |
float | MultipleHitDensity () override |
Fraction of wires in the cluster with more than one hit. More... | |
float | Width (util::GeometryUtilities const &gser) override |
Computes the width of the cluster. More... | |
size_t | NInputHits () const |
Returns the number of input hits. More... | |
Measure_t | StartCharge (util::GeometryUtilities const &gser) override |
Computes the charge on the first and last wire of the track. More... | |
Measure_t | EndCharge (util::GeometryUtilities const &gser) override |
Computes the charge on the first and last wire of the track. More... | |
Measure_t | StartAngle () override |
Computes the angle of the cluster. More... | |
Measure_t | EndAngle () override |
Computes the angle of the cluster. More... | |
Measure_t | StartOpeningAngle () override |
Computes the opening angle at the start or end of the cluster. More... | |
Measure_t | EndOpeningAngle () override |
Computes the opening angle at the start or end of the cluster. More... | |
Cluster charge | |
Measure_t | Integral () override |
Computes the total charge of the cluster from Hit::Integral() More... | |
Measure_t | IntegralStdDev () override |
Computes the standard deviation on the charge of the cluster hits. More... | |
Measure_t | SummedADC () override |
Computes the total charge of the cluster from Hit::SummedADC() More... | |
Measure_t | SummedADCStdDev () override |
Computes the standard deviation on the charge of the cluster hits. More... | |
Static Protected Member Functions | |
static std::logic_error | NotImplemented (std::string function_name) |
Protected Attributes | |
ClusterParamsAlg | algo |
the actual algorithm class More... | |
int | verbose = 0 |
verbosity level: 0 is normal, negative is even quieter More... | |
Algorithm collection class computing cluster parameters.
This class wraps ClusterParamsAlg class, designed in the context of shower reconstruction, to expose a standard ClusterParamsBaseAlg interface.
Definition at line 34 of file StandardClusterParamsAlg.h.
Definition at line 36 of file StandardClusterParamsAlg.h.
cluster::StandardClusterParamsAlg::StandardClusterParamsAlg | ( | ) |
Constructor.
Definition at line 20 of file StandardClusterParamsAlg.cxx.
References SetVerbose().
|
virtualdefault |
Destructor.
|
overridevirtual |
Restores the class to post-configuration, pre-initialization state.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 33 of file StandardClusterParamsAlg.cxx.
References algo, and cluster::ClusterParamsAlg::Initialize().
Referenced by SetHitsFromPointers().
|
overridevirtual |
Computes the angle of the cluster.
Uses the coordinates from the hits, weighted by charge (Hit::Integral()) to compute a slope in the homogenized wire x time space. The homogenized space has both wires and ticks converted into a distance (by using detector parameters: wire pitch and drift velocity).
The angle is in the range, with 0 corresponding to a cluster parallel to the wire plane and to a cluster orthogonal to the wire plane, going farther from it.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 74 of file StandardClusterParamsAlg.cxx.
References StartAngle().
Referenced by SetHits().
|
overridevirtual |
Computes the charge on the first and last wire of the track.
The implementation in ClusterParamsAlg provides an estimation of the charge collected in the first or last 1 cm of the cluster, using a linear fit on the deposited charge to reduce fluctuations.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 57 of file StandardClusterParamsAlg.cxx.
References algo, cluster::ClusterParamsAlg::EndCharge(), and NInputHits().
Referenced by SetHits().
|
overridevirtual |
Computes the opening angle at the start or end of the cluster.
This algorithm returns an opening angle after weighting the hits by their charge (as defined bu Hit::Integral());
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 89 of file StandardClusterParamsAlg.cxx.
References algo, cluster::cluster_params::closing_angle_charge_wgt, cluster::ClusterParamsAlg::GetParams(), NInputHits(), and cluster::ClusterParamsAlg::RefineDirection().
Referenced by SetHits().
|
overridevirtual |
Computes the total charge of the cluster from Hit::Integral()
ClusterParamsAlg computes the sum from all hits.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 98 of file StandardClusterParamsAlg.cxx.
References algo, cluster::ClusterParamsAlg::GetAverages(), cluster::ClusterParamsAlg::GetParams(), NInputHits(), and cluster::cluster_params::sum_charge.
Referenced by SetHits().
|
overridevirtual |
Computes the standard deviation on the charge of the cluster hits.
ClusterParamsAlg computes the standard deviation of the sample of charges from all hits. Hit charge is obtained by recob::Hit::Integral().
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 107 of file StandardClusterParamsAlg.cxx.
References algo, cluster::ClusterParamsAlg::GetAverages(), cluster::ClusterParamsAlg::GetParams(), NInputHits(), and cluster::cluster_params::rms_charge.
Referenced by SetHits().
|
overridevirtual |
Fraction of wires in the cluster with more than one hit.
Returns a quantity defined as NMultiHitWires / NWires, where NWires is the number of wires hosting at least one hit of this cluster, and NMultiHitWires is the number of wires which have more than just one hit.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 145 of file StandardClusterParamsAlg.cxx.
References algo, cluster::ClusterParamsAlg::GetAverages(), cluster::ClusterParamsAlg::GetParams(), cluster::cluster_params::multi_hit_wires, cluster::cluster_params::N_Wires, and NInputHits().
Referenced by SetHits().
|
overridevirtual |
Returns the number of hits in the cluster.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 136 of file StandardClusterParamsAlg.cxx.
References algo, cluster::ClusterParamsAlg::GetAverages(), cluster::ClusterParamsAlg::GetParams(), cluster::cluster_params::N_Hits, and NInputHits().
Referenced by SetHits().
size_t cluster::StandardClusterParamsAlg::NInputHits | ( | ) | const |
Returns the number of input hits.
Definition at line 164 of file StandardClusterParamsAlg.cxx.
References algo, and cluster::ClusterParamsAlg::GetNHits().
Referenced by EndCharge(), EndOpeningAngle(), Integral(), IntegralStdDev(), MultipleHitDensity(), NHits(), SetHits(), StartAngle(), StartCharge(), StartOpeningAngle(), SummedADC(), SummedADCStdDev(), and Width().
|
inlinestaticprotectedinherited |
Definition at line 242 of file ClusterParamsAlgBase.h.
|
inlineoverridevirtual |
Sets the list of input hits.
hits | list of hits (hits will not be modified) |
undefined | in case of error, this method can throw (anything) |
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 67 of file StandardClusterParamsAlg.h.
References EndAngle(), EndCharge(), EndOpeningAngle(), Integral(), IntegralStdDev(), MultipleHitDensity(), NHits(), NInputHits(), cluster::ClusterParamsAlgBase::SetHits(), SetVerbose(), StartAngle(), StartCharge(), StartOpeningAngle(), SummedADC(), SummedADCStdDev(), and Width().
|
overridevirtual |
Sets the list of input hits.
hits | list of hits |
undefined | in case of error, this method can throw (anything) |
Hits are translated into our own internal format. The original hits are not used afterward, and their distruction will not affect this object. This method calls Clear() at the beginning (although the protocol does not requires it).
Implements cluster::ClusterParamsAlgBase.
Definition at line 39 of file StandardClusterParamsAlg.cxx.
References algo, Clear(), and cluster::ClusterParamsAlg::SetHits().
|
overridevirtual |
Set the verbosity level.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 26 of file StandardClusterParamsAlg.cxx.
References algo, cluster::ClusterParamsAlg::SetVerbose(), and cluster::ClusterParamsAlgBase::SetVerbose().
Referenced by SetHits(), and StandardClusterParamsAlg().
|
overridevirtual |
Computes the angle of the cluster.
Uses the coordinates from the hits, weighted by charge (Hit::Integral()) to compute a slope in the homogenized wire x time space. The homogenized space has both wires and ticks converted into a distance (by using detector parameters: wire pitch and drift velocity).
The angle is in the range, with 0 corresponding to a cluster parallel to the wire plane and to a cluster orthogonal to the wire plane, going farther from it.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 65 of file StandardClusterParamsAlg.cxx.
References algo, cluster::cluster_params::cluster_angle_2d, util::DegreesToRadians(), cluster::ClusterParamsAlg::GetParams(), cluster::ClusterParamsAlg::GetRoughAxis(), and NInputHits().
Referenced by EndAngle(), and SetHits().
|
overridevirtual |
Computes the charge on the first and last wire of the track.
The implementation in ClusterParamsAlg provides an estimation of the charge collected in the first or last 1 cm of the cluster, using a linear fit on the deposited charge to reduce fluctuations.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 49 of file StandardClusterParamsAlg.cxx.
References algo, NInputHits(), and cluster::ClusterParamsAlg::StartCharge().
Referenced by SetHits().
|
overridevirtual |
Computes the opening angle at the start or end of the cluster.
This algorithm returns an opening angle after weighting the hits by their charge (as defined bu Hit::Integral());
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 80 of file StandardClusterParamsAlg.cxx.
References algo, cluster::ClusterParamsAlg::GetParams(), NInputHits(), cluster::cluster_params::opening_angle_charge_wgt, and cluster::ClusterParamsAlg::RefineDirection().
Referenced by SetHits().
|
overridevirtual |
Computes the total charge of the cluster from Hit::SummedADC()
ClusterParamsAlg computes the sum from all hits.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 116 of file StandardClusterParamsAlg.cxx.
References algo, cluster::ClusterParamsAlg::GetAverages(), cluster::ClusterParamsAlg::GetParams(), NInputHits(), and cluster::cluster_params::sum_ADC.
Referenced by SetHits().
|
overridevirtual |
Computes the standard deviation on the charge of the cluster hits.
ClusterParamsAlg computes the standard deviation of the sample of charges from all hits. Hit charge is obtained by recob::Hit::SummedADC().
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 127 of file StandardClusterParamsAlg.cxx.
References algo, cluster::ClusterParamsAlg::GetAverages(), cluster::ClusterParamsAlg::GetParams(), NInputHits(), and cluster::cluster_params::rms_ADC.
Referenced by SetHits().
|
overridevirtual |
Computes the width of the cluster.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 155 of file StandardClusterParamsAlg.cxx.
References algo, cluster::ClusterParamsAlg::GetParams(), cluster::ClusterParamsAlg::GetProfileInfo(), NInputHits(), and cluster::cluster_params::width.
Referenced by SetHits().
|
protected |
the actual algorithm class
Definition at line 190 of file StandardClusterParamsAlg.h.
Referenced by Clear(), EndCharge(), EndOpeningAngle(), Integral(), IntegralStdDev(), MultipleHitDensity(), NHits(), NInputHits(), SetHitsFromPointers(), SetVerbose(), StartAngle(), StartCharge(), StartOpeningAngle(), SummedADC(), SummedADCStdDev(), and Width().
|
protectedinherited |
verbosity level: 0 is normal, negative is even quieter
Definition at line 240 of file ClusterParamsAlgBase.h.