LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
MicrobooneOpDetResponse_service.cc
Go to the documentation of this file.
1 //
3 // \file MicrobooneOpDetResponse_service.cc
4 //
6 
7 
11 #include "CLHEP/Random/RandFlat.h"
12 
13 
14 namespace opdet{
15 
16 
17  //--------------------------------------------------------------------
19  art::ActivityRegistry &/*reg*/)
20  {
21  this->doReconfigure(pset);
22  }
23 
24  //--------------------------------------------------------------------
26  { }
27 
28 
29  //--------------------------------------------------------------------
31  {
32  fQE= pset.get<double>("QuantumEfficiency");
33  //double tempfQE= pset.get<double>("QuantumEfficiency");
34  fWavelengthCutLow= pset.get<double>("WavelengthCutLow");
35  fWavelengthCutHigh= pset.get<double>("WavelengthCutHigh");
36 
53  }
54 
55 
56  //--------------------------------------------------------------------
57  bool MicrobooneOpDetResponse::doDetected(int OpChannel, const sim::OnePhoton& Phot, int &newOpChannel) const
58  {
59 
60  newOpChannel = OpChannel;
61 
70  double wavel = wavelength(Phot.Energy);
71  // Check wavelength acceptance
72  if (wavel < fWavelengthCutLow) return false;
73  if (wavel > fWavelengthCutHigh) return false;
74 
75  return true;
76  }
77 
78  //--------------------------------------------------------------------
79  bool MicrobooneOpDetResponse::doDetectedLite(int OpChannel, int &newOpChannel) const
80  {
81  newOpChannel = OpChannel;
82 
91  return true;
92  }
93 
94 
95 
96 } // namespace
97 
99 
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)
T get(std::string const &key) const
Definition: ParameterSet.h:231
virtual bool doDetected(int OpChannel, const sim::OnePhoton &Phot, int &newOpChannel) const
MicrobooneOpDetResponse(fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)
virtual void doReconfigure(fhicl::ParameterSet const &p)
virtual float wavelength(double energy) const
virtual bool doDetectedLite(int OpChannel, int &newOpChannel) const