LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
LazyClusterParamsAlg.cxx
Go to the documentation of this file.
1 
10 // C/C++ standard library
11 #include <cmath>
12 
13 // LArSoft libraries
14 #include "larcoreobj/SimpleTypesAndConstants/PhysicalConstants.h" // util::DegreesToRadians()
17 
18 //==============================================================================
19 //=== cluster::LazyClusterParamsAlg
20 
21 //------------------------------------------------------------------------------
24 {
25  return {(float)params.start_charge};
26 }
27 
28 //------------------------------------------------------------------------------
31 {
32  return {(float)params.end_charge};
33 }
34 
35 //------------------------------------------------------------------------------
37 {
39 }
40 
41 //------------------------------------------------------------------------------
43 {
44  return StartAngle();
45 }
46 
47 //------------------------------------------------------------------------------
49 {
50  return {(float)params.opening_angle_charge_wgt};
51 }
52 
53 //------------------------------------------------------------------------------
55 {
56  return {(float)params.closing_angle_charge_wgt};
57 }
58 
59 //------------------------------------------------------------------------------
61 {
62  return {(float)params.sum_charge};
63 }
64 
65 //------------------------------------------------------------------------------
67 {
68  return {(float)params.rms_charge};
69 }
70 
71 //------------------------------------------------------------------------------
73 {
74  const double sumADC = params.sum_ADC;
75  return {(float)sumADC, (float)std::sqrt(sumADC)};
76 }
77 
78 //------------------------------------------------------------------------------
80 {
81  return {(float)params.rms_ADC};
82 }
83 
84 //------------------------------------------------------------------------------
86 {
87  return (size_t)params.N_Hits;
88 }
89 
90 //------------------------------------------------------------------------------
92 {
94 }
95 
96 //------------------------------------------------------------------------------
98 {
99  return params.width;
100 }
double rms_ADC
RMS (standard deviation of sample) of ADC counts of hits in ADC.
Definition: ClusterParams.h:31
Algorithm class inheriting pre-computed results.
double closing_angle_charge_wgt
Same for charge_wgt.
Definition: ClusterParams.h:43
Measure_t EndAngle() override
Computes the angle of the cluster.
size_t NHits() override
Returns the number of hits in the cluster.
double start_charge
Charge at the start of the cluster.
Definition: ClusterParams.h:44
double rms_charge
RMS (standard deviation of sample) of charge of hits in ADC.
Definition: ClusterParams.h:28
Measure_t SummedADC() override
Computes the total charge of the cluster from Hit::SummedADC()
cluster_params const & params
the parameters, already computed
Measure_t EndOpeningAngle() override
Computes the opening angle at the start or end of the cluster.
Measure_t Integral() override
Computes the total charge of the cluster from Hit::Integral()
double sum_charge
Sum charge of hits in ADC.
Definition: ClusterParams.h:26
constexpr T DegreesToRadians(T angle)
Converts the argument angle from degrees into radians.
Measure_t SummedADCStdDev() override
Computes the standard deviation on the charge of the cluster hits.
float MultipleHitDensity() override
Fraction of wires in the cluster with more than one hit.
Measure_t IntegralStdDev() override
Computes the standard deviation on the charge of the cluster hits.
double sum_ADC
Sum charge of ADC counts of hits, in ADC.
Definition: ClusterParams.h:29
Measure_t StartOpeningAngle() override
Computes the opening angle at the start or end of the cluster.
Measure_t StartAngle() override
Computes the angle of the cluster.
double opening_angle_charge_wgt
Same for charge_wgt.
Definition: ClusterParams.h:41
Measure_t StartCharge(util::GeometryUtilities const &gser) override
Computes the charge on the first and last wire of the track.
Measure_t EndCharge(util::GeometryUtilities const &gser) override
Computes the charge on the first and last wire of the track.
Collection of Physical constants used in LArSoft.
double cluster_angle_2d
Linear best fit to high-charge hits in the cluster.
Definition: ClusterParams.h:38
float Width(util::GeometryUtilities const &) override
Computes the width of the cluster.
double end_charge
Charge at the (other) end of the cluster.
Definition: ClusterParams.h:45