LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Algorithm class inheriting cluster parameters. More...
#include "LazyClusterParamsAlg.h"
Public Types | |
using | Measure_t = ClusterParamsAlgBase::Measure_t |
Public Member Functions | |
LazyClusterParamsAlg (cluster_params const &new_params) | |
Constructor: references to the parameters (no copy is performed!) More... | |
void | Clear () override |
Restores the class to post-configuration, pre-initialization state; dummy. More... | |
void | SetHitsFromPointers (util::GeometryUtilities const &, std::vector< recob::Hit const * > const &) override |
Sets the list of input hits. 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 &) override |
Computes the width of the cluster. More... | |
cluster_params const & | GetParams () const |
Returns the original precomputed parameters. More... | |
virtual void | SetHits (util::GeometryUtilities const &gser, std::vector< recob::Hit > const &hits) |
Sets the list of input hits. More... | |
virtual void | SetVerbose (int level=1) |
Set the verbosity level. 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 | |
cluster_params const & | params |
the parameters, already computed More... | |
int | verbose = 0 |
verbosity level: 0 is normal, negative is even quieter More... | |
Algorithm class inheriting cluster parameters.
This class wraps ClusterParamsAlg class, designed in the context of shower reconstruction, to expose a standard ClusterParamsBaseAlg interface. All the information is supposed to have been computed already.
In addition to the standard interface, GetParams() is also available.
Definition at line 38 of file LazyClusterParamsAlg.h.
Definition at line 40 of file LazyClusterParamsAlg.h.
|
inline |
Constructor: references to the parameters (no copy is performed!)
Definition at line 43 of file LazyClusterParamsAlg.h.
|
inlineoverridevirtual |
Restores the class to post-configuration, pre-initialization state; dummy.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 46 of file LazyClusterParamsAlg.h.
|
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 42 of file LazyClusterParamsAlg.cxx.
References StartAngle().
Referenced by cluster::ClusterMergeHelper::AppendResult().
|
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 29 of file LazyClusterParamsAlg.cxx.
References cluster::cluster_params::end_charge, and params.
Referenced by cluster::ClusterMergeHelper::AppendResult().
|
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 54 of file LazyClusterParamsAlg.cxx.
References cluster::cluster_params::closing_angle_charge_wgt, and params.
Referenced by cluster::ClusterMergeHelper::AppendResult().
|
inline |
Returns the original precomputed parameters.
Definition at line 172 of file LazyClusterParamsAlg.h.
|
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 60 of file LazyClusterParamsAlg.cxx.
References params, and cluster::cluster_params::sum_charge.
Referenced by cluster::ClusterMergeHelper::AppendResult().
|
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 66 of file LazyClusterParamsAlg.cxx.
References params, and cluster::cluster_params::rms_charge.
Referenced by cluster::ClusterMergeHelper::AppendResult().
|
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 91 of file LazyClusterParamsAlg.cxx.
References cluster::cluster_params::multi_hit_wires, cluster::cluster_params::N_Wires, and params.
Referenced by cluster::ClusterMergeHelper::AppendResult().
|
overridevirtual |
Returns the number of hits in the cluster.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 85 of file LazyClusterParamsAlg.cxx.
References cluster::cluster_params::N_Hits, and params.
Referenced by cluster::ClusterMergeHelper::AppendResult().
|
inlinestaticprotectedinherited |
Definition at line 242 of file ClusterParamsAlgBase.h.
|
inlinevirtualinherited |
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) |
The same general directions apply as for SetHits() version with pointers. This version takes a list of recob::Hit, rather than their pointers. It can simplify upstream handling when the original list is not recob::Hit and creation of temporary recob::Hit is needed. In that case, managing to obtain pointers to these temporary objects can be inefficient.
The default implementation provided here is not efficient either, since it just creates an additional vector of recob::Hit pointers and uses it. If an implementation is concerned with efficiency, it can reimplement this to initialize the algorithm in a more direct way.
Reimplemented in cluster::OverriddenClusterParamsAlg< AlgoBase >, and cluster::StandardClusterParamsAlg.
Definition at line 138 of file ClusterParamsAlgBase.h.
Referenced by cluster::StandardClusterParamsAlg::SetHits().
|
inlineoverridevirtual |
Sets the list of input hits.
hits | list of hits |
undefined | in case of error, this method can throw (anything) |
The parameters have already been computed. This function is dummy.
Implements cluster::ClusterParamsAlgBase.
Definition at line 56 of file LazyClusterParamsAlg.h.
|
inlinevirtualinherited |
Set the verbosity level.
Reimplemented in cluster::OverriddenClusterParamsAlg< AlgoBase >, and cluster::StandardClusterParamsAlg.
Definition at line 150 of file ClusterParamsAlgBase.h.
Referenced by cluster::StandardClusterParamsAlg::SetVerbose(), and cluster::OverriddenClusterParamsAlg< AlgoBase >::SetVerbose().
|
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 36 of file LazyClusterParamsAlg.cxx.
References cluster::cluster_params::cluster_angle_2d, util::DegreesToRadians(), and params.
Referenced by cluster::ClusterMergeHelper::AppendResult(), and EndAngle().
|
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 22 of file LazyClusterParamsAlg.cxx.
References params, and cluster::cluster_params::start_charge.
Referenced by cluster::ClusterMergeHelper::AppendResult().
|
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 48 of file LazyClusterParamsAlg.cxx.
References cluster::cluster_params::opening_angle_charge_wgt, and params.
Referenced by cluster::ClusterMergeHelper::AppendResult().
|
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 72 of file LazyClusterParamsAlg.cxx.
References params, and cluster::cluster_params::sum_ADC.
Referenced by cluster::ClusterMergeHelper::AppendResult().
|
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 79 of file LazyClusterParamsAlg.cxx.
References params, and cluster::cluster_params::rms_ADC.
Referenced by cluster::ClusterMergeHelper::AppendResult().
|
overridevirtual |
Computes the width of the cluster.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 97 of file LazyClusterParamsAlg.cxx.
References params, and cluster::cluster_params::width.
Referenced by cluster::ClusterMergeHelper::AppendResult().
|
protected |
the parameters, already computed
Definition at line 175 of file LazyClusterParamsAlg.h.
Referenced by EndCharge(), EndOpeningAngle(), Integral(), IntegralStdDev(), MultipleHitDensity(), NHits(), 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.