MarlinTPC
1.2.0
|
A class which is friend of PulseFinder so it can access the protected members for testing. More...
#include <PulseFinderTester.h>
Classes | |
struct | CandidateProperties |
A reference consists of a vector of IteratorProperties structs and the corresponding begin and end iterators of the data vectors. More... | |
struct | IteratorProperties |
A helper struct to store the distance to the begin iterator and the value which should be at the iterator position. More... | |
struct | PulseProperties |
A struct to store the pulse properties we are checking. More... | |
Public Member Functions | |
PulseFinderTester () | |
The constructor. | |
~PulseFinderTester () | |
The destructor. | |
int | runAllTests () |
Run all tests and return the number of failed tests. More... | |
Protected Member Functions | |
bool | evaluateBruteSearchResult (std::vector< std::pair< std::vector< float >::const_iterator, std::vector< float >::const_iterator > > const &bruteSearchResult, std::vector< IteratorProperties > const &referenceValues, std::vector< float >::const_iterator beginIterator, std::vector< float >::const_iterator endIterator) |
this function gets the search result of the brute search and compares it to the reference values given. More... | |
bool | evaluateSplitResult (std::vector< PulseFinder::InternalSplitPulse > const &splitResult, std::vector< IteratorProperties > const &referenceValues, std::vector< float >::const_iterator beginIterator, std::vector< float >::const_iterator endIterator) |
bool | evaluatePulseCandidate (std::vector< std::pair< TrackerDataImpl *, int > > candidates, std::vector< CandidateProperties > const &referenceCandidateProperties) |
bool | evaluatePulses (std::vector< TrackerPulse * > const &pulses, std::vector< PulseProperties > const &referencePulseProperties) |
bool | evaluatePlateauCutoff (std::vector< TrackerPulse * > const &pulses, std::vector< std::pair< size_t, size_t > > const &referencePositions, EVENT::FloatVec const &referenceADCValues) |
Compare the adc values in the pulses to the referenceADCValues. More... | |
Protected Attributes | |
PulseFinder * | _pulseFinder |
PulseFinder * | _pulseFinderPrePostPlateau |
float | _readoutFrequency |
The reference value. Has to be returned correctly. | |
A class which is friend of PulseFinder so it can access the protected members for testing.
|
protected |
this function gets the search result of the brute search and compares it to the reference values given.
Returns true if all values are ok.
Referenced by runAllTests().
|
protected |
Compare the adc values in the pulses to the referenceADCValues.
The positions (first and last sample) are given in the referencePositions. As usual the last sample points to the position after the last sample in the pulse. Only to be used with plateau pulses (checks on the flag and requires the spectrum to be saved).
Referenced by runAllTests().
int marlintpc::PulseFinderTester::runAllTests | ( | ) |
Run all tests and return the number of failed tests.
This is the variance, which is not the error. No idea how to calculate it correctly float referenceTimeErrorDerivativeMethod = sqrt( 20*20*(6.-meanBin)*(6.-meanBin)
References marlintpc::PulseFinder::_noiseValuePedestalWidthFactor, _readoutFrequency, marlintpc::PulseFinder::brutePulseSearch(), marlintpc::PulseFinder::calcPulseChargeMaxQ(), marlintpc::PulseFinder::calcPulseChargeSumQ(), marlintpc::PulseFinder::calcPulseTimeAtMaximum(), marlintpc::PulseFinder::calcPulseTimeCentreOfGravity(), marlintpc::PulseFinder::calcPulseTimeFirstBinAboveThreshold(), marlintpc::PulseFinder::calcPulseTimeInflexionPoint(), marlintpc::PulseFinder::calculatePulseWithFit(), evaluateBruteSearchResult(), evaluatePlateauCutoff(), marlintpc::PulseFinder::findPulseCandidates(), marlintpc::PulseFinder::findPulses(), marlintpc::PulseFinder::getPedestalWidth(), marlintpc::PulseFinder::setForceSpectrumSave(), and marlintpc::PulseFinder::splitMultiplePulses().