Go to the documentation of this file.    1 #ifndef __JDETECTOR__JPMTANALOGUESIGNALPROCESSOR__ 
    2 #define __JDETECTOR__JPMTANALOGUESIGNALPROCESSOR__ 
   61       x1(
std::numeric_limits<double>::max())
 
   80       static const int    N         = 100;
 
   81       static const double precision = 1.0e-3;
 
   97       const double Q  =  b*b - 4.0*a*c;
 
  115       x1 = std::numeric_limits<double>::max();   
 
  120       for (
int i = 0; i != N; ++i) {
 
  122         const double x = 0.5 * (xmin + xmax);
 
  125         if (fabs(1.0 - 
u) < precision) {
 
  135       x1 = 0.5 * (xmin + xmax);
 
  195         return exp(-0.5*x*x);                                
 
  247       if (th > 0.0 && th < 1.0)
 
  250         THROW(
JValueOutOfRange, 
"JPMTAnalogueSignalProcessor::getMaximalRiseTime(): Invalid threshold " << th);
 
  306       const double mu    = NPE * 
gain;
 
  309       return (0.5 * TMath::Erfc((zmin - mu) / sqrt(2.0) / sigma)  -
 
  310               0.5 * TMath::Erfc((zmax - mu) / sqrt(2.0) / sigma));
 
  321       static_cast<JPMTParameters&>(*this).setPMTParameters(parameters);
 
  336       in >> static_cast<JPMTParameters&>(
object);
 
  354         return gRandom->Rndm() < 
QE;
 
  371         return gRandom->Gaus(t_ns, 
TTS_ns);
 
  417         const double mu    = NPE * 
gain;
 
  419         const double V     = 0.5 * TMath::Erfc((
threshold - mu) / sqrt(2.0) / sigma);
 
  421         return TMath::Gaus(npe, mu, sigma, kTRUE) / V;
 
  547       } 
else if (
QE <= 1.0) {
 
  551         for (
int i = 1; i <= NPE; ++i) {
 
  553           const double p     = TMath::Binomial(NPE, i) * TMath::Power(
QE, i) * TMath::Power(1.0 - 
QE, NPE - i);
 
  554           const double mu    = i * 
gain;
 
  556           const double V     = 0.5 * TMath::Erfc((
threshold  - mu) / sqrt(2.0) / sigma);
 
  557           const double W     = 0.5 * TMath::Erfc((0.0        - mu) / sqrt(2.0) / sigma);
 
 
double getIntegralOfProbability(const double xmin, const double xmax, const int NPE) const
Get integral of probability.
 
double t1
time at match point [ns]
 
double saturation
saturation [ns]
 
virtual double getSurvivalProbability(const int NPE) const
Probability that a hit survives the simulation of the PMT.
 
double x1
Transition point from a logarithmic to a linear relation between time-over-threshold and number of ph...
 
double threshold
threshold [npe]
 
virtual double getTimeOverThreshold(const double npe) const
Get time-over-threshold (ToT).
 
double getAmplitude(const double t1_ns) const
Get amplitude at given time for a one photo-electron pulse.
 
const double TIME_OVER_THRESHOLD_NS
Specification for time-over-threshold corresponding to a one photo-electron pulse.
 
double getY1() const
Get amplitude at transition point from Gaussian to exponential.
 
double TTS_ns
transition time spread [ns]
 
static const JTransitionTimeGenerator getTransitionTime
Function object to generate transition time.
 
double getDerivativeOfSaturation(const double y) const
Get derivative of function value with saturation.
 
double decayTime_ns
decay time [ns]
 
static double getTH0()
Get lower threshold for rise time evaluation.
 
void setPMTParameters(const JPMTParameters ¶meters)
Set PMT parameters.
 
virtual double getRandomAmplitude(const int NPE) const
Get randomised amplitude according gain and gain spread.
 
double getGainSpread(int NPE) const
Get gain spread for given number of photo-electrons.
 
double getDecayTime(const double npe, const double th) const
Get time to pass from top of analogue pulse to threshold.
 
double gainSpread
gain spread [unit]
 
double getStartOfLinearisation() const
Get transition point from a model dependent to linear relation between time-over-threshold and number...
 
Data structure for single photo-electron.
 
bool slewing
time slewing of analogue signal
 
void configure()
Configure internal parameters.
 
JPMTAnalogueSignalProcessor(const JPMTParameters ¶meters=JPMTParameters())
Constructor.
 
static double getMaximalRiseTime(const double th)
Get maximal rise time for given threshold.
 
double getT1() const
Get time at transition point from Gaussian to exponential.
 
friend std::istream & operator>>(std::istream &in, JPMTAnalogueSignalProcessor &object)
Read PMT signal from input.
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
 
virtual bool applyThreshold(const double npe) const
Apply threshold.
 
Exception for accessing a value in a collection that is outside of its range.
 
double getRiseTime(const double npe, const double th) const
Get time to pass from threshold to top of analogue pulse.
 
double getDecayTime() const
Get decay time.
 
PMT signal processor interface.
 
virtual double getProbability(const double npe, const int NPE) const
Get probability for given charge.
 
double getSaturation(const double y) const
Get function value with saturation.
 
virtual bool compare(const JPhotoElectron &first, const JPhotoElectron &second) const
Compare (arrival times of) photo-electrons.
 
virtual bool applyQE() const
Apply relative QE.
 
virtual double getRandomTime(const double t_ns) const
Get randomised time according transition time distribution.
 
virtual double getRiseTime(const double npe) const
Get time to reach threshold.
 
double slope
slope [ns/npe]
 
virtual double getDerivative(const double npe) const
Get derivative of number of photo-electrons to time-over-threshold.
 
static double getTH1()
Get upper threshold for rise time evaluation.
 
double y1
amplitude at match point [npe]
 
double QE
relative quantum efficiency
 
Data structure for PMT parameters.
 
Auxiliary classes and methods for detector calibration.
 
double riseTime_ns
rise time of analogue pulse [ns]
 
JPMTParameters()
Default constructor.
 
PMT analogue signal processor.