LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
DefaultOpDetResponse_service.cc
Go to the documentation of this file.
1 //
3 // \file DefaultOpDetResponse_service.cc
4 //
6 
10 
13 
14 #include <cassert>
15 
16 namespace opdet {
18  public:
20 
21  private:
22  void doReconfigure(fhicl::ParameterSet const& p) override;
23  bool doDetected(int OpChannel, const sim::OnePhoton& Phot, int& newOpChannel) const override;
24  bool doDetectedLite(int OpChannel, int& newOpChannel) const override;
25 
26  }; // class DefaultOpDetResponse
27 
28 }
29 
32  LEGACY)
33 
34 namespace opdet {
35  //--------------------------------------------------------------------
37  {
38  this->doReconfigure(pset);
39  }
40 
41  //--------------------------------------------------------------------
43  {
44  auto const* LarProp = lar::providerFrom<detinfo::LArPropertiesService>();
45 
46  if (LarProp->ScintPreScale() < 1) {
47  mf::LogWarning("DefaultOpDetResponse_service")
48  << "A prescale of " << LarProp->ScintPreScale()
49  << " has been applied during optical MC production, "
50  << "but DefaultOpDetResponse does not include any QE so this effect is not being corrected "
51  "out.";
52  assert(false);
53  }
54  }
55 
56  //--------------------------------------------------------------------
57  bool DefaultOpDetResponse::doDetected(int OpChannel,
58  const sim::OnePhoton& /*Phot*/,
59  int& newOpChannel) const
60  {
61  newOpChannel = OpChannel;
62  return true;
63  }
64 
65  //--------------------------------------------------------------------
66  bool DefaultOpDetResponse::doDetectedLite(int OpChannel, int& newOpChannel) const
67  {
68  newOpChannel = OpChannel;
69  return true;
70  }
71 
72 } // namespace
73 
Utilities related to art service access.
void doReconfigure(fhicl::ParameterSet const &p) override
All information of a photon entering the sensitive optical detector volume.
Definition: SimPhotons.h:60
DefaultOpDetResponse(fhicl::ParameterSet const &pset)
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
bool doDetectedLite(int OpChannel, int &newOpChannel) const override
DECLARE_ART_SERVICE_INTERFACE_IMPL(opdet::DefaultOpDetResponse, opdet::OpDetResponseInterface, LEGACY) namespace opdet
bool doDetected(int OpChannel, const sim::OnePhoton &Phot, int &newOpChannel) const override
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)