61 columns_m.
addColumn(
"ref_x",
"double",
"m",
"x coordinate of reference particle in lab cs");
62 columns_m.
addColumn(
"ref_y",
"double",
"m",
"y coordinate of reference particle in lab cs");
63 columns_m.
addColumn(
"ref_z",
"double",
"m",
"z coordinate of reference particle in lab cs");
65 columns_m.
addColumn(
"ref_px",
"double",
"1",
"x momentum of reference particle in lab cs");
66 columns_m.
addColumn(
"ref_py",
"double",
"1",
"y momentum of reference particle in lab cs");
67 columns_m.
addColumn(
"ref_pz",
"double",
"1",
"z momentum of reference particle in lab cs");
93 columns_m.
addColumn(
"DebyeLength",
"double",
"m",
"Debye length in the boosted frame");
94 columns_m.
addColumn(
"plasmaParameter",
"double",
"1",
"Plasma parameter that gives no. of particles in a Debye sphere");
100 "68.27 percentile (1 sigma of normal distribution) of x-component of position");
102 "68.27 percentile (1 sigma of normal distribution) of y-component of position");
104 "68.27 percentile (1 sigma of normal distribution) of z-component of position");
107 "95.45 percentile (2 sigma of normal distribution) of x-component of position");
109 "95.45 percentile (2 sigma of normal distribution) of y-component of position");
111 "95.45 percentile (2 sigma of normal distribution) of z-component of position");
114 "99.73 percentile (3 sigma of normal distribution) of x-component of position");
116 "99.73 percentile (3 sigma of normal distribution) of y-component of position");
118 "99.73 percentile (3 sigma of normal distribution) of z-component of position");
121 "99.994 percentile (4 sigma of normal distribution) of x-component of position");
123 "99.994 percentile (4 sigma of normal distribution) of y-component of position");
125 "99.994 percentile (4 sigma of normal distribution) of z-component of position");
128 "x-component of normalized emittance at 68 percentile (1 sigma of normal distribution)");
130 "y-component of normalized emittance at 68 percentile (1 sigma of normal distribution)");
132 "z-component of normalized emittance at 68 percentile (1 sigma of normal distribution)");
135 "x-component of normalized emittance at 95 percentile (2 sigma of normal distribution)");
137 "y-component of normalized emittance at 95 percentile (2 sigma of normal distribution)");
139 "z-component of normalized emittance at 95 percentile (2 sigma of normal distribution)");
142 "x-component of normalized emittance at 99 percentile (3 sigma of normal distribution)");
144 "y-component of normalized emittance at 99 percentile (3 sigma of normal distribution)");
146 "z-component of normalized emittance at 99 percentile (3 sigma of normal distribution)");
149 "x-component of normalized emittance at 99.99 percentile (4 sigma of normal distribution)");
151 "y-component of normalized emittance at 99.99 percentile (4 sigma of normal distribution)");
153 "z-component of normalized emittance at 99.99 percentile (4 sigma of normal distribution)");
195 "Azimuth in global coordinates");
198 for (
size_t i = 0; i < losses.size(); ++ i) {
200 "Number of lost particles in element");
203 if (
mode_m == std::ios::app )
207 std::string dateStr(simtimer.
date());
208 std::string timeStr(simtimer.
time());
210 std::stringstream ss;
211 ss <<
"Statistics data '"
213 <<
"' " << dateStr <<
" " << timeStr;
225 const losses_t &losses,
const double& azimuth,
226 const size_t npOutside)
230 double pathLength = beam->
get_sPos();
392 for(
size_t i = 0; i < losses.size(); ++ i) {
393 long unsigned int loss = losses[i].second;
double get_meanKineticEnergy() const
Vector_t get_99Percentile() const
Vector_t get_normalizedEps_99Percentile() const
size_t getLocalNum() const
FMatrix< double, 2 *Dim, 2 *Dim > getSigmaMatrix() const
double get_debyeLength() const
double get_plasmaParameter() const
size_t getTotalNum() const
Vector_t get_95Percentile() const
Vector_t get_normalizedEps_68Percentile() const
ParticleAttrib< Vector_t > P
Vector_t get_rrms() const
double get_rmsDensity() const
Vector_t get_prms() const
double getCharge() const
get the total charge per simulation particle
double get_temperature() const
Vector_t get_68Percentile() const
Vector_t get_norm_emit() const
Vector_t get_rprms() const
Vector_t get_maxExtent() const
Vector_t get_normalizedEps_95Percentile() const
Vector_t get_halo() const
Vector_t get_99_99Percentile() const
Vector_t get_normalizedEps_99_99Percentile() const
Vector_t get_rmean() const
std::string getInputFn()
get opals input filename
static OpalData * getInstance()
void addColumn(const std::string &name, const std::string &type, const std::string &unit, const std::string &desc, std::ios_base::fmtflags flags=std::ios_base::scientific, unsigned short precision=15)
void addColumnValue(const std::string &name, const T &val)
void addDefaultParameters()
void addDescription(const std::string &text, const std::string &content)
void writeHeader()
Write SDDS header.
std::ios_base::openmode mode_m
First write to the statistics output file.
void addInfo(const std::string &mode, const size_t &no_row_counts)
std::vector< std::pair< std::string, unsigned int > > losses_t
void write(const PartBunchBase< double, 3 > *beam, Vector_t FDext[], const losses_t &losses=losses_t(), const double &azimuth=-1, const size_t npOutside=0)
Write statistical data.
void fillHeader(const losses_t &losses=losses_t())
StatWriter(const std::string &fname, bool restart)
std::string date() const
Return date.
std::string time() const
Return time.