Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
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 ( )

Definition at line 35 of file G4HadFinalState.cc.

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

Member Function Documentation

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

Definition at line 76 of file G4HadFinalState.cc.

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

77 {
78  theSecs.insert(theSecs.end(),addSecs.begin(),addSecs.end());
79 }
void G4HadFinalState::AddSecondaries ( const G4HadFinalState addHFS)
inline

Definition at line 75 of file G4HadFinalState.hh.

References AddSecondaries().

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

Definition at line 79 of file G4HadFinalState.hh.

References AddSecondaries().

79  {
80  if (addHFS) AddSecondaries(addHFS->theSecs);
81  }
void AddSecondaries(const std::vector< G4HadSecondary > &addSecs)
void G4HadFinalState::AddSecondary ( G4DynamicParticle aP)
void G4HadFinalState::AddSecondary ( const G4HadSecondary aHS)
inline

Definition at line 57 of file G4HadFinalState.hh.

57 { theSecs.push_back(aHS); }
void G4HadFinalState::Clear ( )

Definition at line 89 of file G4HadFinalState.cc.

References ClearSecondaries(), isAlive, and CLHEP::Hep3Vector::set().

Referenced by G4BinaryLightIonReaction::ApplyYourself(), G4NeutronHPFissionFS::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4ParaFissionModel::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4NeutronHPChannelList::ApplyYourself(), G4NeutronRadCapture::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LENDCapture::ApplyYourself(), G4LENDInelastic::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4MuonVDNuclearModel::ApplyYourself(), G4LEpp::ApplyYourself(), G4ElectroVDNuclearModel::ApplyYourself(), G4LENDFission::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4LEnp::ApplyYourself(), G4QMDReaction::ApplyYourself(), CexmcChargeExchangeProductionModel< OutputParticle >::ApplyYourself(), G4PreCompoundModel::ApplyYourself(), G4LFission::ApplyYourself(), G4MuMinusCapturePrecompound::ApplyYourself(), G4EmCaptureCascade::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4MuonMinusBoundDecay::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4EMDissociation::ApplyYourself(), G4WilsonAbrasionModel::ApplyYourself(), G4CascadeInterface::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4HadronStoppingProcess::AtRestDoIt(), G4NeutronHPInelasticBaseFS::BaseApply(), G4NeutronHPInelasticCompFS::CompositeApply(), G4HadronicProcess::FillResult(), G4CascadeInterface::NoInteraction(), G4HadronElasticProcess::PostStepDoIt(), G4CascadeInterface::Propagate(), G4RPGInelastic::SetUpChange(), G4LEnp::~G4LEnp(), G4LFission::~G4LFission(), and G4MuMinusCapturePrecompound::~G4MuMinusCapturePrecompound().

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)
void G4HadFinalState::ClearSecondaries ( )

Definition at line 85 of file G4HadFinalState.cc.

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

85  {
86  theSecs.clear();
87 }
G4double G4HadFinalState::GetEnergyChange ( ) const
G4double G4HadFinalState::GetLocalEnergyDeposit ( ) const
const G4ThreeVector & G4HadFinalState::GetMomentumChange ( ) const

Definition at line 68 of file G4HadFinalState.cc.

Referenced by G4HadronicProcess::FillResult(), and G4HadronElasticProcess::PostStepDoIt().

68 {return theDirection;}
G4int G4HadFinalState::GetNumberOfSecondaries ( ) const
G4HadSecondary * G4HadFinalState::GetSecondary ( size_t  i)
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 }
G4HadFinalStateStatus G4HadFinalState::GetStatusChange ( ) const
const G4LorentzRotation & G4HadFinalState::GetTrafoToLab ( ) const

Definition at line 101 of file G4HadFinalState.cc.

Referenced by G4HadronicProcess::FillResult().

101 {return theT;}
G4double G4HadFinalState::GetWeightChange ( ) const

Definition at line 107 of file G4HadFinalState.cc.

107 {return theW;}
void G4HadFinalState::SecondariesAreStale ( )

Definition at line 99 of file G4HadFinalState.cc.

99 { /*DEPRECATED*/ }
void G4HadFinalState::SetEnergyChange ( G4double  anEnergy)

Definition at line 42 of file G4HadFinalState.cc.

References G4endl.

Referenced by G4BinaryLightIonReaction::ApplyYourself(), G4RPGPiMinusInelastic::ApplyYourself(), G4RPGPiPlusInelastic::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4ParaFissionModel::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4NeutronHPChannelList::ApplyYourself(), G4LENDModel::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4MuonVDNuclearModel::ApplyYourself(), G4LEpp::ApplyYourself(), G4ElectroVDNuclearModel::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4LEnp::ApplyYourself(), G4NeutronHPThermalScattering::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4WilsonAbrasionModel::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4CascadeInterface::copyOutputToHadronicResult(), G4CascadeInterface::NoInteraction(), and G4RPGInelastic::SetUpChange().

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:61
void G4HadFinalState::SetLocalEnergyDeposit ( G4double  aE)
void G4HadFinalState::SetMomentumChange ( const G4ThreeVector aV)
void G4HadFinalState::SetMomentumChange ( G4double  x,
G4double  y,
G4double  z 
)

Definition at line 58 of file G4HadFinalState.cc.

References G4cout, G4endl, CLHEP::Hep3Vector::mag(), and CLHEP::Hep3Vector::set().

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 }
void set(double x, double y, double z)
G4double z
Definition: TRTMaterials.hh:39
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
double mag() const
void G4HadFinalState::SetStatusChange ( G4HadFinalStateStatus  aS)

Definition at line 81 of file G4HadFinalState.cc.

Referenced by G4BinaryLightIonReaction::ApplyYourself(), G4RPGPiMinusInelastic::ApplyYourself(), G4RPGPiPlusInelastic::ApplyYourself(), G4NeutronHPFissionFS::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4NeutronHPElastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4ParaFissionModel::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4NeutronRadCapture::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4LENDCapture::ApplyYourself(), G4MuonVDNuclearModel::ApplyYourself(), G4LENDInelastic::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4LENDFission::ApplyYourself(), G4ElectroVDNuclearModel::ApplyYourself(), G4TheoFSGenerator::ApplyYourself(), G4QMDReaction::ApplyYourself(), G4LFission::ApplyYourself(), G4PreCompoundModel::ApplyYourself(), G4MuMinusCapturePrecompound::ApplyYourself(), G4EmCaptureCascade::ApplyYourself(), G4BinaryCascade::ApplyYourself(), G4MuonMinusBoundDecay::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4WilsonAbrasionModel::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4NeutronHPInelasticBaseFS::BaseApply(), G4NeutronHPInelasticCompFS::CompositeApply(), G4CascadeInterface::copyOutputToHadronicResult(), G4CascadeInterface::NoInteraction(), and G4RPGInelastic::SetUpChange().

81 {theStat=aS;}
void G4HadFinalState::SetTrafoToLab ( const G4LorentzRotation aT)

Definition at line 103 of file G4HadFinalState.cc.

Referenced by G4HadronicProcess::PostStepDoIt().

103 {theT = aT;}
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: