Import Geant4 2.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:42:07 +02:00
parent 103bda00c8
commit e7d7193284
3106 changed files with 171117 additions and 90550 deletions
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ExcitedString.hh,v 1.3.2.1.2.1 1999/12/07 20:51:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4ExcitedString.hh,v 1.5 1999/12/15 14:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#ifndef G4ExcitedString_h
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ExcitedStringVector.hh,v 1.1.8.1.2.1 1999/12/07 20:51:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4ExcitedStringVector.hh,v 1.3 1999/12/15 14:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#ifndef G4ExcitedStringVector_h
#define G4ExcitedStringPartonVector_h 1
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Fancy3DNucleus.hh,v 1.4.6.1.2.1 1999/12/07 20:51:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4Fancy3DNucleus.hh,v 1.6 1999/12/15 14:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#ifndef G4Fancy3DNucleus_h
#define G4Fancy3DNucleus_h 1
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FermiMomentum.hh,v 1.1.10.1 1999/12/07 20:51:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4FermiMomentum.hh,v 1.2 1999/12/15 14:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#ifndef G4FermiMomentum_h
#define G4FermiMomentum_h 1
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Fragment.hh,v 1.5.6.1.2.1.2.3 1999/12/14 07:08:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4Fragment.hh,v 1.7 1999/12/15 14:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FragmentVector.hh,v 1.1.10.1 1999/12/07 20:51:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4FragmentVector.hh,v 1.2 1999/12/15 14:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4GeneralPhaseSpaceDecay.hh,v 1.2.4.1 1999/12/07 20:51:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4GeneralPhaseSpaceDecay.hh,v 1.3 1999/12/15 14:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//$Id: G4GeneralPhaseSpaceDecay.hh,v 1.1 1997/05/21
// ----------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4KineticTrack.hh,v 1.1.10.1 1999/12/07 20:51:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4KineticTrack.hh,v 1.3 1999/12/15 14:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id: G4KineticTrack.hh,v 1.0 1998/05/20
// -----------------------------------------------------------------------------
@@ -35,10 +35,6 @@ class G4KineticTrackVector;
G4double G4KineticTrackIntegrandFunction1 (G4double xmass);
G4double G4KineticTrackIntegrandFunction2 (G4double xmass);
class G4KineticTrack : public G4VKineticNucleon
@@ -80,16 +76,17 @@ class G4KineticTrack : public G4VKineticNucleon
G4KineticTrackVector* Decay();
// LB move to public (before was private) LB
G4double* GetActualWidth() const;
private:
G4int GetnChannels() const;
void SetnChannels(const G4int aChannel);
G4double GetActualMass() const;
G4double* GetActualWidth() const;
void SetActualWidth(G4double* anActualWidth);
G4double EvaluateTotalActualWidth();
@@ -101,14 +98,25 @@ class G4KineticTrack : public G4VKineticNucleon
G4double IntegrateCMMomentum(const G4double polemass) const;
G4double IntegrateCMMomentum2() const;
public:
friend G4double G4KineticTrackIntegrandFunction1 (G4double xmass);
G4double BrWig(const G4double Gamma,
const G4double rmass,
const G4double mass) const;
friend G4double G4KineticTrackIntegrandFunction2 (G4double xmass);
friend G4double IntegrandFunction1 (G4double xmass);
friend G4double IntegrandFunction2 (G4double xmass);
friend G4double IntegrandFunction3 (G4double xmass);
friend G4double IntegrandFunction4 (G4double xmass);
// LB new variable created LB
G4int chosench;
private:
@@ -261,11 +269,23 @@ inline G4double G4KineticTrack::SampleResidualLifetime()
inline G4double G4KineticTrack::EvaluateCMMomentum(const G4double m,
const G4double* m_ij) const
{
G4double theCMMomentum = 1 / (2 * m) *
G4double theCMMomentum;
if((m_ij[0]+m_ij[1])<m)
theCMMomentum = 1 / (2 * m) *
sqrt (((m * m) - (m_ij[0] + m_ij[1]) * (m_ij[0] + m_ij[1])) *
((m * m) - (m_ij[0] - m_ij[1]) * (m_ij[0] - m_ij[1])));
((m * m) - (m_ij[0] - m_ij[1]) * (m_ij[0] - m_ij[1])));
else
theCMMomentum=0.;
return theCMMomentum;
}
inline G4double G4KineticTrack::BrWig(const G4double Gamma, const G4double rmass, const G4double mass) const
{
G4double Norm = twopi;
return (Gamma/((mass-rmass)*(mass-rmass)+Gamma*Gamma/4.))/Norm;
}
#endif
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4KineticTrackVector.hh,v 1.1.8.1.2.1 1999/12/07 20:51:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4KineticTrackVector.hh,v 1.3 1999/12/15 14:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// Modified at 8-Oct-1998 by Maxim Komogorov. Methods BoostBeam,Boost,Shift
// were added.
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4NuclearFermiDensity.hh,v 1.1.10.1 1999/12/07 20:51:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4NuclearFermiDensity.hh,v 1.3 2000/05/23 13:41:41 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#ifndef G4NuclearFermiDensity_h
#define G4NuclearFermiDensity_h 1
@@ -27,6 +27,7 @@ class G4NuclearFermiDensity : public G4VNuclearDensity
G4double GetRelativeDensity(G4ThreeVector aPosition);
G4double GetRadius(const G4double maxRelativeDenisty);
G4double GetDeriv(const G4ThreeVector & aPosition);
private:
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4NuclearShellModelDensity.hh,v 1.1.10.1 1999/12/07 20:51:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4NuclearShellModelDensity.hh,v 1.3 2000/05/23 13:41:41 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#ifndef G4NuclearShellModelDensity_h
#define G4NuclearShellModelDensity_h 1
@@ -27,7 +27,8 @@ class G4NuclearShellModelDensity : public G4VNuclearDensity
G4double GetRelativeDensity(G4ThreeVector aPosition);
G4double GetRadius(const G4double maxRelativeDenisty);
G4double GetDeriv(const G4ThreeVector & aPosition);
private:
G4int theA;
G4int theZ;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Nucleon.hh,v 1.2.8.1.2.1 1999/12/08 17:34:44 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4Nucleon.hh,v 1.3 1999/12/15 14:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#ifndef G4Nucleon_h
#define G4Nucleon_h 1
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Parton.hh,v 1.6.8.1.2.2 1999/12/14 07:08:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4Parton.hh,v 1.7 1999/12/15 14:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#ifndef G4Parton_h
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PartonVector.hh,v 1.1.8.1.2.1 1999/12/07 20:51:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PartonVector.hh,v 1.3 1999/12/15 14:52:50 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#ifndef G4PartonVector_h
#define G4PartonVector_h 1
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ExcitedString.cc,v 1.2.4.1 1999/12/07 20:52:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4ExcitedString.cc,v 1.3 1999/12/15 14:52:51 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// ------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Fancy3DNucleus.cc,v 1.4.6.1.2.1.2.1 1999/12/08 17:34:44 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4Fancy3DNucleus.cc,v 1.7 2000/01/27 12:42:13 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -72,7 +72,7 @@ void G4Fancy3DNucleus::Init(G4double theA, G4double theZ)
theRWNucleons.clear();
myZ = theZ;
myZ = G4int(theZ);
myA= ( G4UniformRand()>theA-G4int(theA) ) ? G4int(theA) : G4int(theA)+1;
theNucleons = new G4Nucleon[myA];
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FermiMomentum.cc,v 1.1.10.1 1999/12/07 20:52:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4FermiMomentum.cc,v 1.2 1999/12/15 14:52:51 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#include "G4FermiMomentum.hh"
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Fragment.cc,v 1.4.8.1.2.3 1999/12/09 17:45:00 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4Fragment.cc,v 1.6 1999/12/15 17:51:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4GeneralPhaseSpaceDecay.cc,v 1.1.10.1.2.1 1999/12/08 17:34:44 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4GeneralPhaseSpaceDecay.cc,v 1.2 1999/12/15 14:52:51 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id: G4GeneralSpaceDecay.cc,v 1.0 1998/05/21
// ----------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4KineticTrack.cc,v 1.3.8.1.2.1 1999/12/08 17:34:44 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4KineticTrack.cc,v 1.8 2000/06/09 13:59:56 jwellisc Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id: G4KineticTrack.cc,v 1.0 1998/05/20
// -----------------------------------------------------------------------------
@@ -33,6 +33,12 @@
#include "G4DecayProducts.hh"
#include "G4LorentzRotation.hh"
//
// Some static clobal for integration
//
static G4double G4KineticTrack_Gmass, G4KineticTrack_Gmass1, G4KineticTrack_Gmass2,G4KineticTrack_Ggamma1,G4KineticTrack_Ggamma2,G4KineticTrack_xmass1;
//
// Default constructor
//
@@ -96,7 +102,6 @@ G4KineticTrack::G4KineticTrack(const G4KineticTrack &right)
}
//
// By argument constructor
//
@@ -150,16 +155,18 @@ G4KineticTrack::G4KineticTrack(G4ParticleDefinition* aDefinition,
if(nChannels!=0) theActualWidth = new G4double[nChannels];
// cout << " ****CONSTR*** ActualMass ******* " << theActualMass << G4endl;
G4int index;
for (index = nChannels - 1; index >= 0; index--)
{
G4VDecayChannel* theChannel = theDecayTable->GetDecayChannel(index);
G4int nDaughters = theChannel->GetNumberOfDaughters();
G4double theMotherWidth;
if (nDaughters == 2)
{
G4double thePoleMass = theDefinition->GetPDGMass();
G4double thePoleWidth = theChannel->GetBR();
G4double thePoleMass = theDefinition->GetPDGMass();
theMotherWidth = theDefinition->GetPDGWidth();
G4double thePoleWidth = theChannel->GetBR()*theMotherWidth;
G4ParticleDefinition* aDaughter;
theDaughterMass = new G4double[nDaughters];
theDaughterWidth = new G4double[nDaughters];
@@ -183,30 +190,59 @@ G4KineticTrack::G4KineticTrack(G4ParticleDefinition* aDefinition,
if ( !theDaughterIsShortLived[0] && !theDaughterIsShortLived[1] )
{
// G4cout << G4endl << "Both the " << nDaughters <<
// " decay products are stable!";
// G4cout << G4endl << "Both the " << nDaughters <<
// " decay products are stable!";
// cout << " LB: Both decay products STABLE !" << G4endl;
// cout << " parent: " << theChannel->GetParentName() << G4endl;
// cout << " particle1: " << theChannel->GetDaughterName(0) << G4endl;
// cout << " particle2: " << theChannel->GetDaughterName(1) << G4endl;
theActualMom = EvaluateCMMomentum(theActualMass,
theDaughterMass);
thePoleMom = EvaluateCMMomentum(thePoleMass,
theDaughterMass);
// cout << G4endl;
// cout << " LB: ActualMass/DaughterMass " << theActualMass << " " << theDaughterMass << G4endl;
// cout << " LB: ActualMom " << theActualMom << G4endl;
// cout << " LB: PoleMom " << thePoleMom << G4endl;
// cout << G4endl;
}
else if ( !theDaughterIsShortLived[0] && theDaughterIsShortLived[1] )
{
// G4cout << G4endl << "Only the first of the " << nDaughters <<
// " decay products is stable!";
// G4cout << G4endl << "Only the first of the " << nDaughters <<" decay products is stable!";
// cout << " LB: only the first decay product is STABLE !" << G4endl;
// cout << " parent: " << theChannel->GetParentName() << G4endl;
// cout << " particle1: " << theChannel->GetDaughterName(0) << G4endl;
// cout << " particle2: " << theChannel->GetDaughterName(1) << G4endl;
// global variable definition
G4KineticTrack_Gmass = theActualMass;
G4KineticTrack_Gmass1 = theDaughterMass[0];
G4KineticTrack_Gmass2 = theDaughterMass[1];
G4KineticTrack_Ggamma2 = theDaughterWidth[1];
theActualMom = IntegrateCMMomentum();
G4KineticTrack_Gmass = thePoleMass;
thePoleMom = IntegrateCMMomentum(thePoleMass);
// cout << " LB Parent Mass = " << G4KineticTrack_Gmass << G4endl;
// cout << " LB Actual Mass = " << theActualMass << G4endl;
// cout << " LB Daughter1 Mass = " << G4KineticTrack_Gmass1 << G4endl;
// cout << " LB Daughter2 Mass = " << G4KineticTrack_Gmass2 << G4endl;
// cout << " The Actual Momentum = " << theActualMom << G4endl;
// cout << " The Pole Momentum = " << thePoleMom << G4endl;
// cout << G4endl;
}
else if ( theDaughterIsShortLived[0] && !theDaughterIsShortLived[1] )
{
// G4cout << G4endl << "Only the second of the " << nDaughters <<
// " decay products is stable!";
// " decay products is stable!";
// cout << " LB: only the second decay product is STABLE !" << G4endl;
// cout << " parent: " << theChannel->GetParentName() << G4endl;
// cout << " particle1: " << theChannel->GetDaughterName(0) << G4endl;
// cout << " particle2: " << theChannel->GetDaughterName(1) << G4endl;
//
// Swap the content of the theDaughterMass and theDaughterWidth arrays!!!
@@ -215,8 +251,22 @@ G4KineticTrack::G4KineticTrack(G4ParticleDefinition* aDefinition,
G4SwapObj(theDaughterMass, theDaughterMass + 1);
G4SwapObj(theDaughterWidth, theDaughterWidth + 1);
// global variable definition
G4KineticTrack_Gmass = theActualMass;
G4KineticTrack_Gmass1 = theDaughterMass[0];
G4KineticTrack_Gmass2 = theDaughterMass[1];
G4KineticTrack_Ggamma2 = theDaughterWidth[1];
theActualMom = IntegrateCMMomentum();
G4KineticTrack_Gmass = thePoleMass;
thePoleMom = IntegrateCMMomentum(thePoleMass);
// cout << " LB Parent Mass = " << G4KineticTrack_Gmass << G4endl;
// cout << " LB Actual Mass = " << theActualMass << G4endl;
// cout << " LB Daughter1 Mass = " << G4KineticTrack_Gmass1 << G4endl;
// cout << " LB Daughter2 Mass = " << G4KineticTrack_Gmass2 << G4endl;
// cout << " The Actual Momentum = " << theActualMom << G4endl;
// cout << " The Pole Momentum = " << thePoleMom << G4endl;
// cout << G4endl;
}
else if ( theDaughterIsShortLived[0] && theDaughterIsShortLived[1] )
@@ -224,14 +274,33 @@ G4KineticTrack::G4KineticTrack(G4ParticleDefinition* aDefinition,
// G4cout << G4endl << "Both the " << nDaughters <<
// " decay products are resonances!";
// cout << " LB: both decay products are RESONANCES !" << G4endl;
// cout << " parent: " << theChannel->GetParentName() << G4endl;
// cout << " particle1: " << theChannel->GetDaughterName(0) << G4endl;
// cout << " particle2: " << theChannel->GetDaughterName(1) << G4endl;
/* @@@@@@ code has to be implemented */
// global variable definition
G4KineticTrack_Gmass = theActualMass;
G4KineticTrack_Gmass1 = theDaughterMass[0];
G4KineticTrack_Ggamma1 = theDaughterWidth[0];
G4KineticTrack_Gmass2 = theDaughterMass[1];
G4KineticTrack_Ggamma2 = theDaughterWidth[1];
theActualMom = IntegrateCMMomentum2();
G4KineticTrack_Gmass = thePoleMass;
thePoleMom = IntegrateCMMomentum2();
// cout << " LB Parent Mass = " << G4KineticTrack_Gmass << G4endl;
// cout << " LB Daughter1 Mass = " << G4KineticTrack_Gmass1 << G4endl;
// cout << " LB Daughter2 Mass = " << G4KineticTrack_Gmass2 << G4endl;
// cout << " The Actual Momentum = " << theActualMom << G4endl;
// cout << " The Pole Momentum = " << thePoleMom << G4endl;
// cout << G4endl;
}
G4double theMassRatio = thePoleMass / theActualMass;
G4double theMomRatio = theActualMom / thePoleMom;
G4int l = 1; /* code has to be made more general */
G4int l = 0; /* code has to be made more general */
//
// Evaluate tha "actual widths"
@@ -239,7 +308,12 @@ G4KineticTrack::G4KineticTrack(G4ParticleDefinition* aDefinition,
theActualWidth[index] = thePoleWidth * theMassRatio *
pow(theMomRatio, (2 * l + 1)) *
(1.2 / (0.2 + pow(theMomRatio, (2 * l))));
(1.2 / (1+ 0.2*pow(theMomRatio, (2 * l))));
// cout << " LB The Mass Ratio = " << theMassRatio << G4endl;
// cout << " LB The Mom. Ratio = " << theMomRatio << G4endl;
// cout << " LB The Pole Width = " << thePoleWidth << G4endl;
// cout << " LB The Actual Width = " << theActualWidth[index] << "index: " << index << G4endl;
delete [] theDaughterMass;
theDaughterMass = NULL;
@@ -248,7 +322,8 @@ G4KineticTrack::G4KineticTrack(G4ParticleDefinition* aDefinition,
}
else
{
theActualWidth[index] = theChannel->GetBR();
theMotherWidth = theDefinition->GetPDGWidth();
theActualWidth[index] = theChannel->GetBR()*theMotherWidth;
}
}
@@ -291,12 +366,12 @@ const G4KineticTrack& G4KineticTrack::operator=(const G4KineticTrack& right)
thePosition = right.GetPosition();
the4Momentum = right.Get4Momentum();
if (theActualWidth != NULL) delete [] theActualWidth;
nChannels = right.GetnChannels();
theActualWidth = new G4double[nChannels];
for (i = 0; i < nChannels; i++)
{
theActualWidth[i] = right.theActualWidth[i];
}
nChannels = right.GetnChannels();
}
return *this;
}
@@ -322,6 +397,10 @@ G4KineticTrackVector* G4KineticTrack::Decay()
//
// Select a possible decay channel
//
// G4int index1;
// for (index1 = nChannels - 1; index1 >= 0; index1--)
// cout << "DECAY Actual Width IND/ActualW " << index1 << " " << theActualWidth[index1] << G4endl;
// cout << "DECAY Actual Mass " << theActualMass << G4endl;
G4double theTotalActualWidth = this->EvaluateTotalActualWidth();
if (theTotalActualWidth !=0)
@@ -333,7 +412,10 @@ G4KineticTrackVector* G4KineticTrack::Decay()
{
theSumActualWidth += theActualWidth[index];
theCumActualWidth[index] = theSumActualWidth;
}
// cout << "DECAY Cum. Width " << index << " " << theCumActualWidth[index] << G4endl;
}
// cout << "DECAY Total Width " << theSumActualWidth << G4endl;
// cout << "DECAY Total Width " << theTotalActualWidth << G4endl;
G4double r = theTotalActualWidth * G4UniformRand();
G4ParticleDefinition* theDefinition = this->GetDefinition();
G4DecayTable* theDecayTable = theDefinition->GetDecayTable();
@@ -343,6 +425,8 @@ G4KineticTrackVector* G4KineticTrack::Decay()
if (r < theCumActualWidth[index])
{
theDecayChannel = theDecayTable->GetDecayChannel(index);
// cout << "DECAY SELECTED CHANNEL" << index << G4endl;
chosench=index;
break;
}
}
@@ -350,6 +434,8 @@ G4KineticTrackVector* G4KineticTrack::Decay()
G4String theParentName = theDecayChannel->GetParentName();
G4double theParentMass = this->GetActualMass();
G4double theBR = theActualWidth[index];
// cout << "**BR*** DECAYNEW " << theBR << G4endl;
// cout << "**PMass*** DECAYNEW " << theParentMass << G4endl;
G4int theNumberOfDaughters = theDecayChannel->GetNumberOfDaughters();
G4String theDaughtersName1 = "";
G4String theDaughtersName2 = "";
@@ -419,67 +505,141 @@ G4KineticTrackVector* G4KineticTrack::Decay()
}
}
G4double G4KineticTrackIntegrandFunction1(G4double xmass)
G4double G4KineticTrack_IntegrandFunction1(G4double xmass)
{
G4double result = 1.0;
// G4double mass = theActualMass; /* the actual mass value */
// G4double mass1 = theDaughterMass[0];
// G4double mass2 = theDaughterMass[1];
// G4double gamma2 = theDaughtherWidth[1];
// result = (mass1 / (2 * mass)) *
// sqrt(((mass * mass) - (mass1 + xmass) * (mass1 + xmass)) *
// ((mass * mass) - (mass1 - xmass) * (mass1 - xmass))) *
// twopi * (gamma2 / ((mass1 - xmass) * (mass2 - xmass) + ((gamma2 * gamma2) / 4)));
// G4double mass = theActualMass; /* the actual mass value */
G4double mass = G4KineticTrack_Gmass; /* the actual mass value */
// G4double mass1 = theDaughterMass[0];
G4double mass1 = G4KineticTrack_Gmass1;
// G4double mass2 = theDaughterMass[1];
G4double mass2 = G4KineticTrack_Gmass2;
// G4double gamma2 = theDaughterWidth[1];
G4double gamma2 = G4KineticTrack_Ggamma2;
G4KineticTrack wei;
G4double result = (1. / (2 * mass)) *
sqrt(((mass * mass) - (mass1 + xmass) * (mass1 + xmass)) *
((mass * mass) - (mass1 - xmass) * (mass1 - xmass))) *
wei.BrWig(gamma2, mass2, xmass);
return result;
}
G4double G4KineticTrackIntegrandFunction2(G4double xmass)
G4double G4KineticTrack_IntegrandFunction2(G4double xmass)
{
G4double result = 2.0;
// G4double mass = theDefinition->GetPDGMass(); /* the pole mass value */
// G4double mass1 = theDaughterMass[0];
// G4double mass2 = theDaughterMass[1];
// G4double gamma2 = theDaughtherWidth[1];
// result = (mass1 / (2 * mass)) *
// sqrt(((mass * mass) - (mass1 + xmass) * (mass1 + xmass)) *
// ((mass * mass) - (mass1 - xmass) * (mass1 - xmass))) *
// twopi * (gamma2 / ((mass1 - xmass) * (mass2 - xmass) + ((gamma2 * gamma2) / 4)));
//
// G4double mass = theDefinition->GetPDGMass(); /* the pole mass value */
G4double mass = G4KineticTrack_Gmass; /* the actual mass value */
// G4double mass1 = theDaughterMass[0];
G4double mass1 = G4KineticTrack_Gmass1;
// G4double mass2 = theDaughterMass[1];
G4double mass2 = G4KineticTrack_Gmass2;
// G4double gamma2 = theDaughterWidth[1];
G4double gamma2 = G4KineticTrack_Ggamma2;
G4KineticTrack wei;
G4double result = (1. / (2 * mass)) *
sqrt(((mass * mass) - (mass1 + xmass) * (mass1 + xmass)) *
((mass * mass) - (mass1 - xmass) * (mass1 - xmass))) *
wei.BrWig(gamma2, mass2, xmass);
return result;
}
G4double G4KineticTrack_IntegrandFunction3(G4double xmass)
{
G4double mass = G4KineticTrack_Gmass; /* the actual mass value */
G4double mass1 = G4KineticTrack_Gmass1;
G4double gamma1 = G4KineticTrack_Ggamma1;
G4double mass2 = G4KineticTrack_Gmass2;
G4double gamma2 = G4KineticTrack_Ggamma2;
G4KineticTrack wei;
G4double result = (1. / (2 * mass)) *
sqrt(((mass * mass) - (G4KineticTrack_xmass1 + xmass) * (G4KineticTrack_xmass1 + xmass)) *
((mass * mass) - (G4KineticTrack_xmass1 - xmass) * (G4KineticTrack_xmass1 - xmass))) *
wei.BrWig(gamma2, mass2, xmass);
return result;
}
G4double G4KineticTrack_IntegrandFunction4(G4double xmass)
{
G4double mass = G4KineticTrack_Gmass;
G4double mass1 = G4KineticTrack_Gmass1;
G4double gamma1 = G4KineticTrack_Ggamma1;
G4double mass2 = G4KineticTrack_Gmass2;
G4double gamma2 = G4KineticTrack_Ggamma2;
G4KineticTrack wei;
G4double G4KineticTrack_xmass1=xmass;
G4double theLowerLimit = 0.0;
G4double theUpperLimit = mass - xmass;
G4int nIterations = 100;
G4SimpleIntegration theIntegrandMomentum(&G4KineticTrack_IntegrandFunction3);
G4double result = wei.BrWig(gamma1, mass1, xmass)*
theIntegrandMomentum.Simpson(theLowerLimit,
theUpperLimit,
nIterations);
return result;
}
G4double G4KineticTrack::IntegrateCMMomentum() const
{
G4double theLowerLimit = 0.0;
G4double theUpperLimit = theActualMass - theDaughterMass[0];
G4int nIterations = 100;
G4SimpleIntegration theIntegrandMomentum(&G4KineticTrackIntegrandFunction1);
G4double theIntegralOverMass2 = theIntegrandMomentum.Simpson(theLowerLimit,
G4SimpleIntegration theIntegrandMomentum(&G4KineticTrack_IntegrandFunction1);
G4double theIntegralOverMass2;
if(theUpperLimit>0.)
theIntegralOverMass2 = theIntegrandMomentum.Simpson(theLowerLimit,
theUpperLimit,
nIterations);
else
theIntegralOverMass2 = 0.;
// G4cout << G4endl << "Inside IntegrateCMMomentum (actual mass case): ";
// G4cout << G4endl << " Integration result = " << theIntegralOverMass2;
// G4cout << G4endl << "Inside IntegrateCMMomentum (actual mass case): ";
// G4cout << G4endl << " Integration result = " << theIntegralOverMass2 << G4endl ;
return theIntegralOverMass2;
}
G4double G4KineticTrack::IntegrateCMMomentum(const G4double polemass) const
{
G4double theLowerLimit = 0.0;
G4double theUpperLimit = theActualMass - theDaughterMass[0];
G4double theUpperLimit = polemass - theDaughterMass[0];
G4int nIterations = 100;
G4SimpleIntegration theIntegrandMomentum(&G4KineticTrackIntegrandFunction2);
G4double theIntegralOverMass2 = theIntegrandMomentum.Simpson(theLowerLimit,
G4SimpleIntegration theIntegrandMomentum(&G4KineticTrack_IntegrandFunction1);
G4double theIntegralOverMass2;
if(theUpperLimit>0.)
theIntegralOverMass2 = theIntegrandMomentum.Simpson(theLowerLimit,
theUpperLimit,
nIterations);
nIterations);
else
theIntegralOverMass2 = 0.;
// G4cout << G4endl << "Inside IntegrateCMMomentum (pole mass case): ";
// G4cout << G4endl << " Integration result = " << theIntegralOverMass2;
// G4cout << G4endl << "Inside IntegrateCMMomentum (pole mass case): ";
// G4cout << G4endl << " Integration result = " << theIntegralOverMass2 << G4endl;
// G4cout << G4endl << " Lower / upper limit " << theLowerLimit << " / " << theUpperLimit << G4endl;
return theIntegralOverMass2;
}
G4double G4KineticTrack::IntegrateCMMomentum2() const
{
G4double theLowerLimit = 0.0;
G4double theUpperLimit = theActualMass;
G4int nIterations = 100;
G4SimpleIntegration theIntegrandMomentum(&G4KineticTrack_IntegrandFunction4);
G4double theIntegralOverMass2;
if(theUpperLimit>0.)
theIntegralOverMass2 = theIntegrandMomentum.Simpson(theLowerLimit,
theUpperLimit,
nIterations);
else
theIntegralOverMass2 = 0.;
// G4cout << G4endl << "Inside IntegrateCMMomentum 2: ";
// G4cout << G4endl << " Integration result = " << theIntegralOverMass2 << G4endl;
return theIntegralOverMass2;
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4NuclearFermiDensity.cc,v 1.1.10.1 1999/12/07 20:52:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4NuclearFermiDensity.cc,v 1.6 2000/05/23 13:41:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#include "G4NuclearFermiDensity.hh"
@@ -14,11 +14,12 @@
G4NuclearFermiDensity::G4NuclearFermiDensity(G4double anA, G4double aZ)
: a(0.545 * fermi)
{
const G4double r0=1.14*fermi;
theA = anA;
theZ = aZ;
// const G4double r0=1.14*fermi;
const G4double r0=1.16 * ( 1. - 1.16 * pow(anA, -2./3.)) * fermi;
theA = G4int(anA);
theZ = G4int(aZ);
theR= r0 * pow(theA, 1./3. );
Setrho0(3./4./pi/pow(r0,3.)/theA * ( 1. + sqr(a/theR)*pi2 ));
Setrho0(3./ (4. * pi * pow(r0,3.) * theA * ( 1. + sqr(a/theR)*pi2 )));
}
G4NuclearFermiDensity::~G4NuclearFermiDensity() {}
@@ -33,4 +34,8 @@ G4double G4NuclearFermiDensity::GetRadius(const G4double maxRelativeDensity)
return (maxRelativeDensity>0 && maxRelativeDensity <= 1 ) ?
(theR + a*log((1-maxRelativeDensity+exp(-1*theR/a))/maxRelativeDensity)) : DBL_MAX;
}
G4double G4NuclearFermiDensity::GetDeriv(const G4ThreeVector & aPosition)
{
return -exp((aPosition.mag()-theR)/a) * sqr(GetDensity(aPosition)) / (a*Getrho0());
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4NuclearShellModelDensity.cc,v 1.1.10.1 1999/12/07 20:52:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4NuclearShellModelDensity.cc,v 1.4 2000/05/23 13:41:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#include "G4NuclearShellModelDensity.hh"
@@ -14,8 +14,8 @@
G4NuclearShellModelDensity::G4NuclearShellModelDensity(G4double anA, G4double aZ)
{
const G4double r0sq=0.8133*fermi*fermi;
theA = anA;
theZ = aZ;
theA = G4int(anA);
theZ = G4int(aZ);
theRsquare= r0sq * pow(theA, 2./3. );
Setrho0(pow(1./(pi*theRsquare),3./2.));
}
@@ -34,3 +34,7 @@ G4double G4NuclearShellModelDensity::GetRadius(const G4double maxRelativeDensity
sqrt(theRsquare * log(1/maxRelativeDensity) ) : DBL_MAX;
}
G4double G4NuclearShellModelDensity::GetDeriv(const G4ThreeVector & aPosition)
{
return -2* aPosition.mag() / theRsquare * GetDensity(aPosition);
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Nucleon.cc,v 1.2.8.1.2.3 1999/12/14 07:08:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4Nucleon.cc,v 1.3 1999/12/15 14:52:51 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#include "G4Nucleon.hh"
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Parton.cc,v 1.3.8.1.2.2 1999/12/09 17:44:08 gcosmo Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4Parton.cc,v 1.5 1999/12/15 17:51:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file