ShowerEnergyAlg.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: ShowerEnergyAlg
3 // File: ShowerEnergyAlg.h
4 // Author: Mike Wallbank (m.wallbank@sheffield.ac.uk), November 2015
5 //
6 // Shower energy finding class
7 ////////////////////////////////////////////////////////////////////////
8 
9 #ifndef ShowerEnergyAlg_hxx
10 #define ShowerEnergyAlg_hxx
11 
12 #include <array>
13 
14 // Framework
16 #include "fhiclcpp/fwd.h"
17 
18 // larsoft
21 namespace detinfo {
22  class DetectorClocks;
23  class DetectorProperties;
24 }
25 
26 namespace shower {
27  class ShowerEnergyAlg;
28 }
29 
31 public:
32  explicit ShowerEnergyAlg(fhicl::ParameterSet const& pset);
33 
34  /// This overload is preferred as it does not rely on the cached
35  /// DetectorProperties data member.
36  double ShowerEnergy(detinfo::DetectorClocksData const& clockData,
37  detinfo::DetectorPropertiesData const& detProp,
38  std::vector<art::Ptr<recob::Hit>> const& hits,
39  geo::PlaneID::PlaneID_t plane) const;
40 
41 private:
42  struct LinearFunction {
43  double gradient;
44  double intercept;
45  double
46  energy_from(double const charge) const noexcept
47  {
48  return charge * gradient + intercept;
49  }
50  };
51  std::array<LinearFunction, 3> const fLinearFunctions;
52 };
53 
54 #endif
std::array< LinearFunction, 3 > const fLinearFunctions
unsigned int PlaneID_t
Type for the ID number.
Definition: geo_types.h:473
struct vector vector
double ShowerEnergy(const ShowerStruct3D &ss3)
Definition: TCShower.cxx:3952
double energy_from(double const charge) const noexcept
General LArSoft Utilities.
Definition of data types for geometry description.
Declaration of signal hit object.
Contains all timing reference information for the detector.