OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
#include <BeamStrippingPhysics.hh>
Public Member Functions | |
BeamStrippingPhysics (const std::string &name, ElementBase *element) | |
~BeamStrippingPhysics () | |
void | setCyclotron (Cyclotron *cycl) |
void | apply (PartBunchBase< double, 3 > *bunch, const std::pair< Vector_t, double > &boundingSphere, size_t numParticlesInSimulation=0) |
virtual const std::string | getType () const |
void | print (Inform &msg) |
bool | stillActive () |
bool | stillAlive (PartBunchBase< double, 3 > *bunch) |
double | getTime () |
std::string | getName () |
size_t | getParticlesInMat () |
unsigned | getRediffused () |
unsigned int | getNumEntered () |
void | doPhysics (PartBunchBase< double, 3 > *bunch) |
![]() | |
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 | crossSection (const Vector_t &R, double Eng) |
double | csAnalyticFunctionNakai (double Eng, double Eth, int &i) |
double | csAnalyticFunctionTabata (double Eng, double Eth, double a1, double a2, double a3, double a4, double a5, double a6) |
double | csChebyshevFitting (double Eng, double Emin, double Emax) |
bool | gasStripping (double &deltas) |
bool | lorentzStripping (double &gamma, double &E) |
void | secondaryParticles (PartBunchBase< double, 3 > *bunch, size_t &i, bool pdead_LS) |
void | transformToProton (PartBunchBase< double, 3 > *bunch, size_t &i) |
void | transformToHydrogen (PartBunchBase< double, 3 > *bunch, size_t &i) |
void | transformToHminus (PartBunchBase< double, 3 > *bunch, size_t &i) |
void | transformToH3plus (PartBunchBase< double, 3 > *bunch, size_t &i) |
bool | computeEnergyLoss (Vector_t &P, const double deltat, bool includeFluctuations=true) const |
Private Attributes | |
Cyclotron * | cycl_m |
BeamStripping * | bstp_m |
ElementBase::ElementType | bstpshape_m |
gsl_rng * | r_m |
double | T_m |
double | dT_m |
s More... | |
double | mass_m |
s More... | |
double | charge_m |
std::string | gas_m |
double | pressure_m |
std::unique_ptr< LossDataSink > | lossDs_m |
double | NCS_a |
double | NCS_b |
double | NCS_c |
double | NCS_total |
unsigned | bunchToMatStat_m |
unsigned | stoppedPartStat_m |
unsigned | rediffusedStat_m |
size_t | locPartsInMat_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 | 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 double | a_m [9] = {} |
static double | b_m [3][9] = {} |
Additional Inherited Members | |
![]() | |
ElementBase * | element_ref_m |
bool | allParticleInMat_m |
if all particles are in matter stay inside the particle matter interaction More... | |
Definition at line 32 of file BeamStrippingPhysics.hh.
BeamStrippingPhysics::BeamStrippingPhysics | ( | const std::string & | name, |
ElementBase * | element | ||
) |
Definition at line 68 of file BeamStrippingPhysics.cpp.
References Options::asciidump, bstp_m, bstpshape_m, ParticleMatterInteractionHandler::element_ref_m, gas_m, ParticleMatterInteractionHandler::getElement(), ElementBase::getName(), BeamStripping::getResidualGas(), ElementBase::getType(), lossDs_m, r_m, ElementBase::removeWrappers(), and T.
BeamStrippingPhysics::~BeamStrippingPhysics | ( | ) |
Definition at line 101 of file BeamStrippingPhysics.cpp.
|
virtual |
Implements ParticleMatterInteractionHandler.
Definition at line 110 of file BeamStrippingPhysics.cpp.
References abs(), doPhysics(), dT_m, endl(), PartBunchBase< T, Dim >::get_sPos(), PartBunchBase< T, Dim >::getdT(), PartBunchBase< T, Dim >::getM(), getName(), INFORM_ALL_NODES, Physics::m_h, Physics::m_h2p, Physics::m_hm, and Physics::m_p.
|
inlineprivatevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 78 of file BeamStrippingPhysics.hh.
|
private |
Definition at line 204 of file BeamStrippingPhysics.cpp.
References a_m, abs(), b_m, bstp_m, charge_m, csAnalyticFunctionNakai(), csAnalyticFunctionTabata(), csChebyshevFitting(), csCoefDouble_Hminus, csCoefDouble_Hminus_Chebyshev, csCoefDouble_Hplus, csCoefDouble_Hplus_Chebyshev, csCoefH3plusProduction_H2plus_Tabata, csCoefHminusProduction_H_Tabata, csCoefHydrogenProduction_H2plus_Chebyshev, csCoefProtonProduction_H2plus_Tabata, csCoefProtonProduction_H_Tabata, csCoefSingle_Hminus, csCoefSingle_Hminus_Chebyshev, csCoefSingle_Hplus, csCoefSingle_Hplus_Chebyshev, csCoefSingleCapt_H, csCoefSingleLoss_H, gas_m, BeamStripping::getTemperature(), Physics::kB, Physics::m_h, Physics::m_h2p, Physics::m_hm, Physics::m_p, mass_m, NCS_a, NCS_b, NCS_c, NCS_total, pressure_m, and Physics::q_e.
Referenced by doPhysics().
|
private |
Definition at line 440 of file BeamStrippingPhysics.cpp.
References b_m, Physics::E_ryd, Physics::m_e, Physics::m_h, and pow().
Referenced by crossSection().
|
private |
Definition at line 458 of file BeamStrippingPhysics.cpp.
References Physics::E_ryd, and pow().
Referenced by crossSection().
|
private |
Definition at line 476 of file BeamStrippingPhysics.cpp.
References a_m, exp(), log(), and X.
Referenced by crossSection().
|
inline |
Definition at line 133 of file BeamStrippingPhysics.cpp.
References abs(), Cyclotron::apply(), PartBunchBase< T, Dim >::Bin, bstp_m, PartBunchBase< T, Dim >::bunchNum, Physics::c, charge_m, InsideTester::checkHit(), crossSection(), cycl_m, dot(), dT_m, ParticleMatterInteractionHandler::element_ref_m, endl(), gasStripping(), PartBunchBase< T, Dim >::getLocalNum(), getName(), BeamStripping::getStop(), PartBunchBase< T, Dim >::getT(), PartBunchBase< T, Dim >::getTotalNum(), PartBunchBase< T, Dim >::ID, INFORM_ALL_NODES, level4(), lorentzStripping(), lossDs_m, PartBunchBase< T, Dim >::M, Physics::m_hm, mass_m, PartBunchBase< T, Dim >::P, pressure_m, PartBunchBase< T, Dim >::Q, Physics::q_e, PartBunchBase< T, Dim >::R, secondaryParticles(), sqrt(), stoppedPartStat_m, T_m, and PartBunchBase< T, Dim >::updateNumTotal().
Referenced by apply().
|
private |
Definition at line 493 of file BeamStrippingPhysics.cpp.
References exp(), NCS_total, and r_m.
Referenced by doPhysics().
|
inlinevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 51 of file BeamStrippingPhysics.hh.
References ParticleMatterInteractionHandler::element_ref_m, and ElementBase::getName().
Referenced by apply(), doPhysics(), transformToH3plus(), transformToHminus(), transformToHydrogen(), and transformToProton().
|
inlinevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 54 of file BeamStrippingPhysics.hh.
References bunchToMatStat_m.
|
inlinevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 52 of file BeamStrippingPhysics.hh.
References locPartsInMat_m.
|
inlinevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 53 of file BeamStrippingPhysics.hh.
References rediffusedStat_m.
|
inlinevirtual |
Implements ParticleMatterInteractionHandler.
Definition at line 50 of file BeamStrippingPhysics.hh.
References T_m.
|
virtual |
Implements ParticleMatterInteractionHandler.
Definition at line 106 of file BeamStrippingPhysics.cpp.
|
private |
Definition at line 501 of file BeamStrippingPhysics.cpp.
References Physics::a0, Physics::c, dT_m, exp(), Physics::h_bar, Physics::m_e, Physics::q_e, r_m, and sqrt().
Referenced by doPhysics().
|
virtual |
Implements ParticleMatterInteractionHandler.
Definition at line 645 of file BeamStrippingPhysics.cpp.
|
private |
Definition at line 528 of file BeamStrippingPhysics.cpp.
References abs(), PartBunchBase< T, Dim >::Bin, charge_m, PartBunchBase< T, Dim >::getLocalNum(), Physics::m_h, Physics::m_h2p, Physics::m_hm, Physics::m_p, mass_m, NCS_a, NCS_b, NCS_c, NCS_total, PartBunchBase< T, Dim >::PType, Physics::q_e, r_m, ParticleType::SECONDARY, transformToH3plus(), transformToHminus(), transformToHydrogen(), transformToProton(), and PartBunchBase< T, Dim >::weHaveBins().
Referenced by doPhysics().
|
inline |
Definition at line 39 of file BeamStrippingPhysics.hh.
References cycl_m.
|
virtual |
Implements ParticleMatterInteractionHandler.
Definition at line 648 of file BeamStrippingPhysics.cpp.
References locPartsInMat_m.
|
virtual |
Implements ParticleMatterInteractionHandler.
Definition at line 652 of file BeamStrippingPhysics.cpp.
|
private |
Definition at line 637 of file BeamStrippingPhysics.cpp.
References endl(), getName(), PartBunchBase< T, Dim >::ID, INFORM_ALL_NODES, level4(), PartBunchBase< T, Dim >::M, Physics::m_h3p, PartBunchBase< T, Dim >::Q, and Physics::q_e.
Referenced by secondaryParticles().
|
private |
Definition at line 630 of file BeamStrippingPhysics.cpp.
References endl(), getName(), PartBunchBase< T, Dim >::ID, INFORM_ALL_NODES, level4(), PartBunchBase< T, Dim >::M, Physics::m_hm, PartBunchBase< T, Dim >::Q, and Physics::q_e.
Referenced by secondaryParticles().
|
private |
Definition at line 623 of file BeamStrippingPhysics.cpp.
References endl(), getName(), PartBunchBase< T, Dim >::ID, INFORM_ALL_NODES, level4(), PartBunchBase< T, Dim >::M, Physics::m_h, and PartBunchBase< T, Dim >::Q.
Referenced by secondaryParticles().
|
private |
Definition at line 616 of file BeamStrippingPhysics.cpp.
References endl(), getName(), PartBunchBase< T, Dim >::ID, INFORM_ALL_NODES, level4(), PartBunchBase< T, Dim >::M, Physics::m_p, PartBunchBase< T, Dim >::Q, and Physics::q_e.
Referenced by secondaryParticles().
|
staticprivate |
Definition at line 127 of file BeamStrippingPhysics.hh.
Referenced by crossSection(), and csChebyshevFitting().
|
staticprivate |
Definition at line 128 of file BeamStrippingPhysics.hh.
Referenced by crossSection(), and csAnalyticFunctionNakai().
|
private |
Definition at line 83 of file BeamStrippingPhysics.hh.
Referenced by BeamStrippingPhysics(), crossSection(), and doPhysics().
|
private |
Definition at line 84 of file BeamStrippingPhysics.hh.
Referenced by BeamStrippingPhysics().
|
private |
Definition at line 104 of file BeamStrippingPhysics.hh.
Referenced by getNumEntered().
|
private |
Definition at line 92 of file BeamStrippingPhysics.hh.
Referenced by crossSection(), doPhysics(), and secondaryParticles().
|
staticprivate |
Definition at line 110 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
staticprivate |
Definition at line 122 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
staticprivate |
Definition at line 112 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
staticprivate |
Definition at line 124 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
staticprivate |
Definition at line 119 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
staticprivate |
Definition at line 116 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
staticprivate |
Definition at line 125 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
staticprivate |
Definition at line 118 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
staticprivate |
Definition at line 117 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
staticprivate |
Definition at line 109 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
staticprivate |
Definition at line 121 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
staticprivate |
Definition at line 111 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
staticprivate |
Definition at line 123 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
staticprivate |
Definition at line 114 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
staticprivate |
Definition at line 113 of file BeamStrippingPhysics.hh.
Referenced by crossSection().
|
private |
Definition at line 82 of file BeamStrippingPhysics.hh.
Referenced by doPhysics(), and setCyclotron().
|
private |
s
Definition at line 89 of file BeamStrippingPhysics.hh.
Referenced by apply(), doPhysics(), and lorentzStripping().
|
private |
Definition at line 94 of file BeamStrippingPhysics.hh.
Referenced by BeamStrippingPhysics(), and crossSection().
|
private |
Definition at line 107 of file BeamStrippingPhysics.hh.
Referenced by getParticlesInMat(), and stillActive().
|
private |
Definition at line 97 of file BeamStrippingPhysics.hh.
Referenced by BeamStrippingPhysics(), doPhysics(), and ~BeamStrippingPhysics().
|
private |
s
Definition at line 91 of file BeamStrippingPhysics.hh.
Referenced by crossSection(), doPhysics(), and secondaryParticles().
|
private |
Definition at line 99 of file BeamStrippingPhysics.hh.
Referenced by crossSection(), and secondaryParticles().
|
private |
Definition at line 100 of file BeamStrippingPhysics.hh.
Referenced by crossSection(), and secondaryParticles().
|
private |
Definition at line 101 of file BeamStrippingPhysics.hh.
Referenced by crossSection(), and secondaryParticles().
|
private |
Definition at line 102 of file BeamStrippingPhysics.hh.
Referenced by crossSection(), gasStripping(), and secondaryParticles().
|
private |
Definition at line 95 of file BeamStrippingPhysics.hh.
Referenced by crossSection(), and doPhysics().
|
private |
Definition at line 86 of file BeamStrippingPhysics.hh.
Referenced by BeamStrippingPhysics(), gasStripping(), lorentzStripping(), secondaryParticles(), and ~BeamStrippingPhysics().
|
private |
Definition at line 106 of file BeamStrippingPhysics.hh.
Referenced by getRediffused().
|
private |
Definition at line 105 of file BeamStrippingPhysics.hh.
Referenced by doPhysics().
|
private |
Definition at line 88 of file BeamStrippingPhysics.hh.
Referenced by doPhysics(), and getTime().