LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 
11 #ifndef PHOTONCALIBRATORDEFAULT_H
12 #define PHOTONCALIBRATORDEFAULT_H
13 
15 
16 // ART includes
17 #include "fhiclcpp/ParameterSet.h"
21 
22 
23 namespace calib {
24 
26  {
27  public:
29  : fSPESize ( pset.get< float >("SPESize") ),
30  fSPEShift ( pset.get< float >("SPEShift", 0.)),
31  fUseArea ( pset.get< bool >("UseArea") )
32  {}
33 
34 
35  PhotonCalibratorStandard(float size, float shift, bool useArea)
36  : fSPESize ( size ),
37  fSPEShift ( shift ),
38  fUseArea ( useArea )
39  {}
40 
41  // Override base class functions
42  double PE(double adcs, int opchannel) const override { return adcs/fSPESize + fSPEShift; }
43  bool UseArea() const override { return fUseArea; }
44 
45  // Setters for this implementation
46  void SetSPESize (float size) { fSPESize = size; }
47  void SetSPEShift(float shift) { fSPEShift = shift; }
48  void SetUseArea (bool useArea) { fUseArea = useArea; }
49 
52  // virtual double GeV(double PE, int opchannel, TVector3 pos) override;
53 
54  private:
55  float fSPESize;
56  float fSPEShift;
57  bool fUseArea;
58 
59 
60  }; // class PhotonCalibratorStandard
61 }
62 
63 
64 
65 #endif
PhotonCalibratorStandard(float size, float shift, bool useArea)
double PE(double adcs, int opchannel) const override
PhotonCalibratorStandard(fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)