Public Member Functions | Private Member Functions | Private Attributes | List of all members
opdet::MicrobooneOpDetResponse Class Reference

#include <MicrobooneOpDetResponse.h>

Inheritance diagram for opdet::MicrobooneOpDetResponse:
opdet::OpDetResponseInterface

Public Member Functions

 MicrobooneOpDetResponse (fhicl::ParameterSet const &pset)
 
- Public Member Functions inherited from opdet::OpDetResponseInterface
virtual ~OpDetResponseInterface ()=default
 
virtual void reconfigure (fhicl::ParameterSet const &p)
 
virtual int NOpChannels () const
 
virtual int readoutToGeoChannel (int readoutChannel) const
 
virtual bool detected (int OpChannel, const sim::OnePhoton &Phot, int &newOpChannel) const
 
virtual bool detected (int OpChannel, const sim::OnePhoton &Phot) const
 
virtual bool detectedLite (int OpChannel, int &newOpChannel) const
 
virtual bool detectedLite (int OpChannel) const
 
virtual float wavelength (double energy) const
 

Private Member Functions

virtual void doReconfigure (fhicl::ParameterSet const &p)
 
virtual bool doDetected (int OpChannel, const sim::OnePhoton &Phot, int &newOpChannel) const
 
virtual bool doDetectedLite (int OpChannel, int &newOpChannel) const
 

Private Attributes

float fQE
 
float fWavelengthCutLow
 
float fWavelengthCutHigh
 

Detailed Description

Definition at line 21 of file MicrobooneOpDetResponse.h.

Constructor & Destructor Documentation

opdet::MicrobooneOpDetResponse::MicrobooneOpDetResponse ( fhicl::ParameterSet const &  pset)

Definition at line 16 of file MicrobooneOpDetResponse_service.cc.

17  {
18  this->doReconfigure(pset);
19  }
virtual void doReconfigure(fhicl::ParameterSet const &p)

Member Function Documentation

bool opdet::MicrobooneOpDetResponse::doDetected ( int  OpChannel,
const sim::OnePhoton Phot,
int &  newOpChannel 
) const
privatevirtual
       Don't apply QE here.  It is applied in the uboone
       electronics simulation.

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

Implements opdet::OpDetResponseInterface.

Definition at line 49 of file MicrobooneOpDetResponse_service.cc.

50  {
51 
52  newOpChannel = OpChannel;
53 
54  /**
55  * Don't apply QE here. It is applied in the uboone
56  * electronics simulation.
57  **
58  // Check QE
59  if ( CLHEP::RandFlat::shoot(1.0) > fQE ) return false;
60  **/
61 
62  double wavel = wavelength(Phot.Energy);
63  // Check wavelength acceptance
64  if (wavel < fWavelengthCutLow) return false;
65  if (wavel > fWavelengthCutHigh) return false;
66 
67  return true;
68  }
Index OpChannel(Index detNum, Index channel)
float Energy
Scintillation photon energy [GeV].
Definition: SimPhotons.h:82
virtual float wavelength(double energy) const
bool opdet::MicrobooneOpDetResponse::doDetectedLite ( int  OpChannel,
int &  newOpChannel 
) const
privatevirtual
       Don't apply QE here.  It is applied in the uboone
       electronics simulation.

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

Implements opdet::OpDetResponseInterface.

Definition at line 71 of file MicrobooneOpDetResponse_service.cc.

72  {
73  newOpChannel = OpChannel;
74 
75  /**
76  * Don't apply QE here. It is applied in the uboone
77  * electronics simulation.
78  **
79  // Check QE
80  if ( CLHEP::RandFlat::shoot(1.0) > fQE ) return false;
81  **/
82 
83  return true;
84  }
Index OpChannel(Index detNum, Index channel)
void opdet::MicrobooneOpDetResponse::doReconfigure ( fhicl::ParameterSet const &  p)
privatevirtual
       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); }

Implements opdet::OpDetResponseInterface.

Definition at line 22 of file MicrobooneOpDetResponse_service.cc.

23  {
24  fQE= pset.get<double>("QuantumEfficiency");
25  //double tempfQE= pset.get<double>("QuantumEfficiency");
26  fWavelengthCutLow= pset.get<double>("WavelengthCutLow");
27  fWavelengthCutHigh= pset.get<double>("WavelengthCutHigh");
28 
29  /**
30  * Don't apply QE here. It is applied in the uboone
31  * electronics simulation.
32  **
33  // Correct out the prescaling applied during simulation
34  auto const* LarProp = lar::providerFrom<detinfo::LArPropertiesService>();
35  fQE = tempfQE / LarProp->ScintPreScale();
36 
37  if (fQE > 1.0001 ) {
38  mf::LogWarning("MicrobooneOpDetResponse_service") << "Quantum efficiency set in OpDetResponse_service, " << tempfQE
39  << " is too large. It is larger than the prescaling applied during simulation, "
40  << LarProp->ScintPreScale()
41  << ". Final QE must be equalt to or smaller than the QE applied at simulation time.";
42  assert(false);
43  }
44  **/
45  }

Member Data Documentation

float opdet::MicrobooneOpDetResponse::fQE
private

Definition at line 32 of file MicrobooneOpDetResponse.h.

float opdet::MicrobooneOpDetResponse::fWavelengthCutHigh
private

Definition at line 35 of file MicrobooneOpDetResponse.h.

float opdet::MicrobooneOpDetResponse::fWavelengthCutLow
private

Definition at line 34 of file MicrobooneOpDetResponse.h.


The documentation for this class was generated from the following files: