Geant4 11.2.2
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 ()
 
std::size_t 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, G4int mod=-1)
 
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 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 92 of file G4HadFinalState.hh.

92 {
93 AddSecondaries(addHFS.theSecs);
94 }
void AddSecondaries(const std::vector< G4HadSecondary > &addSecs)

◆ AddSecondaries() [2/3]

void G4HadFinalState::AddSecondaries ( const G4HadFinalState * addHFS)
inline

Definition at line 96 of file G4HadFinalState.hh.

96 {
97 if (addHFS) AddSecondaries(addHFS->theSecs);
98 }

◆ AddSecondaries() [3/3]

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

Definition at line 62 of file G4HadFinalState.cc.

63{
64 theSecs.insert(theSecs.end(),addSecs.begin(),addSecs.end());
65}

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

◆ AddSecondary() [1/2]

void G4HadFinalState::AddSecondary ( const G4HadSecondary & aHS)
inline

Definition at line 65 of file G4HadFinalState.hh.

65{ theSecs.push_back(aHS); }

◆ AddSecondary() [2/2]

void G4HadFinalState::AddSecondary ( G4DynamicParticle * aP,
G4int mod = -1 )
inline

Definition at line 61 of file G4HadFinalState.hh.

61 {
62 theSecs.push_back(G4HadSecondary(aP, theW, mod));
63 };

Referenced by G4ParticleHPFinalState::adjust_final_state(), G4AblaInterface::ApplyYourself(), G4ANuElNucleusCcModel::ApplyYourself(), G4ANuElNucleusNcModel::ApplyYourself(), G4ANuMuNucleusCcModel::ApplyYourself(), G4ANuMuNucleusNcModel::ApplyYourself(), G4ANuTauNucleusCcModel::ApplyYourself(), G4ANuTauNucleusNcModel::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4BinaryLightIonReaction::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4EMDissociation::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4LEHadronProtonElastic::ApplyYourself(), G4LENDCapture::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LENDFission::ApplyYourself(), G4LENDInelastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4LEnp::ApplyYourself(), G4LEpp::ApplyYourself(), G4LFission::ApplyYourself(), G4LightIonQMDReaction::ApplyYourself(), G4LMsdGenerator::ApplyYourself(), G4LowEGammaNuclearModel::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4NeutrinoElectronCcModel::ApplyYourself(), G4NeutrinoElectronNcModel::ApplyYourself(), G4NeutronElectronElModel::ApplyYourself(), G4NeutronFissionVI::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4NeutronRadCapture::ApplyYourself(), G4NeutronRadCaptureHP::ApplyYourself(), G4NuElNucleusCcModel::ApplyYourself(), G4NuElNucleusNcModel::ApplyYourself(), G4NuMuNucleusCcModel::ApplyYourself(), G4NuMuNucleusNcModel::ApplyYourself(), G4NuTauNucleusCcModel::ApplyYourself(), G4NuTauNucleusNcModel::ApplyYourself(), G4ParticleHPChannelList::ApplyYourself(), G4ParticleHPElasticFS::ApplyYourself(), G4ParticleHPFissionFS::ApplyYourself(), G4PreCompoundModel::ApplyYourself(), G4QMDReaction::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4WilsonAbrasionModel::ApplyYourself(), G4MuonMinusAtomicCapture::AtRestDoIt(), G4ParticleHPInelasticBaseFS::BaseApply(), G4NeutrinoNucleusModel::CoherentPion(), G4ParticleHPInelasticCompFS::CompositeApply(), G4CascadeInterface::copyOutputToHadronicResult(), G4NeutrinoNucleusModel::FinalBarion(), G4NeutrinoNucleusModel::FinalMeson(), and G4NeutrinoNucleusModel::RecoilDeexcitation().

◆ Clear()

void G4HadFinalState::Clear ( )

Definition at line 67 of file G4HadFinalState.cc.

68{
69 theDirection.set(0,0,1);
70 theEnergy = -1;
71 theStat = isAlive;
72 theW = 1.;
73 theEDep = 0.;
75}
void set(double x, double y, double z)

Referenced by G4AblaInterface::ApplyYourself(), G4ANuElNucleusCcModel::ApplyYourself(), G4ANuElNucleusNcModel::ApplyYourself(), G4ANuMuNucleusCcModel::ApplyYourself(), G4ANuMuNucleusNcModel::ApplyYourself(), G4ANuTauNucleusCcModel::ApplyYourself(), G4ANuTauNucleusNcModel::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4BinaryLightIonReaction::ApplyYourself(), G4CascadeInterface::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4ElectroVDNuclearModel::ApplyYourself(), G4EmCaptureCascade::ApplyYourself(), G4EMDissociation::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4LEHadronProtonElastic::ApplyYourself(), G4LENDCapture::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LENDFission::ApplyYourself(), G4LENDInelastic::ApplyYourself(), G4LEnp::ApplyYourself(), G4LEpp::ApplyYourself(), G4LFission::ApplyYourself(), G4LightIonQMDReaction::ApplyYourself(), G4LMsdGenerator::ApplyYourself(), G4LowEGammaNuclearModel::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4MuMinusCapturePrecompound::ApplyYourself(), G4MuonMinusBoundDecay::ApplyYourself(), G4MuonVDNuclearModel::ApplyYourself(), G4NeutrinoElectronCcModel::ApplyYourself(), G4NeutrinoElectronNcModel::ApplyYourself(), G4NeutronElectronElModel::ApplyYourself(), G4NeutronFissionVI::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4NeutronRadCapture::ApplyYourself(), G4NeutronRadCaptureHP::ApplyYourself(), G4NuElNucleusCcModel::ApplyYourself(), G4NuElNucleusNcModel::ApplyYourself(), G4NuMuNucleusCcModel::ApplyYourself(), G4NuMuNucleusNcModel::ApplyYourself(), G4NuTauNucleusCcModel::ApplyYourself(), G4NuTauNucleusNcModel::ApplyYourself(), G4ParticleHPChannelList::ApplyYourself(), G4ParticleHPElasticFS::ApplyYourself(), G4ParticleHPFissionFS::ApplyYourself(), G4PreCompoundModel::ApplyYourself(), G4QMDReaction::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4WilsonAbrasionModel::ApplyYourself(), G4HadronStoppingProcess::AtRestDoIt(), G4MuonMinusAtomicCapture::AtRestDoIt(), G4ParticleHPInelasticBaseFS::BaseApply(), G4HadronicProcess::CheckResult(), G4ParticleHPInelasticCompFS::CompositeApply(), G4HadronicProcess::FillResult(), G4CascadeInterface::NoInteraction(), G4ElNeutrinoNucleusProcess::PostStepDoIt(), G4HadronElasticProcess::PostStepDoIt(), G4MuNeutrinoNucleusProcess::PostStepDoIt(), G4NeutrinoElectronProcess::PostStepDoIt(), G4TauNeutrinoNucleusProcess::PostStepDoIt(), G4CascadeInterface::Propagate(), G4AblaInterface::~G4AblaInterface(), G4LEHadronProtonElastic::~G4LEHadronProtonElastic(), G4LEnp::~G4LEnp(), G4LFission::~G4LFission(), G4LowEIonFragmentation::~G4LowEIonFragmentation(), G4MuMinusCapturePrecompound::~G4MuMinusCapturePrecompound(), and G4PreCompoundModel::~G4PreCompoundModel().

◆ ClearSecondaries()

void G4HadFinalState::ClearSecondaries ( )
inline

Definition at line 87 of file G4HadFinalState.hh.

87{ theSecs.clear(); }

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

◆ GetEnergyChange()

◆ GetLocalEnergyDeposit()

◆ GetMomentumChange()

◆ GetNumberOfSecondaries()

◆ GetSecondary() [1/2]

◆ GetSecondary() [2/2]

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

Definition at line 88 of file G4HadFinalState.cc.

89{
90 if(i>theSecs.size()) {
91 throw G4HadronicException(__FILE__, __LINE__,
92 "Trying direct access to secondary beyond end of list");
93 }
94 return &theSecs[i];
95}

◆ GetStatusChange()

G4HadFinalStateStatus G4HadFinalState::GetStatusChange ( ) const
inline

◆ GetTrafoToLab()

const G4LorentzRotation & G4HadFinalState::GetTrafoToLab ( ) const
inline

Definition at line 72 of file G4HadFinalState.hh.

72{ return theT; }

◆ GetWeightChange()

G4double G4HadFinalState::GetWeightChange ( ) const
inline

Definition at line 78 of file G4HadFinalState.hh.

78{ return theW; }

◆ SetEnergyChange()

void G4HadFinalState::SetEnergyChange ( G4double anEnergy)

Definition at line 39 of file G4HadFinalState.cc.

40{
41 theEnergy=anEnergy;
42 if(theEnergy<0)
43 {
44 G4cout << "Final state energy was: E = "<<theEnergy<<G4endl;
45 throw G4HadronicException(__FILE__, __LINE__,
46 "G4HadFinalState: fatal - negative energy");
47 }
48}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout

Referenced by G4ANuElNucleusCcModel::ApplyYourself(), G4ANuElNucleusNcModel::ApplyYourself(), G4ANuMuNucleusCcModel::ApplyYourself(), G4ANuMuNucleusNcModel::ApplyYourself(), G4ANuTauNucleusCcModel::ApplyYourself(), G4ANuTauNucleusNcModel::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4BinaryLightIonReaction::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4ElectroVDNuclearModel::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4LEHadronProtonElastic::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LENDInelastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4LEnp::ApplyYourself(), G4LEpp::ApplyYourself(), G4LMsdGenerator::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4MuonVDNuclearModel::ApplyYourself(), G4NeutrinoElectronCcModel::ApplyYourself(), G4NeutrinoElectronNcModel::ApplyYourself(), G4NeutronElectronElModel::ApplyYourself(), G4NuElNucleusCcModel::ApplyYourself(), G4NuElNucleusNcModel::ApplyYourself(), G4NuMuNucleusCcModel::ApplyYourself(), G4NuMuNucleusNcModel::ApplyYourself(), G4NuTauNucleusCcModel::ApplyYourself(), G4NuTauNucleusNcModel::ApplyYourself(), G4ParticleHPChannelList::ApplyYourself(), G4ParticleHPElasticFS::ApplyYourself(), G4ParticleHPThermalScattering::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4WilsonAbrasionModel::ApplyYourself(), G4CascadeInterface::copyOutputToHadronicResult(), G4CascadeInterface::NoInteraction(), and G4LENDModel::returnUnchanged().

◆ SetLocalEnergyDeposit()

◆ SetMomentumChange() [1/2]

◆ SetMomentumChange() [2/2]

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

Definition at line 50 of file G4HadFinalState.cc.

51{
52 theDirection.set(x,y,z);
53 if(std::abs(x*x + y*y + z*z - 1.0)>0.001) {
54 G4cout <<"We have negative theDirection.mag() = "<<theDirection.mag()
55 <<G4endl;
56 throw G4HadronicException(__FILE__, __LINE__,
57 "G4HadFinalState: fatal - negative direction.mag().");
58 }
59}
double mag() const

◆ SetStatusChange()

void G4HadFinalState::SetStatusChange ( G4HadFinalStateStatus aS)
inline

◆ SetTrafoToLab()

◆ SetWeightChange()

void G4HadFinalState::SetWeightChange ( G4double aW)
inline

Definition at line 76 of file G4HadFinalState.hh.

76{ theW=aW; }

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