Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4QMDNucleus Class Reference

#include <G4QMDNucleus.hh>

Inheritance diagram for G4QMDNucleus:
G4QMDSystem G4QMDGroundStateNucleus

Public Member Functions

 G4QMDNucleus ()
 
G4LorentzVector Get4Momentum ()
 
G4int GetMassNumber ()
 
G4int GetAtomicNumber ()
 
void CalEnergyAndAngularMomentumInCM ()
 
G4double GetNuclearMass ()
 
void SetTotalPotential (G4double x)
 
G4double GetExcitationEnergy ()
 
G4int GetAngularMomentum ()
 
- Public Member Functions inherited from G4QMDSystem
 G4QMDSystem ()
 
virtual ~G4QMDSystem ()
 
void SetParticipant (G4QMDParticipant *particle)
 
void SetSystem (G4QMDSystem *, G4ThreeVector, G4ThreeVector)
 
void SubtractSystem (G4QMDSystem *)
 
G4QMDParticipantEraseParticipant (G4int i)
 
void DeleteParticipant (G4int i)
 
void InsertParticipant (G4QMDParticipant *particle, G4int j)
 
G4int GetTotalNumberOfParticipant ()
 
G4QMDParticipantGetParticipant (G4int i)
 
void IncrementCollisionCounter ()
 
G4int GetNOCollision ()
 
void ShowParticipants ()
 
void Clear ()
 

Additional Inherited Members

- Protected Attributes inherited from G4QMDSystem
std::vector< G4QMDParticipant * > participants
 

Detailed Description

Definition at line 43 of file G4QMDNucleus.hh.

Constructor & Destructor Documentation

G4QMDNucleus::G4QMDNucleus ( )

Definition at line 36 of file G4QMDNucleus.cc.

References G4QMDParameters::Get_hbc(), and G4QMDParameters::GetInstance().

37 {
39  hbc = parameters->Get_hbc();
40 
41  jj = 0; // will be calcualted in CalEnergyAndAngularMomentumInCM;
42  potentialEnergy = 0.0; // will be set through set method
43  excitationEnergy = 0.0;
44 }
G4double Get_hbc()
static G4QMDParameters * GetInstance()

Member Function Documentation

void G4QMDNucleus::CalEnergyAndAngularMomentumInCM ( )

Definition at line 132 of file G4QMDNucleus.cc.

References G4InuclSpecialFunctions::bindingEnergy(), CLHEP::HepLorentzVector::e(), CLHEP::HepLorentzVector::gamma(), Get4Momentum(), GetAtomicNumber(), G4NucleiProperties::GetBindingEnergy(), G4QMDParticipant::GetMass(), GetMassNumber(), G4QMDParticipant::GetMomentum(), G4QMDSystem::GetParticipant(), G4QMDParticipant::GetPosition(), G4QMDSystem::GetTotalNumberOfParticipant(), python.hepunit::GeV, int(), n, and CLHEP::HepLorentzVector::v().

Referenced by G4QMDReaction::ApplyYourself(), and G4QMDMeanField::SetNucleus().

133 {
134 
135  //G4cout << "CalEnergyAndAngularMomentumInCM " << this->GetAtomicNumber() << " " << GetMassNumber() << G4endl;
136 
137  G4double gamma = Get4Momentum().gamma();
138  G4ThreeVector beta = Get4Momentum().v()/ Get4Momentum().e();
139 
140  G4ThreeVector pcm0( 0.0 ) ;
141 
143  pcm.resize( n );
144 
145  for ( G4int i= 0; i < n ; i++ )
146  {
148 
149  G4double trans = gamma / ( gamma + 1.0 ) * p_i * beta;
150  pcm[i] = p_i - trans*beta;
151 
152  pcm0 += pcm[i];
153  }
154 
155  pcm0 = pcm0 / double ( n );
156 
157  //G4cout << "pcm0 " << pcm0 << G4endl;
158 
159  for ( G4int i= 0; i < n ; i++ )
160  {
161  pcm[i] += -pcm0;
162  //G4cout << "pcm " << i << " " << pcm[i] << G4endl;
163  }
164 
165 
166  G4double tmass = 0;
167  G4ThreeVector rcm0( 0.0 ) ;
168  rcm.resize( n );
169  es.resize( n );
170 
171  for ( G4int i= 0; i < n ; i++ )
172  {
174  G4double trans = gamma / ( gamma + 1.0 ) * ri * beta;
175 
176  es[i] = std::sqrt ( std::pow ( GetParticipant( i )->GetMass() , 2 ) + pcm[i]*pcm[i] );
177 
178  rcm[i] = ri + trans*beta;
179 
180  rcm0 += rcm[i]*es[i];
181 
182  tmass += es[i];
183  }
184 
185  rcm0 = rcm0/tmass;
186 
187  for ( G4int i= 0; i < n ; i++ )
188  {
189  rcm[i] += -rcm0;
190  //G4cout << "rcm " << i << " " << rcm[i] << G4endl;
191  }
192 
193 // Angluar momentum
194 
195  G4ThreeVector rl ( 0.0 );
196  for ( G4int i= 0; i < n ; i++ )
197  {
198  rl += rcm[i].cross ( pcm[i] );
199  }
200 
201  jj = int ( std::sqrt ( rl*rl / hbc ) + 0.5 );
202 
203 
204 // kinetic energy per nucleon in CM
205 
206  G4double totalMass = 0.0;
207  for ( G4int i= 0; i < n ; i++ )
208  {
209  // following two lines are equivalent
210  //totalMass += GetParticipant( i )->GetDefinition()->GetPDGMass()/GeV;
211  totalMass += GetParticipant( i )->GetMass();
212  }
213 
214  //G4double kineticEnergyPerNucleon = ( std::accumulate ( es.begin() , es.end() , 0.0 ) - totalMass )/n;
215 
216 // Total (not per nucleion ) Binding Energy
217  G4double bindingEnergy = ( std::accumulate ( es.begin() , es.end() , 0.0 ) -totalMass ) + potentialEnergy;
218 
219  //G4cout << "KineticEnergyPerNucleon in GeV " << kineticEnergyPerNucleon << G4endl;
220  //G4cout << "KineticEnergySum in GeV " << std::accumulate ( es.begin() , es.end() , 0.0 ) - totalMass << G4endl;
221  //G4cout << "PotentialEnergy in GeV " << potentialEnergy << G4endl;
222  //G4cout << "BindingEnergy in GeV " << bindingEnergy << G4endl;
223  //G4cout << "G4BindingEnergy in GeV " << G4NucleiProperties::GetBindingEnergy( GetAtomicNumber() , GetMassNumber() )/GeV << G4endl;
224 
225  excitationEnergy = bindingEnergy + G4NucleiProperties::GetBindingEnergy( GetMassNumber() , GetAtomicNumber() )/GeV;
226  //G4cout << "excitationEnergy in GeV " << excitationEnergy << G4endl;
227  if ( excitationEnergy < 0 ) excitationEnergy = 0.0;
228 
229 }
G4int GetAtomicNumber()
Definition: G4QMDNucleus.cc:83
G4ThreeVector GetPosition()
G4int GetMassNumber()
Definition: G4QMDNucleus.cc:66
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
Hep3Vector v() const
int G4int
Definition: G4Types.hh:78
G4ThreeVector GetMomentum()
G4LorentzVector Get4Momentum()
Definition: G4QMDNucleus.cc:54
G4int GetTotalNumberOfParticipant()
Definition: G4QMDSystem.hh:60
const G4int n
G4QMDParticipant * GetParticipant(G4int i)
Definition: G4QMDSystem.hh:62
static G4double GetBindingEnergy(const G4int A, const G4int Z)
double G4double
Definition: G4Types.hh:76
G4double bindingEnergy(G4int A, G4int Z)
G4LorentzVector G4QMDNucleus::Get4Momentum ( )

Definition at line 54 of file G4QMDNucleus.cc.

References G4QMDSystem::participants.

Referenced by CalEnergyAndAngularMomentumInCM().

55 {
56  G4LorentzVector p( 0 );
57  std::vector< G4QMDParticipant* >::iterator it;
58  for ( it = participants.begin() ; it != participants.end() ; it++ )
59  p += (*it)->Get4Momentum();
60 
61  return p;
62 }
const char * p
Definition: xmltok.h:285
std::vector< G4QMDParticipant * > participants
Definition: G4QMDSystem.hh:72
G4int G4QMDNucleus::GetAngularMomentum ( )
inline

Definition at line 65 of file G4QMDNucleus.hh.

65 { return jj; };
G4int G4QMDNucleus::GetAtomicNumber ( )

Definition at line 83 of file G4QMDNucleus.cc.

References G4QMDSystem::participants, and G4Proton::Proton().

Referenced by CalEnergyAndAngularMomentumInCM(), and GetNuclearMass().

84 {
85  G4int Z = 0;
86  std::vector< G4QMDParticipant* >::iterator it;
87  for ( it = participants.begin() ; it != participants.end() ; it++ )
88  {
89  if ( (*it)->GetDefinition() == G4Proton::Proton() )
90  Z++;
91  }
92  return Z;
93 }
int G4int
Definition: G4Types.hh:78
static G4Proton * Proton()
Definition: G4Proton.cc:93
std::vector< G4QMDParticipant * > participants
Definition: G4QMDSystem.hh:72
G4double G4QMDNucleus::GetExcitationEnergy ( void  )
inline

Definition at line 63 of file G4QMDNucleus.hh.

63 { return excitationEnergy; };
G4int G4QMDNucleus::GetMassNumber ( )

Definition at line 66 of file G4QMDNucleus.cc.

References G4Neutron::Neutron(), G4QMDSystem::participants, and G4Proton::Proton().

Referenced by CalEnergyAndAngularMomentumInCM(), G4QMDGroundStateNucleus::G4QMDGroundStateNucleus(), and GetNuclearMass().

67 {
68 
69  G4int A = 0;
70  std::vector< G4QMDParticipant* >::iterator it;
71  for ( it = participants.begin() ; it != participants.end() ; it++ )
72  {
73  if ( (*it)->GetDefinition() == G4Proton::Proton()
74  || (*it)->GetDefinition() == G4Neutron::Neutron() )
75  A++;
76  }
77 
78  return A;
79 }
int G4int
Definition: G4Types.hh:78
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
std::vector< G4QMDParticipant * > participants
Definition: G4QMDSystem.hh:72
G4double G4QMDNucleus::GetNuclearMass ( void  )

Definition at line 97 of file G4QMDNucleus.cc.

References GetAtomicNumber(), GetMassNumber(), G4NucleiProperties::GetNuclearMass(), G4ParticleDefinition::GetPDGMass(), python.hepunit::MeV, N, G4Neutron::Neutron(), and G4Proton::Proton().

98 {
99 
101 
102  if ( mass == 0.0 )
103  {
104 
105  G4int Z = GetAtomicNumber();
106  G4int A = GetMassNumber();
107  G4int N = A - Z;
108 
109 // Weizsacker-Bethe
110 
111  G4double Av = 16*MeV;
112  G4double As = 17*MeV;
113  G4double Ac = 0.7*MeV;
114  G4double Asym = 23*MeV;
115 
116  G4double BE = Av * A
117  - As * std::pow ( G4double ( A ) , 2.0/3.0 )
118  - Ac * Z*Z/std::pow ( G4double ( A ) , 1.0/3.0 )
119  - Asym * ( N - Z )* ( N - Z ) / A;
120 
121  mass = Z * G4Proton::Proton()->GetPDGMass()
122  + N * G4Neutron::Neutron()->GetPDGMass()
123  - BE;
124 
125  }
126 
127  return mass;
128 }
G4int GetAtomicNumber()
Definition: G4QMDNucleus.cc:83
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4int GetMassNumber()
Definition: G4QMDNucleus.cc:66
int G4int
Definition: G4Types.hh:78
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4double GetPDGMass() const
**D E S C R I P T I O N
double G4double
Definition: G4Types.hh:76
void G4QMDNucleus::SetTotalPotential ( G4double  x)
inline

Definition at line 62 of file G4QMDNucleus.hh.

References test::x.

Referenced by G4QMDReaction::ApplyYourself(), and G4QMDMeanField::SetNucleus().

62 { potentialEnergy = x; };

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