NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
Public Attributes | List of all members
TrAnal::CFDResult< T > Struct Template Reference

Result for a CFD computation. More...

#include <CFD.hpp>

Public Attributes

TrIterator< T > trig
 TrIterator pointing to element immediately before zero crossing.
 
double fraction
 fractional distance to the zero crossing beyond trig iterator
 

Detailed Description

template<class T>
struct TrAnal::CFDResult< T >

Result for a CFD computation.

Together the two items in this struct locate the zero crossing.

Because the CFD algorithm does not necessarily start its search at the beginning of the search, it can only identify a location. Typically, the trig and the fraction will be used in a manner similar to as follows.

... code ...

// Execute CFD algorithm over first 100 elements of trace
CFDResult<uint16_t> res = CFD(  TrRange<uint16_t>(trace.begin(),100), //range to search
                                10, // fast filter rise
                                2,  // fast filter gap 
                                3,  // cfd delay
                                0 );  // cfd scale factor

// Compute distance from start of trace to res.trig and then add fraction
double cfd_zero_crossing = (res.trig - trace.begin()) + fraction;

... code ...

The documentation for this struct was generated from the following file: