LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
LazyClusterParamsAlg.cxx
Go to the documentation of this file.
1 
10 // C/C++ standard library
11 #include <vector>
12 
13 // LArSoft libraries
14 #include "larcoreobj/SimpleTypesAndConstants/PhysicalConstants.h" // util::DegreesToRadians()
17 
18 
19 //==============================================================================
20 //=== cluster::LazyClusterParamsAlg
21 //===
22 
23 //------------------------------------------------------------------------------
26 {
27  return { (float) params.start_charge };
28 } // LazyClusterParamsAlg::StartCharge()
29 
30 
31 //------------------------------------------------------------------------------
34 {
35  return { (float) params.end_charge };
36 } // LazyClusterParamsAlg::EndCharge()
37 
38 
39 //------------------------------------------------------------------------------
42 {
44 } // LazyClusterParamsAlg::StartAngle()
45 
46 
47 //------------------------------------------------------------------------------
50 {
51  return StartAngle();
52 } // LazyClusterParamsAlg::EndAngle()
53 
54 
55 //------------------------------------------------------------------------------
58 {
59  return { (float) params.opening_angle_charge_wgt };
60 } // LazyClusterParamsAlg::StartOpeningAngle()
61 
62 
63 //------------------------------------------------------------------------------
66 {
67  return { (float) params.closing_angle_charge_wgt };
68 } // LazyClusterParamsAlg::EndOpeningAngle()
69 
70 
71 //------------------------------------------------------------------------------
74 {
75  return { (float) params.sum_charge };
76 } // LazyClusterParamsAlg::Integral()
77 
78 
79 //------------------------------------------------------------------------------
82 {
83  return { (float) params.rms_charge };
84 } // LazyClusterParamsAlg::IntegralStdDev()
85 
86 
87 //------------------------------------------------------------------------------
90 {
91  const double sumADC = params.sum_ADC;
92  return { (float) sumADC, (float) std::sqrt(sumADC) };
93 } // LazyClusterParamsAlg::SummedADC()
94 
95 
96 //------------------------------------------------------------------------------
99 {
100  return { (float) params.rms_ADC };
101 } // LazyClusterParamsAlg::SummedADCStdDev()
102 
103 
104 //------------------------------------------------------------------------------
106  return (size_t) params.N_Hits;
107 } // LazyClusterParamsAlg::NHits()
108 
109 
110 //------------------------------------------------------------------------------
113 } // LazyClusterParamsAlg::MultipleHitDensity()
114 
115 
116 //------------------------------------------------------------------------------
118  return params.width;
119 } // LazyClusterParamsAlg::Width()
120 
121 
122 //------------------------------------------------------------------------------
double rms_ADC
RMS (standard deviation of sample) of ADC counts of hits in ADC.
Definition: ClusterParams.h:32
Algorithm class inheriting pre-computed results.
double closing_angle_charge_wgt
Same for charge_wgt.
Definition: ClusterParams.h:44
virtual Measure_t EndAngle() override
Computes the angle of the cluster.
virtual 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:45
double rms_charge
RMS (standard deviation of sample) of charge of hits in ADC.
Definition: ClusterParams.h:29
virtual Measure_t SummedADC() override
Computes the total charge of the cluster from Hit::SummedADC()
virtual Measure_t StartCharge() override
Computes the charge on the first and last wire of the track.
cluster_params const & params
the parameters, already computed
virtual Measure_t EndOpeningAngle() override
Computes the opening angle at the start or end of the cluster.
virtual 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:27
virtual Measure_t EndCharge() override
Computes the charge on the first and last wire of the track.
constexpr T DegreesToRadians(T angle)
Converts the argument angle from degrees into radians.
virtual Measure_t SummedADCStdDev() override
Computes the standard deviation on the charge of the cluster hits.
virtual float MultipleHitDensity() override
Fraction of wires in the cluster with more than one hit.
virtual Measure_t IntegralStdDev() override
Computes the standard deviation on the charge of the cluster hits.
virtual float Width() override
Computes the width of the cluster.
double sum_ADC
Sum charge of ADC counts of hits, in ADC.
Definition: ClusterParams.h:30
virtual Measure_t StartOpeningAngle() override
Computes the opening angle at the start or end of the cluster.
virtual Measure_t StartAngle() override
Computes the angle of the cluster.
double opening_angle_charge_wgt
Same for charge_wgt.
Definition: ClusterParams.h:42
double cluster_angle_2d
Linear best fit to high-charge hits in the cluster.
Definition: ClusterParams.h:39
double end_charge
Charge at the (other) end of the cluster.
Definition: ClusterParams.h:46