All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PhotonCalibratorStandard.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \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 //
8 ////////////////////////////////////////////////////////////////////////
9 
10 
11 #ifndef PHOTONCALIBRATORDEFAULT_H
12 #define PHOTONCALIBRATORDEFAULT_H
13 
15 
16 // ART includes
17 #include "fhiclcpp/ParameterSet.h"
18 namespace art { class ActivityRegistry; }
19 
20 namespace calib {
21 
23  {
24  public:
25  PhotonCalibratorStandard(fhicl::ParameterSet const& pset, art::ActivityRegistry& reg)
26  : fSPESize ( pset.get< float >("SPESize") ),
27  fSPEShift ( pset.get< float >("SPEShift", 0.)),
28  fUseArea ( pset.get< bool >("UseArea") )
29  {}
30 
31 
32  PhotonCalibratorStandard(float size, float shift, bool useArea)
33  : fSPESize ( size ),
34  fSPEShift ( shift ),
35  fUseArea ( useArea )
36  {}
37 
38  // Override base class functions
39  double PE(double adcs, int opchannel) const override { return adcs/fSPESize + fSPEShift; }
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 
47  /// Need a 3D position because result depends on position along length of
48  /// bar. This is going to be pretty imprecise even so.
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 
57  }; // class PhotonCalibratorStandard
58 }
59 
60 
61 
62 #endif
static constexpr bool
std::size_t size(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:561
PhotonCalibratorStandard(float size, float shift, bool useArea)
shift
Definition: fcl_checks.sh:26
double PE(double adcs, int opchannel) const override
PhotonCalibratorStandard(fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)