|
Jpp 21.0.0-rc.1-88-g0130508c4
the software that should make you happy
|
PMT analogue signal processor. More...
#include <JPMTAnalogueSignalProcessor.hh>
Public Types | |
| enum | JThresholdDomain { BELOW_THRESHOLD = -1 , THRESHOLDBAND = 0 , ABOVE_THRESHOLD = 2 } |
| Threshold domain specifiers. More... | |
Public Member Functions | |
| JPMTAnalogueSignalProcessor (const JPMTParameters ¶meters=JPMTParameters()) | |
| Constructor. | |
| void | configure () |
| Configure internal parameters. | |
| double | getDecayTime () const |
| Get decay time. | |
| double | getT1 () const |
| Get time at transition point from Gaussian to exponential. | |
| double | getY1 () const |
| Get amplitude at transition point from Gaussian to exponential. | |
| double | getStartOfLinearisation () const |
| Get transition point from a model-dependent to linear relation between time-over-threshold and number of photo-electrons. | |
| double | getAmplitude (const double t1_ns) const |
| Get amplitude at given time for a one photo-electron pulse. | |
| double | getRiseTime (const double npe, const double th) const |
| Get time to pass from threshold to top of analogue pulse. | |
| double | getDecayTime (const double npe, const double th) const |
| Get time to pass from top of analogue pulse to threshold. | |
| double | applySaturation (const double tot_ns) const |
| Get time-over-threshold with saturation. | |
| double | removeSaturation (const double tot_ns) const |
| Get time-over-threshold without saturation. | |
| double | getDerivativeOfSaturation (const double tot_ns) const |
| Get derivative of saturation factor. | |
| double | getGainSpread () const |
| Get gain spread for given number of photo-electrons. | |
| double | getGainSpread (int NPE) const |
| Get gain spread for given number of photo-electrons. | |
| double | getUnderamplifiedGain () const |
| Get gain of underamplified pulses. | |
| double | getUnderamplifiedGain (int NPE) const |
| Get gain of underamplified pulses. | |
| double | getUnderamplifiedGainSpread () const |
| Get gain spread of underamplified pulses. | |
| double | getUnderamplifiedGainSpread (int NPE) const |
| Get gain spread of underamplified pulses. | |
| void | setPMTParameters (const JPMTParameters ¶meters) |
| Set PMT parameters. | |
| JThresholdDomain | getThresholdDomain (const double npe) const |
| Get threshold domain. | |
| virtual bool | applyQE () const override |
| Apply relative QE. | |
| virtual double | getRandomTime (const double t_ns) const override |
| Get randomised time according transit-time distribution. | |
| virtual bool | compare (const JPhotoElectron &first, const JPhotoElectron &second) const override |
| Compare arrival times of photo-electrons. | |
| virtual double | getRandomCharge (const int NPE) const override |
| Get randomised charge according to gain and gain spread. | |
| virtual double | getChargeProbability (const double npe, const int NPE) const override |
| Get probability density for given charge. | |
| double | getChargeProbability (const double npe, const int NPE, const double normTh) const |
| Get probability density for given charge. | |
| double | getIntegralOfChargeProbability (const double xmin, const double xmax, const int NPE) const |
| Get integral of probability. | |
| double | getIntegralOfChargeProbability (const double xmin, const double xmax, const int NPE, const double normTh) const |
| Get integral of probability. | |
| double | getIntegralOfChargeProbability (const double xmin, const int NPE) const |
| Get integral of probability. | |
| double | getIntegralOfChargeProbability (const JThresholdDomain domain, const int NPE) const |
| Get integral of probability in specific threshold domain. | |
| virtual bool | applyThreshold (const double npe) const override |
| Apply threshold. | |
| virtual double | getRiseTime (const double npe) const override |
| Get time to reach threshold. | |
| virtual double | getTimeOverThreshold (const double npe) const override |
| Get time-over-threshold (ToT). | |
| virtual double | getDerivative (const double npe) const override |
| Get derivative of number of photo-electrons to time-over-threshold. | |
| virtual double | getSurvivalProbability (const int NPE) const override |
| Probability that a hit survives the simulation of the PMT. | |
| virtual double | getThresholdProbability (const int NPE) const override |
| Probability that a hit survives the threshold of the PMT. | |
| virtual double | getNPE (const double tot_ns) const override |
| Get number of photo-electrons. | |
| double | getTimeOverThresholdProbability (const double tot_ns, const int NPE) const |
| Get probability of having a pulse with specific time-over-threshold. | |
| double | getIntegralOfTimeOverThresholdProbability (const double Tmin, const double Tmax, const int NPE) const |
| Get cumulative probability of time-over-threshold distribution. | |
| void | operator() (const JCalibration &calibration, const JPMTData< JPMTSignal > &input, JPMTData< JPMTPulse > &output) const |
| Process hits. | |
| virtual void | merge (JPMTData< JPMTPulse > &data) const |
| Merging of PMT hits. | |
| const JPMTParameters & | getPMTParameters () const |
| Get PMT parameters. | |
| bool | is_valid () const |
| Check validity of PMT parameters. | |
| int | getType () const |
| Get type for for time-slewing correction. | |
| JProperties | getProperties (const JEquationParameters &equation=JPMTParameters::getEquationParameters()) |
| Get properties of this class. | |
| JProperties | getProperties (const JEquationParameters &equation=JPMTParameters::getEquationParameters()) const |
| Get properties of this class. | |
Static Public Member Functions | |
| static double | getMaximalRiseTime (const double th) |
| Get maximal rise time for given threshold. | |
| static double | getTH0 () |
| Get lower threshold for rise time evaluation. | |
| static double | getTH1 () |
| Get upper threshold for rise time evaluation. | |
| static double | getTmin () |
| Get two photo-electron resolution for time-over-threshold. | |
| static double | getQmin () |
| Get width of charge distribution. | |
| static JEquationParameters & | getEquationParameters () |
| Get equation parameters. | |
| static void | setEquationParameters (const JEquationParameters &equation) |
| Set equation parameters. | |
Public Attributes | |
| double | QE |
| relative quantum efficiency | |
| double | gain |
| gain [unit] | |
| double | gainSpread |
| gain spread [unit] | |
| double | riseTime_ns |
| rise time of analogue pulse [ns] | |
| double | TTS_ns |
| transition time spread [ns] | |
| double | threshold |
| threshold [npe] | |
| double | PunderAmplified |
| probability of underamplified hit | |
| double | thresholdBand |
| threshold-band [npe] | |
| double | mean_ns |
| mean time-over-threshold of threshold-band hits [ns] | |
| double | sigma_ns |
| time-over-threshold standard deviation of threshold-band hits [ns] | |
| double | slope |
| slope [ns/npe] | |
| double | saturation |
| saturation [ns] | |
| bool | slewing |
| time slewing of analogue signal | |
Protected Attributes | |
| double | decayTime_ns |
| decay time [ns] | |
| double | t1 |
| time at match point [ns] | |
| double | y1 |
| amplitude at match point [npe] | |
| double | x1 |
| Transition point from a logarithmic to a linear relation between time-over-threshold and number of photo-electrons. | |
Private Member Functions | |
| double | getNormalisedGauss (const double x, const double x0, const double sigma, const double normXmin, const double normXmax) const |
| Gauss function normalised to a configurable domain. | |
| double | getIntegralOfNormalisedGauss (const double xmin, const double xmax, const double x0, const double sigma, const double normXmin, const double normXmax) const |
| Integral of Gauss function normalised to a configurable domain. | |
Friends | |
| std::istream & | operator>> (std::istream &in, JPMTAnalogueSignalProcessor &object) |
| Read PMT signal from input. | |
PMT analogue signal processor.
This class provides for an implementation of the JDETECTOR::JPMTSignalProcessorInterface using a specific model for the analogue pulse of the PMT.
In this, the leading edge of the analogue pulse from the PMT is assumed to be a Gaussian and the tail an exponential.
The width of the Gaussian is referred to as the rise time and the inverse slope of the exponential to the decay time.
The two functions are matched at a point where the values and first derivatives are identical.
Note that the decay time is related to the rise time via the specification JDETECTOR::TIME_OVER_THRESHOLD_NS.
The charge distribution is assumed to be a Gaussian which is centered at the specified gain and truncated by the specified threshold.
The transit times are generated according the specified spread as follows.
Definition at line 52 of file JPMTAnalogueSignalProcessor.hh.
Threshold domain specifiers.
| Enumerator | |
|---|---|
| BELOW_THRESHOLD | below threshold |
| THRESHOLDBAND | inside threshold band |
| ABOVE_THRESHOLD | above threshold |
Definition at line 59 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Constructor.
| parameters | PMT parameters |
Definition at line 71 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Configure internal parameters.
This method provides the implementations for
Note that this method will throw an error if the value of the rise time (i.e. width of the Gaussian) is too large with respect to the specification JDETECTOR::TIME_OVER_THRESHOLD_NS.
Definition at line 94 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get decay time.
Definition at line 175 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get time at transition point from Gaussian to exponential.
Definition at line 186 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get amplitude at transition point from Gaussian to exponential.
Definition at line 197 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get transition point from a model-dependent to linear relation between time-over-threshold and number of photo-electrons.
Definition at line 208 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get amplitude at given time for a one photo-electron pulse.
| t1_ns | time [ns] |
Definition at line 220 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get time to pass from threshold to top of analogue pulse.
In this, the leading edge of the analogue pulse is assumed to be Gaussian.
| npe | number of photo-electrons |
| th | threshold [npe] |
Definition at line 245 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get time to pass from top of analogue pulse to threshold.
In this, the trailing edge of the analogue pulse is assumed to be exponential.
| npe | number of photo-electrons |
| th | threshold [npe] |
Definition at line 259 of file JPMTAnalogueSignalProcessor.hh.
|
inlinestatic |
Get maximal rise time for given threshold.
Note that the rise time is entirely constrained by the specification JDETECTOR::TIME_OVER_THRESHOLD_NS.
| th | threshold [npe] |
Definition at line 276 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get time-over-threshold with saturation.
| tot_ns | time-over-threshold without saturation |
Definition at line 291 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get time-over-threshold without saturation.
| tot_ns | time-over-threshold with saturation |
Definition at line 303 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get derivative of saturation factor.
| tot_ns | time-over-threshold without saturation |
Definition at line 318 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get gain spread for given number of photo-electrons.
Definition at line 329 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get gain spread for given number of photo-electrons.
| NPE | number of photo-electrons |
Definition at line 341 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get gain of underamplified pulses.
Definition at line 352 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get gain of underamplified pulses.
| NPE | number of photo-electrons |
Definition at line 364 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get gain spread of underamplified pulses.
Definition at line 375 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get gain spread of underamplified pulses.
| NPE | number of photo-electrons |
Definition at line 387 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Set PMT parameters.
| parameters | PMT parameters |
Definition at line 398 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get threshold domain.
| npe | number of photo-electrons |
Definition at line 429 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Apply relative QE.
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 451 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Get randomised time according transit-time distribution.
| t_ns | time [ns] |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 468 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Compare arrival times of photo-electrons.
This implementation uses the internal rise time as two photo-electron resolution.
Two (or more) photo-electrons are merged if they are comparable.
| first | first photo-electron |
| second | second photo-electron |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 489 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Get randomised charge according to gain and gain spread.
| NPE | number of photo-electrons |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 501 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Get probability density for given charge.
The normalisation is from (threshold-thresholdband) to infinity.
| npe | observed number of photo-electrons |
| NPE | true number of photo-electrons |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 574 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get probability density for given charge.
The normalisation is from a configurable threshold to infinity.
| npe | observed number of photo-electrons |
| NPE | true number of photo-electrons |
| normTh | normalisation threshold |
Definition at line 667 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get integral of probability.
The normalisation is from (threshold-thresholdband) to infinity.
| xmin | minimum number of photo-electrons |
| xmax | maximum number of photo-electrons |
| NPE | true number of photo-electrons |
Definition at line 766 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get integral of probability.
The normalisation is from a configurable threshold to infinity.
| xmin | minimum number of photo-electrons |
| xmax | maximum number of photo-electrons |
| NPE | true number of photo-electrons |
| normTh | normalisation threshold |
Definition at line 872 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get integral of probability.
The maximum number of photo-electrons is infinity. The normalisation is from (threshold-thresholdband) to infinity.
| xmin | minimum number of photo-electrons |
| NPE | true number of photo-electrons |
Definition at line 980 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get integral of probability in specific threshold domain.
The normalisation is from (threshold-thresholdband) to infinity.
| domain | threshold domain |
| NPE | true number of photo-electrons |
Definition at line 1079 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Apply threshold.
| npe | number of photo-electrons |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 1101 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Get time to reach threshold.
Note that the rise time is defined to be zero for a one photo-electron signal.
| npe | number of photo-electrons |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 1115 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Get time-over-threshold (ToT).
| npe | number of photo-electrons |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 1146 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Get derivative of number of photo-electrons to time-over-threshold.
| npe | number of photo-electrons |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 1193 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Probability that a hit survives the simulation of the PMT.
The survival probability takes into account the number of photo-electrons, the analogue signal of the PMT and the threshold of the discriminator.
| NPE | number of photo-electrons |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 1240 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Probability that a hit survives the threshold of the PMT.
| NPE | number of photo-electrons |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 1279 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Get number of photo-electrons.
| tot_ns | time-over-threshold with saturation [ns] |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 1366 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get probability of having a pulse with specific time-over-threshold.
| tot_ns | time-over-threshold with saturation [ns] |
| NPE | true number of photo-electrons |
Definition at line 1403 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get cumulative probability of time-over-threshold distribution.
| Tmin | minimum time-over-threshold (with saturation) [ns] |
| Tmax | maximum time-over-threshold (with saturation) [ns] |
| NPE | true number of photo-electrons |
Definition at line 1433 of file JPMTAnalogueSignalProcessor.hh.
|
inlinestatic |
Get lower threshold for rise time evaluation.
Definition at line 1456 of file JPMTAnalogueSignalProcessor.hh.
|
inlinestatic |
Get upper threshold for rise time evaluation.
Definition at line 1467 of file JPMTAnalogueSignalProcessor.hh.
|
inlineprivate |
Gauss function normalised to a configurable domain.
| x | x |
| x0 | central value |
| sigma | sigma |
| normXmin | normalisation lower limit |
| normXmax | normalisation upper limit |
Definition at line 1496 of file JPMTAnalogueSignalProcessor.hh.
|
inlineprivate |
Integral of Gauss function normalised to a configurable domain.
| xmin | integral lower limit |
| xmax | integral upper limit |
| x0 | central value |
| sigma | sigma |
| normXmin | normalisation lower limit |
| normXmax | normalisation upper limit |
Definition at line 1516 of file JPMTAnalogueSignalProcessor.hh.
|
inlineinherited |
Process hits.
Two (or more) photo-electrons are combined if they are comparable according method compare.
Two (or more) consecutive hits hits maybe merged (according method merge).
A PMT signal with negative number of photo-electrons is not subjected to the quantum efficiency and transit-time distribution.
This feature is used to simulate the singles rate of a PMT when the measured QE is zero.
| calibration | PMT calibration |
| input | PMT signals |
| output | PMT hits |
Definition at line 91 of file JPMTSignalProcessorInterface.hh.
|
inlinevirtualinherited |
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 (I/O) |
Definition at line 311 of file JPMTSignalProcessorInterface.hh.
|
inlinestaticinherited |
Get two photo-electron resolution for time-over-threshold.
Definition at line 341 of file JPMTSignalProcessorInterface.hh.
|
inlinestaticinherited |
Get width of charge distribution.
Definition at line 352 of file JPMTSignalProcessorInterface.hh.
|
inlineinherited |
|
inlineinherited |
Check validity of PMT parameters.
Definition at line 134 of file JPMTParameters.hh.
|
inlineinherited |
Get type for for time-slewing correction.
Definition at line 153 of file JPMTParameters.hh.
|
inlinestaticinherited |
Get equation parameters.
Definition at line 209 of file JPMTParameters.hh.
|
inlinestaticinherited |
Set equation parameters.
| equation | equation parameters |
Definition at line 222 of file JPMTParameters.hh.
|
inlineinherited |
Get properties of this class.
| equation | equation parameters |
Definition at line 233 of file JPMTParameters.hh.
|
inlineinherited |
Get properties of this class.
| equation | equation parameters |
Definition at line 244 of file JPMTParameters.hh.
|
friend |
Read PMT signal from input.
| in | input stream |
| object | PMT signal |
Definition at line 413 of file JPMTAnalogueSignalProcessor.hh.
|
protected |
decay time [ns]
Definition at line 1474 of file JPMTAnalogueSignalProcessor.hh.
|
protected |
time at match point [ns]
Definition at line 1475 of file JPMTAnalogueSignalProcessor.hh.
|
protected |
amplitude at match point [npe]
Definition at line 1476 of file JPMTAnalogueSignalProcessor.hh.
|
protected |
Transition point from a logarithmic to a linear relation between time-over-threshold and number of photo-electrons.
Measurements by B. Schermer and R. Bruijn at Nikhef.
Definition at line 1482 of file JPMTAnalogueSignalProcessor.hh.
|
inherited |
relative quantum efficiency
Definition at line 250 of file JPMTParameters.hh.
|
inherited |
gain [unit]
Definition at line 251 of file JPMTParameters.hh.
|
inherited |
gain spread [unit]
Definition at line 252 of file JPMTParameters.hh.
|
inherited |
rise time of analogue pulse [ns]
Definition at line 253 of file JPMTParameters.hh.
|
inherited |
transition time spread [ns]
Definition at line 254 of file JPMTParameters.hh.
|
inherited |
threshold [npe]
Definition at line 255 of file JPMTParameters.hh.
|
inherited |
probability of underamplified hit
Definition at line 256 of file JPMTParameters.hh.
|
inherited |
threshold-band [npe]
Definition at line 257 of file JPMTParameters.hh.
|
inherited |
mean time-over-threshold of threshold-band hits [ns]
Definition at line 258 of file JPMTParameters.hh.
|
inherited |
time-over-threshold standard deviation of threshold-band hits [ns]
Definition at line 259 of file JPMTParameters.hh.
|
inherited |
slope [ns/npe]
Definition at line 260 of file JPMTParameters.hh.
|
inherited |
saturation [ns]
Definition at line 261 of file JPMTParameters.hh.
|
inherited |
time slewing of analogue signal
Definition at line 262 of file JPMTParameters.hh.