LDMX Software
|
Public Member Functions | |
CompositePulse (TF1 &func, const double &g, const double &p) | |
Constructore. | |
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 Attributes | |
std::vector< std::pair< double, double > > | hits_ |
pulses entering the chip | |
TF1 & | pulseFunc_ |
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 236 of file HgcrocEmulator.h.
|
inline |
Constructore.
Connect this pulse emulator with the pulse shape function already configured by the chip emulator.
Definition at line 245 of file HgcrocEmulator.h.
|
inline |
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 258 of file HgcrocEmulator.h.
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 325 of file HgcrocEmulator.h.
References gain_, hits_, pedestal_, and pulseFunc_.
Referenced by findCrossing(), and operator()().
|
inline |
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 284 of file HgcrocEmulator.h.
References at().
Referenced by ldmx::HgcrocEmulator::digitize().
|
inline |
Get list of individual pulses that are entering the chip.
Definition at line 333 of file HgcrocEmulator.h.
References hits_.
Referenced by ldmx::HgcrocEmulator::digitize().
|
inline |
Evaluating this object as a function gives the same result as at.
Definition at line 314 of file HgcrocEmulator.h.
References at().
|
inline |
Configure the pulses for the current chip.
Definition at line 303 of file HgcrocEmulator.h.
References ldmx::HgcrocEmulator::gain(), gain_, ldmx::HgcrocEmulator::pedestal(), and pedestal_.
|
private |
gain for current chip we are emulating
Definition at line 347 of file HgcrocEmulator.h.
Referenced by at(), and setGainPedestal().
|
private |
pulses entering the chip
The pair is {voltage amplitude [mV], time of peak [ns]}
Definition at line 341 of file HgcrocEmulator.h.
Referenced by addOrMerge(), at(), and hits().
|
private |
pedestal for current chip we are emulating
Definition at line 350 of file HgcrocEmulator.h.
Referenced by at(), and setGainPedestal().
|
private |
reference to pulse shape function shared by all pulses
Definition at line 344 of file HgcrocEmulator.h.
Referenced by at().