Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4HadFinalState Class Reference

#include <G4HadFinalState.hh>

Public Member Functions

 G4HadFinalState ()
 
G4int GetNumberOfSecondaries () const
 
void SetEnergyChange (G4double anEnergy)
 
G4double GetEnergyChange () const
 
void SetMomentumChange (const G4ThreeVector &aV)
 
void SetMomentumChange (G4double x, G4double y, G4double z)
 
const G4ThreeVectorGetMomentumChange () const
 
void AddSecondary (G4DynamicParticle *aP)
 
void AddSecondary (const G4HadSecondary &aHS)
 
void SetStatusChange (G4HadFinalStateStatus aS)
 
G4HadFinalStateStatus GetStatusChange () const
 
void Clear ()
 
const G4LorentzRotationGetTrafoToLab () const
 
void SetTrafoToLab (const G4LorentzRotation &aT)
 
void SetWeightChange (G4double aW)
 
G4double GetWeightChange () const
 
G4HadSecondaryGetSecondary (size_t i)
 
const G4HadSecondaryGetSecondary (size_t i) const
 
void SetLocalEnergyDeposit (G4double aE)
 
G4double GetLocalEnergyDeposit () const
 
void SecondariesAreStale ()
 
void ClearSecondaries ()
 
void AddSecondaries (const std::vector< G4HadSecondary > &addSecs)
 
void AddSecondaries (const G4HadFinalState &addHFS)
 
void AddSecondaries (const G4HadFinalState *addHFS)
 

Detailed Description

Definition at line 45 of file G4HadFinalState.hh.

Constructor & Destructor Documentation

◆ G4HadFinalState()

G4HadFinalState::G4HadFinalState ( )

Definition at line 35 of file G4HadFinalState.cc.

36 : theDirection(0,0,1), theEnergy(-1), theStat(isAlive),
37 theW(1.), theEDep(0.) {}
@ isAlive

Member Function Documentation

◆ AddSecondaries() [1/3]

void G4HadFinalState::AddSecondaries ( const G4HadFinalState addHFS)
inline

Definition at line 75 of file G4HadFinalState.hh.

75 {
76 AddSecondaries(addHFS.theSecs);
77 }
void AddSecondaries(const std::vector< G4HadSecondary > &addSecs)

◆ AddSecondaries() [2/3]

void G4HadFinalState::AddSecondaries ( const G4HadFinalState addHFS)
inline

Definition at line 79 of file G4HadFinalState.hh.

79 {
80 if (addHFS) AddSecondaries(addHFS->theSecs);
81 }

◆ AddSecondaries() [3/3]

void G4HadFinalState::AddSecondaries ( const std::vector< G4HadSecondary > &  addSecs)

Definition at line 76 of file G4HadFinalState.cc.

77{
78 theSecs.insert(theSecs.end(),addSecs.begin(),addSecs.end());
79}

Referenced by AddSecondaries(), G4ElectroNuclearReaction::ApplyYourself(), G4HadronStoppingProcess::AtRestDoIt(), and G4HadLeadBias::Bias().

◆ AddSecondary() [1/2]

void G4HadFinalState::AddSecondary ( const G4HadSecondary aHS)
inline

Definition at line 57 of file G4HadFinalState.hh.

57{ theSecs.push_back(aHS); }

◆ AddSecondary() [2/2]

void G4HadFinalState::AddSecondary ( G4DynamicParticle aP)

Definition at line 70 of file G4HadFinalState.cc.

70 {
71 // NOTE: In-situ constructor will be optimized away (no copying)
72 if (aP) theSecs.push_back(G4HadSecondary(aP));
73}

Referenced by G4NeutronHPFinalState::adjust_final_state(), G4NeutronHPChannelList::ApplyYourself(), G4WilsonAbrasionModel::ApplyYourself(), G4EMDissociation::ApplyYourself(), G4LENDCapture::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LENDFission::ApplyYourself(), G4LENDInelastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4ChiralInvariantPhaseSpace::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4LEnp::ApplyYourself(), G4LEpp::ApplyYourself(), G4NeutronRadCapture::ApplyYourself(), G4HEAntiSigmaZeroInelastic::ApplyYourself(), G4HESigmaZeroInelastic::ApplyYourself(), G4LCapture::ApplyYourself(), G4LEAlphaInelastic::ApplyYourself(), G4LEDeuteronInelastic::ApplyYourself(), G4LElastic::ApplyYourself(), G4LETritonInelastic::ApplyYourself(), G4LFission::ApplyYourself(), G4QMDReaction::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4BinaryLightIonReaction::ApplyYourself(), G4ParaFissionModel::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4PreCompoundModel::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4NeutronHPFissionFS::ApplyYourself(), G4NeutronHPInelasticBaseFS::BaseApply(), G4NeutronHPInelasticCompFS::CompositeApply(), G4CascadeInterface::copyOutputToHadronicResult(), G4HEInelastic::FillParticleChange(), G4RPGInelastic::SetUpChange(), and G4InelasticInteraction::SetUpChange().

◆ Clear()

void G4HadFinalState::Clear ( )

Definition at line 89 of file G4HadFinalState.cc.

90{
91 theDirection.set(0,0,1);
92 theEnergy = -1;
93 theStat = isAlive;
94 theW = 1.;
95 theEDep = 0.;
97}
void set(double x, double y, double z)

Referenced by G4NeutronHPChannelList::ApplyYourself(), G4WilsonAbrasionModel::ApplyYourself(), G4EMDissociation::ApplyYourself(), G4ElectroNuclearReaction::ApplyYourself(), G4LENDCapture::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LENDFission::ApplyYourself(), G4LENDInelastic::ApplyYourself(), G4ElectroVDNuclearModel::ApplyYourself(), G4ChiralInvariantPhaseSpace::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4LEnp::ApplyYourself(), G4LEpp::ApplyYourself(), G4NeutronRadCapture::ApplyYourself(), G4MuonVDNuclearModel::ApplyYourself(), G4LCapture::ApplyYourself(), G4LEAlphaInelastic::ApplyYourself(), G4LEDeuteronInelastic::ApplyYourself(), G4LElastic::ApplyYourself(), G4LENeutronInelastic::ApplyYourself(), G4LEProtonInelastic::ApplyYourself(), G4LETritonInelastic::ApplyYourself(), G4LFission::ApplyYourself(), G4QMDReaction::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4EmCaptureCascade::ApplyYourself(), G4MuMinusCapturePrecompound::ApplyYourself(), G4MuonMinusBoundDecay::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4BinaryLightIonReaction::ApplyYourself(), G4CascadeInterface::ApplyYourself(), G4ParaFissionModel::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4PreCompoundModel::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4NeutronHPFissionFS::ApplyYourself(), G4HadronStoppingProcess::AtRestDoIt(), G4NeutronHPInelasticBaseFS::BaseApply(), G4NeutronHPInelasticCompFS::CompositeApply(), G4HEInelastic::FillParticleChange(), G4HadronicProcess::FillResult(), G4CascadeInterface::NoInteraction(), G4HadronElasticProcess::PostStepDoIt(), G4WHadronElasticProcess::PostStepDoIt(), G4CascadeInterface::Propagate(), G4RPGInelastic::SetUpChange(), G4InelasticInteraction::SetUpChange(), G4LCapture::~G4LCapture(), G4LEnp::~G4LEnp(), G4LFission::~G4LFission(), and G4MuMinusCapturePrecompound::~G4MuMinusCapturePrecompound().

◆ ClearSecondaries()

void G4HadFinalState::ClearSecondaries ( )

Definition at line 85 of file G4HadFinalState.cc.

85 {
86 theSecs.clear();
87}

Referenced by G4HadLeadBias::Bias(), and Clear().

◆ GetEnergyChange()

◆ GetLocalEnergyDeposit()

◆ GetMomentumChange()

const G4ThreeVector & G4HadFinalState::GetMomentumChange ( ) const

◆ GetNumberOfSecondaries()

◆ GetSecondary() [1/2]

◆ GetSecondary() [2/2]

const G4HadSecondary * G4HadFinalState::GetSecondary ( size_t  i) const

Definition at line 119 of file G4HadFinalState.cc.

120{
121 if(i>theSecs.size())
122 {
123 throw G4HadronicException(__FILE__, __LINE__,
124 "Trying direct access to secondary beyond end of list");
125 }
126 return &theSecs[i];
127}

◆ GetStatusChange()

G4HadFinalStateStatus G4HadFinalState::GetStatusChange ( ) const

◆ GetTrafoToLab()

const G4LorentzRotation & G4HadFinalState::GetTrafoToLab ( ) const

Definition at line 101 of file G4HadFinalState.cc.

101{return theT;}

Referenced by G4HadronicProcess::FillResult().

◆ GetWeightChange()

G4double G4HadFinalState::GetWeightChange ( ) const

Definition at line 107 of file G4HadFinalState.cc.

107{return theW;}

◆ SecondariesAreStale()

void G4HadFinalState::SecondariesAreStale ( )

Definition at line 99 of file G4HadFinalState.cc.

99{ /*DEPRECATED*/ }

◆ SetEnergyChange()

void G4HadFinalState::SetEnergyChange ( G4double  anEnergy)

Definition at line 42 of file G4HadFinalState.cc.

43{
44 theEnergy=anEnergy;
45 if(theEnergy<0)
46 {
47 std::cout << "Final state energy was: E = "<<theEnergy<<G4endl;
48 throw G4HadronicException(__FILE__, __LINE__, "G4HadFinalState: fatal - negative energy");
49 }
50}
#define G4endl
Definition: G4ios.hh:52

Referenced by G4NeutronHPChannelList::ApplyYourself(), G4WilsonAbrasionModel::ApplyYourself(), G4ElectroNuclearReaction::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4ElectroVDNuclearModel::ApplyYourself(), G4NeutronHPThermalScattering::ApplyYourself(), G4ChiralInvariantPhaseSpace::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4LEnp::ApplyYourself(), G4LEpp::ApplyYourself(), G4MuonVDNuclearModel::ApplyYourself(), G4LEAlphaInelastic::ApplyYourself(), G4LEAntiOmegaMinusInelastic::ApplyYourself(), G4LEAntiProtonInelastic::ApplyYourself(), G4LEAntiSigmaMinusInelastic::ApplyYourself(), G4LEAntiSigmaPlusInelastic::ApplyYourself(), G4LEAntiXiMinusInelastic::ApplyYourself(), G4LEDeuteronInelastic::ApplyYourself(), G4LEKaonMinusInelastic::ApplyYourself(), G4LEKaonPlusInelastic::ApplyYourself(), G4LElastic::ApplyYourself(), G4LEOmegaMinusInelastic::ApplyYourself(), G4LEPionMinusInelastic::ApplyYourself(), G4LEPionPlusInelastic::ApplyYourself(), G4LEProtonInelastic::ApplyYourself(), G4LESigmaMinusInelastic::ApplyYourself(), G4LESigmaPlusInelastic::ApplyYourself(), G4LETritonInelastic::ApplyYourself(), G4LEXiMinusInelastic::ApplyYourself(), G4LEXiZeroInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4RPGPiMinusInelastic::ApplyYourself(), G4RPGPiPlusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4BinaryLightIonReaction::ApplyYourself(), G4ParaFissionModel::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4CascadeInterface::copyOutputToHadronicResult(), G4CascadeInterface::NoInteraction(), G4RPGInelastic::SetUpChange(), and G4InelasticInteraction::SetUpChange().

◆ SetLocalEnergyDeposit()

◆ SetMomentumChange() [1/2]

void G4HadFinalState::SetMomentumChange ( const G4ThreeVector aV)

Definition at line 54 of file G4HadFinalState.cc.

54 {
55 theDirection=aV;
56}

Referenced by G4NeutronHPChannelList::ApplyYourself(), G4WilsonAbrasionModel::ApplyYourself(), G4ElectroNuclearReaction::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4ElectroVDNuclearModel::ApplyYourself(), G4NeutronHPThermalScattering::ApplyYourself(), G4ChiralInvariantPhaseSpace::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4LEnp::ApplyYourself(), G4LEpp::ApplyYourself(), G4MuonVDNuclearModel::ApplyYourself(), G4LEAlphaInelastic::ApplyYourself(), G4LEAntiOmegaMinusInelastic::ApplyYourself(), G4LEAntiProtonInelastic::ApplyYourself(), G4LEAntiSigmaMinusInelastic::ApplyYourself(), G4LEAntiSigmaPlusInelastic::ApplyYourself(), G4LEAntiXiMinusInelastic::ApplyYourself(), G4LEDeuteronInelastic::ApplyYourself(), G4LEKaonMinusInelastic::ApplyYourself(), G4LEKaonPlusInelastic::ApplyYourself(), G4LElastic::ApplyYourself(), G4LEOmegaMinusInelastic::ApplyYourself(), G4LEPionMinusInelastic::ApplyYourself(), G4LEPionPlusInelastic::ApplyYourself(), G4LEProtonInelastic::ApplyYourself(), G4LESigmaMinusInelastic::ApplyYourself(), G4LESigmaPlusInelastic::ApplyYourself(), G4LETritonInelastic::ApplyYourself(), G4LEXiMinusInelastic::ApplyYourself(), G4LEXiZeroInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4RPGPiMinusInelastic::ApplyYourself(), G4RPGPiPlusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4BinaryLightIonReaction::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4RPGInelastic::SetUpChange(), and G4InelasticInteraction::SetUpChange().

◆ SetMomentumChange() [2/2]

void G4HadFinalState::SetMomentumChange ( G4double  x,
G4double  y,
G4double  z 
)

Definition at line 58 of file G4HadFinalState.cc.

59{
60 theDirection.set(x,y,z);
61 if(std::fabs(theDirection.mag()-1)>0.001)
62 {
63 G4cout <<"We have negative theDirection.mag() = "<<theDirection.mag()<<G4endl;
64 throw G4HadronicException(__FILE__, __LINE__, "G4HadFinalState: fatal - negative direction.mag().");
65 }
66}
G4DLLIMPORT std::ostream G4cout
double mag() const

◆ SetStatusChange()

void G4HadFinalState::SetStatusChange ( G4HadFinalStateStatus  aS)

Definition at line 81 of file G4HadFinalState.cc.

81{theStat=aS;}

Referenced by G4WilsonAbrasionModel::ApplyYourself(), G4EMDissociation::ApplyYourself(), G4ElectroNuclearReaction::ApplyYourself(), G4LENDCapture::ApplyYourself(), G4LENDFission::ApplyYourself(), G4LENDInelastic::ApplyYourself(), G4ElectroVDNuclearModel::ApplyYourself(), G4NeutronHPElastic::ApplyYourself(), G4NeutronHPorLElastic::ApplyYourself(), G4ChiralInvariantPhaseSpace::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4NeutronRadCapture::ApplyYourself(), G4HEAntiKaonZeroInelastic::ApplyYourself(), G4HEAntiLambdaInelastic::ApplyYourself(), G4HEAntiNeutronInelastic::ApplyYourself(), G4HEAntiOmegaMinusInelastic::ApplyYourself(), G4HEAntiProtonInelastic::ApplyYourself(), G4HEAntiSigmaMinusInelastic::ApplyYourself(), G4HEAntiSigmaPlusInelastic::ApplyYourself(), G4HEAntiXiMinusInelastic::ApplyYourself(), G4HEAntiXiZeroInelastic::ApplyYourself(), G4HEKaonMinusInelastic::ApplyYourself(), G4HEKaonPlusInelastic::ApplyYourself(), G4HEKaonZeroInelastic::ApplyYourself(), G4HEKaonZeroLongInelastic::ApplyYourself(), G4HEKaonZeroShortInelastic::ApplyYourself(), G4HELambdaInelastic::ApplyYourself(), G4HENeutronInelastic::ApplyYourself(), G4HEOmegaMinusInelastic::ApplyYourself(), G4HEPionMinusInelastic::ApplyYourself(), G4HEPionPlusInelastic::ApplyYourself(), G4HEProtonInelastic::ApplyYourself(), G4HESigmaMinusInelastic::ApplyYourself(), G4HESigmaPlusInelastic::ApplyYourself(), G4HEXiMinusInelastic::ApplyYourself(), G4HEXiZeroInelastic::ApplyYourself(), G4MuonVDNuclearModel::ApplyYourself(), G4LCapture::ApplyYourself(), G4LEAlphaInelastic::ApplyYourself(), G4LEAntiOmegaMinusInelastic::ApplyYourself(), G4LEAntiProtonInelastic::ApplyYourself(), G4LEAntiSigmaMinusInelastic::ApplyYourself(), G4LEAntiSigmaPlusInelastic::ApplyYourself(), G4LEAntiXiMinusInelastic::ApplyYourself(), G4LEDeuteronInelastic::ApplyYourself(), G4LEKaonMinusInelastic::ApplyYourself(), G4LEKaonPlusInelastic::ApplyYourself(), G4LElastic::ApplyYourself(), G4LEOmegaMinusInelastic::ApplyYourself(), G4LEPionMinusInelastic::ApplyYourself(), G4LEPionPlusInelastic::ApplyYourself(), G4LEProtonInelastic::ApplyYourself(), G4LESigmaMinusInelastic::ApplyYourself(), G4LESigmaPlusInelastic::ApplyYourself(), G4LETritonInelastic::ApplyYourself(), G4LEXiMinusInelastic::ApplyYourself(), G4LEXiZeroInelastic::ApplyYourself(), G4LFission::ApplyYourself(), G4QMDReaction::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4RPGPiMinusInelastic::ApplyYourself(), G4RPGPiPlusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4EmCaptureCascade::ApplyYourself(), G4MuMinusCapturePrecompound::ApplyYourself(), G4MuonMinusBoundDecay::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4BinaryLightIonReaction::ApplyYourself(), G4ParaFissionModel::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4PreCompoundModel::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4NeutronHPFissionFS::ApplyYourself(), G4NeutronHPInelasticBaseFS::BaseApply(), G4NeutronHPInelasticCompFS::CompositeApply(), G4CascadeInterface::copyOutputToHadronicResult(), G4CascadeInterface::NoInteraction(), G4RPGInelastic::SetUpChange(), and G4InelasticInteraction::SetUpChange().

◆ SetTrafoToLab()

void G4HadFinalState::SetTrafoToLab ( const G4LorentzRotation aT)

Definition at line 103 of file G4HadFinalState.cc.

103{theT = aT;}

Referenced by G4HadronicProcess::PostStepDoIt().

◆ SetWeightChange()

void G4HadFinalState::SetWeightChange ( G4double  aW)

Definition at line 105 of file G4HadFinalState.cc.

105{ theW=aW;}

The documentation for this class was generated from the following files: