|
LDMX Software
|
#include <CompositePulse.h>
Public Member Functions | |
| CompositePulse (TF1 func, const double &gain, const double &pedestal) | |
| Constructore. | |
| void | clear () |
| void | addOrMerge (const std::pair< double, double > &hit, double hit_merge_ns) |
| Put another hit into this composite pulse. | |
| double | findCrossing (double low, double high, double level, double prec=0.01) |
| Find the time at which we cross the input level. | |
| void | setGainPedestal (double gain, double pedestal) |
| Configure the pulses for the current chip. | |
| double | operator() (double time) const |
| Evaluating this object as a function gives the same result as at. | |
| double | at (double time) const |
| Measure the voltage at the input time. | |
| const std::vector< std::pair< double, double > > & | hits () const |
| Get list of individual pulses that are entering the chip. | |
Private Member Functions | |
| ClassDef (CompositePulse, 2) | |
Private Attributes | |
| std::vector< std::pair< double, double > > | hits_ |
| pulses entering the chip | |
| TF1 | pulse_func_ |
| reference to pulse shape function shared by all pulses | |
| double | gain_ |
| gain for current chip we are emulating | |
| double | pedestal_ |
| pedestal for current chip we are emulating | |
An emulator for a pulse that the chip needs to read. This handles merging two hits that are "close-enough" to one another.
Definition at line 18 of file CompositePulse.h.
|
inline |
Constructore.
Connect this pulse emulator with the pulse shape function already configured by the chip emulator.
Definition at line 27 of file CompositePulse.h.
| void ldmx::CompositePulse::addOrMerge | ( | const std::pair< double, double > & | hit, |
| double | hit_merge_ns ) |
Put another hit into this composite pulse.
If the hit is within the merge input of a hit already included, then it is merged with that hit. Otherwise, it is included as its own hit.
| [in] | hit | voltage,time pair representing a sime hit |
| [in] | hit_merge_ns | maximum time separation [ns] to merge two hits_ |
Definition at line 6 of file CompositePulse.cxx.
References hits_.
Referenced by ldmx::HgcrocEmulator::digitize().
|
inline |
Measure the voltage at the input time.
Includes the effects from all pulses but does not put any noise into the measurement.
| [in] | time | time to measure [ns] |
Definition at line 86 of file CompositePulse.h.
References gain_, hits_, pedestal_, and pulse_func_.
Referenced by findCrossing(), and operator()().
|
inline |
Definition at line 34 of file CompositePulse.h.
| double ldmx::CompositePulse::findCrossing | ( | double | low, |
| double | high, | ||
| double | level, | ||
| double | prec = 0.01 ) |
Find the time at which we cross the input level.
We use the midpoint algorithm, assuming the input low is below the threshold and hight is above.
| [in] | low | minimum value (below threshold) to start search at [mV] |
| [in] | high | maximum value (above threshold) to start search at [mV] |
| [in] | level | threshold to look for time [mV] |
| [in] | prec | precision with which to look [mV] |
Definition at line 20 of file CompositePulse.cxx.
References at().
Referenced by ldmx::HgcrocEmulator::digitize().
|
inline |
Get list of individual pulses that are entering the chip.
Definition at line 94 of file CompositePulse.h.
References hits_.
Referenced by ldmx::HgcrocEmulator::digitize().
|
inline |
Evaluating this object as a function gives the same result as at.
Definition at line 75 of file CompositePulse.h.
References at().
|
inline |
|
private |
gain for current chip we are emulating
Definition at line 108 of file CompositePulse.h.
Referenced by at(), and setGainPedestal().
|
private |
pulses entering the chip
The pair is {voltage amplitude [mV], time of peak [ns]}
Definition at line 102 of file CompositePulse.h.
Referenced by addOrMerge(), at(), and hits().
|
private |
pedestal for current chip we are emulating
Definition at line 111 of file CompositePulse.h.
Referenced by at(), and setGainPedestal().
|
private |
reference to pulse shape function shared by all pulses
Definition at line 105 of file CompositePulse.h.
Referenced by at().