|
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) |
Public Member Functions inherited from ParticleMatterInteractionHandler | |
| ParticleMatterInteractionHandler (std::string name, ElementBase *elref) | |
| virtual | ~ParticleMatterInteractionHandler () |
| void | setFlagAllParticlesIn (bool p) |
| bool | getFlagAllParticlesIn () const |
| void | updateElement (ElementBase *newref) |
| ElementBase * | getElement () |
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] = {} |
Additional Inherited Members | |
Protected Attributes inherited from ParticleMatterInteractionHandler | |
| 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 |
Definition at line 46 of file BeamStrippingPhysics.h.
| BeamStrippingPhysics::BeamStrippingPhysics | ( | const std::string & | name, |
| ElementBase * | element | ||
| ) |
Definition at line 61 of file BeamStrippingPhysics.cpp.
References Options::asciidump, getName(), lossDs_m, and r_m.

| BeamStrippingPhysics::~BeamStrippingPhysics | ( | ) |
Definition at line 92 of file BeamStrippingPhysics.cpp.
|
overridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 98 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(), ElementBase::getType(), H2P, ParticleMatterInteractionHandler::hitTester_m, HMINUS, HYDROGEN, PROTON, rediffusedStat_m, stoppedPartStat_m, totalPartsInMat_m, vac_m, and VACUUM.

|
private |
Definition at line 201 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, Vacuum::getResidualGas(), 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 557 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 515 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 464 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 491 of file BeamStrippingPhysics.cpp.
References Physics::E_ryd, and Units::GeV2keV.
Referenced by computeCrossSection().
|
inlineoverrideprivatevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 89 of file BeamStrippingPhysics.h.
| void BeamStrippingPhysics::doPhysics | ( | PartBunchBase< double, 3 > * | bunch | ) |
Definition at line 140 of file BeamStrippingPhysics.cpp.
References Cyclotron::apply(), PartBunchBase< T, Dim >::Bin, Physics::c, Vacuum::checkPressure(), computeCrossSection(), cycl_m, dT_m, endl(), evalGasStripping(), evalLorentzStripping(), Util::getGamma(), OpalData::getInstance(), Util::getKineticEnergy(), PartBunchBase< T, Dim >::getLocalNum(), getName(), getSecondaryParticles(), Vacuum::getStop(), PartBunchBase< T, Dim >::getT(), Vacuum::getTemperature(), 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 578 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 591 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 728 of file BeamStrippingPhysics.cpp.
References allreduce(), rediffusedStat_m, stoppedPartStat_m, and totalPartsInMat_m.
Referenced by apply().

|
inlineoverridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 155 of file BeamStrippingPhysics.h.
References ParticleMatterInteractionHandler::element_ref_m, ElementBase::getName(), and ParticleMatterInteractionHandler::name_m.
Referenced by BeamStrippingPhysics(), doPhysics(), and transformToSecondary().

|
inlineoverridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 170 of file BeamStrippingPhysics.h.
References bunchToMatStat_m.
|
inlineoverridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 160 of file BeamStrippingPhysics.h.
References totalPartsInMat_m.
|
inlineoverridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 165 of file BeamStrippingPhysics.h.
References rediffusedStat_m.
|
private |
Definition at line 610 of file BeamStrippingPhysics.cpp.
References AIR, DEUTERON, Vacuum::getResidualGas(), 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 150 of file BeamStrippingPhysics.h.
References T_m.
|
inlineoverridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 180 of file BeamStrippingPhysics.h.
|
overridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 712 of file BeamStrippingPhysics.cpp.
References ParticleMatterInteractionHandler::element_ref_m, endl(), Inform::flags(), ElementBase::getName(), Vacuum::getResidualGasName(), 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.
|
inlineoverridevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 175 of file BeamStrippingPhysics.h.
References totalPartsInMat_m.
|
private |
Definition at line 699 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().

|
staticprivate |
Definition at line 814 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection(), and computeCrossSectionChebyshev().
|
staticprivate |
Definition at line 815 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection(), and computeCrossSectionNakai().
|
private |
Definition at line 119 of file BeamStrippingPhysics.h.
Referenced by getNumEntered().
|
staticprivate |
Definition at line 753 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 798 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 763 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 804 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 792 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 783 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 807 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 810 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 789 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 786 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 748 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 795 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 758 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 801 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 780 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 773 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
staticprivate |
Definition at line 768 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
private |
Definition at line 101 of file BeamStrippingPhysics.h.
Referenced by doPhysics(), and setCyclotron().
|
private |
Definition at line 106 of file BeamStrippingPhysics.h.
Referenced by apply(), doPhysics(), and evalLorentzStripping().
|
staticprivate |
Definition at line 813 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection().
|
private |
Definition at line 111 of file BeamStrippingPhysics.h.
Referenced by BeamStrippingPhysics(), doPhysics(), and ~BeamStrippingPhysics().
|
private |
Definition at line 107 of file BeamStrippingPhysics.h.
Referenced by computeCrossSectionBohr(), and doPhysics().
|
private |
macroscopic cross sections
Definition at line 114 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection(), and getSecondaryParticles().
|
private |
Definition at line 115 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection(), and getSecondaryParticles().
|
private |
Definition at line 116 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection(), and getSecondaryParticles().
|
private |
Definition at line 117 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection(), evalGasStripping(), and getSecondaryParticles().
|
private |
Definition at line 108 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection(), and doPhysics().
|
private |
Definition at line 98 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection(), doPhysics(), and getSecondaryParticles().
|
private |
Definition at line 103 of file BeamStrippingPhysics.h.
Referenced by BeamStrippingPhysics(), evalGasStripping(), evalLorentzStripping(), getSecondaryParticles(), and ~BeamStrippingPhysics().
|
private |
Definition at line 121 of file BeamStrippingPhysics.h.
Referenced by apply(), doPhysics(), gatherStatistics(), getRediffused(), and print().
|
private |
Definition at line 120 of file BeamStrippingPhysics.h.
Referenced by apply(), doPhysics(), gatherStatistics(), and print().
|
private |
Definition at line 105 of file BeamStrippingPhysics.h.
Referenced by doPhysics(), and getTime().
|
private |
Definition at line 109 of file BeamStrippingPhysics.h.
Referenced by computeCrossSection(), and doPhysics().
|
private |
Definition at line 122 of file BeamStrippingPhysics.h.
Referenced by apply(), doPhysics(), gatherStatistics(), getParticlesInMat(), print(), and stillActive().
|
private |
Definition at line 100 of file BeamStrippingPhysics.h.
Referenced by apply(), computeCrossSection(), doPhysics(), getSecondaryParticles(), and print().