18using CLHEP::c_squared;
25 const bool fprint_listing)
26 :
eparticle(primvol, pt, vel, ftime, fpardef, fieldmap),
27 m_print_listing(fprint_listing),
28 m_loss_only(floss_only),
32 mfunname(
"void HeedParticle::physics()");
33 if (m_print_listing) {
34 mcout <<
"HeedParticle::physics is started\n";
46 auto etcs =
dynamic_cast<const EnTransfCS*
>(av);
51 const double* aetemp = emesh->
get_ae();
55 const double mp =
m_mass * c_squared;
62 const auto sampleTransfer = t_hisran_step_ar<double, std::vector<double>,
64 const long qa = matter->
qatom();
66 for (
long na = 0; na < qa; ++na) {
68 const long qs = hmd->
apacs[na]->get_qshell();
69 for (
long ns = 0; ns < qs; ++ns) {
71 if (etcs->quan[na][ns] <= 0.0)
continue;
73 const long qt =
pois(etcs->quan[na][ns] *
step);
75 if (qt <= 0)
continue;
76 for (
long nt = 0; nt < qt; ++nt) {
78 const double r = sampleTransfer(pcm, etcs->fadda[na][ns], SRANLUX());
80 const double et = r * MeV;
84 const double arange = SRANLUX() * range;
86 if (m_loss_only)
continue;
87 if (m_print_listing)
mcout <<
"generating new cluster\n";
88 if (m_store_clusters) {
89 m_clusterBank.emplace_back(
HeedCluster(et, pt, na, ns));
92 double theta_p, theta_t;
99 if (m_print_listing)
mcout <<
"generating new virtual photon\n";
110 secondaries.push_back(hp);
114 if (m_print_listing) {
116 mcout <<
"Exiting HeedParticle::physics\n";
122 Ifile <<
"HeedParticle (l=" << l <<
"): particle_number="
123 << m_particle_number <<
" type=";
const double * get_ae(void) const
Return all left sides.
long get_q() const
Return number of bins.
Retrieve electric and magnetic field from Sensor.
std::vector< const AtomPhotoAbsCS * > apacs
void print(std::ostream &file, int l) const override
Print-out.
void physics(std::vector< gparticle * > &secondaries) override
Apply any other processes (turn the trajectory, kill the particle, ...).
HeedParticle()
Default constructor.
long m_na_absorbing
Index of absorbing atom.
long m_ns_absorbing
Index of absorbing shell.
bool m_delta_generated
Flag that delta-electrons are already generated (or cannot be created).
HeedFieldMap * m_fieldMap
Pointer to field map.
stvpoint m_prevpos
Previous point.
stvpoint m_currpos
Current point.
std::vector< manip_absvol * > eid
List of volumes.
Abstract base classs for volume "manipulators".
double m_curr_ekin
Current kinetic energy.
void step(std::vector< gparticle * > &secondaries) override
void print(std::ostream &file, int l) const override
Print-out.
double m_mass
Mass (not mass * speed_of_light^2)
void print_notation(std::ostream &file) const
vec dir
Unit vector, in the first system in the tree.
vfloat prange
Range from previous point.
vfloat speed
Longitudinal velocity.
point pt
Coordinates in the first system in the tree.
void random_conic_vec(double theta)
void down(const basis *fabas)
long last_particle_number
void theta_two_part(const double Ep0, const double Ep1, const double Mp, const double Mt, double &theta_p, double &theta_t)
Scattering angles as function of incident and final projectile energy.
long pois(const double amu)
DoubleAc fabs(const DoubleAc &f)
particle_def electron_def("electron", "e-", electron_mass_c2/c_squared, electron_charge, 1, 0, 0.5, spin_def(0.0, 0.0))
#define Iprint3n(file, name1, name2, name3)
#define Iprintn(file, name)
#define Iprint2n(file, name1, name2)