Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Heed Namespace Reference

Namespaces

namespace  CLHEP
 
namespace  CountPP_ns
 

Classes

class  absref
 
class  absref_transmit
 
class  abssyscoor
 
class  absvol
 
class  ArgInterp_Arr
 
class  ArgInterp_SingleAdr
 
class  ArgInterp_Val
 
class  AtomDef
 
class  AtomicSecondaryProducts
 
class  AtomMixDef
 
class  AtomPhotoAbsCS
 Atomic photoabsorption cross-section abstract base class. More...
 
class  AveragePhotoAbsCS
 Smoothed/smeared photoabsorption cross-section. More...
 
class  basis
 Basis. More...
 
class  BGMesh
 Mesh of $\beta\gamma$ values. More...
 
class  box
 
class  circumf
 Circumference, determined by point (center), normal vector, and radius. More...
 
class  Cubic
 Find solution to cubic equation. More...
 
class  definp_endpar
 
class  DoubleAc
 
class  DynArr
 
class  DynLinArr
 
class  ElElasticScat
 
class  ElElasticScatData
 Array of ElElasticScatDataStruct objects for a set of energies. More...
 
class  ElElasticScatDataStruct
 
class  ElElasticScatLowSigma
 
class  EnergyMesh
 
class  EnTransfCS
 
class  EnTransfCS_BGM
 Energy transfer cross-section. More...
 
class  eparticle
 
class  EqualStepCoorMesh
 
class  ExAtomPhotoAbsCS
 Atomic photo-absorption with excitation. More...
 
class  ExcFromSpexit
 
class  fixsyscoor
 
class  FunNameStack
 
class  FunNameWatch
 
class  GasDef
 
class  gparticle
 
class  HeedCluster
 Cluster. More...
 
class  HeedCondElectron
 
class  HeedDeltaElectron
 
class  HeedDeltaElectronCS
 
class  HeedFieldMap
 Retrieve electric and magnetic field from Sensor. More...
 
class  HeedMatterDef
 
class  HeedParticle
 
class  HeedParticle_BGM
 
class  HeedPhoton
 
class  HydrogenPhotoAbsCS
 
class  indentation
 
class  IterDynArr
 
class  IterDynLinArr
 
class  linexi2
 
class  linexi2_coor
 
class  linexi2B
 
class  manip_absvol
 Abstract base classs for volume "manipulators". More...
 
class  manip_absvol_treeid
 Service class (array of manip_absvol). More...
 
class  manip_box
 Box "manipulator". More...
 
class  manip_ulsvolume
 
class  MatterDef
 
class  MolecPhotoAbsCS
 
class  MoleculeDef
 
class  mparticle
 Massive particle. A force can be applied. More...
 
class  PairProd
 
class  Parabol
 
class  particle_def
 
class  particle_type
 
class  PassivePtr
 
class  PhenoPhotoAbsCS
 Simple phenomenological CS for any shell (analytic formula). More...
 
class  PhotoAbsCS
 
class  plane
 Plane, defined by defined by a point and a vector normal to the plane. More...
 
class  point
 Point. More...
 
class  PointCoorMesh
 
class  PointsRan
 
class  polygon
 Polygon in plane. More...
 
class  polyline
 Polyline. More...
 
class  polyline_pl
 Polyline in plane. More...
 
class  rectangle
 Rectangle. More...
 
class  RegPassivePtr
 
class  sh_manip_absvol
 
class  sh_manip_box
 
class  SimpleAtomPhotoAbsCS
 
class  SimpleTablePhotoAbsCS
 
class  spin_def
 Helper class for definition of spin. More...
 
class  splane
 
class  spquadr
 
class  StandardCopyDefinition
 
class  straight
 Definition of straight line, as combination of vector and point. More...
 
class  stvpoint
 Point in space, time and velocity. More...
 
class  surface
 Surface base class. More...
 
class  trajestep
 
class  ulsvolume
 Unlimited surfaces volume. More...
 
class  VanDerWaals
 Helper class for Van-der-Waals equation. More...
 
class  vec
 

Typedefs

typedef double vfloat
 
typedef std::string String
 

Enumerations

enum  Pilfer { steal }
 
enum  Clone { do_clone }
 
enum  Pass { dont_clone }
 

Functions

std::ostream & operator<< (std::ostream &file, const BGMesh &bgm)
 
std::ostream & operator<< (std::ostream &file, EnergyMesh &f)
 
std::ostream & operator<< (std::ostream &file, const AtomPhotoAbsCS &f)
 
std::ostream & operator<< (std::ostream &file, const MolecPhotoAbsCS &f)
 
int operator== (const circumf &f1, const circumf &f2)
 
bool apeq (const circumf &f1, const circumf &f2, vfloat prec)
 
std::ostream & operator<< (std::ostream &file, const circumf &f)
 
std::ostream & operator<< (std::ostream &file, const mparticle &f)
 
int operator== (const plane &pl1, const plane &pl2)
 
bool apeq (const plane &pl1, const plane &pl2, vfloat prec)
 
std::ostream & operator<< (std::ostream &file, const plane &pl)
 
int cross4pllines (const polyline pl[4], vfloat precision, straight &sl, point ptc[4][2])
 
std::ostream & operator<< (std::ostream &file, const polyline &p)
 
std::ostream & operator<< (std::ostream &file, const polyline_pl &p)
 
std::ostream & operator<< (std::ostream &file, const polygon &p)
 
std::ostream & operator<< (std::ostream &file, const rectangle &f)
 
std::ostream & operator<< (std::ostream &file, const spquadr &p)
 
int operator== (const straight &sl1, const straight &sl2)
 
bool apeq (const straight &sl1, const straight &sl2, vfloat prec)
 
std::ostream & operator<< (std::ostream &file, const straight &s)
 
std::ostream & operator<< (std::ostream &file, const trajestep &f)
 
vfloat cos2vec (const vec &r1, const vec &r2)
 
vfloat ang2vec (const vec &r1, const vec &r2)
 
vfloat sin2vec (const vec &r1, const vec &r2)
 
vec project_to_plane (const vec &r, const vec &normal)
 
vfloat ang2projvec (const vec &r1, const vec &r2, const vec &normal)
 
std::ostream & operator<< (std::ostream &file, const vec &v)
 
std::ostream & operator<< (std::ostream &file, const basis &b)
 
std::ostream & operator<< (std::ostream &file, const point &p)
 
std::ostream & operator<< (std::ostream &file, const abssyscoor &f)
 
std::ostream & operator<< (std::ostream &file, const fixsyscoor &f)
 
bool apeq (const vfloat f1, const vfloat f2, const vfloat prec=vprecision)
 
int operator== (manip_absvol_treeid &tid1, manip_absvol_treeid &tid2)
 
int operator!= (manip_absvol_treeid &tid1, manip_absvol_treeid &tid2)
 
double Bethe_Bloch_energy_loss (const double ratio_Z_to_A, const double I_eff, const double beta, const double z)
 
double Bethe_Bloch_energy_loss_gamma_1 (const double ratio_Z_to_A, const double I_eff, const double gamma_1, const double z)
 Safer version, using gamma - 1 instead of beta.
 
double Bethe_Bloch_restricted_energy_loss_gamma_1 (const double ratio_Z_to_A, const double I_eff, const double m, const double gamma_1, const double ecut, const double z)
 
double e_cont_enloss (double ratio_Z_to_A, double I_eff, double density, double Ekin, double Ecut, double z)
 
std::ostream & operator<< (std::ostream &file, const Cubic &f)
 
DoubleAc sqrt (const DoubleAc &f)
 
DoubleAc square (const DoubleAc &f)
 
DoubleAc pow (const DoubleAc &f, double p)
 
DoubleAc exp (const DoubleAc &f)
 
DoubleAc sin (const DoubleAc &f)
 
DoubleAc cos (const DoubleAc &f)
 
DoubleAc asin (const DoubleAc &f)
 
DoubleAc acos (const DoubleAc &f)
 
DoubleAc pow (const DoubleAc &, const DoubleAc &)
 
std::ostream & operator<< (std::ostream &file, const DoubleAc &f)
 
DoubleAc operator- (const DoubleAc &f)
 
void change_sign (DoubleAc &f)
 
DoubleAc operator+ (const DoubleAc &f1, const DoubleAc &f2)
 
DoubleAc operator+ (const DoubleAc &f1, double f2)
 
DoubleAc operator+ (double f1, const DoubleAc &f2)
 
DoubleAc operator+ (const DoubleAc &f1, float f2)
 
DoubleAc operator+ (float f1, const DoubleAc &f2)
 
DoubleAc operator+ (const DoubleAc &f1, long f2)
 
DoubleAc operator+ (long f1, const DoubleAc &f2)
 
DoubleAc operator+ (const DoubleAc &f1, int f2)
 
DoubleAc operator+ (int f1, const DoubleAc &f2)
 
DoubleAc operator- (const DoubleAc &f1, const DoubleAc &f2)
 
DoubleAc operator- (const DoubleAc &f1, double f2)
 
DoubleAc operator- (double f1, const DoubleAc &f2)
 
DoubleAc operator- (const DoubleAc &f1, float f2)
 
DoubleAc operator- (float f1, const DoubleAc &f2)
 
DoubleAc operator- (const DoubleAc &f1, long f2)
 
DoubleAc operator- (long f1, const DoubleAc &f2)
 
DoubleAc operator- (const DoubleAc &f1, int f2)
 
DoubleAc operator- (int f1, const DoubleAc &f2)
 
DoubleAc operator* (const DoubleAc &f1, const DoubleAc &f2)
 
DoubleAc operator* (const DoubleAc &f1, double f2)
 
DoubleAc operator* (double f1, const DoubleAc &f2)
 
DoubleAc operator* (const DoubleAc &f1, float f2)
 
DoubleAc operator* (float f1, const DoubleAc &f2)
 
DoubleAc operator* (const DoubleAc &f1, long f2)
 
DoubleAc operator* (long f1, const DoubleAc &f2)
 
DoubleAc operator* (const DoubleAc &f1, int f2)
 
DoubleAc operator* (int f1, const DoubleAc &f2)
 
DoubleAc operator/ (const DoubleAc &f1, const DoubleAc &f2)
 
DoubleAc operator/ (const DoubleAc &f1, double f2)
 
DoubleAc operator/ (double f1, const DoubleAc &f2)
 
DoubleAc operator/ (const DoubleAc &f1, float f2)
 
DoubleAc operator/ (float f1, const DoubleAc &f2)
 
DoubleAc operator/ (const DoubleAc &f1, long f2)
 
DoubleAc operator/ (long f1, const DoubleAc &f2)
 
DoubleAc operator/ (const DoubleAc &f1, int f2)
 
DoubleAc operator/ (int f1, const DoubleAc &f2)
 
DoubleAc fabs (const DoubleAc &f)
 
DoubleAc find_min (const DoubleAc &a, const DoubleAc &b)
 
DoubleAc find_min (const DoubleAc &a, double b)
 
DoubleAc find_min (double a, const DoubleAc &b)
 
DoubleAc find_min (const DoubleAc &a, float b)
 
DoubleAc find_min (float a, const DoubleAc &b)
 
DoubleAc find_min (const DoubleAc &a, long b)
 
DoubleAc find_min (long a, const DoubleAc &b)
 
DoubleAc find_min (const DoubleAc &a, int b)
 
DoubleAc find_min (int a, const DoubleAc &b)
 
DoubleAc find_max (const DoubleAc &a, const DoubleAc &b)
 
DoubleAc find_max (const DoubleAc &a, double b)
 
DoubleAc find_max (double a, const DoubleAc &b)
 
DoubleAc find_max (const DoubleAc &a, float b)
 
DoubleAc find_max (float a, const DoubleAc &b)
 
DoubleAc find_max (const DoubleAc &a, long b)
 
DoubleAc find_max (long a, const DoubleAc &b)
 
DoubleAc find_max (const DoubleAc &a, int b)
 
DoubleAc find_max (int a, const DoubleAc &b)
 
double cos_theta_two_part (const double Ep0, const double Ep1, const double Mp, const double Mt)
 
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.
 
std::ostream & operator<< (std::ostream &file, const linexi2_coor &l)
 
std::ostream & operator<< (std::ostream &file, const linexi2 &l)
 
double lorgamma_1 (double beta)
 $\gamma - 1$ as function of $\beta$.
 
double lorbeta (const double gamma_1)
 $\beta$ as function of $\gamma - 1$.
 
double lorbeta2 (const double gamma_1)
 $\beta^2$ as function of $\gamma - 1$.
 
double lorbeta (const double momentum, const double mass)
 
long left_round (double f)
 
template<class T >
tabs (const T &x)
 
template<class T >
int apeq_mant (const T &x1, const T &x2, T prec)
 
std::ostream & operator<< (std::ostream &file, const Parabol &f)
 
double polleg (const int l, const double x)
 
template<class T >
std::ostream & operator<< (std::ostream &file, const EqualStepCoorMesh< T > &f)
 
template<class T >
std::istream & operator>> (std::istream &file, EqualStepCoorMesh< T > &f)
 
template<class T >
int operator== (const EqualStepCoorMesh< T > &f1, const EqualStepCoorMesh< T > &f2)
 
template<class T >
int apeq_mant (const EqualStepCoorMesh< T > &f1, const EqualStepCoorMesh< T > &f2, T prec)
 
template<class T >
int operator!= (const EqualStepCoorMesh< T > &f1, const EqualStepCoorMesh< T > &f2)
 
template<class T , class D >
long t_find_interval (double x, long q, const D &coor)
 
template<class T , class D >
long t_find_interval_end (double x, long q, const D &coor, long n_start)
 
template<class T , class D >
std::ostream & operator<< (std::ostream &file, const PointCoorMesh< T, D > &f)
 
template<class T , class D , class M >
t_integ_step_ar (const M &mesh, const D &y, T x1, T x2, int xpower)
 
template<class T , class D , class M >
t_integ_generic_step_ar (const M &mesh, const D &y, T(*fun)(long np, T xp1, T xp2, T yp, T xmin, T xmax, T x1, T x2), T x1, T x2)
 
template<class T , class D , class M >
t_find_x_for_already_integ_step_ar (const M &mesh, const D &y, T integ, int *s_err)
 
template<class T , class D , class M >
long t_find_entire_x_for_already_integ_step_ar (const M &mesh, const D &y, T integ, int *s_err)
 
template<class T , class D , class M >
t_hispre_step_ar (const M &mesh, const D &y, D &integ_y)
 
template<class T , class D , class M >
t_hisran_step_ar (const M &mesh, const D &integ_y, T rannum)
 
template<class T , class D , class M >
t_opposite_hisran_step_ar (const M &mesh, const D &integ_y, T x)
 
template<class T , class D , class M >
long t_entire_hisran_step_ar (const M &mesh, const D &integ_y, T rannum)
 
template<class T , class D , class M >
t_mean_step_ar (const M &mesh, const D &y, T x1, T x2, int &s_err)
 
template<class T >
t_value_straight_2point (T x1, T y1, T x2, T y2, T x, int s_ban_neg)
 
template<class T >
t_integ_straight_2point (T x1, T y1, T x2, T y2, T xl, T xr, int xpower, int s_ban_neg)
 
template<class T , class D , class M >
t_value_straight_point_ar (const M &mesh, const D &y, T x, int s_ban_neg, int s_extrap_left, T left_bond, int s_extrap_right, T right_bond)
 
template<class T , class D , class M >
t_value_generic_point_ar (const M &mesh, const D &y, T(*funval)(T xp1, T yp1, T xp2, T yp2, T xmin, T xmax, T x), T x, int s_extrap_left, T left_bond, int s_extrap_right, T right_bond)
 
template<class T >
t_value_power_2point (T x1, T y1, T x2, T y2, T x)
 
template<class T >
t_value_exp_2point (T x1, T y1, T x2, T y2, T x)
 
template<class T >
t_integ_power_2point (T x1, T y1, T x2, T y2, T xl, T xr)
 
template<class T , class D , class M >
t_integ_straight_point_ar (const M &mesh, const D &y, T x1, T x2, int xpower, int s_ban_neg, int s_extrap_left, T left_bond, int s_extrap_right, T right_bond)
 
template<class T , class D , class M >
t_mean_straight_point_ar (const M &mesh, const D &y, T x1, T x2, int s_extrap_left, T left_bond, int s_extrap_right, T right_bond, int &s_err)
 
template<class T , class D , class M >
t_integ_generic_point_ar (const M &mesh, const D &y, T(*fun)(T xp1, T yp1, T xp2, T yp2, T xmin, T xmax, T x1, T x2), T x1, T x2, int s_extrap_left, T left_bond, int s_extrap_right, T right_bond)
 
template<class M , class X >
abstract_determinant (M &mi, long q, X)
 
void inverse_DynArr_prot (const DynArr< DoubleAc > &mi, DynArr< DoubleAc > &mr, int &szero, int &serr, int s_stop)
 
void inverse_DynArr (const DynArr< double > &mi, DynArr< double > &mr, int &serr)
 
void inverse_DynArr (const DynArr< DoubleAc > &mi, DynArr< DoubleAc > &mr1, int &szero, int &serr1, DynArr< DoubleAc > &mr2, int &serr2)
 
void inverse_DynArr (const DynArr< double > &mi, const DynLinArr< int > &s_var, DynArr< double > &mr, int &serr)
 
void inverse_DynArr_prot (const DynArr< DoubleAc > &mi, const DynLinArr< int > &s_var, DynArr< DoubleAc > &mr, int &szero, int &serr, int s_stop)
 
void inverse_DynArr (const DynArr< DoubleAc > &mi, const DynLinArr< int > &s_var, DynArr< DoubleAc > &mr1, int &szero, int &serr1, DynArr< DoubleAc > &mr2, int &serr2)
 
DoubleAc determinant_DynArr (const DynArr< DoubleAc > &mi, long q)
 
DoubleAc determinant_DynArr (const DynArr< DoubleAc > &mi, const DynLinArr< int > &s_var, long q)
 
DynLinArr< DoubleAcoperator* (const DynArr< DoubleAc > &mt, const DynLinArr< double > &vc)
 
DynLinArr< DoubleAcoperator* (const DynArr< double > &mt, const DynLinArr< DoubleAc > &vc)
 
DoubleAc operator* (const DynLinArr< DoubleAc > &vc1, const DynLinArr< double > &vc2)
 
DoubleAc operator* (const DynLinArr< double > &vc1, const DynLinArr< DoubleAc > &vc2)
 
DynLinArr< DoubleAcoperator+ (const DynLinArr< DoubleAc > &vc1, const DynLinArr< double > &vc2)
 
DynLinArr< DoubleAcoperator- (const DynLinArr< DoubleAc > &vc1, const DynLinArr< double > &vc2)
 
DynLinArr< DoubleAcoperator+ (const DynLinArr< double > &vc1, const DynLinArr< DoubleAc > &vc2)
 
DynLinArr< DoubleAcoperator- (const DynLinArr< double > &vc1, const DynLinArr< DoubleAc > &vc2)
 
DynArr< DoubleAcoperator+ (const DynArr< DoubleAc > &mt1, const DynArr< double > &mt2)
 
DynArr< DoubleAcoperator- (const DynArr< DoubleAc > &mt1, const DynArr< double > &mt2)
 
DynArr< DoubleAcoperator+ (const DynArr< double > &mt1, const DynArr< DoubleAc > &mt2)
 
DynArr< DoubleAcoperator- (const DynArr< double > &mt1, const DynArr< DoubleAc > &mt2)
 
template<class T >
DynArr< T > operator* (const DynArr< T > &mt1, const DynArr< T > &mt2)
 
template<class T >
DynLinArr< T > operator* (const DynArr< T > &mt, const DynLinArr< T > &vc)
 
template<class T >
operator* (const DynLinArr< T > &vc1, const DynLinArr< T > &vc2)
 
template<class T , class X >
DynLinArr< T > operator* (const DynLinArr< T > &ar, const X &t)
 
template<class T , class X >
DynLinArr< T > & operator*= (DynLinArr< T > &ar, const X &t)
 
template<class T , class X >
DynLinArr< T > operator* (const X &t, const DynLinArr< T > &ar)
 
template<class T , class X >
DynLinArr< T > operator/ (const DynLinArr< T > &ar, const X &t)
 
template<class T , class X >
DynLinArr< T > & operator/= (DynLinArr< T > &ar, const X &t)
 
template<class T , class X >
DynArr< T > operator* (const DynArr< T > &mt, const X &t)
 
template<class T , class X >
DynArr< T > operator* (const X &t, const DynArr< T > &mt)
 
template<class T , class X >
DynArr< T > & operator*= (DynArr< T > &mt, const X &t)
 
template<class T , class X >
DynArr< T > operator/ (const DynArr< T > &mt, const X &t)
 
template<class T , class X >
DynArr< T > & operator/= (DynArr< T > &mt, const X &t)
 
template<class T >
DynLinArr< T > operator+ (const DynLinArr< T > &vc1, const DynLinArr< T > &vc2)
 
template<class T >
DynLinArr< T > & operator+= (DynLinArr< T > &vc1, const DynLinArr< T > &vc2)
 
template<class T >
DynLinArr< T > operator- (const DynLinArr< T > &vc1, const DynLinArr< T > &vc2)
 
template<class T >
DynLinArr< T > & operator-= (DynLinArr< T > &vc1, const DynLinArr< T > &vc2)
 
template<class T >
DynLinArr< T > operator- (const DynLinArr< T > &ar)
 
template<class T >
void change_sign (DynLinArr< T > &ar)
 
void change_sign (float &f)
 
void change_sign (double &f)
 
template<class T , class X >
DynLinArr< T > & operator+= (DynLinArr< T > &ar, const X &t)
 
template<class T , class X >
DynLinArr< T > & operator-= (DynLinArr< T > &ar, const X &t)
 
template<class T >
DynArr< T > operator+ (const DynArr< T > &mt1, const DynArr< T > &mt2)
 
template<class T >
DynArr< T > & operator+= (DynArr< T > &mt1, const DynArr< T > &mt2)
 
template<class T >
DynArr< T > operator- (const DynArr< T > &mt1, const DynArr< T > &mt2)
 
template<class T >
DynArr< T > & operator-= (DynArr< T > &mt1, const DynArr< T > &mt2)
 
template<class T >
DynArr< T > operator- (const DynArr< T > &mt)
 
template<class T >
void change_sign (DynArr< T > &mt)
 
template<class T , class X >
DynArr< T > & operator+= (DynArr< T > &mt, const X &t)
 
template<class T , class X >
DynArr< T > & operator-= (DynArr< T > &mt, const X &t)
 
std::ostream & operator<< (std::ostream &file, const AtomDef &f)
 
std::ostream & operator<< (std::ostream &file, const AtomMixDef &f)
 
std::ostream & operator<< (std::ostream &file, const GasDef &f)
 
std::ostream & operator<< (std::ostream &file, const MatterDef &f)
 
std::ostream & operator<< (std::ostream &file, const VanDerWaals &f)
 
std::ostream & operator<< (std::ostream &file, const MoleculeDef &f)
 
std::ostream & operator<< (std::ostream &file, const spin_def &f)
 
std::ostream & operator<< (std::ostream &file, const particle_def &f)
 
std::ostream & operator<< (std::ostream &file, const particle_type &f)
 
float chispre (float *x, float *p, float *f, long q)
 
float chisran (float flat_random_number, float *x, float *f, long q)
 
double chispre (std::vector< double > &f, int s_allow_zero_f)
 
double chisran (double flat_random_number, const std::vector< double > &f)
 
long pois (const double amu, int &ierror)
 
void rnorm_double (const double r1, const double r2, double &x1, double &x2)
 
void rnorm_float (const float r1, const float r2, float &x1, float &x2)
 
double rnorm_improved ()
 
void print_DynLinArr_int (std::ostream &file, const DynLinArr< int > &f)
 
void print_DynLinArr_long (std::ostream &file, const DynLinArr< long > &f)
 
void print_DynLinArr_float (std::ostream &file, const DynLinArr< float > &f)
 
void print_DynLinArr_double (std::ostream &file, const DynLinArr< double > &f)
 
void print_DynLinArr_double2 (std::ostream &file, const DynLinArr< double > &f1, const DynLinArr< double > &f2)
 
void print_DynLinArr_int_double (std::ostream &file, const DynLinArr< int > &iar, const DynLinArr< double > &dar)
 
void print_DynLinArr_int_double3 (std::ostream &file, const DynLinArr< int > &iar, const DynLinArr< double > &dar1, const DynLinArr< double > &dar2, const DynLinArr< double > &dar3)
 
void print_DynArr_int_w (std::ostream &file, const DynArr< int > &f, int w)
 
void print_DynArr_double (std::ostream &file, const DynArr< double > &f)
 
void print_DynArr_float (std::ostream &file, const DynArr< float > &f)
 
int gconfirm_ind (const DynLinArr< long > &qel, const DynLinArr< long > &ind)
 
int gconfirm_ind_ext (const DynLinArr< long > &qel, const DynLinArr< long > &ind)
 
int find_next_comb (const DynLinArr< long > &qel, DynLinArr< long > &f)
 
int find_next_comb_not_less (const DynLinArr< long > &qel, DynLinArr< long > &f)
 
int find_prev_comb (const DynLinArr< long > &qel, DynLinArr< long > &f)
 
template<class T >
void apply1 (DynLinArr< T > &ar, void(*fun)(T &f))
 
template<class T , class X >
void apply2 (DynLinArr< T > &ar, void(*fun1)(T &f, void(*fun21)(X &f)), void(*fun2)(X &f))
 
template<class T >
long append (const T &t, DynLinArr< T > &dla, long &qael, T *tempt=NULL, long new_qel=0)
 
template<class T >
std::ostream & operator<< (std::ostream &file, const DynLinArr< T > &f)
 
template<class T >
std::istream & operator>> (std::istream &file, DynLinArr< T > &f)
 
template<class T >
void print_DynLinArr (std::ostream &file, const DynLinArr< T > &f, int l)
 
template<class T >
void print_DynLinArr (std::ostream &file, const DynLinArr< T > &f, int l, long q)
 
template<class T >
void print_adr_DynLinArr (std::ostream &file, const DynLinArr< T > &f, int l, long q)
 
template<class T , class X >
void copy_DynLinArr (const T &s, X &d)
 
template<class T , class X >
void convert_DynLinArr (const T &s, X &d)
 
template<class T >
void put_qel_1 (DynLinArr< T > &f, long fq)
 
template<class T , class T1 >
void assignAll_1 (DynLinArr< T > &f, const T1 &ft)
 
template<class T >
int ifequal (const DynLinArr< T > &fd1, const DynLinArr< T > &fd2, long qfirst=-1)
 
template<class T >
int ifequal (const DynLinArr< T > &fd1, const T *fd2, long qfirst=-1)
 
template<class T >
int ifequal (T *fd1, T *fd2, long qfirst)
 
template<class T >
DynLinArr< T > merge (const DynLinArr< T > &fd1, long qfd1, const DynLinArr< T > &fd2, long qfd2)
 
template<class T >
void apply1 (DynArr< T > &ar, void(*fun)(T &f))
 
template<class T , class X >
void apply2 (DynArr< T > &ar, void(*fun1)(T &f, void(*fun21)(X &f)), void(*fun2)(X &f))
 
template<class T >
int operator== (const DynLinArr< T > &f1, const DynLinArr< T > &f2)
 
template<class T , class P >
int apeq_mant (const DynLinArr< T > &f1, const DynLinArr< T > &f2, P prec)
 
template<class T >
int operator!= (const DynLinArr< T > &f1, const DynLinArr< T > &f2)
 
template<class T >
int operator== (const DynArr< T > &f1, const DynArr< T > &f2)
 
template<class T , class P >
int apeq_mant (const DynArr< T > &f1, const DynArr< T > &f2, P prec)
 
template<class T >
int operator!= (const DynArr< T > &f1, const DynArr< T > &f2)
 
template<class T , class X >
void copy_DynArr (const DynArr< T > &s, DynArr< X > &d)
 
template<class T , class X >
void convert_DynArr (const DynArr< T > &s, DynArr< X > &d)
 
template<class T >
std::ostream & operator<< (std::ostream &file, const DynArr< T > &f)
 
template<class T >
std::istream & operator>> (std::istream &file, DynArr< T > &f)
 
template<class T >
void print_DynArr (std::ostream &file, const DynArr< T > &f, int l)
 
std::ostream & operator<< (std::ostream &file, const RegPassivePtr &f)
 
template<class X >
std::ostream & operator<< (std::ostream &file, const PassivePtr< X > &f)
 
template<class X >
int operator== (const PassivePtr< X > &f1, const PassivePtr< X > &f2)
 
template<class X >
bool operator< (PassivePtr< X > f1, PassivePtr< X > f2)
 
int definp_int (const std::string &str)
 
long set_position (const std::string &word, std::istream &istrm, int s_rewind, int s_req_sep)
 
template<class T >
void definp_any_par (T &inp, const std::string &word, const definp_endpar &dep, int fs_short=0)
 
int findmark (std::istream &file, const char *s)
 
int find1ofnmark (std::istream &file, int q, char *s[])
 
int find1ofnmark (std::istream &file, int q, const std::string str[])
 
template<class T >
int findmark_a (std::istream &file, T ws, long qws, long &nbeg, long &nnext)
 
template<class T >
int findmark_b (std::istream &file, T ws, long qws, long &nbeg, long &nnext, char &prev)
 
std::ostream & noindent (std::ostream &f)
 
std::ostream & yesindent (std::ostream &f)
 
std::ostream & operator<< (std::ostream &file, indentation &ind)
 
void spexit_action (std::ostream &file)
 
std::ostream & operator<< (std::ostream &file, const FunNameStack &f)
 
std::ostream & operator<< (std::ostream &file, const FunNameWatch &f)
 
void put_one_n (std::ostringstream &ost)
 

Variables

long last_particle_number
 
constexpr double Thomas_sum_rule_const
 TRK sum rule [1/MeV], constant per one electron.
 
constexpr double Thomas_sum_rule_const_Mb
 TRK sum rule [Mb * MeV].
 
constexpr double low_boundary_of_excitations = 0.7
 
constexpr double standard_factor_Fano = 0.19
 
constexpr double coef_I_to_W = 2.0
 
const std::string shelllist_dir_name = getDataBasePath() + "/"
 
const std::string pacs_table_dir_name = shelllist_dir_name + "henke/"
 
SimpleAtomPhotoAbsCS Hydrogen_PACS (1, std::make_shared< HydrogenPhotoAbsCS >())
 
SimpleAtomPhotoAbsCS Hydrogen_for_H2_PACS (1, std::make_shared< PhenoPhotoAbsCS >("Hydrogen_for_H2", 1, 15.43e-6, 3.228))
 
SimpleAtomPhotoAbsCS Hydrogen_for_CH4_PACS (1, std::make_shared< PhenoPhotoAbsCS >("Hydrogen_for_CH4", 1, 12.65e-06, 3.228))
 
SimpleAtomPhotoAbsCS Hydrogen_for_NH4_PACS (1, std::make_shared< PhenoPhotoAbsCS >("Hydrogen_for_NH4", 1, 10.0e-06, 3.228))
 
ExAtomPhotoAbsCS Helium_PACS (2, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"He.dat")
 
ExAtomPhotoAbsCS Lithium_PACS (3, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Li.dat")
 
ExAtomPhotoAbsCS Beryllium_PACS (4, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Be.dat")
 
ExAtomPhotoAbsCS Boron_PACS (5, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"B.dat")
 
ExAtomPhotoAbsCS Carbon_PACS (6, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"C.dat")
 
ExAtomPhotoAbsCS Carbon_for_CH4_PACS (6, shelllist_dir_name+"shelllist.dat", shelllist_dir_name+"C_for_CH4.dat", "C_for_CH4", 12.65e-6)
 
ExAtomPhotoAbsCS Carbon_for_C2H4_PACS (6, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"C.dat", "C_for_C2H4", 10.51e-06)
 
ExAtomPhotoAbsCS Carbon_for_C2H6_PACS (6, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"C.dat", "C_for_C2H6", 11.52e-06)
 
ExAtomPhotoAbsCS Carbon_for_C4H10_PACS (6, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"C.dat", "C_for_C4H10", 10.55e-06)
 
ExAtomPhotoAbsCS Carbon_for_Methylal_PACS (6, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"C.dat", "C_for_Methylal", 10.0e-06)
 
ExAtomPhotoAbsCS Carbon_for_CF4_PACS (6, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"C.dat", "C_for_CF4", 16.23e-06)
 
ExAtomPhotoAbsCS Carbon_for_CO2_PACS (6, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"C.dat", "C_for_CO2", 13.79e-06)
 
ExAtomPhotoAbsCS Nitrogen_PACS (7, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"N.dat", "N_for_N2", 15.581e-6)
 
ExAtomPhotoAbsCS Oxygen_PACS (8, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"O.dat")
 
ExAtomPhotoAbsCS Oxygen_for_CO2_PACS (8, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"O.dat", "O_for_CO2", 13.79e-6)
 
ExAtomPhotoAbsCS Fluorine_PACS (9, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"F.dat")
 
ExAtomPhotoAbsCS Neon_PACS (10, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Ne.dat")
 
ExAtomPhotoAbsCS Sodium_PACS (11, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Na.dat")
 
ExAtomPhotoAbsCS Magnesium_PACS (12, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Mg.dat")
 
ExAtomPhotoAbsCS Aluminium_PACS (13, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Al.dat")
 
ExAtomPhotoAbsCS Silicon_PACS (14, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Si.dat")
 
ExAtomPhotoAbsCS Silicon_crystal_PACS (14, shelllist_dir_name+"shelllist_solid.dat", pacs_table_dir_name+"Si.dat", "Si_crystal")
 
ExAtomPhotoAbsCS Silicon_G4_PACS (14, shelllist_dir_name+"shelllist_solid.dat", shelllist_dir_name+"Si_G4.dat", "Si_G4")
 
ExAtomPhotoAbsCS Phosphorus_PACS (15, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"P.dat")
 
ExAtomPhotoAbsCS Sulfur_PACS (16, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"S.dat")
 
ExAtomPhotoAbsCS Chlorine_PACS (17, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Cl.dat")
 
ExAtomPhotoAbsCS Argon_PACS
 
ExAtomPhotoAbsCS Gallium_PACS (31, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Ga.dat")
 
ExAtomPhotoAbsCS Gallium_for_GaAs_PACS (31, shelllist_dir_name+"shelllist_solid.dat", pacs_table_dir_name+"Ga.dat", "Ga_for_GaAs")
 
ExAtomPhotoAbsCS Germanium_PACS (32, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Ge.dat")
 
ExAtomPhotoAbsCS Germanium_crystal_PACS (32, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Ge.dat", "Ge_crystal", 0.67e-06)
 
ExAtomPhotoAbsCS Arsenic_PACS (33, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"As.dat")
 
ExAtomPhotoAbsCS Arsenic_for_GaAs_PACS (33, shelllist_dir_name+"shelllist_solid.dat", pacs_table_dir_name+"As.dat", "As_for_GaAs")
 
ExAtomPhotoAbsCS Bromine_PACS (35, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Br.dat")
 
ExAtomPhotoAbsCS Krypton_PACS (36, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Kr.dat")
 
ExAtomPhotoAbsCS Cadmium_PACS (48, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Cd.dat")
 
ExAtomPhotoAbsCS Cadmium_for_CdTe_PACS (48, shelllist_dir_name+"shelllist_solid.dat", pacs_table_dir_name+"Cd.dat", "Cd_for_CdTe")
 
ExAtomPhotoAbsCS Tellurium_PACS (52, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Te.dat")
 
ExAtomPhotoAbsCS Tellurium_for_CdTe_PACS (52, shelllist_dir_name+"shelllist_solid.dat", pacs_table_dir_name+"Te.dat", "Te_for_CdTe")
 
ExAtomPhotoAbsCS Xenon_PACS (54, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Xe.dat")
 
ExAtomPhotoAbsCS Caesium_PACS (55, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Cs.dat")
 
ExAtomPhotoAbsCS Mercury_PACS (80, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"Hg.dat")
 
ExAtomPhotoAbsCS Uranium_PACS (92, shelllist_dir_name+"shelllist.dat", pacs_table_dir_name+"U.dat")
 
MolecPhotoAbsCS H2_MPACS
 
MolecPhotoAbsCS He_MPACS
 
MolecPhotoAbsCS N2_MPACS
 
MolecPhotoAbsCS O2_MPACS
 
MolecPhotoAbsCS Ne_MPACS
 
MolecPhotoAbsCS Ar_MPACS
 
MolecPhotoAbsCS Kr_MPACS
 
MolecPhotoAbsCS Xe_MPACS
 
MolecPhotoAbsCS NH3_MPACS
 
MolecPhotoAbsCS N2O_MPACS
 
MolecPhotoAbsCS CO2_MPACS
 
MolecPhotoAbsCS CH4_MPACS
 
MolecPhotoAbsCS CF4_MPACS
 
MolecPhotoAbsCS SF4_MPACS
 
MolecPhotoAbsCS SF6_MPACS
 
MolecPhotoAbsCS C2H2_MPACS
 
MolecPhotoAbsCS C2H4_MPACS
 
MolecPhotoAbsCS C2H6_MPACS
 
MolecPhotoAbsCS C3H8_MPACS
 
MolecPhotoAbsCS C4H10_MPACS
 
MolecPhotoAbsCS C2F4H2_MPACS
 
MolecPhotoAbsCS Methylal_MPACS
 
MolecPhotoAbsCS C5H12_MPACS
 
MolecPhotoAbsCS H2O_MPACS
 
MolecPhotoAbsCS NO_MPACS
 
MolecPhotoAbsCS CO_MPACS
 
MolecPhotoAbsCS DME_MPACS
 
MolecPhotoAbsCS C2F6_MPACS
 
MolecPhotoAbsCS C3H6_MPACS
 
MolecPhotoAbsCS CH3OH_MPACS
 
MolecPhotoAbsCS C2H5OH_MPACS
 
MolecPhotoAbsCS C3H7OH_MPACS
 
MolecPhotoAbsCS Cs_MPACS
 
MolecPhotoAbsCS F2_MPACS
 
MolecPhotoAbsCS CS2_MPACS
 
MolecPhotoAbsCS COS_MPACS
 
MolecPhotoAbsCS BF3_MPACS
 
MolecPhotoAbsCS C2HF5_MPACS
 
MolecPhotoAbsCS C2H2F4_MPACS
 
MolecPhotoAbsCS CHF3_MPACS
 
MolecPhotoAbsCS CF3Br_MPACS
 
MolecPhotoAbsCS C3F8_MPACS
 
MolecPhotoAbsCS O3_MPACS
 
MolecPhotoAbsCS Hg_MPACS
 
MolecPhotoAbsCS H2S_MPACS
 
MolecPhotoAbsCS GeH4_MPACS
 
MolecPhotoAbsCS SiH4_MPACS
 
constexpr double ELRAD = CLHEP::fine_structure_const / CLHEP::electron_mass_c2
 Electron radius (1/MeV)
 
constexpr double ELRADCM = 2.81794092e-13
 
constexpr double C1_MEV_CM = ELRAD / ELRADCM
 
constexpr double C1_MEV2_BN = C1_MEV_CM * C1_MEV_CM / 1.0e24
 
constexpr double C1_MEV2_MBN = C1_MEV_CM * C1_MEV_CM / 1.0e18
 
int vecerror = 0
 
vec dex (1, 0, 0)
 
vec dey (0, 1, 0)
 
vec dez (0, 0, 1)
 
vec dv0 (0, 0, 0)
 
const vfloat vprecision = 1.0E-12
 
const double one_plus_def_dbl_prec = double(1.0) + DEF_DBL_PREC
 
const double one_minus_def_dbl_prec = double(1.0) - DEF_DBL_PREC
 
const double one_plus_def_flt_prec = double(1.0) + DEF_FLT_PREC
 
const double one_minus_def_flt_prec = double(1.0) - DEF_FLT_PREC
 
AtomDef Hydrogen ("Hydrogen", "H", 1, 1.0 *gram/mole)
 
AtomDef Helium ("Helium", "He", 2, 4.002602 *gram/mole)
 
AtomDef Lithium ("Lithium", "Li", 3, 6.941 *gram/mole)
 
AtomDef Beryllium ("Beryllium", "Be", 4, 9.012182 *gram/mole)
 
AtomDef Boron ("Boron", "B", 5, 10.811 *gram/mole)
 
AtomDef Carbon ("Carbon", "C", 6, 12.011 *gram/mole)
 
AtomDef Nitrogen ("Nitrogen", "N", 7, 14.00674 *gram/mole)
 
AtomDef Oxygen ("Oxygen", "O", 8, 15.9994 *gram/mole)
 
AtomDef Fluorine ("Fluorine", "F", 9, 18.9984032 *gram/mole)
 
AtomDef Neon ("Neon", "Ne", 10, 20.1797 *gram/mole)
 
AtomDef Sodium ("Sodium", "Na", 11, 22.989768 *gram/mole)
 
AtomDef Magnesium ("Magnesium", "Mg", 12, 24.3050 *gram/mole)
 
AtomDef Aluminium ("Aluminium", "Al", 13, 26.981539 *gram/mole)
 
AtomDef Silicon ("Silicon", "Si", 14, 28.0855 *gram/mole)
 
AtomDef Phosphorus ("Phosphorus", "P", 15, 30.973762 *gram/mole)
 
AtomDef Sulfur ("Sulfur", "S", 16, 32.066 *gram/mole)
 
AtomDef Chlorine ("Chlorine", "Cl", 17, 35.066 *gram/mole)
 
AtomDef Argon ("Argon", "Ar", 18, 39.948 *gram/mole)
 
AtomDef Argon_without_K ("Argon_without_K", "Ar_without_K", 16, 39.948 *gram/mole)
 
AtomDef Potassium ("Potassium", "K", 19, 39.098 *gram/mole)
 
AtomDef Calcium ("Calcium", "Ca", 20, 40.08 *gram/mole)
 
AtomDef Scandium ("Scandium", "Sc", 21, 44.9559 *gram/mole)
 
AtomDef Titanium ("Titanium", "Ti", 22, 47.867 *gram/mole)
 
AtomDef Vanadium ("Vanadium", "V", 23, 50.9414 *gram/mole)
 
AtomDef Chromium ("Chromium", "Cr", 24, 51.996 *gram/mole)
 
AtomDef Manganese ("Manganese", "Mn", 25, 54.9380 *gram/mole)
 
AtomDef Iron ("Iron", "Fe", 26, 55.845 *gram/mole)
 
AtomDef Cobalt ("Cobalt", "Co", 27, 58.9332 *gram/mole)
 
AtomDef Nickel ("Nickel", "Ni", 28, 58.70 *gram/mole)
 
AtomDef Copper ("Copper", "Cu", 29, 63.546 *gram/mole)
 
AtomDef Zinc ("Zinc", "Zn", 30, 65.38 *gram/mole)
 
AtomDef Gallium ("Gallium", "Ga", 31, 69.72 *gram/mole)
 
AtomDef Germanium ("Germanium", "Ge", 32, 72.59 *gram/mole)
 
AtomDef Arsenic ("Arsenic", "As", 33, 74.9216 *gram/mole)
 
AtomDef Selenium ("Selenium", "Se", 34, 78.96 *gram/mole)
 
AtomDef Bromine ("Bromine", "Br", 35, 79.904 *gram/mole)
 
AtomDef Krypton ("Krypton", "Kr", 36, 83.80 *gram/mole)
 
AtomDef Rubidium ("Rubidium", "Rb", 37, 85.4673 *gram/mole)
 
AtomDef Strontium ("Strontium", "Sr", 38, 87.62 *gram/mole)
 
AtomDef Yttrium ("Yttrium", "Y", 39, 88.9059 *gram/mole)
 
AtomDef Zirconium ("Zirconium", "Zr", 40, 91.22 *gram/mole)
 
AtomDef Niobium ("Niobium", "Nb", 41, 92.9064 *gram/mole)
 
AtomDef Molybdenum ("Molybdenum", "Mo", 42, 95.94 *gram/mole)
 
AtomDef Technetium ("Technetium", "Tc", 43, 98 *gram/mole)
 
AtomDef Ruthenium ("Ruthenium", "Ru", 44, 101.07 *gram/mole)
 
AtomDef Rhodium ("Rhodium", "Rh", 45, 102.9055 *gram/mole)
 
AtomDef Palladium ("Palladium", "Pd", 46, 106.4 *gram/mole)
 
AtomDef Silver ("Silver", "Ag", 47, 107.868 *gram/mole)
 
AtomDef Cadmium ("Cadmium", "Cd", 48, 112.411 *gram/mole)
 
AtomDef Indium ("Indium", "In", 49, 114.818 *gram/mole)
 
AtomDef Tin ("Tin", "Sn", 50, 118.710 *gram/mole)
 
AtomDef Antimony ("Antimony", "Sb", 51, 121.760 *gram/mole)
 
AtomDef Tellurium ("Tellurium", "Te", 52, 127.60 *gram/mole)
 
AtomDef Iodine ("Iodine", "I", 53, 126.9045 *gram/mole)
 
AtomDef Xenon ("Xenon", "Xe", 54, 131.293 *gram/mole)
 
AtomDef Caesium ("Caesium", "Cs", 55, 132.9054519 *gram/mole)
 
AtomDef Tungsten ("Tungsten", "W", 74, 183.85 *gram/mole)
 
AtomDef Mercury ("Mercury", "Hg", 80, 200.59 *gram/mole)
 
AtomDef Bismuth ("Bismuth", "Bi", 83, 208.9804 *gram/mole)
 
AtomDef Uranium ("Uranium", "U", 92, 238.0289 *gram/mole)
 
AtomDef Plutonium ("Plutonium", "Pu", 94, 244.0 *gram/mole)
 
MoleculeDef Hydrogen2 ("Hydrogen", "H2", "H", 2)
 
MoleculeDef Helium_molec ("Helium", "He", "He", 1)
 
MoleculeDef Nitrogen_molec ("Nitrogen", "N2", "N", 2)
 
MoleculeDef Oxygen_molec ("Oxygen", "O2", "O", 2)
 
MoleculeDef Neon_molec ("Neon", "Ne", "Ne", 1)
 
MoleculeDef Argon_molec ("Argon", "Ar", "Ar", 1, std::make_shared< VanDerWaals >(48.6 *bar, 150.7 *kelvin))
 
MoleculeDef Krypton_molec ("Krypton", "Kr", "Kr", 1, std::make_shared< VanDerWaals >(55.0 *bar, 209.4 *kelvin))
 
MoleculeDef Xenon_molec ("Xenon", "Xe", "Xe", 1, std::make_shared< VanDerWaals >(55.0 *bar, 209.4 *kelvin))
 
MoleculeDef NH3 ("NH3", "NH3", "N", 1, "H", 3)
 
MoleculeDef N2O ("N2O", "N2O", "N", 2, "O", 1)
 
MoleculeDef CO2 ("CO2", "CO2", "C", 1, "O", 2)
 
MoleculeDef CH4 ("CH4", "CH4", "C", 1, "H", 4, std::make_shared< VanDerWaals >(4.64e6 *hep_pascal,(273.15 - 82.5) *kelvin))
 
MoleculeDef CF4 ("CF4", "CF4", "C", 1, "F", 4, std::make_shared< VanDerWaals >(42.5 *bar, 369.8 *kelvin))
 
MoleculeDef SF4 ("SF4", "SF4", "S", 1, "F", 4)
 
MoleculeDef SF6 ("SF6", "SF6", "S", 1, "F", 6)
 
MoleculeDef C2H2 ("C2H2", "C2H2", "C", 2, "H", 2)
 
MoleculeDef C2H4 ("C2H4", "C2H4", "C", 2, "H", 4)
 
MoleculeDef C2H6 ("C2H6", "C2H6", "C", 2, "H", 6)
 
MoleculeDef C3H8 ("C3H8", "C3H8", "C", 3, "H", 8, std::make_shared< VanDerWaals >(42.5 *bar, 369.8 *kelvin))
 
MoleculeDef C4H10 ("C4H10", "C4H10", "C", 4, "H", 10, std::make_shared< VanDerWaals >(40.0 *bar, 418.3 *kelvin))
 
MoleculeDef C2H2F4 ("C2H2F4", "C2H2F4", "C", 2, "F", 4, "H", 2)
 
MoleculeDef Water_molec ("Water", "Water", "H", 2, "O", 1, std::make_shared< VanDerWaals >(22.9e6 *hep_pascal,(273.15+374.15) *kelvin))
 
MoleculeDef Methylal_molec ("Methylal", "Methylal", "O", 2, "C", 3, "H", 8, std::make_shared< VanDerWaals >(39.5 *bar, 480.6 *kelvin))
 
MoleculeDef C5H12_molec ("C5H12", "C5H12", "C", 5, "H", 12)
 
MoleculeDef NO_molec ("NO", "NO", "N", 1, "O", 1)
 
MoleculeDef CO_molec ("CO", "CO", "C", 1, "O", 1)
 
MoleculeDef DME_molec ("DME", "DME", "C", 2, "H", 6, "O", 1)
 
MoleculeDef C2F6_molec ("C2F6", "C2F6", "C", 2, "F", 6)
 
MoleculeDef C3H6_molec ("C3H6", "C3H6", "C", 3, "H", 6)
 
MoleculeDef CH3OH_molec ("CH3OH", "CH3OH", "C", 1, "H", 4, "O", 1)
 
MoleculeDef C2H5OH_molec ("C2H5OH", "C2H5OH", "C", 2, "H", 6, "O", 1)
 
MoleculeDef C3H7OH_molec ("C3H7OH", "C3H7OH", "C", 3, "H", 8, "O", 1)
 
MoleculeDef Cs_molec ("Cs", "Cs", "Cs", 1)
 
MoleculeDef F2_molec ("F2", "F2", "F", 2)
 
MoleculeDef CS2_molec ("CS2", "CS2", "C", 1, "S", 2)
 
MoleculeDef COS_molec ("COS", "COS", "C", 1, "O", 1, "S", 1)
 
MoleculeDef BF3_molec ("BF3", "BF3", "B", 1, "F", 3)
 
MoleculeDef C2HF5_molec ("C2HF5", "C2HF5", "C", 2, "H", 1, "F", 5)
 
MoleculeDef CHF3_molec ("CHF3", "CHF3", "C", 1, "H", 1, "F", 3)
 
MoleculeDef CF3Br_molec ("CF3Br", "CF3Br", "C", 1, "F", 3, "Br", 1)
 
MoleculeDef C3F8_molec ("C3F8", "C3F8", "C", 3, "F", 8)
 
MoleculeDef O3_molec ("O3", "O3", "O", 3)
 
MoleculeDef Hg_molec ("Hg", "Hg", "Hg", 1)
 
MoleculeDef H2S_molec ("H2S", "H2S", "H", 2, "S", 1)
 
MoleculeDef GeH4_molec ("GeH4", "GeH4", "Ge", 1, "H", 4)
 
MoleculeDef SiH4_molec ("SiH4", "SiH4", "Si", 1, "H", 4)
 
VanDerWaals C3H8_VanDerWaals
 
VanDerWaals C4H10_VanDerWaals
 
VanDerWaals Water_VanDerWaals
 
VanDerWaals Methylal_VanDerWaals
 
particle_def electron_def ("electron", "e-", electron_mass_c2/c_squared, electron_charge, 1, 0, 0.5, spin_def(0.0, 0.0))
 
particle_def positron_def ("positron", "e+", electron_def)
 
particle_def muon_minus_def ("muon_minus", "mu-", 105.658367 *MeV/c_squared, electron_charge, 1, 0, 0.5, spin_def(0.0, 0.0))
 
particle_def muon_plus_def ("muon_plus", "mu+", muon_minus_def)
 
particle_def proton_def ("proton", "p+", proton_mass_c2/c_squared, eplus, 0, 1, 0.5, spin_def(0.5, 0.5))
 
particle_def anti_proton_def ("", "p-", proton_def)
 
particle_def neutron_def ("neutron", "n", neutron_mass_c2/c_squared, 0, 0, 1, 0.5, spin_def(0.5, -0.5))
 
particle_def anti_neutron_def ("", "", neutron_def)
 
particle_def P11_def ("P11", "P11", 1440.0 *MeV/c_squared, 1 *eplus, 0, 1, 0.5, spin_def(0.5, 0.5))
 
particle_def D13_def ("D13", "D13", 1520.0 *MeV/c_squared, 1 *eplus, 0, 1, 1.5, spin_def(0.5, 0.5))
 
particle_def S11_def ("S11", "S11", 1535.0 *MeV/c_squared, 1 *eplus, 0, 1, 0.5, spin_def(0.5, 0.5))
 
particle_def pi_plus_meson_def ("pi_plus_meson", "pi+", 139.56755 *MeV/c_squared, eplus, 0, 0, 0.0, spin_def(1.0, 1.0))
 
particle_def pi_minus_meson_def ("pi_minus_meson", "pi-", 139.56755 *MeV/c_squared, -eplus, 0, 0, 0.0, spin_def(1.0, -1.0))
 
particle_def pi_0_meson_def ("pi_0_meson", "pi0", 134.9734 *MeV/c_squared, 0, 0, 0, 0.0, spin_def(1.0, 0.0))
 
particle_def eta_meson_def ("eta_meson_def", "eta", 548.8 *MeV/c_squared, 0, 0, 0, 1.0, spin_def(0.0, 0.0))
 
particle_def K_plus_meson_def ("K_plus_meson_def", "K+", 493.677 *MeV/c_squared, 1, 0, 0, 0.0, spin_def(0.5, -0.5))
 
particle_def K_minus_meson_def ("K_minus_meson_def", "K-", K_plus_meson_def)
 
particle_def deuteron_def ("deuteron", "dtr", 1875.613 *MeV/c_squared, eplus, 0, 2, 0.0, spin_def(0.0, 0.0))
 
particle_def alpha_particle_def ("alpha_particle", "alpha", 3727.417 *MeV/c_squared, 2 *eplus, 0, 4, 0.0, spin_def(0.0, 0.0))
 
particle_def user_particle_def ("user_particle", "X", 139.56755 *MeV/c_squared, eplus, 0, 0, 0.0, spin_def(0.0, 0.0))
 
long max_qel_DynLinArr = 100000000
 
DynLinArr< long > qel_communicat
 
const int pq_arrelem_in_line = 5
 
indentation indn
 
int s_short_output = 0
 
int s_throw_exception_in_spexit = 0
 
int s_exit_without_core = 0
 

Typedef Documentation

◆ String

typedef std::string Heed::String

Definition at line 69 of file String.h.

◆ vfloat

typedef double Heed::vfloat

Definition at line 16 of file vfloat.h.

Enumeration Type Documentation

◆ Clone

Enumerator
do_clone 

Definition at line 187 of file AbsPtr.h.

187 {
189};
@ do_clone
Definition: AbsPtr.h:188

◆ Pass

enum Heed::Pass
Enumerator
dont_clone 

Definition at line 190 of file AbsPtr.h.

190 {
192};
@ dont_clone
Definition: AbsPtr.h:191

◆ Pilfer

Enumerator
steal 

Definition at line 184 of file AbsPtr.h.

184 {
185 steal
186};
@ steal
Definition: AbsPtr.h:185

Function Documentation

◆ abstract_determinant()

template<class M , class X >
X Heed::abstract_determinant ( M &  mi,
long  q,
 
)

Definition at line 32 of file abs_inverse.h.

32 {
33#endif
34
35 if (q == 1) {
36 return mi.ac(0, 0);
37 } else if (q == 2) {
38 return mi.ac(0, 0) * mi.ac(1, 1) - mi.ac(0, 1) * mi.ac(1, 0);
39 } else if (q == 3) {
40 return mi.ac(0, 0) * mi.ac(1, 1) * mi.ac(2, 2) +
41 mi.ac(0, 2) * mi.ac(1, 0) * mi.ac(2, 1) +
42 mi.ac(0, 1) * mi.ac(1, 2) * mi.ac(2, 0) -
43 mi.ac(0, 2) * mi.ac(1, 1) * mi.ac(2, 0) -
44 mi.ac(0, 0) * mi.ac(1, 2) * mi.ac(2, 1) -
45 mi.ac(0, 1) * mi.ac(1, 0) * mi.ac(2, 2);
46 }
47 X koef = 1;
48 for (long nr = 0; nr < q; nr++) {
49 long nmax = 0;
50 double d = 0;
51 for (long nr1 = nr; nr1 < q; nr1++) {
52 if (fabs(mi.ac(nr1, nr)) > d) {
53 d = fabs(mi.ac(nr1, nr));
54 nmax = nr1;
55 }
56 }
57 // mcout<<"d="<<d<<'\n';
58 // mcout<<"nmax="<<nmax<<'\n';
59 if (d == 0) {
60 // serr = 1;
61 return koef * mi.ac(nmax, nr);
62 }
63 if (nmax > nr) {
64 for (long nc = nr; nc < q; nc++) {
65 X t(mi.ac(nr, nc));
66 mi.ac(nr, nc) = mi.ac(nmax, nc);
67 mi.ac(nmax, nc) = t;
68 }
69 // transposition of rows: determinant changes sign
70 koef *= -1;
71 }
72 X t = mi.ac(nr, nr);
73 for (long nr1 = nr + 1; nr1 < q; nr1++) {
74 X k(mi.ac(nr1, nr) / t);
75 // mcout<<"nr1="<<nr1<<" nr="<<nr<<'\n';
76 // mcout<<"k="<<k<<'\n';
77 // add elements of another row: the main value of
78 // determinant is not affected (proven in linear algebra)
79 // But the resolution gets worser.
80 for (long nc = nr; nc < q; nc++) {
81 mi.ac(nr1, nc) -= k * mi.ac(nr, nc);
82 }
83 }
84 for (long nc = nr; nc < q; nc++) {
85 mi.ac(nr, nc) /= t;
86 }
87 koef *= t;
88 }
89 return koef;
90}
DoubleAc fabs(const DoubleAc &f)
Definition: DoubleAc.h:615

Referenced by determinant_DynArr().

◆ acos()

DoubleAc Heed::acos ( const DoubleAc f)

Definition at line 490 of file DoubleAc.cpp.

490 {
491 if (fabs(f.get()) > 1) {
492 mcerr << "ERROR in inline DoubleAc acos(const DoubleAc& f):\n"
493 << "fabs(f.get()) > 1: f.get()=" << f.get() << '\n';
494 spexit(mcerr);
495 }
496 double d = std::acos(f.get());
497 double da;
498 if (f.left_limit() < -1.0)
499 da = std::acos(-1.0);
500 else
501 da = std::acos(f.left_limit());
502 double di;
503 if (f.right_limit() > 1.0)
504 di = std::acos(1.0);
505 else
506 di = std::acos(f.right_limit());
507 return DoubleAc(d, di, da);
508}
#define spexit(stream)
Definition: FunNameStack.h:256
double get(void) const
Definition: DoubleAc.h:76
double left_limit(void) const
Definition: DoubleAc.h:79
double right_limit(void) const
Definition: DoubleAc.h:83
#define mcerr
Definition: prstream.h:128

Referenced by Heed::spquadr::apos(), Heed::HeedDeltaElectron::physics_after_new_speed(), and theta_two_part().

◆ ang2projvec()

vfloat Heed::ang2projvec ( const vec r1,
const vec r2,
const vec normal 
)

Definition at line 136 of file vec.cpp.

136 {
137 pvecerror(
138 "vfloat ang2projvec(const vec& r1, const vec& r2, const vec& normal)");
139 vec rt1 = project_to_plane(r1, normal);
140 vec rt2 = project_to_plane(r2, normal);
141 if (rt1 == dv0 || rt2 == dv0) {
142 vecerror = 1;
143 return 0;
144 }
145 vfloat tang = ang2vec(rt1, rt2);
146 if (tang == 0) return tang; // projections are parallel
147 vec at = rt1 || rt2;
148 int i = check_par(at, normal, 0.0001);
149 // mcout<<"r1="<<r1<<"r2="<<r2<<"normal="<<normal
150 // <<"rt1="<<rt1<<"rt2="<<rt2<<"\ntang="<<tang
151 // <<"\nat="<<at<<" i="<<i<<'\n';
152 if (i == -1) return 2.0 * M_PI - tang;
153 return tang; // it works if angle <= PI
154}
Definition: vec.h:177
vec project_to_plane(const vec &r, const vec &normal)
Definition: vec.cpp:124
int vecerror
Definition: vec.cpp:29
#define pvecerror(string)
Definition: vec.h:28

Referenced by Heed::polygon::check_point_in(), and Heed::splane::range().

◆ ang2vec()

vfloat Heed::ang2vec ( const vec r1,
const vec r2 
)

Definition at line 89 of file vec.cpp.

89 {
90 // angle between vectors
91 // instead of return acos(cos2vec(r1,r2)); which produces NaN on linux at
92 // parallel vectors
93 vfloat cs = cos2vec(r1, r2);
94 if (vecerror != 0) return 0;
95 if (cs > 0.707106781187 || cs < -0.707106781187) { // 1.0/sqrt(2)
96 // pass to sin, it will be more exactly
97 vfloat sn = sin2vec(r1, r2);
98 if (vecerror != 0) return 0;
99 if (cs > 0.0)
100 return asin(sn);
101 else
102 return M_PI - asin(sn);
103 }
104 return acos(cs);
105}
vfloat sin2vec(const vec &r1, const vec &r2)
Definition: vec.cpp:107
vfloat cos2vec(const vec &r1, const vec &r2)
Definition: vec.cpp:66
DoubleAc asin(const DoubleAc &f)
Definition: DoubleAc.cpp:470
double vfloat
Definition: vfloat.h:16

◆ apeq() [1/4]

bool Heed::apeq ( const circumf f1,
const circumf f2,
vfloat  prec 
)

Definition at line 44 of file circumf.cpp.

44 {
45 pvecerror("bool apeq(const circumf &f1, const circumf &f2, vfloat prec)");
46 if (check_par(f1.dir, f2.dir, prec) == 0) return false;
47 return apeq(f1.piv, f2.piv, prec) && apeq(f1.rad, f2.rad, prec);
48}
vfloat rad
Radius, >0.
Definition: circumf.h:64
point piv
Central point, pivot.
Definition: circumf.h:59
bool apeq(const circumf &f1, const circumf &f2, vfloat prec)
Definition: circumf.cpp:44

Referenced by Heed::basis::basis(), and Heed::polyline::check_point_in().

◆ apeq() [2/4]

bool Heed::apeq ( const plane pl1,
const plane pl2,
vfloat  prec 
)

Definition at line 60 of file plane.cpp.

60 {
61 pvecerror("bool apeq(const plane &pl1, const plane &pl2, vfloat prec)");
62 if (check_par(pl1.dir, pl2.dir, prec) == 0) return false;
63 if (apeq(pl1.piv, pl2.piv, prec)) return true;
64 return (pl1.check_point_in(pl2.piv, prec) == 1);
65}
point piv
Origin point, pivot.
Definition: plane.h:27
vec dir
Direction of normal, unit vector.
Definition: plane.h:29
int check_point_in(const point &fp, vfloat prec) const
Definition: plane.cpp:67

◆ apeq() [3/4]

bool Heed::apeq ( const straight sl1,
const straight sl2,
vfloat  prec 
)

Definition at line 40 of file straight.cpp.

40 {
41 pvecerror("int apeq(const straight &sl1, const straight &sl2, vfloat prec)");
42 int i = check_par(sl1.dir, sl2.dir, prec);
43 if (i == 0) return false;
44 if (apeq(sl1.piv, sl2.piv, prec)) return true;
45 return (sl1.check_point_in(sl2.piv, prec) == 1);
46}
point piv
Origin point, pivot.
Definition: straight.h:27
int check_point_in(const point &fp, vfloat prec) const
Definition: straight.cpp:48
vec dir
Direction, unit vector.
Definition: straight.h:29

◆ apeq() [4/4]

bool Heed::apeq ( const vfloat  f1,
const vfloat  f2,
const vfloat  prec = vprecision 
)
inline

Definition at line 20 of file vfloat.h.

21 {
22 return (fabs(f1 - f2) <= prec);
23}

◆ apeq_mant() [1/4]

template<class T , class P >
int Heed::apeq_mant ( const DynArr< T > &  f1,
const DynArr< T > &  f2,
prec 
)

Definition at line 2465 of file AbsArr.h.

2465 {
2466 if (f1.get_qel() != f2.get_qel()) return 0;
2467 if (!apeq_mant(f1.get_el(), f2.get_el(), prec)) return 0;
2468 return 1;
2469}
const DynLinArr< T > & get_el(void) const
Definition: AbsArr.h:2170
const DynLinArr< long > & get_qel(void) const
Definition: AbsArr.h:2169
int apeq_mant(const T &x1, const T &x2, T prec)
Definition: minmax.h:55

◆ apeq_mant() [2/4]

template<class T , class P >
int Heed::apeq_mant ( const DynLinArr< T > &  f1,
const DynLinArr< T > &  f2,
prec 
)

Definition at line 2439 of file AbsArr.h.

2439 {
2440 if (f1.get_qel() != f2.get_qel()) return 0;
2441 long q = f1.get_qel();
2442 long n;
2443 for (n = 0; n < q; n++) {
2444 if (!apeq_mant(f1.acu(n), f2.acu(n), prec)) return 0;
2445 }
2446 return 1;
2447}
long get_qel(void) const
Definition: AbsArr.h:283
T & acu(long n)
Definition: AbsArr.h:247

◆ apeq_mant() [3/4]

template<class T >
int Heed::apeq_mant ( const EqualStepCoorMesh< T > &  f1,
const EqualStepCoorMesh< T > &  f2,
prec 
)

Definition at line 255 of file tline.h.

256 {
257 if (f1.get_qi() != f2.get_qi() ||
258 !apeq_mant(f1.get_xmin(), f2.get_xmin(), prec) ||
259 !apeq_mant(f1.get_xmax(), f2.get_xmax(), prec)) {
260 Iprintn(mcout, !apeq_mant(f1.get_xmin(), f2.get_xmin(), prec));
261 Iprintn(mcout, !apeq_mant(f1.get_xmax(), f2.get_xmax(), prec));
262 return 0;
263 } else
264 return 1;
265}
T get_xmin(void) const
Definition: tline.h:68
T get_xmax(void) const
Definition: tline.h:69
long get_qi(void) const
Get number of intervals.
Definition: tline.h:66
#define mcout
Definition: prstream.h:126
#define Iprintn(file, name)
Definition: prstream.h:205

◆ apeq_mant() [4/4]

template<class T >
int Heed::apeq_mant ( const T &  x1,
const T &  x2,
prec 
)

Definition at line 55 of file minmax.h.

55 {
56 if (x1 == x2) return 1;
57 if (prec == 0) return 0;
58 if (x1 == 0 && x2 == 0) return 1;
59 if ((x1 < 0 && x2 > 0) || (x1 > 0 && x2 < 0)) return 0;
60 if (tabs((x1 - x2) / (x1 + x2)) <= prec) return 1;
61 return 0;
62}
T tabs(const T &x)
Definition: minmax.h:50

Referenced by apeq_mant(), t_entire_hisran_step_ar(), t_hisran_step_ar(), and t_opposite_hisran_step_ar().

◆ append()

template<class T >
long Heed::append ( const T &  t,
DynLinArr< T > &  dla,
long &  qael,
T *  tempt = NULL,
long  new_qel = 0 
)

Definition at line 954 of file AbsArr.h.

964 {
965 if (dla.get_qel() < qael) {
966 mcerr << "ERROR in long append(class DynLinArr& dla, ...): dla.get_qel() < "
967 "qael\n"
968 << "dla.get_qel()=" << dla.get_qel() << " qael=" << qael << '\n';
969 mcerr << "Type of T is (in internal notations) " << typeid(T).name()
970 << '\n';
971 spexit(mcerr);
972 }
973 if (dla.get_qel() == qael) {
974 if (new_qel <= qael) new_qel = std::max(3 * qael, long(3));
975 dla.put_qel(new_qel, tempt, ArgInterp_SingleAdr());
976 }
977 dla[qael++] = t;
978 return qael;
979}
void put_qel(long fqel)
Definition: AbsArr.h:530

◆ apply1() [1/2]

template<class T >
void Heed::apply1 ( DynArr< T > &  ar,
void(*)(T &f)  fun 
)

Definition at line 2343 of file AbsArr.h.

2343 {
2344 const long q = ar.el.get_qel();
2345 for (long n = 0; n < q; n++) (*fun)(ar.el[n]);
2346}

◆ apply1() [2/2]

template<class T >
void Heed::apply1 ( DynLinArr< T > &  ar,
void(*)(T &f)  fun 
)

Definition at line 422 of file AbsArr.h.

422 {
423 for (long n = 0; n < ar.qel; n++) (*fun)(ar.el[n]);
424}

◆ apply2() [1/2]

template<class T , class X >
void Heed::apply2 ( DynArr< T > &  ar,
void(*)(T &f, void(*fun21)(X &f))  fun1,
void(*)(X &f)  fun2 
)

Definition at line 2348 of file AbsArr.h.

2349 {
2350 const long q = ar.el.get_qel();
2351 for (long n = 0; n < q; n++) (*fun1)(ar.el[n], fun2);
2352}

◆ apply2() [2/2]

template<class T , class X >
void Heed::apply2 ( DynLinArr< T > &  ar,
void(*)(T &f, void(*fun21)(X &f))  fun1,
void(*)(X &f)  fun2 
)

Definition at line 427 of file AbsArr.h.

428 {
429 for (long n = 0; n < ar.qel; n++) (*fun1)(ar.el[n], fun2);
430}

◆ asin()

DoubleAc Heed::asin ( const DoubleAc f)

Definition at line 470 of file DoubleAc.cpp.

470 {
471 if (fabs(f.get()) > 1) {
472 mcerr << "ERROR in inline DoubleAc asin(const DoubleAc& f):\n"
473 << "fabs(f.get()) > 1: f.get()=" << f.get() << '\n';
474 spexit(mcerr);
475 }
476 double d = std::asin(f.get());
477 double di;
478 if (f.left_limit() < -1.0)
479 di = std::asin(-1.0);
480 else
481 di = std::asin(f.left_limit());
482 double da;
483 if (f.right_limit() > 1.0)
484 da = std::asin(1.0);
485 else
486 da = std::asin(f.right_limit());
487 return DoubleAc(d, di, da);
488}

Referenced by Heed::HeedDeltaElectronCS::HeedDeltaElectronCS(), and theta_two_part().

◆ assignAll_1()

template<class T , class T1 >
void Heed::assignAll_1 ( DynLinArr< T > &  f,
const T1 &  ft 
)

Definition at line 1251 of file AbsArr.h.

1253{
1254 long q = f.get_qel();
1255 long n;
1256 for (n = 0; n < q; n++) f[n].assignAll(ft);
1257}

◆ Bethe_Bloch_energy_loss()

double Heed::Bethe_Bloch_energy_loss ( const double  ratio_Z_to_A,
const double  I_eff,
const double  beta,
const double  z 
)

Ordinary Bethe-Bloch formula with various modifications. Based on K. Kleinknecht, "Detectors for particle radiation". 1998 - 2002, I. Smirnov

Definition at line 20 of file bethe_bloch.cpp.

21 {
22
23 constexpr double coef1 = 4 * pi * classic_electr_radius *
24 classic_electr_radius * electron_mass_c2 * Avogadro;
25 const double beta2 = beta * beta;
26 const double gamma = lorgamma_1(beta) + 1.;
27 const double gamma2 = gamma * gamma;
28 const double coef2 = z * z * ratio_Z_to_A / beta2;
29 const double sum =
30 log(2. * electron_mass_c2 * beta2 * gamma2 / I_eff) - beta2;
31 return coef1 * coef2 * sum;
32}
double lorgamma_1(double beta)
as function of .
Definition: lorgamma.cpp:10

◆ Bethe_Bloch_energy_loss_gamma_1()

double Heed::Bethe_Bloch_energy_loss_gamma_1 ( const double  ratio_Z_to_A,
const double  I_eff,
const double  gamma_1,
const double  z 
)

Safer version, using gamma - 1 instead of beta.

Definition at line 34 of file bethe_bloch.cpp.

36 {
37 // This constant should be 0.3071 according to PDG.
38 constexpr double coef1 = 4 * pi * classic_electr_radius *
39 classic_electr_radius * electron_mass_c2 * Avogadro;
40 const double beta = lorbeta(gamma_1);
41 const double beta2 = beta * beta;
42 const double gamma = gamma_1 + 1.0;
43 const double gamma2 = gamma * gamma;
44 const double coef2 = z * z * ratio_Z_to_A / beta2;
45 const double sum =
46 log(2. * electron_mass_c2 * beta2 * gamma2 / I_eff) - beta2;
47 return coef1 * coef2 * sum;
48}
double lorbeta(const double gamma_1)
as function of .
Definition: lorgamma.cpp:23

◆ Bethe_Bloch_restricted_energy_loss_gamma_1()

double Heed::Bethe_Bloch_restricted_energy_loss_gamma_1 ( const double  ratio_Z_to_A,
const double  I_eff,
const double  m,
const double  gamma_1,
const double  ecut,
const double  z 
)

Definition at line 50 of file bethe_bloch.cpp.

52 {
53
54 // TODO: 4 pi or 2 pi?
55 constexpr double coef1 = twopi * classic_electr_radius *
56 classic_electr_radius * electron_mass_c2 * Avogadro;
57 const double beta = lorbeta(gamma_1);
58 const double beta2 = beta * beta;
59 const double gamma = gamma_1 + 1.0;
60 const double gamma2 = gamma * gamma;
61 const double coef2 = z * z * ratio_Z_to_A / beta2;
62 const double mrat = electron_mass_c2 / (m * c_squared);
63 const double emax = 2.0 * electron_mass_c2 * beta2 * gamma2 /
64 (1.0 + 2.0 * gamma * mrat + mrat * mrat);
65 double sum = 0.;
66 if (ecut >= emax) {
67 sum = log(2.0 * electron_mass_c2 * beta2 * gamma2 * emax / (I_eff * I_eff)) -
68 2.0 * beta2;
69 } else {
70 sum = log(2.0 * electron_mass_c2 * beta2 * gamma2 * ecut / (I_eff * I_eff)) -
71 beta2 * (1.0 + ecut / emax);
72 }
73 return coef1 * coef2 * sum;
74}

◆ change_sign() [1/5]

void Heed::change_sign ( double &  f)
inline

Definition at line 351 of file multiply.h.

351{ f = -f; }

◆ change_sign() [2/5]

void Heed::change_sign ( DoubleAc f)
inline

Definition at line 424 of file DoubleAc.h.

424 {
425 f.d = -f.d;
426 double temp = f.di;
427 f.di = -f.da;
428 f.da = -temp;
429}

Referenced by change_sign().

◆ change_sign() [3/5]

template<class T >
void Heed::change_sign ( DynArr< T > &  mt)

Definition at line 457 of file multiply.h.

457 {
458 // just change sign without copying total content,
459 // but correspondent member function should exist for type of elements T
460 const long qel_lin = mt.get_qel_lin();
461 for (long n = 0; n < qel_lin; n++) {
462 change_sign(mt.acu_lin(n));
463 }
464}
long get_qel_lin(void) const
Definition: AbsArr.h:2131
T & acu_lin(long n)
Definition: AbsArr.h:2163
void change_sign(DoubleAc &f)
Definition: DoubleAc.h:424

◆ change_sign() [4/5]

template<class T >
void Heed::change_sign ( DynLinArr< T > &  ar)

Definition at line 339 of file multiply.h.

339 { // just change sign without copying total
340 // content,
341 // but correspondent member function should exist for type of elements T
342 const long q = ar.get_qel();
343 DynLinArr<T> s(q);
344 for (long n = 0; n < q; n++) {
345 change_sign(ar.acu(n));
346 }
347}

◆ change_sign() [5/5]

void Heed::change_sign ( float &  f)
inline

Definition at line 349 of file multiply.h.

349{ f = -f; }

◆ chispre() [1/2]

float Heed::chispre ( float *  x,
float *  p,
float *  f,
long  q 
)

Definition at line 8 of file chisran.cpp.

8 {
9 mfunnamep("float chispre(float *x, float *p, float *f, long q)");
10 check_econd11(q, <= 0, mcerr);
11 float r = 0;
12 for (long i = 0; i < q; ++i) {
13 check_econd11(p[i], < 0.0, mcerr);
14 r += p[i] * (x[i + 1] - x[i]);
15 f[i] = r;
16 }
17 check_econd11(r, <= 0, mcerr);
18 for (long i = 0; i < q; ++i) f[i] /= r;
19 return r;
20}
#define check_econd11(a, signb, stream)
Definition: FunNameStack.h:155
#define mfunnamep(string)
Definition: FunNameStack.h:49

Referenced by Heed::HeedPhoton::physics().

◆ chispre() [2/2]

double Heed::chispre ( std::vector< double > &  f,
int  s_allow_zero_f 
)

Definition at line 67 of file chisran.cpp.

67 {
68 mfunnamep("double chispre(vector<double>& f, int s_allow_zero_f=0)");
69 // check_econd12(p.get_qel() , != , f.get_qel() , mcerr);
70 const long q = f.size();
71 check_econd11(q, <= 0, mcerr);
72 double r = 0;
73 for (int i = 0; i < q; ++i) {
74 if (s_allow_zero_f == 0) {
75 check_econd11a(f[i], < 0.0, "i=" << i << '\n', mcerr);
76 } else {
77 if (f[i] < 0.0) {
78 mcout << "Warning: f[i] < 0.0 in double chispre(vector<double>& f, "
79 "int s_allow_zero_f)\n";
80 Iprint2n(mcout, i, f[i]);
81 f[i] = 0.0;
82 }
83 }
84 r += f[i];
85 f[i] = r;
86 }
87 check_econd11(r, <= 0, mcerr);
88 for (int i = 0; i < q; ++i) f[i] /= r;
89 return r;
90}
#define check_econd11a(a, signb, add, stream)
Definition: FunNameStack.h:172
#define Iprint2n(file, name1, name2)
Definition: prstream.h:220

◆ chisran() [1/2]

double Heed::chisran ( double  flat_random_number,
const std::vector< double > &  f 
)

Definition at line 92 of file chisran.cpp.

92 {
93 mfunnamep("double chisran(double flat_random_number, vector<double> f)");
94 const long q = f.size();
95 check_econd11(q, <= 0, mcerr);
96 check_econd21(flat_random_number, < 0.0 &&, > 1.0, mcerr);
97 if (flat_random_number == 0.0) {
98 for (long n = 0; n < q; ++n) {
99 if (f[n] > 0.0) return double(n);
100 }
101 } else {
102 if (flat_random_number == 1.0) {
103 for (long n = q - 1; n >= 0; n--) {
104 if (f[n] < 1.0) return double(n + 1);
105 }
106 } else {
107 if (flat_random_number <= f[0]) {
108 return flat_random_number / f[0];
109 } else {
110 long nl = 0;
111 long nr = q - 1;
112 long nc;
113 while (nr - nl > 1) {
114 nc = (nr + nl) / 2;
115 if (flat_random_number < f[nc]) {
116 nr = nc;
117 } else {
118 nl = nc;
119 }
120 }
121 const double xl = double(nl + 1);
122 const double xr = double(nr + 1);
123 const double yl = f[nl];
124 const double yr = f[nr];
125 const double a = (xr - xl) / (yr - yl);
126 const double b = xl;
127 // Iprint3n(mcout, nl, nr, nc);
128 // Iprint2n(mcout, xl, xr);
129 // Iprint2n(mcout, yl, yr);
130 // Iprint2n(mcout, a, b);
131 return a * (flat_random_number - yl) + b;
132 }
133 }
134 }
135 funnw.ehdr(mcerr);
136 mcerr << "should never happen\n";
137 spexit(mcerr);
138 return 0.0;
139}
#define check_econd21(a, sign1_b1_sign0, sign2_b2, stream)
Definition: FunNameStack.h:191

◆ chisran() [2/2]

float Heed::chisran ( float  flat_random_number,
float *  x,
float *  f,
long  q 
)

Definition at line 22 of file chisran.cpp.

22 {
24 "float chisran(float flat_random_number, float *x, float *f, long q)");
25 check_econd11(q, <= 0, mcerr);
26 check_econd21(flat_random_number, < 0.0 &&, > 1.0, mcerr);
27 if (flat_random_number == 0.0) {
28 for (long n = 0; n < q; ++n) {
29 if (f[n] > 0.0) return x[n];
30 }
31 } else {
32 if (flat_random_number == 1.0) {
33 for (long n = q - 1; n >= 0; n--) {
34 if (f[n] < 1.0) return x[n + 1];
35 }
36 } else {
37 if (flat_random_number <= f[0]) {
38 return flat_random_number / f[0];
39 } else {
40 long nl = 0;
41 long nr = q - 1;
42 long nc;
43 while (nr - nl > 1) {
44 nc = (nr + nl) / 2;
45 if (flat_random_number < f[nc]) {
46 nr = nc;
47 } else {
48 nl = nc;
49 }
50 }
51 const float xl = x[nl + 1];
52 const float xr = x[nr + 1];
53 const float yl = f[nl];
54 const float yr = f[nr];
55 const float a = (xr - xl) / (yr - yl);
56 const float b = xl;
57 return a * (flat_random_number - yl) + b;
58 }
59 }
60 }
61 funnw.ehdr(mcerr);
62 mcerr << "should never happen\n";
64 return 0.0;
65}

Referenced by Heed::HeedPhoton::physics().

◆ convert_DynArr()

template<class T , class X >
void Heed::convert_DynArr ( const DynArr< T > &  s,
DynArr< X > &  d 
)

Definition at line 2511 of file AbsArr.h.

2511 {
2512 mfunnamep(
2513 "template<class T, class X> void convert_DynArr(const DynArr<T>& "
2514 "s, DynArr<X>& d)");
2515 s.check();
2516 d.check();
2517 d = DynArr<X>(s.get_qel(), NULL);
2518 IterDynArr<T> iter(&s);
2519 T* at;
2520 while ((at = iter.more()) != NULL) {
2521 const DynLinArr<long>& ncur = iter.get_ncur();
2522 d.ac(ncur) = X(*at);
2523 }
2524}
void check(void) const
Definition: AbsArr.h:2209
T & ac(long i)
Definition: AbsArr.h:1717

◆ convert_DynLinArr()

template<class T , class X >
void Heed::convert_DynLinArr ( const T &  s,
X &  d 
)

Definition at line 1232 of file AbsArr.h.

1232 {
1233 long q = s.get_qel();
1234 d.put_qel(q);
1235 long n;
1236 for (n = 0; n < q; n++) {
1237 d[n] = X(s[n]);
1238 }
1239}

◆ copy_DynArr()

template<class T , class X >
void Heed::copy_DynArr ( const DynArr< T > &  s,
DynArr< X > &  d 
)

Definition at line 2494 of file AbsArr.h.

2494 {
2495 mfunnamep(
2496 "template<class T, class X> void copy_DynArr(const DynArr<T>& s, "
2497 "DynArr<X>& d)");
2498 s.check();
2499 d.check();
2500 d = DynArr<X>(s.get_qel(), NULL);
2501 IterDynArr<T> iter(&s);
2502 T* at;
2503 while ((at = iter.more()) != NULL) {
2504 const DynLinArr<long>& ncur = iter.get_ncur();
2505 d.ac(ncur) = *at;
2506 }
2507}

Referenced by inverse_DynArr().

◆ copy_DynLinArr()

template<class T , class X >
void Heed::copy_DynLinArr ( const T &  s,
X &  d 
)

Definition at line 1218 of file AbsArr.h.

1218 {
1219 mfunnamep("template<class T, class X> void copy_DynLinArr(const T& s, X& d)");
1220 s.check();
1221 d.check();
1222 long q = s.get_qel();
1223 d.put_qel(q);
1224 long n;
1225 for (n = 0; n < q; n++) {
1226 d[n] = s[n];
1227 }
1228}

◆ cos()

DoubleAc Heed::cos ( const DoubleAc f)

Definition at line 432 of file DoubleAc.cpp.

432 {
433 double d = std::cos(f.get());
434 double di = std::cos(f.left_limit());
435 double da = std::cos(f.right_limit());
436 long n = left_round(f.get() / M_PI - 1.0);
437 long ni = left_round(f.left_limit() / M_PI - 1.0);
438 long na = left_round(f.right_limit() / M_PI - 1.0);
439 if (n % 2 == 0) {
440 // Even number.
441 if (ni < n) {
442 di = -1.0;
443 da = std::max(di, da);
444 if (na > n) {
445 da = 1.0;
446 }
447 } else if (na > n) {
448 da = 1.0;
449 di = std::min(di, da);
450 }
451 } else {
452 // Odd number.
453 double temp = di;
454 di = da;
455 da = temp;
456 if (ni < n) {
457 da = 1.0;
458 di = std::min(di, da);
459 if (na > n) {
460 di = -1.0;
461 }
462 } else if (na > n) {
463 di = -1.0;
464 da = std::max(di, da);
465 }
466 }
467 return DoubleAc(d, di, da);
468}
long left_round(double f)
Definition: minmax.h:45

Referenced by Heed::ElElasticScatDataStruct::CS(), Heed::HeedDeltaElectronCS::HeedDeltaElectronCS(), Heed::HeedDeltaElectron::physics_after_new_speed(), Heed::vec::random_conic_vec(), Heed::vec::random_round_vec(), rnorm_double(), rnorm_float(), and Heed::vec::turn_new().

◆ cos2vec()

vfloat Heed::cos2vec ( const vec r1,
const vec r2 
)

Definition at line 66 of file vec.cpp.

66 {
67 // cosinus of angle between vectors
68 // If one of vectors has zero length, it returns 2.
69 pvecerror("vfloat cos2vec(const vec& r1, const vec& r2)");
70 vfloat lr1 = r1.length2();
71 vfloat lr2 = r2.length2();
72 // mcout<<"cos2vec:\n";
73 // Iprintn(mcout, lr1);
74 // Iprintn(mcout, lr2);
75 if (lr1 == 0 || lr2 == 0) {
76 vecerror = 1;
77 return 0;
78 }
79 vfloat cs = r1 * r2;
80 int sign = 1;
81 if (cs < 0) sign = -1;
82 cs = cs * cs;
83 cs = sign * sqrt(cs / (lr1 * lr2));
84 // mcout<<"r1="<<r1<<"r2="<<r2<<"cos="<<cs<<'\n';
85 return cs;
86 // return r1*r2/(lr1*lr2);
87}
vfloat length2() const
Definition: vec.h:195

Referenced by Heed::spquadr::apos(), Heed::basis::basis(), Heed::splane::check_point_inside(), Heed::splane::check_point_inside1(), Heed::straight::distance(), and Heed::splane::range().

◆ cos_theta_two_part()

double Heed::cos_theta_two_part ( const double  Ep0,
const double  Ep1,
const double  Mp,
const double  Mt 
)

Scattering of moving projectile off a target at rest, cos theta as function of incident and final projectile energy.

Definition at line 16 of file kinem.cpp.

17 {
18 mfunname("double cos_theta_two_part(...)");
19
20 const double Mp2 = Mp * Mp;
21 const double d0 = Ep0 * Ep0 - Mp2;
22 check_econd11(d0, <= 0, mcerr);
23 const double d1 = Ep1 * Ep1 - Mp2;
24 check_econd11(d1, <= 0, mcerr);
25 return (-Ep0 * Mt + Ep0 * Ep1 + Mt * Ep1 - Mp2) / sqrt(d0 * d1);
26}
#define mfunname(string)
Definition: FunNameStack.h:45
DoubleAc sqrt(const DoubleAc &f)
Definition: DoubleAc.cpp:314

◆ cross4pllines()

int Heed::cross4pllines ( const polyline  pl[4],
vfloat  precision,
straight sl,
point  ptc[4][2] 
)

Draws straight line via 4 intervals. Returns 1 if line is drawn and 0 otherwise.

Definition at line 200 of file polyline.cpp.

201 {
202 pvecerror(
203 "int cross4pllines(const polyline pl[4], straight& sl, point ptc[4][2])");
204 int n;
205 straight slpl[4];
206 for (n = 0; n < 4; n++) slpl[n] = pl[n].Gsl(0);
207 point pt[2];
208 pt[0] = (pl[1].Gpt(0).v + pl[1].Gpt(1).v) * 0.5;
209 pt[1] = (pl[2].Gpt(0).v + pl[2].Gpt(1).v) * 0.5;
210 sl = straight(slpl, pt, precision);
211 int type_of_cross;
212 for (n = 0; n < 4; n++) {
213 sl.distance(pl[n].Gsl(0), type_of_cross, ptc[n]);
214 // distance should be little, it need to find points
215 if (pl[n].check_point_in(ptc[n][1], precision) == 0) // check sides
216 return 0;
217 }
218 return 1;
219}
Point.
Definition: vec.h:366
vec v
Definition: vec.h:368
point Gpt(int n) const
Definition: polyline.h:32
Definition of straight line, as combination of vector and point.
Definition: straight.h:24
vfloat distance(const straight &sl, int &type_of_cross, point pt[2]) const
Definition: straight.cpp:137

◆ definp_any_par()

template<class T >
void Heed::definp_any_par ( T &  inp,
const std::string &  word,
const definp_endpar dep,
int  fs_short = 0 
)

Definition at line 55 of file definp.h.

56 {
57 mfunnamep("template< class T > definp_any_par(...)");
58 check_econd11a(dep.istrm->good(), != 1,
59 "before input of variable named " << word << '\n', mcerr);
60 // mcout<<"definp_any_par:\n";
61 // Iprint2n(mcout, word, dep.s_short);
62 if (fs_short == 0)
63 if (dep.s_short == 0)
64 set_position(word, *dep.istrm, dep.s_rewind, dep.s_req_sep);
65 (*(dep.istrm)) >> inp;
66 if (dep.s_print == 1)
67 // Iprintn(mcout, dep.s_print);
68 Imcout << "definp_any_par: " << word << ' ' << inp << '\n';
69 // Iprintn(mcout, inp);
70 check_econd11a(dep.istrm->good(), != 1,
71 "after input of variable named "
72 << word << "\nwhose input value is " << inp << '\n',
73 mcerr);
74}
std::istream * istrm
Definition: definp.h:34
long set_position(const std::string &word, std::istream &istrm, int s_rewind, int s_req_sep)
Definition: definp.cpp:23
#define Imcout
Definition: prstream.h:197

Referenced by operator>>().

◆ definp_int()

int Heed::definp_int ( const std::string &  str)

Definition at line 7 of file definp.cpp.

7 {
8 mfunnamep("int definp_int(const std::string& str)");
9 int i = 0;
10 mcout << "definp_int: starting, read int " << str << "\n";
11 if (str != std::string()) {
12 // search for mark
13 int i_ret = findmark(std::cin, str.c_str());
14 check_econd11(i_ret, != 1, mcerr);
15 }
16 std::cin >> i;
17 Iprintn(mcout, i);
18 check_econd11(std::cin.good(), != 1, mcerr);
19 mcout << "int is read\n";
20 return i;
21}
int findmark(std::istream &file, const char *s)
Definition: findmark.cpp:19

◆ determinant_DynArr() [1/2]

DoubleAc Heed::determinant_DynArr ( const DynArr< DoubleAc > &  mi,
const DynLinArr< int > &  s_var,
long  q 
)

Definition at line 380 of file inverse.cpp.

382 {
383 mfunname("DoubleAc determinant_DynArr(...)");
384 const DynLinArr<long>& miqel(mi.get_qel());
385 check_econd11(miqel.get_qel(), != 2, mcerr);
386 check_econd11(miqel[0], <= 0, mcerr);
387 // check_econd12(miqel[0] , != , miqel[1] , mcerr);
388 if (q == 0) {
389 check_econd12(miqel[0], !=, miqel[1], mcerr);
390 q = miqel[0];
391 } else {
392 check_econd11(miqel[0], < q, mcerr);
393 check_econd11(miqel[1], < q, mcerr);
394 }
395 check_econd12(q, >, s_var.get_qel(), mcerr);
396 long miq = std::min(miqel[0], miqel[1]);
397 long qvar = 0;
398 int s = 1; // sign that all parameters are varied
399 for (long n = 0; n < s_var.get_qel(); n++) {
400 if (s_var[n] == 0) {
401 s = 0;
402 } else {
403 qvar++;
404 if (qvar == q) break;
405 }
406 }
407 if (s == 1) return determinant_DynArr(mi, q);
408
409 check_econd11(qvar, <= 0, mcerr);
410 check_econd11(qvar, < q, mcerr);
411 DynArr<DoubleAc> mi1(q, q);
412 int nv1 = 0;
413 for (int n1 = 0; n1 < miq; n1++) {
414 if (s_var[n1] != 1) continue;
415 int nv2 = 0;
416 for (int n2 = 0; n2 < miq; n2++) {
417 if (s_var[n2] == 1) {
418 mi1.ac(nv1, nv2) = mi.ac(n1, n2);
419 nv2++;
420 if (nv2 >= q) break;
421 }
422 }
423 nv1++;
424 if (nv1 >= q) break;
425 }
426 return determinant_DynArr(mi1, q);
427}
#define check_econd12(a, sign, b, stream)
Definition: FunNameStack.h:163
DoubleAc determinant_DynArr(const DynArr< DoubleAc > &mi, long q)
Definition: inverse.cpp:358

◆ determinant_DynArr() [2/2]

DoubleAc Heed::determinant_DynArr ( const DynArr< DoubleAc > &  mi,
long  q 
)

Definition at line 358 of file inverse.cpp.

358 {
359 mfunname("DoubleAc determinant_DynArr(const DynArr<DoubleAc>& mi, long q)");
360 const DynLinArr<long>& miqel(mi.get_qel());
361 check_econd11(miqel.get_qel(), != 2, mcerr);
362 check_econd11(miqel[0], <= 0, mcerr);
363 if (q == 0) {
364 check_econd12(miqel[0], !=, miqel[1], mcerr);
365 q = miqel[0];
366 } else {
367 check_econd11(miqel[0], < q, mcerr);
368 check_econd11(miqel[1], < q, mcerr);
369 }
370 // serr=0;
371 DynArr<DoubleAc> mii(mi);
372#ifndef ALWAYS_USE_TEMPLATE_PAR_AS_FUN_PAR
373 return abstract_determinant<DynArr<DoubleAc>, DoubleAc>(mii, q);
374#else
375 DoubleAc fict;
376 return abstract_determinant(mii, q, fict);
377#endif
378}
X abstract_determinant(M &mi, long q, X)
Definition: abs_inverse.h:32

Referenced by determinant_DynArr().

◆ e_cont_enloss()

double Heed::e_cont_enloss ( const double  ratio_Z_to_A,
const double  I_eff,
const double  density,
const double  Ekin,
const double  Ecut,
const double  z 
)

Continuous energy loss of electron. Similar to GDRELE from GEANT 3.21 2003, I. Smirnov

Definition at line 23 of file e_cont_enloss.cpp.

28 {
29 mfunname("double e_cont_enloss(...)");
30 const double gamma_1 = Ekin / electron_mass_c2;
31 if (gamma_1 <= 0.0) return 0.;
32 const double gamma = gamma_1 + 1.;
33 const double gamma2 = gamma * gamma;
34
35 const double Tcme = Ecut / electron_mass_c2;
36 const double beta = lorbeta(gamma_1);
37 const double beta2 = beta * beta;
38 // calculation of F^+-
39 double F;
40 if (z > 0) {
41 // positron
42 const double y = 1.0 / (1.0 + gamma);
43 const double D = std::min(Tcme, gamma_1);
44 const double D2 = 0.5 * D * D;
45 const double D3 = 2.0 * D2 * D / 3.0;
46 const double D4 = D2 * D2;
47 F = log(gamma_1 * D) -
48 beta2 * (gamma_1 + 2.0 * D -
49 y * (3.0 * D2 + y * (D - D3 + y * (D2 - gamma_1 * D3 + D4)))) /
50 gamma_1;
51 } else {
52 // electron
53 const double D = std::min(Tcme, 0.5 * gamma_1);
54 F = -1.0 - beta2 + log((gamma_1 - D) * D) + gamma_1 / (gamma_1 - D) +
55 (0.5 * D * D + (1.0 + 2.0 * gamma_1) * log(1.0 - D / gamma_1)) / gamma2;
56 }
57 const double logI = log(I_eff / electron_mass_c2);
58 // Electron density (in 1 / [length^3])
59 const double eldens = ratio_Z_to_A * Avogadro * density;
60 // Dimensionless constant
61 double C = 1.0 + 2.0 * log((I_eff / GeV) /
62 (28.8e-9 * sqrt(density / (gram / cm3) *
63 ratio_Z_to_A * gram / mole)));
64 // Iprintn(mcout, density/(g/cm3));
65 // Iprintn(mcout, ratio_Z_to_A * gram/mole);
66 // Iprintn(mcout, C);
67 double x0, x1;
68 if (density > 0.05 * gram / cm3) {
69 // mcout<<"density > 0.05 * g/cm3\n";
70 if (I_eff < 1.0e-7 * GeV) {
71 if (C < 3.681) {
72 x0 = 1.0;
73 } else {
74 x0 = 0.326 * C - 1.0;
75 }
76 x1 = 2.0;
77 } else {
78 // mcout<<"I_eff >= 1.0e-7 * GeV\n";
79 if (C < 5.215) {
80 // mcout<<"C < 5.215\n";
81 x0 = 0.2;
82 } else {
83 x0 = 0.326 * C - 1.5;
84 }
85 x1 = 3.0;
86 }
87 } else {
88 // mcout<<"density <= 0.05 * g/cm3\n";
89 if (C <= 12.25) {
90 // mcout<<"C <= 12.25\n";
91 double ip = long((C - 10.0) / 0.5) + 1;
92 if (ip < 0) ip = 0;
93 if (ip > 4) ip = 4;
94 x0 = 1.6 + 0.1 * ip;
95 x1 = 4.0;
96 } else {
97 if (C <= 13.804) {
98 x0 = 2.0;
99 x1 = 5.0;
100 } else {
101 x0 = 0.326 * C - 2.5;
102 x1 = 5.0;
103 }
104 }
105 }
106 const double xa = C / 4.606;
107 const double aa = 4.606 * (xa - x0) / pow(x1 - x0, 3);
108 const double x = log(gamma_1 * (gamma + 1.0)) / 4.606;
109 double del = 0.0;
110 if (x > x0) {
111 del = 4.606 * x - C;
112 if (x <= x1) del = del + aa * pow(x1 - x, 3);
113 }
114 const double cons =
115 twopi * classic_electr_radius * classic_electr_radius * electron_mass_c2;
116 // double cons = 0.153536e-3 * GeV * cm2 / Avogadro;
117 double dedx =
118 cons * eldens * (log(2.0 * gamma_1 + 4.0) - 2.0 * logI + F - del) / beta2;
119 return dedx > 0. ? dedx : 0.;
120}
DoubleAc pow(const DoubleAc &f, double p)
Definition: DoubleAc.cpp:337

Referenced by Heed::HeedDeltaElectronCS::HeedDeltaElectronCS().

◆ exp()

DoubleAc Heed::exp ( const DoubleAc f)

Definition at line 377 of file DoubleAc.cpp.

377 {
378 double d = std::exp(f.get());
379 double di = std::exp(f.left_limit());
380 double da = std::exp(f.right_limit());
381 return DoubleAc(d, di, da);
382}

Referenced by pois(), and t_value_exp_2point().

◆ fabs()

◆ find1ofnmark() [1/2]

int Heed::find1ofnmark ( std::istream &  file,
int  q,
char *  s[] 
)

Definition at line 44 of file findmark.cpp.

44 {
45 // mcout<<"find1ofnmark is started\n";
46 // char c;
47 int ic;
48 int *l = new int[q];
49 int *pos_fs = new int[q];
50 int s_init_pos_fs = 0;
51 int i;
52 int l_max = -1;
53 for (i = 0; i < q; i++) {
54 l[i] = strlen(s[i]); // length does not include end symbol
55 if (l[i] > l_max) l_max = l[i];
56 }
57 // l_max++;
58 // Iprintn(mcout, q);
59 // Iprintn(mcout, l_max);
60 char *fs = new char[l_max + 1];
61 // int qfs=0; // number of symbols in fs
62 for (i = 0; i < q; i++) {
63 pos_fs[i] = l_max;
64 }
65 fs[l_max] = '\0';
66 // Iprintn(mcout, file.good());
67 // Iprintn(mcout, file.eof());
68 // Iprintn(mcout, file.fail());
69 // Iprintn(mcout, file.bad());
70 // mcout<<"State:"<< file.rdstate() <<'\n';
71 while ((ic = file.get()) != EOF) {
72 // Iprintn(mcout, ic);
73 for (i = 1; i < l_max; i++) {
74 fs[i - 1] = fs[i];
75 }
76 fs[l_max - 1] = ic; // new symbol
77 if (s_init_pos_fs == 0) { // shift positions
78 int ss = 1;
79 for (i = 0; i < q; i++) {
80 if (l_max - pos_fs[i] < l[i]) {
81 pos_fs[i]--;
82 ss = 0;
83 // mcout<<"s[i]="<<s[i]<<'\n';
84 // mcout<<"i="<<i<<" l_max="<<l_max<<" pos_fs[i]="<<pos_fs[i]
85 // <<" l[i]="<<l[i]<<" "<< &(fs[ pos_fs[i] ])<<'\n';
86 }
87 }
88 if (ss == 1) s_init_pos_fs = 1;
89 }
90 for (i = 0; i < q; i++) {
91 if (strcmp(&(fs[pos_fs[i]]), s[i]) == 0) {
92 delete[] l;
93 delete[] fs;
94 delete[] pos_fs;
95 return i;
96 }
97 }
98 }
99 // Iprintn(mcout, ic);
100 delete[] l;
101 delete[] fs;
102 delete[] pos_fs;
103 return -1;
104}

Referenced by find1ofnmark().

◆ find1ofnmark() [2/2]

int Heed::find1ofnmark ( std::istream &  file,
int  q,
const std::string  str[] 
)

Definition at line 106 of file findmark.cpp.

108{
109 char **s = new char *[q];
110 for (int i = 0; i < q; i++) {
111 s[i] = new char[strlen(str[i].c_str()) + 1];
112 strcpy(s[i], str[i].c_str());
113 }
114 int iret = find1ofnmark(file, q, s);
115 for (int i = 0; i < q; i++) {
116 delete[] s[i];
117 }
118 delete[] s;
119 return iret;
120}

◆ find_max() [1/9]

DoubleAc Heed::find_max ( const DoubleAc a,
const DoubleAc b 
)
inline

Definition at line 654 of file DoubleAc.h.

654 {
655 return (a.get() > b.get() ? a : b);
656}

◆ find_max() [2/9]

DoubleAc Heed::find_max ( const DoubleAc a,
double  b 
)
inline

Definition at line 657 of file DoubleAc.h.

657 {
658 return (a.get() > b ? a : DoubleAc(b));
659}

◆ find_max() [3/9]

DoubleAc Heed::find_max ( const DoubleAc a,
float  b 
)
inline

Definition at line 663 of file DoubleAc.h.

663 {
664 return (a.get() > b ? a : DoubleAc(b));
665}

◆ find_max() [4/9]

DoubleAc Heed::find_max ( const DoubleAc a,
int  b 
)
inline

Definition at line 675 of file DoubleAc.h.

675 {
676 return (a.get() > b ? a : DoubleAc(b));
677}

◆ find_max() [5/9]

DoubleAc Heed::find_max ( const DoubleAc a,
long  b 
)
inline

Definition at line 669 of file DoubleAc.h.

669 {
670 return (a.get() > b ? a : DoubleAc(b));
671}

◆ find_max() [6/9]

DoubleAc Heed::find_max ( double  a,
const DoubleAc b 
)
inline

Definition at line 660 of file DoubleAc.h.

660 {
661 return (a > b.get() ? DoubleAc(a) : b);
662}

◆ find_max() [7/9]

DoubleAc Heed::find_max ( float  a,
const DoubleAc b 
)
inline

Definition at line 666 of file DoubleAc.h.

666 {
667 return (a > b.get() ? DoubleAc(a) : b);
668}

◆ find_max() [8/9]

DoubleAc Heed::find_max ( int  a,
const DoubleAc b 
)
inline

Definition at line 678 of file DoubleAc.h.

678 {
679 return (a > b.get() ? DoubleAc(a) : b);
680}

◆ find_max() [9/9]

DoubleAc Heed::find_max ( long  a,
const DoubleAc b 
)
inline

Definition at line 672 of file DoubleAc.h.

672 {
673 return (a > b.get() ? DoubleAc(a) : b);
674}

◆ find_min() [1/9]

DoubleAc Heed::find_min ( const DoubleAc a,
const DoubleAc b 
)
inline

Definition at line 626 of file DoubleAc.h.

626 {
627 return (a.get() < b.get() ? a : b);
628}

◆ find_min() [2/9]

DoubleAc Heed::find_min ( const DoubleAc a,
double  b 
)
inline

Definition at line 629 of file DoubleAc.h.

629 {
630 return (a.get() < b ? a : DoubleAc(b));
631}

◆ find_min() [3/9]

DoubleAc Heed::find_min ( const DoubleAc a,
float  b 
)
inline

Definition at line 635 of file DoubleAc.h.

635 {
636 return (a.get() < b ? a : DoubleAc(b));
637}

◆ find_min() [4/9]

DoubleAc Heed::find_min ( const DoubleAc a,
int  b 
)
inline

Definition at line 647 of file DoubleAc.h.

647 {
648 return (a.get() < b ? a : DoubleAc(b));
649}

◆ find_min() [5/9]

DoubleAc Heed::find_min ( const DoubleAc a,
long  b 
)
inline

Definition at line 641 of file DoubleAc.h.

641 {
642 return (a.get() < b ? a : DoubleAc(b));
643}

◆ find_min() [6/9]

DoubleAc Heed::find_min ( double  a,
const DoubleAc b 
)
inline

Definition at line 632 of file DoubleAc.h.

632 {
633 return (a < b.get() ? DoubleAc(a) : b);
634}

◆ find_min() [7/9]

DoubleAc Heed::find_min ( float  a,
const DoubleAc b 
)
inline

Definition at line 638 of file DoubleAc.h.

638 {
639 return (a < b.get() ? DoubleAc(a) : b);
640}

◆ find_min() [8/9]

DoubleAc Heed::find_min ( int  a,
const DoubleAc b 
)
inline

Definition at line 650 of file DoubleAc.h.

650 {
651 return (a < b.get() ? DoubleAc(a) : b);
652}

◆ find_min() [9/9]

DoubleAc Heed::find_min ( long  a,
const DoubleAc b 
)
inline

Definition at line 644 of file DoubleAc.h.

644 {
645 return (a < b.get() ? DoubleAc(a) : b);
646}

◆ find_next_comb()

int Heed::find_next_comb ( const DynLinArr< long > &  qel,
DynLinArr< long > &  f 
)

Definition at line 450 of file AbsArr.cpp.

450 {
451 long n;
452 long qdim = qel.get_qel();
453 if (qdim <= 0) return 0;
454 if (qdim != f.get_qel()) return 0; //@@
455#ifdef DEBUG_DYNARR
456 for (n = qdim - 1; n >= 0; n--) {
457 if (f[n] < qel[n] - 1) {
458 f[n]++;
459 return 1;
460 } else {
461 f[n] = 0;
462 } // the first element
463
464 } // it was last combination
465 for (n = 0; n < qdim - 1; n++) f[n] = qel[n] - 1; // the last element
466 f[qdim - 1] = qel[qdim - 1]; // next after last
467#else
468 for (n = qdim - 1; n >= 0; n--) {
469 if (f.acu(n) < qel.acu(n) - 1) {
470 f.acu(n)++;
471 return 1;
472 } else {
473 f.acu(n) = 0;
474 } // the first element
475
476 } // it was last combination
477 for (n = 0; n < qdim - 1; n++) f.acu(n) = qel.acu(n) - 1; // the last element
478 f.acu(qdim - 1) = qel.acu(qdim - 1); // next after last
479#endif
480 return 0;
481}

Referenced by Heed::IterDynArr< T >::more().

◆ find_next_comb_not_less()

int Heed::find_next_comb_not_less ( const DynLinArr< long > &  qel,
DynLinArr< long > &  f 
)

Definition at line 483 of file AbsArr.cpp.

483 {
484 long n;
485 long qdim = qel.get_qel();
486 if (qdim <= 0) return 0;
487 if (qdim != f.get_qel()) return 0; //@@
488 for (n = qdim - 1; n >= 0; n--) {
489 if (f[n] < qel[n] - 1) {
490 f[n]++;
491 int n1;
492 for (n1 = n + 1; n1 < qdim; n1++) f[n1] = f[n];
493 return 1;
494 }
495 } // it was last combination
496 for (n = 0; n < qdim - 1; n++) f[n] = qel[n] - 1; // the last element
497 f[qdim - 1] = qel[qdim - 1]; // next after last
498 return 0;
499}

◆ find_prev_comb()

int Heed::find_prev_comb ( const DynLinArr< long > &  qel,
DynLinArr< long > &  f 
)

Definition at line 501 of file AbsArr.cpp.

501 {
502 long n;
503 long qdim = qel.get_qel();
504 if (qdim <= 0) return 0;
505 if (qdim != f.get_qel()) return 0; //@@
506 for (n = qdim - 1; n >= 0; n--) {
507 if (f[n] >= 1) {
508 f[n]--;
509 return 1;
510 } else {
511 f[n] = qel[n] - 1;
512 } // the last element
513 }
514 for (n = 0; n < qdim - 1; n++) f[n] = 0; // the first element
515 f[qdim - 1] = -1;
516 return 0; // previous before first
517}

Referenced by Heed::IterDynArr< T >::less().

◆ findmark()

int Heed::findmark ( std::istream &  file,
const char *  s 
)

Definition at line 19 of file findmark.cpp.

19 {
20 int ic;
21 int l = strlen(s); // length does not include end symbol
22 char *fs = new char[l + 1];
23 for (int n = 0; n < l; n++) {
24 if ((ic = file.get()) == EOF) {
25 delete[] fs;
26 return 0;
27 }
28 fs[n] = ic;
29 }
30 fs[l] = '\0';
31 while (strcmp(fs, s) != 0) {
32 for (int n = 1; n < l; n++) fs[n - 1] = fs[n];
33 if ((ic = file.get()) == EOF) {
34 delete[] fs;
35 return 0;
36 }
37 fs[l - 1] = ic;
38 fs[l] = '\0';
39 }
40 delete[] fs;
41 return 1;
42}

Referenced by definp_int(), Heed::ElElasticScat::ElElasticScat(), Heed::ElElasticScatLowSigma::ElElasticScatLowSigma(), Heed::ExAtomPhotoAbsCS::ExAtomPhotoAbsCS(), and Heed::SimpleAtomPhotoAbsCS::SimpleAtomPhotoAbsCS().

◆ findmark_a()

template<class T >
int Heed::findmark_a ( std::istream &  file,
ws,
long  qws,
long &  nbeg,
long &  nnext 
)

Definition at line 47 of file findmark.h.

47 {
48 mfunname("int findmark_a(...)");
49 check_econd11(qws, < 1, mcerr);
50 // check_econd12(qws , > , ws.get_qel() , mcerr);
51
52 nbeg = 0;
53 nnext = 0;
54
55 char* s = new char[qws + 1];
56 for (long n = 0; n < qws; n++) s[n] = ws[n];
57 s[qws] = '\0';
58 int ic;
59
60 char* fs = new char[qws + 1];
61 for (long n = 0; n < qws; n++) {
62 if (file.eof() == 1) {
63 delete[] fs;
64 delete[] s;
65 return 0;
66 }
67 ic = file.get();
68 fs[n] = ic;
69 }
70 fs[qws] = '\0';
71 nnext = qws;
72
73 while (strcmp(fs, s) != 0) {
74 for (long n = 1; n < qws; n++) fs[n - 1] = fs[n];
75 if (file.eof() == 1) {
76 delete[] fs;
77 delete[] s;
78 return 0;
79 }
80 ic = file.get();
81 fs[qws - 1] = ic;
82 nbeg++;
83 nnext++;
84 }
85 delete[] fs;
86 delete[] s;
87 return 1;
88}

◆ findmark_b()

template<class T >
int Heed::findmark_b ( std::istream &  file,
ws,
long  qws,
long &  nbeg,
long &  nnext,
char &  prev 
)

Definition at line 91 of file findmark.h.

92 {
93 mfunname("int findmark_b(...)");
94 check_econd11(qws, < 1, mcerr);
95
96 nbeg = 0;
97 nnext = 0;
98 prev = '\0';
99
100 char* s = new char[qws + 1];
101 for (long n = 0; n < qws; n++) s[n] = ws[n];
102 s[qws] = '\0';
103 int ic;
104
105 char* fs = new char[qws + 1];
106 for (long n = 0; n < qws; n++) {
107 if (file.eof() == 1) {
108 delete[] fs;
109 delete[] s;
110 return 0;
111 }
112 ic = file.get();
113 fs[n] = ic;
114 }
115 fs[qws] = '\0';
116 nnext = qws;
117
118 while (strcmp(fs, s) != 0) {
119 prev = fs[0];
120 for (long n = 1; n < qws; n++) fs[n - 1] = fs[n];
121 if (file.eof() == 1) {
122 delete[] fs;
123 delete[] s;
124 return 0;
125 }
126 ic = file.get();
127 fs[qws - 1] = ic;
128 nbeg++;
129 nnext++;
130 }
131 delete[] fs;
132 delete[] s;
133 return 1;
134}

Referenced by set_position().

◆ gconfirm_ind()

int Heed::gconfirm_ind ( const DynLinArr< long > &  qel,
const DynLinArr< long > &  ind 
)

Definition at line 418 of file AbsArr.cpp.

418 {
419 if (qel.get_qel() != ind.get_qel()) {
420 mcerr << "gconfirm_ind(...): "
421 << "qel.get_qel()!= ind.get_qel()\n"
422 << "qel.get_qel()=" << qel.get_qel()
423 << "ind.get_qel()=" << ind.get_qel() << '\n';
424 spexit(mcerr);
425 }
426 long qd = qel.get_qel();
427 // if( ind.get_qel() < qd) qd=ind.get_qel();
428 long n;
429 for (n = 0; n < qd; n++)
430 if (ind[n] < 0 || ind[n] >= qel[n]) return 0;
431 return 1;
432}

Referenced by Heed::DynArr< T >::confirm_ind().

◆ gconfirm_ind_ext()

int Heed::gconfirm_ind_ext ( const DynLinArr< long > &  qel,
const DynLinArr< long > &  ind 
)

Definition at line 433 of file AbsArr.cpp.

433 {
434 if (qel.get_qel() > ind.get_qel()) {
435 mcerr << "gconfirm_ind_ext(...): "
436 << "qel.get_qel()> ind.get_qel()\n"
437 << "qel.get_qel()=" << qel.get_qel()
438 << " ind.get_qel()=" << ind.get_qel() << '\n';
439 spexit(mcerr);
440 }
441 long qd = qel.get_qel();
442 long n;
443 for (n = 0; n < qd; n++)
444 if (ind[n] < 0 || ind[n] >= qel[n]) return 0;
445 for (n = qd; n < ind.get_qel(); n++)
446 if (ind[n] != 0) return 0;
447 return 1;
448}

Referenced by Heed::DynArr< T >::confirm_ind_ext().

◆ ifequal() [1/3]

template<class T >
int Heed::ifequal ( const DynLinArr< T > &  fd1,
const DynLinArr< T > &  fd2,
long  qfirst = -1 
)

Definition at line 1309 of file AbsArr.h.

1310 {
1311 long n;
1312 if (qfirst == -1) {
1313 if ((qfirst = fd1.get_qel()) != fd2.get_qel()) return 0;
1314 // qfirst=fd1.get_qel();
1315 } else {
1316 if (qfirst > fd1.get_qel() || qfirst > fd2.get_qel()) return 0;
1317 }
1318 // Iprintn(mcout, qfirst);
1319 for (n = 0; n < qfirst; n++) {
1320 // Iprint3n(mcout, n, fd1[n], fd2[n]);
1321 if (!(fd1[n] == fd2[n])) return 0;
1322 }
1323 return 1;
1324}

◆ ifequal() [2/3]

template<class T >
int Heed::ifequal ( const DynLinArr< T > &  fd1,
const T *  fd2,
long  qfirst = -1 
)

Definition at line 1328 of file AbsArr.h.

1328 {
1329 long n;
1330 if (qfirst == -1) {
1331 qfirst = fd1.get_qel();
1332 } else {
1333 if (qfirst > fd1.get_qel()) return 0;
1334 }
1335 for (n = 0; n < qfirst; n++)
1336 if (!(fd1[n] == fd2[n])) return 0;
1337 return 1;
1338}

◆ ifequal() [3/3]

template<class T >
int Heed::ifequal ( T *  fd1,
T *  fd2,
long  qfirst 
)

Definition at line 1341 of file AbsArr.h.

1341 {
1342 long n;
1343 for (n = 0; n < qfirst; n++)
1344 if (!(fd1[n] == fd2[n])) return 0;
1345 return 1;
1346}

◆ inverse_DynArr() [1/4]

void Heed::inverse_DynArr ( const DynArr< double > &  mi,
const DynLinArr< int > &  s_var,
DynArr< double > &  mr,
int &  serr 
)

Definition at line 174 of file inverse.cpp.

176 {
177 mfunname(
178 "void inverse_DynArr(const DynArr<double>& mi, const "
179 "DynLinArr<long>& s_var, DynArr<double>& mr, int& serr)");
180 const DynLinArr<long>& miqel(mi.get_qel());
181 check_econd11(miqel.get_qel(), != 2, mcerr);
182 check_econd11(miqel[0], <= 0, mcerr);
183 check_econd12(miqel[0], !=, miqel[1], mcerr);
184 check_econd12(s_var.get_qel(), !=, miqel[0], mcerr);
185
186 long q = s_var.get_qel();
187 long qvar = 0;
188 int s = 1; // sign that all parameters are varied
189 for (long n = 0; n < q; n++) {
190 if (s_var[n] == 0)
191 s = 0;
192 else
193 qvar++;
194 }
195 if (s == 1) {
196 inverse_DynArr(mi, mr, serr);
197 return;
198 }
199 check_econd11(qvar, <= 0, mcerr);
200 DynArr<double> mi1(qvar, qvar);
201 int nv1 = 0;
202 for (int n1 = 0; n1 < q; n1++) {
203 if (s_var[n1] != 1) continue;
204 int nv2 = 0;
205 for (int n2 = 0; n2 < q; n2++) {
206 if (s_var[n2] == 1) {
207 mi1.ac(nv1, nv2) = mi.ac(n1, n2);
208 nv2++;
209 }
210 }
211 nv1++;
212 }
213 DynArr<double> mr1;
214 inverse_DynArr(mi1, mr1, serr);
215 mr = DynArr<double>(q, q);
216 mr.assignAll(0.0);
217 nv1 = 0;
218 for (int n1 = 0; n1 < q; n1++) {
219 if (s_var[n1] != 1) continue;
220 int nv2 = 0;
221 for (int n2 = 0; n2 < q; n2++) {
222 if (s_var[n2] == 1) {
223 mr.ac(n1, n2) = mr1.ac(nv1, nv2);
224 nv2++;
225 }
226 }
227 nv1++;
228 }
229}
void assignAll(const T &val)
Definition: AbsArr.h:2479
void inverse_DynArr(const DynArr< double > &mi, DynArr< double > &mr, int &serr)
Definition: inverse.cpp:99

◆ inverse_DynArr() [2/4]

void Heed::inverse_DynArr ( const DynArr< double > &  mi,
DynArr< double > &  mr,
int &  serr 
)

Definition at line 99 of file inverse.cpp.

99 {
100 mfunname(
101 "void inverse_DynArr(const DynArr<double>& mi, DynArr<double>& mr, "
102 "int& serr)");
103 const DynLinArr<long>& miqel(mi.get_qel());
104 check_econd11(miqel.get_qel(), != 2, mcerr);
105 check_econd11(miqel[0], <= 0, mcerr);
106 check_econd12(miqel[0], !=, miqel[1], mcerr);
107 serr = 0;
108 long q = miqel[0];
109 mr = DynArr<double>(q, q);
110 if (q == 1) {
111 if (mi.ac(0, 0) == 0.0) {
112 serr = 1;
113 return;
114 }
115 mr.ac(0, 0) = 1.0 / mi.ac(0, 0);
116 return;
117 }
118 DynArr<DoubleAc> mii;
119 DynArr<DoubleAc> mrr(q, q);
120 copy_DynArr(mi, mii);
121 mrr.assignAll(0.0);
122 for (long n = 0; n < miqel[0]; n++) mrr.ac(n, n) = 1.0;
123 int szero;
124 inverse_DynArr_prot(mii, mrr, szero, serr);
125 copy_DynArr(mrr, mr);
126}
void inverse_DynArr_prot(const DynArr< DoubleAc > &mi, DynArr< DoubleAc > &mr, int &szero, int &serr, int s_stop)
Definition: inverse.cpp:17
void copy_DynArr(const DynArr< T > &s, DynArr< X > &d)
Definition: AbsArr.h:2494

Referenced by inverse_DynArr().

◆ inverse_DynArr() [3/4]

void Heed::inverse_DynArr ( const DynArr< DoubleAc > &  mi,
const DynLinArr< int > &  s_var,
DynArr< DoubleAc > &  mr1,
int &  szero,
int &  serr1,
DynArr< DoubleAc > &  mr2,
int &  serr2 
)

Pack the matrix, call the same function declared without s_var and unpack the result.

Definition at line 291 of file inverse.cpp.

294 {
295 mfunname(
296 "void inverse_DynArr(const DynArr<DoubleAc>& mi, const "
297 "DynLinArr<long>& s_var, DynArr<DoubleAc>& mr1, int& szero, int& "
298 "serr1, DynArr<DoubleAc>& mr2, int& serr2 )");
299 const DynLinArr<long>& miqel(mi.get_qel());
300 check_econd11(miqel.get_qel(), != 2, mcerr);
301 check_econd11(miqel[0], <= 0, mcerr);
302 check_econd12(miqel[0], !=, miqel[1], mcerr);
303 check_econd12(s_var.get_qel(), !=, miqel[0], mcerr);
304
305 long q = s_var.get_qel();
306 long qvar = 0;
307 int s = 1; // sign that all parameters are varied
308 for (long n = 0; n < q; n++) {
309 if (s_var[n] == 0)
310 s = 0;
311 else
312 qvar++;
313 }
314 if (s == 1) {
315 inverse_DynArr(mi, mr1, szero, serr1, mr2, serr2);
316 return;
317 }
318 check_econd11(qvar, <= 0, mcerr);
319 DynArr<DoubleAc> mi1(qvar, qvar);
320 int nv1 = 0;
321 for (int n1 = 0; n1 < q; n1++) {
322 if (s_var[n1] != 1) continue;
323 int nv2 = 0;
324 for (int n2 = 0; n2 < q; n2++) {
325 if (s_var[n2] == 1) {
326 mi1.ac(nv1, nv2) = mi.ac(n1, n2);
327 nv2++;
328 }
329 }
330 nv1++;
331 }
332 DynArr<DoubleAc> mrr1, mrr2;
333 inverse_DynArr(mi1, mrr1, szero, serr1, mrr2, serr2);
334 mr1 = DynArr<DoubleAc>(q, q);
335 mr1.assignAll(0.0);
336 if (serr1 != 1) {
337 mr2 = DynArr<DoubleAc>(q, q);
338 mr2.assignAll(0.0);
339 }
340 nv1 = 0;
341 for (int n1 = 0; n1 < q; n1++) {
342 if (s_var[n1] == 1) {
343 int nv2 = 0;
344 for (int n2 = 0; n2 < q; n2++) {
345 if (s_var[n2] == 1) {
346 mr1.ac(n1, n2) = mrr1.ac(nv1, nv2);
347 if (serr1 != 1) {
348 mr2.ac(n1, n2) = mrr2.ac(nv1, nv2);
349 }
350 nv2++;
351 }
352 }
353 nv1++;
354 }
355 }
356}

◆ inverse_DynArr() [4/4]

void Heed::inverse_DynArr ( const DynArr< DoubleAc > &  mi,
DynArr< DoubleAc > &  mr1,
int &  szero,
int &  serr1,
DynArr< DoubleAc > &  mr2,
int &  serr2 
)

Call inverse_DynArr_prot two times, first with inbuilt precision and the second time with the given precision. serr1 means the inversion cannot be done in a numerically precise way. In this case mr2 and serr2 are not initialised. If serr1 == 0, mr2 and serr2 are always calculated. If szero == 1, serr1 == 1 too.

Definition at line 128 of file inverse.cpp.

129 {
130 mfunname(
131 "void inverse_DynArr(const DynArr<DoubleAc>& mi, DynArr<DoubleAc>& "
132 "mr1, int& szero, int& serr1, DynArr<DoubleAc>& mr2, int& serr2)");
133 const DynLinArr<long>& miqel(mi.get_qel());
134 check_econd11(miqel.get_qel(), != 2, mcerr);
135 check_econd11(miqel[0], <= 0, mcerr);
136 check_econd12(miqel[0], !=, miqel[1], mcerr);
137 serr1 = 0;
138 serr2 = 0;
139 long q = miqel[0];
140 // mr = DynArr<DoubleAc>(miqel[0], miqel[0]);
141 if (q == 1) {
142 if (mi.ac(0, 0).get() == 0.0) {
143 serr1 = 1;
144 return;
145 }
146 mr1 = DynArr<DoubleAc>(q, q);
147 mr2 = DynArr<DoubleAc>(q, q);
148 mr1.ac(0, 0) = 1.0 / mi.ac(0, 0).get();
149 mr2.ac(0, 0) = DoubleAc(1.0) / mi.ac(0, 0);
150 if (fabs(mr2.ac(0, 0)).left_limit() == 0.0) serr2 = 1;
151 return;
152 }
153
154 DynArr<DoubleAc> mii(q, q);
155 for (long n1 = 0; n1 < q; n1++) {
156 for (long n2 = 0; n2 < q; n2++) {
157 mii.ac(n1, n2) = double(mi.ac(n1, n2));
158 }
159 }
160 DynArr<DoubleAc> mrr(q, q);
161 mrr.assignAll(0.0);
162 for (long n = 0; n < q; n++) mrr.ac(n, n) = 1.0;
163 inverse_DynArr_prot(mii, mrr, szero, serr1, 0);
164 copy_DynArr(mrr, mr1);
165 if (szero != 0) return;
166 mii = mi;
167 mrr.assignAll(0.0);
168 for (long n = 0; n < q; n++) mrr.ac(n, n) = DoubleAc(1.0);
169 inverse_DynArr_prot(mii, mrr, szero, serr2, 0);
170 check_econd11(szero, != 0, mcerr);
171 copy_DynArr(mrr, mr2);
172}

◆ inverse_DynArr_prot() [1/2]

void Heed::inverse_DynArr_prot ( const DynArr< DoubleAc > &  mi,
const DynLinArr< int > &  s_var,
DynArr< DoubleAc > &  mr,
int &  szero,
int &  serr,
int  s_stop 
)

Definition at line 231 of file inverse.cpp.

234 {
235 mfunname(
236 "void inverse_DynArr_prot(const DynArr<DoubleAc>& mi, const "
237 "DynLinArr<long>& s_var, DynArr<DoubleAc>& mr, int& szero, int& "
238 "serr, int s_stop=1)");
239 const DynLinArr<long>& miqel(mi.get_qel());
240 check_econd11(miqel.get_qel(), != 2, mcerr);
241 check_econd11(miqel[0], <= 0, mcerr);
242 check_econd12(miqel[0], !=, miqel[1], mcerr);
243 check_econd12(s_var.get_qel(), !=, miqel[0], mcerr);
244
245 long q = s_var.get_qel();
246
247 long qvar = 0;
248 int s = 1; // sign that all parameters are varied
249 for (long n = 0; n < q; n++) {
250 if (s_var[n] == 0)
251 s = 0;
252 else
253 qvar++;
254 }
255 if (s == 1) {
256 inverse_DynArr_prot(mi, mr, szero, serr, s_stop);
257 return;
258 }
259 check_econd11(qvar, <= 0, mcerr);
260 DynArr<DoubleAc> mi1(qvar, qvar);
261 int nv1 = 0;
262 for (int n1 = 0; n1 < q; n1++) {
263 if (s_var[n1] != 1) continue;
264 int nv2 = 0;
265 for (int n2 = 0; n2 < q; n2++) {
266 if (s_var[n2] == 1) {
267 mi1.ac(nv1, nv2) = mi.ac(n1, n2);
268 nv2++;
269 }
270 }
271 nv1++;
272 }
273 DynArr<DoubleAc> mr1;
274 inverse_DynArr_prot(mi1, mr1, szero, serr, s_stop);
275 mr = DynArr<DoubleAc>(q, q);
276 mr.assignAll(0.0);
277 nv1 = 0;
278 for (int n1 = 0; n1 < q; n1++) {
279 if (s_var[n1] != 1) continue;
280 int nv2 = 0;
281 for (int n2 = 0; n2 < q; n2++) {
282 if (s_var[n2] == 1) {
283 mr.ac(n1, n2) = mr1.ac(nv1, nv2);
284 nv2++;
285 }
286 }
287 nv1++;
288 }
289}

◆ inverse_DynArr_prot() [2/2]

void Heed::inverse_DynArr_prot ( const DynArr< DoubleAc > &  mi,
DynArr< DoubleAc > &  mr,
int &  szero,
int &  serr,
int  s_stop = 1 
)

Matrix inversion szero == 1 indicates that the calculations are terminated owing to an attempt to divide by 0. The final matrix is not correct. serr == 1 indicates that the interval precision is broken (but the final matrix may be provided if szero=0). s_stop is a directive to stop if the interval precision is broken.

Definition at line 17 of file inverse.cpp.

18 {
20 "void inverse_DynArr_prot(const DynArr<DoubleAc>& mi, "
21 "DynArr<DoubleAc>& mr, int& s_zero, int& serr, int s_stop)");
22 // mcout<<"inverse_DynArr_prot:\n";
23 const DynLinArr<long>& miqel(mi.get_qel());
24 check_econd11(miqel.get_qel(), != 2, mcerr);
25 check_econd11(miqel[0], <= 0, mcerr);
26 check_econd12(miqel[0], !=, miqel[1], mcerr);
27 serr = 0;
28 szero = 0;
29 long q = miqel[0];
30 mr = DynArr<DoubleAc>(q, q);
31 if (q == 1) {
32 if (mi.ac(0, 0).get() == 0.0) {
33 szero = 1;
34 serr = 1;
35 return;
36 }
37 mr.ac(0, 0) = 1.0 / mi.ac(0, 0);
38 if (fabs(mr.ac(0, 0)).left_limit() == 0) {
39 serr = 1;
40 }
41 return;
42 }
43 DynArr<DoubleAc> mii(mi);
44 mr.assignAll(0.0);
45 for (long n = 0; n < q; n++) mr.ac(n, n) = DoubleAc(1.0);
46
47 for (long nr = 0; nr < q; nr++) {
48 // Iprintn(mcout, nr);
49 long nmax = 0;
50 DoubleAc d(0.0);
51 for (long nr1 = nr; nr1 < q; nr1++) {
52 if (fabs(mii.ac(nr1, nr)) > d) {
53 d = fabs(mii.ac(nr1, nr));
54 nmax = nr1;
55 }
56 }
57 // mcout<<"d="<<d<<'\n';
58 // mcout<<"nmax="<<nmax<<'\n';
59 if (d.get() == 0.0) {
60 szero = 1;
61 serr = 1;
62 return;
63 }
64 if (d.left_limit() == 0) {
65 serr = 1;
66 if (s_stop == 1) return;
67 }
68 if (nmax > nr) {
69 for (long nc = nr; nc < q; nc++) {
70 DoubleAc t(mii.ac(nr, nc));
71 mii.ac(nr, nc) = mii.ac(nmax, nc);
72 mii.ac(nmax, nc) = t;
73 }
74 for (long nc = 0; nc < q; nc++) {
75 DoubleAc t(mr.ac(nr, nc));
76 mr.ac(nr, nc) = mr.ac(nmax, nc);
77 mr.ac(nmax, nc) = t;
78 }
79 }
80 DoubleAc t = mii.ac(nr, nr);
81 for (long nr1 = 0; nr1 < q; nr1++) {
82 if (nr1 != nr) {
83 DoubleAc k(mii.ac(nr1, nr) / t);
84 // mcout<<"nr1="<<nr1<<" nr="<<nr<<'\n';
85 // mcout<<"k="<<k<<'\n';
86 for (long nc = nr; nc < q; nc++) {
87 mii.ac(nr1, nc) -= k * mii.ac(nr, nc);
88 }
89 for (long nc = 0; nc < q; nc++) {
90 mr.ac(nr1, nc) -= k * mr.ac(nr, nc);
91 }
92 }
93 }
94 for (long nc = nr; nc < q; nc++) mii.ac(nr, nc) /= t;
95 for (long nc = 0; nc < q; nc++) mr.ac(nr, nc) /= t;
96 }
97}

Referenced by inverse_DynArr(), inverse_DynArr_prot(), and Heed::Parabol::Parabol().

◆ left_round()

long Heed::left_round ( double  f)
inline

Definition at line 45 of file minmax.h.

45 {
46 return f >= 0 ? long(f) : -long(-f) - 1;
47}

Referenced by cos(), and sin().

◆ lorbeta() [1/2]

double Heed::lorbeta ( const double  gamma_1)

◆ lorbeta() [2/2]

double Heed::lorbeta ( const double  momentum,
const double  mass 
)

Definition at line 32 of file lorgamma.cpp.

32 {
33 double x = (mass * mass * c_squared) / (momentum * momentum);
34 x = x + 1.0;
35 return sqrt(1. / x);
36}

◆ lorbeta2()

double Heed::lorbeta2 ( const double  gamma_1)

$\beta^2$ as function of $\gamma - 1$.

Definition at line 27 of file lorgamma.cpp.

27 {
28 const double g = gamma_1 + 1;
29 return (gamma_1 * (gamma_1 + 2.)) / (g * g);
30}

Referenced by Heed::ElElasticScat::get_CS_Rutherford().

◆ lorgamma_1()

double Heed::lorgamma_1 ( double  beta)

$\gamma - 1$ as function of $\beta$.

Definition at line 10 of file lorgamma.cpp.

10 {
11 if (beta == 0.0) return 0.0;
12 if (beta >= 1.0) {
13 mcout << "double lorgamma_1(double beta): ERROR: beta>=1.0, beta=" << beta
14 << "\n";
16 }
17 beta *= beta;
18 const double g2_1 = beta / (1. - beta);
19 const double gam = sqrt(g2_1 + 1.);
20 return g2_1 / (gam + 1.);
21}

Referenced by Bethe_Bloch_energy_loss(), and Heed::mparticle::mparticle().

◆ merge()

template<class T >
DynLinArr< T > Heed::merge ( const DynLinArr< T > &  fd1,
long  qfd1,
const DynLinArr< T > &  fd2,
long  qfd2 
)

Definition at line 1349 of file AbsArr.h.

1350 {
1351 long n;
1352 if (qfd1 < 0) {
1353 qfd1 = fd1.get_qel();
1354 }
1355 if (qfd2 < 0) {
1356 qfd2 = fd2.get_qel();
1357 }
1358 DynLinArr<T> ret(qfd1 + qfd2);
1359 if (qfd1 + qfd2 == 0) return ret;
1360 for (n = 0; n < qfd1; n++) {
1361 ret[n] = fd1[n];
1362 }
1363 for (n = 0; n < qfd2; n++) {
1364 ret[qfd1 + n] = fd2[n];
1365 }
1366 return ret;
1367}

◆ noindent()

◆ operator!=() [1/4]

template<class T >
int Heed::operator!= ( const DynArr< T > &  f1,
const DynArr< T > &  f2 
)

Definition at line 2472 of file AbsArr.h.

2472 {
2473 if (f1.get_qel() == f2.get_qel()) return 0;
2474 if (f1.get_el() == f2.get_el()) return 0;
2475 return 1;
2476}

◆ operator!=() [2/4]

template<class T >
int Heed::operator!= ( const DynLinArr< T > &  f1,
const DynLinArr< T > &  f2 
)

Definition at line 2450 of file AbsArr.h.

2450 {
2451 if (f1 == f2)
2452 return 0;
2453 else
2454 return 1;
2455}

◆ operator!=() [3/4]

template<class T >
int Heed::operator!= ( const EqualStepCoorMesh< T > &  f1,
const EqualStepCoorMesh< T > &  f2 
)

Definition at line 268 of file tline.h.

268 {
269 if (f1.get_qi() != f2.get_qi() || f1.get_xmin() != f2.get_xmin() ||
270 f1.get_xmax() != f2.get_xmax())
271 return 1;
272 else
273 return 0;
274}

◆ operator!=() [4/4]

int Heed::operator!= ( manip_absvol_treeid tid1,
manip_absvol_treeid tid2 
)
inline

Definition at line 61 of file volume.h.

61 {
62 if (tid1 == tid2) return 0;
63 return 1;
64}

◆ operator*() [1/20]

DoubleAc Heed::operator* ( const DoubleAc f1,
const DoubleAc f2 
)
inline

Definition at line 523 of file DoubleAc.h.

523 {
524 DoubleAc t = f1;
525 t *= f2;
526 return t;
527}

◆ operator*() [2/20]

DoubleAc Heed::operator* ( const DoubleAc f1,
double  f2 
)
inline

Definition at line 528 of file DoubleAc.h.

528 {
529 DoubleAc t = f1;
530 t *= f2;
531 return t;
532}

◆ operator*() [3/20]

DoubleAc Heed::operator* ( const DoubleAc f1,
float  f2 
)
inline

Definition at line 538 of file DoubleAc.h.

538 {
539 DoubleAc t = f1;
540 t *= f2;
541 return t;
542}

◆ operator*() [4/20]

DoubleAc Heed::operator* ( const DoubleAc f1,
int  f2 
)
inline

Definition at line 558 of file DoubleAc.h.

558 {
559 DoubleAc t = f1;
560 t *= f2;
561 return t;
562}

◆ operator*() [5/20]

DoubleAc Heed::operator* ( const DoubleAc f1,
long  f2 
)
inline

Definition at line 548 of file DoubleAc.h.

548 {
549 DoubleAc t = f1;
550 t *= f2;
551 return t;
552}

◆ operator*() [6/20]

DynLinArr< DoubleAc > Heed::operator* ( const DynArr< double > &  mt,
const DynLinArr< DoubleAc > &  vc 
)

Definition at line 37 of file multiply.cpp.

38 {
40 "DynLinArr<DoubleAc> operator*(const DynArr<double>& mt, const "
41 "DynLinArr<DoubleAc>& vc)");
42
43 const DynLinArr<long>& qel_mt(mt.get_qel());
44 check_econd11(qel_mt.get_qel(), != 2, mcerr);
45 const long q = vc.get_qel();
46 check_econd12(q, !=, qel_mt[1], mcerr);
47 DoubleAc s(0); // assumes that this clears the element
48 DynLinArr<DoubleAc> res(qel_mt[0], s);
49 for (long n1 = 0; n1 < qel_mt[0]; n1++) {
50 for (long n2 = 0; n2 < q; n2++) {
51 res.acu(n1) += mt.acu(n1, n2) * vc.acu(n2);
52 }
53 }
54 return res;
55}
T & acu(long i1)
Definition: AbsArr.h:1737

◆ operator*() [7/20]

DynLinArr< DoubleAc > Heed::operator* ( const DynArr< DoubleAc > &  mt,
const DynLinArr< double > &  vc 
)

Definition at line 17 of file multiply.cpp.

18 {
20 "DynLinArr<DoubleAc> operator*(const DynArr<DoubleAc>& mt, const "
21 "DynLinArr<double>& vc)");
22
23 const DynLinArr<long>& qel_mt(mt.get_qel());
24 check_econd11(qel_mt.get_qel(), != 2, mcerr);
25 const long q = vc.get_qel();
26 check_econd12(q, !=, qel_mt[1], mcerr);
27 DoubleAc s(0); // assumes that this clears the element
28 DynLinArr<DoubleAc> res(qel_mt[0], s);
29 for (long n1 = 0; n1 < qel_mt[0]; n1++) {
30 for (long n2 = 0; n2 < q; n2++) {
31 res.acu(n1) += mt.acu(n1, n2) * vc.acu(n2);
32 }
33 }
34 return res;
35}

◆ operator*() [8/20]

template<class T >
DynLinArr< T > Heed::operator* ( const DynArr< T > &  mt,
const DynLinArr< T > &  vc 
)

Definition at line 66 of file multiply.h.

66 {
67 const DynLinArr<long>& qel_mt(mt.get_qel());
68 if (qel_mt.get_qel() != 2) {
69 mcerr << "template<class T>\n"
70 << "DynLinArr<T> operator*(const DynArr<T>& mt, "
71 << "const DynLinArr<T>& vc):\n";
72 mcerr << "qel_mt.get_qel() != 2, qel_mt.get_qel() =" << qel_mt.get_qel()
73 << '\n';
75 }
76 long q = vc.get_qel();
77 if (q != qel_mt[1]) {
78 mcerr << "template<class T>\n"
79 << "DynLinArr<T> operator*(const DynArr<T>& mt, "
80 << "const DynLinArr<T>& vc):\n";
81 mcerr << "q != qel_mt[1], q =" << q << "qel_mt[1]=" << qel_mt[1] << '\n';
83 }
84 T s(0); // assumes that this clears the element
85 DynLinArr<T> res(qel_mt[0], s);
86 for (long n1 = 0; n1 < qel_mt[0]; n1++) {
87 for (long n2 = 0; n2 < q; n2++) {
88 res[n1] += mt.acu(n1, n2) * vc.acu(n2);
89 }
90 }
91 return res;
92}

◆ operator*() [9/20]

template<class T , class X >
DynArr< T > Heed::operator* ( const DynArr< T > &  mt,
const X &  t 
)

Definition at line 184 of file multiply.h.

184 {
185 mfunnamep(
186 "template<class T, class X> DynArr<T> operator*(const DynArr<T>& "
187 "mt, const X& t)");
188 DynArr<T> ms(mt.get_qel(), NULL);
189 const long qel_lin = mt.get_qel_lin();
190 for (long n = 0; n < qel_lin; n++) {
191 ms.acu_lin(n) = mt.acu_lin(n) * t;
192 }
193 return ms;
194}

◆ operator*() [10/20]

template<class T >
DynArr< T > Heed::operator* ( const DynArr< T > &  mt1,
const DynArr< T > &  mt2 
)

Definition at line 25 of file multiply.h.

25 {
27 "template<class T> DynArr<T> operator*(const DynArr<T>& mt1, const "
28 "DynArr<T>& mt2)");
29 check_econd11(mt1.get_qdim(), != 2, mcerr);
30 check_econd11(mt2.get_qdim(), > 2, mcerr);
31 check_econd11(mt2.get_qdim(), < 1, mcerr);
32 const DynLinArr<long>& qel_mt1(mt1.get_qel());
33 const DynLinArr<long>& qel_mt2(mt2.get_qel());
34 check_econd12(qel_mt1[1], !=, qel_mt2[0], mcerr);
35 if (mt2.get_qdim() == 2) { // otherwise 1
36 long q1 = qel_mt1[0];
37 long q2 = qel_mt2[1];
38 long q3 = qel_mt1[1];
39 DynArr<T> res(q1, q2);
40 for (long n1 = 0; n1 < q1; ++n1) {
41 for (long n2 = 0; n2 < q2; ++n2) {
42 T t(0.0);
43 for (long n3 = 0; n3 < q3; ++n3) {
44 t += mt1.acu(n1, n3) * mt2.acu(n3, n2);
45 }
46 res.acu(n1, n2) = t;
47 }
48 }
49 return res;
50 } else {
51 long q1 = qel_mt1[0];
52 long q3 = qel_mt1[1];
53 DynArr<T> res(q1);
54 for (long n1 = 0; n1 < q1; ++n1) {
55 T t(0.0);
56 for (long n3 = 0; n3 < q3; ++n3) {
57 t += mt1.acu(n1, n3) * mt2.acu(n3);
58 }
59 res.acu(n1) = t;
60 }
61 return res;
62 }
63}
long get_qdim(void) const
Definition: AbsArr.h:2168

◆ operator*() [11/20]

DoubleAc Heed::operator* ( const DynLinArr< double > &  vc1,
const DynLinArr< DoubleAc > &  vc2 
)

Definition at line 73 of file multiply.cpp.

74 {
76 "DoubleAc operator*(const DynLinArr<double>& vc1, const "
77 "DynLinArr<DoubleAc>& vc2)");
78 const long q1 = vc1.get_qel();
79 const long q2 = vc2.get_qel();
80 check_econd12(q1, !=, q2, mcerr);
81 DoubleAc s(0); // assumes that this clears the element
82 for (long n = 0; n < q1; n++) {
83 s += vc1.acu(n) * vc2.acu(n);
84 // mcout<<"vc1[n]="<<vc1[n]<<'\n';
85 // mcout<<"vc2[n]="<<vc2[n]<<'\n';
86 // mcout<<"vc1[n] * vc2[n]="<<vc1[n] * vc2[n]<<'\n';
87 // mcout<<"s="<<s<<'\n';
88 }
89 return s;
90}

◆ operator*() [12/20]

DoubleAc Heed::operator* ( const DynLinArr< DoubleAc > &  vc1,
const DynLinArr< double > &  vc2 
)

Definition at line 57 of file multiply.cpp.

58 {
60 "DoubleAc operator*(const DynLinArr<DoubleAc>& vc1, const "
61 "DynLinArr<double>& vc2)");
62
63 const long q1 = vc1.get_qel();
64 const long q2 = vc2.get_qel();
65 check_econd12(q1, !=, q2, mcerr);
66 DoubleAc s(0); // assumes that this clears the element
67 for (long n = 0; n < q1; n++) {
68 s += vc1.acu(n) * vc2.acu(n);
69 }
70 return s;
71}

◆ operator*() [13/20]

template<class T , class X >
DynLinArr< T > Heed::operator* ( const DynLinArr< T > &  ar,
const X &  t 
)

Definition at line 129 of file multiply.h.

129 {
130 const long q = ar.get_qel();
131 DynLinArr<T> res(q);
132 for (long n = 0; n < q; n++) {
133 res.acu(n) = ar.acu(n) * t;
134 }
135 return res;
136}

◆ operator*() [14/20]

template<class T >
T Heed::operator* ( const DynLinArr< T > &  vc1,
const DynLinArr< T > &  vc2 
)

Definition at line 100 of file multiply.h.

100 {
101 // mcout<<"T operator*(const DynLinArr<T>& vc1, const DynLinArr<T>& vc2):\n";
102 long q1 = vc1.get_qel();
103 long q2 = vc2.get_qel();
104 if (q1 != q2) {
105 mcerr << "template<class T>\n"
106 << "DynLinArr<T> operator*(const DynArr<T>& mt, "
107 << "const DynLinArr<T>& vc):\n";
108 mcerr << "q1 != q2, q1 =" << q1 << "q2=" << q2 << '\n';
109 spexit(mcerr);
110 }
111 T s(0); // assumes that this clears the element
112 // mcout<<"s="<<s<<'\n';
113 for (long n = 0; n < q1; n++) {
114 s += vc1.acu(n) * vc2.acu(n);
115 // mcout<<"vc1[n]="<<vc1[n]<<'\n';
116 // mcout<<"vc2[n]="<<vc2[n]<<'\n';
117 // mcout<<"vc1[n] * vc2[n]="<<vc1[n] * vc2[n]<<'\n';
118 // mcout<<"s="<<s<<'\n';
119 }
120 return s;
121}

◆ operator*() [15/20]

template<class T , class X >
DynArr< T > Heed::operator* ( const X &  t,
const DynArr< T > &  mt 
)

Definition at line 197 of file multiply.h.

197 {
198 mfunnamep(
199 "template<class T, class X> DynArr<T> operator*(const X& t, const "
200 "DynArr<T>& mt)");
201 DynArr<T> ms(mt.get_qel(), NULL);
202 const long qel_lin = mt.get_qel_lin();
203 for (long n = 0; n < qel_lin; n++) {
204 ms.acu_lin(n) = t * mt.acu_lin(n);
205 }
206 return ms;
207}

◆ operator*() [16/20]

template<class T , class X >
DynLinArr< T > Heed::operator* ( const X &  t,
const DynLinArr< T > &  ar 
)

Definition at line 148 of file multiply.h.

148 {
149 mfunnamep(
150 "template<class T, class X> DynLinArr<T> operator*(const X& t, "
151 "const DynLinArr<T>& ar)");
152 const long q = ar.get_qel();
153 DynLinArr<T> res(q);
154 for (long n = 0; n < q; n++) {
155 res.acu(n) = t * ar.acu(n);
156 }
157 return res;
158}

◆ operator*() [17/20]

DoubleAc Heed::operator* ( double  f1,
const DoubleAc f2 
)
inline

Definition at line 533 of file DoubleAc.h.

533 {
534 DoubleAc t = f2;
535 t *= f1;
536 return t;
537}

◆ operator*() [18/20]

DoubleAc Heed::operator* ( float  f1,
const DoubleAc f2 
)
inline

Definition at line 543 of file DoubleAc.h.

543 {
544 DoubleAc t = f2;
545 t *= f1;
546 return t;
547}

◆ operator*() [19/20]

DoubleAc Heed::operator* ( int  f1,
const DoubleAc f2 
)
inline

Definition at line 563 of file DoubleAc.h.

563 {
564 DoubleAc t = f2;
565 t *= f1;
566 return t;
567}

◆ operator*() [20/20]

DoubleAc Heed::operator* ( long  f1,
const DoubleAc f2 
)
inline

Definition at line 553 of file DoubleAc.h.

553 {
554 DoubleAc t = f2;
555 t *= f1;
556 return t;
557}

◆ operator*=() [1/2]

template<class T , class X >
DynArr< T > & Heed::operator*= ( DynArr< T > &  mt,
const X &  t 
)

Definition at line 210 of file multiply.h.

210 {
211 mfunnamep(
212 "template<class T, class X> DynArr<T>& operator*=(DynArr<T>& mt, "
213 "const X& t)");
214 const long qel_lin = mt.get_qel_lin();
215 for (long n = 0; n < qel_lin; n++) {
216 mt.acu_lin(n) *= t;
217 }
218 return mt;
219}

◆ operator*=() [2/2]

template<class T , class X >
DynLinArr< T > & Heed::operator*= ( DynLinArr< T > &  ar,
const X &  t 
)

Definition at line 139 of file multiply.h.

139 {
140 const long q = ar.get_qel();
141 for (long n = 0; n < q; n++) {
142 ar.acu(n) *= t;
143 }
144 return ar;
145}

◆ operator+() [1/15]

DoubleAc Heed::operator+ ( const DoubleAc f1,
const DoubleAc f2 
)
inline

Definition at line 431 of file DoubleAc.h.

431 {
432 DoubleAc t = f1;
433 t += f2;
434 return t;
435}

◆ operator+() [2/15]

DoubleAc Heed::operator+ ( const DoubleAc f1,
double  f2 
)
inline

Definition at line 436 of file DoubleAc.h.

436 {
437 DoubleAc t = f1;
438 t += f2;
439 return t;
440}

◆ operator+() [3/15]

DoubleAc Heed::operator+ ( const DoubleAc f1,
float  f2 
)
inline

Definition at line 446 of file DoubleAc.h.

446 {
447 DoubleAc t = f1;
448 t += f2;
449 return t;
450}

◆ operator+() [4/15]

DoubleAc Heed::operator+ ( const DoubleAc f1,
int  f2 
)
inline

Definition at line 466 of file DoubleAc.h.

466 {
467 DoubleAc t = f1;
468 t += f2;
469 return t;
470}

◆ operator+() [5/15]

DoubleAc Heed::operator+ ( const DoubleAc f1,
long  f2 
)
inline

Definition at line 456 of file DoubleAc.h.

456 {
457 DoubleAc t = f1;
458 t += f2;
459 return t;
460}

◆ operator+() [6/15]

DynArr< DoubleAc > Heed::operator+ ( const DynArr< double > &  mt1,
const DynArr< DoubleAc > &  mt2 
)

Definition at line 189 of file multiply.cpp.

190 {
191 mfunname(
192 "DynArr<DoubleAc> operator+(const DynArr<double>& mt1, const "
193 "DynArr<DoubleAc>& mt2)");
194 long qdim1 = mt1.get_qdim();
195 long qdim2 = mt2.get_qdim();
196 check_econd12(qdim1, !=, qdim2, mcerr);
197 const DynLinArr<long>& qe1 = mt1.get_qel();
198 const DynLinArr<long>& qe2 = mt2.get_qel();
199 check_econd12(qe1, !=, qe2, mcerr);
200 DynArr<DoubleAc> ms(mt2);
201 IterDynArr<DoubleAc> iter(&ms);
202 DoubleAc* at;
203 while ((at = iter.more()) != NULL) {
204 (*at) = (*at) + mt1.acu(iter.get_ncur());
205 }
206 return ms;
207}

◆ operator+() [7/15]

DynArr< DoubleAc > Heed::operator+ ( const DynArr< DoubleAc > &  mt1,
const DynArr< double > &  mt2 
)

Definition at line 150 of file multiply.cpp.

151 {
152 mfunname(
153 "DynArr<DoubleAc> operator+(const DynArr<DoubleAc>& mt1, const "
154 "DynArr<double>& mt2)");
155 const long qdim1 = mt1.get_qdim();
156 const long qdim2 = mt2.get_qdim();
157 check_econd12(qdim1, !=, qdim2, mcerr);
158 const DynLinArr<long>& qe1 = mt1.get_qel();
159 const DynLinArr<long>& qe2 = mt2.get_qel();
160 check_econd12(qe1, !=, qe2, mcerr);
161 DynArr<DoubleAc> ms(mt1);
162 IterDynArr<DoubleAc> iter(&ms);
163 DoubleAc* at;
164 while ((at = iter.more()) != NULL) {
165 (*at) = (*at) + mt2.acu(iter.get_ncur());
166 }
167 return ms;
168}

◆ operator+() [8/15]

template<class T >
DynArr< T > Heed::operator+ ( const DynArr< T > &  mt1,
const DynArr< T > &  mt2 
)

Definition at line 372 of file multiply.h.

372 {
373 mfunnamep(
374 "template<class T> DynArr<T> operator+(const DynArr<T>& mt1, const "
375 "DynArr<T>& mt2)");
376 long qdim1 = mt1.get_qdim();
377 long qdim2 = mt2.get_qdim();
378 check_econd12(qdim1, !=, qdim2, mcerr);
379 const DynLinArr<long>& qe1 = mt1.get_qel();
380 const DynLinArr<long>& qe2 = mt2.get_qel();
381 check_econd12(qe1, !=, qe2, mcerr);
382 DynArr<T> ms(mt1.get_qel(), NULL);
383 const long qel_lin = mt1.get_qel_lin();
384 for (long n = 0; n < qel_lin; n++) {
385 ms.acu_lin(n) = mt1.acu_lin(n) + mt2.acu_lin(n);
386 }
387 return ms;
388}

◆ operator+() [9/15]

DynLinArr< DoubleAc > Heed::operator+ ( const DynLinArr< double > &  vc1,
const DynLinArr< DoubleAc > &  vc2 
)

Definition at line 121 of file multiply.cpp.

122 {
123 mfunname(
124 "DoubleAc operator+(const DynLinArr<double>& vc1, const "
125 "DynLinArr<DoubleAc>& vc2)");
126 const long q1 = vc1.get_qel();
127 const long q2 = vc2.get_qel();
128 check_econd12(q1, !=, q2, mcerr);
130 for (long n = 0; n < q1; n++) {
131 s.acu(n) = vc1.acu(n) + vc2.acu(n);
132 }
133 return s;
134}

◆ operator+() [10/15]

DynLinArr< DoubleAc > Heed::operator+ ( const DynLinArr< DoubleAc > &  vc1,
const DynLinArr< double > &  vc2 
)

Definition at line 92 of file multiply.cpp.

93 {
95 "DoubleAc operator+(const DynLinArr<DoubleAc>& vc1, const "
96 "DynLinArr<double>& vc2)");
97 const long q1 = vc1.get_qel();
98 const long q2 = vc2.get_qel();
99 check_econd12(q1, !=, q2, mcerr);
101 for (long n = 0; n < q1; n++) {
102 s.acu(n) = vc1.acu(n) + vc2.acu(n);
103 }
104 return s;
105}

◆ operator+() [11/15]

template<class T >
DynLinArr< T > Heed::operator+ ( const DynLinArr< T > &  vc1,
const DynLinArr< T > &  vc2 
)

Definition at line 249 of file multiply.h.

249 {
250 long q1 = vc1.get_qel();
251 long q2 = vc2.get_qel();
252 if (q1 != q2) {
253 mcerr << "template<class T>\n"
254 << "DynLinArr<T> operator+(const DynLinArr<T>& vc1, "
255 << "const DynLinArr<T>& vc2):\n";
256 mcerr << "q1 != q2, q1 =" << q1 << "q2=" << q2 << '\n';
257 spexit(mcerr);
258 }
259 DynLinArr<T> s(q1);
260 for (long n = 0; n < q1; n++) {
261 s.acu(n) = vc1.acu(n) + vc2.acu(n);
262 }
263 return s;
264}

◆ operator+() [12/15]

DoubleAc Heed::operator+ ( double  f1,
const DoubleAc f2 
)
inline

Definition at line 441 of file DoubleAc.h.

441 {
442 DoubleAc t = f2;
443 t += f1;
444 return t;
445}

◆ operator+() [13/15]

DoubleAc Heed::operator+ ( float  f1,
const DoubleAc f2 
)
inline

Definition at line 451 of file DoubleAc.h.

451 {
452 DoubleAc t = f2;
453 t += f1;
454 return t;
455}

◆ operator+() [14/15]

DoubleAc Heed::operator+ ( int  f1,
const DoubleAc f2 
)
inline

Definition at line 471 of file DoubleAc.h.

471 {
472 DoubleAc t = f2;
473 t += f1;
474 return t;
475}

◆ operator+() [15/15]

DoubleAc Heed::operator+ ( long  f1,
const DoubleAc f2 
)
inline

Definition at line 461 of file DoubleAc.h.

461 {
462 DoubleAc t = f2;
463 t += f1;
464 return t;
465}

◆ operator+=() [1/4]

template<class T , class X >
DynArr< T > & Heed::operator+= ( DynArr< T > &  mt,
const X &  t 
)

Definition at line 467 of file multiply.h.

467 {
468 mfunnamep(
469 "template<class T, class X> DynArr<T>& operator+=(DynArr<T>& mt, "
470 "const X& t)");
471 const long qel_lin = mt.get_qel_lin();
472 for (long n = 0; n < qel_lin; n++) {
473 mt.acu_lin(n) += t;
474 }
475 return mt;
476}

◆ operator+=() [2/4]

template<class T >
DynArr< T > & Heed::operator+= ( DynArr< T > &  mt1,
const DynArr< T > &  mt2 
)

Definition at line 391 of file multiply.h.

391 {
392 mfunnamep(
393 "template<class T> DynArr<T>& operator+(DynArr<T>& mt1, const "
394 "DynArr<T>& mt2)");
395 long qdim1 = mt1.get_qdim();
396 long qdim2 = mt2.get_qdim();
397 check_econd12(qdim1, !=, qdim2, mcerr);
398 const DynLinArr<long>& qe1 = mt1.get_qel();
399 const DynLinArr<long>& qe2 = mt2.get_qel();
400 check_econd12(qe1, !=, qe2, mcerr);
401 const long qel_lin = mt1.get_qel_lin();
402 for (long n = 0; n < qel_lin; n++) {
403 mt1.acu_lin(n) += mt2.acu_lin(n);
404 }
405 return mt1;
406}

◆ operator+=() [3/4]

template<class T , class X >
DynLinArr< T > & Heed::operator+= ( DynLinArr< T > &  ar,
const X &  t 
)

Definition at line 354 of file multiply.h.

354 {
355 const long q = ar.get_qel();
356 for (long n = 0; n < q; n++) {
357 ar.acu(n) += t;
358 }
359 return ar;
360}

◆ operator+=() [4/4]

template<class T >
DynLinArr< T > & Heed::operator+= ( DynLinArr< T > &  vc1,
const DynLinArr< T > &  vc2 
)

Definition at line 267 of file multiply.h.

267 {
268 long q1 = vc1.get_qel();
269 long q2 = vc2.get_qel();
270 if (q1 != q2) {
271 mcerr << "template<class T>\n"
272 << "DynLinArr<T>& operator+=(DynLinArr<T>& vc1, "
273 << "const DynLinArr<T>& vc2):\n";
274 mcerr << "q1 != q2, q1 =" << q1 << "q2=" << q2 << '\n';
275 spexit(mcerr);
276 }
277 for (long n = 0; n < q1; n++) {
278 vc1.acu(n) += vc2.acu(n);
279 }
280 return vc1;
281}

◆ operator-() [1/18]

DoubleAc Heed::operator- ( const DoubleAc f)
inline

Definition at line 419 of file DoubleAc.h.

419 {
420 DoubleAc t(-f.get(), -f.get_right_limit(), -f.get_left_limit());
421 return t;
422}
double get_right_limit(void) const
Definition: DoubleAc.h:82
double get_left_limit(void) const
Definition: DoubleAc.h:78

◆ operator-() [2/18]

DoubleAc Heed::operator- ( const DoubleAc f1,
const DoubleAc f2 
)
inline

Definition at line 477 of file DoubleAc.h.

477 {
478 DoubleAc t = f1;
479 t -= f2;
480 return t;
481}

◆ operator-() [3/18]

DoubleAc Heed::operator- ( const DoubleAc f1,
double  f2 
)
inline

Definition at line 482 of file DoubleAc.h.

482 {
483 DoubleAc t = f1;
484 t -= f2;
485 return t;
486}

◆ operator-() [4/18]

DoubleAc Heed::operator- ( const DoubleAc f1,
float  f2 
)
inline

Definition at line 492 of file DoubleAc.h.

492 {
493 DoubleAc t = f1;
494 t -= f2;
495 return t;
496}

◆ operator-() [5/18]

DoubleAc Heed::operator- ( const DoubleAc f1,
int  f2 
)
inline

Definition at line 512 of file DoubleAc.h.

512 {
513 DoubleAc t = f1;
514 t -= f2;
515 return t;
516}

◆ operator-() [6/18]

DoubleAc Heed::operator- ( const DoubleAc f1,
long  f2 
)
inline

Definition at line 502 of file DoubleAc.h.

502 {
503 DoubleAc t = f1;
504 t -= f2;
505 return t;
506}

◆ operator-() [7/18]

DynArr< DoubleAc > Heed::operator- ( const DynArr< double > &  mt1,
const DynArr< DoubleAc > &  mt2 
)

Definition at line 209 of file multiply.cpp.

210 {
211 mfunname(
212 "DynArr<DoubleAc> operator-(const DynArr<double>& mt1, const "
213 "DynArr<DoubleAc>& mt2)");
214 long qdim1 = mt1.get_qdim();
215 long qdim2 = mt2.get_qdim();
216 check_econd12(qdim1, !=, qdim2, mcerr);
217 const DynLinArr<long>& qe1 = mt1.get_qel();
218 const DynLinArr<long>& qe2 = mt2.get_qel();
219 check_econd12(qe1, !=, qe2, mcerr);
220 DynArr<DoubleAc> ms(mt2);
221 IterDynArr<DoubleAc> iter(&ms);
222 DoubleAc* at;
223 while ((at = iter.more()) != NULL) {
224 (*at) = -(*at) + mt1.acu(iter.get_ncur());
225 }
226 return ms;
227}

◆ operator-() [8/18]

DynArr< DoubleAc > Heed::operator- ( const DynArr< DoubleAc > &  mt1,
const DynArr< double > &  mt2 
)

Definition at line 169 of file multiply.cpp.

170 {
171 mfunname(
172 "DynArr<DoubleAc> operator-(const DynArr<DoubleAc>& mt1, const "
173 "DynArr<double>& mt2)");
174 long qdim1 = mt1.get_qdim();
175 long qdim2 = mt2.get_qdim();
176 check_econd12(qdim1, !=, qdim2, mcerr);
177 const DynLinArr<long>& qe1 = mt1.get_qel();
178 const DynLinArr<long>& qe2 = mt2.get_qel();
179 check_econd12(qe1, !=, qe2, mcerr);
180 DynArr<DoubleAc> ms(mt1);
181 IterDynArr<DoubleAc> iter(&ms);
182 DoubleAc* at;
183 while ((at = iter.more()) != NULL) {
184 (*at) = (*at) - mt2.acu(iter.get_ncur());
185 }
186 return ms;
187}

◆ operator-() [9/18]

template<class T >
DynArr< T > Heed::operator- ( const DynArr< T > &  mt)

Definition at line 446 of file multiply.h.

446 {
447 mfunnamep("template<class T> DynArr<T> operator-(const DynArr<T>& mt)");
448 DynArr<T> ms(mt.get_qel(), NULL);
449 const long qel_lin = mt.get_qel_lin();
450 for (long n = 0; n < qel_lin; n++) {
451 ms.acu_lin(n) -= mt.acu_lin(n);
452 }
453 return ms;
454}

◆ operator-() [10/18]

template<class T >
DynArr< T > Heed::operator- ( const DynArr< T > &  mt1,
const DynArr< T > &  mt2 
)

Definition at line 409 of file multiply.h.

409 {
410 mfunnamep(
411 "template<class T> DynArr<T> operator-(const DynArr<T>& mt1, const "
412 "DynArr<T>& mt2)");
413 long qdim1 = mt1.get_qdim();
414 long qdim2 = mt2.get_qdim();
415 check_econd12(qdim1, !=, qdim2, mcerr);
416 const DynLinArr<long>& qe1 = mt1.get_qel();
417 const DynLinArr<long>& qe2 = mt2.get_qel();
418 check_econd12(qe1, !=, qe2, mcerr);
419 DynArr<T> ms(mt1.get_qel(), NULL);
420 const long qel_lin = mt1.get_qel_lin();
421 for (long n = 0; n < qel_lin; n++) {
422 ms.acu_lin(n) = mt1.acu_lin(n) - mt2.acu_lin(n);
423 }
424 return ms;
425}

◆ operator-() [11/18]

DynLinArr< DoubleAc > Heed::operator- ( const DynLinArr< double > &  vc1,
const DynLinArr< DoubleAc > &  vc2 
)

Definition at line 135 of file multiply.cpp.

136 {
137 mfunname(
138 "DoubleAc operator-(const DynLinArr<double>& vc1, const "
139 "DynLinArr<DoubleAc>& vc2)");
140 const long q1 = vc1.get_qel();
141 const long q2 = vc2.get_qel();
142 check_econd12(q1, !=, q2, mcerr);
144 for (long n = 0; n < q1; n++) {
145 s.acu(n) = vc1.acu(n) - vc2.acu(n);
146 }
147 return s;
148}

◆ operator-() [12/18]

DynLinArr< DoubleAc > Heed::operator- ( const DynLinArr< DoubleAc > &  vc1,
const DynLinArr< double > &  vc2 
)

Definition at line 106 of file multiply.cpp.

107 {
108 mfunname(
109 "DoubleAc operator-(const DynLinArr<DoubleAc>& vc1, const "
110 "DynLinArr<double>& vc2)");
111 const long q1 = vc1.get_qel();
112 const long q2 = vc2.get_qel();
113 check_econd12(q1, !=, q2, mcerr);
115 for (long n = 0; n < q1; n++) {
116 s.acu(n) = vc1.acu(n) - vc2.acu(n);
117 }
118 return s;
119}

◆ operator-() [13/18]

template<class T >
DynLinArr< T > Heed::operator- ( const DynLinArr< T > &  ar)

Definition at line 327 of file multiply.h.

327 { // creates local copy and
328 // returns it - may
329 // be inefficient
330 const long q = ar.get_qel();
331 DynLinArr<T> s(q);
332 for (long n = 0; n < q; n++) {
333 s.acu(n) = -ar.acu(n);
334 }
335 return s;
336}

◆ operator-() [14/18]

template<class T >
DynLinArr< T > Heed::operator- ( const DynLinArr< T > &  vc1,
const DynLinArr< T > &  vc2 
)

Definition at line 284 of file multiply.h.

284 {
285 long q1 = vc1.get_qel();
286 long q2 = vc2.get_qel();
287 if (q1 != q2) {
288 mcerr << "template<class T>\n"
289 << "DynLinArr<T> operator-(const DynLinArr<T>& vc1, "
290 << "const DynLinArr<T>& vc2):\n";
291 mcerr << "q1 != q2, q1 =" << q1 << "q2=" << q2 << '\n';
292 spexit(mcerr);
293 }
294 DynLinArr<T> s(q1);
295 for (long n = 0; n < q1; n++) {
296 s.acu(n) = vc1.acu(n) - vc2.acu(n);
297 }
298 return s;
299}

◆ operator-() [15/18]

DoubleAc Heed::operator- ( double  f1,
const DoubleAc f2 
)
inline

Definition at line 487 of file DoubleAc.h.

487 {
488 DoubleAc t = -f2;
489 t += f1;
490 return t;
491}

◆ operator-() [16/18]

DoubleAc Heed::operator- ( float  f1,
const DoubleAc f2 
)
inline

Definition at line 497 of file DoubleAc.h.

497 {
498 DoubleAc t = -f2;
499 t += f1;
500 return t;
501}

◆ operator-() [17/18]

DoubleAc Heed::operator- ( int  f1,
const DoubleAc f2 
)
inline

Definition at line 517 of file DoubleAc.h.

517 {
518 DoubleAc t = -f2;
519 t += f1;
520 return t;
521}

◆ operator-() [18/18]

DoubleAc Heed::operator- ( long  f1,
const DoubleAc f2 
)
inline

Definition at line 507 of file DoubleAc.h.

507 {
508 DoubleAc t = -f2;
509 t += f1;
510 return t;
511}

◆ operator-=() [1/4]

template<class T , class X >
DynArr< T > & Heed::operator-= ( DynArr< T > &  mt,
const X &  t 
)

Definition at line 479 of file multiply.h.

479 {
480 mfunnamep(
481 "template<class T, class X> DynArr<T>& operator-=(DynArr<T>& mt, "
482 "const X& t)");
483 const long qel_lin = mt.get_qel_lin();
484 for (long n = 0; n < qel_lin; n++) {
485 mt.acu_lin(n) += t;
486 }
487 return mt;
488}

◆ operator-=() [2/4]

template<class T >
DynArr< T > & Heed::operator-= ( DynArr< T > &  mt1,
const DynArr< T > &  mt2 
)

Definition at line 428 of file multiply.h.

428 {
429 mfunnamep(
430 "template<class T> DynArr<T>& operator-(DynArr<T>& mt1, const "
431 "DynArr<T>& mt2)");
432 long qdim1 = mt1.get_qdim();
433 long qdim2 = mt2.get_qdim();
434 check_econd12(qdim1, !=, qdim2, mcerr);
435 const DynLinArr<long>& qe1 = mt1.get_qel();
436 const DynLinArr<long>& qe2 = mt2.get_qel();
437 check_econd12(qe1, !=, qe2, mcerr);
438 const long qel_lin = mt1.get_qel_lin();
439 for (long n = 0; n < qel_lin; n++) {
440 mt1.acu_lin(n) -= mt2.acu_lin(n);
441 }
442 return mt1;
443}

◆ operator-=() [3/4]

template<class T , class X >
DynLinArr< T > & Heed::operator-= ( DynLinArr< T > &  ar,
const X &  t 
)

Definition at line 363 of file multiply.h.

363 {
364 const long q = ar.get_qel();
365 for (long n = 0; n < q; n++) {
366 ar.acu(n) -= t;
367 }
368 return ar;
369}

◆ operator-=() [4/4]

template<class T >
DynLinArr< T > & Heed::operator-= ( DynLinArr< T > &  vc1,
const DynLinArr< T > &  vc2 
)

Definition at line 302 of file multiply.h.

302 {
303 long q1 = vc1.get_qel();
304 long q2 = vc2.get_qel();
305 if (q1 != q2) {
306 mcerr << "template<class T>\n"
307 << "DynLinArr<T>& operator-=(DynLinArr<T>& vc1, "
308 << "const DynLinArr<T>& vc2):\n";
309 mcerr << "q1 != q2, q1 =" << q1 << "q2=" << q2 << '\n';
310 spexit(mcerr);
311 }
312 for (long n = 0; n < q1; n++) {
313 vc1.acu(n) -= vc2.acu(n);
314 }
315 return vc1;
316}

◆ operator/() [1/11]

DoubleAc Heed::operator/ ( const DoubleAc f1,
const DoubleAc f2 
)
inline

Definition at line 569 of file DoubleAc.h.

569 {
570 DoubleAc t = f1;
571 t /= f2;
572 return t;
573}

◆ operator/() [2/11]

DoubleAc Heed::operator/ ( const DoubleAc f1,
double  f2 
)
inline

Definition at line 574 of file DoubleAc.h.

574 {
575 DoubleAc t = f1;
576 t /= f2;
577 return t;
578}

◆ operator/() [3/11]

DoubleAc Heed::operator/ ( const DoubleAc f1,
float  f2 
)
inline

Definition at line 584 of file DoubleAc.h.

584 {
585 DoubleAc t = f1;
586 t /= f2;
587 return t;
588}

◆ operator/() [4/11]

DoubleAc Heed::operator/ ( const DoubleAc f1,
int  f2 
)
inline

Definition at line 604 of file DoubleAc.h.

604 {
605 DoubleAc t = f1;
606 t /= f2;
607 return t;
608}

◆ operator/() [5/11]

DoubleAc Heed::operator/ ( const DoubleAc f1,
long  f2 
)
inline

Definition at line 594 of file DoubleAc.h.

594 {
595 DoubleAc t = f1;
596 t /= f2;
597 return t;
598}

◆ operator/() [6/11]

template<class T , class X >
DynArr< T > Heed::operator/ ( const DynArr< T > &  mt,
const X &  t 
)

Definition at line 222 of file multiply.h.

222 {
223 mfunnamep(
224 "template<class T, class X> DynArr<T> operator/(const DynArr<T>& "
225 "mt, const X& t)");
226 check_econd11(t, == 0, mcerr);
227 DynArr<T> ms(mt.get_qel(), NULL);
228 const long qel_lin = mt.get_qel_lin();
229 for (long n = 0; n < qel_lin; n++) {
230 ms.acu_lin(n) = mt.acu_lin(n) / t;
231 }
232 return ms;
233}

◆ operator/() [7/11]

template<class T , class X >
DynLinArr< T > Heed::operator/ ( const DynLinArr< T > &  ar,
const X &  t 
)

Definition at line 161 of file multiply.h.

161 {
162 mfunname("DynLinArr<T> operator/(const DynLinArr<T>& ar, const X& t)");
163 check_econd11(t, == 0, mcerr);
164 const long q = ar.get_qel();
165 DynLinArr<T> res(q);
166 for (long n = 0; n < q; n++) {
167 res.acu(n) = ar.acu(n) / t;
168 }
169 return res;
170}

◆ operator/() [8/11]

DoubleAc Heed::operator/ ( double  f1,
const DoubleAc f2 
)
inline

Definition at line 579 of file DoubleAc.h.

579 {
580 DoubleAc t = f1;
581 t /= f2;
582 return t;
583}

◆ operator/() [9/11]

DoubleAc Heed::operator/ ( float  f1,
const DoubleAc f2 
)
inline

Definition at line 589 of file DoubleAc.h.

589 {
590 DoubleAc t = f1;
591 t /= f2;
592 return t;
593}

◆ operator/() [10/11]

DoubleAc Heed::operator/ ( int  f1,
const DoubleAc f2 
)
inline

Definition at line 609 of file DoubleAc.h.

609 {
610 DoubleAc t = f1;
611 t /= f2;
612 return t;
613}

◆ operator/() [11/11]

DoubleAc Heed::operator/ ( long  f1,
const DoubleAc f2 
)
inline

Definition at line 599 of file DoubleAc.h.

599 {
600 DoubleAc t = f1;
601 t /= f2;
602 return t;
603}

◆ operator/=() [1/2]

template<class T , class X >
DynArr< T > & Heed::operator/= ( DynArr< T > &  mt,
const X &  t 
)

Definition at line 236 of file multiply.h.

236 {
237 mfunnamep(
238 "template<class T, class X> DynArr<T>& operator/(DynArr<T>& mt, "
239 "const X& t)");
240 check_econd11(t, == 0, mcerr);
241 const long qel_lin = mt.get_qel_lin();
242 for (long n = 0; n < qel_lin; n++) {
243 mt.acu_lin(n) /= t;
244 }
245 return mt;
246}

◆ operator/=() [2/2]

template<class T , class X >
DynLinArr< T > & Heed::operator/= ( DynLinArr< T > &  ar,
const X &  t 
)

Definition at line 173 of file multiply.h.

173 {
174 mfunname("DynLinArr<T>& operator/=(DynLinArr<T>& ar, const X& t)");
175 check_econd11(t, == 0, mcerr);
176 const long q = ar.get_qel();
177 for (long n = 0; n < q; n++) {
178 ar.acu(n) /= t;
179 }
180 return ar;
181}

◆ operator<()

template<class X >
bool Heed::operator< ( PassivePtr< X >  f1,
PassivePtr< X >  f2 
)

Definition at line 1332 of file AbsPtr.h.

1332 {
1333 // necessary for std::set
1334 return f1.get() < f2.get();
1335}
X * get(void) const
Definition: AbsPtr.h:837

◆ operator<<() [1/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const abssyscoor f 
)

Definition at line 462 of file vec.cpp.

462 {
463 f.print(file, 2);
464 return file;
465}
virtual void print(std::ostream &file, int l) const
Definition: vec.cpp:439

◆ operator<<() [2/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const AtomDef f 
)

Definition at line 70 of file AtomDef.cpp.

70 {
71 Ifile << "AtomDef: name=" << std::setw(10) << f.name()
72 << " notation=" << std::setw(3) << f.notation();
73 Ifile << " Z()=" << std::setw(3) << f.Z()
74 << " A()/(gram/mole)=" << f.A() / (gram / mole) << '\n';
75 return file;
76}
double A() const
Definition: AtomDef.h:68
int Z() const
Definition: AtomDef.h:67
const std::string & name() const
Definition: AtomDef.h:65
const std::string & notation() const
Definition: AtomDef.h:66
#define Ifile
Definition: prstream.h:196

◆ operator<<() [3/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const AtomMixDef f 
)

Definition at line 419 of file AtomDef.cpp.

419 {
420 mfunname("std::ostream& operator << (std::ostream&, const AtomMixDef&)");
421 Ifile << "AtomMixDef\n";
422 indn.n += 2;
423 constexpr double gpm = gram / mole;
424 Ifile << "Z_mean()=" << std::setw(3) << f.Z_mean()
425 << " A_mean()/(gram/mole)=" << f.A_mean() / gpm << '\n';
426 Ifile << "inv_A_mean()*(gram/mole)=" << f.inv_A_mean() * gpm << '\n';
427 Ifile << "mean_ratio_Z_to_A()*(gram/mole)="
428 << f.mean_ratio_Z_to_A() * gpm << '\n';
429 Ifile << "NumberOfElectronsInGram()=" << f.NumberOfElectronsInGram() << '\n';
430 // Here above the mass unit is defined,
431 // therefore there is no need to divide by gram.
432 Iprintn(file, f.qatom());
433 indn.n += 2;
434 for (long n = 0; n < f.qatom(); n++) {
435 Ifile << "n=" << n << " atom(n)->notation=" << f.atom(n)->notation()
436 << "\n";
437 indn.n += 2;
438 Ifile << " weight_quan(n)=" << f.weight_quan(n)
439 << " weight_mass(n)=" << f.weight_mass(n) << '\n';
440 indn.n -= 2;
441 }
442 indn.n -= 2;
443 indn.n -= 2;
444 return file;
445}
const std::vector< double > & weight_quan() const
Definition: AtomDef.h:136
const std::vector< double > & weight_mass() const
Definition: AtomDef.h:137
long qatom() const
Definition: AtomDef.h:133
double mean_ratio_Z_to_A() const
Definition: AtomDef.h:143
double Z_mean() const
Definition: AtomDef.h:140
const std::vector< AtomDef * > & atom() const
Definition: AtomDef.h:134
double NumberOfElectronsInGram() const
Definition: AtomDef.h:144
double inv_A_mean() const
Definition: AtomDef.h:142
double A_mean() const
Definition: AtomDef.h:141

◆ operator<<() [4/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const AtomPhotoAbsCS f 
)

Definition at line 662 of file PhotoAbsCS.cpp.

662 {
663 f.print(file, 1);
664 return file;
665}
virtual void print(std::ostream &file, int l) const
Definition: PhotoAbsCS.cpp:635

◆ operator<<() [5/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const basis b 
)

Definition at line 389 of file vec.cpp.

389 {
390 Ifile << "basis: name=" << b.name << '\n';
391 indn.n += 2;
392 int indnsave = indn.n;
393 Ifile << "ex: ";
394 indn.n = 0;
395 file << b.ex;
396 indn.n = indnsave;
397 Ifile << "ey: ";
398 indn.n = 0;
399 file << b.ey;
400 indn.n = indnsave;
401 Ifile << "ez: ";
402 indn.n = 0;
403 file << b.ez;
404 indn.n = indnsave;
405 indn.n -= 2;
406 return file;
407}
vec ez
Definition: vec.h:315
std::string name
Definition: vec.h:322
vec ex
Definition: vec.h:315
vec ey
Definition: vec.h:315

◆ operator<<() [6/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const BGMesh bgm 
)

Definition at line 37 of file BGMesh.cpp.

37 {
38 Ifile << "operator<<(std::ostream& file, const BGMesh& bgm):\n";
39 bgm.print(file, 2);
40 return file;
41}
void print(std::ostream &file, int l) const
Definition: BGMesh.cpp:25

◆ operator<<() [7/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const circumf f 
)

Definition at line 84 of file circumf.cpp.

84 {
85 Ifile << "circumf(erence):\n";
86 indn.n += 2;
87 Ifile << "rad=" << f.rad << '\n';
88 file << f.piv << f.dir;
89 indn.n -= 2;
90 return file;
91}

◆ operator<<() [8/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const Cubic f 
)

Definition at line 150 of file cubic.cpp.

150 {
154 Ifile << "Cubic: s_xzero=" << f.s_xzero() << '\n';
155 indn.n += 2;
156 f.find_zero(z1, z2, z3);
157 Ifile << "Cubic: a=" << f.a() << " b=" << f.b() << " c=" << f.c()
158 << " d=" << f.d() << '\n';
159 file << " z1,2,3=" << z1 << ' ' << z2 << ' ' << z3 << '\n';
160 double r[3];
161 int q;
162 q = f.find_real_zero(r);
163 Ifile << "The number of real zeros =" << q << '\n';
164 int n;
165 Ifile << "Solutions=";
166 for (n = 0; n < q; n++) file << ' ' << r[n];
167 file << '\n';
168 double xmm[2];
169 double ymm[2];
170 int s_mm[2];
171 q = f.find_maxmin(xmm, ymm, s_mm);
172 Ifile << "Max/Min, q=" << q << '\n';
173 indn.n += 2;
174 for (n = 0; n < q; n++) {
175 Ifile << "n=" << n << " xmm[n]=" << std::setw(13) << xmm[n]
176 << " ymm[n]=" << std::setw(13) << ymm[n]
177 << " s_mm[n]=" << std::setw(13) << s_mm[n] << '\n';
178 }
179 indn.n -= 2;
180 indn.n -= 2;
181
182 return file;
183}
void find_zero(double_complex &z1, double_complex &z2, double_complex &z3) const
Definition: cubic.cpp:23
double s_xzero() const
Definition: cubic.h:29
std::complex< double > double_complex
Definition: cubic.h:24
double a() const
Definition: cubic.h:25
double b() const
Definition: cubic.h:26
int find_maxmin(double xmm[2], double ymm[2], int s_mm[2]) const
Definition: cubic.cpp:121
double c() const
Definition: cubic.h:27
int find_real_zero(double z[3]) const
Definition: cubic.cpp:74
double d() const
Definition: cubic.h:28

◆ operator<<() [9/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const DoubleAc f 
)

Definition at line 546 of file DoubleAc.cpp.

546 {
547 f.print(file, 1);
548 return file;
549}
void print(std::ostream &file, int l=1) const
Definition: DoubleAc.cpp:510

◆ operator<<() [10/42]

template<class T >
std::ostream & Heed::operator<< ( std::ostream &  file,
const DynArr< T > &  f 
)

Definition at line 2609 of file AbsArr.h.

2609 {
2610 // mfunnamep("template<class T> std::ostream& operator<<(std::ostream& file,
2611 // const DynArr<T>& f)");
2612 f.check();
2613 Ifile << "DynArr<T>: qdim=" << f.get_qdim() << '\n';
2614 indn.n += 2;
2615 if (s_short_output > 0) {
2616 Ifile << noindent << f.get_qel() << yesindent;
2617 } else {
2618 Ifile << "qel=" << noindent << f.get_qel() << yesindent;
2619 Ifile << "cum_qel=" << noindent << f.get_cum_qel() << yesindent;
2620 }
2621 if (f.get_s_non_emplty() == 1) {
2622 if (s_short_output == 0) {
2623 Ifile << "Content element by element:\n";
2624 Ifile << "(The first number is sequencial number, then there are "
2625 "indexes, the last is the element)\n";
2626 // DynArr<T>& ff(f);
2627 }
2628 long nseq = 0;
2629 IterDynArr<T> iter_f(&((DynArr<T>&)f));
2630 T* at;
2631 while ((at = iter_f.more()) != NULL) {
2632 std::ostringstream ost;
2633 if (s_short_output == 0) {
2634 // Ifile<<"ncur="<<noindent<<iter_f.get_ncur()<<yesindent;
2635 Ifile << "nseq=" << std::setw(5) << nseq << " ncur=";
2636 long n;
2637 for (n = 0; n < iter_f.get_ncur().get_qel(); n++) {
2638 file << ' ' << std::setw(5) << iter_f.get_ncur()[n];
2639 }
2640 ost << indn << " element=" << noindent << (*at) << yesindent;
2641 } else {
2642 ost << indn << noindent << (*at) << yesindent;
2643 }
2644 put_one_n(ost);
2645 file << ost.str();
2646 nseq++;
2647 }
2648 file << yesindent;
2649 } else {
2650 if (s_short_output == 0) {
2651 Ifile << "Content is empty.\n";
2652 }
2653 }
2654 indn.n -= 2;
2655 return file;
2656}
const DynLinArr< long > & get_cum_qel(void) const
Definition: AbsArr.h:2173
int get_s_non_emplty(void) const
Definition: AbsArr.h:2214
std::ostream & noindent(std::ostream &f)
Definition: prstream.cpp:17
void put_one_n(std::ostringstream &ost)
Definition: String.h:73
std::ostream & yesindent(std::ostream &f)
Definition: prstream.cpp:21

◆ operator<<() [11/42]

template<class T >
std::ostream & Heed::operator<< ( std::ostream &  file,
const DynLinArr< T > &  f 
)

Definition at line 1014 of file AbsArr.h.

1014 {
1015 // mfunnamep("template<class T> std::ostream& operator<<(std::ostream& file,
1016 // const DynLinArr<T>& f)");
1017 // mcout<<"operator<<(std::ostream& file, const DynLinArr<T>& f) is
1018 // started\n";
1019 Ifile << "DynLinArr<T>: qel=" << f.get_qel() << '\n';
1020 f.check();
1021 long n;
1022 indn.n += 2;
1023 for (n = 0; n < f.get_qel(); n++) {
1024 // Ifile<<"n="<<n<<" el[n]="<<noindent<<f[n]<<yesindent<<'\n';
1025 if (s_short_output == 0) {
1026 Ifile << "n=" << n << " el[n]=";
1027 }
1028 std::ostringstream ost;
1029 ost << indn << noindent << f[n] << yesindent;
1030 put_one_n(ost);
1031 file << ost.str();
1032 }
1033 // file<<yesindent;
1034 indn.n -= 2;
1035 return file;
1036}
void check(void) const
Definition: AbsArr.h:433

◆ operator<<() [12/42]

template<class T >
std::ostream & Heed::operator<< ( std::ostream &  file,
const EqualStepCoorMesh< T > &  f 
)

Definition at line 224 of file tline.h.

224 {
225 f.print(file);
226 return file;
227}
void print(std::ostream &file) const
Definition: tline.h:215

◆ operator<<() [13/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const fixsyscoor f 
)

Definition at line 490 of file vec.cpp.

490 {
491 Ifile << "fixsyscoor:\n";
492 f.abssyscoor::print(file, 2);
493 return file;
494}

◆ operator<<() [14/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const FunNameStack f 
)

Definition at line 455 of file FunNameStack.cpp.

455 {
456 if (f.s_act == 1) {
457#ifdef USE_BOOST_MULTITHREADING
458 file << "FunNameStack: s_init=" << f.s_init << '\n';
459 long nret, qret;
460 NameStack* ns = f.get_thread_stack_q(nret, qret);
461 file << " id=" << ns->id << " qname=" << ns->qname << '\n';
462 file << "At the time of scanning there were " << qret << " threads \n"
463 << "registered in FunNameStack system.\n";
464 file << "The current one appeared nth: " << nret << '\n';
465 for (int n = 0; n < ns->qname; n++) {
466 file << std::setw(3) << n << " " << ns->name[n] << " \n";
467 }
468#else
469 file << "FunNameStack: s_init=" << f.s_init << " qname=" << f.qname << '\n';
470 for (int n = 0; n < f.qname; n++) {
471 file << std::setw(3) << n << " " << f.name[n] << " \n";
472 }
473#endif
474 }
475 return file;
476}

◆ operator<<() [15/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const FunNameWatch f 
)

Definition at line 478 of file FunNameStack.cpp.

478 {
479 f.hdr(file);
480 return file;
481}
std::ostream & hdr(std::ostream &file) const
Definition: FunNameStack.h:397

◆ operator<<() [16/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const GasDef f 
)

Definition at line 294 of file GasDef.cpp.

294 {
295 mfunname("std::ostream& operator << (std::ostream& file, const GasDef& f)");
296 Ifile << "GasDef: \n";
297 indn.n += 2;
298 indn.n += 2;
299 file << ((MatterDef&)f);
300 indn.n -= 2;
301 constexpr double mm_rt_st_in_atmosphere = 760.;
302 // This corresponds to 133.322 pascal in one mm
303 //( 101325 pascal in one atmosphere )
304 const double patm = f.pressure() / CLHEP::atmosphere;
305 Ifile << "pressure/atmosphere=" << patm
306 << " pressure/atmosphere * mm_rt_st_in_atmosphere = "
307 << patm * mm_rt_st_in_atmosphere << '\n';
308 Ifile << "Z_mean_molec=" << f.Z_mean_molec() << '\n';
309
310 file << "qmolec()=" << f.qmolec() << '\n';
311 indn.n += 2;
312 for (long n = 0; n < f.qmolec(); ++n) {
313 Ifile << "n=" << n << " molec(n)->notation=" << f.molec(n)->notation()
314 << '\n';
315 indn.n += 2;
316 Ifile << "weight_quan_molec(n)=" << f.weight_quan_molec(n)
317 << " weight_mass_molec(n)=" << f.weight_mass_molec(n) << '\n';
318 Ifile << "Z_total=" << f.molec(n)->Z_total()
319 << " A_total/(gram/mole)=" << f.molec(n)->A_total() / (CLHEP::gram / CLHEP::mole)
320 << '\n';
321 indn.n -= 2;
322 }
323 indn.n -= 2;
324 indn.n -= 2;
325 return file;
326}
double Z_mean_molec() const
Mean charge of molecules in this gas.
Definition: GasDef.cpp:281
long qmolec() const
Definition: GasDef.h:47
const std::vector< double > & weight_quan_molec() const
Definition: GasDef.h:52
const std::vector< double > & weight_mass_molec() const
Definition: GasDef.h:55
const std::vector< MoleculeDef * > & molec() const
Definition: GasDef.h:48
double pressure() const
Definition: GasDef.h:46

◆ operator<<() [17/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const linexi2 l 
)

Definition at line 66 of file linexi2.cpp.

66 {
67 Ifile << "linexi2_coor: qlr=" << l.qlr << '\n';
68 Ifile << "x_mean=" << l.x_mean << " Dx=" << l.Dx << '\n';
69 Ifile << "y_mean=" << l.y_mean << " xy_mean=" << l.xy_mean << '\n';
70 Ifile << "a=" << l.a << " b=" << l.b << '\n';
71 for (int n = 0; n < l.qlr; n++)
72 Ifile << "n=" << n << " x=" << l.ax[n] << " y=" << l.ay[n] << '\n';
73 return file;
74}
const double * ax
Definition: linexi2.h:23
double xy_mean
Definition: linexi2.h:45
double b
Definition: linexi2.h:47
double y_mean
Definition: linexi2.h:44
const double * ay
Definition: linexi2.h:43
double a
Definition: linexi2.h:46

◆ operator<<() [18/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const linexi2_coor l 
)

Definition at line 28 of file linexi2.cpp.

28 {
29 Ifile << "linexi2_coor: qlr=" << l.qlr << " x_mean=" << l.x_mean
30 << " Dx=" << l.Dx << '\n';
31 for (int n = 0; n < l.qlr; n++) Ifile << "n=" << n << " x=" << l.ax[n] << '\n';
32 return file;
33}

◆ operator<<() [19/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const MatterDef f 
)

Definition at line 127 of file MatterDef.cpp.

127 {
128 mfunname("ostream& operator << (ostream& file, const MatterDef& f)");
129 Ifile << "MatterDef: name=" << std::setw(10) << f.name()
130 << " notation=" << std::setw(3) << f.notation() << '\n';
131 indn.n += 2;
132 Ifile << "density/(gram/cm3)=" << f.density() / (CLHEP::gram / CLHEP::cm3)
133 << " temperature/kelvin=" << f.temperature() / CLHEP::kelvin
134 << " I_eff/eV=" << f.I_eff() / CLHEP::eV << '\n';
135 f.AtomMixDef::print(file, 1);
136 indn.n -= 2;
137 return file;
138}
const std::string & notation() const
Definition: MatterDef.h:50
const std::string & name() const
Definition: MatterDef.h:49
double I_eff() const
Definition: MatterDef.h:53
double temperature() const
Definition: MatterDef.h:52
double density() const
Definition: MatterDef.h:51

◆ operator<<() [20/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const MolecPhotoAbsCS f 
)

Definition at line 1940 of file PhotoAbsCS.cpp.

1940 {
1941 f.print(file, 1);
1942 return file;
1943}
void print(std::ostream &file, int l) const

◆ operator<<() [21/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const MoleculeDef f 
)

Definition at line 191 of file MoleculeDef.cpp.

191 {
192 mfunnamep("std::ostream& operator << (std::ostream&, const MoleculeDef&)");
193 constexpr double gpm = gram / mole;
194 Ifile << "MoleculeDef: name=" << std::setw(10) << f.name()
195 << " notation=" << std::setw(3) << f.notation() << '\n';
196 indn.n += 2;
197 Ifile << "Z_total()=" << std::setw(3) << f.Z_total()
198 << " A_total()/(gram/mole)=" << f.A_total() / gpm
199 << " tqatom()=" << f.tqatom() << '\n';
200 Iprintn(file, f.qatom());
201 indn.n += 2;
202 for (long n = 0; n < f.qatom(); n++) {
203 Ifile << "n=" << n << " atom(n)->notation=" << f.atom(n)->notation()
204 << " qatom_ps(n)=" << f.qatom_ps(n) << '\n';
205 }
206 indn.n -= 2;
207 f.AtomMixDef::print(file, 1);
208 VanDerWaals* at = f.vdw().get();
209 if (at) {
210 Ifile << "Density at the crucial conditions for ideal gas (for debug):\n";
211 double rydberg = k_Boltzmann * Avogadro; // more precise
212 // mcout<<"rydberg/(joule/(kelvin*mole)) ="
213 // << rydberg/(joule/(kelvin*mole))<<'\n';
214 // double sa = f.A_total();
216 f.A_total() * at->Pk() / (rydberg * at->Tk()) / (gram / cm3));
217 Ifile << "For the Waals:\n";
218 Iprintn(mcout, f.A_total() / at->Vk() / (gram / cm3));
219 }
220 indn.n -= 2;
221 return file;
222}
const std::vector< long > & qatom_ps() const
Definition: MoleculeDef.h:68
const std::string & name() const
Definition: MoleculeDef.h:66
long tqatom() const
Definition: MoleculeDef.h:72
long Z_total() const
Definition: MoleculeDef.h:70
const std::string & notation() const
Definition: MoleculeDef.h:67
double A_total() const
Definition: MoleculeDef.h:71
const std::shared_ptr< VanDerWaals > & vdw() const
Definition: MoleculeDef.h:73

◆ operator<<() [22/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const mparticle f 
)

Definition at line 259 of file mparticle.cpp.

259 {
260 (&f)->print(file, 10);
261 return file;
262}

◆ operator<<() [23/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const Parabol f 
)

Definition at line 280 of file parabol.cpp.

280 {
281 double xz[2];
282 int q = f.find_zero(xz);
283 Ifile << "Parabol: a=" << f.a() << " b=" << f.b() << " c=" << f.c()
284 << " qxzero=" << q;
285 if (q > 0) file << " xzero=" << xz[0];
286 if (q > 1) file << ' ' << xz[1];
287 file << '\n';
288 return file;
289}
int find_zero(double xzero[2]) const
Definition: parabol.cpp:229
double c() const
Definition: parabol.h:34
double b() const
Definition: parabol.h:33
double a() const
Definition: parabol.h:32

◆ operator<<() [24/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const particle_def f 
)

Definition at line 143 of file particle_def.cpp.

143 {
144 Ifile << "particle_def: name=" << f.name << " notation=" << f.notation
145 << '\n';
146 Ifile << "mass=" << f.mass
147 << " mass/(GeV/c_squared)=" << f.mass / (GeV / c_squared)
148 << " charge=" << f.charge << " charge/eplus=" << f.charge / eplus
149 << '\n';
150 Ifile << "lepton_n=" << f.lepton_n << " baryon_n=" << f.baryon_n << '\n';
151 Ifile << "spin=" << f.spin << " isospin=" << f.isospin << '\n';
152 return file;
153}
std::string name
Definition: particle_def.h:44
std::string notation
Short name to make data summary files short.
Definition: particle_def.h:46

◆ operator<<() [25/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const particle_type f 
)

Definition at line 184 of file particle_def.cpp.

184 {
185 if (!f.pardef) {
186 file << "type is not initialized";
187 } else {
188 file << (f.pardef->name);
189 }
190 return file;
191}
particle_def * pardef
Definition: particle_def.h:137

◆ operator<<() [26/42]

template<class X >
std::ostream & Heed::operator<< ( std::ostream &  file,
const PassivePtr< X > &  f 
)

Definition at line 952 of file AbsPtr.h.

952 {
953 Ifile << "PassivePtr<X>:";
954 if (f.get() == NULL)
955 file << " pointer is NULL, no object, number of ref's is "
956 << f.get_total_number_of_references() << "\n";
957 else {
958 file << noindent;
959 file << (*f.get());
960 file << yesindent;
961 indn.n += 2;
962 Ifile << "number of ref's is " << f.get_total_number_of_references()
963 << '\n';
964 indn.n -= 2;
965 }
966 return file;
967}
long get_total_number_of_references(void) const
Definition: AbsPtr.h:912

◆ operator<<() [27/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const plane pl 
)

Definition at line 156 of file plane.cpp.

156 {
157 Ifile << "plane:\n";
158 indn.n += 2;
159 file << pl.piv << pl.dir;
160 indn.n -= 2;
161 return file;
162}

◆ operator<<() [28/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const point p 
)

Definition at line 429 of file vec.cpp.

429 {
430 Ifile << "point:\n";
431 indn.n += 2;
432 file << p.v;
433 indn.n -= 2;
434 return file;
435}

◆ operator<<() [29/42]

template<class T , class D >
std::ostream & Heed::operator<< ( std::ostream &  file,
const PointCoorMesh< T, D > &  f 
)

Definition at line 700 of file tline.h.

700 {
701 f.print(file);
702 return file;
703}
virtual void print(std::ostream &file) const
Definition: tline.h:675

◆ operator<<() [30/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const polygon p 
)

Definition at line 414 of file polyline.cpp.

414 {
415 Ifile << "polygon:\n";
416 indn.n += 2;
417 Ifile << "s_convex=" << p.s_convex << '\n';
418 // file << statcast(const polyline_pl&, p);
419 file << static_cast<const polyline_pl&>(p);
420 indn.n -= 2;
421 return file;
422}

◆ operator<<() [31/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const polyline p 
)

Definition at line 221 of file polyline.cpp.

221 {
222 int n;
223 Ifile << "polyline:\n";
224 indn.n += 2;
225 Ifile << "qpt=" << p.qpt << '\n';
226 for (n = 0; n < p.qpt; n++) file << p.pt[n];
227 Ifile << "qsl=" << p.qsl << '\n';
228 for (n = 0; n < p.qsl; n++) file << p.sl[n];
229 indn.n -= 2;
230 return file;
231}
point * pt
Definition: polyline.h:26
straight * sl
Definition: polyline.h:28

◆ operator<<() [32/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const polyline_pl p 
)

Definition at line 268 of file polyline.cpp.

268 {
269 Ifile << "polyline_pl:\n";
270 indn.n += 2;
271 file << p.pn;
272 // file << statcast(const polyline&, p);
273 file << static_cast<const polyline&>(p);
274 indn.n -= 2;
275 return file;
276}

◆ operator<<() [33/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const rectangle f 
)

Definition at line 470 of file polyline.cpp.

470 {
471 Ifile << "rectangle:\n";
472 indn.n += 2;
473 Ifile << "piv:\n" << f.piv;
474 Ifile << "dir1,2(directions of sides):\n" << f.dir1 << f.dir2;
475 Ifile << "dim (dimensions):" << f.dim[0] << ' ' << f.dim[1] << '\n';
476 file << static_cast<const polygon&>(f);
477 indn.n -= 2;
478 return file;
479}
point piv
Central point.
Definition: polyline.h:183
vfloat dim[2]
Definition: polyline.h:189
vec dir1
Directions of sides, unit length.
Definition: polyline.h:185
vec dir2
Directions of sides, unit length.
Definition: polyline.h:187

◆ operator<<() [34/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const RegPassivePtr f 
)

Definition at line 156 of file AbsPtr.cpp.

156 {
157#ifdef USE_BIT_OPERA
158#ifdef USE_CHAR_GETSETTERS_PARAMETERS
159 Ifile << "RegPassivePtr<X>: s_ban_del/sub/cop=" << int(f.get_s_ban_del())
160 << "/" << int(f.get_s_ban_sub()) << "/" << int(f.get_s_ban_cop());
161#else
162 Ifile << "RegPassivePtr<X>: s_ban_del/sub/cop=" << f.get_s_ban_del() << "/"
163 << f.get_s_ban_sub() << "/" << f.get_s_ban_cop();
164#endif
165#elif defined USE_BIT_FIELDS
166 Ifile << "RegPassivePtr<X>: s_ban_del/sub/cop=" << f.conparam.s_ban_del << "/"
167 << f.conparam.s_ban_sub << "/" << f.conparam.s_ban_cop;
168#else
169#ifdef USE_CHAR_CONTROL_VARIABLES
170 Ifile << "RegPassivePtr<X>: s_ban_del/sub/cop=" << int(f.s_ban_del) << "/"
171 << int(f.s_ban_sub) << "/" << int(f.s_ban_cop);
172#else
173 Ifile << "RegPassivePtr<X>: s_ban_del/sub/cop=" << f.s_ban_del << "/"
174 << f.s_ban_sub << "/" << f.s_ban_cop;
175#endif
176#endif
177 /*
178 Ifile<<"RegPassivePtr<X>: s_ban_del="<<f.s_ban_del
179 <<" s_ban_sub="<<f.s_ban_sub
180 <<" s_ban_cop="<<f.s_ban_cop;
181 */
182 if (RegPassivePtr::s_print_adr_cpp == 0) {
183 if (f.cpp == NULL) {
184 file << " cpp=NULL\n";
185 } else {
186 file << " cpp!=NULL\n";
187 }
188 } else {
189 file << " cpp=" << f.cpp << '\n';
190 }
191 if (f.cpp != NULL) {
192 indn.n += 2;
193 Ifile << "cpp->number_of_registered=" << f.cpp->get_number_of_booked()
194 << '\n';
195 indn.n -= 2;
196 }
197#ifdef USE_DELETE_AT_ZERO_COUNT
198 indn.n += 2;
199#ifdef USE_BIT_OPERA
200 Ifile << "s_allow_del_at_zero_count="
201#ifdef USE_CHAR_GETSETTERS_PARAMETERS
202 << int(f.get_s_allow_del_at_zero_count()) << '\n';
203#else
204 << f.get_s_allow_del_at_zero_count() << '\n';
205#endif
206#elif defined(USE_BIT_FIELDS)
207 Ifile << "s_allow_del_at_zero_count=" << f.conparam.s_allow_del_at_zero_count
208 << '\n';
209#else
210#ifdef USE_CHAR_CONTROL_VARIABLES
211 Ifile << "s_allow_del_at_zero_count=" << int(f.s_allow_del_at_zero_count)
212 << '\n';
213#else
214 Ifile << "s_allow_del_at_zero_count=" << f.s_allow_del_at_zero_count << '\n';
215#endif
216#endif
217 indn.n -= 2;
218#endif
219 return file;
220}
char get_s_allow_del_at_zero_count(void) const
Definition: AbsPtr.h:763
char get_s_ban_sub(void) const
Definition: AbsPtr.h:647
char get_s_ban_cop(void) const
Definition: AbsPtr.h:707
char get_s_ban_del(void) const
Definition: AbsPtr.h:567

◆ operator<<() [35/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const spin_def f 
)

Definition at line 25 of file particle_def.cpp.

25 {
26 Ifile << "spin_def: total=" << f.total << " projection=" << f.projection;
27 return file;
28}

◆ operator<<() [36/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const spquadr p 
)

Definition at line 529 of file polyline.cpp.

529 {
530 Ifile << "spquadr:\n";
531 indn.n += 2;
532 Ifile << "piv:";
533 file << p.piv;
534 Ifile << "dir1:\n";
535 file << p.dir1;
536 Ifile << "dir2:\n";
537 file << p.dir2;
538 Ifile << " awidth=" << p.awidth << '\n';
539 file << static_cast<const polygon&>(p);
540 indn.n -= 2;
541 return file;
542}
vfloat awidth
Width of total plane in units of radians.
Definition: polyline.h:208

◆ operator<<() [37/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const straight s 
)

Definition at line 303 of file straight.cpp.

303 {
304 Ifile << "straight (line):\n";
305 indn.n += 2;
306 file << s.piv << s.dir;
307 indn.n -= 2;
308 return file;
309}

◆ operator<<() [38/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const trajestep f 
)

Definition at line 134 of file trajestep.cpp.

134 {
135 Ifile << "trajestep: curved=" << f.curved << "\n";
136 indn.n += 2;
137 Ifile << "currpos:" << f.currpos << indn << "dir=" << f.dir << indn
138 << "relcen=" << f.relcen << indn << "s_range_cf=" << f.s_range_cf
139 << " s_prec=" << f.s_prec << " mrange=" << f.mrange << '\n' << indn
140 << "mpoint=" << f.mpoint;
141 indn.n -= 2;
142 return file;
143}
point currpos
Current position.
Definition: trajestep.h:74
vfloat mrange
Maximal possible range.
Definition: trajestep.h:93
bool curved
Type of trajectory (curved or straight).
Definition: trajestep.h:78
vec dir
Unit vector.
Definition: trajestep.h:76

◆ operator<<() [39/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const VanDerWaals f 
)

Definition at line 45 of file MoleculeDef.cpp.

45 {
47 "std::ostream& operator << (std::ostream& file, const VanDerWaals& f)");
48 Ifile << "VanDerWaals:\n";
49 indn.n += 2;
50 Iprintn(file, f.Pk() / (CLHEP::atmosphere));
51 Iprintn(file, f.Tk() / (CLHEP::kelvin));
52 Iprintn(file, f.Vk() / (cm3));
53 Ifile << "For comparison, the volume of a mole of ideal gas\n";
54 Ifile << "at the same conditions takes\n";
55 Iprintn(file, (k_Boltzmann * Avogadro * f.Tk() / f.Pk()) / (cm3 * mole));
56 Iprintn(file, f.a() / (CLHEP::atmosphere * cm3 * cm3));
57 Iprintn(file, f.b() / (cm3));
58 indn.n -= 2;
59 return file;
60}
double a() const
Definition: MoleculeDef.h:20
double b() const
Definition: MoleculeDef.h:21
double Vk() const
Definition: MoleculeDef.h:22
double Tk() const
Definition: MoleculeDef.h:24
double Pk() const
Definition: MoleculeDef.h:23

◆ operator<<() [40/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
const vec v 
)

Definition at line 252 of file vec.cpp.

252 {
253 Ifile << "vector=" << std::setw(13) << v.x << std::setw(13) << v.y
254 << std::setw(13) << v.z;
255 file << '\n';
256 file.flush();
257 return file;
258}
vfloat x
Definition: vec.h:190
vfloat z
Definition: vec.h:192
vfloat y
Definition: vec.h:191

◆ operator<<() [41/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
EnergyMesh f 
)

Definition at line 79 of file EnergyMesh.cpp.

79 {
80 Ifile << "EnergyMesh: \n";
81 indn.n += 2;
82 Ifile << "emin=" << f.emin << " emax=" << f.emax
83 << " number of intervals=" << f.q << '\n'
84 << " maximal number of intervals=" << EnergyMesh::pqener << '\n';
85 Ifile << " bin left side center right side width\n";
86 for (int n = 0; n < f.q; n++) {
87 Ifile << std::setw(5) << n << std::setw(15) << f.e[n] << std::setw(15)
88 << f.ec[n] << std::setw(15) << f.e[n + 1] << std::setw(15)
89 << (f.e[n + 1] - f.e[n]) << '\n';
90 }
91 indn.n -= 2;
92 return file;
93}

◆ operator<<() [42/42]

std::ostream & Heed::operator<< ( std::ostream &  file,
indentation ind 
)
inline

Definition at line 185 of file prstream.h.

185 {
186 if (ind.s_not == 1)
187 ind.s_not = 0;
188 else
189 for (int n = 0; n < ind.n; n++) file << ' ';
190 return file;
191}

◆ operator==() [1/8]

int Heed::operator== ( const circumf f1,
const circumf f2 
)

Definition at line 34 of file circumf.cpp.

34 {
35 pvecerror("int operator==(const circumf &f1, const circumf &f2)");
36
37 if (!(f1.dir == f2.dir || f1.dir == -f2.dir)) return 0;
38 if (f1.piv == f2.piv && f1.rad == f2.rad)
39 return 1;
40 else
41 return 0;
42}

◆ operator==() [2/8]

template<class T >
int Heed::operator== ( const DynArr< T > &  f1,
const DynArr< T > &  f2 
)

Definition at line 2458 of file AbsArr.h.

2458 {
2459 if (f1.get_qel() != f2.get_qel()) return 0;
2460 if (f1.get_el() != f2.get_el()) return 0;
2461 return 1;
2462}

◆ operator==() [3/8]

template<class T >
int Heed::operator== ( const DynLinArr< T > &  f1,
const DynLinArr< T > &  f2 
)

Definition at line 2428 of file AbsArr.h.

2428 {
2429 if (f1.get_qel() != f2.get_qel()) return 0;
2430 long q = f1.get_qel();
2431 long n;
2432 for (n = 0; n < q; n++) {
2433 if (!(f1.acu(n) == f2.acu(n))) return 0;
2434 }
2435 return 1;
2436}

◆ operator==() [4/8]

template<class T >
int Heed::operator== ( const EqualStepCoorMesh< T > &  f1,
const EqualStepCoorMesh< T > &  f2 
)

Definition at line 246 of file tline.h.

246 {
247 if (f1.get_qi() != f2.get_qi() || f1.get_xmin() != f2.get_xmin() ||
248 f1.get_xmax() != f2.get_xmax())
249 return 0;
250 else
251 return 1;
252}

◆ operator==() [5/8]

template<class X >
int Heed::operator== ( const PassivePtr< X > &  f1,
const PassivePtr< X > &  f2 
)
inline

Definition at line 1303 of file AbsPtr.h.

1303 {
1304 // comparison of addresses, so it mimics regular pointers
1305 return f1.get() == f2.get();
1306}

◆ operator==() [6/8]

int Heed::operator== ( const plane pl1,
const plane pl2 
)

Definition at line 49 of file plane.cpp.

49 {
50 pvecerror("int operator==(const plane &pl1, const plane &pl2)");
51
52 if (!(pl1.dir == pl2.dir || pl1.dir == -pl2.dir)) return 0;
53 if (pl1.piv == pl2.piv) return 1;
54 if (pl1.check_point_in(pl2.piv, 0) == 1)
55 return 1;
56 else
57 return 0;
58}

◆ operator==() [7/8]

int Heed::operator== ( const straight sl1,
const straight sl2 
)

Definition at line 31 of file straight.cpp.

31 {
32 pvecerror("int operator==(const straight &sl1, const straight &sl2)");
33
34 if (!(sl1.dir == sl2.dir || sl1.dir == -sl2.dir)) return 0;
35 if (sl1.piv == sl2.piv) return 1;
36 if (sl1.check_point_in(sl2.piv, 0.0) == 1) return 1;
37 return 0;
38}

◆ operator==() [8/8]

int Heed::operator== ( manip_absvol_treeid tid1,
manip_absvol_treeid tid2 
)

Definition at line 41 of file volume.cpp.

41 {
42 // First a quick check.
43 if (tid1.eid.size() != tid2.eid.size()) return 0;
44 // Check the last volume.
45 if (tid1.G_lamvol() != tid2.G_lamvol()) return 0;
46 // Check all volumes.
47 const int qeid = tid1.eid.size();
48 for (int n = 0; n < qeid - 1; ++n) {
49 if (tid1.eid[n] != tid2.eid[n]) return 0;
50 }
51 return 1;
52}
std::vector< manip_absvol * > eid
List of volumes.
Definition: volume.h:37
manip_absvol * G_lamvol() const
Get last address of manipulator.
Definition: volume.h:39

◆ operator>>() [1/3]

template<class T >
std::istream & Heed::operator>> ( std::istream &  file,
DynArr< T > &  f 
)

Definition at line 2687 of file AbsArr.h.

2687 {
2688 mfunnamep(
2689 "template<class T> istream& operator>>(istream& file, DynArr<T>& f)");
2690 definp_endpar dep(&file, 0, 1, 0, s_short_output);
2691 long qdim = 0;
2692 dep.s_short = 0;
2693 DEFINPAP(qdim);
2694 dep.s_short = s_short_output;
2695 check_econd11(qdim, < 0, mcerr);
2696 if (s_short_output == 0) {
2697 set_position("qel=DynLinArr<T>:", *dep.istrm, dep.s_rewind, dep.s_req_sep);
2698 } else {
2699 set_position("DynLinArr<T>:", *dep.istrm, dep.s_rewind, dep.s_req_sep);
2700 }
2701 DynLinArr<long> qel_loc;
2702 // mcout<<"now will read qel_loc\n";
2703 file >> qel_loc;
2704 // mcout<<"qel_loc is read\n";
2705 if (s_short_output == 0) {
2706 set_position("cum_qel=DynLinArr<T>:", *dep.istrm, dep.s_rewind,
2707 dep.s_req_sep);
2708 DynLinArr<long> cum_qel_loc;
2709 file >> cum_qel_loc; // this is in general unnecessary
2710 }
2711 if (qel_loc.get_qel() > 0) {
2712 f.pilfer(DynArr<T>(qel_loc, NULL));
2713 long nseq;
2714 long n;
2715 long qseq = qel_loc[0];
2716 for (n = 1; n < qel_loc.get_qel(); n++) {
2717 qseq *= qel_loc[n];
2718 }
2719 for (n = 0; n < qseq; n++) {
2720 if (s_short_output == 0) {
2721 DEFINPAP(nseq);
2722 check_econd12(nseq, !=, n, mcerr);
2723 DynLinArr<long> ncur(qel_loc.get_qel());
2724 set_position("ncur=", *dep.istrm, dep.s_rewind, dep.s_req_sep);
2725 long m;
2726 for (m = 0; m < qel_loc.get_qel(); m++) {
2727 file >> ncur[m];
2728 }
2729 // T element;
2730 // DEFINPAP(element);
2731 // f.ac(ncur) = element;
2732 set_position("element=", *dep.istrm, dep.s_rewind, dep.s_req_sep);
2733 }
2734 file >> f.ac_lin(n);
2735 }
2736 } else {
2737 if (s_short_output == 0) {
2738 // just pass to end
2739 set_position("Content is empty.", *dep.istrm, dep.s_rewind,
2740 dep.s_req_sep);
2741 }
2742 f.pilfer(DynArr<T>());
2743 }
2744 return file;
2745}
void pilfer(const DynArr< T > &f)
Definition: AbsArr.h:1522
T & ac_lin(long n)
Definition: AbsArr.h:2134
#define DEFINPAP(name)
Definition: definp.h:78
int s_short_output
Definition: prstream.cpp:25

◆ operator>>() [2/3]

template<class T >
std::istream & Heed::operator>> ( std::istream &  file,
DynLinArr< T > &  f 
)

Definition at line 1041 of file AbsArr.h.

1041 {
1042 mfunnamep(
1043 "template<class T> istream& operator>>(istream& file, DynLinArr<T>& f)");
1044 // mcout<<"operator<<(std::ostream& file, const DynLinArr<T>& f) is
1045 // started\n";
1046 definp_endpar dep(&file, 0, 1, 0, s_short_output);
1047 long qel = 0;
1048 dep.s_short = 0;
1049 DEFINPAP(qel);
1050 dep.s_short = s_short_output;
1051 check_econd11(qel, < 0, mcerr);
1052 f.clear();
1053 f.put_qel(qel);
1054 long fn;
1055 for (fn = 0; fn < qel; fn++) {
1056 if (s_short_output == 0) {
1057 long n = 0;
1058 DEFINPAP(n);
1059 check_econd12(fn, !=, n, mcerr);
1060 }
1061 // set_position("el[n]=", *dep.istrm, dep.s_rewind, dep.s_req_sep);
1062 // file >> f[n];
1063 definp_any_par(f[fn], "el[n]=", dep);
1064 }
1065 return file;
1066}
void clear(void)
Definition: AbsArr.h:313

◆ operator>>() [3/3]

template<class T >
std::istream & Heed::operator>> ( std::istream &  file,
EqualStepCoorMesh< T > &  f 
)

Definition at line 230 of file tline.h.

230 {
231 mfunname("istream& operator>>(istream& file, EqualStepCoorMesh<T>& f)");
232 definp_endpar dep(&file, 0, 1, 0);
233 set_position("Type of T is (in internal notations)", *dep.istrm, dep.s_rewind,
234 dep.s_req_sep);
235 long q;
236 T xmin;
237 T xmax;
238 DEFINPAP(q);
239 DEFINPAP(xmin);
240 DEFINPAP(xmax);
241 f = EqualStepCoorMesh<T>(q, xmin, xmax);
242 return file;
243}

◆ pois()

long Heed::pois ( const double  amu,
int &  ierror 
)

Definition at line 9 of file pois.cpp.

9 {
10 // C
11 // C POISSON GENERATOR
12 // C CODED FROM LOS ALAMOS REPORT LA-5061-MS
13 // C PROB(N)=EXP(-AMU)*AMU**N/FACT(N)
14 // C WHERE FACT(N) STANDS FOR FACTORIAL OF N
15 // C ON RETURN IERROR.EQ.0 NORMALLY
16 // C IERROR.EQ.1 IF AMU.LE.0.
17 // C
18 double AMUOL = -1.;
19 double AMAX = 100.;
20 double EXPMA = 0.;
21 double PIR = 0;
22 long N = 0;
23 ierror = 0;
24 if (amu > AMAX) goto m500;
25 if (amu == AMUOL) goto m200;
26 if (amu > 0.0) goto m100;
27 // C MEAN SHOULD BE POSITIVE
28 ierror = 1;
29 return 0;
30// C SAVE EXPONENTIAL FOR FURTHER IDENTICAL REQUESTS
31m100:
32 ierror = 0;
33 AMUOL = amu;
34 EXPMA = exp(-amu);
35m200:
36 PIR = 1.;
37 N = -1;
38m300:
39 N = N + 1;
40 PIR = PIR * SRANLUX();
41 if (PIR > EXPMA) goto m300;
42 return N;
43// C NORMAL APPROXIMATION FOR AMU.GT.AMAX
44m500:
45 const double RAN = rnorm_improved();
46 N = long(RAN * sqrt(amu) + amu + .5);
47 return N;
48}
double rnorm_improved()
Definition: rnorm.h:11
DoubleAc exp(const DoubleAc &f)
Definition: DoubleAc.cpp:377

Referenced by Heed::HeedParticle::physics(), Heed::HeedParticle_BGM::physics(), and Heed::HeedDeltaElectron::physics_after_new_speed().

◆ polleg()

double Heed::polleg ( const int  l,
const double  x 
)

Simple function for Legendre polynomials. Implemented only l = 0, 1, 2, 3, 4, 5, 6.

Definition at line 17 of file PolLeg.cpp.

17 {
18 mfunname("double polleg(int l, double x)");
19 check_econd11(l, < 0, mcerr);
20 check_econd11a(l, > 6, "not implemented", mcerr);
21 switch (l) {
22 case 0:
23 return 1.0;
24 case 1:
25 return x;
26 case 2:
27 return 0.5 * (3.0 * x * x - 1.0);
28 case 3:
29 return 0.5 * (5.0 * x * x * x - 3.0 * x);
30 case 4: {
31 const double x2 = x * x;
32 return 1.0 / 8.0 * (35.0 * x2 * x2 - 30.0 * x2 + 3.0);
33 }
34 case 5: {
35 const double x2 = x * x;
36 const double x3 = x2 * x;
37 return 1.0 / 8.0 * (63.0 * x3 * x2 - 70.0 * x3 + 15.0 * x);
38 }
39 case 6: {
40 const double x2 = x * x;
41 const double x4 = x2 * x2;
42 return 1.0 / 16.0 * (231.0 * x4 * x2 - 315.0 * x4 + 105.0 * x2 - 5.0);
43 }
44 default:
45 return 0.0;
46 }
47 return 0.0; // should never happen
48}

Referenced by Heed::ElElasticScatDataStruct::CS().

◆ pow() [1/2]

DoubleAc Heed::pow ( const DoubleAc ,
const DoubleAc  
)

Definition at line 538 of file DoubleAc.cpp.

538 {
539 mcerr << "ERROR in inline DoubleAc pow(const DoubleAc& f, const DoubleAc& "
540 "p):\n";
541 mcerr << "not implemented yet\n";
542 spexit(mcerr);
543 return 0.0;
544}

◆ pow() [2/2]

DoubleAc Heed::pow ( const DoubleAc f,
double  p 
)

Definition at line 337 of file DoubleAc.cpp.

337 {
338 if (p == 1) return f;
339 if (p == 0) return DoubleAc(1.0);
340 if (p > 0) {
341 double d = std::pow(f.get(), p);
342 double di = std::pow(f.left_limit(), p);
343 double da = std::pow(f.right_limit(), p);
344 if (f.left_limit() >= 0.0) {
345 return DoubleAc(d, di, da);
346 } else if (f.right_limit() >= 0.0) {
347 if (di < 0.0)
348 return DoubleAc(d, di, da);
349 else // the power is even
350 return DoubleAc(d, 0.0, std::max(di, da));
351 } else {
352 if (di < 0.0)
353 return DoubleAc(d, di, da);
354 else // the power is even
355 return DoubleAc(d, da, di);
356 }
357 } else {
358 double d = std::pow(f.get(), -p);
359 double di = std::pow(f.left_limit(), -p);
360 double da = std::pow(f.right_limit(), -p);
361 if (f.left_limit() >= 0.0) {
362 return 1.0 / DoubleAc(d, di, da);
363 } else if (f.right_limit() >= 0.0) {
364 if (di < 0.0)
365 return 1.0 / DoubleAc(d, di, da);
366 else // the power is even
367 return 1.0 / DoubleAc(d, 0.0, std::max(di, da));
368 } else {
369 if (di < 0.0)
370 return 1.0 / DoubleAc(d, di, da);
371 else // the power is even
372 return 1.0 / DoubleAc(d, da, di);
373 }
374 }
375}

Referenced by Heed::BGMesh::BGMesh(), Heed::ElElasticScatDataStruct::CS(), e_cont_enloss(), Heed::EnergyMesh::EnergyMesh(), Heed::ExAtomPhotoAbsCS::ExAtomPhotoAbsCS(), Heed::Cubic::find_zero(), Heed::HydrogenPhotoAbsCS::get_CS(), Heed::SimpleTablePhotoAbsCS::get_CS(), Heed::PhenoPhotoAbsCS::get_CS(), Heed::ElElasticScat::get_CS_Rutherford(), Heed::HydrogenPhotoAbsCS::get_integral_CS(), Heed::SimpleTablePhotoAbsCS::get_integral_CS(), Heed::PhenoPhotoAbsCS::get_integral_CS(), Heed::HeedDeltaElectronCS::HeedDeltaElectronCS(), Heed::PhenoPhotoAbsCS::PhenoPhotoAbsCS(), Heed::HeedMatterDef::print(), Heed::SimpleTablePhotoAbsCS::SimpleTablePhotoAbsCS(), Heed::straight::straight(), t_integ_power_2point(), and t_value_power_2point().

◆ print_adr_DynLinArr()

template<class T >
void Heed::print_adr_DynLinArr ( std::ostream &  file,
const DynLinArr< T > &  f,
int  l,
long  q 
)

Definition at line 1151 of file AbsArr.h.

1152 {
1153 // mfunnamep("template<class T> void print_adr_DynLinArr(std::ostream& file,
1154 // const DynLinArr<T>& f, int l, long q)");
1155 Ifile << "DynLinArr<T>: qel=" << f.get_qel() << " q to print is " << q
1156 << '\n';
1157 f.check();
1158 if (q > f.get_qel()) {
1159 mcerr << "print_adr_DynLinArr(...): q>f.get_qel(), q=" << q
1160 << " f.get_qel()=" << f.get_qel() << '\n';
1161 mcerr << "Type of T is (in internal notations) " << typeid(T).name()
1162 << '\n';
1163 spexit(mcerr);
1164 }
1165 long n;
1166 indn.n += 2;
1167 for (n = 0; n < q; n++) {
1168 // Ifile<<"n="<<n<<" el[n]="<<noindent; f[n]->print(file, l);
1169 // file<<yesindent;
1170 Ifile << "n=" << n << " el[n]=" << noindent;
1171 std::ostringstream ost;
1172 f[n]->print(ost, l);
1173 ost << yesindent;
1174 put_one_n(ost);
1175 file << ost.str();
1176 }
1177 indn.n -= 2;
1178}
virtual void print(std::ostream &file, int l=1) const
Definition: AbsPtr.cpp:152

◆ print_DynArr()

template<class T >
void Heed::print_DynArr ( std::ostream &  file,
const DynArr< T > &  f,
int  l 
)

Definition at line 2785 of file AbsArr.h.

2785 {
2786 // mfunnamep("template<class T> oid print_DynArr(std::ostream& file, const
2787 // DynArr<T>& f, int l)");
2788 f.check();
2789 // Ifile<<"DynArr<T>: qdim="<<f.get_qdim()
2790 // <<" qel="<<noindent<<f.get_qel()<<yesindent<<'\n';
2791 Ifile << "DynArr<T>: qdim=" << f.get_qdim() << '\n';
2792 indn.n += 2;
2793 Ifile << "qel=" << noindent << f.get_qel() << yesindent;
2794 Ifile << "cum_qel=" << noindent << f.get_cum_qel() << yesindent;
2795 Ifile << "Content element by element:\n";
2796 Ifile << "(The first number is sequencial number, then there are indexes, "
2797 "the last is the element)\n";
2798 // DynArr<T>& ff(f);
2799 long nseq = 0;
2800 IterDynArr<T> iter_f(&((DynArr<T>&)f));
2801 T* at;
2802 while ((at = iter_f.more()) != NULL) {
2803 // Ifile<<"ncur="<<noindent<<iter_f.get_ncur()<<yesindent;
2804 Ifile << "nseq=" << std::setw(5) << nseq << " ncur=";
2805 long n;
2806 for (n = 0; n < iter_f.get_ncur().get_qel(); n++) {
2807 file << ' ' << std::setw(5) << iter_f.get_ncur()[n];
2808 }
2809 // file<<'\n';
2810 // Ifile<<"element="<<noindent; at->print(file, l);
2811 // file<<yesindent<<'\n';
2812 std::ostringstream ost;
2813 ost << indn << " element=" << noindent;
2814 at->print(ost, l);
2815 ost << yesindent;
2816 put_one_n(ost);
2817 file << ost.str();
2818 }
2819 file << yesindent;
2820 indn.n -= 2;
2821}

◆ print_DynArr_double()

void Heed::print_DynArr_double ( std::ostream &  file,
const DynArr< double > &  f 
)

Definition at line 315 of file AbsArr.cpp.

315 {
316 mfunname("void print_DynArr_double(ostream& file, const DynArr<double>& f)");
317 f.check();
318 Ifile << "DynArr<double>:";
319 long qdim = f.get_qdim();
320 file << " qdim=" << qdim << " sizes:";
321 const DynLinArr<long>& qe = f.get_qel();
322 qe.check();
323 long n;
324 for (n = 0; n < qdim; n++) {
325 file << ' ' << qe[n];
326 }
327 file << '\n';
328 if (qdim == 1) {
329 long q = qe[0];
330 if (q <= 0) return;
331 indn.n += 2;
332 if (q <= pq_arrelem_in_line) file << indn;
333 long i;
334 for (i = 0; i < q; i++) {
335 if (q <= pq_arrelem_in_line)
336 file << f.ac(i) << ' '; // all in one line
337 else
338 Ifile << std::setw(4) << i << ' ' << f.ac(i) << '\n'; // column
339 }
340 if (q <= pq_arrelem_in_line) file << '\n';
341 indn.n -= 2;
342 } else if (qdim == 2) {
343 long qr = qe[0];
344 long qc = qe[1];
345 if (qr <= 0 && qc <= 0) return;
346 indn.n += 2;
347 if (qc > pq_arrelem_in_line) Ifile << " row col value of element\n";
348 long ir, ic;
349 for (ir = 0; ir < qr; ir++) {
350 if (qc <= pq_arrelem_in_line) file << indn;
351 for (ic = 0; ic < qc; ic++) {
352 if (qc <= pq_arrelem_in_line)
353 file << f.ac(ir, ic) << ' '; // all in one line
354 else
355 Ifile << std::setw(4) << ir << ' ' << std::setw(4) << ic << ' ' << f.ac(ir, ic)
356 << '\n'; // column
357 }
358 if (qc <= pq_arrelem_in_line) file << '\n';
359 }
360 // if(qc<=pq_elem_in_line) file<<'\n';
361 indn.n -= 2;
362 } else {
363 file << f;
364 }
365}

◆ print_DynArr_float()

void Heed::print_DynArr_float ( std::ostream &  file,
const DynArr< float > &  f 
)

Definition at line 367 of file AbsArr.cpp.

367 {
368 mfunname("void print_DynArr_float(ostream& file, const DynArr<float>& f)");
369 f.check();
370 Ifile << "DynArr<float>:";
371 long qdim = f.get_qdim();
372 file << " qdim=" << qdim << " sizes:";
373 const DynLinArr<long>& qe = f.get_qel();
374 qe.check();
375 for (long n = 0; n < qdim; n++) {
376 file << ' ' << qe[n];
377 }
378 file << '\n';
379 if (qdim == 1) {
380 long q = qe[0];
381 if (q <= 0) return;
382 indn.n += 2;
383 if (q <= pq_arrelem_in_line) file << indn;
384 long i;
385 for (i = 0; i < q; i++) {
386 if (q <= pq_arrelem_in_line)
387 file << f.ac(i) << ' '; // all in one line
388 else
389 Ifile << std::setw(4) << i << ' ' << f.ac(i) << '\n'; // column
390 }
391 if (q <= pq_arrelem_in_line) file << '\n';
392 indn.n -= 2;
393 } else if (qdim == 2) {
394 long qr = qe[0];
395 long qc = qe[1];
396 if (qr <= 0 && qc <= 0) return;
397 indn.n += 2;
398 if (qc > pq_arrelem_in_line) Ifile << " row col value of element\n";
399 long ir, ic;
400 for (ir = 0; ir < qr; ir++) {
401 if (qc <= pq_arrelem_in_line) file << indn;
402 for (ic = 0; ic < qc; ic++) {
403 if (qc <= pq_arrelem_in_line)
404 file << f.ac(ir, ic) << ' '; // all in one line
405 else
406 Ifile << std::setw(4) << ir << ' ' << std::setw(4) << ic << ' ' << f.ac(ir, ic)
407 << '\n'; // column
408 }
409 if (qc <= pq_arrelem_in_line) file << '\n';
410 }
411 // if(qc<=pq_elem_in_line) file<<'\n';
412 indn.n -= 2;
413 } else {
414 file << f;
415 }
416}

◆ print_DynArr_int_w()

void Heed::print_DynArr_int_w ( std::ostream &  file,
const DynArr< int > &  f,
int  w 
)

Definition at line 225 of file AbsArr.cpp.

225 {
226 mfunname(
227 "void print_DynArr_int_w(ostream& file, const DynArr<int>& f, int w)");
228 f.check();
229 Ifile << "DynArr<int>:";
230 long qdim = f.get_qdim();
231 file << " qdim=" << qdim << " sizes:";
232 const DynLinArr<long>& qe = f.get_qel();
233 qe.check();
234 long n;
235 for (n = 0; n < qdim; n++) {
236 file << ' ' << qe[n];
237 }
238 file << '\n';
239 indn.n += 2;
240 if (qdim == 1) {
241 long q = qe[0];
242 if (q <= 0) return;
243 indn.n += 2;
244 if (indn.n + 3 + q * (w + 1) <= 80) { // printing in one line
245 Ifile << "ar=";
246 long i;
247 for (i = 0; i < q; i++) {
248 file << ' ' << std::setw(w) << f.ac(i);
249 }
250 file << '\n';
251 } else {
252 Ifile << "array:\n";
253 long i;
254 for (i = 0; i < q; i++) {
255 Ifile << std::setw(4) << i << ' ' << f.ac(i) << '\n'; // column
256 }
257 }
258 } else if (qdim == 2) {
259 long qr = qe[0];
260 long qc = qe[1];
261 if (qr <= 0 && qc <= 0) return;
262 indn.n += 2;
263 if (indn.n + 3 + qc * (w + 1) <= 80) { // lines in lines
264 Ifile << "first index - columns, second index - lines\n";
265 Ifile << "first index\n";
266 long ir, ic;
267 for (ir = 0; ir < qr; ir++) {
268 Ifile << std::setw(3) << ir;
269 for (ic = 0; ic < qc; ic++) {
270 Ifile << ' ' << std::setw(w) << f.ac(ir, ic);
271 }
272 file << '\n';
273 }
274 } else if (indn.n + 3 + qr * (w + 1) <= 80) {
275 Imcout << "first index - lines, second index - columns\n";
276 Imcout << "second index\n";
277 long ir, ic;
278 for (ic = 0; ic < qc; ic++) {
279 Ifile << std::setw(3) << ic;
280 for (ir = 0; ir < qr; ir++) {
281 Ifile << ' ' << std::setw(w) << f.ac(ir, ic);
282 }
283 file << '\n';
284 }
285 } else {
286 Ifile << " row col value of element\n";
287 long ir, ic;
288 for (ir = 0; ir < qr; ir++) {
289 for (ic = 0; ic < qc; ic++) {
290 Ifile << std::setw(4) << ir << ' ' << std::setw(4) << ic << ' ' << f.ac(ir, ic)
291 << '\n'; // column
292 }
293 }
294 }
295 } else {
296 IterDynArr<int> iter_f(&((DynArr<int>&)f));
297 int* at;
298 while ((at = iter_f.more()) != NULL) {
299 Ifile << "ncur=" << noindent << iter_f.get_ncur() << yesindent;
300 Ifile << "element=" << noindent << (*at) << yesindent << '\n';
301 }
302 file << yesindent;
303 }
304 // if(qc<=pq_elem_in_line) file<<'\n';
305 indn.n -= 2;
306 /*
307 }
308 else
309 {
310 file<<f;
311 }
312 */
313}

◆ print_DynLinArr() [1/2]

template<class T >
void Heed::print_DynLinArr ( std::ostream &  file,
const DynLinArr< T > &  f,
int  l 
)

Definition at line 1101 of file AbsArr.h.

1101 {
1102 // mfunnamep("template<class T> void print_DynLinArr(std::ostream& file, const
1103 // DynLinArr<T>& f, int l)");
1104 Ifile << "DynLinArr<T>: qel=" << f.get_qel() << '\n';
1105 f.check();
1106 long n;
1107 indn.n += 2;
1108 for (n = 0; n < f.get_qel(); n++) {
1109 // Ifile<<"n="<<n<<" el[n]="<<noindent; f[n].print(file, l);
1110 // file<<yesindent;
1111 Ifile << "n=" << n << " el[n]=" << noindent;
1112 std::ostringstream ost;
1113 f[n].print(ost, l);
1114 ost << yesindent;
1115 put_one_n(ost);
1116 file << ost.str();
1117 }
1118 indn.n -= 2;
1119}

◆ print_DynLinArr() [2/2]

template<class T >
void Heed::print_DynLinArr ( std::ostream &  file,
const DynLinArr< T > &  f,
int  l,
long  q 
)

Definition at line 1122 of file AbsArr.h.

1122 {
1123 // mfunnamep("template<class T> void print_DynLinArr(std::ostream& file, const
1124 // DynLinArr<T>& f, int l, long q)");
1125 Ifile << "DynLinArr<T>: qel=" << f.get_qel() << " q to print is " << q
1126 << '\n';
1127 f.check();
1128 if (q > f.get_qel()) {
1129 mcerr << "print_DynLinArr(...): q>f.get_qel(), q=" << q
1130 << " f.get_qel()=" << f.get_qel() << '\n';
1131 mcerr << "Type of T is (in internal notations) " << typeid(T).name()
1132 << '\n';
1133 spexit(mcerr);
1134 }
1135 long n;
1136 indn.n += 2;
1137 for (n = 0; n < q; n++) {
1138 // Ifile<<"n="<<n<<" el[n]="<<noindent; f[n].print(file, l);
1139 // file<<yesindent;
1140 Ifile << "n=" << n << " el[n]=" << noindent;
1141 std::ostringstream ost;
1142 f[n].print(ost, l);
1143 ost << yesindent;
1144 put_one_n(ost);
1145 file << ost.str();
1146 }
1147 indn.n -= 2;
1148}

◆ print_DynLinArr_double()

void Heed::print_DynLinArr_double ( std::ostream &  file,
const DynLinArr< double > &  f 
)

Definition at line 77 of file AbsArr.cpp.

77 {
78 Ifile << "DynLinArr<double>:";
79 long q = f.get_qel();
80 file << " q=" << q << '\n';
81 f.check();
82 if (q <= 0) return;
83 indn.n += 2;
84 if (q <= pq_arrelem_in_line) file << indn;
85 long i;
86 for (i = 0; i < q; i++) {
87 if (q <= pq_arrelem_in_line)
88 file << f[i] << ' '; // all in one line
89 else
90 Ifile << std::setw(4) << i << ' ' << f[i] << '\n'; // column
91 }
92 if (q <= pq_arrelem_in_line) file << '\n';
93 indn.n -= 2;
94 file << std::flush;
95}

◆ print_DynLinArr_double2()

void Heed::print_DynLinArr_double2 ( std::ostream &  file,
const DynLinArr< double > &  f1,
const DynLinArr< double > &  f2 
)

Definition at line 97 of file AbsArr.cpp.

98 {
99 Ifile << "Two arrays DynLinArr<double>:";
100 long q1 = f1.get_qel();
101 long q2 = f2.get_qel();
102 long q_max = q1;
103 if (q_max > q2) q_max = q2;
104 file << " q1=" << q1 << " q2=" << q2 << '\n';
105 f1.check();
106 f2.check();
107 if (q_max <= 0) return;
108 indn.n += 2;
109 if (q_max <= pq_arrelem_in_line) file << indn;
110 if (q_max >= pq_arrelem_in_line) {
111 Ifile << "index array1 array2\n";
112 long i;
113 for (i = 0; i < q_max; i++) {
114 Ifile << std::setw(4) << i << ' ';
115 if (i < q1)
116 file << std::setw(18) << f1[i] << ' ';
117 else
118 file << " "; // 19 blanks
119 if (i < q2)
120 file << std::setw(18) << f2[i] << '\n';
121 else
122 file << " \n"; // 18 blanks
123 }
124 } else {
125 long i;
126 Ifile << "array1=";
127 for (i = 0; i < q1; i++) {
128 file << std::setw(18) << f1[i] << ' '; // all in one line
129 }
130 file << '\n';
131 Ifile << "array2=";
132 for (i = 0; i < q2; i++) {
133 file << std::setw(18) << f2[i] << ' '; // all in one line
134 }
135 file << '\n';
136 }
137 indn.n -= 2;
138 file << std::flush;
139}

◆ print_DynLinArr_float()

void Heed::print_DynLinArr_float ( std::ostream &  file,
const DynLinArr< float > &  f 
)

Definition at line 57 of file AbsArr.cpp.

57 {
58 Ifile << "DynLinArr<float>:";
59 long q = f.get_qel();
60 file << " q=" << q << '\n';
61 f.check();
62 if (q <= 0) return;
63 indn.n += 2;
64 if (q <= pq_arrelem_in_line) file << indn;
65 long i;
66 for (i = 0; i < q; i++) {
67 if (q <= pq_arrelem_in_line)
68 file << f[i] << ' '; // all in one line
69 else
70 Ifile << std::setw(4) << i << ' ' << f[i] << '\n'; // column
71 }
72 if (q <= pq_arrelem_in_line) file << '\n';
73 indn.n -= 2;
74 file << std::flush;
75}

◆ print_DynLinArr_int()

void Heed::print_DynLinArr_int ( std::ostream &  file,
const DynLinArr< int > &  f 
)

Definition at line 19 of file AbsArr.cpp.

19 {
20 Ifile << "DynLinArr<int>:";
21 long q = f.get_qel();
22 file << " q=" << q << '\n';
23 f.check();
24 if (q <= 0) return;
25 indn.n += 2;
26 if (q <= pq_arrelem_in_line) file << indn;
27 for (long i = 0; i < q; i++) {
28 if (q <= pq_arrelem_in_line)
29 file << f[i] << ' '; // all in one line
30 else
31 Ifile << std::setw(4) << i << ' ' << f[i] << '\n'; // column
32 }
33 if (q <= pq_arrelem_in_line) file << '\n';
34 indn.n -= 2;
35 file << std::flush;
36}

◆ print_DynLinArr_int_double()

void Heed::print_DynLinArr_int_double ( std::ostream &  file,
const DynLinArr< int > &  iar,
const DynLinArr< double > &  dar 
)

Definition at line 141 of file AbsArr.cpp.

142 {
143 Ifile << "One DynLinArr<int> array and one DynLinArr<double>:\n";
144 long qiar = iar.get_qel();
145 long qdar = dar.get_qel();
146 long q_max = qiar;
147 if (q_max < qdar) q_max = qdar;
148 indn.n += 2;
149
150 Ifile << " qiar=" << qiar << " qdar=" << qdar << '\n';
151 iar.check();
152 dar.check();
153 if (q_max <= 0) {
154 indn.n -= 2;
155 return;
156 }
157 Ifile << "index int array double array\n";
158 long i;
159 for (i = 0; i < q_max; i++) {
160 Ifile << std::setw(4) << i << ' ';
161 if (i < qiar)
162 file << std::setw(8) << iar[i] << ' ';
163 else
164 file << " "; // 19 blanks
165 if (i < qdar)
166 file << std::setw(18) << dar[i] << ' ';
167 else
168 file << " "; // 18 blanks
169 }
170 indn.n -= 2;
171 file << std::flush;
172}

◆ print_DynLinArr_int_double3()

void Heed::print_DynLinArr_int_double3 ( std::ostream &  file,
const DynLinArr< int > &  iar,
const DynLinArr< double > &  dar1,
const DynLinArr< double > &  dar2,
const DynLinArr< double > &  dar3 
)

Definition at line 174 of file AbsArr.cpp.

177 {
178 Ifile << "One DynLinArr<int> array and three arrays DynLinArr<double>:\n";
179 long qiar = iar.get_qel();
180 long qdar1 = dar1.get_qel();
181 long qdar2 = dar2.get_qel();
182 long qdar3 = dar3.get_qel();
183 long q_max = qiar;
184 if (q_max < qdar1) q_max = qdar1;
185 if (q_max < qdar2) q_max = qdar2;
186 if (q_max < qdar3) q_max = qdar3;
187 indn.n += 2;
188
189 Ifile << "qiar=" << qiar << " qdar1=" << qdar1 << " qdar2=" << qdar2
190 << " qdar3=" << qdar3 << '\n';
191 iar.check();
192 dar1.check();
193 dar2.check();
194 dar3.check();
195 if (q_max <= 0) {
196 indn.n -= 2;
197 return;
198 }
199 Ifile << "index int array double array1 double array2 double "
200 "array3\n";
201 long i;
202 for (i = 0; i < q_max; i++) {
203 Ifile << std::setw(4) << i << ' ';
204 if (i < qiar)
205 file << std::setw(8) << iar[i] << ' ';
206 else
207 file << " "; // 19 blanks
208 if (i < qdar1)
209 file << std::setw(18) << dar1[i] << ' ';
210 else
211 file << " "; // 18 blanks
212 if (i < qdar2)
213 file << std::setw(18) << dar2[i] << ' ';
214 else
215 file << " "; // 18 blanks
216 if (i < qdar3)
217 file << std::setw(18) << dar3[i] << '\n';
218 else
219 file << " \n"; // 18 blanks
220 }
221 indn.n -= 2;
222 file << std::flush;
223}

◆ print_DynLinArr_long()

void Heed::print_DynLinArr_long ( std::ostream &  file,
const DynLinArr< long > &  f 
)

Definition at line 37 of file AbsArr.cpp.

37 {
38 Ifile << "DynLinArr<long>:";
39 long q = f.get_qel();
40 file << " q=" << q << '\n';
41 f.check();
42 if (q <= 0) return;
43 indn.n += 2;
44 if (q <= pq_arrelem_in_line) file << indn;
45 long i;
46 for (i = 0; i < q; i++) {
47 if (q <= pq_arrelem_in_line)
48 file << f[i] << ' '; // all in one line
49 else
50 Ifile << std::setw(4) << i << ' ' << f[i] << '\n'; // column
51 }
52 if (q <= pq_arrelem_in_line) file << '\n';
53 indn.n -= 2;
54 file << std::flush;
55}

◆ project_to_plane()

vec Heed::project_to_plane ( const vec r,
const vec normal 
)

Definition at line 124 of file vec.cpp.

124 {
125 pvecerror("vec project_to_plane(const vec& r, const vec& normal)");
126 vec per(normal || r);
127 if (per == dv0) {
128 // either one of vectors is 0 or they are parallel
129 return dv0;
130 }
131 vec ax = unit_vec(per || normal);
132 vfloat v = ax * r;
133 return v * ax;
134}
vec dv0(0, 0, 0)
Definition: vec.h:306

Referenced by Heed::mparticle::curvature().

◆ put_one_n()

void Heed::put_one_n ( std::ostringstream &  ost)
inline

Definition at line 73 of file String.h.

73 {
74 long qost = ost.str().length();
75 if (qost > 0) {
76 if (ost.str()[qost - 1] == '\n') { // nothing
77 } else {
78 ost << '\n';
79 }
80 } else
81 ost << '\n';
82}

Referenced by operator<<(), print_adr_DynLinArr(), print_DynArr(), and print_DynLinArr().

◆ put_qel_1()

template<class T >
void Heed::put_qel_1 ( DynLinArr< T > &  f,
long  fq 
)

Definition at line 1242 of file AbsArr.h.

1244{
1245 long q = f.get_qel();
1246 long n;
1247 for (n = 0; n < q; n++) f[n].put_qel(fq);
1248}

◆ rnorm_double()

void Heed::rnorm_double ( const double  r1,
const double  r2,
double &  x1,
double &  x2 
)

Definition at line 14 of file rnorm.cpp.

14 {
15 const double r = sqrt(-2.0 * log(r1));
16 const double fi = 2.0 * M_PI * r2;
17 x1 = r * cos(fi);
18 x2 = r * sin(fi);
19}
DoubleAc cos(const DoubleAc &f)
Definition: DoubleAc.cpp:432
DoubleAc sin(const DoubleAc &f)
Definition: DoubleAc.cpp:384

◆ rnorm_float()

void Heed::rnorm_float ( const float  r1,
const float  r2,
float &  x1,
float &  x2 
)

Definition at line 21 of file rnorm.cpp.

21 {
22 const float r = sqrt(-2.0 * log(r1));
23 const float fi = 2.0 * M_PI * r2;
24 x1 = r * cos(fi);
25 x2 = r * sin(fi);
26}

◆ rnorm_improved()

double Heed::rnorm_improved ( )
inline

Definition at line 11 of file rnorm.h.

11{ return Garfield::RndmGaussian(); }
double RndmGaussian()
Draw a Gaussian random variate with mean zero and standard deviation one.
Definition: Random.hh:24

Referenced by pois().

◆ set_position()

long Heed::set_position ( const std::string &  word,
std::istream &  istrm,
int  s_rewind,
int  s_req_sep 
)

Definition at line 23 of file definp.cpp.

24 {
26 "int set_position(const std::string& word, std::istream& istrm, int "
27 "s_rewind, int s_req_sep)");
28 check_econd11a(istrm.good(), != 1,
29 "before seekg, call for variable named " << word << '\n',
30 mcerr);
31 long nbeg, nnext;
32 char prev;
33 if (s_rewind == 1) istrm.seekg(0);
34 if (s_req_sep == 0) {
35 // int iret = findmark(istrm, word.c_str());
36 int iret = findmark_b(istrm, word, word.length(), nbeg, nnext, prev);
37
38 check_econd11a(iret, != 1,
39 "The keyword \"" << word.c_str() << "\" is not found\n",
40 mcerr);
41 check_econd11a(istrm.good(), != 1,
42 "after the call of findmark for variable named " << word
43 << '\n',
44 mcerr);
45 } else {
46 do {
47 int iret = findmark_b(istrm, word, word.length(), nbeg, nnext, prev);
48 check_econd11a(iret, != 1,
49 "The keyword \"" << word.c_str() << "\" is not found\n",
50 mcerr);
51 check_econd11a(istrm.good(), != 1,
52 "after the call of findmark for variable named " << word
53 << '\n',
54 mcerr);
55 if (nbeg == 0) return nbeg; // no need to search for separator
56 if (prev == '\n' || prev == ' ') return nbeg; // good separator
57 } while (1); // infinite loop
58 }
59 check_econd11a(istrm.good(), != 1,
60 "after findmark_b, call for variable named " << word << '\n',
61 mcerr);
62 return nbeg;
63}
int findmark_b(std::istream &file, T ws, long qws, long &nbeg, long &nnext, char &prev)
Definition: findmark.h:91

Referenced by definp_any_par(), and operator>>().

◆ sin()

DoubleAc Heed::sin ( const DoubleAc f)

Definition at line 384 of file DoubleAc.cpp.

384 {
385 // mcout<<"DoubleAc sin is starting, f="; f.print(mcout, 3);
386 double d = std::sin(f.get());
387 double di = std::sin(f.left_limit());
388 double da = std::sin(f.right_limit());
389 // Iprintn(mcout, d);
390 // Iprintn(mcout, di);
391 // Iprintn(mcout, da);
392 long n = left_round(f.get() / M_PI + 0.5);
393 long ni = left_round(f.left_limit() / M_PI + 0.5);
394 long na = left_round(f.right_limit() / M_PI + 0.5);
395 // Iprintn(mcout, n);
396 // Iprintn(mcout, ni);
397 // Iprintn(mcout, na);
398 if (n % 2 == 0) {
399 // Even number.
400 if (ni < n) {
401 di = -1.0;
402 da = std::max(di, da);
403 if (na > n) {
404 da = 1.0;
405 }
406 } else if (na > n) {
407 da = 1.0;
408 di = std::min(di, da);
409 }
410 } else {
411 // Odd number.
412 double temp = di;
413 di = da;
414 da = temp;
415 if (ni < n) {
416 da = 1.0;
417 di = std::min(di, da);
418 if (na > n) {
419 di = -1.0;
420 }
421 } else if (na > n) {
422 di = -1.0;
423 da = std::max(di, da);
424 }
425 }
426 // Iprintn(mcout, d);
427 // Iprintn(mcout, di);
428 // Iprintn(mcout, da);
429 return DoubleAc(d, di, da);
430}

Referenced by Heed::ElElasticScat::get_CS_Rutherford(), Heed::HeedDeltaElectronCS::HeedDeltaElectronCS(), Heed::HeedDeltaElectron::physics_after_new_speed(), Heed::vec::random_conic_vec(), Heed::vec::random_round_vec(), rnorm_double(), rnorm_float(), theta_two_part(), and Heed::vec::turn_new().

◆ sin2vec()

vfloat Heed::sin2vec ( const vec r1,
const vec r2 
)

Definition at line 107 of file vec.cpp.

107 {
108 // sinus of angle between vectors
109 pvecerror("vfloat sin2vec(const vec& r1, const vec& r2)");
110 vfloat lr1 = r1.length2();
111 vfloat lr2 = r2.length2();
112 if (lr1 == 0 || lr2 == 0) {
113 vecerror = 1;
114 return 0;
115 }
116 vfloat sn = (r1 || r2).length();
117 sn = sn * sn;
118 sn = sqrt(sn / (lr1 * lr2));
119 // mcout<<"r1="<<r1<<"r2="<<r2<<"sin="<<sn<<'\n';
120 return sn;
121 // return sin(ang2vec(r1,r2));
122}

Referenced by Heed::straight::distance().

◆ spexit_action()

void Heed::spexit_action ( std::ostream &  file)

Definition at line 299 of file FunNameStack.cpp.

299 {
300 file << "spexit_action: the streams will be now flushed\n";
301 file.flush();
302 mcout.flush();
303 mcerr.flush();
304 if (s_throw_exception_in_spexit != 1) {
305 if (s_exit_without_core == 1) {
306 file << "spexit_action: the exit(1) function is called\n";
307 exit(1);
308 } else {
309 file << "spexit_action: the abort function is called\n";
310 abort();
311 }
312 } else {
313 file << "spexit_action: an exception is now called\n";
314 throw ExcFromSpexit();
315 }
316}

◆ sqrt()

◆ square()

DoubleAc Heed::square ( const DoubleAc f)

Definition at line 325 of file DoubleAc.cpp.

325 {
326 if (f.left_limit() >= 0.0) {
327 return DoubleAc(f.get() * f.get(), f.left_limit() * f.left_limit(),
328 f.right_limit() * f.right_limit());
329 } else if (f.right_limit() >= 0.0) {
330 double t = std::max(-f.left_limit(), f.right_limit());
331 return DoubleAc(f.get() * f.get(), 0.0, t * t);
332 }
333 return DoubleAc(f.get() * f.get(), f.right_limit() * f.right_limit(),
334 f.left_limit() * f.left_limit());
335}

◆ t_entire_hisran_step_ar()

template<class T , class D , class M >
long Heed::t_entire_hisran_step_ar ( const M &  mesh,
const D &  integ_y,
rannum 
)

Definition at line 1465 of file tline.h.

1465 {
1466 mfunname("double t_entire_hisran_step_ar(...)");
1467
1468 // check_econd11(xpower , != 0 , mcerr);
1469 long qi = mesh.get_qi();
1470 long s_same = apeq_mant(integ_y[qi - 1], 1.0, 1.0e-12);
1471 check_econd11a(s_same, != 1.0, "integ_y[qi-1]=" << integ_y[qi - 1] << '\n',
1472 mcerr);
1473 // check_econd11(integ_y[qi-1] , != 1.0 , mcerr);
1474 int s_err;
1475
1476 long ret =
1478 integ_y, // dimension q-1
1479 rannum, &s_err);
1480 check_econd11a(s_err, != 0, "mesh=" << mesh << " integ_y=" << integ_y
1481 << " rannum=" << rannum << '\n',
1482 mcerr);
1483 return ret;
1484 // return t_find_entire_x_for_already_integ_step_ar
1485 // (mesh, // dimension q
1486 // integ_y, // dimension q-1
1487 // rannum,
1488 // &s_err);
1489}
long t_find_entire_x_for_already_integ_step_ar(const M &mesh, const D &y, T integ, int *s_err)
Definition: tline.h:1313

◆ t_find_entire_x_for_already_integ_step_ar()

template<class T , class D , class M >
long Heed::t_find_entire_x_for_already_integ_step_ar ( const M &  mesh,
const D &  y,
integ,
int *  s_err 
)

Definition at line 1313 of file tline.h.

1316{
1317 mfunname("double t_find_entire_x_for_already_integ_step_ar(...)");
1318 // Iprintn(mcout, mesh);
1319 // Iprintn(mcout, integ);
1320 *s_err = 0;
1321 // check_econd11(xpower , != 0 , mcerr);
1322 check_econd11(integ, < 0.0, mcerr);
1323 long qi = mesh.get_qi();
1324 check_econd12(qi, <, 1, mcerr);
1325 // if(x1 > x2) return 0.0;
1326 long xmin = mesh.get_xmin();
1327 long xmax = mesh.get_xmax();
1328 if (integ == 0) return xmin;
1329 if (integ > y[qi - 1]) {
1330 *s_err = 1;
1331 return xmax;
1332 }
1333 if (integ == y[qi - 1]) return xmax;
1334 if (integ < y[0]) { // answer in the first bin
1335 long xp1(0);
1336 mesh.get_scoor(0, xp1);
1337 return xp1;
1338 }
1339 // binary search
1340 long nl = 0;
1341 long nr = qi - 1;
1342 long nc;
1343 while (nr - nl > 1) {
1344 nc = (nr + nl) / 2;
1345 if (integ < y[nc])
1346 nr = nc;
1347 else
1348 nl = nc;
1349 }
1350 // Iprint2n(mcout, nl, nr);
1351 // Iprint2n(mcout, y[nl], y[nr]);
1352 // Iprint2n(mcout, nl, nr);
1353 long x(0);
1354 mesh.get_scoor(nr, x);
1355 // Iprintn(mcout, x);
1356
1357 return x;
1358}

Referenced by t_entire_hisran_step_ar().

◆ t_find_interval()

template<class T , class D >
long Heed::t_find_interval ( double  x,
long  q,
const D &  coor 
)

Definition at line 278 of file tline.h.

278 {
279 long n1, n2, n3;
280#ifndef TLINE_REDUCE_TO_RAW_ARR
281 if (q <= 1) return -1;
282 if (x < coor[0] || x > coor[q - 1]) return -1;
283 if (x < coor[1]) return 0;
284 if (x >= coor[q - 2]) return q - 2;
285 n1 = 0;
286 n2 = q - 1;
287 while (n2 - n1 > 1) {
288 n3 = n1 + (n2 - n1) / 2;
289 if (x < coor[n3])
290 n2 = n3;
291 else
292 n1 = n3;
293 }
294 return n1;
295#else
296 T* arr = &(coor[0]); // take the address of the first element
297 if (q <= 1) return -1;
298 if (x < arr[0] || x > arr[q - 1]) return -1;
299 if (x < arr[1]) return 0;
300 if (x >= arr[q - 2]) return q - 2;
301 n1 = 0;
302 n2 = q - 1;
303 while (n2 - n1 > 1) {
304 n3 = n1 + (n2 - n1) / 2;
305 if (x < arr[n3])
306 n2 = n3;
307 else
308 n1 = n3;
309 }
310 return n1;
311
312#endif
313}

◆ t_find_interval_end()

template<class T , class D >
long Heed::t_find_interval_end ( double  x,
long  q,
const D &  coor,
long  n_start 
)

Definition at line 322 of file tline.h.

322 {
323 long n1, n2, n3;
324 if (n_start < 0 || n_start > q - 1) {
325 mcerr << " ERROR in t_find_interval_end(...):\n";
326 mcerr << "n_start < 0 || n_start > q-1\n";
327 Iprint2n(mcout, n_start, q);
328 spexit(mcerr);
329 }
330#ifndef TLINE_REDUCE_TO_RAW_ARR
331 // if(q <= 1) return -1;
332 if (q - n_start <= 1) return -1;
333 if (x < coor[n_start] || x > coor[q - 1]) return -1;
334 if (x < coor[n_start + 1]) return n_start;
335 if (x >= coor[q - 2]) return q - 2;
336 n1 = n_start;
337 n2 = q - 1;
338 while (n2 - n1 > 1) {
339 n3 = n1 + (n2 - n1) / 2;
340 if (x < coor[n3])
341 n2 = n3;
342 else
343 n1 = n3;
344 }
345 return n1;
346#else
347 T* arr = &(coor[0]); // take the address of the first element
348 // if(q <= 1) return -1;
349 if (q - n_start <= 1) return -1;
350 if (x < arr[n_start] || x > arr[q - 1]) return -1;
351 if (x < arr[n_start + 1]) return n_start;
352 if (x >= arr[q - 2]) return q - 2;
353 n1 = n_start;
354 n2 = q - 1;
355 while (n2 - n1 > 1) {
356 n3 = n1 + (n2 - n1) / 2;
357 if (x < arr[n3])
358 n2 = n3;
359 else
360 n1 = n3;
361 }
362 return n1;
363
364#endif
365}

◆ t_find_x_for_already_integ_step_ar()

template<class T , class D , class M >
T Heed::t_find_x_for_already_integ_step_ar ( const M &  mesh,
const D &  y,
integ,
int *  s_err 
)

Definition at line 1249 of file tline.h.

1252{
1253 mfunname("double t_find_x_for_already_integ_step_ar(...)");
1254
1255 *s_err = 0;
1256 // check_econd11(xpower , != 0 , mcerr);
1257 check_econd11(integ, < 0.0, mcerr);
1258 long qi = mesh.get_qi();
1259 check_econd12(qi, <, 1, mcerr);
1260 // if(x1 > x2) return 0.0;
1261 double xmin = mesh.get_xmin();
1262 double xmax = mesh.get_xmax();
1263 if (integ == 0.0) return xmin;
1264 if (integ > y[qi - 1]) {
1265 *s_err = 1;
1266 return xmax;
1267 }
1268 if (integ == y[qi - 1]) return xmax;
1269 if (integ < y[0]) { // answer in the first bin
1270 T xp1(0.0);
1271 T xp2(0.0);
1272 mesh.get_scoor(0, xp1);
1273 mesh.get_scoor(1, xp2);
1274 return xp1 + (xp2 - xp1) * integ / y[0];
1275 }
1276 // binary search
1277 long nl = 0;
1278 long nr = qi - 1;
1279 long nc;
1280 while (nr - nl > 1) {
1281 nc = (nr + nl) / 2;
1282 if (integ < y[nc])
1283 nr = nc;
1284 else
1285 nl = nc;
1286 }
1287 // Iprint2n(mcout, nl, nr);
1288 T xl(0.0);
1289 T xr(0.0);
1290 mesh.get_scoor(nl + 1, xl);
1291 mesh.get_scoor(nr + 1, xr);
1292 // Note "+1" in the previous two expressions.
1293 // This arises from the fact that the nl'th element of
1294 // y-array contains integral of nl'th bin plus all previous bins.
1295 // So y[nl] is related to x of nl+1.
1296 T a = (xr - xl) / (y[nr] - y[nl]);
1297 T ret = xl + a * (integ - y[nl]);
1298
1299 return ret;
1300}

Referenced by t_hisran_step_ar().

◆ t_hispre_step_ar()

template<class T , class D , class M >
T Heed::t_hispre_step_ar ( const M &  mesh,
const D &  y,
D &  integ_y 
)

Definition at line 1366 of file tline.h.

1368 {
1369 mfunname("double t_hispre_step_ar(...)");
1370
1371 // check_econd11(xpower , != 0 , mcerr);
1372 long qi = mesh.get_qi();
1373 check_econd12(qi, <, 1, mcerr);
1374
1375 T s(0.0);
1376 long n = 0;
1377 T xp1(0.0);
1378 T xp2(0.0);
1379 mesh.get_scoor(n, xp2);
1380 for (n = 0; n < qi; n++) {
1381 xp1 = xp2;
1382 mesh.get_scoor(n + 1, xp2);
1383 T step = xp2 - xp1;
1384 check_econd11a(y[n], < 0.0,
1385 "n=" << n << " xp1=" << xp1 << " xp2=" << xp2 << '\n',
1386 mcerr);
1387 s = s + y[n] * step;
1388 integ_y[n] = s;
1389 // Iprint3n(mcout, n, s1, integ);
1390 }
1391 // TODO!! (HS)
1392 // check_econd11a(s, <= 0.0, "y=" << y << " integ_y=" << integ_y << '\n',
1393 // mcerr);
1394 for (n = 0; n < qi; n++) {
1395 integ_y[n] /= s;
1396 }
1397 return s;
1398}

◆ t_hisran_step_ar()

template<class T , class D , class M >
T Heed::t_hisran_step_ar ( const M &  mesh,
const D &  integ_y,
rannum 
)

Definition at line 1403 of file tline.h.

1403 {
1404 mfunname("double t_hisran_step_ar(...)");
1405 // check_econd11(xpower , != 0 , mcerr);
1406 long qi = mesh.get_qi();
1407 long s_same = apeq_mant(integ_y[qi - 1], 1.0, 1.0e-12);
1408 check_econd11a(s_same, != 1.0, "integ_y[qi-1]=" << integ_y[qi - 1] << '\n',
1409 mcerr);
1410
1411 // Iprintn(mcout, rannum);
1412 // check_econd11(integ_y[qi-1] , != 1.0 , mcerr);
1413 int s_err;
1414
1415 T ret = t_find_x_for_already_integ_step_ar(mesh, // dimension q
1416 integ_y, // dimension q-1
1417 rannum, &s_err);
1418 // TODO (HS)!!
1419 // check_econd11a(s_err, != 0, "mesh=" << mesh << " integ_y=" << integ_y
1420 // << " rannum=" << rannum << '\n',
1421 // mcerr);
1422 return ret;
1423 // return t_find_x_for_already_integ_step_ar
1424 // (mesh, // dimension q
1425 // integ_y, // dimension q-1
1426 // rannum,
1427 // &s_err);
1428}
T t_find_x_for_already_integ_step_ar(const M &mesh, const D &y, T integ, int *s_err)
Definition: tline.h:1249

Referenced by Heed::HeedParticle::physics(), and Heed::HeedParticle_BGM::physics().

◆ t_integ_generic_point_ar()

template<class T , class D , class M >
T Heed::t_integ_generic_point_ar ( const M &  mesh,
const D &  y,
T(*)(T xp1, T yp1, T xp2, T yp2, T xmin, T xmax, T x1, T x2)  fun,
x1,
x2,
int  s_extrap_left,
left_bond,
int  s_extrap_right,
right_bond 
)

Definition at line 1823 of file tline.h.

1827 {
1828 mfunname("double t_integ_generic_point_ar(...)");
1829
1830 // mcout<<"Strart t_integ_straight_point_ar\n";
1831 // check_econd21(xpower , != 0 && , != 1 , mcerr);
1832 check_econd12(x1, >, x2, mcerr);
1833 long qi = mesh.get_qi();
1834 check_econd12(qi, <, 1, mcerr);
1835 // if(x1 > x2) return 0.0;
1836 double xmin = mesh.get_xmin();
1837 double xmax = mesh.get_xmax();
1838 if (x2 <= xmin && s_extrap_left == 0) return 0.0;
1839 if (x1 >= xmax && s_extrap_right == 0) return 0.0;
1840 if (x2 <= left_bond) return 0.0;
1841 if (x1 >= right_bond) return 0.0;
1842 // long istart, iafterend; // indexes to sum total intervals
1843 if (x1 < left_bond) x1 = left_bond;
1844 if (x2 > right_bond) x2 = right_bond;
1845 if (x1 <= xmin && s_extrap_left == 0) x1 = xmin;
1846 if (x2 > xmax && s_extrap_left == 0) x2 = xmax;
1847 long np1, np2;
1848 T bp1, bp2;
1849 int i_ret = 0;
1850 // restore the interval in which x1 reside
1851 i_ret = mesh.get_interval_extrap(x1, np1, bp1, np2, bp2);
1852 // restore the x-coordinates of given points
1853 T xp1;
1854 mesh.get_scoor(np1, xp1);
1855 T xp2;
1856 mesh.get_scoor(np2, xp2);
1857 T res;
1858 T yp1 = y[np1];
1859 T yp2 = y[np2];
1860 if (i_ret == 2 || x2 <= xp2) // then all in one interval
1861 {
1862 res = fun(xp1, yp1, xp2, yp2, xmin, xmax, x1, x2);
1863 } else {
1864 // integrate only till end of the current interval
1865 T x1i = x1;
1866 T x2i = xp2;
1867 res = fun(xp1, yp1, xp2, yp2, xmin, xmax, x1i, x2i);
1868 // x2i = x1; // prepere for loop
1869 int s_stop = 0;
1870 do {
1871 np1 = np2;
1872 np2++;
1873 xp1 = xp2;
1874 mesh.get_scoor(np2, xp2);
1875 x1i = x2i;
1876 if (xp2 >= x2) {
1877 x2i = x2; // till end of integral
1878 s_stop = 1;
1879 } else {
1880 if (np2 == qi) // end of the mesh, but x2 is farther
1881 {
1882 x2i = x2; // till end of integral
1883 s_stop = 1;
1884 } else {
1885 x2i = xp2; // till end of current interval
1886 s_stop = 0;
1887 }
1888 }
1889 yp1 = yp2;
1890 yp2 = y[np2];
1891 res += fun(xp1, yp1, xp2, yp2, xmin, xmax, x1i, x2i);
1892 // Iprint2n(mcout, xp1, xp2);
1893 // Iprint2n(mcout, x1i, x2i);
1894 // Iprint2n(mcout, yp1, yp2);
1895 // Iprint2n(mcout, res, s_stop);
1896
1897 } while (s_stop == 0);
1898 }
1899 return res;
1900}

Referenced by Heed::SimpleTablePhotoAbsCS::get_integral_CS().

◆ t_integ_generic_step_ar()

template<class T , class D , class M >
T Heed::t_integ_generic_step_ar ( const M &  mesh,
const D &  y,
T(*)(long np, T xp1, T xp2, T yp, T xmin, T xmax, T x1, T x2)  fun,
x1,
x2 
)

Definition at line 988 of file tline.h.

994 {
995 mfunname("double t_integ_step_ar(...)");
996
997 check_econd12(x1, >, x2, mcerr);
998 long qi = mesh.get_qi();
999 check_econd12(qi, <, 1, mcerr);
1000 // if(x1 > x2) return 0;
1001 double xmin = mesh.get_xmin();
1002 double xmax = mesh.get_xmax();
1003 if (x2 <= xmin) return 0;
1004 if (x1 >= xmax) return 0;
1005 if (x1 == x2) return 0;
1006 long istart, iafterend; // indexes to sum total intervals
1007 T s(0);
1008 if (x1 <= xmin) {
1009 x1 = xmin;
1010 istart = 0;
1011 } else {
1012 long n1, n2;
1013 T b1, b2;
1014 int i_ret = 0;
1015 i_ret = mesh.get_interval(x1, n1, b1, n2, b2);
1016 // Iprint2n(mcout, x1, i_ret);
1017 // Iprint4n(mcout, n1, b1, n2, b2);
1018 check_econd11(i_ret, != 1, mcerr);
1019 if (b2 - x1 > 0) // otherwise it could be only equal to 0
1020 {
1021 if (x2 <= b2) // if x2 in the same interval
1022 {
1023 s = fun(n1, b1, b2, y[n1], xmin, xmax, x1, x2);
1024 return s;
1025 }
1026 s = fun(n1, b1, b2, y[n1], xmin, xmax, x1, x2);
1027 }
1028 istart = n2;
1029 }
1030 if (x2 >= xmax) {
1031 x2 = xmax;
1032 iafterend = qi;
1033 } else {
1034 long n1, n2;
1035 T b1, b2;
1036 int i_ret = 0;
1037 i_ret = mesh.get_interval(x2, n1, b1, n2, b2);
1038 // Iprint2n(mcout, x2, i_ret);
1039 // Iprint4n(mcout, n1, b1, n2, b2);
1040 check_econd11(i_ret, != 1, mcerr);
1041 if (x2 - b1 > 0) {
1042 s += fun(n1, b1, b2, y[n1], xmin, xmax, b1, x2);
1043 }
1044 iafterend = n1;
1045 }
1046 // Iprint2n(mcout, istart, iafterend);
1047 long i;
1048 double b;
1049 mesh.get_scoor(istart, b);
1050 for (i = istart; i < iafterend; i++) {
1051 double a = b;
1052 mesh.get_scoor(i + 1, b);
1053 s += fun(i, a, b, y[i], xmin, xmax, a, b);
1054 }
1055 // Iprintn(mcout, s);
1056
1057 // T t;
1058 return s;
1059}

◆ t_integ_power_2point()

template<class T >
T Heed::t_integ_power_2point ( x1,
y1,
x2,
y2,
xl,
xr 
)

Definition at line 1698 of file tline.h.

1700{
1701 mfunname("double t_integ_power_2point(...)");
1702
1703 check_econd11(y1, <= 0.0, mcerr);
1704 check_econd11(y2, <= 0.0, mcerr);
1705 check_econd12(y1, ==, y2, mcerr);
1706 check_econd12(x1, ==, x2, mcerr);
1707 T pw = log(y1 / y2) / log(x1 / x2);
1708 check_econd11(pw, == -1.0, mcerr);
1709 T k = y1 * pow(x1, -pw);
1710 T t = k / (1 + pw) * (pow(xr, (pw + 1)) - pow(xl, (pw + 1)));
1711 return t;
1712}

◆ t_integ_step_ar()

template<class T , class D , class M >
T Heed::t_integ_step_ar ( const M &  mesh,
const D &  y,
x1,
x2,
int  xpower 
)

Definition at line 896 of file tline.h.

898{
899 mfunname("double t_integ_step_ar(...)");
900
901 check_econd21(xpower, != 0 &&, != 1, mcerr);
902 check_econd12(x1, >, x2, mcerr);
903 long qi = mesh.get_qi();
904 check_econd12(qi, <, 1, mcerr);
905 // if(x1 > x2) return 0;
906 double xmin = mesh.get_xmin();
907 double xmax = mesh.get_xmax();
908 if (x2 <= xmin) return 0;
909 if (x1 >= xmax) return 0;
910 if (x1 == x2) return 0;
911 long istart, iafterend; // indexes to sum total intervals
912 T s(0);
913 if (x1 <= xmin) {
914 x1 = xmin;
915 istart = 0;
916 } else {
917 long n1, n2;
918 T b1, b2;
919 int i_ret = 0;
920 i_ret = mesh.get_interval(x1, n1, b1, n2, b2);
921 // Iprint2n(mcout, x1, i_ret);
922 // Iprint4n(mcout, n1, b1, n2, b2);
923 check_econd11(i_ret, != 1, mcerr);
924 if (b2 - x1 > 0) { // otherwise it could be only equal to 0
925 if (x2 <= b2) { // if x2 in the same interval
926 if (xpower == 0) {
927 s = (x2 - x1) * y[n1];
928 } else {
929 s = 0.5 * (x2 * x2 - x1 * x1) * y[n1];
930 }
931 return s;
932 }
933 if (xpower == 0) {
934 s += (b2 - x1) * y[n1];
935 } else {
936 s += 0.5 * (b2 * b2 - x1 * x1) * y[n1];
937 }
938 }
939 istart = n2;
940 }
941 if (x2 >= xmax) {
942 x2 = xmax;
943 iafterend = qi;
944 } else {
945 long n1, n2;
946 T b1, b2;
947 int i_ret = 0;
948 i_ret = mesh.get_interval(x2, n1, b1, n2, b2);
949 // Iprint2n(mcout, x2, i_ret);
950 // Iprint4n(mcout, n1, b1, n2, b2);
951 check_econd11(i_ret, != 1, mcerr);
952 if (x2 - b1 > 0) {
953 if (xpower == 0) {
954 s += (x2 - b1) * y[n1];
955 } else {
956 s += 0.5 * (x2 * x2 - b1 * b1) * y[n1];
957 }
958 }
959 iafterend = n1;
960 }
961 // Iprint2n(mcout, istart, iafterend);
962 long i;
963 double b;
964 mesh.get_scoor(istart, b);
965 if (xpower == 0) {
966 for (i = istart; i < iafterend; i++) {
967 double a = b;
968 mesh.get_scoor(i + 1, b);
969 s += (b - a) * y[i];
970 }
971 } else {
972 for (i = istart; i < iafterend; i++) {
973 double a = b;
974 mesh.get_scoor(i + 1, b);
975 s += 0.5 * (b * b - a * a) * y[i];
976 }
977 }
978 return s;
979}

Referenced by t_mean_step_ar().

◆ t_integ_straight_2point()

template<class T >
T Heed::t_integ_straight_2point ( x1,
y1,
x2,
y2,
xl,
xr,
int  xpower,
int  s_ban_neg 
)

Definition at line 1543 of file tline.h.

1547{
1548 mfunname("double t_integ_straight_2point(...)");
1549 check_econd12(x1, ==, x2, mcerr);
1550
1551 T a = (y2 - y1) / (x2 - x1);
1552 T b = y1;
1553 T yl = a * (xl - x1) + b;
1554 T yr = a * (xr - x1) + b;
1555 if (s_ban_neg == 1) {
1556 if (yl <= 0.0 && yr <= 0.0) return 0.0;
1557 if (yl < 0.0 || yr < 0.0) {
1558 T xz = x1 - b / a;
1559 if (yl < 0.0) {
1560 xl = xz;
1561 yl = 0.0;
1562 } else {
1563 xr = xz;
1564 yr = 0.0;
1565 }
1566 }
1567 }
1568 T res;
1569 if (xpower == 0)
1570 res = 0.5 * a * (xr * xr - xl * xl) + (b - a * x1) * (xr - xl);
1571 else
1572 res = a * (xr * xr * xr - xl * xl * xl) / 3.0 +
1573 0.5 * (b - a * x1) * (xr * xr - xl * xl);
1574
1575 return res;
1576}

◆ t_integ_straight_point_ar()

template<class T , class D , class M >
T Heed::t_integ_straight_point_ar ( const M &  mesh,
const D &  y,
x1,
x2,
int  xpower,
int  s_ban_neg,
int  s_extrap_left,
left_bond,
int  s_extrap_right,
right_bond 
)

Definition at line 1715 of file tline.h.

1720 {
1721 mfunname("double t_integ_straight_point_ar(...)");
1722
1723 // mcout<<"Strart t_integ_straight_point_ar\n";
1724 check_econd21(xpower, != 0 &&, != 1, mcerr);
1725 check_econd12(x1, >, x2, mcerr);
1726 long qi = mesh.get_qi();
1727 check_econd12(qi, <, 1, mcerr);
1728 // if(x1 > x2) return 0.0;
1729 double xmin = mesh.get_xmin();
1730 double xmax = mesh.get_xmax();
1731 if (x2 <= xmin && s_extrap_left == 0) return 0.0;
1732 if (x1 >= xmax && s_extrap_right == 0) return 0.0;
1733 if (x2 <= left_bond) return 0.0;
1734 if (x1 >= right_bond) return 0.0;
1735 T s(0.0);
1736 if (x1 < left_bond) x1 = left_bond;
1737 if (x2 > right_bond) x2 = right_bond;
1738 if (x1 <= xmin && s_extrap_left == 0) x1 = xmin;
1739 if (x2 > xmax && s_extrap_left == 0) x2 = xmax;
1740 long np1, np2;
1741 T bp1, bp2;
1742 int i_ret = 0;
1743 // restore the interval in which x1 reside
1744 i_ret = mesh.get_interval_extrap(x1, np1, bp1, np2, bp2);
1745 // restore the x-coordinates of given points
1746 T xp1;
1747 mesh.get_scoor(np1, xp1);
1748 T xp2;
1749 mesh.get_scoor(np2, xp2);
1750 T res;
1751 T yp1 = y[np1];
1752 T yp2 = y[np2];
1753 if (i_ret == 2 || x2 <= xp2) // then all in one interval
1754 {
1755 res = t_integ_straight_2point<T>(xp1, yp1, xp2, yp2, x1, x2, xpower,
1756 s_ban_neg);
1757 } else {
1758 // integrate only till end of the current interval
1759 T x1i = x1;
1760 T x2i = xp2;
1761 res = t_integ_straight_2point<T>(xp1, yp1, xp2, yp2, x1i, x2i, xpower,
1762 s_ban_neg);
1763 // x2i = x1; // prepere for loop
1764 int s_stop = 0;
1765 do {
1766 np1 = np2;
1767 np2++;
1768 xp1 = xp2;
1769 mesh.get_scoor(np2, xp2);
1770 x1i = x2i;
1771 if (xp2 >= x2) {
1772 x2i = x2; // till end of integral
1773 s_stop = 1;
1774 } else {
1775 if (np2 == qi) // end of the mesh, but x2 is farther
1776 {
1777 x2i = x2; // till end of integral
1778 s_stop = 1;
1779 } else {
1780 x2i = xp2; // till end of current interval
1781 s_stop = 0;
1782 }
1783 }
1784 yp1 = yp2;
1785 yp2 = y[np2];
1786 res += t_integ_straight_2point<T>(xp1, yp1, xp2, yp2, x1i, x2i, xpower,
1787 s_ban_neg);
1788 // Iprint2n(mcout, xp1, xp2);
1789 // Iprint2n(mcout, x1i, x2i);
1790 // Iprint2n(mcout, yp1, yp2);
1791 // Iprint2n(mcout, res, s_stop);
1792
1793 } while (s_stop == 0);
1794 }
1795 return res;
1796}

Referenced by t_mean_straight_point_ar().

◆ t_mean_step_ar()

template<class T , class D , class M >
T Heed::t_mean_step_ar ( const M &  mesh,
const D &  y,
x1,
x2,
int &  s_err 
)

Definition at line 1495 of file tline.h.

1496 {
1497 mfunname("double t_mean_step_ar(...)");
1498 s_err = 0;
1499 T integ = t_integ_step_ar(mesh, y, x1, x2, 0);
1500 if (integ == 0) {
1501 s_err = 1;
1502 return 0.0;
1503 }
1504 T xinteg = t_integ_step_ar(mesh, y, x1, x2, 1);
1505 return xinteg / integ;
1506}
T t_integ_step_ar(const M &mesh, const D &y, T x1, T x2, int xpower)
Definition: tline.h:896

◆ t_mean_straight_point_ar()

template<class T , class D , class M >
T Heed::t_mean_straight_point_ar ( const M &  mesh,
const D &  y,
x1,
x2,
int  s_extrap_left,
left_bond,
int  s_extrap_right,
right_bond,
int &  s_err 
)

Definition at line 1799 of file tline.h.

1802 {
1803 mfunname("double t_mean_straight_point_ar(...)");
1804 s_err = 0;
1805 T integ = t_integ_straight_point_ar(mesh, y, x1, x2, 0, 1, s_extrap_left,
1806 left_bond, s_extrap_right, right_bond);
1807 if (integ == 0) {
1808 s_err = 1;
1809 return 0.0;
1810 }
1811 T xinteg = t_integ_straight_point_ar(mesh, y, x1, x2, 1, 1, s_extrap_left,
1812 left_bond, s_extrap_right, right_bond);
1813 return xinteg / integ;
1814}
T t_integ_straight_point_ar(const M &mesh, const D &y, T x1, T x2, int xpower, int s_ban_neg, int s_extrap_left, T left_bond, int s_extrap_right, T right_bond)
Definition: tline.h:1715

◆ t_opposite_hisran_step_ar()

template<class T , class D , class M >
T Heed::t_opposite_hisran_step_ar ( const M &  mesh,
const D &  integ_y,
x 
)

Definition at line 1434 of file tline.h.

1434 {
1435 mfunname("double t_opposite_hisran_step_ar(...)");
1436
1437 // check_econd11(xpower , != 0 , mcerr);
1438 long qi = mesh.get_qi();
1439 long s_same = apeq_mant(integ_y[qi - 1], 1.0, 1.0e-12);
1440 check_econd11a(s_same, != 1.0, "integ_y[qi-1]=" << integ_y[qi - 1] << '\n',
1441 mcerr);
1442
1443 long n1;
1444 T b1;
1445 long n2;
1446 T b2;
1447
1448 mesh.get_interval_extrap(x, n1, b1, n2, b2);
1449 T y1;
1450 T y2;
1451 if (n1 == 0) {
1452 y1 = 0.0;
1453 y2 = integ_y[0];
1454 } else {
1455 y1 = integ_y[n1 - 1];
1456 y2 = integ_y[n2 - 1];
1457 }
1458 T res = y1 + ((y2 - y1) / (b2 - b1)) * (x - b1);
1459 return res;
1460}

◆ t_value_exp_2point()

template<class T >
T Heed::t_value_exp_2point ( x1,
y1,
x2,
y2,
x 
)

Definition at line 1680 of file tline.h.

1680 {
1681 mfunname("double t_value_exp_2point(...)");
1682
1683 check_econd11(y1, <= 0.0, mcerr);
1684 check_econd11(y2, <= 0.0, mcerr);
1685 check_econd12(y1, ==, y2, mcerr);
1686 check_econd12(x1, ==, x2, mcerr);
1687 T res;
1688
1689 T a = log(y1 / y2) / (x1 - x2);
1690 T c = y1 / exp(a * x1);
1691 // check_econd11(pw , == -1.0 , mcerr);
1692 res = c * exp(a * x);
1693 ;
1694 return res;
1695}

◆ t_value_generic_point_ar()

template<class T , class D , class M >
T Heed::t_value_generic_point_ar ( const M &  mesh,
const D &  y,
T(*)(T xp1, T yp1, T xp2, T yp2, T xmin, T xmax, T x)  funval,
x,
int  s_extrap_left,
left_bond,
int  s_extrap_right,
right_bond 
)

Definition at line 1606 of file tline.h.

1611 {
1612 // 0 - not include, 1 - include
1613 mfunname("double t_value_generic_point_ar(...)");
1614 double xmin = mesh.get_xmin();
1615 double xmax = mesh.get_xmax();
1616 // Iprint3n(mcout, x, xmin, xmax);
1617 if (x < left_bond) return 0.0;
1618 if (x > right_bond) return 0.0;
1619 if (x < xmin && s_extrap_left == 0) return 0.0;
1620 if (x > xmax && s_extrap_right == 0) return 0.0;
1621 long n1, n2;
1622 T b1, b2;
1623 mesh.get_interval_extrap(x, n1, b1, n2, b2);
1624 T x1;
1625 mesh.get_scoor(n1, x1);
1626 T x2;
1627 mesh.get_scoor(n2, x2);
1628 return funval(x1, y[n1], x2, y[n2], left_bond, right_bond, x);
1629}

Referenced by Heed::SimpleTablePhotoAbsCS::get_CS().

◆ t_value_power_2point()

template<class T >
T Heed::t_value_power_2point ( x1,
y1,
x2,
y2,
x 
)

Definition at line 1638 of file tline.h.

1638 {
1639 mfunname("double t_value_power_2point(...)");
1640
1641 check_econd11(y1, <= 0.0, mcerr);
1642 check_econd11(y2, <= 0.0, mcerr);
1643 check_econd12(y1, ==, y2, mcerr);
1644 check_econd12(x1, ==, x2, mcerr);
1645 T res = y1;
1646 if (x1 <= 0.0 && x2 >= 0.0) {
1647 mcerr << "T t_value_power_2point(...): \n";
1648 mcerr << "x's are of different sign, power cannot be drawn\n";
1649 spexit(mcerr);
1650 } else {
1651 T pw = log(y1 / y2) / log(x1 / x2);
1652 // check_econd11(pw , == -1.0 , mcerr);
1653 res = y1 * pow(x, pw) / pow(x1, pw);
1654 }
1655 return res;
1656}

◆ t_value_straight_2point()

template<class T >
T Heed::t_value_straight_2point ( x1,
y1,
x2,
y2,
x,
int  s_ban_neg 
)

Definition at line 1509 of file tline.h.

1509 {
1510 mfunname("double t_value_straight_2point(...)");
1511 check_econd12(x1, ==, x2, mcerr);
1512
1513 T a = (y2 - y1) / (x2 - x1);
1514 // Less numerical precision
1515 // T b = y[n1];
1516 // T res = a * ( x - x1) + b;
1517 // More numerical precision (although it is not proved),
1518 // starting from what is closer to x
1519 T res;
1520 T dx1 = x - x1;
1521 T adx1 = (dx1 > 0) ? dx1 : -dx1; // absolute value
1522 // if(dx1 > 0)
1523 // adx1 = dx1;
1524 // else
1525 // adx1 = -dx1;
1526 T dx2 = x - x2;
1527 T adx2 = (dx2 > 0) ? dx2 : -dx2; // absolute value
1528 // if(dx2 > 0)
1529 // adx2 = dx2;
1530 // else
1531 // adx2 = -dx2;
1532 if (adx1 < adx2) // x is closer to x1
1533 {
1534 res = a * dx1 + y1;
1535 } else {
1536 res = a * dx2 + y2;
1537 }
1538 if (s_ban_neg == 1 && res < 0.0) res = 0.0;
1539 return res;
1540}

Referenced by t_value_straight_point_ar().

◆ t_value_straight_point_ar()

template<class T , class D , class M >
T Heed::t_value_straight_point_ar ( const M &  mesh,
const D &  y,
x,
int  s_ban_neg,
int  s_extrap_left,
left_bond,
int  s_extrap_right,
right_bond 
)

Definition at line 1581 of file tline.h.

1584 {
1585 // 0 - not include, 1 - include
1586 mfunname("double t_value_straight_point_ar(...)");
1587 double xmin = mesh.get_xmin();
1588 double xmax = mesh.get_xmax();
1589 // Iprint3n(mcout, x, xmin, xmax);
1590 if (x < left_bond) return 0.0;
1591 if (x > right_bond) return 0.0;
1592 if (x < xmin && s_extrap_left == 0) return 0.0;
1593 if (x > xmax && s_extrap_right == 0) return 0.0;
1594 long n1, n2;
1595 T b1, b2;
1596 mesh.get_interval_extrap(x, n1, b1, n2, b2);
1597 T x1;
1598 mesh.get_scoor(n1, x1);
1599 T x2;
1600 mesh.get_scoor(n2, x2);
1601 return t_value_straight_2point(x1, y[n1], x2, y[n2], x, s_ban_neg);
1602}
T t_value_straight_2point(T x1, T y1, T x2, T y2, T x, int s_ban_neg)
Definition: tline.h:1509

◆ tabs()

template<class T >
T Heed::tabs ( const T &  x)
inline

Definition at line 50 of file minmax.h.

50 {
51 return x >= 0 ? x : -x;
52}

Referenced by apeq_mant().

◆ theta_two_part()

void Heed::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.

Definition at line 28 of file kinem.cpp.

29 {
30 mfunname("void theta_two_part(...)");
31
32 const double Mp2 = Mp * Mp;
33 const double d0 = Ep0 * Ep0 - Mp2;
34 check_econd11(d0, <= 0, mcerr);
35 const double d1 = Ep1 * Ep1 - Mp2;
36 check_econd11(d1, <= 0, mcerr);
37 double ctheta = (-Ep0 * Mt + Ep0 * Ep1 + Mt * Ep1 - Mp2) / sqrt(d0 * d1);
38 if (ctheta < -1.0) ctheta = -1.0;
39 if (ctheta > 1.0) ctheta = 1.0;
40 theta_p = acos(ctheta);
41 if (theta_p == 0.0) {
42 theta_t = CLHEP::halfpi;
43 return;
44 }
45 double Pp1 = Ep1 * Ep1 - Mp2;
46 check_econd11(Pp1, < 0, mcerr);
47 if (Pp1 == 0.0) {
48 theta_t = CLHEP::halfpi;
49 return;
50 }
51 Pp1 = sqrt(Pp1);
52 const double d3 = Ep0 + Mt - Ep1;
53 const double dd1 = d3 * d3 - Mt * Mt;
54 check_econd11(dd1, <= 0, mcerr);
55 const double dd2 = sqrt(dd1);
56 check_econd11(dd2, <= 0, mcerr);
57 double stheta_t = -Pp1 * (sin(theta_p) / dd2);
58 if (stheta_t < -1.0) stheta_t = -1.0;
59 if (stheta_t > 1.0) stheta_t = 1.0;
60 theta_t = asin(stheta_t);
61}
DoubleAc acos(const DoubleAc &f)
Definition: DoubleAc.cpp:490

Referenced by Heed::HeedParticle::physics(), and Heed::HeedParticle_BGM::physics().

◆ yesindent()

std::ostream & Heed::yesindent ( std::ostream &  f)

Variable Documentation

◆ alpha_particle_def

particle_def Heed::alpha_particle_def ( "alpha_particle"  ,
"alpha"  ,
3727.417 *MeV/  c_squared,
2 *  eplus,
,
,
0.  0,
spin_def(0.0, 0.0)   
)

Definition at line 120 of file particle_def.h.

Referenced by Garfield::TrackHeed::NewTrack().

◆ Aluminium

AtomDef Heed::Aluminium ( "Aluminium"  ,
"Al"  ,
13  ,
26.981539 *gram/  mole 
)

Definition at line 58 of file GasLib.h.

◆ Aluminium_PACS

ExAtomPhotoAbsCS Heed::Aluminium_PACS ( 13  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Al.dat"   
)

Definition at line 42 of file PhotoAbsCSLib.h.

◆ anti_neutron_def

particle_def Heed::anti_neutron_def ( ""  ,
""  ,
neutron_def   
)

Definition at line 106 of file particle_def.h.

◆ anti_proton_def

particle_def Heed::anti_proton_def ( ""  ,
"p-"  ,
proton_def   
)

Definition at line 104 of file particle_def.h.

Referenced by Garfield::TrackHeed::NewTrack().

◆ Antimony

AtomDef Heed::Antimony ( "Antimony"  ,
"Sb"  ,
51  ,
121.760 *gram/  mole 
)

Definition at line 97 of file GasLib.h.

◆ Ar_MPACS

MolecPhotoAbsCS Heed::Ar_MPACS
extern

◆ Argon

AtomDef Heed::Argon ( "Argon"  ,
"Ar"  ,
18  ,
39.948 *gram/  mole 
)

Definition at line 63 of file GasLib.h.

◆ Argon_molec

MoleculeDef Heed::Argon_molec ( "Argon"  ,
"Ar"  ,
"Ar"  ,
,
std::make_shared< VanDerWaals 48.6 *bar, 150.7 *kelvin 
)

Definition at line 113 of file GasLib.h.

◆ Argon_PACS

ExAtomPhotoAbsCS Heed::Argon_PACS
Initial value:
=
generate_Ar_PACS(shelllist_dir_name, pacs_table_dir_name)

Definition at line 229 of file PhotoAbsCSLib.cpp.

◆ Argon_without_K

AtomDef Heed::Argon_without_K ( "Argon_without_K"  ,
"Ar_without_K"  ,
16  ,
39.948 *gram/  mole 
)

Definition at line 64 of file GasLib.h.

◆ Arsenic

AtomDef Heed::Arsenic ( "Arsenic"  ,
"As"  ,
33  ,
74.9216 *gram/  mole 
)

Definition at line 79 of file GasLib.h.

◆ Arsenic_for_GaAs_PACS

ExAtomPhotoAbsCS Heed::Arsenic_for_GaAs_PACS ( 33  ,
shelllist_dir_name+"shelllist_solid.dat"  ,
pacs_table_dir_name+"As.dat"  ,
"As_for_GaAs"   
)

Definition at line 55 of file PhotoAbsCSLib.h.

◆ Arsenic_PACS

ExAtomPhotoAbsCS Heed::Arsenic_PACS ( 33  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"As.dat"   
)

Definition at line 54 of file PhotoAbsCSLib.h.

◆ Beryllium

AtomDef Heed::Beryllium ( "Beryllium"  ,
"Be"  ,
,
9.012182 *gram/  mole 
)

Definition at line 49 of file GasLib.h.

◆ Beryllium_PACS

ExAtomPhotoAbsCS Heed::Beryllium_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Be.dat"   
)

Definition at line 25 of file PhotoAbsCSLib.h.

◆ BF3_molec

MoleculeDef Heed::BF3_molec ( "BF3"  ,
"BF3"  ,
"B"  ,
,
"F"  ,
 
)

Definition at line 157 of file GasLib.h.

◆ BF3_MPACS

MolecPhotoAbsCS Heed::BF3_MPACS
extern

◆ Bismuth

AtomDef Heed::Bismuth ( "Bismuth"  ,
"Bi"  ,
83  ,
208.9804 *gram/  mole 
)

Definition at line 104 of file GasLib.h.

◆ Boron

AtomDef Heed::Boron ( "Boron"  ,
"B"  ,
,
10.811 *gram/  mole 
)

Definition at line 50 of file GasLib.h.

◆ Boron_PACS

ExAtomPhotoAbsCS Heed::Boron_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"B.dat"   
)

Definition at line 357 of file PhotoAbsCSLib.cpp.

◆ Bromine

AtomDef Heed::Bromine ( "Bromine"  ,
"Br"  ,
35  ,
79.904 *gram/  mole 
)

Definition at line 81 of file GasLib.h.

◆ Bromine_PACS

ExAtomPhotoAbsCS Heed::Bromine_PACS ( 35  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Br.dat"   
)

Definition at line 56 of file PhotoAbsCSLib.h.

◆ C1_MEV2_BN

constexpr double Heed::C1_MEV2_BN = C1_MEV_CM * C1_MEV_CM / 1.0e24
constexpr

Definition at line 21 of file PhysicalConstants.h.

◆ C1_MEV2_MBN

constexpr double Heed::C1_MEV2_MBN = C1_MEV_CM * C1_MEV_CM / 1.0e18
constexpr

Definition at line 24 of file PhysicalConstants.h.

Referenced by Heed::EnTransfCS::EnTransfCS(), and Heed::HeedMatterDef::print().

◆ C1_MEV_CM

constexpr double Heed::C1_MEV_CM = ELRAD / ELRADCM
constexpr

Definition at line 19 of file PhysicalConstants.h.

◆ C2F4H2_MPACS

MolecPhotoAbsCS Heed::C2F4H2_MPACS
extern

◆ C2F6_molec

MoleculeDef Heed::C2F6_molec ( "C2F6"  ,
"C2F6"  ,
"C"  ,
,
"F"  ,
 
)

Definition at line 148 of file GasLib.h.

◆ C2F6_MPACS

MolecPhotoAbsCS Heed::C2F6_MPACS
extern

◆ C2H2

MoleculeDef Heed::C2H2 ( "C2H2"  ,
"C2H2"  ,
"C"  ,
,
"H"  ,
 
)

Definition at line 127 of file GasLib.h.

◆ C2H2_MPACS

MolecPhotoAbsCS Heed::C2H2_MPACS
extern

◆ C2H2F4

MoleculeDef Heed::C2H2F4 ( "C2H2F4"  ,
"C2H2F4"  ,
"C"  ,
,
"F"  ,
,
"H"  ,
 
)

Definition at line 136 of file GasLib.h.

◆ C2H2F4_MPACS

MolecPhotoAbsCS Heed::C2H2F4_MPACS
extern

◆ C2H4

MoleculeDef Heed::C2H4 ( "C2H4"  ,
"C2H4"  ,
"C"  ,
,
"H"  ,
 
)

Definition at line 128 of file GasLib.h.

◆ C2H4_MPACS

MolecPhotoAbsCS Heed::C2H4_MPACS
extern

◆ C2H5OH_molec

MoleculeDef Heed::C2H5OH_molec ( "C2H5OH"  ,
"C2H5OH"  ,
"C"  ,
,
"H"  ,
,
"O"  ,
 
)

Definition at line 151 of file GasLib.h.

◆ C2H5OH_MPACS

MolecPhotoAbsCS Heed::C2H5OH_MPACS
extern

◆ C2H6

MoleculeDef Heed::C2H6 ( "C2H6"  ,
"C2H6"  ,
"C"  ,
,
"H"  ,
 
)

Definition at line 129 of file GasLib.h.

◆ C2H6_MPACS

MolecPhotoAbsCS Heed::C2H6_MPACS
extern

◆ C2HF5_molec

MoleculeDef Heed::C2HF5_molec ( "C2HF5"  ,
"C2HF5"  ,
"C"  ,
,
"H"  ,
,
"F"  ,
 
)

Definition at line 158 of file GasLib.h.

◆ C2HF5_MPACS

MolecPhotoAbsCS Heed::C2HF5_MPACS
extern

◆ C3F8_molec

MoleculeDef Heed::C3F8_molec ( "C3F8"  ,
"C3F8"  ,
"C"  ,
,
"F"  ,
 
)

Definition at line 161 of file GasLib.h.

◆ C3F8_MPACS

MolecPhotoAbsCS Heed::C3F8_MPACS
extern

◆ C3H6_molec

MoleculeDef Heed::C3H6_molec ( "C3H6"  ,
"C3H6"  ,
"C"  ,
,
"H"  ,
 
)

Definition at line 149 of file GasLib.h.

◆ C3H6_MPACS

MolecPhotoAbsCS Heed::C3H6_MPACS
extern

◆ C3H7OH_molec

MoleculeDef Heed::C3H7OH_molec ( "C3H7OH"  ,
"C3H7OH"  ,
"C"  ,
,
"H"  ,
,
"O"  ,
 
)

Definition at line 152 of file GasLib.h.

◆ C3H7OH_MPACS

MolecPhotoAbsCS Heed::C3H7OH_MPACS
extern

◆ C3H8

MoleculeDef Heed::C3H8 ( "C3H8"  ,
"C3H8"  ,
"C"  ,
,
"H"  ,
,
std::make_shared< VanDerWaals 42.5 *bar, 369.8 *kelvin 
)

Definition at line 131 of file GasLib.h.

◆ C3H8_MPACS

MolecPhotoAbsCS Heed::C3H8_MPACS
extern

◆ C3H8_VanDerWaals

VanDerWaals Heed::C3H8_VanDerWaals
extern

◆ C4H10

MoleculeDef Heed::C4H10 ( "C4H10"  ,
"C4H10"  ,
"C"  ,
,
"H"  ,
10  ,
std::make_shared< VanDerWaals 40.0 *bar, 418.3 *kelvin 
)

Definition at line 133 of file GasLib.h.

◆ C4H10_MPACS

MolecPhotoAbsCS Heed::C4H10_MPACS
extern

◆ C4H10_VanDerWaals

VanDerWaals Heed::C4H10_VanDerWaals
extern

◆ C5H12_molec

MoleculeDef Heed::C5H12_molec ( "C5H12"  ,
"C5H12"  ,
"C"  ,
,
"H"  ,
12   
)

Definition at line 144 of file GasLib.h.

◆ C5H12_MPACS

MolecPhotoAbsCS Heed::C5H12_MPACS
extern

◆ Cadmium

AtomDef Heed::Cadmium ( "Cadmium"  ,
"Cd"  ,
48  ,
112.411 *gram/  mole 
)

Definition at line 94 of file GasLib.h.

◆ Cadmium_for_CdTe_PACS

ExAtomPhotoAbsCS Heed::Cadmium_for_CdTe_PACS ( 48  ,
shelllist_dir_name+"shelllist_solid.dat"  ,
pacs_table_dir_name+"Cd.dat"  ,
"Cd_for_CdTe"   
)

Definition at line 59 of file PhotoAbsCSLib.h.

◆ Cadmium_PACS

ExAtomPhotoAbsCS Heed::Cadmium_PACS ( 48  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Cd.dat"   
)

Definition at line 58 of file PhotoAbsCSLib.h.

◆ Caesium

AtomDef Heed::Caesium ( "Caesium"  ,
"Cs"  ,
55  ,
132.9054519 *gram/  mole 
)

Definition at line 101 of file GasLib.h.

◆ Caesium_PACS

ExAtomPhotoAbsCS Heed::Caesium_PACS ( 55  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Cs.dat"   
)

Definition at line 352 of file PhotoAbsCSLib.cpp.

◆ Calcium

AtomDef Heed::Calcium ( "Calcium"  ,
"Ca"  ,
20  ,
40.08 *gram/  mole 
)

Definition at line 66 of file GasLib.h.

◆ Carbon

AtomDef Heed::Carbon ( "Carbon"  ,
"C"  ,
,
12.011 *gram/  mole 
)

Definition at line 51 of file GasLib.h.

◆ Carbon_for_C2H4_PACS

ExAtomPhotoAbsCS Heed::Carbon_for_C2H4_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"C.dat"  ,
"C_for_C2H4"  ,
10.51e-  06 
)

Definition at line 301 of file PhotoAbsCSLib.cpp.

◆ Carbon_for_C2H6_PACS

ExAtomPhotoAbsCS Heed::Carbon_for_C2H6_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"C.dat"  ,
"C_for_C2H6"  ,
11.52e-  06 
)

Definition at line 303 of file PhotoAbsCSLib.cpp.

◆ Carbon_for_C4H10_PACS

ExAtomPhotoAbsCS Heed::Carbon_for_C4H10_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"C.dat"  ,
"C_for_C4H10"  ,
10.55e-  06 
)

Definition at line 307 of file PhotoAbsCSLib.cpp.

◆ Carbon_for_CF4_PACS

ExAtomPhotoAbsCS Heed::Carbon_for_CF4_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"C.dat"  ,
"C_for_CF4"  ,
16.23e-  06 
)

Definition at line 290 of file PhotoAbsCSLib.cpp.

◆ Carbon_for_CH4_PACS

ExAtomPhotoAbsCS Heed::Carbon_for_CH4_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
shelllist_dir_name+"C_for_CH4.dat"  ,
"C_for_CH4"  ,
12.65e-  6 
)

Definition at line 288 of file PhotoAbsCSLib.cpp.

◆ Carbon_for_CO2_PACS

ExAtomPhotoAbsCS Heed::Carbon_for_CO2_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"C.dat"  ,
"C_for_CO2"  ,
13.79e-  06 
)

Definition at line 283 of file PhotoAbsCSLib.cpp.

◆ Carbon_for_Methylal_PACS

ExAtomPhotoAbsCS Heed::Carbon_for_Methylal_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"C.dat"  ,
"C_for_Methylal"  ,
10.0e-  06 
)

Definition at line 342 of file PhotoAbsCSLib.cpp.

◆ Carbon_PACS

ExAtomPhotoAbsCS Heed::Carbon_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"C.dat"   
)

Definition at line 27 of file PhotoAbsCSLib.h.

◆ CF3Br_molec

MoleculeDef Heed::CF3Br_molec ( "CF3Br"  ,
"CF3Br"  ,
"C"  ,
,
"F"  ,
,
"Br"  ,
 
)

Definition at line 160 of file GasLib.h.

◆ CF3Br_MPACS

MolecPhotoAbsCS Heed::CF3Br_MPACS
extern

◆ CF4

MoleculeDef Heed::CF4 ( "CF4"  ,
"CF4"  ,
"C"  ,
,
"F"  ,
,
std::make_shared< VanDerWaals 42.5 *bar, 369.8 *kelvin 
)

Definition at line 121 of file GasLib.h.

◆ CF4_MPACS

MolecPhotoAbsCS Heed::CF4_MPACS
extern

◆ CH3OH_molec

MoleculeDef Heed::CH3OH_molec ( "CH3OH"  ,
"CH3OH"  ,
"C"  ,
,
"H"  ,
,
"O"  ,
 
)

Definition at line 150 of file GasLib.h.

◆ CH3OH_MPACS

MolecPhotoAbsCS Heed::CH3OH_MPACS
extern

◆ CH4

MoleculeDef Heed::CH4 ( "CH4"  ,
"CH4"  ,
"C"  ,
,
"H"  ,
,
std::make_shared< VanDerWaals 4.64e6 *hep_pascal,(273.15 - 82.5) *kelvin 
)

Definition at line 120 of file GasLib.h.

◆ CH4_MPACS

MolecPhotoAbsCS Heed::CH4_MPACS
extern

◆ CHF3_molec

MoleculeDef Heed::CHF3_molec ( "CHF3"  ,
"CHF3"  ,
"C"  ,
,
"H"  ,
,
"F"  ,
 
)

Definition at line 159 of file GasLib.h.

◆ CHF3_MPACS

MolecPhotoAbsCS Heed::CHF3_MPACS
extern

◆ Chlorine

AtomDef Heed::Chlorine ( "Chlorine"  ,
"Cl"  ,
17  ,
35.066 *gram/  mole 
)

Definition at line 62 of file GasLib.h.

◆ Chlorine_PACS

ExAtomPhotoAbsCS Heed::Chlorine_PACS ( 17  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Cl.dat"   
)

Definition at line 48 of file PhotoAbsCSLib.h.

◆ Chromium

AtomDef Heed::Chromium ( "Chromium"  ,
"Cr"  ,
24  ,
51.996 *gram/  mole 
)

Definition at line 70 of file GasLib.h.

◆ CO2

MoleculeDef Heed::CO2 ( "CO2"  ,
"CO2"  ,
"C"  ,
,
"O"  ,
 
)

Definition at line 119 of file GasLib.h.

◆ CO2_MPACS

MolecPhotoAbsCS Heed::CO2_MPACS
extern

◆ CO_molec

MoleculeDef Heed::CO_molec ( "CO"  ,
"CO"  ,
"C"  ,
,
"O"  ,
 
)

Definition at line 146 of file GasLib.h.

◆ CO_MPACS

MolecPhotoAbsCS Heed::CO_MPACS
extern

◆ Cobalt

AtomDef Heed::Cobalt ( "Cobalt"  ,
"Co"  ,
27  ,
58.9332 *gram/  mole 
)

Definition at line 73 of file GasLib.h.

◆ coef_I_to_W

constexpr double Heed::coef_I_to_W = 2.0
constexpr

◆ Copper

AtomDef Heed::Copper ( "Copper"  ,
"Cu"  ,
29  ,
63.546 *gram/  mole 
)

Definition at line 75 of file GasLib.h.

◆ COS_molec

MoleculeDef Heed::COS_molec ( "COS"  ,
"COS"  ,
"C"  ,
,
"O"  ,
,
"S"  ,
 
)

Definition at line 156 of file GasLib.h.

◆ COS_MPACS

MolecPhotoAbsCS Heed::COS_MPACS
extern

◆ CS2_molec

MoleculeDef Heed::CS2_molec ( "CS2"  ,
"CS2"  ,
"C"  ,
,
"S"  ,
 
)

Definition at line 155 of file GasLib.h.

◆ CS2_MPACS

MolecPhotoAbsCS Heed::CS2_MPACS
extern

◆ Cs_molec

MoleculeDef Heed::Cs_molec ( "Cs"  ,
"Cs"  ,
"Cs"  ,
 
)

Definition at line 153 of file GasLib.h.

◆ Cs_MPACS

MolecPhotoAbsCS Heed::Cs_MPACS
extern

◆ D13_def

particle_def Heed::D13_def ( "D13"  ,
"D13"  ,
1520.0 *MeV/  c_squared,
1 *  eplus,
,
,
1.  5,
spin_def(0.5, 0.5)   
)

Definition at line 108 of file particle_def.h.

◆ deuteron_def

particle_def Heed::deuteron_def ( "deuteron"  ,
"dtr"  ,
1875.613 *MeV/  c_squared,
eplus  ,
,
,
0.  0,
spin_def(0.0, 0.0)   
)

Definition at line 119 of file particle_def.h.

Referenced by Garfield::TrackHeed::NewTrack().

◆ dex

vec Heed::dex ( ,
,
 
)

Definition at line 303 of file vec.h.

Referenced by Heed::basis::basis().

◆ dey

vec Heed::dey ( ,
,
 
)

Definition at line 304 of file vec.h.

Referenced by Heed::basis::basis().

◆ dez

vec Heed::dez ( ,
,
 
)

Definition at line 305 of file vec.h.

Referenced by Heed::basis::basis().

◆ DME_molec

MoleculeDef Heed::DME_molec ( "DME"  ,
"DME"  ,
"C"  ,
,
"H"  ,
,
"O"  ,
 
)

Definition at line 147 of file GasLib.h.

◆ DME_MPACS

MolecPhotoAbsCS Heed::DME_MPACS
extern

◆ dv0

◆ electron_def

particle_def Heed::electron_def ( "electron"  ,
"e-"  ,
electron_mass_c2/  c_squared,
electron_charge  ,
,
,
0.  5,
spin_def(0.0, 0.0)   
)

◆ ELRAD

constexpr double Heed::ELRAD = CLHEP::fine_structure_const / CLHEP::electron_mass_c2
constexpr

Electron radius (1/MeV)

Definition at line 17 of file PhysicalConstants.h.

◆ ELRADCM

constexpr double Heed::ELRADCM = 2.81794092e-13
constexpr

Definition at line 18 of file PhysicalConstants.h.

◆ eta_meson_def

particle_def Heed::eta_meson_def ( "eta_meson_def"  ,
"eta"  ,
548.8 *MeV/  c_squared,
,
,
,
1.  0,
spin_def(0.0, 0.0)   
)

Definition at line 115 of file particle_def.h.

◆ F2_molec

MoleculeDef Heed::F2_molec ( "F2"  ,
"F2"  ,
"F"  ,
 
)

Definition at line 154 of file GasLib.h.

◆ F2_MPACS

MolecPhotoAbsCS Heed::F2_MPACS
extern

◆ Fluorine

AtomDef Heed::Fluorine ( "Fluorine"  ,
"F"  ,
,
18.9984032 *gram/  mole 
)

Definition at line 54 of file GasLib.h.

◆ Fluorine_PACS

ExAtomPhotoAbsCS Heed::Fluorine_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"F.dat"   
)

Definition at line 353 of file PhotoAbsCSLib.cpp.

◆ Gallium

AtomDef Heed::Gallium ( "Gallium"  ,
"Ga"  ,
31  ,
69.72 *gram/  mole 
)

Definition at line 77 of file GasLib.h.

◆ Gallium_for_GaAs_PACS

ExAtomPhotoAbsCS Heed::Gallium_for_GaAs_PACS ( 31  ,
shelllist_dir_name+"shelllist_solid.dat"  ,
pacs_table_dir_name+"Ga.dat"  ,
"Ga_for_GaAs"   
)

Definition at line 51 of file PhotoAbsCSLib.h.

◆ Gallium_PACS

ExAtomPhotoAbsCS Heed::Gallium_PACS ( 31  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Ga.dat"   
)

Definition at line 50 of file PhotoAbsCSLib.h.

◆ GeH4_molec

MoleculeDef Heed::GeH4_molec ( "GeH4"  ,
"GeH4"  ,
"Ge"  ,
,
"H"  ,
 
)

Definition at line 165 of file GasLib.h.

◆ GeH4_MPACS

MolecPhotoAbsCS Heed::GeH4_MPACS
extern

◆ Germanium

AtomDef Heed::Germanium ( "Germanium"  ,
"Ge"  ,
32  ,
72.59 *gram/  mole 
)

Definition at line 78 of file GasLib.h.

◆ Germanium_crystal_PACS

ExAtomPhotoAbsCS Heed::Germanium_crystal_PACS ( 32  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Ge.dat"  ,
"Ge_crystal"  ,
0.67e-  06 
)

Definition at line 53 of file PhotoAbsCSLib.h.

◆ Germanium_PACS

ExAtomPhotoAbsCS Heed::Germanium_PACS ( 32  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Ge.dat"   
)

Definition at line 370 of file PhotoAbsCSLib.cpp.

◆ H2_MPACS

MolecPhotoAbsCS Heed::H2_MPACS
extern

◆ H2O_MPACS

MolecPhotoAbsCS Heed::H2O_MPACS
extern

◆ H2S_molec

MoleculeDef Heed::H2S_molec ( "H2S"  ,
"H2S"  ,
"H"  ,
,
"S"  ,
 
)

Definition at line 164 of file GasLib.h.

◆ H2S_MPACS

MolecPhotoAbsCS Heed::H2S_MPACS
extern

◆ He_MPACS

MolecPhotoAbsCS Heed::He_MPACS
extern

◆ Helium

AtomDef Heed::Helium ( "Helium"  ,
"He"  ,
,
4.002602 *gram/  mole 
)

Definition at line 47 of file GasLib.h.

◆ Helium_molec

MoleculeDef Heed::Helium_molec ( "Helium"  ,
"He"  ,
"He"  ,
 
)

Definition at line 109 of file GasLib.h.

◆ Helium_PACS

ExAtomPhotoAbsCS Heed::Helium_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"He.dat"   
)

Definition at line 274 of file PhotoAbsCSLib.cpp.

◆ Hg_molec

MoleculeDef Heed::Hg_molec ( "Hg"  ,
"Hg"  ,
"Hg"  ,
 
)

Definition at line 163 of file GasLib.h.

◆ Hg_MPACS

MolecPhotoAbsCS Heed::Hg_MPACS
extern

◆ Hydrogen

AtomDef Heed::Hydrogen ( "Hydrogen"  ,
"H"  ,
,
1.0 *gram/  mole 
)

Definition at line 46 of file GasLib.h.

◆ Hydrogen2

MoleculeDef Heed::Hydrogen2 ( "Hydrogen"  ,
"H2"  ,
"H"  ,
 
)

Definition at line 108 of file GasLib.h.

◆ Hydrogen_for_CH4_PACS

SimpleAtomPhotoAbsCS Heed::Hydrogen_for_CH4_PACS ( ,
std::make_shared< PhenoPhotoAbsCS "Hydrogen_for_CH4", 1, 12.65e-06, 3.228 
)

Definition at line 18 of file PhotoAbsCSLib.h.

◆ Hydrogen_for_H2_PACS

SimpleAtomPhotoAbsCS Heed::Hydrogen_for_H2_PACS ( ,
std::make_shared< PhenoPhotoAbsCS "Hydrogen_for_H2", 1, 15.43e-6, 3.228 
)

Definition at line 272 of file PhotoAbsCSLib.cpp.

◆ Hydrogen_for_NH4_PACS

SimpleAtomPhotoAbsCS Heed::Hydrogen_for_NH4_PACS ( ,
std::make_shared< PhenoPhotoAbsCS "Hydrogen_for_NH4", 1, 10.0e-06, 3.228 
)

Definition at line 19 of file PhotoAbsCSLib.h.

◆ Hydrogen_PACS

SimpleAtomPhotoAbsCS Heed::Hydrogen_PACS ( ,
std::make_shared< HydrogenPhotoAbsCS () 
)

Library of photoabsorption cross sections for some frequently used atoms and molecules. 2004, I. Smirnov

Definition at line 16 of file PhotoAbsCSLib.h.

◆ Indium

AtomDef Heed::Indium ( "Indium"  ,
"In"  ,
49  ,
114.818 *gram/  mole 
)

Definition at line 95 of file GasLib.h.

◆ indn

indentation Heed::indn

◆ Iodine

AtomDef Heed::Iodine ( "Iodine"  ,
"I"  ,
53  ,
126.9045 *gram/  mole 
)

Definition at line 99 of file GasLib.h.

◆ Iron

AtomDef Heed::Iron ( "Iron"  ,
"Fe"  ,
26  ,
55.845 *gram/  mole 
)

Definition at line 72 of file GasLib.h.

◆ K_minus_meson_def

particle_def Heed::K_minus_meson_def ( "K_minus_meson_def"  ,
"K-"  ,
K_plus_meson_def   
)

Definition at line 117 of file particle_def.h.

Referenced by Garfield::TrackHeed::NewTrack().

◆ K_plus_meson_def

particle_def Heed::K_plus_meson_def ( "K_plus_meson_def"  ,
"K+"  ,
493.677 *MeV/  c_squared,
,
,
,
0.  0,
spin_def(0.5, -0.5)   
)

Definition at line 116 of file particle_def.h.

Referenced by Garfield::TrackHeed::NewTrack().

◆ Kr_MPACS

MolecPhotoAbsCS Heed::Kr_MPACS
extern

◆ Krypton

AtomDef Heed::Krypton ( "Krypton"  ,
"Kr"  ,
36  ,
83.80 *gram/  mole 
)

Definition at line 82 of file GasLib.h.

◆ Krypton_molec

MoleculeDef Heed::Krypton_molec ( "Krypton"  ,
"Kr"  ,
"Kr"  ,
,
std::make_shared< VanDerWaals 55.0 *bar, 209.4 *kelvin 
)

Definition at line 115 of file GasLib.h.

◆ Krypton_PACS

ExAtomPhotoAbsCS Heed::Krypton_PACS ( 36  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Kr.dat"   
)

Definition at line 279 of file PhotoAbsCSLib.cpp.

◆ last_particle_number

long Heed::last_particle_number

Definition at line 9 of file HeedParticle.h.

◆ Lithium

AtomDef Heed::Lithium ( "Lithium"  ,
"Li"  ,
,
6.941 *gram/  mole 
)

Definition at line 48 of file GasLib.h.

◆ Lithium_PACS

ExAtomPhotoAbsCS Heed::Lithium_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Li.dat"   
)

Definition at line 24 of file PhotoAbsCSLib.h.

◆ low_boundary_of_excitations

constexpr double Heed::low_boundary_of_excitations = 0.7
constexpr

Definition at line 427 of file PhotoAbsCS.h.

Referenced by Heed::ExAtomPhotoAbsCS::ExAtomPhotoAbsCS().

◆ Magnesium

AtomDef Heed::Magnesium ( "Magnesium"  ,
"Mg"  ,
12  ,
24.3050 *gram/  mole 
)

Definition at line 57 of file GasLib.h.

◆ Magnesium_PACS

ExAtomPhotoAbsCS Heed::Magnesium_PACS ( 12  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Mg.dat"   
)

Definition at line 41 of file PhotoAbsCSLib.h.

◆ Manganese

AtomDef Heed::Manganese ( "Manganese"  ,
"Mn"  ,
25  ,
54.9380 *gram/  mole 
)

Definition at line 71 of file GasLib.h.

◆ max_qel_DynLinArr

long Heed::max_qel_DynLinArr = 100000000

Definition at line 17 of file AbsArr.cpp.

Referenced by Heed::DynLinArr< T >::check(), and Heed::DynLinArr< T >::DynLinArr().

◆ Mercury

AtomDef Heed::Mercury ( "Mercury"  ,
"Hg"  ,
80  ,
200.59 *gram/  mole 
)

Definition at line 103 of file GasLib.h.

◆ Mercury_PACS

ExAtomPhotoAbsCS Heed::Mercury_PACS ( 80  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Hg.dat"   
)

Definition at line 368 of file PhotoAbsCSLib.cpp.

◆ Methylal_molec

MoleculeDef Heed::Methylal_molec ( "Methylal"  ,
"Methylal"  ,
"O"  ,
,
"C"  ,
,
"H"  ,
,
std::make_shared< VanDerWaals 39.5 *bar, 480.6 *kelvin 
)

Definition at line 141 of file GasLib.h.

◆ Methylal_MPACS

MolecPhotoAbsCS Heed::Methylal_MPACS
extern

◆ Methylal_VanDerWaals

VanDerWaals Heed::Methylal_VanDerWaals
extern

◆ Molybdenum

AtomDef Heed::Molybdenum ( "Molybdenum"  ,
"Mo"  ,
42  ,
95.94 *gram/  mole 
)

Definition at line 89 of file GasLib.h.

◆ muon_minus_def

particle_def Heed::muon_minus_def ( "muon_minus"  ,
"mu-"  ,
105.658367 *MeV/  c_squared,
electron_charge  ,
,
,
0.  5,
spin_def(0.0, 0.0)   
)

Definition at line 101 of file particle_def.h.

Referenced by Garfield::TrackHeed::NewTrack().

◆ muon_plus_def

particle_def Heed::muon_plus_def ( "muon_plus"  ,
"mu+"  ,
muon_minus_def   
)

Definition at line 102 of file particle_def.h.

Referenced by Garfield::TrackHeed::NewTrack().

◆ N2_MPACS

MolecPhotoAbsCS Heed::N2_MPACS
extern

◆ N2O

MoleculeDef Heed::N2O ( "N2O"  ,
"N2O"  ,
"N"  ,
,
"O"  ,
 
)

Definition at line 118 of file GasLib.h.

◆ N2O_MPACS

MolecPhotoAbsCS Heed::N2O_MPACS
extern

◆ Ne_MPACS

MolecPhotoAbsCS Heed::Ne_MPACS
extern

◆ Neon

AtomDef Heed::Neon ( "Neon"  ,
"Ne"  ,
10  ,
20.1797 *gram/  mole 
)

Definition at line 55 of file GasLib.h.

◆ Neon_molec

MoleculeDef Heed::Neon_molec ( "Neon"  ,
"Ne"  ,
"Ne"  ,
 
)

Definition at line 112 of file GasLib.h.

◆ Neon_PACS

ExAtomPhotoAbsCS Heed::Neon_PACS ( 10  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Ne.dat"   
)

Definition at line 277 of file PhotoAbsCSLib.cpp.

◆ neutron_def

particle_def Heed::neutron_def ( "neutron"  ,
"n"  ,
neutron_mass_c2/  c_squared,
,
,
,
0.  5,
spin_def(0.5, -0.5)   
)

Definition at line 105 of file particle_def.h.

◆ NH3

MoleculeDef Heed::NH3 ( "NH3"  ,
"NH3"  ,
"N"  ,
,
"H"  ,
 
)

Definition at line 117 of file GasLib.h.

◆ NH3_MPACS

MolecPhotoAbsCS Heed::NH3_MPACS
extern

◆ Nickel

AtomDef Heed::Nickel ( "Nickel"  ,
"Ni"  ,
28  ,
58.70 *gram/  mole 
)

Definition at line 74 of file GasLib.h.

◆ Niobium

AtomDef Heed::Niobium ( "Niobium"  ,
"Nb"  ,
41  ,
92.9064 *gram/  mole 
)

Definition at line 87 of file GasLib.h.

◆ Nitrogen

AtomDef Heed::Nitrogen ( "Nitrogen"  ,
"N"  ,
,
14.00674 *gram/  mole 
)

Definition at line 52 of file GasLib.h.

◆ Nitrogen_molec

MoleculeDef Heed::Nitrogen_molec ( "Nitrogen"  ,
"N2"  ,
"N"  ,
 
)

Definition at line 110 of file GasLib.h.

◆ Nitrogen_PACS

ExAtomPhotoAbsCS Heed::Nitrogen_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"N.dat"  ,
"N_for_N2"  ,
15.581e-  6 
)

Definition at line 275 of file PhotoAbsCSLib.cpp.

◆ NO_molec

MoleculeDef Heed::NO_molec ( "NO"  ,
"NO"  ,
"N"  ,
,
"O"  ,
 
)

Definition at line 145 of file GasLib.h.

◆ NO_MPACS

MolecPhotoAbsCS Heed::NO_MPACS
extern

◆ O2_MPACS

MolecPhotoAbsCS Heed::O2_MPACS
extern

◆ O3_molec

MoleculeDef Heed::O3_molec ( "O3"  ,
"O3"  ,
"O"  ,
 
)

Definition at line 162 of file GasLib.h.

◆ O3_MPACS

MolecPhotoAbsCS Heed::O3_MPACS
extern

◆ one_minus_def_dbl_prec

const double Heed::one_minus_def_dbl_prec = double(1.0) - DEF_DBL_PREC

Definition at line 32 of file DoubleAc.h.

◆ one_minus_def_flt_prec

const double Heed::one_minus_def_flt_prec = double(1.0) - DEF_FLT_PREC

Definition at line 36 of file DoubleAc.h.

Referenced by Heed::DoubleAc::DoubleAc(), and Heed::DoubleAc::operator=().

◆ one_plus_def_dbl_prec

const double Heed::one_plus_def_dbl_prec = double(1.0) + DEF_DBL_PREC

Definition at line 31 of file DoubleAc.h.

Referenced by Heed::DoubleAc::DoubleAc(), and Heed::DoubleAc::operator=().

◆ one_plus_def_flt_prec

const double Heed::one_plus_def_flt_prec = double(1.0) + DEF_FLT_PREC

Definition at line 35 of file DoubleAc.h.

Referenced by Heed::DoubleAc::DoubleAc(), and Heed::DoubleAc::operator=().

◆ Oxygen

AtomDef Heed::Oxygen ( "Oxygen"  ,
"O"  ,
,
15.9994 *gram/  mole 
)

Definition at line 53 of file GasLib.h.

◆ Oxygen_for_CO2_PACS

ExAtomPhotoAbsCS Heed::Oxygen_for_CO2_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"O.dat"  ,
"O_for_CO2"  ,
13.79e-  6 
)

Definition at line 37 of file PhotoAbsCSLib.h.

◆ Oxygen_molec

MoleculeDef Heed::Oxygen_molec ( "Oxygen"  ,
"O2"  ,
"O"  ,
 
)

Definition at line 111 of file GasLib.h.

◆ Oxygen_PACS

ExAtomPhotoAbsCS Heed::Oxygen_PACS ( ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"O.dat"   
)

Definition at line 276 of file PhotoAbsCSLib.cpp.

◆ P11_def

particle_def Heed::P11_def ( "P11"  ,
"P11"  ,
1440.0 *MeV/  c_squared,
1 *  eplus,
,
,
0.  5,
spin_def(0.5, 0.5)   
)

Definition at line 107 of file particle_def.h.

◆ pacs_table_dir_name

const std::string Heed::pacs_table_dir_name = shelllist_dir_name + "henke/"

Definition at line 100 of file PhotoAbsCSLib.cpp.

◆ Palladium

AtomDef Heed::Palladium ( "Palladium"  ,
"Pd"  ,
46  ,
106.4 *gram/  mole 
)

Definition at line 92 of file GasLib.h.

◆ Phosphorus

AtomDef Heed::Phosphorus ( "Phosphorus"  ,
"P"  ,
15  ,
30.973762 *gram/  mole 
)

Definition at line 60 of file GasLib.h.

◆ Phosphorus_PACS

ExAtomPhotoAbsCS Heed::Phosphorus_PACS ( 15  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"P.dat"   
)

Definition at line 46 of file PhotoAbsCSLib.h.

◆ pi_0_meson_def

particle_def Heed::pi_0_meson_def ( "pi_0_meson"  ,
"pi0"  ,
134.9734 *MeV/  c_squared,
,
,
,
0.  0,
spin_def(1.0, 0.0)   
)

Definition at line 113 of file particle_def.h.

◆ pi_minus_meson_def

particle_def Heed::pi_minus_meson_def ( "pi_minus_meson"  ,
"pi-"  ,
139.56755 *MeV/  c_squared,
eplus,
,
,
0.  0,
spin_def(1.0, -1.0)   
)

Definition at line 114 of file particle_def.h.

Referenced by Garfield::TrackHeed::NewTrack().

◆ pi_plus_meson_def

particle_def Heed::pi_plus_meson_def ( "pi_plus_meson"  ,
"pi+"  ,
139.56755 *MeV/  c_squared,
eplus  ,
,
,
0.  0,
spin_def(1.0, 1.0)   
)

Definition at line 112 of file particle_def.h.

Referenced by Garfield::TrackHeed::NewTrack().

◆ Plutonium

AtomDef Heed::Plutonium ( "Plutonium"  ,
"Pu"  ,
94  ,
244.0 *gram/  mole 
)

Definition at line 106 of file GasLib.h.

◆ positron_def

particle_def Heed::positron_def ( "positron"  ,
"e+"  ,
electron_def   
)

Definition at line 100 of file particle_def.h.

Referenced by Garfield::TrackHeed::NewTrack().

◆ Potassium

AtomDef Heed::Potassium ( "Potassium"  ,
"K"  ,
19  ,
39.098 *gram/  mole 
)

Definition at line 65 of file GasLib.h.

◆ pq_arrelem_in_line

◆ proton_def

particle_def Heed::proton_def ( "proton"  ,
"p+"  ,
proton_mass_c2/  c_squared,
eplus  ,
,
,
0.  5,
spin_def(0.5, 0.5)   
)

Definition at line 103 of file particle_def.h.

Referenced by Garfield::TrackHeed::NewTrack().

◆ qel_communicat

DynLinArr< long > Heed::qel_communicat

Definition at line 519 of file AbsArr.cpp.

Referenced by Heed::DynArr< T >::put_qel().

◆ Rhodium

AtomDef Heed::Rhodium ( "Rhodium"  ,
"Rh"  ,
45  ,
102.9055 *gram/  mole 
)

Definition at line 91 of file GasLib.h.

◆ Rubidium

AtomDef Heed::Rubidium ( "Rubidium"  ,
"Rb"  ,
37  ,
85.4673 *gram/  mole 
)

Definition at line 83 of file GasLib.h.

◆ Ruthenium

AtomDef Heed::Ruthenium ( "Ruthenium"  ,
"Ru"  ,
44  ,
101.07 *gram/  mole 
)

Definition at line 90 of file GasLib.h.

◆ S11_def

particle_def Heed::S11_def ( "S11"  ,
"S11"  ,
1535.0 *MeV/  c_squared,
1 *  eplus,
,
,
0.  5,
spin_def(0.5, 0.5)   
)

Definition at line 109 of file particle_def.h.

◆ s_exit_without_core

int Heed::s_exit_without_core = 0

Definition at line 57 of file FunNameStack.cpp.

Referenced by spexit_action().

◆ s_short_output

int Heed::s_short_output = 0

Definition at line 25 of file prstream.cpp.

Referenced by operator<<(), and operator>>().

◆ s_throw_exception_in_spexit

int Heed::s_throw_exception_in_spexit = 0

Definition at line 56 of file FunNameStack.cpp.

Referenced by spexit_action().

◆ Scandium

AtomDef Heed::Scandium ( "Scandium"  ,
"Sc"  ,
21  ,
44.9559 *gram/  mole 
)

Definition at line 67 of file GasLib.h.

◆ Selenium

AtomDef Heed::Selenium ( "Selenium"  ,
"Se"  ,
34  ,
78.96 *gram/  mole 
)

Definition at line 80 of file GasLib.h.

◆ SF4

MoleculeDef Heed::SF4 ( "SF4"  ,
"SF4"  ,
"S"  ,
,
"F"  ,
 
)

Definition at line 124 of file GasLib.h.

◆ SF4_MPACS

MolecPhotoAbsCS Heed::SF4_MPACS
extern

◆ SF6

MoleculeDef Heed::SF6 ( "SF6"  ,
"SF6"  ,
"S"  ,
,
"F"  ,
 
)

Definition at line 125 of file GasLib.h.

◆ SF6_MPACS

MolecPhotoAbsCS Heed::SF6_MPACS
extern

◆ shelllist_dir_name

const std::string Heed::shelllist_dir_name = getDataBasePath() + "/"

Definition at line 99 of file PhotoAbsCSLib.cpp.

◆ SiH4_molec

MoleculeDef Heed::SiH4_molec ( "SiH4"  ,
"SiH4"  ,
"Si"  ,
,
"H"  ,
 
)

Definition at line 166 of file GasLib.h.

◆ SiH4_MPACS

MolecPhotoAbsCS Heed::SiH4_MPACS
extern

◆ Silicon

AtomDef Heed::Silicon ( "Silicon"  ,
"Si"  ,
14  ,
28.0855 *gram/  mole 
)

Definition at line 59 of file GasLib.h.

◆ Silicon_crystal_PACS

ExAtomPhotoAbsCS Heed::Silicon_crystal_PACS ( 14  ,
shelllist_dir_name+"shelllist_solid.dat"  ,
pacs_table_dir_name+"Si.dat"  ,
"Si_crystal"   
)

Definition at line 44 of file PhotoAbsCSLib.h.

◆ Silicon_G4_PACS

ExAtomPhotoAbsCS Heed::Silicon_G4_PACS ( 14  ,
shelllist_dir_name+"shelllist_solid.dat"  ,
shelllist_dir_name+"Si_G4.dat"  ,
"Si_G4"   
)

Definition at line 45 of file PhotoAbsCSLib.h.

◆ Silicon_PACS

ExAtomPhotoAbsCS Heed::Silicon_PACS ( 14  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Si.dat"   
)

Definition at line 371 of file PhotoAbsCSLib.cpp.

◆ Silver

AtomDef Heed::Silver ( "Silver"  ,
"Ag"  ,
47  ,
107.868 *gram/  mole 
)

Definition at line 93 of file GasLib.h.

◆ Sodium

AtomDef Heed::Sodium ( "Sodium"  ,
"Na"  ,
11  ,
22.989768 *gram/  mole 
)

Definition at line 56 of file GasLib.h.

◆ Sodium_PACS

ExAtomPhotoAbsCS Heed::Sodium_PACS ( 11  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Na.dat"   
)

Definition at line 40 of file PhotoAbsCSLib.h.

◆ standard_factor_Fano

constexpr double Heed::standard_factor_Fano = 0.19
constexpr

Definition at line 575 of file PhotoAbsCS.h.

◆ Strontium

AtomDef Heed::Strontium ( "Strontium"  ,
"Sr"  ,
38  ,
87.62 *gram/  mole 
)

Definition at line 84 of file GasLib.h.

◆ Sulfur

AtomDef Heed::Sulfur ( "Sulfur"  ,
"S"  ,
16  ,
32.066 *gram/  mole 
)

Definition at line 61 of file GasLib.h.

◆ Sulfur_PACS

ExAtomPhotoAbsCS Heed::Sulfur_PACS ( 16  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"S.dat"   
)

Definition at line 294 of file PhotoAbsCSLib.cpp.

◆ Technetium

AtomDef Heed::Technetium ( "Technetium"  ,
"Tc"  ,
43  ,
98 *gram/  mole 
)

Definition at line 88 of file GasLib.h.

◆ Tellurium

AtomDef Heed::Tellurium ( "Tellurium"  ,
"Te"  ,
52  ,
127.60 *gram/  mole 
)

Definition at line 98 of file GasLib.h.

◆ Tellurium_for_CdTe_PACS

ExAtomPhotoAbsCS Heed::Tellurium_for_CdTe_PACS ( 52  ,
shelllist_dir_name+"shelllist_solid.dat"  ,
pacs_table_dir_name+"Te.dat"  ,
"Te_for_CdTe"   
)

Definition at line 61 of file PhotoAbsCSLib.h.

◆ Tellurium_PACS

ExAtomPhotoAbsCS Heed::Tellurium_PACS ( 52  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Te.dat"   
)

Definition at line 60 of file PhotoAbsCSLib.h.

◆ Thomas_sum_rule_const

constexpr double Heed::Thomas_sum_rule_const
constexpr
Initial value:
=
2 * CLHEP::pi2 * CLHEP::fine_structure_const / CLHEP::electron_mass_c2

TRK sum rule [1/MeV], constant per one electron.

Definition at line 16 of file PhotoAbsCS.h.

◆ Thomas_sum_rule_const_Mb

constexpr double Heed::Thomas_sum_rule_const_Mb
constexpr
Initial value:
=
constexpr double Thomas_sum_rule_const
TRK sum rule [1/MeV], constant per one electron.
Definition: PhotoAbsCS.h:16
constexpr double C1_MEV2_BN

TRK sum rule [Mb * MeV].

Definition at line 19 of file PhotoAbsCS.h.

Referenced by Heed::ExAtomPhotoAbsCS::ExAtomPhotoAbsCS(), Heed::PhenoPhotoAbsCS::PhenoPhotoAbsCS(), and Heed::ExAtomPhotoAbsCS::print().

◆ Tin

AtomDef Heed::Tin ( "Tin"  ,
"Sn"  ,
50  ,
118.710 *gram/  mole 
)

Definition at line 96 of file GasLib.h.

◆ Titanium

AtomDef Heed::Titanium ( "Titanium"  ,
"Ti"  ,
22  ,
47.867 *gram/  mole 
)

Definition at line 68 of file GasLib.h.

◆ Tungsten

AtomDef Heed::Tungsten ( "Tungsten"  ,
"W"  ,
74  ,
183.85 *gram/  mole 
)

Definition at line 102 of file GasLib.h.

◆ Uranium

AtomDef Heed::Uranium ( "Uranium"  ,
"U"  ,
92  ,
238.0289 *gram/  mole 
)

Definition at line 105 of file GasLib.h.

◆ Uranium_PACS

ExAtomPhotoAbsCS Heed::Uranium_PACS ( 92  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"U.dat"   
)

Definition at line 65 of file PhotoAbsCSLib.h.

◆ user_particle_def

particle_def Heed::user_particle_def ( "user_particle"  ,
"X"  ,
139.56755 *MeV/  c_squared,
eplus  ,
,
,
0.  0,
spin_def(0.0, 0.0)   
)

Definition at line 123 of file particle_def.h.

Referenced by Garfield::TrackHeed::NewTrack().

◆ Vanadium

AtomDef Heed::Vanadium ( "Vanadium"  ,
"V"  ,
23  ,
50.9414 *gram/  mole 
)

Definition at line 69 of file GasLib.h.

◆ vecerror

◆ vprecision

const vfloat Heed::vprecision = 1.0E-12

◆ Water_molec

MoleculeDef Heed::Water_molec ( "Water"  ,
"Water"  ,
"H"  ,
,
"O"  ,
,
std::make_shared< VanDerWaals 22.9e6 *hep_pascal,(273.15+374.15) *kelvin 
)

Definition at line 139 of file GasLib.h.

◆ Water_VanDerWaals

VanDerWaals Heed::Water_VanDerWaals
extern

◆ Xe_MPACS

MolecPhotoAbsCS Heed::Xe_MPACS
extern

◆ Xenon

AtomDef Heed::Xenon ( "Xenon"  ,
"Xe"  ,
54  ,
131.293 *gram/  mole 
)

Definition at line 100 of file GasLib.h.

◆ Xenon_molec

MoleculeDef Heed::Xenon_molec ( "Xenon"  ,
"Xe"  ,
"Xe"  ,
,
std::make_shared< VanDerWaals 55.0 *bar, 209.4 *kelvin 
)

Definition at line 116 of file GasLib.h.

◆ Xenon_PACS

ExAtomPhotoAbsCS Heed::Xenon_PACS ( 54  ,
shelllist_dir_name+"shelllist.dat"  ,
pacs_table_dir_name+"Xe.dat"   
)

Definition at line 280 of file PhotoAbsCSLib.cpp.

◆ Yttrium

AtomDef Heed::Yttrium ( "Yttrium"  ,
"Y"  ,
39  ,
88.9059 *gram/  mole 
)

Definition at line 85 of file GasLib.h.

◆ Zinc

AtomDef Heed::Zinc ( "Zinc"  ,
"Zn"  ,
30  ,
65.38 *gram/  mole 
)

Definition at line 76 of file GasLib.h.

◆ Zirconium

AtomDef Heed::Zirconium ( "Zirconium"  ,
"Zr"  ,
40  ,
91.22 *gram/  mole 
)

Definition at line 86 of file GasLib.h.