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 Types inherited from cluster::ClusterParamsAlgBase | |
using | Measure_t = details::Measure_t< float > |
Type used to return values with errors. More... | |
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 | SetHits (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 |
Measure_t | StartAngle () override |
Computes the angle of the cluster. More... | |
Measure_t | EndAngle () override |
Measure_t | StartOpeningAngle () override |
Computes the opening angle at the start or end of the cluster. More... | |
Measure_t | EndOpeningAngle () override |
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... | |
Public Member Functions inherited from cluster::ClusterParamsAlgBase | |
virtual | ~ClusterParamsAlgBase ()=default |
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...)) |
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... | |
Protected Attributes inherited from cluster::ClusterParamsAlgBase | |
int | verbose = 0 |
verbosity level: 0 is normal, negative is even quieter More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from cluster::ClusterParamsAlgBase | |
static std::logic_error | NotImplemented (std::string function_name) |
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 337 of file OverriddenClusterParamsAlg.h.
using cluster::OverriddenClusterParamsAlg< AlgoBase >::This_t = OverriddenClusterParamsAlg<AlgoBase> |
Definition at line 76 of file OverriddenClusterParamsAlg.h.
|
protected |
Definition at line 336 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 150 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 226 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 203 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 244 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the total charge of the cluster from Hit::Integral()
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 259 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the standard deviation on the charge of the cluster hits.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 271 of file OverriddenClusterParamsAlg.h.
|
inline |
Returns whether the specified parameter is currently overridden.
Definition at line 134 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Fraction of wires in the cluster with more than one hit.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 315 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Returns the number of hits in the cluster.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 304 of file OverriddenClusterParamsAlg.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 112 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 126 of file OverriddenClusterParamsAlg.h.
|
inlineprotected |
Definition at line 346 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 162 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 175 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Set the verbosity level;.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 182 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 220 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 239 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the total charge of the cluster from Hit::SummedADC()
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 283 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the standard deviation on the charge of the cluster hits.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 295 of file OverriddenClusterParamsAlg.h.
|
inlineoverridevirtual |
Computes the width of the cluster.
Reimplemented from cluster::ClusterParamsAlgBase.
Definition at line 326 of file OverriddenClusterParamsAlg.h.
|
protected |
an instance of the wrapped algorithm class
Definition at line 339 of file OverriddenClusterParamsAlg.h.
|
protected |
bits for overriding
Definition at line 342 of file OverriddenClusterParamsAlg.h.
|
protected |
the overridden values
Definition at line 341 of file OverriddenClusterParamsAlg.h.