Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4Fancy3DNucleus Class Reference

#include <G4Fancy3DNucleus.hh>

Inheritance diagram for G4Fancy3DNucleus:
Collaboration diagram for G4Fancy3DNucleus:

Public Member Functions

 G4Fancy3DNucleus ()
 
 ~G4Fancy3DNucleus ()
 
void Init (G4int theA, G4int theZ)
 
G4bool StartLoop ()
 
G4NucleonGetNextNucleon ()
 
const std::vector< G4Nucleon > & GetNucleons ()
 
G4int GetMassNumber ()
 
G4double GetMass ()
 
G4int GetCharge ()
 
G4double GetNuclearRadius ()
 
G4double GetNuclearRadius (const G4double maxRelativeDensity)
 
G4double GetOuterRadius ()
 
G4double AddExcitationEnergy (G4double)
 
G4double GetExcitationEnergy ()
 
G4double CoulombBarrier ()
 
void DoLorentzBoost (const G4LorentzVector &theBoost)
 
void DoLorentzBoost (const G4ThreeVector &theBeta)
 
void DoLorentzContraction (const G4LorentzVector &theBoost)
 
void DoLorentzContraction (const G4ThreeVector &theBeta)
 
void CenterNucleons ()
 
void DoTranslation (const G4ThreeVector &theShift)
 
const G4VNuclearDensityGetNuclearDensity () const
 
void SortNucleonsIncZ ()
 
void SortNucleonsDecZ ()
 
- Public Member Functions inherited from G4V3DNucleus
 G4V3DNucleus ()
 
virtual ~G4V3DNucleus ()
 
std::pair< G4double, G4doubleChooseImpactXandY (G4double maxImpact)
 
std::pair< G4double, G4doubleRefetchImpactXandY ()
 

Detailed Description

Definition at line 54 of file G4Fancy3DNucleus.hh.

Constructor & Destructor Documentation

G4Fancy3DNucleus::G4Fancy3DNucleus ( )

Definition at line 53 of file G4Fancy3DNucleus.cc.

54  : myA(0), myZ(0), theNucleons(250), currentNucleon(-1), theDensity(0),
55  nucleondistance(0.8*fermi),excitationEnergy(0.),
56  places(250), momentum(250), fermiM(250), testSums(250)
57 {
58 //G4cout <<"G4Fancy3DNucleus::G4Fancy3DNucleus()"<<G4endl;
59 }
static constexpr double fermi
Definition: G4SIunits.hh:103
G4Fancy3DNucleus::~G4Fancy3DNucleus ( )

Definition at line 61 of file G4Fancy3DNucleus.cc.

62 {
63  if(theDensity) delete theDensity;
64 }

Member Function Documentation

G4double G4Fancy3DNucleus::AddExcitationEnergy ( G4double  anE)
inline

Definition at line 130 of file G4Fancy3DNucleus.hh.

131 {
132  excitationEnergy +=anE;
133  return excitationEnergy;
134 }
void G4Fancy3DNucleus::CenterNucleons ( )

Definition at line 238 of file G4Fancy3DNucleus.cc.

239 {
240  G4ThreeVector center;
241 
242  for (G4int i=0; i<myA; i++ )
243  {
244  center+=theNucleons[i].GetPosition();
245  }
246  center /= -myA;
247  DoTranslation(center);
248 }
void DoTranslation(const G4ThreeVector &theShift)
int G4int
Definition: G4Types.hh:78

Here is the call graph for this function:

G4double G4Fancy3DNucleus::CoulombBarrier ( )
virtual

Implements G4V3DNucleus.

Definition at line 501 of file G4Fancy3DNucleus.cc.

502 {
503  static const G4double cfactor = (1.44/1.14) * MeV;
504  return cfactor*myZ/(1.0 + G4Pow::GetInstance()->Z13(myA));
505 }
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
G4double Z13(G4int Z) const
Definition: G4Pow.hh:127
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

void G4Fancy3DNucleus::DoLorentzBoost ( const G4LorentzVector theBoost)
virtual

Implements G4V3DNucleus.

Definition at line 200 of file G4Fancy3DNucleus.cc.

201 {
202  for (G4int i=0; i<myA; i++){
203  theNucleons[i].Boost(theBoost);
204  }
205 }
int G4int
Definition: G4Types.hh:78
void G4Fancy3DNucleus::DoLorentzBoost ( const G4ThreeVector theBeta)
virtual

Implements G4V3DNucleus.

Definition at line 207 of file G4Fancy3DNucleus.cc.

208 {
209  for (G4int i=0; i<myA; i++){
210  theNucleons[i].Boost(theBeta);
211  }
212 }
int G4int
Definition: G4Types.hh:78
void G4Fancy3DNucleus::DoLorentzContraction ( const G4LorentzVector theBoost)
virtual

Implements G4V3DNucleus.

Definition at line 228 of file G4Fancy3DNucleus.cc.

229 {
230  if (theBoost.e() !=0 ) {
231  G4ThreeVector beta = theBoost.vect()/theBoost.e();
232  DoLorentzContraction(beta);
233  }
234 }
Hep3Vector vect() const
void DoLorentzContraction(const G4LorentzVector &theBoost)

Here is the call graph for this function:

void G4Fancy3DNucleus::DoLorentzContraction ( const G4ThreeVector theBeta)
virtual

Implements G4V3DNucleus.

Definition at line 214 of file G4Fancy3DNucleus.cc.

215 {
216  G4double beta2=theBeta.mag2();
217  if (beta2 > 0) {
218  G4double factor=(1-std::sqrt(1-beta2))/beta2; // (gamma-1)/gamma/beta**2
219  G4ThreeVector rprime;
220  for (G4int i=0; i< myA; i++) {
221  rprime = theNucleons[i].GetPosition() -
222  factor * (theBeta*theNucleons[i].GetPosition()) * theBeta;
223  theNucleons[i].SetPosition(rprime);
224  }
225  }
226 }
int G4int
Definition: G4Types.hh:78
double mag2() const
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

void G4Fancy3DNucleus::DoTranslation ( const G4ThreeVector theShift)
virtual

Implements G4V3DNucleus.

Definition at line 250 of file G4Fancy3DNucleus.cc.

251 {
252  G4ThreeVector tempV;
253  for (G4int i=0; i<myA; i++ )
254  {
255  tempV = theNucleons[i].GetPosition() + theShift;
256  theNucleons[i].SetPosition(tempV);
257  }
258 }
int G4int
Definition: G4Types.hh:78

Here is the caller graph for this function:

G4int G4Fancy3DNucleus::GetCharge ( )
inlinevirtual

Implements G4V3DNucleus.

Definition at line 121 of file G4Fancy3DNucleus.hh.

122 {
123  return myZ;
124 }
G4double G4Fancy3DNucleus::GetExcitationEnergy ( void  )
inline

Definition at line 136 of file G4Fancy3DNucleus.hh.

137 {
138  return excitationEnergy;
139 }
G4double G4Fancy3DNucleus::GetMass ( )
virtual

Implements G4V3DNucleus.

Definition at line 191 of file G4Fancy3DNucleus.cc.

192 {
193  return myZ*G4Proton::Proton()->GetPDGMass() +
194  (myA-myZ)*G4Neutron::Neutron()->GetPDGMass() -
195  BindingEnergy();
196 }
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4double GetPDGMass() const

Here is the call graph for this function:

G4int G4Fancy3DNucleus::GetMassNumber ( )
inlinevirtual

Implements G4V3DNucleus.

Definition at line 126 of file G4Fancy3DNucleus.hh.

127 {
128  return myA;
129 }
G4Nucleon * G4Fancy3DNucleus::GetNextNucleon ( )
virtual

Implements G4V3DNucleus.

Definition at line 126 of file G4Fancy3DNucleus.cc.

127 {
128  return ( (currentNucleon>=0 && currentNucleon<myA) ?
129  &theNucleons[currentNucleon++] : 0 );
130 }

Here is the caller graph for this function:

const G4VNuclearDensity * G4Fancy3DNucleus::GetNuclearDensity ( ) const
virtual

Implements G4V3DNucleus.

Definition at line 260 of file G4Fancy3DNucleus.cc.

261 {
262  return theDensity;
263 }
G4double G4Fancy3DNucleus::GetNuclearRadius ( )
virtual

Implements G4V3DNucleus.

Definition at line 167 of file G4Fancy3DNucleus.cc.

168 {
169  return GetNuclearRadius(0.5);
170 }
G4double GetNuclearRadius()
G4double G4Fancy3DNucleus::GetNuclearRadius ( const G4double  maxRelativeDensity)
virtual

Implements G4V3DNucleus.

Definition at line 172 of file G4Fancy3DNucleus.cc.

173 {
174  return theDensity->GetRadius(maxRelativeDensity);
175 }
virtual G4double GetRadius(const G4double maxRelativeDenisty) const =0

Here is the call graph for this function:

const std::vector< G4Nucleon > & G4Fancy3DNucleus::GetNucleons ( )
virtual

Implements G4V3DNucleus.

Definition at line 132 of file G4Fancy3DNucleus.cc.

133 {
134  return theNucleons;
135 }

Here is the caller graph for this function:

G4double G4Fancy3DNucleus::GetOuterRadius ( )
virtual

Implements G4V3DNucleus.

Definition at line 177 of file G4Fancy3DNucleus.cc.

178 {
179  G4double maxradius2=0;
180 
181  for (int i=0; i<myA; i++)
182  {
183  if ( theNucleons[i].GetPosition().mag2() > maxradius2 )
184  {
185  maxradius2=theNucleons[i].GetPosition().mag2();
186  }
187  }
188  return std::sqrt(maxradius2)+nucleondistance;
189 }
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

void G4Fancy3DNucleus::Init ( G4int  theA,
G4int  theZ 
)
virtual

Implements G4V3DNucleus.

Definition at line 77 of file G4Fancy3DNucleus.cc.

78 {
79 // G4cout << "G4Fancy3DNucleus::Init(theA, theZ) called"<<G4endl;
80  currentNucleon=-1;
81  theNucleons.clear();
82 
83  myZ = theZ;
84  myA= theA;
85  excitationEnergy=0;
86 
87  theNucleons.resize(myA); // Pre-loads vector with empty elements
88 
89 // G4cout << "myA, myZ" << myA << ", " << myZ << G4endl;
90 
91  if(theDensity) delete theDensity;
92  if ( myA < 17 ) {
93  theDensity = new G4NuclearShellModelDensity(myA, myZ);
94  } else {
95  theDensity = new G4NuclearFermiDensity(myA, myZ);
96  }
97 
98  theFermi.Init(myA, myZ);
99 
100  ChooseNucleons();
101 
102  ChoosePositions();
103 
104 // CenterNucleons(); // This would introduce a bias
105 
106  ChooseFermiMomenta();
107 
108  G4double Ebinding= BindingEnergy()/myA;
109 
110  for (G4int aNucleon=0; aNucleon < myA; aNucleon++)
111  {
112  theNucleons[aNucleon].SetBindingEnergy(Ebinding);
113  }
114 
115 
116  return;
117 }
int G4int
Definition: G4Types.hh:78
void Init(G4int anA, G4int aZ)
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

void G4Fancy3DNucleus::SortNucleonsDecZ ( )
virtual

Implements G4V3DNucleus.

Definition at line 152 of file G4Fancy3DNucleus.cc.

153 {
154  if (theNucleons.size() < 2 ) return; // Avoid unnecessary work
156 
157  std::reverse(theNucleons.begin(), theNucleons.end());
158 }

Here is the call graph for this function:

void G4Fancy3DNucleus::SortNucleonsIncZ ( )
virtual

Implements G4V3DNucleus.

Definition at line 144 of file G4Fancy3DNucleus.cc.

145 {
146  if (theNucleons.size() < 2 ) return; // Avoid unnecesary work
147 
148  std::sort(theNucleons.begin(), theNucleons.end(),
150 }
bool G4Fancy3DNucleusHelperForSortInZ(const G4Nucleon &nuc1, const G4Nucleon &nuc2)

Here is the call graph for this function:

Here is the caller graph for this function:

G4bool G4Fancy3DNucleus::StartLoop ( )
virtual

Implements G4V3DNucleus.

Definition at line 119 of file G4Fancy3DNucleus.cc.

120 {
121  currentNucleon=0;
122  return (theNucleons.size()>0);
123 }

Here is the caller graph for this function:


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