Jpp
pmt_effective_area_update_2
the software that should make you happy
|
PMT analogue signal processor. More...
#include <JPMTAnalogueSignalProcessor.hh>
Public Types | |
enum | JThresholdDomains { BELOW_THRESHOLDBAND = -1, IN_THRESHOLDBAND = 0, ABOVE_THRESHOLD = 2 } |
Threshold domain specifiers. More... | |
Public Member Functions | |
JPMTAnalogueSignalProcessor (const JPMTParameters ¶meters=JPMTParameters()) | |
Constructor. More... | |
void | configure () |
Configure internal parameters. More... | |
double | getDecayTime () const |
Get decay time. More... | |
double | getT1 () const |
Get time at transition point from Gaussian to exponential. More... | |
double | getY1 () const |
Get amplitude at transition point from Gaussian to exponential. More... | |
double | getStartOfLinearisation () const |
Get transition point from a model-dependent to linear relation between time-over-threshold and number of photo-electrons. More... | |
double | getAmplitude (const double t1_ns) const |
Get amplitude at given time for a one photo-electron pulse. More... | |
double | getRiseTime (const double npe, const double th) const |
Get time to pass from threshold to top of analogue pulse. More... | |
double | getDecayTime (const double npe, const double th) const |
Get time to pass from top of analogue pulse to threshold. More... | |
double | applySaturation (const double T) const |
Get time-over-threshold with saturation. More... | |
double | removeSaturation (const double tot_ns) const |
Get time-over-threshold without saturation. More... | |
double | getDerivativeOfSaturation (const double T) const |
Get derivative of saturation factor. More... | |
double | getGainSpread (int NPE) const |
Get gain spread for given number of photo-electrons. More... | |
virtual double | getChargeProbability (const double npe, const int NPE) const override |
Get probability density for given charge. More... | |
double | getIntegralOfChargeProbability (const double xmin, const double xmax, const int NPE) const |
Get integral of probability. More... | |
double | getIntegralOfChargeProbability (JThresholdDomains domain, const int NPE) const |
Get integral of probability in specific threshold domain. More... | |
void | setPMTParameters (const JPMTParameters ¶meters) |
Set PMT parameters. More... | |
virtual bool | applyQE () const override |
Apply relative QE. More... | |
virtual double | getRandomTime (const double t_ns) const override |
Get randomised time according transition time distribution. More... | |
virtual bool | compare (const JPhotoElectron &first, const JPhotoElectron &second) const override |
Compare (arrival times of) photo-electrons. More... | |
virtual double | getRandomCharge (const int NPE) const override |
Get randomised charge according to gain and gain spread. More... | |
virtual double | getNPE (const double tot_ns, const double eps=1.0e-3) const |
Get number of photo-electrons. More... | |
virtual JThresholdDomains | applyThreshold (const double npe) const override |
Apply threshold. More... | |
virtual double | getRiseTime (const double npe) const override |
Get time to reach threshold. More... | |
virtual double | getTimeOverThreshold (const double npe) const override |
Get time-over-threshold (ToT). More... | |
virtual double | getDerivative (const double npe) const override |
Get derivative of number of photo-electrons to time-over-threshold. More... | |
double | getTimeOverThresholdProbability (const double tot_ns, const int NPE) const |
Get probability of having a pulse with specific time-over-threshold. More... | |
double | getIntegralOfTimeOverThresholdProbability (const double Tmin, const double Tmax, const int NPE) const |
Get cumulative probability of time-over-threshold distribution. More... | |
virtual double | getSurvivalProbability (const int NPE) const override |
Probability that a hit survives the simulation of the PMT. More... | |
void | operator() (const JCalibration &calibration, const JPMTData< JPMTSignal > &input, JPMTData< JPMTPulse > &output) const |
Process hits. More... | |
virtual void | merge (JPMTData< JPMTPulse > &data) const |
Merging of PMT hits. More... | |
const JPMTParameters & | getPMTParameters () const |
Get PMT parameters. More... | |
bool | is_valid () const |
Check validity of PMT parameters. More... | |
JProperties | getProperties (const JEquationParameters &equation=JPMTParameters::getEquationParameters()) |
Get properties of this class. More... | |
JProperties | getProperties (const JEquationParameters &equation=JPMTParameters::getEquationParameters()) const |
Get properties of this class. More... | |
Static Public Member Functions | |
static double | getMaximalRiseTime (const double th) |
Get maximal rise time for given threshold. More... | |
static double | getTH0 () |
Get lower threshold for rise time evaluation. More... | |
static double | getTH1 () |
Get upper threshold for rise time evaluation. More... | |
static double | getTmin () |
Get two photo-electron resolution for time-over-threshold. More... | |
static double | getQmin () |
Get minimal width of charge distribution. More... | |
static JEquationParameters & | getEquationParameters () |
Get equation parameters. More... | |
static void | setEquationParameters (const JEquationParameters &equation) |
Set equation parameters. More... | |
Public Attributes | |
double | QE |
relative quantum efficiency More... | |
double | gain |
gain [unit] More... | |
double | gainSpread |
gain spread [unit] More... | |
double | riseTime_ns |
rise time of analogue pulse [ns] More... | |
double | TTS_ns |
transition time spread [ns] More... | |
double | threshold |
threshold [npe] More... | |
double | PunderAmplified |
probability of underamplified hit More... | |
double | thresholdBand |
threshold-band [npe] More... | |
double | mean_ns |
mean time-over-threshold of threshold-band hits [ns] More... | |
double | sigma_ns |
time-over-threshold standard deviation of threshold-band hits [ns] More... | |
double | slope |
slope [ns/npe] More... | |
double | saturation |
saturation [ns] More... | |
bool | slewing |
time slewing of analogue signal More... | |
Protected Attributes | |
double | decayTime_ns |
decay time [ns] More... | |
double | t1 |
time at match point [ns] More... | |
double | y1 |
amplitude at match point [npe] More... | |
double | x1 |
Transition point from a logarithmic to a linear relation between time-over-threshold and number of photo-electrons. More... | |
double | MAX_CHARGE |
Maximum charge [npe]. More... | |
Friends | |
std::istream & | operator>> (std::istream &in, JPMTAnalogueSignalProcessor &object) |
Read PMT signal from input. More... | |
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.
|
inherited |
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 |
Constructor.
parameters | PMT parameters |
Definition at line 61 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 84 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get decay time.
Definition at line 160 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get time at transition point from Gaussian to exponential.
Definition at line 171 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get amplitude at transition point from Gaussian to exponential.
Definition at line 182 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 193 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get amplitude at given time for a one photo-electron pulse.
t1_ns | time [ns] |
Definition at line 205 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 230 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 244 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 261 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get time-over-threshold with saturation.
T | time-over-threshold without saturation |
Definition at line 276 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get time-over-threshold without saturation.
tot_ns | time-over-threshold with saturation |
Definition at line 288 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get derivative of saturation factor.
T | time-over-threshold without saturation |
Definition at line 300 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Get gain spread for given number of photo-electrons.
NPE | number of photo-electrons |
Definition at line 312 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 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 362 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 401 of file JPMTAnalogueSignalProcessor.hh.
|
inline |
Set PMT parameters.
parameters | PMT parameters |
Definition at line 421 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 transition 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.
first | first photo-electron |
second | second photo-electron |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 486 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 498 of file JPMTAnalogueSignalProcessor.hh.
|
inlinevirtual |
Get number of photo-electrons.
tot_ns | time over threshold [ns] |
eps | precision |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 540 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Apply threshold.
npe | number of photo-electrons |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 579 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 604 of file JPMTAnalogueSignalProcessor.hh.
|
inlineoverridevirtual |
Get time-over-threshold (ToT).
npe | number of photo-electrons |
Reimplemented from JDETECTOR::JPMTSignalProcessorInterface.
Definition at line 634 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 681 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 721 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 745 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 764 of file JPMTAnalogueSignalProcessor.hh.
|
inlinestatic |
Get lower threshold for rise time evaluation.
Definition at line 814 of file JPMTAnalogueSignalProcessor.hh.
|
inlinestatic |
Get upper threshold for rise time evaluation.
Definition at line 825 of file JPMTAnalogueSignalProcessor.hh.
|
inlineinherited |
Process hits.
calibration | PMT calibration |
input | PMT signals |
output | PMT hits |
Definition at line 103 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 |
Definition at line 294 of file JPMTSignalProcessorInterface.hh.
|
inlinestaticinherited |
Get two photo-electron resolution for time-over-threshold.
Definition at line 380 of file JPMTSignalProcessorInterface.hh.
|
inlinestaticinherited |
Get minimal width of charge distribution.
Definition at line 391 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 192 of file JPMTParameters.hh.
|
inlinestaticinherited |
Set equation parameters.
equation | equation parameters |
Definition at line 205 of file JPMTParameters.hh.
|
inlineinherited |
Get properties of this class.
equation | equation parameters |
Definition at line 216 of file JPMTParameters.hh.
|
inlineinherited |
Get properties of this class.
equation | equation parameters |
Definition at line 227 of file JPMTParameters.hh.
|
friend |
Read PMT signal from input.
in | input stream |
object | PMT signal |
Definition at line 436 of file JPMTAnalogueSignalProcessor.hh.
|
protected |
decay time [ns]
Definition at line 832 of file JPMTAnalogueSignalProcessor.hh.
|
protected |
time at match point [ns]
Definition at line 833 of file JPMTAnalogueSignalProcessor.hh.
|
protected |
amplitude at match point [npe]
Definition at line 834 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 840 of file JPMTAnalogueSignalProcessor.hh.
|
protectedinherited |
Maximum charge [npe].
Definition at line 398 of file JPMTSignalProcessorInterface.hh.
|
inherited |
relative quantum efficiency
Definition at line 233 of file JPMTParameters.hh.
|
inherited |
gain [unit]
Definition at line 234 of file JPMTParameters.hh.
|
inherited |
gain spread [unit]
Definition at line 235 of file JPMTParameters.hh.
|
inherited |
rise time of analogue pulse [ns]
Definition at line 236 of file JPMTParameters.hh.
|
inherited |
transition time spread [ns]
Definition at line 237 of file JPMTParameters.hh.
|
inherited |
threshold [npe]
Definition at line 238 of file JPMTParameters.hh.
|
inherited |
probability of underamplified hit
Definition at line 239 of file JPMTParameters.hh.
|
inherited |
threshold-band [npe]
Definition at line 240 of file JPMTParameters.hh.
|
inherited |
mean time-over-threshold of threshold-band hits [ns]
Definition at line 241 of file JPMTParameters.hh.
|
inherited |
time-over-threshold standard deviation of threshold-band hits [ns]
Definition at line 242 of file JPMTParameters.hh.
|
inherited |
slope [ns/npe]
Definition at line 243 of file JPMTParameters.hh.
|
inherited |
saturation [ns]
Definition at line 244 of file JPMTParameters.hh.
|
inherited |
time slewing of analogue signal
Definition at line 245 of file JPMTParameters.hh.