LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
DefaultOpDetResponse_service.cc File Reference

Go to the source code of this file.

Classes

class  opdet::DefaultOpDetResponse
 

Namespaces

 opdet
 

Functions

 DECLARE_ART_SERVICE_INTERFACE_IMPL (opdet::DefaultOpDetResponse, opdet::OpDetResponseInterface, LEGACY) namespace opdet
 

Function Documentation

DECLARE_ART_SERVICE_INTERFACE_IMPL ( opdet::DefaultOpDetResponse  ,
opdet::OpDetResponseInterface  ,
LEGACY   
)

Definition at line 30 of file DefaultOpDetResponse_service.cc.

References opdet::DefaultOpDetResponse::DefaultOpDetResponse(), DEFINE_ART_SERVICE_INTERFACE_IMPL, opdet::DefaultOpDetResponse::doDetected(), opdet::DefaultOpDetResponse::doDetectedLite(), and opdet::DefaultOpDetResponse::doReconfigure().

34  {
35  //--------------------------------------------------------------------
36  DefaultOpDetResponse::DefaultOpDetResponse(fhicl::ParameterSet const& pset)
37  {
38  this->doReconfigure(pset);
39  }
40 
41  //--------------------------------------------------------------------
42  void DefaultOpDetResponse::doReconfigure(fhicl::ParameterSet const& pset)
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
All information of a photon entering the sensitive optical detector volume.
Definition: SimPhotons.h:60
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning