Public Member Functions | Private Attributes | List of all members
util::SiPMUtils Class Reference

#include <SiPMUtils.h>

Public Member Functions

 SiPMUtils ()
 
 SiPMUtils (double NeffPx)
 
 ~SiPMUtils ()
 
double Saturate (const double unsat_px)
 
double DeSaturate (const double sat_px)
 

Private Attributes

double fNeffPx
 

Detailed Description

Definition at line 13 of file SiPMUtils.h.

Constructor & Destructor Documentation

util::SiPMUtils::SiPMUtils ( )

Definition at line 14 of file SiPMUtils.cxx.

15  : fNeffPx(0)
16  {
17  }
double fNeffPx
Definition: SiPMUtils.h:28
util::SiPMUtils::SiPMUtils ( double  NeffPx)

Definition at line 20 of file SiPMUtils.cxx.

21  : fNeffPx(NeffPx)
22  {
23  }
double fNeffPx
Definition: SiPMUtils.h:28
util::SiPMUtils::~SiPMUtils ( )

Definition at line 26 of file SiPMUtils.cxx.

27  {
28  }

Member Function Documentation

double util::SiPMUtils::DeSaturate ( const double  sat_px)

Definition at line 43 of file SiPMUtils.cxx.

44  {
45  /* protect against negative/zero input*/
46  if ( sat_px <= 0 ) return sat_px;
47 
48  double ratio = 0.95;
49  if(sat_px < ratio * fNeffPx)
50  {
51  /* desaturate using inverse function */
52  float unSaturatedSignal = - fNeffPx * std::log(1 - sat_px / fNeffPx);
53  return unSaturatedSignal;
54  }
55  else
56  {
57  /* desaturate using linear continuation function for hits above linearisation threshold */
58  float unSaturatedSignal = 1/( 1 - ratio ) * (sat_px - ratio * fNeffPx) - fNeffPx * std::log( 1 - ratio );
59  return unSaturatedSignal;
60  }
61  }
double fNeffPx
Definition: SiPMUtils.h:28
double util::SiPMUtils::Saturate ( const double  unsat_px)

Definition at line 31 of file SiPMUtils.cxx.

32  {
33  /* protect against negative/zero input*/
34  if ( unsat_px <= 0 ) return unsat_px;
35 
36  /* calculate saturated signal using simple exponential formula */
37  double saturatedSignal = fNeffPx * ( 1. - std::exp( - unsat_px / fNeffPx ) );
38 
39  return saturatedSignal;
40  }
double fNeffPx
Definition: SiPMUtils.h:28

Member Data Documentation

double util::SiPMUtils::fNeffPx
private

Definition at line 28 of file SiPMUtils.h.


The documentation for this class was generated from the following files: