Geant4 11.2.2
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 41 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{
50 Pos.resize(8);
51 Vel.resize(8);
52 Accel.resize(8);
53}
ush Pos
Definition deflate.h:92

◆ ~G4StatMFChannel()

G4StatMFChannel::~G4StatMFChannel ( )

Definition at line 55 of file G4StatMFChannel.cc.

56{
57 if (!_theFragments.empty()) {
58 std::for_each(_theFragments.begin(),_theFragments.end(),
59 DeleteFragment());
60 }
61}

Member Function Documentation

◆ CheckFragments()

G4bool G4StatMFChannel::CheckFragments ( void )

Definition at line 63 of file G4StatMFChannel.cc.

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

Referenced by G4StatMF::BreakItUp().

◆ CreateFragment()

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

Definition at line 76 of file G4StatMFChannel.cc.

80{
81 if (Z <= 0.5) {
82 _theFragments.push_back(new G4StatMFFragment(A,Z));
83 _NumOfNeutralFragments++;
84 } else {
85 _theFragments.push_front(new G4StatMFFragment(A,Z));
86 _NumOfChargedFragments++;
87 }
88
89 return;
90}

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

◆ GetFragments()

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

Definition at line 122 of file G4StatMFChannel.cc.

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

◆ GetFragmentsCoulombEnergy()

G4double G4StatMFChannel::GetFragmentsCoulombEnergy ( void )

Definition at line 92 of file G4StatMFChannel.cc.

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

◆ GetFragmentsEnergy()

G4double G4StatMFChannel::GetFragmentsEnergy ( G4double T) const

Definition at line 108 of file G4StatMFChannel.cc.

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

◆ GetMultiplicity()

size_t G4StatMFChannel::GetMultiplicity ( void )
inline

Definition at line 65 of file G4StatMFChannel.hh.

65{ return _theFragments.size();}

Referenced by G4StatMF::BreakItUp().


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