G4Fancy3DNucleus Class Reference

#include <G4Fancy3DNucleus.hh>

Inheritance diagram for G4Fancy3DNucleus:

G4V3DNucleus

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 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 ()

Detailed Description

Definition at line 54 of file G4Fancy3DNucleus.hh.


Constructor & Destructor Documentation

G4Fancy3DNucleus::G4Fancy3DNucleus (  ) 

Definition at line 52 of file G4Fancy3DNucleus.cc.

00053   : myA(0), myZ(0), theNucleons(250), currentNucleon(-1), theDensity(0), 
00054     nucleondistance(0.8*fermi), places(250), momentum(250), fermiM(250),
00055     testSums(250)
00056 {
00057 //G4cout <<"G4Fancy3DNucleus::G4Fancy3DNucleus()"<<G4endl;
00058 }

G4Fancy3DNucleus::~G4Fancy3DNucleus (  ) 

Definition at line 60 of file G4Fancy3DNucleus.cc.

00061 {
00062   if(theDensity) delete theDensity;
00063 }


Member Function Documentation

void G4Fancy3DNucleus::CenterNucleons (  ) 

Definition at line 232 of file G4Fancy3DNucleus.cc.

References DoTranslation().

00233 {
00234         G4ThreeVector   center;
00235         
00236         for (G4int i=0; i<myA; i++ )
00237         {
00238            center+=theNucleons[i].GetPosition();
00239         }   
00240         center /= -myA;
00241         DoTranslation(center);
00242 }

G4double G4Fancy3DNucleus::CoulombBarrier (  )  [virtual]

Implements G4V3DNucleus.

Definition at line 490 of file G4Fancy3DNucleus.cc.

00491 {
00492   G4double coulombBarrier = (1.44/1.14) * MeV * myZ / (1.0 + std::pow(G4double(myA),1./3.));
00493   return coulombBarrier;
00494 }

void G4Fancy3DNucleus::DoLorentzBoost ( const G4ThreeVector theBeta  )  [virtual]

Implements G4V3DNucleus.

Definition at line 205 of file G4Fancy3DNucleus.cc.

00206 {
00207         for (G4int i=0; i<myA; i++){
00208             theNucleons[i].Boost(theBeta);
00209         }
00210 }

void G4Fancy3DNucleus::DoLorentzBoost ( const G4LorentzVector theBoost  )  [virtual]

Implements G4V3DNucleus.

Definition at line 198 of file G4Fancy3DNucleus.cc.

00199 {
00200         for (G4int i=0; i<myA; i++){
00201             theNucleons[i].Boost(theBoost);
00202         }
00203 }

void G4Fancy3DNucleus::DoLorentzContraction ( const G4ThreeVector theBeta  )  [virtual]

Implements G4V3DNucleus.

Definition at line 212 of file G4Fancy3DNucleus.cc.

00213 {
00214         G4double factor=(1-std::sqrt(1-theBeta.mag2()))/theBeta.mag2(); // (gamma-1)/gamma/beta**2
00215         G4ThreeVector rprime;
00216         for (G4int i=0; i< myA; i++) {
00217           rprime = theNucleons[i].GetPosition() - 
00218             factor * (theBeta*theNucleons[i].GetPosition()) * theBeta;  
00219           theNucleons[i].SetPosition(rprime);
00220         }    
00221 }

void G4Fancy3DNucleus::DoLorentzContraction ( const G4LorentzVector theBoost  )  [virtual]

Implements G4V3DNucleus.

Definition at line 223 of file G4Fancy3DNucleus.cc.

00224 {
00225         G4ThreeVector beta = theBoost.vect()/theBoost.e();
00226         // DoLorentzBoost(beta); 
00227         DoLorentzContraction(beta);
00228 }

void G4Fancy3DNucleus::DoTranslation ( const G4ThreeVector theShift  )  [virtual]

Implements G4V3DNucleus.

Definition at line 244 of file G4Fancy3DNucleus.cc.

Referenced by CenterNucleons().

00245 {
00246   G4ThreeVector tempV;
00247   for (G4int i=0; i<myA; i++ )
00248     {
00249       tempV = theNucleons[i].GetPosition() + theShift;
00250       theNucleons[i].SetPosition(tempV);
00251     }   
00252 }

G4int G4Fancy3DNucleus::GetCharge (  )  [inline, virtual]

Implements G4V3DNucleus.

Definition at line 118 of file G4Fancy3DNucleus.hh.

00119 {
00120         return myZ;
00121 }

G4double G4Fancy3DNucleus::GetMass (  )  [virtual]

Implements G4V3DNucleus.

Definition at line 189 of file G4Fancy3DNucleus.cc.

References G4ParticleDefinition::GetPDGMass(), G4Neutron::Neutron(), and G4Proton::Proton().

00190 {
00191         return   myZ*G4Proton::Proton()->GetPDGMass() + 
00192                  (myA-myZ)*G4Neutron::Neutron()->GetPDGMass() -
00193                  BindingEnergy();
00194 }

G4int G4Fancy3DNucleus::GetMassNumber (  )  [inline, virtual]

Implements G4V3DNucleus.

Definition at line 123 of file G4Fancy3DNucleus.hh.

00124 {
00125         return myA;
00126 }

G4Nucleon * G4Fancy3DNucleus::GetNextNucleon (  )  [virtual]

Implements G4V3DNucleus.

Definition at line 124 of file G4Fancy3DNucleus.cc.

Referenced by G4LowEIonFragmentation::ApplyYourself().

00125 {
00126   return ( (currentNucleon>=0 && currentNucleon<myA) ? 
00127            &theNucleons[currentNucleon++] : 0 );
00128 }

const G4VNuclearDensity * G4Fancy3DNucleus::GetNuclearDensity (  )  const [virtual]

Implements G4V3DNucleus.

Definition at line 254 of file G4Fancy3DNucleus.cc.

00255 {
00256         return theDensity;
00257 }

G4double G4Fancy3DNucleus::GetNuclearRadius ( const G4double  maxRelativeDensity  )  [virtual]

Implements G4V3DNucleus.

Definition at line 170 of file G4Fancy3DNucleus.cc.

References G4VNuclearDensity::GetRadius().

00171 {       
00172         return theDensity->GetRadius(maxRelativeDensity);
00173 }

G4double G4Fancy3DNucleus::GetNuclearRadius (  )  [virtual]

Implements G4V3DNucleus.

Definition at line 165 of file G4Fancy3DNucleus.cc.

00166 {
00167         return GetNuclearRadius(0.5);
00168 }

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

Implements G4V3DNucleus.

Definition at line 130 of file G4Fancy3DNucleus.cc.

Referenced by G4MuMinusCapturePrecompound::ApplyYourself().

00131 {
00132   return theNucleons;
00133 }

G4double G4Fancy3DNucleus::GetOuterRadius (  )  [virtual]

Implements G4V3DNucleus.

Definition at line 175 of file G4Fancy3DNucleus.cc.

Referenced by G4LowEIonFragmentation::ApplyYourself().

00176 {
00177         G4double maxradius2=0;
00178         
00179         for (int i=0; i<myA; i++)
00180         {
00181            if ( theNucleons[i].GetPosition().mag2() > maxradius2 )
00182            {
00183                 maxradius2=theNucleons[i].GetPosition().mag2();
00184            }
00185         }
00186         return std::sqrt(maxradius2)+nucleondistance;
00187 }

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

Implements G4V3DNucleus.

Definition at line 76 of file G4Fancy3DNucleus.cc.

References G4FermiMomentum::Init().

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

00077 {
00078 //  G4cout << "G4Fancy3DNucleus::Init(theA, theZ) called"<<G4endl;
00079   currentNucleon=-1;
00080   theNucleons.clear();
00081 
00082   myZ = theZ;
00083   myA= theA;
00084 
00085   theNucleons.resize(myA);      // Pre-loads vector with empty elements
00086   
00087 //  G4cout << "myA, myZ" << myA << ", " << myZ << G4endl;
00088 
00089   if(theDensity) delete theDensity;
00090   if ( myA < 17 ) {
00091      theDensity = new G4NuclearShellModelDensity(myA, myZ);
00092   } else {
00093      theDensity = new G4NuclearFermiDensity(myA, myZ);
00094   }
00095 
00096   theFermi.Init(myA, myZ);
00097   
00098   ChooseNucleons();
00099   
00100   ChoosePositions();
00101   
00102 //  CenterNucleons();   // This would introduce a bias 
00103 
00104   ChooseFermiMomenta();
00105   
00106   G4double Ebinding= BindingEnergy()/myA;
00107   
00108   for (G4int aNucleon=0; aNucleon < myA; aNucleon++)
00109   {
00110         theNucleons[aNucleon].SetBindingEnergy(Ebinding);
00111   }
00112   
00113   
00114   return;
00115 }

void G4Fancy3DNucleus::SortNucleonsDecZ (  )  [virtual]

Implements G4V3DNucleus.

Definition at line 150 of file G4Fancy3DNucleus.cc.

References SortNucleonsIncZ().

00151 {
00152   if (theNucleons.size() < 2 ) return;          // Avoid unnecessary work
00153   SortNucleonsIncZ();
00154 
00155   std::reverse(theNucleons.begin(), theNucleons.end());
00156 }

void G4Fancy3DNucleus::SortNucleonsIncZ (  )  [virtual]

Implements G4V3DNucleus.

Definition at line 142 of file G4Fancy3DNucleus.cc.

References G4Fancy3DNucleusHelperForSortInZ().

Referenced by SortNucleonsDecZ().

00143 {
00144   if (theNucleons.size() < 2 ) return;          // Avoid unnecesary work
00145 
00146   std::sort(theNucleons.begin(), theNucleons.end(),
00147             G4Fancy3DNucleusHelperForSortInZ); 
00148 }

G4bool G4Fancy3DNucleus::StartLoop (  )  [virtual]

Implements G4V3DNucleus.

Definition at line 117 of file G4Fancy3DNucleus.cc.

Referenced by G4LowEIonFragmentation::ApplyYourself().

00118 {
00119         currentNucleon=0;
00120         return (theNucleons.size()>0);
00121 }       


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