#include <PairProd.h>
Definition at line 21 of file PairProd.h.
◆ PairProd() [1/2]
Heed::PairProd::PairProd |
( |
void |
| ) |
|
|
inline |
◆ PairProd() [2/2]
Heed::PairProd::PairProd |
( |
const String & |
file_name, |
|
|
double |
fwa, |
|
|
double |
ffactorFano = 0.19 |
|
) |
| |
Definition at line 19 of file PairProd.cpp.
20 : wa(fwa), factorFano(ffactorFano) {
21 mfunnamep(
"PairProd::PairProd(const String& file_name, double fwa, double "
22 "ffactorFano)");
23
24#ifdef USE_STLSTRING
25 std::ifstream file(file_name.c_str());
26#else
27 std::ifstream file(file_name);
28#endif
29 if (!file) {
31 mcerr <<
"cannot open file " << file_name << std::endl;
33 }
34 long q;
35 file >> wa_table >> I_table >> J_table >> factorFano_table >> q;
36 if (!file.good()) {
38 mcerr <<
"error at reading file" << std::endl;
40 }
43 for (long n = 0; n < q; n++) {
44 file >> xx[n] >> yy[n];
45 }
46 pran =
PointsRan(xx, yy, I_table, J_table);
47 k =
sqrt(factorFano * wa * wa / (factorFano_table * wa_table * wa_table));
48 s = wa - k * wa_table;
49
50
51}
DoubleAc sqrt(const DoubleAc &f)
#define mfunnamep(string)
◆ get_eloss() [1/2]
double Heed::PairProd::get_eloss |
( |
double |
ecur | ) |
const |
Definition at line 70 of file PairProd.cpp.
70 {
71 mfunname(
"double PairProd::get_eloss(double ecur) const");
73 double c;
75 c = DBL_MAX;
76 } else {
77
78 c = 1.0 / (1.0 -
pow(
V_ratio * wa / e_cur, 2.0));
79 }
80 return e_loss * c;
81}
DoubleAc pow(const DoubleAc &f, double p)
double ran(double flat_ran) const
◆ get_eloss() [2/2]
double Heed::PairProd::get_eloss |
( |
void |
| ) |
const |
Definition at line 53 of file PairProd.cpp.
53 {
54 mfunname(
"double PairProd::get_eloss(void) const");
55 const double e_loss = k * pran.
ran(
SRANLUX()) + s;
56 return e_loss;
57}
◆ print()
void Heed::PairProd::print |
( |
std::ostream & |
file, |
|
|
int |
l |
|
) |
| const |
|
virtual |
Definition at line 85 of file PairProd.cpp.
85 {
86 if (l <= 0) return;
87 Ifile <<
"PairProd:\n";
89 Ifile <<
"wa=" << wa <<
" factorFano=" << factorFano <<
'\n';
90 Ifile <<
"wa_table=" << wa_table <<
" factorFano_table=" << factorFano_table
91 << '\n';
92 Ifile <<
" I_table=" << I_table <<
" J_table=" << J_table <<
" k=" << k
93 << " s=" << s << '\n';
96}
void print(std::ostream &file) const
The documentation for this class was generated from the following files: