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

#include <G4Fancy3DNucleus.hh>

+ Inheritance 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 ()
 
virtual void Init (G4int theA, G4int theZ)=0
 
virtual G4bool StartLoop ()=0
 
virtual G4NucleonGetNextNucleon ()=0
 
virtual const std::vector< G4Nucleon > & GetNucleons ()=0
 
virtual G4int GetMassNumber ()=0
 
virtual G4double GetMass ()=0
 
virtual G4int GetCharge ()=0
 
virtual G4double GetNuclearRadius ()=0
 
virtual G4double GetNuclearRadius (const G4double maxRelativeDensity)=0
 
virtual G4double GetOuterRadius ()=0
 
virtual G4double CoulombBarrier ()=0
 
virtual void DoLorentzBoost (const G4LorentzVector &theBoost)=0
 
virtual void DoLorentzBoost (const G4ThreeVector &theBeta)=0
 
virtual void DoLorentzContraction (const G4LorentzVector &theBoost)=0
 
virtual void DoLorentzContraction (const G4ThreeVector &theBeta)=0
 
virtual void DoTranslation (const G4ThreeVector &theShift)=0
 
virtual const G4VNuclearDensityGetNuclearDensity () const =0
 
virtual void SortNucleonsIncZ ()=0
 
virtual void SortNucleonsDecZ ()=0
 
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::G4Fancy3DNucleus ( )

Definition at line 59 of file G4Fancy3DNucleus.cc.

60 : myA(0), myZ(0), theNucleons(250), currentNucleon(-1), theDensity(0),
61 nucleondistance(0.8*fermi),excitationEnergy(0.),
62 places(250), momentum(250), fermiM(250), testSums(250)
63{
64}

◆ ~G4Fancy3DNucleus()

G4Fancy3DNucleus::~G4Fancy3DNucleus ( )

Definition at line 66 of file G4Fancy3DNucleus.cc.

67{
68 if(theDensity) delete theDensity;
69}

Member Function Documentation

◆ AddExcitationEnergy()

G4double G4Fancy3DNucleus::AddExcitationEnergy ( G4double  anE)
inline

Definition at line 131 of file G4Fancy3DNucleus.hh.

132{
133 excitationEnergy +=anE;
134 return excitationEnergy;
135}

◆ CenterNucleons()

void G4Fancy3DNucleus::CenterNucleons ( )

Definition at line 245 of file G4Fancy3DNucleus.cc.

246{
247 G4ThreeVector center;
248
249 for (G4int i=0; i<myA; i++ )
250 {
251 center+=theNucleons[i].GetPosition();
252 }
253 center /= -myA;
254 DoTranslation(center);
255}
int G4int
Definition: G4Types.hh:85
void DoTranslation(const G4ThreeVector &theShift)

Referenced by Init().

◆ CoulombBarrier()

G4double G4Fancy3DNucleus::CoulombBarrier ( )
virtual

Implements G4V3DNucleus.

Definition at line 595 of file G4Fancy3DNucleus.cc.

596{
597 static const G4double cfactor = (1.44/1.14) * MeV;
598 return cfactor*myZ/(1.0 + G4Pow::GetInstance()->Z13(myA));
599}
double G4double
Definition: G4Types.hh:83
static G4Pow * GetInstance()
Definition: G4Pow.cc:41
G4double Z13(G4int Z) const
Definition: G4Pow.hh:123

◆ DoLorentzBoost() [1/2]

void G4Fancy3DNucleus::DoLorentzBoost ( const G4LorentzVector theBoost)
virtual

Implements G4V3DNucleus.

Definition at line 207 of file G4Fancy3DNucleus.cc.

208{
209 for (G4int i=0; i<myA; i++){
210 theNucleons[i].Boost(theBoost);
211 }
212}

◆ DoLorentzBoost() [2/2]

void G4Fancy3DNucleus::DoLorentzBoost ( const G4ThreeVector theBeta)
virtual

Implements G4V3DNucleus.

Definition at line 214 of file G4Fancy3DNucleus.cc.

215{
216 for (G4int i=0; i<myA; i++){
217 theNucleons[i].Boost(theBeta);
218 }
219}

◆ DoLorentzContraction() [1/2]

void G4Fancy3DNucleus::DoLorentzContraction ( const G4LorentzVector theBoost)
virtual

Implements G4V3DNucleus.

Definition at line 235 of file G4Fancy3DNucleus.cc.

236{
237 if (theBoost.e() !=0 ) {
238 G4ThreeVector beta = theBoost.vect()/theBoost.e();
240 }
241}
Hep3Vector vect() const
void DoLorentzContraction(const G4LorentzVector &theBoost)

Referenced by DoLorentzContraction().

◆ DoLorentzContraction() [2/2]

void G4Fancy3DNucleus::DoLorentzContraction ( const G4ThreeVector theBeta)
virtual

Implements G4V3DNucleus.

Definition at line 221 of file G4Fancy3DNucleus.cc.

222{
223 G4double beta2=theBeta.mag2();
224 if (beta2 > 0) {
225 G4double factor=(1-std::sqrt(1-beta2))/beta2; // (gamma-1)/gamma/beta**2
226 G4ThreeVector rprime;
227 for (G4int i=0; i< myA; i++) {
228 rprime = theNucleons[i].GetPosition() -
229 factor * (theBeta*theNucleons[i].GetPosition()) * theBeta;
230 theNucleons[i].SetPosition(rprime);
231 }
232 }
233}
double mag2() const

◆ DoTranslation()

void G4Fancy3DNucleus::DoTranslation ( const G4ThreeVector theShift)
virtual

Implements G4V3DNucleus.

Definition at line 257 of file G4Fancy3DNucleus.cc.

258{
259 G4ThreeVector tempV;
260 for (G4int i=0; i<myA; i++ )
261 {
262 tempV = theNucleons[i].GetPosition() + theShift;
263 theNucleons[i].SetPosition(tempV);
264 }
265}

Referenced by CenterNucleons().

◆ GetCharge()

G4int G4Fancy3DNucleus::GetCharge ( )
inlinevirtual

Implements G4V3DNucleus.

Definition at line 122 of file G4Fancy3DNucleus.hh.

123{
124 return myZ;
125}

◆ GetExcitationEnergy()

G4double G4Fancy3DNucleus::GetExcitationEnergy ( )
inline

Definition at line 137 of file G4Fancy3DNucleus.hh.

138{
139 return excitationEnergy;
140}

◆ GetMass()

G4double G4Fancy3DNucleus::GetMass ( )
virtual

Implements G4V3DNucleus.

Definition at line 198 of file G4Fancy3DNucleus.cc.

199{
200 return myZ*G4Proton::Proton()->GetPDGMass() +
201 (myA-myZ)*G4Neutron::Neutron()->GetPDGMass() -
202 BindingEnergy();
203}
static G4Neutron * Neutron()
Definition: G4Neutron.cc:103
static G4Proton * Proton()
Definition: G4Proton.cc:92

◆ GetMassNumber()

G4int G4Fancy3DNucleus::GetMassNumber ( )
inlinevirtual

Implements G4V3DNucleus.

Definition at line 127 of file G4Fancy3DNucleus.hh.

128{
129 return myA;
130}

◆ GetNextNucleon()

G4Nucleon * G4Fancy3DNucleus::GetNextNucleon ( )
virtual

Implements G4V3DNucleus.

Definition at line 133 of file G4Fancy3DNucleus.cc.

134{
135 return ( (currentNucleon>=0 && currentNucleon<myA) ?
136 &theNucleons[currentNucleon++] : 0 );
137}

Referenced by G4LowEIonFragmentation::ApplyYourself().

◆ GetNuclearDensity()

const G4VNuclearDensity * G4Fancy3DNucleus::GetNuclearDensity ( ) const
virtual

Implements G4V3DNucleus.

Definition at line 267 of file G4Fancy3DNucleus.cc.

268{
269 return theDensity;
270}

◆ GetNuclearRadius() [1/2]

G4double G4Fancy3DNucleus::GetNuclearRadius ( )
virtual

Implements G4V3DNucleus.

Definition at line 174 of file G4Fancy3DNucleus.cc.

175{
176 return GetNuclearRadius(0.5);
177}
G4double GetNuclearRadius()

Referenced by GetNuclearRadius().

◆ GetNuclearRadius() [2/2]

G4double G4Fancy3DNucleus::GetNuclearRadius ( const G4double  maxRelativeDensity)
virtual

Implements G4V3DNucleus.

Definition at line 179 of file G4Fancy3DNucleus.cc.

180{
181 return theDensity->GetRadius(maxRelativeDensity);
182}
virtual G4double GetRadius(const G4double maxRelativeDenisty) const =0

◆ GetNucleons()

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

Implements G4V3DNucleus.

Definition at line 139 of file G4Fancy3DNucleus.cc.

140{
141 return theNucleons;
142}

Referenced by G4MuMinusCapturePrecompound::ApplyYourself().

◆ GetOuterRadius()

G4double G4Fancy3DNucleus::GetOuterRadius ( )
virtual

Implements G4V3DNucleus.

Definition at line 184 of file G4Fancy3DNucleus.cc.

185{
186 G4double maxradius2=0;
187
188 for (int i=0; i<myA; i++)
189 {
190 if ( theNucleons[i].GetPosition().mag2() > maxradius2 )
191 {
192 maxradius2=theNucleons[i].GetPosition().mag2();
193 }
194 }
195 return std::sqrt(maxradius2)+nucleondistance;
196}

Referenced by G4LowEIonFragmentation::ApplyYourself().

◆ Init()

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

Implements G4V3DNucleus.

Definition at line 82 of file G4Fancy3DNucleus.cc.

83{
84 currentNucleon=-1;
85 theNucleons.clear();
86 nucleondistance = 0.8*fermi;
87 places.clear();
88 momentum.clear();
89 fermiM.clear();
90 testSums.clear();
91
92 myZ = theZ;
93 myA= theA;
94 excitationEnergy=0;
95
96 theNucleons.resize(myA); // Pre-loads vector with empty elements
97
98 if(theDensity) delete theDensity;
99 if ( myA < 17 ) {
100 theDensity = new G4NuclearShellModelDensity(myA, myZ);
101 if( myA == 12 ) nucleondistance=0.9*fermi;
102 } else {
103 theDensity = new G4NuclearFermiDensity(myA, myZ);
104 }
105
106 theFermi.Init(myA, myZ);
107
108 ChooseNucleons();
109
110 ChoosePositions();
111
112 if( myA == 12 ) CenterNucleons(); // This would introduce a bias
113
114 ChooseFermiMomenta();
115
116 G4double Ebinding= BindingEnergy()/myA;
117
118 for (G4int aNucleon=0; aNucleon < myA; aNucleon++)
119 {
120 theNucleons[aNucleon].SetBindingEnergy(Ebinding);
121 }
122
123 return;
124}
void Init(G4int anA, G4int aZ)

Referenced by G4MuMinusCapturePrecompound::ApplyYourself(), and G4LowEIonFragmentation::ApplyYourself().

◆ SortNucleonsDecZ()

void G4Fancy3DNucleus::SortNucleonsDecZ ( )
virtual

Implements G4V3DNucleus.

Definition at line 159 of file G4Fancy3DNucleus.cc.

160{
161 if (theNucleons.size() < 2 ) return; // Avoid unnecessary work
163
164 std::reverse(theNucleons.begin(), theNucleons.end());
165}

◆ SortNucleonsIncZ()

void G4Fancy3DNucleus::SortNucleonsIncZ ( )
virtual

Implements G4V3DNucleus.

Definition at line 151 of file G4Fancy3DNucleus.cc.

152{
153 if (theNucleons.size() < 2 ) return; // Avoid unnecesary work
154
155 std::sort(theNucleons.begin(), theNucleons.end(),
157}
bool G4Fancy3DNucleusHelperForSortInZ(const G4Nucleon &nuc1, const G4Nucleon &nuc2)

Referenced by SortNucleonsDecZ().

◆ StartLoop()

G4bool G4Fancy3DNucleus::StartLoop ( )
virtual

Implements G4V3DNucleus.

Definition at line 126 of file G4Fancy3DNucleus.cc.

127{
128 currentNucleon=0;
129 return (theNucleons.size()>0);
130}

Referenced by G4LowEIonFragmentation::ApplyYourself().


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