LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
IPhotonCalibrator.h
Go to the documentation of this file.
1 // \file IPhotonCalibrator.h
3 //
4 // \brief Generic interface for service provider for calibrating optical hits
5 //
6 // \author ahimmel@fnal.gov
7 //
9 
10 #ifndef IPHOTONCALIBRATOR_H
11 #define IPHOTONCALIBRATOR_H
12 
13 // LArSoft includes
16 
17 namespace calib {
21  public:
22  // Make non-copiable
23  IPhotonCalibrator(IPhotonCalibrator const&) = delete;
27 
29  virtual ~IPhotonCalibrator() = default;
30 
31  virtual double PE(double adcs, int opchannel) const = 0;
32  virtual bool UseArea() const = 0;
33 
36  // virtual double GeV(double PE, int opchannel, TVector3 pos) = 0;
37 
39  double PE(const recob::OpHit& oh) const { return oh.PE(); }
40 
41  double PE(const recob::OpFlash& of) const { return of.TotalPE(); }
42 
43  // double GeV(const recob::OpHit& oh, TVector3 pos)
44  //{
45  // return GeV(oh.PE(), oh.OpChannel(), pos);
46  //}
47 
48  //double GeV(const OpFlash& of, TVector3 pos)
49  //{
50  // // This function would be in the .cxx in practice
51  // const std::vector<double>& pes = of.PEs();
52  // double ret = 0;
53  // for(int chan = 0; chan < pes.size(); ++chan)
54  // ret += GeV(of.PE(chan), chan, pos);
55  // return ret;
56  //}
57  };
58 
59 }
60 
61 #endif
IPhotonCalibrator & operator=(IPhotonCalibrator const &)=delete
virtual bool UseArea() const =0
virtual double PE(double adcs, int opchannel) const =0
double PE(const recob::OpHit &oh) const
Convenience.
Definition: OpHitAlg.h:19
virtual ~IPhotonCalibrator()=default
double PE() const
Definition: OpHit.h:122
double PE(const recob::OpFlash &of) const
double TotalPE() const
Definition: OpFlash.cxx:94