16 #include "CLHEP/Random/RandFlat.h" 17 #include <boost/algorithm/string.hpp> 37 double tempfQE = pset.
get<
double>(
"QuantumEfficiency");
38 double tempfQEAraBeam = pset.
get<
double>(
"QuantumEfficiencyArapucaBeam");
39 double tempfQEAraNonBeam = pset.
get<
double>(
"QuantumEfficiencyArapucaNonBeam");
50 boost::algorithm::to_lower(tmpAxis);
60 boost::algorithm::to_lower(fChannelConversion);
69 auto const *LarProp = lar::providerFrom<detinfo::LArPropertiesService>();
70 fQE = tempfQE / LarProp->ScintPreScale();
75 mf::LogError(
"ProtoDUNEOpDetResponse_service") <<
"Quantum efficiency set in OpDetResponse_service, " << tempfQE <<
", " 76 << tempfQEAraBeam <<
", or " << tempfQEAraNonBeam
77 <<
" is too large. It is larger than the prescaling applied during simulation, " 78 << LarProp->ScintPreScale()
79 <<
". Final QE must be equalt to or smaller than the QE applied at simulation time.";
109 newOpChannel = geom->
OpChannel(OpDet, hardwareChannel);
111 newOpChannel = OpDet;
116 TGeoBBox *box = (TGeoBBox*)node->GetVolume()->GetShape();
117 double opdetLength = 0;
118 double sipmDistance = 0;
120 opdetLength = box->GetDX();
124 opdetLength = box->GetDY();
128 opdetLength = box->GetDZ();
136 if(opdetLength > 50){
138 if ( CLHEP::RandFlat::shoot(1.0) >
fQE )
return false;
149 if ( CLHEP::RandFlat::shoot(1.0) > AttenuationProb )
return false;
174 newOpChannel = geom->
OpChannel(OpDet, hardwareChannel);
176 newOpChannel = OpDet;
179 double opdetLength = 0;
181 TGeoBBox *box = (TGeoBBox*)node->GetVolume()->GetShape();
182 opdetLength = box->GetDX();
183 if(opdetLength > 50){
185 if ( CLHEP::RandFlat::shoot(1.0) >
fQE )
return false;
212 newOpChannel = geom->
OpChannel(OpDet, hardwareChannel);
214 newOpChannel = OpDet;
217 double opdetLength = 0;
219 TGeoBBox *box = (TGeoBBox*)node->GetVolume()->GetShape();
220 opdetLength = box->GetDX();
221 if(opdetLength > 50){
223 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.
virtual void doReconfigure(fhicl::ParameterSet const &p)
unsigned int NOpHardwareChannels(int opDet) const
~ProtoDUNEOpDetResponse()
void GetCenter(double *xyz, double localz=0.0) const
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
ProtoDUNEOpDetResponse(fhicl::ParameterSet const &pset, art::ActivityRegistry ®)
bool fFastSimChannelConvert
unsigned int NOpChannels() const
Number of electronics channels for all the optical detectors.
virtual bool doDetected(int OpDet, const sim::OnePhoton &Phot, int &newOpChannel) const
T get(std::string const &key) const
std::string fChannelConversion
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.
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
virtual int doNOpChannels() const
bool fLightGuideAttenuation
bool doDetectedLiteWithChannel(int OpDet, int &newOpChannel, int &hardwareChannel) const
float Energy
Scintillation photon energy [GeV].
virtual float wavelength(double energy) const
OpDetGeo const & OpDetGeoFromOpChannel(unsigned int OpChannel) const
Returns the geo::OpDetGeo object for the given channel number.
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)