Geant4  10.02.p03
G4HadFinalState Class Reference

#include <G4HadFinalState.hh>

Collaboration diagram for G4HadFinalState:

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, 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)
 

Private Attributes

G4ThreeVector theDirection
 
G4double theEnergy
 
std::vector< G4HadSecondarytheSecs
 
G4HadFinalStateStatus theStat
 
G4LorentzRotation theT
 
G4double theW
 
G4double theEDep
 

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.) {}
G4ThreeVector theDirection
G4HadFinalStateStatus theStat

Member Function Documentation

◆ AddSecondaries() [1/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 }
std::vector< G4HadSecondary > theSecs
Here is the caller graph for this function:

◆ AddSecondaries() [2/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)
std::vector< G4HadSecondary > theSecs
Here is the call graph for this function:

◆ AddSecondaries() [3/3]

void G4HadFinalState::AddSecondaries ( const G4HadFinalState addHFS)
inline

Definition at line 96 of file G4HadFinalState.hh.

96  {
97  if (addHFS) AddSecondaries(addHFS->theSecs);
98  }
void AddSecondaries(const std::vector< G4HadSecondary > &addSecs)
std::vector< G4HadSecondary > theSecs
Here is the call graph for this function:

◆ AddSecondary() [1/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  };
std::vector< G4HadSecondary > theSecs
Here is the caller graph for this function:

◆ AddSecondary() [2/2]

void G4HadFinalState::AddSecondary ( const G4HadSecondary aHS)
inline

Definition at line 65 of file G4HadFinalState.hh.

65 { theSecs.push_back(aHS); }
std::vector< G4HadSecondary > theSecs

◆ 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)
G4ThreeVector theDirection
G4HadFinalStateStatus theStat
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearSecondaries()

void G4HadFinalState::ClearSecondaries ( )
inline

Definition at line 87 of file G4HadFinalState.hh.

87 { theSecs.clear(); }
std::vector< G4HadSecondary > theSecs
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEnergyChange()

G4double G4HadFinalState::GetEnergyChange ( ) const
inline

Definition at line 54 of file G4HadFinalState.hh.

54 { return theEnergy; }
Here is the caller graph for this function:

◆ GetLocalEnergyDeposit()

G4double G4HadFinalState::GetLocalEnergyDeposit ( ) const
inline

Definition at line 84 of file G4HadFinalState.hh.

84 { return theEDep;}
Here is the caller graph for this function:

◆ GetMomentumChange()

const G4ThreeVector& G4HadFinalState::GetMomentumChange ( ) const
inline

Definition at line 59 of file G4HadFinalState.hh.

59 { return theDirection; }
G4ThreeVector theDirection
Here is the caller graph for this function:

◆ GetNumberOfSecondaries()

G4int G4HadFinalState::GetNumberOfSecondaries ( ) const
inline

Definition at line 51 of file G4HadFinalState.hh.

51 { return theSecs.size(); }
std::vector< G4HadSecondary > theSecs
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSecondary() [1/2]

G4HadSecondary * G4HadFinalState::GetSecondary ( size_t  i)

Definition at line 79 of file G4HadFinalState.cc.

80 {
81  if(i>theSecs.size()) {
82  throw G4HadronicException(__FILE__, __LINE__,
83  "Trying direct access to secondary beyond end of list");
84  }
85  return &theSecs[i];
86 }
std::vector< G4HadSecondary > theSecs
Here is the caller graph for this function:

◆ 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 }
std::vector< G4HadSecondary > theSecs

◆ GetStatusChange()

G4HadFinalStateStatus G4HadFinalState::GetStatusChange ( ) const
inline

Definition at line 69 of file G4HadFinalState.hh.

69 { return theStat; }
G4HadFinalStateStatus theStat
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTrafoToLab()

const G4LorentzRotation& G4HadFinalState::GetTrafoToLab ( ) const
inline

Definition at line 72 of file G4HadFinalState.hh.

72 { return theT; }
G4LorentzRotation theT
Here is the caller graph for this function:

◆ GetWeightChange()

G4double G4HadFinalState::GetWeightChange ( ) const
inline

Definition at line 78 of file G4HadFinalState.hh.

78 { return theW; }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetEnergyChange()

void G4HadFinalState::SetEnergyChange ( G4double  anEnergy)

Definition at line 39 of file G4HadFinalState.cc.

40 {
41  theEnergy=anEnergy;
42  if(theEnergy<0)
43  {
44  std::cout << "Final state energy was: E = "<<theEnergy<<G4endl;
45  throw G4HadronicException(__FILE__, __LINE__,
46  "G4HadFinalState: fatal - negative energy");
47  }
48 }
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ SetLocalEnergyDeposit()

void G4HadFinalState::SetLocalEnergyDeposit ( G4double  aE)
inline

Definition at line 82 of file G4HadFinalState.hh.

82 { theEDep=aE; }
Here is the caller graph for this function:

◆ SetMomentumChange() [1/2]

void G4HadFinalState::SetMomentumChange ( const G4ThreeVector aV)
inline

Definition at line 56 of file G4HadFinalState.hh.

56 { theDirection=aV; }
G4ThreeVector theDirection
Here is the caller graph for this function:

◆ 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::fabs(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 }
void set(double x, double y, double z)
Double_t y
G4GLOB_DLL std::ostream G4cout
double mag() const
#define G4endl
Definition: G4ios.hh:61
G4ThreeVector theDirection
Here is the call graph for this function:

◆ SetStatusChange()

void G4HadFinalState::SetStatusChange ( G4HadFinalStateStatus  aS)
inline

Definition at line 67 of file G4HadFinalState.hh.

67 { theStat=aS; }
G4HadFinalStateStatus theStat
Here is the caller graph for this function:

◆ SetTrafoToLab()

void G4HadFinalState::SetTrafoToLab ( const G4LorentzRotation aT)
inline

Definition at line 74 of file G4HadFinalState.hh.

74 { theT = aT; }
G4LorentzRotation theT
Here is the caller graph for this function:

◆ SetWeightChange()

void G4HadFinalState::SetWeightChange ( G4double  aW)
inline

Definition at line 76 of file G4HadFinalState.hh.

76 { theW=aW; }

Member Data Documentation

◆ theDirection

G4ThreeVector G4HadFinalState::theDirection
private

Definition at line 101 of file G4HadFinalState.hh.

◆ theEDep

G4double G4HadFinalState::theEDep
private

Definition at line 107 of file G4HadFinalState.hh.

◆ theEnergy

G4double G4HadFinalState::theEnergy
private

Definition at line 102 of file G4HadFinalState.hh.

◆ theSecs

std::vector<G4HadSecondary> G4HadFinalState::theSecs
private

Definition at line 103 of file G4HadFinalState.hh.

◆ theStat

G4HadFinalStateStatus G4HadFinalState::theStat
private

Definition at line 104 of file G4HadFinalState.hh.

◆ theT

G4LorentzRotation G4HadFinalState::theT
private

Definition at line 105 of file G4HadFinalState.hh.

◆ theW

G4double G4HadFinalState::theW
private

Definition at line 106 of file G4HadFinalState.hh.


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