DDASToys for NSCLDAQ  6.2-000
Macros | Functions
cudafit_analytic.cuh File Reference

Header for the CUDA swarm fitting code. More...

#include <cstdint>
#include <vector>
Include dependency graph for cudafit_analytic.cuh:
This graph shows which files directly or indirectly include this file:

Functions

void ddastoys::analyticfit::cudafit1 (fit1Info *pResult, const std::vector< uint16_t > &trace, const std::pair< unsigned, unsigned > &limits, uint16_t saturation=0xffff, bool freeTraceWhenDone=true)
 Perform a single-pulse fit using libcudaoptimize. More...
 
void ddastoys::analyticfit::cudafit2 (ddastoys::fit2Info *pResult, const std::vector< uint16_t > &trace, const std::pair< unsigned, unsigned > &limits, uint16_t saturation=0xffff, bool traceIsLoaded=false)
 Perform a double-pulse fit using libcudaoptimize. More...
 

Detailed Description

Header for the CUDA swarm fitting code.

Function Documentation

◆ cudafit1()

void ddastoys::analyticfit::cudafit1 ( fit1Info pResult,
const std::vector< uint16_t > &  trace,
const std::pair< unsigned, unsigned > &  limits,
uint16_t  saturation = 0xffff,
bool  freeTraceWhenDone = true 
)

Perform a single-pulse fit using libcudaoptimize.

Parameters
pResultPointer to the resulting parameters.
traceReferences the raw trace data.
limitsProvides the limits over which the trace is done.
saturationDefines the FADC saturation level.
freeTraceWhenDoneIf true (default) the trace data is freed from the GPU if not it's left allocated. This allows a double fit to be done immediately after with no reallocation/copy.

◆ cudafit2()

void ddastoys::analyticfit::cudafit2 ( ddastoys::fit2Info pResult,
const std::vector< uint16_t > &  trace,
const std::pair< unsigned, unsigned > &  limits,
uint16_t  saturation = 0xffff,
bool  traceIsLoaded = false 
)

Perform a double-pulse fit using libcudaoptimize.

Parameters
pResultPointer to the resulting parameters.
traceReferences the raw trace data.
limitsProvides the limits over which the trace is done.
saturationDefines the FADC saturation level.
traceIsLoadedIf true, the trace is already loaded into the GPU from a prior cudafit1 call. Note that regardless the trace is freed after we're run. The default requires us to copy the trace.