All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
opdet::MicrobooneOpDetResponse Class Reference
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

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

Private Attributes

float fQE
 
float fWavelengthCutLow
 
float fWavelengthCutHigh
 

Detailed Description

Definition at line 15 of file MicrobooneOpDetResponse_service.cc.

Constructor & Destructor Documentation

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

Definition at line 38 of file MicrobooneOpDetResponse_service.cc.

39  {
40  this->doReconfigure(pset);
41  }
void doReconfigure(fhicl::ParameterSet const &p) override

Member Function Documentation

bool opdet::MicrobooneOpDetResponse::doDetected ( int  OpChannel,
const sim::OnePhoton Phot,
int &  newOpChannel 
) const
overrideprivatevirtual
   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 
74  newOpChannel = OpChannel;
75 
76  /**
77  * Don't apply QE here. It is applied in the uboone
78  * electronics simulation.
79  **
80  // Check QE
81  if ( CLHEP::RandFlat::shoot(1.0) > fQE ) return false;
82  **/
83 
84  double wavel = wavelength(Phot.Energy);
85  // Check wavelength acceptance
86  if (wavel < fWavelengthCutLow) return false;
87  if (wavel > fWavelengthCutHigh) return false;
88 
89  return true;
90  }
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
overrideprivatevirtual
   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 93 of file MicrobooneOpDetResponse_service.cc.

94  {
95  newOpChannel = OpChannel;
96 
97  /**
98  * Don't apply QE here. It is applied in the uboone
99  * electronics simulation.
100  **
101  // Check QE
102  if ( CLHEP::RandFlat::shoot(1.0) > fQE ) return false;
103  **/
104 
105  return true;
106  }
void opdet::MicrobooneOpDetResponse::doReconfigure ( fhicl::ParameterSet const &  p)
overrideprivatevirtual
   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 44 of file MicrobooneOpDetResponse_service.cc.

45  {
46  fQE= pset.get<double>("QuantumEfficiency");
47  //double tempfQE= pset.get<double>("QuantumEfficiency");
48  fWavelengthCutLow= pset.get<double>("WavelengthCutLow");
49  fWavelengthCutHigh= pset.get<double>("WavelengthCutHigh");
50 
51  /**
52  * Don't apply QE here. It is applied in the uboone
53  * electronics simulation.
54  **
55  // Correct out the prescaling applied during simulation
56  auto const* LarProp = lar::providerFrom<detinfo::LArPropertiesService>();
57  fQE = tempfQE / LarProp->ScintPreScale();
58 
59  if (fQE > 1.0001 ) {
60  mf::LogWarning("MicrobooneOpDetResponse_service") << "Quantum efficiency set in OpDetResponse_service, " << tempfQE
61  << " is too large. It is larger than the prescaling applied during simulation, "
62  << LarProp->ScintPreScale()
63  << ". Final QE must be equalt to or smaller than the QE applied at simulation time.";
64  assert(false);
65  }
66  **/
67  }

Member Data Documentation

float opdet::MicrobooneOpDetResponse::fQE
private

Definition at line 26 of file MicrobooneOpDetResponse_service.cc.

float opdet::MicrobooneOpDetResponse::fWavelengthCutHigh
private

Definition at line 29 of file MicrobooneOpDetResponse_service.cc.

float opdet::MicrobooneOpDetResponse::fWavelengthCutLow
private

Definition at line 28 of file MicrobooneOpDetResponse_service.cc.


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