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

Go to the source code of this file.

Classes

class  opdet::MicrobooneOpDetResponse
 

Namespaces

 opdet
 

Functions

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

Function Documentation

DECLARE_ART_SERVICE_INTERFACE_IMPL ( opdet::MicrobooneOpDetResponse  ,
opdet::OpDetResponseInterface  ,
LEGACY   
)
   Don't apply QE here.  It is applied in the uboone
   electronics simulation.

Correct out the prescaling applied during simulation auto const* LarProp = lar::providerFrom<detinfo::LArPropertiesService>(); fQE = tempfQE / LarProp->ScintPreScale();

if (fQE > 1.0001 ) { mf::LogWarning("MicrobooneOpDetResponse_service") << "Quantum efficiency set in OpDetResponse_service, " << tempfQE << " is too large. It is larger than the prescaling applied during simulation, " << LarProp->ScintPreScale() << ". Final QE must be equalt to or smaller than the QE applied at simulation time."; assert(false); }

   Don't apply QE here.  It is applied in the uboone
   electronics simulation.

Check QE if ( CLHEP::RandFlat::shoot(1.0) > fQE ) return false;

   Don't apply QE here.  It is applied in the uboone
   electronics simulation.

Check QE if ( CLHEP::RandFlat::shoot(1.0) > fQE ) return false;

Definition at line 30 of file MicrobooneOpDetResponse_service.cc.

References DEFINE_ART_SERVICE_INTERFACE_IMPL, opdet::MicrobooneOpDetResponse::doDetected(), opdet::MicrobooneOpDetResponse::doDetectedLite(), opdet::MicrobooneOpDetResponse::doReconfigure(), sim::OnePhoton::Energy, opdet::MicrobooneOpDetResponse::fQE, opdet::MicrobooneOpDetResponse::fWavelengthCutHigh, opdet::MicrobooneOpDetResponse::fWavelengthCutLow, fhicl::ParameterSet::get(), opdet::MicrobooneOpDetResponse::MicrobooneOpDetResponse(), and opdet::OpDetResponseInterface::wavelength().

34  {
35  //--------------------------------------------------------------------
36  MicrobooneOpDetResponse::MicrobooneOpDetResponse(fhicl::ParameterSet const& pset)
37  {
38  this->doReconfigure(pset);
39  }
40 
41  //--------------------------------------------------------------------
42  void MicrobooneOpDetResponse::doReconfigure(fhicl::ParameterSet const& pset)
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
All information of a photon entering the sensitive optical detector volume.
Definition: SimPhotons.h:60
T get(std::string const &key) const
Definition: ParameterSet.h:314
float Energy
Scintillation photon energy [GeV].
Definition: SimPhotons.h:78