23 #define NAN (numeric_limits<float>::quiet_NaN())
34 class Trace :
public std::vector<int> {
43 Trace(
const std::vector<int> &x) : std::vector<int>(x) {
52 unsigned int lo = 0)
const {
66 unsigned int lo,
unsigned int hi)
const;
85 void SetValue(std::string name,
double value) {
142 double DoQDC(
unsigned int lo,
unsigned int numBins);
149 unsigned int FindMaxInfo(
unsigned int lo = 5,
unsigned int hi = 10,
unsigned int numBins = 15);
178 virtual void plot(
int dammId,
double val1,
double val2 = -1,
179 double val3 = -1,
const char* name=
"h")
const {
180 histo.
Plot(dammId, val1, val2, val3, name);
189 void Plot(
int id,
int row);
198 void ScalePlot(
int id,
int row,
double scale);
207 void OffsetPlot(
int id,
int row,
double offset);
bool DeclareHistogram2D(int dammId, int xSize, int ySize, const char *title, int halfWordsPerChan, int xHistLength, int xLow, int xHigh, int yHistLength, int yLow, int yHigh, const std::string &mne="")
Declares a 2D histogram calls the C++ wrapper for DAMM.
unsigned int baselineHigh
high range for the baseline
Definition: Trace.hpp:212
Parameters for your typical trapezoidal filter.
Definition: Trace.hpp:225
Trace()
Definition: Trace.hpp:37
Trace::size_type GetSize(void) const
Definition: Trace.hpp:261
void TrapezoidalFilter(Trace &filter, const TFP &parms, unsigned int lo=0) const
Definition: Trace.hpp:51
double GetTau(void) const
Definition: Trace.hpp:264
Lists Offsets and Ranges for various Processors.
TrapezoidalFilterParameters(int gap, int rise, double t=NAN)
Definition: Trace.hpp:234
unsigned int baselineLow
low range for the baseline
Definition: Trace.hpp:211
virtual void DeclareHistogram1D(int dammId, int xSize, const char *title)
Declares a 1D histogram calls the C++ wrapper for DAMM.
Definition: Trace.hpp:155
std::map< std::string, int > intTraceData
Trace data stored as ints.
Definition: Trace.hpp:217
double DoBaseline(unsigned int lo=0, unsigned int numBins=numBinsBaseline)
double DoQDC(unsigned int lo, unsigned int numBins)
A container to request a block of plots and plot respective spectra through the plots register...
bool Plot(int dammId, double val1, double val2=-1, double val3=-1, const char *name="h")
Plots into histogram defined by dammId.
static Plots histo
Definition: Trace.hpp:221
void InsertValue(std::string name, double value)
Definition: Trace.hpp:71
Trace::size_type gapSamples
number of samples in the gap
Definition: Trace.hpp:264
TrapezoidalFilterParameters()
Definition: Trace.hpp:228
constant parameters used in pixie16 analysis
double DoDiscrimination(unsigned int lo, unsigned int numBins)
Store the information for a trace.
Definition: Trace.hpp:34
#define NAN
Definition: Trace.hpp:23
std::vector< double > GetWaveform()
Definition: Trace.hpp:122
double tau
Tau of the energy filter.
Definition: Trace.hpp:269
bool HasValue(std::string name) const
Definition: Trace.hpp:105
void InsertValue(std::string name, int value)
Definition: Trace.hpp:78
const TFP & operator=(const TFP &right)
Definition: Trace.hpp:246
virtual void plot(int dammId, double val1, double val2=-1, double val3=-1, const char *name="h") const
Implementation of the plot command to interface with the DAMM routines.
Definition: Trace.hpp:178
TrapezoidalFilterParameters(const TFP &x)
Definition: Trace.hpp:239
Trace::size_type GetRiseSamples(void) const
Definition: Trace.hpp:258
const Trace emptyTrace
Instance of an empty trace for people to grab.
void OffsetPlot(int id, double offset)
double GetValue(std::string name) const
Definition: Trace.hpp:113
const pixie::word_t U_DELIMITER
Definition: Globals.hpp:39
std::vector< double > waveform
The waveform inside the trace.
Definition: Trace.hpp:214
unsigned int FindMaxInfo(unsigned int lo=5, unsigned int hi=10, unsigned int numBins=15)
Trace::size_type GetGapSamples(void) const
Definition: Trace.hpp:255
virtual void DeclareHistogram2D(int dammId, int xSize, int ySize, const char *title)
Declares a 2D histogram calls the C++ wrapper for DAMM.
Definition: Trace.hpp:164
Trace::size_type riseSamples
number of samples in the rise time
Definition: Trace.hpp:267
Trace(const std::vector< int > &x)
Definition: Trace.hpp:43
void SetValue(std::string name, int value)
Definition: Trace.hpp:95
void SetValue(std::string name, double value)
Definition: Trace.hpp:85
std::map< std::string, double > doubleTraceData
Trace data stored as doubles.
Definition: Trace.hpp:216
bool DeclareHistogram1D(int dammId, int xSize, const char *title, int halfWordsPerChan, int xHistLength, int xLow, int xHigh, const std::string &mne="")
Declares a 1D histogram calls the C++ wrapper for DAMM.
Holds pointers to all Histograms.
Definition: Plots.hpp:27
void ScalePlot(int id, double scale)
static const unsigned int numBinsBaseline
Number of bins in the baseline.
Definition: Trace.hpp:210