CFEL - ASG Software Suite  2.5.0
CASS
Namespaces | Classes | Typedefs | Enumerations | Functions
cass::ACQIRIS Namespace Reference

Namespaces

 AchimCalibrator
 
 AchimHex
 
 CenterOfMass
 
 ConstantFraction
 
 UnitConvertion
 

Classes

class  AGATStreamer
 deserialize the data stream of the regular agat program More...
 
class  AnodeLayer
 A anode layer of the delayline detector. More...
 
class  CFD16Bit
 Finds signals in a 16 bit waveform. More...
 
class  CFD8Bit
 Finds Signals in a waveform. More...
 
struct  CFDParameters
 struct to combine the parameters that the Constant Fraction Extractors need More...
 
class  Channel
 A Channel of an Acqiris Instrument. More...
 
class  CoM16Bit
 Finds signals in a 16 bit waveform. More...
 
class  CoM8Bit
 Finds Signals in a waveform. More...
 
class  CombineConditions
 a combination of conditions More...
 
struct  CoMParameters
 struct to combine the parameters that the Center of Mass Extractors need More...
 
class  Converter
 Acqiris Converter. More...
 
class  DelaylineDetector
 A delayline detector. More...
 
class  DelaylineDetectorAnalyzerBackend
 base class for delayline detector analysis. More...
 
class  DelaylineDetectorAnalyzerSimple
 Simple sorter of hits from a Quadanode delayline detector. More...
 
class  DelaylineNonSorting
 Simple detectorhit creator. More...
 
class  DetectorAnalyzerBackend
 Base class for all detector analyzers. More...
 
class  DetectorBackend
 Base class for all Detectors attached to an Acqiris Instrument. More...
 
class  Device
 The Acqiris device. More...
 
class  HelperAcqirisDetectors
 Helper for Acqiris related Postprocessors. More...
 
class  HexSorter
 Achims resort routine wrapper. More...
 
class  HitCorrector
 copy and correct detectorhit properties More...
 
class  Instrument
 An Acqiris Instrument. More...
 
struct  isInRange
 check whether anode end wire signal is correleated to mcp signal More...
 
class  isInTimeRange
 functor returning true if signal is in requested range More...
 
class  IsParticleHit
 base class of conditions for finding the right particle More...
 
class  LMAParser
 Will parse a lma file. More...
 
class  LmaReader
 class for reading lma files More...
 
class  MomentumCalculator
 base class for calculating momenta from a detector hit More...
 
class  Particle
 A Particle. More...
 
class  PositionCalculator
 position calculator base class More...
 
class  PxPyCalculatorWithBField
 calculate px,py momenta More...
 
class  PxPyCalculatorWithoutBField
 calculate px,py momenta More...
 
class  PzCalculatorDirectOneRegion
 calculate pz momenta More...
 
class  PzCalculatorMulitpleRegions
 calculate pz momenta More...
 
class  RadCond
 a radius position condition More...
 
class  RectCond
 a simple position condition More...
 
class  SignalExtractor
 Base class for classes that extract Signals from recorded data. More...
 
class  SignalProducer
 A Signal Producer. More...
 
class  Spectrometer
 a REMI type spectrometer More...
 
class  SpectrometerRegion
 a region of a spectrometer More...
 
class  TofCond
 a Time of Flight condition More...
 
class  TofDetector
 A Time of Flight Detector. More...
 
class  UVCalc
 position calculator for hex anodes u and v layer More...
 
class  UWCalc
 position calculator for hex anodes u and w layer More...
 
class  VWCalc
 position calculator for hex anodes u and v layer More...
 
class  XYCalc
 position calculator for quad anode More...
 

Typedefs

typedef std::vector< double > particleHit_t
 define a particle hit More...
 
typedef std::vector< particleHit_tparticleHits_t
 define container for all particle hits More...
 
typedef std::vector< double > detectorHit_t
 define a detector hit More...
 
typedef std::vector< detectorHit_tdetectorHits_t
 define container for all detector hits More...
 
typedef SignalProducer::signal_t signal_t
 typedefs for shorter code More...
 
typedef SignalProducer::signals_t signals_t
 typedefs for shorter code More...
 
typedef signals_t::iterator sigIt_t
 typedefs for shorter code More...
 
typedef std::pair< sigIt_t, sigIt_trange_t
 typedefs for shorter code More...
 

Enumerations

enum  particleHits {
  px = 0, py = 1, pz = 2, x_mm = 4,
  y_mm = 5, tof_ns = 6, xCor_mm = 7, yCor_mm = 8,
  xCorScal_mm = 9, yCorScal_mm = 10, xCorScalRot_mm = 11, yCorScalRot_mm = 12,
  tofCor_ns = 13, roh = 14, theta = 15, phi = 16,
  e_au = 17, e_eV = 18, NbrParticleHitDefinitions
}
 types of pariticle hits More...
 
enum  detectorHits {
  x = 0, y = 1, t = 2, method = 3,
  NbrDetectorHitDefinitions
}
 types of detector hits More...
 
enum  SignalProperties {
  time = 0, cfd = 1, polarity = 2, isUsed = 3,
  com = 4, fwhm = 5, height = 6, maxpos = 7,
  width = 8, startpos = 9, stoppos = 10, maximum = 11,
  integral = 12, NbrSignalDefinitions
}
 types of signals More...
 
enum  Polarity { Bad, Positive, Negative }
 the Polarity of a Signal in the waveform (Peak) More...
 
enum  DetectorType { Delayline, ToF }
 the types of detectors that are available More...
 
enum  DetectorAnalyzerType { DelaylineSimple, AchimsRoutine, AchimsCalibrator, NonSorting }
 the available detector analyzers More...
 
enum  DelaylineType { Quad, Hex }
 the types of delayline detectors that are available More...
 
enum  SignalExtractorType {
  com8, com16, cfd8, cfd16,
  tdcextractor
}
 the waveformanalyzers that are available More...
 

Functions

DelaylineDetector::anodelayers_t::key_type loadLayer (CASSSettings &s, const HelperAcqirisDetectors::helperinstancesmap_t::key_type &detector, const std::string &layerKey, int ppNbr, const string &key)
 load layer from file More...
 
AnodeLayer::wireends_t::key_type loadWireend (CASSSettings &s, const std::string &wireendKey, int ppNbr, const string &key)
 load wireend from file More...
 
std::string loadDelayDet (CASSSettings &s, int ppNbr, const std::string &key)
 load detector from file More...
 
std::string loadParticle (CASSSettings &s, const std::string &detector, int ppNbr, const std::string &key)
 load particle for a specific detector More...
 
pair< sigIt_t, sigIt_tgetSignalRange (signals_t &sigs, const double mcp, const double ts, const double rTime)
 return range of possible anode wire signal candidates More...
 
template<typename T >
const ChannelextactRightChannel (const CASSEvent &evt, const uint32_t instrument, const size_t &ChannelNumber)
 extracts the requested channel from the data More...
 
template<typename T >
void linearRegression (const size_t nbrPoints, const double x[], const double y[], double &m, double &c)
 linear Regression More...
 
template<typename T >
void gewichtetlinearRegression (const size_t nbrPoints, const double x[], const double y[], const double correctX, double &m, double &c)
 A weighted linear Regression. More...
 
template<typename T >
void createNewtonPolynomial (const double *x, const double *y, double *coeff)
 create Newton Polynomial More...
 
template<typename T >
double evalNewtonPolynomial (const double *x, const double *coeff, double X)
 evaluate Newton Polynomial More...
 
template<typename T >
double findXForGivenY (const double *x, const double *coeff, const double Y, const double Start)
 Achims Numerical Approximation. More...
 
template<typename T >
void getfwhm (const Channel &c, SignalProducer::signal_t &s, const double &)
 extract full width at half maximum (fwhm) More...
 
template<typename T >
void CoM (const Channel &c, SignalProducer::signal_t &s, const double &thresh)
 Center of Mass. More...
 
template<typename T >
void startstop (const Channel &c, SignalProducer::signal_t &s, const double &thresh)
 find start and stop of pulse More...
 
template<typename T >
void getmaximum (const Channel &c, SignalProducer::signal_t &s, const double &)
 find Maximum of puls and calcs the height More...
 
double Pi ()
 
void getDetPlaneMomenta (double x_mm, double y_mm, double tof_ns, const Particle &particle, double &px_au, double &py_au)
 calculate Momentum in Detektor Plane More...
 
double getDetPlaneMomentum (double axis_mm, double tof_ns, double mass_au)
 calculate the momentum in the detector plane More...
 
double getZMom (double tof_ns, double mass_au, double charge_au, const SpectrometerRegion &sr)
 Momentum along time of flight. More...
 
double evalFunc (double v0, double mass_au, double charge_au, const Spectrometer &spec)
 helper function for endless SpectrometerRegions More...
 
double getZMomIter (double tof_ns, double mass_au, double charge_au, const Spectrometer &spectrometer)
 Momentum along time of flight. More...
 
void kartesian2polar (particleHit_t &hit)
 convert kartesian coordinates to polar coordinates More...
 

Typedef Documentation

typedef std::vector<double> cass::ACQIRIS::detectorHit_t

define a detector hit

Definition at line 52 of file acqiris_analysis_definitions.hpp.

define container for all detector hits

Definition at line 65 of file acqiris_analysis_definitions.hpp.

typedef std::vector<double> cass::ACQIRIS::particleHit_t

define a particle hit

Definition at line 23 of file acqiris_analysis_definitions.hpp.

define container for all particle hits

Definition at line 49 of file acqiris_analysis_definitions.hpp.

typedefs for shorter code

Definition at line 39 of file delayline_detector_analyzer_simple.cpp.

typedef signals_t::iterator cass::ACQIRIS::sigIt_t

typedefs for shorter code

Definition at line 38 of file delayline_detector_analyzer_simple.cpp.

typedefs for shorter code

Definition at line 36 of file delayline_detector_analyzer_simple.cpp.

typedefs for shorter code

Definition at line 37 of file delayline_detector_analyzer_simple.cpp.

Enumeration Type Documentation

the types of delayline detectors that are available

Enumerator
Quad 
Hex 

Definition at line 96 of file acqiris_analysis_definitions.hpp.

the available detector analyzers

Enumerator
DelaylineSimple 
AchimsRoutine 
AchimsCalibrator 
NonSorting 

Definition at line 93 of file acqiris_analysis_definitions.hpp.

types of detector hits

Enumerator
method 
NbrDetectorHitDefinitions 

Definition at line 55 of file acqiris_analysis_definitions.hpp.

the types of detectors that are available

Enumerator
Delayline 
ToF 

Definition at line 90 of file acqiris_analysis_definitions.hpp.

types of pariticle hits

Enumerator
px 
py 
pz 
x_mm 
y_mm 
tof_ns 
xCor_mm 
yCor_mm 
xCorScal_mm 
yCorScal_mm 
xCorScalRot_mm 
yCorScalRot_mm 
tofCor_ns 
roh 
theta 
phi 
e_au 
e_eV 
NbrParticleHitDefinitions 

Definition at line 26 of file acqiris_analysis_definitions.hpp.

the Polarity of a Signal in the waveform (Peak)

Enumerator
Bad 
Positive 
Negative 

Definition at line 87 of file acqiris_analysis_definitions.hpp.

the waveformanalyzers that are available

Enumerator
com8 
com16 
cfd8 
cfd16 
tdcextractor 

Definition at line 99 of file acqiris_analysis_definitions.hpp.

types of signals

Enumerator
time 
cfd 
polarity 
isUsed 
com 
fwhm 
height 
maxpos 
width 
startpos 
stoppos 
maximum 
integral 
NbrSignalDefinitions 

Definition at line 68 of file acqiris_analysis_definitions.hpp.

Function Documentation

template<typename T >
void cass::ACQIRIS::CoM ( const Channel c,
SignalProducer::signal_t s,
const double &  thresh 
)

Center of Mass.

find the center of mass of the peak by calculating also the integral of the peak.

Parameters
[in]cthe channel the peak was found in
[in,out]sthe peak
[in]threshthe threshold that we used to identify the signal in V
Author
Lutz Foucar

Definition at line 404 of file helperfunctionsforstdc.hpp.

References com, cass::ACQIRIS::Channel::gain(), cass::ACQIRIS::Channel::horpos(), integral, cass::ACQIRIS::Channel::offset(), cass::ACQIRIS::Channel::sampleInterval(), startpos, stoppos, and cass::ACQIRIS::Channel::waveform().

template<typename T >
void cass::ACQIRIS::createNewtonPolynomial ( const double *  x,
const double *  y,
double *  coeff 
)

create Newton Polynomial

This function creates the coefficients for Newton interpolating Polynomials. Newton Polynomials are created from n Points and have the form $p(x) = c_0 + c_1(x-x_0) + c_2(x-x_0)(x-x_1)+...+c_{n-1}(x-x_0)(x-x_1)...(x-x_{n-2})$ given that you have n Points $(x_0,y_0), (x_1,y_1), ..., (x_{n-1},y_{n-1})$ Here we do it for 4 Points.

Parameters
[in]xthe x-values of the points
[in]ythe y-values of the points
[out]coeffthe coefficients of the newton polynomial
Returns
void
Author
Lutz Foucar

Definition at line 158 of file helperfunctionsforstdc.hpp.

double cass::ACQIRIS::evalFunc ( double  v0,
double  mass_au,
double  charge_au,
const Spectrometer spec 
)

helper function for endless SpectrometerRegions

this helper will calculate the time of flight of a particle with a given mass and charge in a spectrometer

Returns
the time of flight in ns
Parameters
v0the initial velocity of the particle
mass_authe mass of the particle in atomic units
charge_authe charge of the particle in atomic units
specthe spectrometer through which the particle is flying
Author
Lutz Foucar

Definition at line 175 of file momenta_calculator.cpp.

References cass::ACQIRIS::Spectrometer::regions(), and cass::ACQIRIS::UnitConvertion::VPcm2mmPns().

Referenced by getZMomIter().

template<typename T >
double cass::ACQIRIS::evalNewtonPolynomial ( const double *  x,
const double *  coeff,
double  X 
)

evaluate Newton Polynomial

this function evaluates the Newton Polynomial that was created from n Points $(x_0,y_0),..., (x_{n-1},y_{n-1}) with coefficients (c_0,...,c_{n-1})$ using Horner's Rule. This is done for an polynomial with 4 entries

Parameters
[in]xarray of x values
[in]coeffarray of coefficients
[in]X
Returns
the newton polynomial
Author
Lutz Foucar

Definition at line 189 of file helperfunctionsforstdc.hpp.

template<typename T >
const Channel* cass::ACQIRIS::extactRightChannel ( const CASSEvent evt,
const uint32_t  instrument,
const size_t &  ChannelNumber 
)

extracts the requested channel from the data

Note
this function is just a template function because the compiler will give errors when its a regular function. This can be avoided by making this a functor struct or class.

retrieve the Acqiris device from the CASSEvent. Then check if the device contains the requested instruemnt. If not throw an invalid_argument exception.
If the requested instruement exists, check if it contains the requested channelnumber by checking how many channels it has. If it contains the channel return a pointer to it. If the channel number is bigger than the number of channels in the instrument, throw an invalid_argument exception.

Returns
const pointer to the channel we need to extract
Parameters
evtthe CASSEvent wich contains the channel we want to extract
instrumentthe instrument that contains the channel
ChannelNumberthe channel number of the requested channel
Author
Lutz Foucar

Definition at line 50 of file helperfunctionsforstdc.hpp.

References cass::CASSEvent::Acqiris, cass::CASSEvent::devices(), and cass::toString().

template<typename T >
double cass::ACQIRIS::findXForGivenY ( const double *  x,
const double *  coeff,
const double  Y,
const double  Start 
)

Achims Numerical Approximation.

this function should find x value corrosponding to a given y value in a newton polynomial. It does it the following way:

  1. create a lower and upper boundary point
  2. create an interating x-value and initialize it with the Start value
  3. evaluate the y-value at the x-value
  4. if the y value is bigger than the requested value the start point is defines the new upper or lower boundary depending on the slope.
  5. the new x-point is defined by the arithmetic mean between the tow boundary points.
  6. do points 3-5 until the new x-value does not differ more than 0.005 from the old one.
Parameters
[in]xtwo points describing upper and lower boundaries
[in]coeffthe newton polynomial coefficents
[in]Ythe requested y-values to find the x-value for
[in]Startthe x-value we start the search with
Author
Lutz Foucar

Definition at line 221 of file helperfunctionsforstdc.hpp.

References x.

void cass::ACQIRIS::getDetPlaneMomenta ( double  x_mm,
double  y_mm,
double  tof_ns,
const Particle particle,
double &  px_au,
double &  py_au 
)

calculate Momentum in Detektor Plane

calculates the momentum of the particle in the detector plane. This is for the case that a magnetic field is present in the spectrometer. Usually this is there because one wants to collect all electrons in the spectrometer.

First calculate the total momentum in the detector plane. Then we have to find out where the initial direction of emmision this means we need to find the angle between the x-axis and the emission angle phi.The angle depends whether the cyclotron motion is ccw or cw, meaning the B-Field is pointing into the detektor-plane or out of the detector plane respectivly.

Parameters
[in]x_mmthe x position of the hit in mm
[in]y_mmthe y position of the hit in mm
[in]tof_nsthe time of flight of the hit in ns
[in]particlethe particle properties
[out]px_authe x momentum in atomic units
[out]py_authe y momentum in atomic units
Author
Lutz Foucar

Definition at line 87 of file momenta_calculator.cpp.

References cass::ACQIRIS::Spectrometer::cyclotronPeriod_ns(), cass::ACQIRIS::Particle::mass_au(), cass::ACQIRIS::UnitConvertion::mm2au(), cass::ACQIRIS::UnitConvertion::ns2au(), phi, Pi(), cass::ACQIRIS::Spectrometer::rotationClockWise(), cass::ACQIRIS::Particle::spectrometer(), and theta.

Referenced by cass::ACQIRIS::PxPyCalculatorWithBField::operator()().

double cass::ACQIRIS::getDetPlaneMomentum ( double  axis_mm,
double  tof_ns,
double  mass_au 
)

calculate the momentum in the detector plane

calculate the momentum in the detector plane in case when there is no magnetic field present. This is simply done by calulating the velocity of the particle perpendicular to the time of flight axis when it hits the detector. This is determined by the time if flew and the position it hit the detector.

Returns
the momentum of the particle along the axis
Parameters
axis_mmthe position of the hit on the axis in mm
tof_nsthe time of flight of the hit in ns
mass_authe mass of the particle in atomic units
Author
Lutz Foucar

Definition at line 127 of file momenta_calculator.cpp.

References cass::ACQIRIS::UnitConvertion::mmPns2au().

Referenced by cass::ACQIRIS::PxPyCalculatorWithoutBField::operator()().

template<typename T >
void cass::ACQIRIS::getfwhm ( const Channel c,
SignalProducer::signal_t s,
const double &   
)

extract full width at half maximum (fwhm)

Parameters
[in]cthe channel that the peak is found in
[in,out]sthe peak that we found
threshunused
Author
Lutz Foucar
Todo:
make the below an own function

Definition at line 303 of file helperfunctionsforstdc.hpp.

References fwhm, cass::ACQIRIS::Channel::gain(), maximum, maxpos, cass::ACQIRIS::Channel::offset(), startpos, stoppos, cass::ACQIRIS::Channel::waveform(), and width.

template<typename T >
void cass::ACQIRIS::getmaximum ( const Channel c,
SignalProducer::signal_t s,
const double &   
)

find Maximum of puls and calcs the height

this function will find the maximum of the peak and its position

Parameters
[in]cthe channel the peak was found in
[in,out]sthe peak
threshunused
Author
Lutz Foucar
Todo:
make the below an own function

Definition at line 482 of file helperfunctionsforstdc.hpp.

References cass::ACQIRIS::Channel::gain(), height, maximum, maxpos, cass::ACQIRIS::Channel::offset(), startpos, stoppos, and cass::ACQIRIS::Channel::waveform().

pair<sigIt_t,sigIt_t> cass::ACQIRIS::getSignalRange ( signals_t sigs,
const double  mcp,
const double  ts,
const double  rTime 
)

return range of possible anode wire signal candidates

For a given Mcp time there are only a few signal on the wire ends that can come with the Mcp Signal. This function will find the indexs of the list of signals which might come together with the mcp signal. This is because we know two things (ie. for the x-layer): $|x_1-x_2|<rTime_x$ and $x_1+x_2-2*mcp = ts_x$ with this knowledge we can calculate the boundries for the anode given the Timesum and the Runtime.

Returns
pair of iterator that define the range
Parameters
sigsthe vector of signals of the anode wire end
mcpthe Mcp Signal for which to find the right wire end signals
tsThe timesum of the Anode
rTimeThe runtime of a Signal over the whole wire of the anode
Author
Lutz Foucar

Definition at line 98 of file delayline_detector_analyzer_simple.cpp.

Referenced by cass::ACQIRIS::DelaylineDetectorAnalyzerSimple::operator()().

double cass::ACQIRIS::getZMom ( double  tof_ns,
double  mass_au,
double  charge_au,
const SpectrometerRegion sr 
)

Momentum along time of flight.

this will use a direct direct calculation since there is only one spectrometer region.

calculates the acceleration from the E-field in the region, charge and mass of the particle. The result will be in $\frac{mm^2}{ns}$. With this one can calculate the velocity of the particle after it has reached the detector in $\frac{mm}{ns}$. After converting $\frac{mm}{ns}$ to atomic units one simply has to multiply the velocity with the mass in atomic units to get momentum in atomic units.

Returns
the momentum along the time of flight axis in atomic units
Parameters
tof_nsthe time of flight of the hit in ns
mass_authe mass of the particle in atomic units
charge_authe charge of the particle in atomic units
srthe spectrometer region through which the particle flys.
Author
Lutz Foucar

Definition at line 153 of file momenta_calculator.cpp.

References cass::ACQIRIS::SpectrometerRegion::EField_Vpcm(), cass::ACQIRIS::SpectrometerRegion::length_mm(), cass::ACQIRIS::UnitConvertion::mmPns2au(), tof_ns, and cass::ACQIRIS::UnitConvertion::VPcm2mmPns().

Referenced by cass::ACQIRIS::PzCalculatorDirectOneRegion::operator()().

double cass::ACQIRIS::getZMomIter ( double  tof_ns,
double  mass_au,
double  charge_au,
const Spectrometer spectrometer 
)

Momentum along time of flight.

find momentum iterativly. There is no analytical solution for when there are more than two spectrometer regions through which the particle is flying.

We have measured the time of flight of the particle, what we need to find out is to which initial momentum does this time of flight fit. Since we have a function that will calculate the time of flight for a given intial velocity, we can now use this function and vary the intial velocity so long until the measured time of flight is the same as the calculated time of flight for a chosen velocity.
Our initail guess for the velocity is the velocity the particle would have, when there is only one spectrometer region. So first calculate the velocity for when only the first region of the spectrometer would exist. Then calculate the tof for this velocity and find the next step of the iteration using Newtons Approximation. This means that we calculate the slope of the function at the current position. The next iteration is where the linear function with the slope crosses the right fx0. Do this until the time of flight is close to the one we measured. Then calculate the momentum of particle whos velocity gave the right time of flight.

Returns
the momentum along the time of flight axis in atomic units only the tof_ns parameter is non negative. When it is negative return a high number (1e15)
Parameters
tof_nsthe time of flight of the hit in ns
mass_authe mass of the particle in atomic units
charge_authe charge of the particle in atomic units
spectrometerthe spectrometer through which the particle is flying
Author
Lutz Foucar

Definition at line 237 of file momenta_calculator.cpp.

References evalFunc(), cass::ACQIRIS::UnitConvertion::mmPns2au(), cass::ACQIRIS::Spectrometer::regions(), and cass::ACQIRIS::UnitConvertion::VPcm2mmPns().

Referenced by cass::ACQIRIS::PzCalculatorMulitpleRegions::operator()().

template<typename T >
void cass::ACQIRIS::gewichtetlinearRegression ( const size_t  nbrPoints,
const double  x[],
const double  y[],
const double  correctX,
double &  m,
double &  c 
)

A weighted linear Regression.

this function creates a weighted linear regression through a given amount of points where we give a weight to the points that are farther away from the wanted x point We will be getting a line that follows the form: $y(x) = m*x + c$ it will calculate the slope m and the constant c of the line

Parameters
[in]nbrPointsthe number of points for the regression
[in]xarray of the x-values of the points
[in]yarray of the y-values of the points
[in]correctXthe point where we calculate the distance from
[out]mthe slope of the line
[out]cthe constant of the line (y value where it crosses the x-axis)
Author
Lutz Foucar

Definition at line 120 of file helperfunctionsforstdc.hpp.

void cass::ACQIRIS::kartesian2polar ( particleHit_t hit)

convert kartesian coordinates to polar coordinates

will use the kartesian coordinates of the momentum vector of the particle hit and add its polarcoordinates to the hit.

Parameters
hitthe hit to make the transition with
Author
Lutz Foucar

Definition at line 258 of file particle.cpp.

References phi, px, py, pz, roh, and theta.

Referenced by cass::ACQIRIS::Particle::hits().

template<typename T >
void cass::ACQIRIS::linearRegression ( const size_t  nbrPoints,
const double  x[],
const double  y[],
double &  m,
double &  c 
)

linear Regression

this function creates a linear regression through a given amount of points getting a line that follows the form: $y(x) = m*x + c$ it will calculate the slope m and the constant c of the line

Parameters
[in]nbrPointsthe number of points for the regression
[in]xarray of the x-values of the points
[in]yarray of the y-values of the points
[out]mthe slope of the line
[out]cthe constant of the line (y value where it crosses the x-axis)
Author
Lutz Foucar

Definition at line 86 of file helperfunctionsforstdc.hpp.

string cass::ACQIRIS::loadDelayDet ( CASSSettings s,
int  ppNbr,
const std::string &  key 
)

load detector from file

after loading check whether it is a delayline detector, if not throw invalid_argument exception.

Returns
key containing detector name
Parameters
sCASSSettings object to read the info from
ppNbrthe Postprocessor number of the processor calling this function
keythe key of the processor calling this function
Author
Lutz Foucar

Definition at line 73 of file convenience_functions.cpp.

References Delayline, detector, cass::ACQIRIS::HelperAcqirisDetectors::instance(), cass::toString(), and QSettings::value().

Referenced by cass::pp5000::loadSettings(), cass::HexCalibrator::loadSettings(), cass::pp160::loadSettings(), cass::pp161::loadSettings(), cass::pp162::loadSettings(), cass::pp163::loadSettings(), cass::pp164::loadSettings(), cass::pp165::loadSettings(), cass::pp166::loadSettings(), cass::pp167::loadSettings(), cass::pp250::loadSettings(), cass::pp251::loadSettings(), and cass::pp252::loadSettings().

DelaylineDetector::anodelayers_t::key_type cass::ACQIRIS::loadLayer ( CASSSettings s,
const HelperAcqirisDetectors::helperinstancesmap_t::key_type &  detector,
const std::string &  layerKey,
int  ppNbr,
const string &  key 
)

load layer from file

load the requested layer from .ini file and checks whether it is valid. If it is not valid an invalid_argument exception is thrown

Returns
key containing the layer name
Parameters
sCASSSettings object to read the info from
detectorthe name of the detector that contains the layer
layerKeykey how the layer value is called in the .ini file
ppNbrthe processor number of the processor calling this function
keythe key of the processor calling this function
Author
Lutz Foucar

Definition at line 51 of file acqiris_detectors.cpp.

References cass::ACQIRIS::HelperAcqirisDetectors::instance(), cass::toString(), and QSettings::value().

Referenced by cass::pp160::loadSettings(), cass::pp161::loadSettings(), cass::pp162::loadSettings(), cass::pp163::loadSettings(), cass::pp164::loadSettings(), and cass::pp167::loadSettings().

string cass::ACQIRIS::loadParticle ( CASSSettings s,
const std::string &  detector,
int  ppNbr,
const std::string &  key 
)

load particle for a specific detector

after loading check whether it is a delayline detector, if not throw invalid_argument exception.

Returns
key containing detector name
Parameters
sCASSSettings object to read the info from
detectorthe name of the detector that contains the layer
ppNbrthe Postprocessor number of the processor calling this function
keythe key of the processor calling this function
Author
Lutz Foucar

Definition at line 88 of file convenience_functions.cpp.

References detector, cass::ACQIRIS::HelperAcqirisDetectors::instance(), cass::toString(), and QSettings::value().

Referenced by cass::pp5000::loadSettings(), cass::pp250::loadSettings(), cass::pp251::loadSettings(), and cass::pp252::loadSettings().

AnodeLayer::wireends_t::key_type cass::ACQIRIS::loadWireend ( CASSSettings s,
const std::string &  wireendKey,
int  ppNbr,
const string &  key 
)

load wireend from file

load the requested wireend from .ini file. Check whether it is a valid wireend otherwise throw invalid_argument exception.

Returns
key containing the wireend name
Parameters
sCASSSettings object to read the info from
wireendKeykey how the wireend value is called in the .ini file
ppNbrthe processor number of the processor calling this function
keythe key of the processor calling this function
Author
Lutz Foucar

Definition at line 97 of file acqiris_detectors.cpp.

References cass::toString(), and QSettings::value().

Referenced by cass::pp160::loadSettings(), cass::pp161::loadSettings(), and cass::pp167::loadSettings().

double cass::ACQIRIS::Pi ( )
inline
template<typename T >
void cass::ACQIRIS::startstop ( const Channel c,
SignalProducer::signal_t s,
const double &  thresh 
)

find start and stop of pulse

this function will find the start and the stop of the signal

Parameters
[in]cthe channel the signal was found in
[in,out]sthe signal
[in]threshthe threshold that we used to identify the signal in V
Author
Lutz Foucar

Definition at line 440 of file helperfunctionsforstdc.hpp.

References cass::ACQIRIS::Channel::gain(), cass::ACQIRIS::Channel::horpos(), cass::ACQIRIS::Channel::offset(), cass::ACQIRIS::Channel::sampleInterval(), startpos, stoppos, time, and cass::ACQIRIS::Channel::waveform().