All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Member Functions | List of all members
icarus::opdet::SinglePhotonPulseFunctionTool Struct Referenceabstract

Creates a PhotoelectronPulseFunction pulse shape. More...

#include <SinglePhotonPulseFunctionTool.h>

Inheritance diagram for icarus::opdet::SinglePhotonPulseFunctionTool:
icarus::opdet::AsymExpPulseFunctionTool icarus::opdet::AsymGaussPulseFunctionTool icarus::opdet::CustomPulseFunctionTool icarus::opdet::SampledWaveformFunctionTool

Public Types

using nanoseconds = util::quantities::nanosecond
 Convenience definition for time stored in nanoseconds. More...
 
using PulseFunction_t = icarus::opdet::PhotoelectronPulseFunction< nanoseconds >
 Type of function returned. More...
 

Public Member Functions

virtual ~SinglePhotonPulseFunctionTool ()=default
 
std::unique_ptr< PulseFunction_tgetPulseFunction ()
 Returns an instance of the pulse function. More...
 

Private Member Functions

virtual std::unique_ptr
< PulseFunction_t
doGetPulseFunction ()=0
 Returns an instance of the pulse function. More...
 

Detailed Description

Creates a PhotoelectronPulseFunction pulse shape.

Implementations of this tool create a function representing the single photon response of a PMT, as an object derived from icarus::opdet::PhotoelectronPulseFunction<nanosecond>.

The envisioned usage of this tool is from a temporary, one-time-only call:

std::unique_ptr<icarus::opdet::PhotoelectronPulseFunction<nanosecond>> pulse
= art::make_tool<icarus::opdet::SinglePhotonPulseFunctionTool>(config)
;

where pset is the FHiCL parameter set configuration for the tool (the type of pulse can be safely declared auto). The tool object itself is useless after the first use, and should be disposed of.

The configuration of the tool is implementation-dependent.

Definition at line 52 of file SinglePhotonPulseFunctionTool.h.

Member Typedef Documentation

Convenience definition for time stored in nanoseconds.

Definition at line 55 of file SinglePhotonPulseFunctionTool.h.

Type of function returned.

Definition at line 59 of file SinglePhotonPulseFunctionTool.h.

Constructor & Destructor Documentation

virtual icarus::opdet::SinglePhotonPulseFunctionTool::~SinglePhotonPulseFunctionTool ( )
virtualdefault

Member Function Documentation

virtual std::unique_ptr<PulseFunction_t> icarus::opdet::SinglePhotonPulseFunctionTool::doGetPulseFunction ( )
privatepure virtual

Returns an instance of the pulse function.

Only the first call is guaranteed to return a non-null pointer.

Implemented in icarus::opdet::SampledWaveformFunctionTool, icarus::opdet::AsymExpPulseFunctionTool, icarus::opdet::CustomPulseFunctionTool, and icarus::opdet::AsymGaussPulseFunctionTool.

auto icarus::opdet::SinglePhotonPulseFunctionTool::getPulseFunction ( )
inline

Returns an instance of the pulse function.

This function is guaranteed to return a valid pulse function only once. The return value on following calls is undefined, but it is considered an error to return a null pointer.

See the description of the class for an usage example.

Definition at line 98 of file SinglePhotonPulseFunctionTool.h.

100 {
101  auto ptr = doGetPulseFunction();
102  assert(ptr);
103  return ptr;
104 } // icarus::opdet::SinglePhotonPulseFunctionTool::getPulseFunction() &&
virtual std::unique_ptr< PulseFunction_t > doGetPulseFunction()=0
Returns an instance of the pulse function.

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