LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ShowerEnergyAlg.h
Go to the documentation of this file.
1 // Class: ShowerEnergyAlg
3 // File: ShowerEnergyAlg.h
4 // Author: Mike Wallbank (m.wallbank@sheffield.ac.uk), November 2015
5 //
6 // Shower energy finding class
8 
9 #ifndef ShowerEnergyAlg_hxx
10 #define ShowerEnergyAlg_hxx
11 
12 #include <array>
13 
14 // Framework
16 namespace fhicl {
17  class ParameterSet;
18 }
19 
20 // larsoft
23 namespace detinfo {
24  class DetectorClocksData;
25  class DetectorPropertiesData;
26 }
27 
28 namespace shower {
29  class ShowerEnergyAlg;
30 }
31 
33 public:
34  explicit ShowerEnergyAlg(fhicl::ParameterSet const& pset);
35 
38  double ShowerEnergy(detinfo::DetectorClocksData const& clockData,
39  detinfo::DetectorPropertiesData const& detProp,
41  geo::PlaneID::PlaneID_t plane) const;
42 
43 private:
44  struct LinearFunction {
45  double gradient;
46  double intercept;
47  double energy_from(double const charge) const noexcept { return charge * gradient + intercept; }
48  };
49  std::array<LinearFunction, 3> const fLinearFunctions;
50 };
51 
52 #endif
std::array< LinearFunction, 3 > const fLinearFunctions
Declaration of signal hit object.
unsigned int PlaneID_t
Type for the ID number.
Definition: geo_types.h:464
double ShowerEnergy(const ShowerStruct3D &ss3)
Definition: TCShower.cxx:3899
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
void hits()
Definition: readHits.C:15
double energy_from(double const charge) const noexcept
parameter set interface
General LArSoft Utilities.
Definition of data types for geometry description.
Contains all timing reference information for the detector.