LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
DefaultOpDetResponse_service.cc
Go to the documentation of this file.
1 //
3 // \file DefaultOpDetResponse_service.cc
4 //
6 
7 
11 
12 namespace opdet{
13 
14 
15  //--------------------------------------------------------------------
17  art::ActivityRegistry &/*reg*/)
18  {
19  this->doReconfigure(pset);
20  }
21 
22  //--------------------------------------------------------------------
24  { }
25 
26 
27  //--------------------------------------------------------------------
29  {
30  auto const* LarProp = lar::providerFrom<detinfo::LArPropertiesService>();
31 
32  if ( LarProp->ScintPreScale() < 1 ) {
33  mf::LogWarning("DefaultOpDetResponse_service") << "A prescale of " << LarProp->ScintPreScale() << " has been applied during optical MC production, "
34  << "but DefaultOpDetResponse does not include any QE so this effect is not being corrected out.";
35  assert(false);
36  }
37 
38  }
39 
40 
41  //--------------------------------------------------------------------
42  bool DefaultOpDetResponse::doDetected(int OpChannel, const sim::OnePhoton& /*Phot*/, int &newOpChannel) const
43  {
44  newOpChannel = OpChannel;
45  return true;
46  }
47 
48  //--------------------------------------------------------------------
49  bool DefaultOpDetResponse::doDetectedLite(int OpChannel, int &newOpChannel) const
50  {
51  newOpChannel = OpChannel;
52  return true;
53  }
54 
55 
56 
57 } // namespace
58 
60 
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)
virtual void doReconfigure(fhicl::ParameterSet const &p)
DefaultOpDetResponse(fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
virtual bool doDetectedLite(int OpChannel, int &newOpChannel) const
virtual bool doDetected(int OpChannel, const sim::OnePhoton &Phot, int &newOpChannel) const