Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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, 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 ( )

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 62 of file G4HadFinalState.cc.

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

Here is the caller graph for this function:

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)

Here is the call graph for this function:

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)

Here is the call graph for this function:

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  };

Here is the caller graph for this function:

void G4HadFinalState::AddSecondary ( const G4HadSecondary aHS)
inline

Definition at line 65 of file G4HadFinalState.hh.

65 { theSecs.push_back(aHS); }
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)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4HadFinalState::ClearSecondaries ( )
inline

Definition at line 87 of file G4HadFinalState.hh.

87 { theSecs.clear(); }

Here is the caller graph for this function:

G4double G4HadFinalState::GetEnergyChange ( ) const
inline

Definition at line 54 of file G4HadFinalState.hh.

54 { return theEnergy; }

Here is the caller graph for this function:

G4double G4HadFinalState::GetLocalEnergyDeposit ( ) const
inline

Definition at line 84 of file G4HadFinalState.hh.

84 { return theEDep;}

Here is the caller graph for this function:

const G4ThreeVector& G4HadFinalState::GetMomentumChange ( ) const
inline

Definition at line 59 of file G4HadFinalState.hh.

59 { return theDirection; }

Here is the caller graph for this function:

G4int G4HadFinalState::GetNumberOfSecondaries ( ) const
inline

Definition at line 51 of file G4HadFinalState.hh.

51 { return theSecs.size(); }

Here is the caller graph for this function:

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 }

Here is the caller graph for this function:

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 }
G4HadFinalStateStatus G4HadFinalState::GetStatusChange ( ) const
inline

Definition at line 69 of file G4HadFinalState.hh.

69 { return theStat; }

Here is the caller graph for this function:

const G4LorentzRotation& G4HadFinalState::GetTrafoToLab ( ) const
inline

Definition at line 72 of file G4HadFinalState.hh.

72 { return theT; }

Here is the caller graph for this function:

G4double G4HadFinalState::GetWeightChange ( ) const
inline

Definition at line 78 of file G4HadFinalState.hh.

78 { return theW; }
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:

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:

void G4HadFinalState::SetMomentumChange ( const G4ThreeVector aV)
inline

Definition at line 56 of file G4HadFinalState.hh.

56 { theDirection=aV; }

Here is the caller graph for this function:

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)
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
double mag() const

Here is the call graph for this function:

void G4HadFinalState::SetStatusChange ( G4HadFinalStateStatus  aS)
inline

Definition at line 67 of file G4HadFinalState.hh.

67 { theStat=aS; }

Here is the caller graph for this function:

void G4HadFinalState::SetTrafoToLab ( const G4LorentzRotation aT)
inline

Definition at line 74 of file G4HadFinalState.hh.

74 { theT = aT; }

Here is the caller graph for this function:

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: