DefaultOpDetResponse_service.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // \file DefaultOpDetResponse_service.cc
4 //
5 ////////////////////////////////////////////////////////////////////////
6 
11 
12 namespace opdet{
13 
14 
15  //--------------------------------------------------------------------
17  {
18  this->doReconfigure(pset);
19  }
20 
21  //--------------------------------------------------------------------
23  {
24  auto const* LarProp = lar::providerFrom<detinfo::LArPropertiesService>();
25 
26  if ( LarProp->ScintPreScale() < 1 ) {
27  mf::LogWarning("DefaultOpDetResponse_service") << "A prescale of " << LarProp->ScintPreScale() << " has been applied during optical MC production, "
28  << "but DefaultOpDetResponse does not include any QE so this effect is not being corrected out.";
29  assert(false);
30  }
31 
32  }
33 
34 
35  //--------------------------------------------------------------------
36  bool DefaultOpDetResponse::doDetected(int OpChannel, const sim::OnePhoton& /*Phot*/, int &newOpChannel) const
37  {
38  newOpChannel = OpChannel;
39  return true;
40  }
41 
42  //--------------------------------------------------------------------
43  bool DefaultOpDetResponse::doDetectedLite(int OpChannel, int &newOpChannel) const
44  {
45  newOpChannel = OpChannel;
46  return true;
47  }
48 
49 
50 
51 } // namespace
52 
Index OpChannel(Index detNum, Index channel)
All information of a photon entering the sensitive optical detector volume.
Definition: SimPhotons.h:64
virtual void doReconfigure(fhicl::ParameterSet const &p)
DefaultOpDetResponse(fhicl::ParameterSet const &pset)
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
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)