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
G4FragmentVector * GetFragments (G4int anA, G4int anZ, G4double T)

Data Structures

struct  DeleteFragment


Detailed Description

Definition at line 41 of file G4StatMFChannel.hh.


Constructor & Destructor Documentation

G4StatMFChannel::G4StatMFChannel (  ) 

Definition at line 59 of file G4StatMFChannel.cc.

00059                                  : 
00060   _NumOfNeutralFragments(0), 
00061   _NumOfChargedFragments(0)
00062 {}

G4StatMFChannel::~G4StatMFChannel (  ) 

Definition at line 64 of file G4StatMFChannel.cc.

00065 { 
00066   if (!_theFragments.empty()) {
00067     std::for_each(_theFragments.begin(),_theFragments.end(),
00068                   DeleteFragment());
00069   }
00070 }


Member Function Documentation

G4bool G4StatMFChannel::CheckFragments ( void   ) 

Definition at line 72 of file G4StatMFChannel.cc.

Referenced by G4StatMF::BreakItUp().

00073 {
00074     std::deque<G4StatMFFragment*>::iterator i;
00075     for (i = _theFragments.begin(); 
00076          i != _theFragments.end(); ++i) 
00077       {
00078         G4int A = (*i)->GetA();
00079         G4int Z = (*i)->GetZ();
00080         if ( (A > 1 && (Z > A || Z <= 0)) || (A==1 && Z > A) || A <= 0 ) return false;
00081     }
00082     return true;
00083 }

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

Definition at line 85 of file G4StatMFChannel.cc.

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

00087                                          : first charged fragments, 
00088     // then neutral ones.
00089 {
00090     if (Z <= 0.5) {
00091         _theFragments.push_back(new G4StatMFFragment(A,Z));
00092         _NumOfNeutralFragments++;
00093     } else {
00094         _theFragments.push_front(new G4StatMFFragment(A,Z));
00095         _NumOfChargedFragments++;
00096     }
00097         
00098     return;
00099 }

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

Definition at line 127 of file G4StatMFChannel.cc.

00131 {
00132     // calculate momenta of charged fragments  
00133     CoulombImpulse(anA,anZ,T);
00134         
00135     // calculate momenta of neutral fragments
00136     FragmentsMomenta(_NumOfNeutralFragments, _NumOfChargedFragments, T);
00137 
00138     G4FragmentVector * theResult = new G4FragmentVector;
00139     std::deque<G4StatMFFragment*>::iterator i;
00140     for (i = _theFragments.begin(); i != _theFragments.end(); ++i)
00141         theResult->push_back((*i)->GetFragment(T));
00142 
00143     return theResult;
00144 }

G4double G4StatMFChannel::GetFragmentsCoulombEnergy ( void   ) 

Definition at line 101 of file G4StatMFChannel.cc.

00102 {
00103     G4double Coulomb = std::accumulate(_theFragments.begin(),_theFragments.end(),
00104                                          0.0,SumCoulombEnergy());
00105 //      G4double Coulomb = 0.0;
00106 //      for (unsigned int i = 0;i < _theFragments.size(); i++)
00107 //      Coulomb += _theFragments[i]->GetCoulombEnergy();
00108     return Coulomb;
00109 }

G4double G4StatMFChannel::GetFragmentsEnergy ( G4double  T  )  const

Definition at line 113 of file G4StatMFChannel.cc.

00114 {
00115     G4double Energy = 0.0;
00116         
00117     G4double TranslationalEnergy = (3./2.)*T*static_cast<G4double>(_theFragments.size());
00118 
00119     std::deque<G4StatMFFragment*>::const_iterator i;
00120     for (i = _theFragments.begin(); i != _theFragments.end(); ++i)
00121       {
00122         Energy += (*i)->GetEnergy(T);
00123       }
00124     return Energy + TranslationalEnergy;        
00125 }

size_t G4StatMFChannel::GetMultiplicity ( void   )  [inline]

Definition at line 65 of file G4StatMFChannel.hh.

Referenced by G4StatMF::BreakItUp().

00065 { return _theFragments.size();}


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:25 2013 for Geant4 by  doxygen 1.4.7