List of all members | Static Public Member Functions | Static Private Member Functions
utl::TraceAlgorithm Class Reference

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)
 

Detailed Description

algorithms to manipulate traces

Author
Stefano Argiro'
Date
10 Sep 2003

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.

Member Function Documentation

template<typename T >
bool TraceAlgorithm::BoundsOk ( const Trace< T > &  trace,
const unsigned int  bin1,
const unsigned int  bin2 
)
staticprivate
template<typename T >
template double TraceAlgorithm::Centroid ( const Trace< T > &  trace,
const unsigned int  bin1,
const unsigned int  bin2 
)
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().

template<typename T >
template double TraceAlgorithm::FallTime ( const Trace< T > &  trace,
unsigned int  bin1,
unsigned int  bin2 
)
static

Definition at line 351 of file TraceAlgorithm.cc.

References BoundsOk().

template<typename T >
template double TraceAlgorithm::Max ( const Trace< T > &  trace,
const unsigned int  bin1,
const unsigned int  bin2 
)
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().

template<typename T >
double TraceAlgorithm::Mean ( const Trace< T > &  trace,
const unsigned int  bin1,
const unsigned int  bin2 
)
static
template<typename T >
double TraceAlgorithm::Mean ( const std::vector< T > &  v)
inlinestaticprivate

Definition at line 55 of file TraceAlgorithm.cc.

template<typename T >
template double TraceAlgorithm::Median ( const Trace< T > &  trace,
const unsigned int  bin1,
const unsigned int  bin2,
const unsigned int  sortAlgorithmLimit = 40 
)
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().

template<typename T >
template double TraceAlgorithm::Min ( const Trace< T > &  trace,
const unsigned int  bin1,
const unsigned int  bin2 
)
static

Evaluate the minimum of trace between bin1 and bin2.

Definition at line 18 of file TraceAlgorithm.cc.

References BoundsOk().

template<typename T >
template double TraceAlgorithm::RiseTime ( const Trace< T > &  trace,
const unsigned int  bin1,
const unsigned int  bin2 
)
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().

template<typename T >
template double TraceAlgorithm::RMS ( const Trace< T > &  trace,
const unsigned int  bin1,
const unsigned int  bin2 
)
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().

template<typename T >
template double TraceAlgorithm::RootMeanSquare ( const Trace< T > &  trace,
const unsigned int  bin1,
const unsigned int  bin2 
)
static
template<typename T >
template double TraceAlgorithm::ShapeParameter ( const Trace< T > &  trace,
const unsigned int  bin1,
const unsigned int  bin2 
)
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.

template<typename T >
template double TraceAlgorithm::StandardDeviation ( const Trace< T > &  trace,
const unsigned int  bin1,
const unsigned int  bin2 
)
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.

template<typename T >
template double TraceAlgorithm::Sum ( const Trace< T > &  trace,
const unsigned int  bin1,
const unsigned int  bin2 
)
static

Evaluate the sum of bins bin1 thru bin2.

Definition at line 214 of file TraceAlgorithm.cc.

References BoundsOk().

template<typename T >
template double TraceAlgorithm::TimeAtRelativeSignalX ( const Trace< T > &  trace,
const unsigned int  bin1,
const unsigned int  bin2,
const double  percent 
)
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().


The documentation for this class was generated from the following files:

, generated on Tue Sep 26 2023.