Jpp
pmt_effective_area_update_2
the software that should make you happy
|
PMT signal processor interface. More...
#include <JPMTSignalProcessorInterface.hh>
Public Types | |
enum | JThresholdDomains { BELOW_THRESHOLDBAND = -1, IN_THRESHOLDBAND = 0, ABOVE_THRESHOLD = 2 } |
Threshold domain specifiers. More... | |
Public Member Functions | |
JPMTSignalProcessorInterface (const double max_charge=100.0) | |
Default constructor. More... | |
virtual | ~JPMTSignalProcessorInterface () |
Virtual destructor. More... | |
void | operator() (const JCalibration &calibration, const JPMTData< JPMTSignal > &input, JPMTData< JPMTPulse > &output) const |
Process hits. More... | |
virtual bool | applyQE () const |
Apply relative QE. More... | |
virtual double | getRandomTime (const double t_ns) const |
Get randomised time according transition time distribution. More... | |
virtual bool | compare (const JPhotoElectron &first, const JPhotoElectron &second) const |
Compare arrival times of photo-electrons. More... | |
virtual double | getRandomCharge (const int NPE) const |
Get randomised charge in accordance with gain and gain spread. More... | |
virtual double | getChargeProbability (const double npe, const int NPE) const |
Get probability for given charge. More... | |
virtual JThresholdDomains | applyThreshold (const double npe) const |
Apply threshold. More... | |
virtual double | getRiseTime (const double npe) const |
Get time to pass threshold. More... | |
virtual double | getTimeOverThreshold (const double npe) const |
Get time over threshold (ToT). More... | |
virtual double | getDerivative (const double npe) const |
Get derivative of number of photo-electrons to time over threshold. More... | |
virtual double | getSurvivalProbability (const int NPE) const |
Probability that a hit survives the simulation of the PMT. More... | |
virtual void | merge (JPMTData< JPMTPulse > &data) const |
Merging of PMT hits. More... | |
virtual double | getNPE (const double tot_ns, const double eps=1.0e-3) const |
Get number of photo-electrons. More... | |
Static Public Member Functions | |
static double | getTmin () |
Get two photo-electron resolution for time-over-threshold. More... | |
static double | getQmin () |
Get minimal width of charge distribution. More... | |
Protected Attributes | |
double | MAX_CHARGE |
Maximum charge [npe]. More... | |
Private Attributes | |
JPMTData< JPhotoElectron > | buffer |
PMT signal processor interface.
This class supports the implementation of the PMT simulator interface using an alternative set of virtual methods. These methods constitute a user interface to the expected performance of a PMT.
Each photon is converted to a photo-electron using member method JPMTSignalProcessorInterface::getRandomTime. For this, the data structure JPhotoElectron is used. Note that the quantum efficiency (QE) of the PMT actually is included in the simulation of the detector response. All photo-electrons are then time sorted. The photo-electrons which simultaneously arrive are merged. The corresponding condition is defined by member method JPMTSignalProcessorInterface::compare. The time of the combined signal is determined by the time of the first photo-electron and the rise time of the analogue pulse to the threshold of the discriminator. In this, the actual amplitude of the combined analogue signal and the calibration of the PMT are taken into account. The amplitude of the combined analogue signal is simulated using member method JPMTSignalProcessorInterface::getRandomCharge. For this, the data structure JPMTSignal is used.
The analogue signals of the PMT are processed by a discriminator. This discriminator produces a time-over-threshold signal for each analogue signal that passes a preset threshold. The output signal is described by the time of the leading edge and the length of the time-over-threshold signal. For this, the data structure JPMTPulse is used. The determination of the time of the leading edge and the length of the time-over-threshold signal require a designated model. The class JPMTAnalogueSignalProcessor provides for an implementation of such a model.
Overlapping time-over-threshold pulses are merged. The time of the leading edge is then set to the earliest leading edge and the time-over-threshold to the difference between the latest trailing edge and the earliest leading edge. The merging of hits is implemented in member method JPMTSignalProcessorInterface::merge.
The default implementation of these virtual methods corresponds to no smearing and a time-over-threshold value equal to a fixed two photo-electron resolution. The width of the charge distribution and the two photo-electron resolution are implemented in methods JPMTSignalProcessorInterface::getQmin() and JPMTSignalProcessorInterface::getTmin(), respectively. For a realistic PMT simulation, the derived class should provide for an implementation of each of these virtual methods.
Definition at line 69 of file JPMTSignalProcessorInterface.hh.
Threshold domain specifiers.
Enumerator | |
---|---|
BELOW_THRESHOLDBAND |
below threshold band |
IN_THRESHOLDBAND |
inside threshold band |
ABOVE_THRESHOLD |
above threshold band |
Definition at line 89 of file JPMTSignalProcessorInterface.hh.
|
inline |
Default constructor.
Definition at line 74 of file JPMTSignalProcessorInterface.hh.
|
inlinevirtual |
|
inline |
Process hits.
calibration | PMT calibration |
input | PMT signals |
output | PMT hits |
Definition at line 103 of file JPMTSignalProcessorInterface.hh.
|
inlinevirtual |
Apply relative QE.
The default implementation returns always true
.
Reimplemented in JDETECTOR::JPMTAnalogueSignalProcessor.
Definition at line 155 of file JPMTSignalProcessorInterface.hh.
|
inlinevirtual |
Get randomised time according transition time distribution.
The default implementation returns the given value.
t_ns | time [ns] |
Reimplemented in JDETECTOR::JPMTAnalogueSignalProcessor.
Definition at line 168 of file JPMTSignalProcessorInterface.hh.
|
inlinevirtual |
Compare arrival times of photo-electrons.
Two (or more) photo-electrons are merged if they are comparable. The default implementation returns uses JPMTSignalProcessorInterface::getTmin() as time window.
first | first photo-electron |
second | second photo-electron |
Reimplemented in JDETECTOR::JPMTAnalogueSignalProcessor.
Definition at line 184 of file JPMTSignalProcessorInterface.hh.
|
inlinevirtual |
Get randomised charge in accordance with gain and gain spread.
The default implementation returns the given value.
NPE | number of photo-electrons |
Reimplemented in JDETECTOR::JPMTAnalogueSignalProcessor.
Definition at line 197 of file JPMTSignalProcessorInterface.hh.
|
inlinevirtual |
Get probability for given charge.
npe | observed number of photo-electrons |
NPE | true number of photo-electrons |
Reimplemented in JDETECTOR::JPMTAnalogueSignalProcessor.
Definition at line 210 of file JPMTSignalProcessorInterface.hh.
|
inlinevirtual |
Apply threshold.
The default implementation returns always ABOVE_THRESHOLD
.
npe | number of photo-electrons |
Reimplemented in JDETECTOR::JPMTAnalogueSignalProcessor.
Definition at line 223 of file JPMTSignalProcessorInterface.hh.
|
inlinevirtual |
Get time to pass threshold.
The default implementation returns 0
.
npe | number of photo-electrons |
Reimplemented in JDETECTOR::JPMTAnalogueSignalProcessor.
Definition at line 236 of file JPMTSignalProcessorInterface.hh.
|
inlinevirtual |
Get time over threshold (ToT).
The default implementation returns JPMTSignalProcessorInterface::getTmin().
npe | number of photo-electrons |
Reimplemented in JDETECTOR::JPMTAnalogueSignalProcessor.
Definition at line 249 of file JPMTSignalProcessorInterface.hh.
|
inlinevirtual |
Get derivative of number of photo-electrons to time over threshold.
The default implementation returns infinity.
npe | number of photo-electrons |
Reimplemented in JDETECTOR::JPMTAnalogueSignalProcessor.
Definition at line 262 of file JPMTSignalProcessorInterface.hh.
|
inlinevirtual |
Probability that a hit survives the simulation of the PMT.
The default implementation returns 1
if given value larger than 0
.
NPE | number of photo-electrons |
Reimplemented in JDETECTOR::JPMTAnalogueSignalProcessor.
Definition at line 275 of file JPMTSignalProcessorInterface.hh.
|
inlinevirtual |
Merging of PMT hits.
Hits with overlapping time-over-threshold signals should -de facto- be combined. In this, the leading edge is maintained and the time-over-threshold is set to the difference between the overall trailing and leading edges. As a result, the number of PMT hits may be reduced.
data | PMT hits |
Definition at line 294 of file JPMTSignalProcessorInterface.hh.
|
inlinevirtual |
Get number of photo-electrons.
The default implementation finds the time-over-threshold iteratively.
tot_ns | time over threshold [ns] |
eps | precision |
Reimplemented in JDETECTOR::JPMTAnalogueSignalProcessor.
Definition at line 327 of file JPMTSignalProcessorInterface.hh.
|
inlinestatic |
Get two photo-electron resolution for time-over-threshold.
Definition at line 380 of file JPMTSignalProcessorInterface.hh.
|
inlinestatic |
Get minimal width of charge distribution.
Definition at line 391 of file JPMTSignalProcessorInterface.hh.
|
protected |
Maximum charge [npe].
Definition at line 398 of file JPMTSignalProcessorInterface.hh.
|
mutableprivate |
Definition at line 401 of file JPMTSignalProcessorInterface.hh.