LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
MicrobooneOpDetResponse_service.cc
Go to the documentation of this file.
1 //
3 // \file MicrobooneOpDetResponse_service.cc
4 //
6 
8 
10 
12 
13 namespace opdet {
15  public:
17 
18  private:
19  void doReconfigure(fhicl::ParameterSet const& p) override;
20  bool doDetected(int OpChannel, const sim::OnePhoton& Phot, int& newOpChannel) const override;
21  bool doDetectedLite(int OpChannel, int& newOpChannel) const override;
22 
23  float fQE; // Quantum efficiency of tube
24 
25  float fWavelengthCutLow; // Sensitive wavelength range
27  }; // class MicrobooneOpDetResponse
28 }
29 
32  LEGACY)
33 
34 namespace opdet {
35  //--------------------------------------------------------------------
37  {
38  this->doReconfigure(pset);
39  }
40 
41  //--------------------------------------------------------------------
43  {
44  fQE = pset.get<double>("QuantumEfficiency");
45  //double tempfQE= pset.get<double>("QuantumEfficiency");
46  fWavelengthCutLow = pset.get<double>("WavelengthCutLow");
47  fWavelengthCutHigh = pset.get<double>("WavelengthCutHigh");
48 
65  }
66 
67  //--------------------------------------------------------------------
68  bool MicrobooneOpDetResponse::doDetected(int OpChannel,
69  const sim::OnePhoton& Phot,
70  int& newOpChannel) const
71  {
72 
73  newOpChannel = OpChannel;
74 
83  double wavel = wavelength(Phot.Energy);
84  // Check wavelength acceptance
85  if (wavel < fWavelengthCutLow) return false;
86  if (wavel > fWavelengthCutHigh) return false;
87 
88  return true;
89  }
90 
91  //--------------------------------------------------------------------
92  bool MicrobooneOpDetResponse::doDetectedLite(int OpChannel, int& newOpChannel) const
93  {
94  newOpChannel = OpChannel;
95 
104  return true;
105  }
106 
107 } // namespace
108 
All information of a photon entering the sensitive optical detector volume.
Definition: SimPhotons.h:60
MicrobooneOpDetResponse(fhicl::ParameterSet const &pset)
DECLARE_ART_SERVICE_INTERFACE_IMPL(opdet::MicrobooneOpDetResponse, opdet::OpDetResponseInterface, LEGACY) namespace opdet
void doReconfigure(fhicl::ParameterSet const &p) override
Simulation objects for optical detectors.
T get(std::string const &key) const
Definition: ParameterSet.h:314
bool doDetected(int OpChannel, const sim::OnePhoton &Phot, int &newOpChannel) const override
float Energy
Scintillation photon energy [GeV].
Definition: SimPhotons.h:78
virtual float wavelength(double energy) const
bool doDetectedLite(int OpChannel, int &newOpChannel) const override
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)