LArSoft
v06_85_00
Liquid Argon Software toolkit - http://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... | |
virtual | ~OverriddenClusterParamsAlg ()=default |
Destructor. 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... | |
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... | |
Standard ClusterParamsAlgBase interface | |
The following methods replicate the ones of the templated Algo_t class. Except, of course, when they are overridden. | |
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... | |
Algorithm results | |
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... | |
Protected Types | |
using | ValueFunction_t) = float(Algo_t::*)( |
using | MeasureFunction_t) = Measure_t(Algo_t::*)( |
Protected Member Functions | |
template<typename Func > | |
auto | ReturnValue (ParameterType_t param, Func func) -> decltype((algo.*func)()) |
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 82 of file OverriddenClusterParamsAlg.h.
using cluster::OverriddenClusterParamsAlg< AlgoBase >::Algo_t = AlgoBase |
Definition at line 88 of file OverriddenClusterParamsAlg.h.
using cluster::OverriddenClusterParamsAlg< AlgoBase >::Measure_t = typename AlgoBase::Measure_t |
Definition at line 90 of file OverriddenClusterParamsAlg.h.
|
protected |
Definition at line 303 of file OverriddenClusterParamsAlg.h.
using cluster::OverriddenClusterParamsAlg< AlgoBase >::This_t = OverriddenClusterParamsAlg<AlgoBase> |
Definition at line 89 of file OverriddenClusterParamsAlg.h.
|
protected |
Definition at line 302 of file OverriddenClusterParamsAlg.h.
enum cluster::OverriddenClusterParamsAlg::ParameterType_t |
Definition at line 92 of file OverriddenClusterParamsAlg.h.
|
inlineexplicit |
Constructor; just forwards the arguments to the base class.
Definition at line 111 of file OverriddenClusterParamsAlg.h.
|
virtualdefault |
Destructor.
|
inlineoverridevirtual |
Restores the class to post-configuration, pre-initialization state.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 162 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 217 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the charge on the first and last wire of the track.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 200 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the opening angle at the start or end of the cluster.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 229 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the total charge of the cluster from Hit::Integral()
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 242 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the standard deviation on the charge of the cluster hits.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 251 of file OverriddenClusterParamsAlg.h.
|
inline |
Returns whether the specified parameter is currently overridden.
Definition at line 148 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Fraction of wires in the cluster with more than one hit.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 285 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Returns the number of hits in the cluster.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 276 of file OverriddenClusterParamsAlg.h.
|
inlinestaticprotectedinherited |
Definition at line 243 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 129 of file OverriddenClusterParamsAlg.h.
|
inline |
Cancels the override of the specified cluster parameter.
param | which cluster parameter not to override any more |
Definition at line 143 of file OverriddenClusterParamsAlg.h.
|
inlineprotected |
Definition at line 311 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 171 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 180 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Set the verbosity level;.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 185 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 214 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the charge on the first and last wire of the track.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 198 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the opening angle at the start or end of the cluster.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 227 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the total charge of the cluster from Hit::SummedADC()
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 260 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the standard deviation on the charge of the cluster hits.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 269 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the width of the cluster.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 293 of file OverriddenClusterParamsAlg.h.
|
protected |
an instance of the wrapped algorithm class
Definition at line 305 of file OverriddenClusterParamsAlg.h.
|
protected |
bits for overriding
Definition at line 308 of file OverriddenClusterParamsAlg.h.
|
protected |
the overridden values
Definition at line 307 of file OverriddenClusterParamsAlg.h.
|
protectedinherited |
verbosity level: 0 is normal, negative is even quieter
Definition at line 241 of file ClusterParamsAlgBase.h.