LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
PhotonCalibratorStandard.h
Go to the documentation of this file.
1 // \file PhotonCalibratorStandard.h
3 //
4 // \brief Standard service provider applying a flat scale factor to all optical hits.
5 //
6 // \author ahimmel@fnal.gov
7 //
9 
10 #ifndef PHOTONCALIBRATORDEFAULT_H
11 #define PHOTONCALIBRATORDEFAULT_H
12 
14 
15 // ART includes
16 #include "fhiclcpp/ParameterSet.h"
17 namespace art {
18  class ActivityRegistry;
19 }
20 
21 namespace calib {
22 
24  public:
26  : fSPESize(pset.get<float>("SPESize"))
27  , fSPEShift(pset.get<float>("SPEShift", 0.))
28  , fUseArea(pset.get<bool>("UseArea"))
29  {}
30 
31  PhotonCalibratorStandard(float size, float shift, bool useArea)
32  : fSPESize(size), fSPEShift(shift), fUseArea(useArea)
33  {}
34 
35  // Override base class functions
36  double PE(double adcs, int /* opchannel */) const override
37  {
38  return adcs / fSPESize + fSPEShift;
39  }
40  bool UseArea() const override { return fUseArea; }
41 
42  // Setters for this implementation
43  void SetSPESize(float size) { fSPESize = size; }
44  void SetSPEShift(float shift) { fSPEShift = shift; }
45  void SetUseArea(bool useArea) { fUseArea = useArea; }
46 
49  // virtual double GeV(double PE, int opchannel, TVector3 pos) override;
50 
51  private:
52  float fSPESize;
53  float fSPEShift;
54  bool fUseArea;
55 
56  }; // class PhotonCalibratorStandard
57 }
58 
59 #endif
PhotonCalibratorStandard(float size, float shift, bool useArea)
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:101
Definition: OpHitAlg.h:19
PhotonCalibratorStandard(fhicl::ParameterSet const &pset)
double PE(double adcs, int) const override
Definition: MVAAlg.h:12
auto const & get(AssnsNode< L, R, D > const &r)
Definition: AssnsNode.h:115