3Depict
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Functions | Variables
3DapReader.cpp File Reference
#include "3DapReader.h"
#include <vector>
#include <iostream>
#include <cstdlib>
#include <fstream>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_fit.h>
#include <gsl/gsl_multifit.h>
#include "common/basics.h"
Include dependency graph for 3DapReader.cpp:

Classes

struct  SINGLE_HIT
 
struct  VOLTAGE_DATA
 
struct  THREEDAP_DATA
 
struct  THREEDAP_EXPERIMENT
 

Functions

float evaluate_polyBase (float x, float y, unsigned int baseNum, unsigned int order)
 
unsigned int polyFitData (const vector< float > &obsX, const vector< float > &obsY, const vector< float > &obsZ, vector< float > &coeff, unsigned int polyOrder)
 
unsigned int readOps (const char *file, THREEDAP_EXPERIMENT &data, unsigned int &badLine, unsigned int &progress, ATOMIC_BOOL &wantAbort, bool strictMode=false)
 
void computeMToC (THREEDAP_EXPERIMENT &experiment)
 
void cylinderReconstruct (const THREEDAP_EXPERIMENT &experiment, float ionVolume, float scaleRadius, std::vector< IonHit > &ions)
 
unsigned int reconstruct3DapData (const char *file, const THREEDAP_RECON_PARAMS &params, unsigned int &progress, ATOMIC_BOOL &wantAbort, std::vector< IonHit > &ionData)
 Reconstruct an "OPS" formatted file (from a 3Dap) to an IonHit vector. More...
 

Variables

const unsigned int NUM_XY =2
 
const float CHARGE_ELECTRON = 1.602176e-19
 
const float AMU_PER_KG = 6.0221409e26
 
const char * OPS_ENUM_ERRSTRINGS []
 

Function Documentation

◆ computeMToC()

void computeMToC ( THREEDAP_EXPERIMENT experiment)

◆ cylinderReconstruct()

void cylinderReconstruct ( const THREEDAP_EXPERIMENT experiment,
float  ionVolume,
float  scaleRadius,
std::vector< IonHit > &  ions 
)

◆ evaluate_polyBase()

float evaluate_polyBase ( float  x,
float  y,
unsigned int  baseNum,
unsigned int  order 
)

◆ polyFitData()

unsigned int polyFitData ( const vector< float > &  obsX,
const vector< float > &  obsY,
const vector< float > &  obsZ,
vector< float > &  coeff,
unsigned int  polyOrder 
)

◆ readOps()

unsigned int readOps ( const char *  file,
THREEDAP_EXPERIMENT data,
unsigned int &  badLine,
unsigned int &  progress,
ATOMIC_BOOL wantAbort,
bool  strictMode = false 
)

◆ reconstruct3DapData()

unsigned int reconstruct3DapData ( const char *  file,
const THREEDAP_RECON_PARAMS params,
unsigned int &  progress,
ATOMIC_BOOL wantAbort,
std::vector< IonHit > &  ionData 
)

Reconstruct an "OPS" formatted file (from a 3Dap) to an IonHit vector.

References computeMToC(), cylinderReconstruct(), THREEDAP_RECON_PARAMS::detectionEfficiency, THREEDAP_RECON_PARAMS::ionVolume, THREEDAP_RECON_PARAMS::radiusCylinder, and readOps().

Referenced by DataLoadFilter::refresh().

Here is the caller graph for this function:

Variable Documentation

◆ AMU_PER_KG

const float AMU_PER_KG = 6.0221409e26

◆ CHARGE_ELECTRON

const float CHARGE_ELECTRON = 1.602176e-19

◆ NUM_XY

const unsigned int NUM_XY =2

Referenced by readOps().

◆ OPS_ENUM_ERRSTRINGS

const char* OPS_ENUM_ERRSTRINGS[]
Initial value:
=
{
"\"C\" line (exp. parameters) not in expected format",
"\"I\" line (Detector parameters) not in expected format",
"\"-\" line (Time-of-flights) not in expected format",
"\"V\" line (voltage data) not in expected format",
"Error interpreting \"V\" line (voltage data) data",
"Missing beta value from \"V\" line - needs to be in voltage, or in system header (\"C\" line",
"Incorrect number of \"V\" line (voltage data) data entries",
"Unknown linetype in data file",
"\"P\" line (detector channels) not in expected format",
"Unable to interpret channels line",
"Incorrect number of events in \"S\" (hit position) line",
"Unable to interpret event data on \"S\" (hit position) line",
"Unable to parse \"S\" (hit position) line event count (eg 8 in S8 ...)",
"\"S\" (hit position) line data not preceded by TOF data, as it should have been",
"Duplicate system data/experiment setup (\"C\") entry found -- there can only be one",
"Duplicate detector (\"I\") data entry found -- there can only be one",
"Trailing \"-\" line found -- should have be followed by a \"S\" line, but wasn't.",
"Duplicate\"-\" line found -- should have be followed by a \"S\" line, but wasn't.",
"Unable to open file",
"unable to read file, after opening",
"Abort requested"
}

Referenced by readOps(), and DataLoadFilter::refresh().