|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
|
#include <BeamStrippingPhysics.h>
Public Member Functions | |
| BeamStrippingPhysics (const std::string &name, ElementBase *element) | |
| ~BeamStrippingPhysics () | |
| void | setCyclotron (Cyclotron *cycl) |
| virtual void | apply (PartBunchBase< double, 3 > *bunch, const std::pair< Vector_t, double > &boundingSphere) override |
| virtual const std::string | getType () const override |
| virtual void | print (Inform &msg) override |
| virtual bool | stillActive () override |
| virtual double | getTime () override |
| virtual std::string | getName () override |
| virtual size_t | getParticlesInMat () override |
| virtual unsigned | getRediffused () override |
| virtual unsigned int | getNumEntered () override |
| void | doPhysics (PartBunchBase< double, 3 > *bunch) |
| void | setFlagAllParticlesIn (bool p) |
| bool | getFlagAllParticlesIn () const |
| void | updateElement (ElementBase *newref) |
| ElementBase * | getElement () |
Protected Attributes | |
| ElementBase * | element_ref_m |
| bool | allParticleInMat_m |
| if all particles are in matter stay inside the particle matter interaction | |
| const std::string | name_m |
| std::unique_ptr< InsideTester > | hitTester_m |
Private Member Functions | |
| void | computeCrossSection (double energy) |
| double | computeCrossSectionNakai (double energy, double energyThreshold, int &i) |
| double | computeCrossSectionTabata (double energy, double energyThreshold, double a1, double a2, double a3, double a4, double a5, double a6) |
| double | computeCrossSectionChebyshev (double energy, double energyMin, double energyMax) |
| double | computeCrossSectionBohr (double energy, int zTarget, double massInAmu) |
| bool | evalGasStripping (double &deltas) |
| bool | evalLorentzStripping (double &gamma, double &eField) |
| void | getSecondaryParticles (PartBunchBase< double, 3 > *bunch, size_t &i, bool pdead_LS) |
| void | transformToSecondary (PartBunchBase< double, 3 > *bunch, size_t &i, ParticleType type) |
| bool | computeEnergyLoss (PartBunchBase< double, 3 > *, Vector_t &, const double, bool) const override |
| void | gatherStatistics () |
Private Attributes | |
| ParticleType | pType_m |
| Vacuum * | vac_m |
| Cyclotron * | cycl_m |
| gsl_rng * | r_m |
| double | T_m |
| double | dT_m |
| double | mass_m |
| double | pressure_m |
| double | temperature_m |
| std::unique_ptr< LossDataSink > | lossDs_m |
| double | nCSA_m |
| macroscopic cross sections | |
| double | nCSB_m |
| double | nCSC_m |
| double | nCSTotal_m |
| unsigned | bunchToMatStat_m |
| unsigned | stoppedPartStat_m |
| unsigned | rediffusedStat_m |
| unsigned | totalPartsInMat_m |
Static Private Attributes | |
| static const double | csCoefSingle_Hminus [3][9] |
| static const double | csCoefDouble_Hminus [3][9] |
| static const double | csCoefSingle_Hplus [3][9] |
| static const double | csCoefDouble_Hplus [3][9] |
| static const double | csCoefSingleLoss_H [3][9] |
| static const double | csCoefSingleCapt_H [3][9] |
| static const double | csCoefSingle_Hplus_Tabata [10] |
| static const double | csCoefHminusProduction_H_Tabata [13] |
| static const double | csCoefProtonProduction_H_Tabata [9] |
| static const double | csCoefProtonProduction_H2plus_Tabata [11] |
| static const double | csCoefH3plusProduction_H2plus_Tabata [7] |
| static const double | csCoefSingle_Hminus_Chebyshev [11] |
| static const double | csCoefDouble_Hminus_Chebyshev [11] |
| static const double | csCoefSingle_Hplus_Chebyshev [11] |
| static const double | csCoefDouble_Hplus_Chebyshev [11] |
| static const double | csCoefHydrogenProduction_H2plus_Chebyshev [11] |
| static const double | csCoefProtonProduction_H2plus_Chebyshev [11] |
| static const double | energyRangeH2plusinH2 [2] = {111.4, 7.8462E+04} |
| static double | a_m [9] = {} |
| static double | b_m [3][9] = {} |
Definition at line 46 of file BeamStrippingPhysics.h.
| BeamStrippingPhysics::BeamStrippingPhysics | ( | const std::string & | name, |
| ElementBase * | element ) |
Definition at line 63 of file BeamStrippingPhysics.cpp.
References Options::asciidump, bunchToMatStat_m, dT_m, getName(), lossDs_m, mass_m, name, nCSA_m, nCSB_m, nCSC_m, nCSTotal_m, ParticleMatterInteractionHandler::ParticleMatterInteractionHandler(), pressure_m, pType_m, r_m, rediffusedStat_m, stoppedPartStat_m, T_m, temperature_m, and totalPartsInMat_m.
| BeamStrippingPhysics::~BeamStrippingPhysics | ( | ) |
Definition at line 94 of file BeamStrippingPhysics.cpp.
|
overridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 100 of file BeamStrippingPhysics.cpp.
References PartBunchBase< T, Dim >::destroyT(), DEUTERON, doPhysics(), dT_m, ParticleMatterInteractionHandler::element_ref_m, gatherStatistics(), PartBunchBase< T, Dim >::get_sPos(), PartBunchBase< T, Dim >::getdT(), OpalData::getInstance(), ParticleProperties::getParticleTypeString(), PartBunchBase< T, Dim >::getPType(), H2P, ParticleMatterInteractionHandler::hitTester_m, HMINUS, HYDROGEN, PROTON, rediffusedStat_m, stoppedPartStat_m, totalPartsInMat_m, vac_m, and VACUUM.
|
private |
Definition at line 203 of file BeamStrippingPhysics.cpp.
References a_m, AIR, Physics::amu, b_m, Units::cm2m, computeCrossSectionBohr(), computeCrossSectionChebyshev(), computeCrossSectionNakai(), computeCrossSectionTabata(), csCoefDouble_Hminus, csCoefDouble_Hminus_Chebyshev, csCoefDouble_Hplus, csCoefDouble_Hplus_Chebyshev, csCoefH3plusProduction_H2plus_Tabata, csCoefHminusProduction_H_Tabata, csCoefHydrogenProduction_H2plus_Chebyshev, csCoefProtonProduction_H2plus_Chebyshev, csCoefProtonProduction_H2plus_Tabata, csCoefProtonProduction_H_Tabata, csCoefSingle_Hminus, csCoefSingle_Hminus_Chebyshev, csCoefSingle_Hplus, csCoefSingle_Hplus_Chebyshev, csCoefSingle_Hplus_Tabata, csCoefSingleCapt_H, csCoefSingleLoss_H, DEUTERON, energyRangeH2plusinH2, Units::GeV2keV, H2, H2P, HMINUS, HYDROGEN, Physics::kB, Units::keV2eV, Physics::m_h2p, Physics::m_hm, Physics::m_p, nCSA_m, nCSB_m, nCSC_m, nCSTotal_m, pressure_m, PROTON, pType_m, Physics::q_e, temperature_m, and vac_m.
Referenced by doPhysics().
|
private |
Analytical expressions for electron loss by light and heavy ions passing through gases based on Bohr theory. H.-D.Betz, "Charge states and charge-changing cross sections of fast heavy ions penetrating through gaseous and solid media", Rev. Mod. Phys. 44, 465 (1972).
Definition at line 542 of file BeamStrippingPhysics.cpp.
References Physics::a0, Physics::c, Units::eV2keV, Units::GeV2eV, Physics::h_bar, Units::m2cm, Physics::m_e, mass_m, and Physics::pi.
Referenced by computeCrossSection().
|
private |
Analytical expression for cross section for inelastic collisions between hydrogen atoms, molecules and ions from Chebyshev fitting parameters. C.F.Barnett, "Atomic data for fusion. Volume 1: Collisions of H, H2, He and Li atoms and ions with atoms and molecules", ORNL-6068/V1 (1990).
Definition at line 517 of file BeamStrippingPhysics.cpp.
References a_m.
Referenced by computeCrossSection().
|
private |
Analytical expression for charge-transfer cross section between hydrogen ions and atoms with gaseous atoms and molecules based on semiempirically functional forms. Y.Nakai et.al, "Cross sections for charge transfer of hydrogen atoms and ions colliding with gaseous atoms and molecules", At. Data Nucl. Data Tables 37, 69 (1987).
Definition at line 466 of file BeamStrippingPhysics.cpp.
References b_m, Physics::E_ryd, Units::GeV2keV, Physics::m_e, and Physics::m_h.
Referenced by computeCrossSection().
|
private |
Analytical expression for cross section of collision processes between hydrogen ions, atoms, and molecules with hydrogen molecules based on semiempirically functional forms. T.Tabata and T.Shirai, "Analytic cross sections for collisions of H+, H2+, H3+, H, H2 and H− with hydrogen molecules", At. Data Nucl. Data Tables 76, 1 (2000).
Definition at line 493 of file BeamStrippingPhysics.cpp.
References Physics::E_ryd, and Units::GeV2keV.
Referenced by computeCrossSection().
|
inlineoverrideprivatevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 90 of file BeamStrippingPhysics.h.
| void BeamStrippingPhysics::doPhysics | ( | PartBunchBase< double, 3 > * | bunch | ) |
Definition at line 142 of file BeamStrippingPhysics.cpp.
References PartBunchBase< T, Dim >::Bin, Physics::c, computeCrossSection(), cycl_m, dT_m, endl(), evalGasStripping(), evalLorentzStripping(), Util::getGamma(), OpalData::getInstance(), Util::getKineticEnergy(), PartBunchBase< T, Dim >::getLocalNum(), getName(), getSecondaryParticles(), PartBunchBase< T, Dim >::getT(), gmsgALL, ParticleMatterInteractionHandler::hitTester_m, HMINUS, PartBunchBase< T, Dim >::ID, Units::kG2T, level4(), lossDs_m, PartBunchBase< T, Dim >::M, mass_m, PartBunchBase< T, Dim >::P, pressure_m, PartBunchBase< T, Dim >::PType, pType_m, PartBunchBase< T, Dim >::Q, PartBunchBase< T, Dim >::R, rediffusedStat_m, stoppedPartStat_m, T_m, temperature_m, totalPartsInMat_m, and vac_m.
Referenced by apply().
|
private |
Definition at line 563 of file BeamStrippingPhysics.cpp.
References nCSTotal_m, and r_m.
Referenced by doPhysics().
|
private |
Expression for H- lifetime based on the calculation of the electric dissociation rate from the formal theory of decay. L.R.Scherk, "A improved value for the electron affinity of the negative hydrogen ion", Can. J. Phys. 57, 558 (1979).
Definition at line 576 of file BeamStrippingPhysics.cpp.
References a, Physics::a0, dT_m, Units::GeV2eV, Units::GeV2kg, Physics::h_bar, Physics::m_e, Physics::q_e, and r_m.
Referenced by doPhysics().
|
private |
Definition at line 713 of file BeamStrippingPhysics.cpp.
References allreduce(), rediffusedStat_m, stoppedPartStat_m, and totalPartsInMat_m.
Referenced by apply().
|
inlineinherited |
Definition at line 86 of file ParticleMatterInteractionHandler.h.
References element_ref_m.
|
inlineinherited |
Definition at line 96 of file ParticleMatterInteractionHandler.h.
References allParticleInMat_m.
|
inlineoverridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 156 of file BeamStrippingPhysics.h.
References ParticleMatterInteractionHandler::element_ref_m, and ParticleMatterInteractionHandler::name_m.
Referenced by BeamStrippingPhysics(), doPhysics(), and transformToSecondary().
|
inlineoverridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 171 of file BeamStrippingPhysics.h.
References bunchToMatStat_m.
|
inlineoverridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 161 of file BeamStrippingPhysics.h.
References totalPartsInMat_m.
|
inlineoverridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 166 of file BeamStrippingPhysics.h.
References rediffusedStat_m.
|
private |
Definition at line 595 of file BeamStrippingPhysics.cpp.
References AIR, DEUTERON, H2, H2P, H3P, HMINUS, HYDROGEN, nCSA_m, nCSB_m, nCSC_m, nCSTotal_m, PROTON, pType_m, r_m, transformToSecondary(), and vac_m.
Referenced by doPhysics().
|
inlineoverridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 151 of file BeamStrippingPhysics.h.
References T_m.
|
inlineoverridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 181 of file BeamStrippingPhysics.h.
|
overridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 697 of file BeamStrippingPhysics.cpp.
References ParticleMatterInteractionHandler::element_ref_m, endl(), Inform::flags(), level2(), ParticleMatterInteractionHandler::name_m, rediffusedStat_m, stoppedPartStat_m, Util::toStringWithThousandSep(), totalPartsInMat_m, and vac_m.
|
inline |
Definition at line 52 of file BeamStrippingPhysics.h.
References cycl_m.
|
inlineinherited |
Definition at line 91 of file ParticleMatterInteractionHandler.h.
References allParticleInMat_m.
Referenced by ParallelTTracker::computeParticleMatterInteraction().
|
inlineoverridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 176 of file BeamStrippingPhysics.h.
References totalPartsInMat_m.
|
private |
Definition at line 684 of file BeamStrippingPhysics.cpp.
References endl(), getName(), ParticleProperties::getParticleChargeInCoulomb(), ParticleProperties::getParticleMass(), ParticleProperties::getParticleTypeString(), gmsgALL, PartBunchBase< T, Dim >::ID, level4(), PartBunchBase< T, Dim >::M, PartBunchBase< T, Dim >::POrigin, PartBunchBase< T, Dim >::PType, PartBunchBase< T, Dim >::Q, and SECONDARY.
Referenced by getSecondaryParticles().
|
inlineinherited |
Definition at line 81 of file ParticleMatterInteractionHandler.h.
References element_ref_m.
|
staticprivate |
Definition at line 800 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection(), and computeCrossSectionChebyshev().
|
protectedinherited |
if all particles are in matter stay inside the particle matter interaction
Definition at line 66 of file ParticleMatterInteractionHandler.h.
Referenced by ScatteringPhysics::apply(), getFlagAllParticlesIn(), ParticleMatterInteractionHandler(), and setFlagAllParticlesIn().
|
staticprivate |
Definition at line 801 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection(), and computeCrossSectionNakai().
|
private |
Definition at line 120 of file BeamStrippingPhysics.h.
Referenced by BeamStrippingPhysics(), and getNumEntered().
|
staticprivate |
Definition at line 739 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 784 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 749 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 790 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 778 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 769 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 793 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 796 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 775 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 772 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 734 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 781 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 744 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 787 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 766 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 759 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 754 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
private |
Definition at line 102 of file BeamStrippingPhysics.h.
Referenced by doPhysics(), and setCyclotron().
|
private |
Definition at line 107 of file BeamStrippingPhysics.h.
Referenced by apply(), BeamStrippingPhysics(), doPhysics(), and evalLorentzStripping().
|
protectedinherited |
Definition at line 64 of file ParticleMatterInteractionHandler.h.
Referenced by ScatteringPhysics::addBackToBunch(), BeamStrippingPhysics::apply(), ScatteringPhysics::copyFromBunch(), getElement(), BeamStrippingPhysics::getName(), ScatteringPhysics::getName(), ParticleMatterInteractionHandler(), BeamStrippingPhysics::print(), ScatteringPhysics::print(), ScatteringPhysics::ScatteringPhysics(), ScatteringPhysics::setTimeStepForLeavingParticles(), and updateElement().
|
staticprivate |
Definition at line 799 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
protectedinherited |
Definition at line 70 of file ParticleMatterInteractionHandler.h.
Referenced by ScatteringPhysics::addBackToBunch(), BeamStrippingPhysics::apply(), ScatteringPhysics::computeInteraction(), ScatteringPhysics::copyFromBunch(), BeamStrippingPhysics::doPhysics(), and ScatteringPhysics::ScatteringPhysics().
|
private |
Definition at line 112 of file BeamStrippingPhysics.h.
Referenced by BeamStrippingPhysics(), doPhysics(), and ~BeamStrippingPhysics().
|
private |
Definition at line 108 of file BeamStrippingPhysics.h.
Referenced by BeamStrippingPhysics(), computeCrossSectionBohr(), and doPhysics().
|
protectedinherited |
Definition at line 68 of file ParticleMatterInteractionHandler.h.
Referenced by BeamStrippingPhysics::getName(), ScatteringPhysics::getName(), ParticleMatterInteractionHandler(), BeamStrippingPhysics::print(), and ScatteringPhysics::print().
|
private |
macroscopic cross sections
Definition at line 115 of file BeamStrippingPhysics.h.
Referenced by BeamStrippingPhysics(), computeCrossSection(), and getSecondaryParticles().
|
private |
Definition at line 116 of file BeamStrippingPhysics.h.
Referenced by BeamStrippingPhysics(), computeCrossSection(), and getSecondaryParticles().
|
private |
Definition at line 117 of file BeamStrippingPhysics.h.
Referenced by BeamStrippingPhysics(), computeCrossSection(), and getSecondaryParticles().
|
private |
Definition at line 118 of file BeamStrippingPhysics.h.
Referenced by BeamStrippingPhysics(), computeCrossSection(), evalGasStripping(), and getSecondaryParticles().
|
private |
Definition at line 109 of file BeamStrippingPhysics.h.
Referenced by BeamStrippingPhysics(), computeCrossSection(), and doPhysics().
|
private |
Definition at line 99 of file BeamStrippingPhysics.h.
Referenced by BeamStrippingPhysics(), computeCrossSection(), doPhysics(), and getSecondaryParticles().
|
private |
Definition at line 104 of file BeamStrippingPhysics.h.
Referenced by BeamStrippingPhysics(), evalGasStripping(), evalLorentzStripping(), getSecondaryParticles(), and ~BeamStrippingPhysics().
|
private |
Definition at line 122 of file BeamStrippingPhysics.h.
Referenced by apply(), BeamStrippingPhysics(), doPhysics(), gatherStatistics(), getRediffused(), and print().
|
private |
Definition at line 121 of file BeamStrippingPhysics.h.
Referenced by apply(), BeamStrippingPhysics(), doPhysics(), gatherStatistics(), and print().
|
private |
Definition at line 106 of file BeamStrippingPhysics.h.
Referenced by BeamStrippingPhysics(), doPhysics(), and getTime().
|
private |
Definition at line 110 of file BeamStrippingPhysics.h.
Referenced by BeamStrippingPhysics(), computeCrossSection(), and doPhysics().
|
private |
Definition at line 123 of file BeamStrippingPhysics.h.
Referenced by apply(), BeamStrippingPhysics(), doPhysics(), gatherStatistics(), getParticlesInMat(), print(), and stillActive().
|
private |
Definition at line 101 of file BeamStrippingPhysics.h.
Referenced by apply(), computeCrossSection(), doPhysics(), getSecondaryParticles(), and print().