algorithms to manipulate traces More...
#include "utl/TraceAlgorithm.h"
Static Public Member Functions | |
template<typename T > | |
static double | Centroid (const Trace< T > &trace, const unsigned int bin1, const unsigned int bin2) |
template<typename T > | |
static double | FallTime (const Trace< T > &trace, unsigned int bin1, unsigned int bin2) |
template<typename T > | |
static double | Max (const Trace< T > &trace, const unsigned int bin1, const unsigned int bin2) |
Evaluate the maximum of trace between bin1 and bin2. More... | |
template<typename T > | |
static double | Mean (const Trace< T > &trace, const unsigned int bin1, const unsigned int bin2) |
Evaluate the mean of trace between bin1 and bin2. More... | |
template<typename T > | |
static double | Median (const Trace< T > &trace, const unsigned int bin1, const unsigned int bin2, const unsigned int sortAlgorithmLimit=40) |
Evaluate the median of trace between bin1 and bin2. More... | |
template<typename T > | |
static double | Min (const Trace< T > &trace, const unsigned int bin1, const unsigned int bin2) |
Evaluate the minimum of trace between bin1 and bin2. More... | |
template<typename T > | |
static double | RiseTime (const Trace< T > &trace, const unsigned int bin1, const unsigned int bin2) |
template<typename T > | |
static double | RMS (const Trace< T > &trace, const unsigned int bin1, const unsigned int bin2) |
template<typename T > | |
static double | RootMeanSquare (const Trace< T > &trace, const unsigned int bin1, const unsigned int bin2) |
Evaluate the RootMeanSquare of trace between bin1 and bin2. More... | |
template<typename T > | |
static double | ShapeParameter (const Trace< T > &trace, const unsigned int bin1, const unsigned int bin2) |
Evaluate the shape parameter between bin1 and bin2. More... | |
template<typename T > | |
static double | StandardDeviation (const Trace< T > &trace, const unsigned int bin1, const unsigned int bin2) |
Evaluate the StandardDeviation of trace between bin1 and bin2. More... | |
template<typename T > | |
static double | Sum (const Trace< T > &trace, const unsigned int bin1, const unsigned int bin2) |
Evaluate the sum of bins bin1 thru bin2. More... | |
template<typename T > | |
static double | TimeAtRelativeSignalX (const Trace< T > &trace, const unsigned int bin1, const unsigned int bin2, const double percent) |
Static Private Member Functions | |
template<typename T > | |
static bool | BoundsOk (const Trace< T > &trace, const unsigned int bin1, const unsigned int bin2) |
template<typename T > | |
static double | Mean (const std::vector< T > &v) |
algorithms to manipulate traces
Warning: note that the bin2 is inclusive range [bin1, bin2], ie it does not follow the usual C++ begin/end convention where end is exclusive, or [begin, end).
Definition at line 38 of file TraceAlgorithm.h.
|
staticprivate |
Definition at line 247 of file TraceAlgorithm.cc.
References ERROR, utl::Trace< T >::GetSize(), and utl::Trace< T >::GetStop().
Referenced by Centroid(), FallTime(), Max(), Mean(), Median(), Min(), RiseTime(), RMS(), RootMeanSquare(), ShapeParameter(), StandardDeviation(), Sum(), and TimeAtRelativeSignalX().
|
static |
Evaluate the centroid in bin number between bin1 and bin2 Computes the centroid in number of bins. In other words, this method does not multiply by the bin size. To compute centroid in eg. time, you need to use the GetBinning() method to get size of a bin.
Definition at line 226 of file TraceAlgorithm.cc.
References BoundsOk().
|
static |
Definition at line 351 of file TraceAlgorithm.cc.
References BoundsOk().
|
static |
Evaluate the maximum of trace between bin1 and bin2.
Definition at line 30 of file TraceAlgorithm.cc.
References BoundsOk().
Referenced by RdChannelNoisePulseCounter::RdChannelNoisePulseCounter::FindPulse().
|
static |
Evaluate the mean of trace between bin1 and bin2.
Definition at line 42 of file TraceAlgorithm.cc.
References BoundsOk().
Referenced by RdBeamTimeOptimizer::RdBeamTimeOptimizer::findPeak(), RdBeamFormer::RdBeamFormer::findPeak(), utl::RadioTraceUtilities::Noisefinder(), RdVirtualStationNoiseImporter::RdVirtualStationNoiseImporter::RemovePedestal(), RdChannelNoiseASCIIImporter::RdChannelNoiseASCIIImporter::RemovePedestal(), RdChannelNoiseImporter_AERA::RdChannelNoiseImporter_AERA::RemovePedestal(), and RdVirtualStationNoiseImporter::RdVirtualStationNoiseImporter::Run().
|
inlinestaticprivate |
Definition at line 55 of file TraceAlgorithm.cc.
|
static |
Evaluate the median of trace between bin1 and bin2.
Definition at line 63 of file TraceAlgorithm.cc.
References BoundsOk(), un2::Mean(), and utl::swap().
|
static |
Evaluate the minimum of trace between bin1 and bin2.
Definition at line 18 of file TraceAlgorithm.cc.
References BoundsOk().
|
static |
Evaluate risetime for the trace where the risetime is the time to go from 10% to 50% of integrated signal
Definition at line 337 of file TraceAlgorithm.cc.
References BoundsOk().
|
static |
Evaluate the RMS of trace between bin1 and bin2 WARNING: This function actually calculates the StandardDeviation
Definition at line 152 of file TraceAlgorithm.cc.
References BoundsOk(), un2::Mean(), sqrt(), and U.
Referenced by RdBeamTimeOptimizer::RdBeamTimeOptimizer::findPeak().
|
static |
Evaluate the RootMeanSquare of trace between bin1 and bin2.
Definition at line 178 of file TraceAlgorithm.cc.
References BoundsOk(), sqrt(), and U.
Referenced by RdBeamFormer::RdBeamFormer::findPeak(), RdChannelNoisePulseCounter::RdChannelNoisePulseCounter::FindPulse(), utl::RadioTraceUtilities::Noisefinder(), and RdChannelNoiseGenerator::RdChannelNoiseGenerator::Run().
|
static |
Evaluate the shape parameter between bin1 and bin2.
as defined in GAP 2003-076
Definition at line 273 of file TraceAlgorithm.cc.
References BoundsOk(), utl::Trace< T >::GetBinning(), and utl::nanosecond.
|
static |
Evaluate the StandardDeviation of trace between bin1 and bin2.
Definition at line 195 of file TraceAlgorithm.cc.
References BoundsOk(), un2::Mean(), sqrt(), and U.
|
static |
Evaluate the sum of bins bin1 thru bin2.
Definition at line 214 of file TraceAlgorithm.cc.
References BoundsOk().
|
static |
Evaluate the rise and fall time percent values of integrated trace between bin1 and bin2
Hic sunt leones.
Timing definition: TimeAtRelativeSignalX() should return the time offset to the TraceStartTime. TraceStartTime is defined as time one bin size before bin 0 (since FADC integrates the signal between bins).
Definition at line 304 of file TraceAlgorithm.cc.
References BoundsOk(), and utl::Trace< T >::GetBinning().