LArSoft
v07_13_02
Liquid Argon Software toolkit - http://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... | |
virtual void | Clear () override |
Restores the class to post-configuration, pre-initialization state. More... | |
virtual void | SetHits (std::vector< recob::Hit const * > const &hits) override |
Sets the list of input hits. More... | |
virtual void | SetHits (std::vector< recob::Hit > const &hits) override |
Sets the list of input hits. More... | |
virtual void | SetVerbose (int level=1) override |
Set the verbosity level. More... | |
virtual size_t | NHits () override |
Returns the number of hits in the cluster. More... | |
virtual float | MultipleHitDensity () override |
Fraction of wires in the cluster with more than one hit. More... | |
virtual float | Width () override |
Computes the width of the cluster. More... | |
size_t | NInputHits () const |
Returns the number of input hits. More... | |
virtual Measure_t | StartCharge () override |
Computes the charge on the first and last wire of the track. More... | |
virtual Measure_t | EndCharge () override |
Computes the charge on the first and last wire of the track. More... | |
virtual Measure_t | StartAngle () override |
Computes the angle of the cluster. More... | |
virtual Measure_t | EndAngle () override |
Computes the angle of the cluster. More... | |
virtual Measure_t | StartOpeningAngle () override |
Computes the opening angle at the start or end of the cluster. More... | |
virtual Measure_t | EndOpeningAngle () override |
Computes the opening angle at the start or end of the cluster. More... | |
Cluster charge | |
virtual Measure_t | Integral () override |
Computes the total charge of the cluster from Hit::Integral() More... | |
virtual Measure_t | IntegralStdDev () override |
Computes the standard deviation on the charge of the cluster hits. More... | |
virtual Measure_t | SummedADC () override |
Computes the total charge of the cluster from Hit::SummedADC() More... | |
virtual 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 36 of file StandardClusterParamsAlg.h.
Definition at line 38 of file StandardClusterParamsAlg.h.
cluster::StandardClusterParamsAlg::StandardClusterParamsAlg | ( | ) |
Constructor.
Definition at line 23 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 36 of file StandardClusterParamsAlg.cxx.
References algo, cluster::ClusterParamsAlg::Initialize(), and SetHits().
Referenced by SetHits().
|
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 84 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 62 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 105 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 118 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 131 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 181 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 170 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 204 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 243 of file ClusterParamsAlgBase.h.
|
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 43 of file StandardClusterParamsAlg.cxx.
References algo, Clear(), cluster::ClusterParamsAlg::SetHits(), and util::PxHitConverter::ToPxHitVector().
Referenced by Clear().
|
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 71 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 |
Set the verbosity level.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 29 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 71 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 53 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 92 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 144 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 158 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 193 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 198 of file StandardClusterParamsAlg.h.
Referenced by Clear(), EndCharge(), EndOpeningAngle(), Integral(), IntegralStdDev(), MultipleHitDensity(), NHits(), NInputHits(), SetHits(), SetVerbose(), StartAngle(), StartCharge(), StartOpeningAngle(), SummedADC(), SummedADCStdDev(), and Width().
|
protectedinherited |
verbosity level: 0 is normal, negative is even quieter
Definition at line 241 of file ClusterParamsAlgBase.h.