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

#include <G4StatMFChannel.hh>

Public Member Functions

 G4StatMFChannel ()
 
 ~G4StatMFChannel ()
 
void CreateFragment (G4int A, G4int Z)
 
size_t GetMultiplicity (void)
 
G4bool CheckFragments (void)
 
G4double GetFragmentsCoulombEnergy (void)
 
G4double GetFragmentsEnergy (G4double T) const
 
G4FragmentVectorGetFragments (G4int anA, G4int anZ, G4double T)
 

Detailed Description

Definition at line 40 of file G4StatMFChannel.hh.

Constructor & Destructor Documentation

◆ G4StatMFChannel()

G4StatMFChannel::G4StatMFChannel ( )

Definition at line 46 of file G4StatMFChannel.cc.

46 :
47 _NumOfNeutralFragments(0),
48 _NumOfChargedFragments(0)
49{}

◆ ~G4StatMFChannel()

G4StatMFChannel::~G4StatMFChannel ( )

Definition at line 51 of file G4StatMFChannel.cc.

52{
53 if (!_theFragments.empty()) {
54 std::for_each(_theFragments.begin(),_theFragments.end(),
55 DeleteFragment());
56 }
57}

Member Function Documentation

◆ CheckFragments()

G4bool G4StatMFChannel::CheckFragments ( void  )

Definition at line 59 of file G4StatMFChannel.cc.

60{
61 std::deque<G4StatMFFragment*>::iterator i;
62 for (i = _theFragments.begin();
63 i != _theFragments.end(); ++i)
64 {
65 G4int A = (*i)->GetA();
66 G4int Z = (*i)->GetZ();
67 if ( (A > 1 && (Z > A || Z <= 0)) || (A==1 && Z > A) || A <= 0 ) return false;
68 }
69 return true;
70}
int G4int
Definition: G4Types.hh:85
const G4int Z[17]
const G4double A[17]

Referenced by G4StatMF::BreakItUp().

◆ CreateFragment()

void G4StatMFChannel::CreateFragment ( G4int  A,
G4int  Z 
)

Definition at line 72 of file G4StatMFChannel.cc.

76{
77 if (Z <= 0.5) {
78 _theFragments.push_back(new G4StatMFFragment(A,Z));
79 _NumOfNeutralFragments++;
80 } else {
81 _theFragments.push_front(new G4StatMFFragment(A,Z));
82 _NumOfChargedFragments++;
83 }
84
85 return;
86}

Referenced by G4StatMFMicroCanonical::ChooseAandZ(), and G4StatMFMicroPartition::ChooseZ().

◆ GetFragments()

G4FragmentVector * G4StatMFChannel::GetFragments ( G4int  anA,
G4int  anZ,
G4double  T 
)

Definition at line 118 of file G4StatMFChannel.cc.

121{
122 // calculate momenta of charged fragments
123 CoulombImpulse(anA,anZ,T);
124
125 // calculate momenta of neutral fragments
126 FragmentsMomenta(_NumOfNeutralFragments, _NumOfChargedFragments, T);
127
128 G4FragmentVector * theResult = new G4FragmentVector;
129 std::deque<G4StatMFFragment*>::iterator i;
130 for (i = _theFragments.begin(); i != _theFragments.end(); ++i)
131 theResult->push_back((*i)->GetFragment(T));
132
133 return theResult;
134}
std::vector< G4Fragment * > G4FragmentVector
Definition: G4Fragment.hh:65

◆ GetFragmentsCoulombEnergy()

G4double G4StatMFChannel::GetFragmentsCoulombEnergy ( void  )

Definition at line 88 of file G4StatMFChannel.cc.

89{
90 G4double Coulomb =
91 std::accumulate(_theFragments.begin(),_theFragments.end(),
92 0.0,
93 [](const G4double& running_total,
94 G4StatMFFragment*& fragment)
95 {
96 return running_total + fragment->GetCoulombEnergy();
97 } );
98 // G4double Coulomb = 0.0;
99 // for (unsigned int i = 0;i < _theFragments.size(); i++)
100 // Coulomb += _theFragments[i]->GetCoulombEnergy();
101 return Coulomb;
102}
double G4double
Definition: G4Types.hh:83

◆ GetFragmentsEnergy()

G4double G4StatMFChannel::GetFragmentsEnergy ( G4double  T) const

Definition at line 104 of file G4StatMFChannel.cc.

105{
106 G4double Energy = 0.0;
107
108 G4double TranslationalEnergy = 1.5*T*_theFragments.size();
109
110 std::deque<G4StatMFFragment*>::const_iterator i;
111 for (i = _theFragments.begin(); i != _theFragments.end(); ++i)
112 {
113 Energy += (*i)->GetEnergy(T);
114 }
115 return Energy + TranslationalEnergy;
116}

◆ GetMultiplicity()

size_t G4StatMFChannel::GetMultiplicity ( void  )
inline

Definition at line 64 of file G4StatMFChannel.hh.

64{ return _theFragments.size();}

Referenced by G4StatMF::BreakItUp().


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