LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Algorithm collection class computing cluster parameters. More...
#include "OverriddenClusterParamsAlg.h"
Public Types | |
enum | ParameterType_t { cpStartAngle, cpEndAngle, cpStartCharge, cpEndCharge, cpStartOpeningAngle, cpEndOpeningAngle, cpIntegral, cpIntegralStdDev, cpSummedADC, cpSummedADCStdDev, cpNHits, cpMultipleHitDensity, cpWidth, NParameters } |
using | Algo_t = AlgoBase |
using | This_t = OverriddenClusterParamsAlg< AlgoBase > |
using | Measure_t = typename AlgoBase::Measure_t |
Public Member Functions | |
template<typename... Args> | |
OverriddenClusterParamsAlg (Args &&...args) | |
Constructor; just forwards the arguments to the base class. More... | |
This_t & | OverrideParameter (ParameterType_t param, Measure_t value) |
Overrides the specified cluster parameter. More... | |
This_t & | ReleaseParameter (ParameterType_t param) |
Cancels the override of the specified cluster parameter. More... | |
bool | isOverridden (ParameterType_t param) const |
Returns whether the specified parameter is currently overridden. 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... | |
Standard ClusterParamsAlgBase interface | |
The following methods replicate the ones of the templated Algo_t class. Except, of course, when they are overridden. | |
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... | |
Algorithm results | |
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... | |
Protected Types | |
using | ValueFunction_t) = float(Algo_t::*)( |
using | MeasureFunction_t) = Measure_t(Algo_t::*)( |
Protected Member Functions | |
template<typename Func , typename... Args> | |
auto | ReturnValue (ParameterType_t param, Func func, Args &&...args) -> decltype((algo.*func)(args...)) |
Static Protected Member Functions | |
static std::logic_error | NotImplemented (std::string function_name) |
Protected Attributes | |
Algo_t | algo |
an instance of the wrapped algorithm class More... | |
std::vector< details::MultiValue > | values |
the overridden values More... | |
std::bitset< NParameters > | overridden_set |
bits for overriding More... | |
int | verbose = 0 |
verbosity level: 0 is normal, negative is even quieter More... | |
Algorithm collection class computing cluster parameters.
AlgoBase | class of algorithms to be overridden |
This class wraps a ClusterParamsAlgBase class, and overrides selected methods with constant values. The same effect can be obtained explicitly creating a new class with the proper methods overridden. This one is a more convenient way to get the same result, but it's slower and less flexible.
Definition at line 69 of file OverriddenClusterParamsAlg.h.
using cluster::OverriddenClusterParamsAlg< AlgoBase >::Algo_t = AlgoBase |
Definition at line 75 of file OverriddenClusterParamsAlg.h.
using cluster::OverriddenClusterParamsAlg< AlgoBase >::Measure_t = typename AlgoBase::Measure_t |
Definition at line 77 of file OverriddenClusterParamsAlg.h.
|
protected |
Definition at line 296 of file OverriddenClusterParamsAlg.h.
using cluster::OverriddenClusterParamsAlg< AlgoBase >::This_t = OverriddenClusterParamsAlg<AlgoBase> |
Definition at line 76 of file OverriddenClusterParamsAlg.h.
|
protected |
Definition at line 295 of file OverriddenClusterParamsAlg.h.
enum cluster::OverriddenClusterParamsAlg::ParameterType_t |
Definition at line 79 of file OverriddenClusterParamsAlg.h.
|
inlineexplicit |
Constructor; just forwards the arguments to the base class.
Definition at line 98 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Restores the class to post-configuration, pre-initialization state.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 143 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the angle of the cluster.
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 206 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the charge on the first and last wire of the track.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 188 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the opening angle at the start or end of the cluster.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 219 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the total charge of the cluster from Hit::Integral()
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 233 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the standard deviation on the charge of the cluster hits.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 241 of file OverriddenClusterParamsAlg.h.
|
inline |
Returns whether the specified parameter is currently overridden.
Definition at line 131 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Fraction of wires in the cluster with more than one hit.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 275 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Returns the number of hits in the cluster.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 268 of file OverriddenClusterParamsAlg.h.
|
inlinestaticprotectedinherited |
Definition at line 242 of file ClusterParamsAlgBase.h.
|
inline |
Overrides the specified cluster parameter.
param | which cluster parameter to override |
value | the value of the cluster parameter to be returned |
For parameters without uncertainty, the uncertainty will be ignored.
Definition at line 111 of file OverriddenClusterParamsAlg.h.
References util::values().
|
inline |
Cancels the override of the specified cluster parameter.
param | which cluster parameter not to override any more |
Definition at line 124 of file OverriddenClusterParamsAlg.h.
|
inlineprotected |
Definition at line 304 of file OverriddenClusterParamsAlg.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 163 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Sets the list of input hits.
hits | list of pointers to hits |
undefined | in case of error, this method can throw (anything) |
Implements cluster::ClusterParamsAlgBase.
Definition at line 151 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Set the verbosity level;.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 169 of file OverriddenClusterParamsAlg.h.
References cluster::ClusterParamsAlgBase::SetVerbose().
|
inlineoverridevirtual |
Computes the angle of the cluster.
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 204 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the charge on the first and last wire of the track.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 184 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the opening angle at the start or end of the cluster.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 215 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the total charge of the cluster from Hit::SummedADC()
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 252 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the standard deviation on the charge of the cluster hits.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 260 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the width of the cluster.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 285 of file OverriddenClusterParamsAlg.h.
|
protected |
an instance of the wrapped algorithm class
Definition at line 298 of file OverriddenClusterParamsAlg.h.
|
protected |
bits for overriding
Definition at line 301 of file OverriddenClusterParamsAlg.h.
|
protected |
the overridden values
Definition at line 300 of file OverriddenClusterParamsAlg.h.
|
protectedinherited |
verbosity level: 0 is normal, negative is even quieter
Definition at line 240 of file ClusterParamsAlgBase.h.