15 #include "CLHEP/Random/RandFlat.h" 16 #include <boost/algorithm/string.hpp> 36 double tempfQE = pset.
get<
double>(
"QuantumEfficiency");
47 boost::algorithm::to_lower(tmpAxis);
57 boost::algorithm::to_lower(fChannelConversion);
66 auto const *LarProp = lar::providerFrom<detinfo::LArPropertiesService>();
67 fQE = tempfQE / LarProp->ScintPreScale();
70 mf::LogError(
"DUNEOpDetResponse_service") <<
"Quantum efficiency set in OpDetResponse_service, " << tempfQE
71 <<
" is too large. It is larger than the prescaling applied during simulation, " 72 << LarProp->ScintPreScale()
75 <<
"). Final QE must be equal to or smaller than the QE applied at simulation time.";
106 newOpChannel = geom->
OpChannel(OpDet, hardwareChannel);
109 newOpChannel = OpDet;
113 if ( CLHEP::RandFlat::shoot(1.0) >
fQE )
return false;
123 TGeoBBox *box = (TGeoBBox*)node->GetVolume()->GetShape();
124 double opdetLength = 0;
125 double sipmDistance = 0;
128 opdetLength = box->GetDX();
132 opdetLength = box->GetDY();
136 opdetLength = box->GetDZ();
157 if ( CLHEP::RandFlat::shoot(1.0) > AttenuationProb )
return false;
176 newOpChannel = geom->
OpChannel(OpDet, hardwareChannel);
179 newOpChannel = OpDet;
183 if ( CLHEP::RandFlat::shoot(1.0) >
fQE )
return false;
200 newOpChannel = geom->
OpChannel(OpDet, hardwareChannel);
203 newOpChannel = OpDet;
207 if ( CLHEP::RandFlat::shoot(1.0) >
fQE )
return false;
const TGeoNode * Node() const
Returns the ROOT object describing the detector geometry.
OpDetGeo const & OpDetGeoFromOpDet(unsigned int OpDet) const
Returns the geo::OpDetGeo object for the given detector number.
All information of a photon entering the sensitive optical detector volume.
unsigned int NOpHardwareChannels(int opDet) const
bool doDetectedLiteWithChannel(int OpDet, int &newOpChannel, int &hardwareChannel) const
virtual bool doDetected(int OpDet, const sim::OnePhoton &Phot, int &newOpChannel) const
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
bool fLightGuideAttenuation
unsigned int NOpChannels() const
Number of electronics channels for all the optical detectors.
virtual void doReconfigure(fhicl::ParameterSet const &p)
T get(std::string const &key) const
virtual int doNOpChannels() const
bool fFullSimChannelConvert
unsigned int NOpDets() const
Number of OpDets in the whole detector.
unsigned int OpChannel(int detNum, int hardwareChannel) const
Convert detector number and hardware channel to unique channel.
Encapsulate the geometry of an optical detector.
DUNEOpDetResponse(fhicl::ParameterSet const &pset, art::ActivityRegistry ®)
Index NOpHardwareChannels(Index opDet)
geo::OpticalPoint_t FinalLocalPosition
Where photon enters the optical detector in local coordinates [cm].
virtual bool doDetectedLite(int OpDet, int &newOpChannel) const
float Energy
Scintillation photon energy [GeV].
virtual float wavelength(double energy) const
bool fFastSimChannelConvert
std::string fChannelConversion
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)