scintillator module¶
Scintillator¶
module with scintillator functions
-
scintillator.generate_pulses(n, t, amp, energy, spectrum, k=10.0, lc=1.0, qeff=1.0)¶ Generates scintillator pulses selcting random times according to the scintillator pulse shape.
- Args:
n (int): the number of pulses to be generated
t (numpy.array): time axis of the scintillator pulse shape
amp (numpy.array): amplitude of the scintillator pulse shape
energy (numpy.array): energy axis [keVee]
spectrum (numpy.array): normalized spectrum
- Kwargs:
k (float): conversion from keVee to number of photons
lc (float): light collection efficiency
qeff (float): quantum efficiency of the PMT. Implemented here and not in the pmt module to speed up the calculation
- Returns:
- mypulses (list): list containing the simulated pulses. Each pulse consists of an array of times of photon production
-
scintillator.load_coefficients()¶ Reads the scintillator coefficients from the input file “dat/scintillator.dat”.
- Returns:
- parsdict (dict): dictionary with the parameters
-
scintillator.scintillator(ptype, coeff_dict, plen=600, dt=0.05)¶ Calculates the scintillator pulse shape.
- Args:
ptype (str): type of pulse. Can be “electron” or “proton”
coeff_dict (dict): dictionary with scintillator coefficients
- Kwargs:
plen (float): pulse length [ns]
dt (float): time step [ns]
- Returns:
t (numpy.array): time vector
amp (numpy.array): amplitude vector of the scintillation pulse