Analysis routines for an individual sampler.
More...
#include <SamplerAnalysis.hh>
|
| SamplerAnalysis (BDSOutputROOTEventSampler< float > *samplerIn, bool debugIn=false) |
|
| SamplerAnalysis (BDSOutputROOTEventSampler< double > *samplerIn, bool debugIn=false) |
|
void | CommonCtor () |
| Initialisation of arrays for optical function calculations.
|
|
void | Initialise () |
| Initialise variables.
|
|
void | Process (bool firstTime=false) |
| Loop over all entries in the sampler and accumulate power sums over variuos moments.
|
|
std::vector< double > | Terminate (std::vector< double > emittance, bool useEmittanceFromFirstSampler=true) |
| Calculate optical functions based on combinations of moments already accumulated.
|
|
std::vector< std::vector< double > > | GetOpticalFunctions () |
| Accessor for optical functions.
|
|
|
static void | UpdateMass (SamplerAnalysis *s) |
| Set primary particle mass for optical functions from sampler data.
|
|
static void | UpdateMass (const std::string &particleName) |
| Set primary particle mass for optical functions from particle name.
|
|
|
typedef std::vector< std::vector< double > > | twoDArray |
|
typedef std::vector< std::vector< std::vector< double > > > | threeDArray |
|
typedef std::vector< std::vector< std::vector< std::vector< double > > > > | fourDArray |
|
|
double | powSumToCentralMoment (fourDArray &powSum, long long int npartIn, int i, int j, int m, int n) |
|
double | centMomToCovariance (fourDArray ¢Moms, long long int npartIn, int k, int i, int j) |
|
double | centMomToDerivative (fourDArray ¢Moms, int k, int t, int i) |
|
void | printBeamCorrelationMatrix (fourDArray ¢Moms) |
|
Analysis routines for an individual sampler.
- Author
- Stewart Boogert, Andrey Abramov
Definition at line 30 of file SamplerAnalysis.hh.
◆ fourDArray
typedef std::vector<std::vector<std::vector<std::vector<double> > > > SamplerAnalysis::fourDArray |
|
protected |
◆ threeDArray
typedef std::vector<std::vector<std::vector<double> > > SamplerAnalysis::threeDArray |
|
protected |
◆ twoDArray
typedef std::vector<std::vector<double> > SamplerAnalysis::twoDArray |
|
protected |
◆ SamplerAnalysis() [1/2]
SamplerAnalysis::SamplerAnalysis |
( |
| ) |
|
◆ SamplerAnalysis() [2/2]
◆ ~SamplerAnalysis()
SamplerAnalysis::~SamplerAnalysis |
( |
| ) |
|
|
virtual |
◆ centMomToCovariance()
double SamplerAnalysis::centMomToCovariance |
( |
fourDArray & |
centMoms, |
|
|
long long int |
npartIn, |
|
|
int |
k, |
|
|
int |
i, |
|
|
int |
j |
|
) |
| |
|
protected |
Returns a matrix element of the parameter covariance matrix which is a 3x3 symmetric matrix in each plane (coupling is ignored). Arguments: int k: plane specifier (k=0: horizontal, k=1: vertical, k=2: longitudinal) int i,j: indices of matrix elements (i,j=0: <uu>, i,j=1: <u'u'>, i,j=2: <uu'>) e.g. covMat[0][1][2] = cov[<x'x'>,<xx'>], covMat[1][0][0] = cov[<yy>,<yy>]
Definition at line 517 of file SamplerAnalysis.cc.
Referenced by Terminate().
◆ centMomToDerivative()
double SamplerAnalysis::centMomToDerivative |
( |
fourDArray & |
centMoms, |
|
|
int |
k, |
|
|
int |
t, |
|
|
int |
i |
|
) |
| |
|
protected |
Returns the derivative of an optical function w.r.t. central moments. Arguments: int t: function specifier, corresponds to index of the function in the optical function vector. int k: plane specifier (k=0: horizontal, k=1: vertical, k=2: longitudinal) int i: central moment to diffrentiate w.r.t, i=0: <uu>, i=1: <u'u'>, i=2: <uu'> e.g. derivMat[t=2][k=0][i=0]: d(beta)/d<xx> , derivMat[t=0][k=1][i=1]: d(emittance)/d<yy'>
Definition at line 595 of file SamplerAnalysis.cc.
Referenced by Terminate().
◆ CommonCtor()
void SamplerAnalysis::CommonCtor |
( |
| ) |
|
◆ GetOpticalFunctions()
std::vector< std::vector< double > > SamplerAnalysis::GetOpticalFunctions |
( |
| ) |
|
|
inline |
◆ Initialise()
void SamplerAnalysis::Initialise |
( |
| ) |
|
◆ powSumToCentralMoment()
double SamplerAnalysis::powSumToCentralMoment |
( |
fourDArray & |
powSum, |
|
|
long long int |
npartIn, |
|
|
int |
i, |
|
|
int |
j, |
|
|
int |
m, |
|
|
int |
n |
|
) |
| |
|
protected |
Returns a central moment calculated from the corresponding coordinate power sums. Arguments: powSums: array contatining the coordinate power sums a, b: integer identifier for the coordinate (0->x, 1->xp, 2->y, 3->yp, 4->E, 5->t) m, n: order of the moment wrt to the coordinate note: total order of the mixed moment is given by k = m + n
Definition at line 389 of file SamplerAnalysis.cc.
Referenced by Terminate().
◆ printBeamCorrelationMatrix()
void SamplerAnalysis::printBeamCorrelationMatrix |
( |
fourDArray & |
centMoms | ) |
|
|
protected |
◆ Process()
void SamplerAnalysis::Process |
( |
bool |
firstTime = false | ) |
|
Loop over all entries in the sampler and accumulate power sums over variuos moments.
Definition at line 168 of file SamplerAnalysis.cc.
◆ Terminate()
std::vector< double > SamplerAnalysis::Terminate |
( |
std::vector< double > |
emittance, |
|
|
bool |
useEmittanceFromFirstSampler = true |
|
) |
| |
◆ UpdateMass() [1/2]
void SamplerAnalysis::UpdateMass |
( |
const std::string & |
particleName | ) |
|
|
static |
Set primary particle mass for optical functions from particle name.
Definition at line 72 of file SamplerAnalysis.cc.
◆ UpdateMass() [2/2]
◆ cenMoms
fourDArray SamplerAnalysis::cenMoms |
|
protected |
◆ cenMomsFirst
fourDArray SamplerAnalysis::cenMomsFirst |
|
protected |
◆ coordinates
std::vector<double> SamplerAnalysis::coordinates |
|
protected |
◆ covMats
threeDArray SamplerAnalysis::covMats |
|
protected |
◆ debug
bool SamplerAnalysis::debug |
|
private |
◆ derivMats
threeDArray SamplerAnalysis::derivMats |
|
protected |
◆ npart
long long int SamplerAnalysis::npart |
|
protected |
◆ offsets
std::vector<double> SamplerAnalysis::offsets |
|
protected |
◆ optical
twoDArray SamplerAnalysis::optical |
|
protected |
◆ particleMass
double SamplerAnalysis::particleMass = 0 |
|
staticprotected |
◆ powSums
fourDArray SamplerAnalysis::powSums |
|
protected |
◆ powSumsFirst
fourDArray SamplerAnalysis::powSumsFirst |
|
protected |
◆ s [1/2]
◆ s [2/2]
double SamplerAnalysis::S |
|
protected |
◆ varOptical
twoDArray SamplerAnalysis::varOptical |
|
protected |
The documentation for this class was generated from the following files: