LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
opdet::MicrobooneOpDetResponse Class Reference

#include "MicrobooneOpDetResponse.h"

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

Public Member Functions

 MicrobooneOpDetResponse (fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)
 
 ~MicrobooneOpDetResponse () throw ()
 
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,
art::ActivityRegistry reg 
)

Definition at line 18 of file MicrobooneOpDetResponse_service.cc.

References doReconfigure().

20  {
21  this->doReconfigure(pset);
22  }
virtual void doReconfigure(fhicl::ParameterSet const &p)
opdet::MicrobooneOpDetResponse::~MicrobooneOpDetResponse ( )
throw (
)

Definition at line 25 of file MicrobooneOpDetResponse_service.cc.

26  { }

Member Function Documentation

bool opdet::OpDetResponseInterface::detected ( int  OpChannel,
const sim::OnePhoton Phot,
int &  newOpChannel 
) const
inlinevirtualinherited

Definition at line 102 of file OpDetResponseInterface.h.

References opdet::OpDetResponseInterface::doDetected().

Referenced by opdet::SimPhotonCounter::analyze(), and opdet::OpMCDigi::produce().

103  {
104  return doDetected(OpChannel, Phot, newOpChannel);
105  }
virtual bool doDetected(int OpChannel, const sim::OnePhoton &Phot, int &newOpChannel) const =0
bool opdet::OpDetResponseInterface::detected ( int  OpChannel,
const sim::OnePhoton Phot 
) const
inlinevirtualinherited

Definition at line 108 of file OpDetResponseInterface.h.

References opdet::OpDetResponseInterface::doDetected().

109  {
110  int newOpChannel;
111  return doDetected(OpChannel, Phot, newOpChannel);
112  }
virtual bool doDetected(int OpChannel, const sim::OnePhoton &Phot, int &newOpChannel) const =0
bool opdet::OpDetResponseInterface::detectedLite ( int  OpChannel,
int &  newOpChannel 
) const
inlinevirtualinherited

Definition at line 115 of file OpDetResponseInterface.h.

References opdet::OpDetResponseInterface::doDetectedLite().

Referenced by opdet::SimPhotonCounter::analyze(), and opdet::OpMCDigi::produce().

116  {
117  return doDetectedLite(OpChannel, newOpChannel);
118  }
virtual bool doDetectedLite(int OpChannel, int &newOpChannel) const =0
bool opdet::OpDetResponseInterface::detectedLite ( int  OpChannel) const
inlinevirtualinherited

Definition at line 121 of file OpDetResponseInterface.h.

References opdet::OpDetResponseInterface::doDetectedLite().

122  {
123  int newOpChannel;
124  return doDetectedLite(OpChannel, newOpChannel);
125  }
virtual bool doDetectedLite(int OpChannel, int &newOpChannel) const =0
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 57 of file MicrobooneOpDetResponse_service.cc.

References sim::OnePhoton::Energy, fWavelengthCutHigh, fWavelengthCutLow, and opdet::OpDetResponseInterface::wavelength().

58  {
59 
60  newOpChannel = OpChannel;
61 
70  double wavel = wavelength(Phot.Energy);
71  // Check wavelength acceptance
72  if (wavel < fWavelengthCutLow) return false;
73  if (wavel > fWavelengthCutHigh) return false;
74 
75  return true;
76  }
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 79 of file MicrobooneOpDetResponse_service.cc.

References DEFINE_ART_SERVICE_INTERFACE_IMPL.

80  {
81  newOpChannel = OpChannel;
82 
91  return true;
92  }
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 30 of file MicrobooneOpDetResponse_service.cc.

References fQE, fWavelengthCutHigh, fWavelengthCutLow, and fhicl::ParameterSet::get().

Referenced by MicrobooneOpDetResponse().

31  {
32  fQE= pset.get<double>("QuantumEfficiency");
33  //double tempfQE= pset.get<double>("QuantumEfficiency");
34  fWavelengthCutLow= pset.get<double>("WavelengthCutLow");
35  fWavelengthCutHigh= pset.get<double>("WavelengthCutHigh");
36 
53  }
int opdet::OpDetResponseInterface::NOpChannels ( ) const
inlinevirtualinherited
int opdet::OpDetResponseInterface::readoutToGeoChannel ( int  readoutChannel) const
inlinevirtualinherited

Definition at line 85 of file OpDetResponseInterface.h.

References opdet::OpDetResponseInterface::doReadoutToGeoChannel().

86  {
87  return doReadoutToGeoChannel(readoutChannel);
88  }
virtual int doReadoutToGeoChannel(int readoutChannel) const
void opdet::OpDetResponseInterface::reconfigure ( fhicl::ParameterSet const &  p)
inlinevirtualinherited

Definition at line 62 of file OpDetResponseInterface.h.

References opdet::OpDetResponseInterface::doReconfigure().

63  {
64  doReconfigure(p);
65  }
virtual void doReconfigure(fhicl::ParameterSet const &p)=0
float opdet::OpDetResponseInterface::wavelength ( double  energy) const
inlinevirtualinherited

Definition at line 128 of file OpDetResponseInterface.h.

References DECLARE_ART_SERVICE_INTERFACE, and energy.

Referenced by opdet::SimPhotonCounter::analyze(), and doDetected().

129  {
130  return (2.0*3.142)*0.000197/energy;
131  }
double energy
Definition: plottest35.C:25

Member Data Documentation

float opdet::MicrobooneOpDetResponse::fQE
private

Definition at line 35 of file MicrobooneOpDetResponse.h.

Referenced by doReconfigure().

float opdet::MicrobooneOpDetResponse::fWavelengthCutHigh
private

Definition at line 38 of file MicrobooneOpDetResponse.h.

Referenced by doDetected(), and doReconfigure().

float opdet::MicrobooneOpDetResponse::fWavelengthCutLow
private

Definition at line 37 of file MicrobooneOpDetResponse.h.

Referenced by doDetected(), and doReconfigure().


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