Jpp 19.3.0-rc.1
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 (int NPE) const |
Get gain spread for given number of photo-electrons. | |
double | getIntegralOfChargeProbability (const double xmin, const double xmax, 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. | |
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 transition 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. | |
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 | 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. | |
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. | |
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 transition 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 169 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get time at transition point from Gaussian to exponential.
Definition at line 180 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get amplitude at transition point from Gaussian to exponential.
Definition at line 191 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 202 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get amplitude at given time for a one photo-electron pulse.
t1_ns | time [ns] |
Definition at line 214 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 239 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 253 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 270 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get time-over-threshold with saturation.
tot_ns | time-over-threshold without saturation |
Definition at line 285 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get time-over-threshold without saturation.
tot_ns | time-over-threshold with saturation |
Definition at line 297 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get derivative of saturation factor.
tot_ns | time-over-threshold without saturation |
Definition at line 313 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get gain spread for given number of photo-electrons.
NPE | number of photo-electrons |
Definition at line 325 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get integral of probability.
xmin | minimum number of photo-electrons |
xmax | maximum number of photo-electrons |
NPE | true number of photo-electrons |
Definition at line 339 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get integral of probability in specific threshold domain.
domain | threshold domain |
NPE | true number of photo-electrons |
Definition at line 378 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Set PMT parameters.
parameters | PMT parameters |
Definition at line 399 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get threshold domain.
npe | number of photo-electrons |
Definition at line 430 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Apply relative QE.
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 452 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Get randomised time according transition time distribution.
t_ns | time [ns] |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 469 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 490 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 502 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Get probability density for given charge.
npe | observed number of photo-electrons |
NPE | true number of photo-electrons |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 546 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Apply threshold.
npe | number of photo-electrons |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 581 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 595 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Get time-over-threshold (ToT).
npe | number of photo-electrons |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 626 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 673 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Probability that a hit survives the simulation of the PMT.
NPE | number of photo-electrons |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 712 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Get number of photo-electrons.
tot_ns | time over threshold [ns] |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 763 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 800 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 823 of file JPMTAnalogueSignalProcessor.hh.
|
inlinestatic |
Get lower threshold for rise time evaluation.
Definition at line 841 of file JPMTAnalogueSignalProcessor.hh.
|
inlinestatic |
Get upper threshold for rise time evaluation.
Definition at line 852 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).
calibration | PMT calibration |
input | PMT signals |
output | PMT hits |
Definition at line 89 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 293 of file JPMTSignalProcessorInterface.hh.
|
inlinestaticinherited |
Get two photo-electron resolution for time-over-threshold.
Definition at line 323 of file JPMTSignalProcessorInterface.hh.
|
inlinestaticinherited |
Get width of charge distribution.
Definition at line 334 of file JPMTSignalProcessorInterface.hh.
|
inlineinherited |
|
inlineinherited |
Check validity of PMT parameters.
Definition at line 133 of file JPMTParameters.hh.
|
inlinestaticinherited |
Get equation parameters.
Definition at line 194 of file JPMTParameters.hh.
|
inlinestaticinherited |
Set equation parameters.
equation | equation parameters |
Definition at line 207 of file JPMTParameters.hh.
|
inlineinherited |
Get properties of this class.
equation | equation parameters |
Definition at line 218 of file JPMTParameters.hh.
|
inlineinherited |
Get properties of this class.
equation | equation parameters |
Definition at line 229 of file JPMTParameters.hh.
|
friend |
Read PMT signal from input.
in | input stream |
object | PMT signal |
Definition at line 414 of file JPMTAnalogueSignalProcessor.hh.
|
protected |
decay time [ns]
Definition at line 859 of file JPMTAnalogueSignalProcessor.hh.
|
protected |
time at match point [ns]
Definition at line 860 of file JPMTAnalogueSignalProcessor.hh.
|
protected |
amplitude at match point [npe]
Definition at line 861 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 867 of file JPMTAnalogueSignalProcessor.hh.
|
inherited |
relative quantum efficiency
Definition at line 235 of file JPMTParameters.hh.
|
inherited |
gain [unit]
Definition at line 236 of file JPMTParameters.hh.
|
inherited |
gain spread [unit]
Definition at line 237 of file JPMTParameters.hh.
|
inherited |
rise time of analogue pulse [ns]
Definition at line 238 of file JPMTParameters.hh.
|
inherited |
transition time spread [ns]
Definition at line 239 of file JPMTParameters.hh.
|
inherited |
threshold [npe]
Definition at line 240 of file JPMTParameters.hh.
|
inherited |
probability of underamplified hit
Definition at line 241 of file JPMTParameters.hh.
|
inherited |
threshold-band [npe]
Definition at line 242 of file JPMTParameters.hh.
|
inherited |
mean time-over-threshold of threshold-band hits [ns]
Definition at line 243 of file JPMTParameters.hh.
|
inherited |
time-over-threshold standard deviation of threshold-band hits [ns]
Definition at line 244 of file JPMTParameters.hh.
|
inherited |
slope [ns/npe]
Definition at line 245 of file JPMTParameters.hh.
|
inherited |
saturation [ns]
Definition at line 246 of file JPMTParameters.hh.
|
inherited |
time slewing of analogue signal
Definition at line 247 of file JPMTParameters.hh.