Import Geant4 0.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:09:25 +02:00
parent b97f8d0df7
commit aaa409b6ee
2922 changed files with 55107 additions and 81674 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 2.5 1998/11/06 18:03:59 hpw Exp $
# $Id: GNUmakefile,v 1.1 1999/01/07 16:11:37 gunter Exp $
# --------------------------------------------------------------
# GNUmakefile for hadronic models library. G.Folger 10-Dec-97
# --------------------------------------------------------------
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 2.3 1998/11/06 18:03:59 hpw Exp $
# $Id: GNUmakefile,v 1.1 1999/01/07 16:11:37 gunter Exp $
# ----------------------------------------------------------------
# GNUmakefile for hadronic processes library. G.Folger 10-Dec-97.
# ----------------------------------------------------------------
@@ -1,21 +0,0 @@
$Id: History,v 2.0 1998/07/02 16:22:33 gunter Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Hadronics/models/Generator History file
---------------------------------------
This file should be used by G4 developers to briefly summarize all major
modifications introduced in the code and keep track of all tags.
It DOES NOT substitute the CVS log-message one should put at every
committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
GF 12-May-98: Add more functions to G4Fancy3DNucleus:
doLorentzContraction with algorithm given by Nicolai
give access to all nucleons with a RWTPtrOrederedVector
Required a mod to G4Nucleon, ie. add operator ==
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.1 1998/08/22 09:07:55 hpw Exp $
# $Id: GNUmakefile,v 1.2 1999/06/05 13:08:11 stesting Exp $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
@@ -37,3 +37,13 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
include $(G4INSTALL)/config/common.gmk
CXXFLAGS_WITHOUT_O := $(filter-out -O% , $(CXXFLAGS))
CXXFLAGS_WITHOUT_O := $(filter-out +O% , $(CXXFLAGS_WITHOUT_O))
ifeq ($(G4SYSTEM),HP-aCC)
COMPILER := $(shell aCC -V 2>&1)
ifeq ($(COMPILER), aCC: HP ANSI C++ B3910B A.01.15)
$(G4TMP)/$(G4SYSTEM)/$(name)/G4Evaporation.o: src/G4Evaporation.cc
$(CXX) $(CXXFLAGS_WITHOUT_O) $(CPPFLAGS) -c $(OUT_OBJ)$@ src/G4Evaporation.cc
endif
endif
@@ -57,8 +57,8 @@ public:
private:
G4int _Z;
G4int _A;
G4int _nucleusZ;
G4int _nucleusA;
G4NuclearLevelManager _levelManager;
@@ -21,6 +21,9 @@
//
// Modifications:
//
// 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
// Added creation time evaluation for products of evaporation
//
// -------------------------------------------------------------------
//
// Header file for G4ContinuumGammaTransition
@@ -40,23 +43,28 @@ public:
// Constructor
G4ContinuumGammaTransition(const G4NuclearLevelManager& levelManager,
G4int Z, G4int A, G4double excitation, G4int verbose);
G4int Z, G4int A, G4double excitation,
G4int verbose);
// Destructor
~G4ContinuumGammaTransition();
// Functions
virtual G4double GammaEnergy();
virtual G4double GetEnergyTo() const;
//-- virtual G4double GammaEnergy();
//-- virtual G4double GetEnergyTo() const;
virtual void SetEnergyFrom(const G4double energy);
virtual G4double GetGammaEnergy();
virtual G4double GetGammaCreationTime();
virtual void SelectGamma();
private:
G4double E1Pdf(G4double energy);
G4double GammaTime();
G4int _A;
G4int _Z;
G4int _nucleusA;
G4int _nucleusZ;
G4double _eMin;
G4double _eMax;
G4double _maxLevelE;
@@ -64,6 +72,7 @@ private:
G4double _excitation;
G4double _eGamma;
G4NuclearLevelManager _levelManager;
G4double _gammaCreationTime;
};
@@ -52,8 +52,8 @@ public:
virtual G4bool CanDoTransition() const;
private:
G4int _Z;
G4int _A;
G4int _nucleusZ;
G4int _nucleusA;
G4double _tolerance;
G4NuclearLevelManager _levelManager;
};
@@ -20,6 +20,9 @@
//
// Modifications:
//
// 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
// Added creation time evaluation for products of evaporation
//
// -------------------------------------------------------------------
#ifndef G4DiscreteGammaTransition_hh
@@ -43,14 +46,18 @@ public:
public:
virtual G4double GammaEnergy();
virtual G4double GetEnergyTo() const;
//-- virtual G4double GammaEnergy();
//-- virtual G4double GetEnergyTo() const;
virtual void SetEnergyFrom(const G4double energy);
virtual G4double GetGammaEnergy();
virtual G4double GetGammaCreationTime();
virtual void SelectGamma();
private:
G4double _gammaEnergy;
G4NuclearLevel _level;
G4double _excitation;
G4double _gammaCreationTime;
};
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4DummyMF.hh,v 1.1 1998/08/22 08:53:34 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4DummyMF.hh,v 1.1 1999/01/07 16:11:39 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// 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: G4ExcitationHandler.hh,v 1.6 1998/12/12 12:34:57 larazb Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4ExcitationHandler.hh,v 1.2 1999/04/12 15:45:24 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
@@ -29,7 +29,8 @@
#include "G4VPhotonEvaporation.hh"
#include "G4Fragment.hh"
#include "G4DynamicParticle.hh"
#include "G4DynamicParticleVector.hh"
#include "G4ReactionProductVector.hh"
#include "G4ReactionProduct.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
// needed for default models
@@ -54,7 +55,7 @@ private:
public:
G4DynamicParticleVector * BreakItUp(const G4Fragment &theInitialState) const;
G4ReactionProductVector * BreakItUp(const G4Fragment &theInitialState) const;
void SetEvaporation(G4VEvaporation *const value);
@@ -71,7 +72,7 @@ public:
private:
G4DynamicParticleVector * Transform(G4FragmentVector * theFragmentVector) const;
G4ReactionProductVector * Transform(G4FragmentVector * theFragmentVector) const;
const G4VEvaporation * GetEvaporation() const;
@@ -69,6 +69,8 @@ private:
// Kappa = V/V_0 it is used in calculation of Coulomb energy
static const G4double Kappa;
// Nuclear radius r0 (is a model parameter)
static const G4double r0;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FissionBarrier.hh,v 1.1 1998/10/15 07:52:46 larazb Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4FissionBarrier.hh,v 1.1 1999/01/07 16:11:43 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MultiFragmentation.hh,v 1.1 1998/08/22 08:53:36 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4MultiFragmentation.hh,v 1.1 1999/01/07 16:11:44 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
@@ -20,6 +20,10 @@
//
// Modifications:
//
// 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
// Added half-life, angular momentum, parity, emissioni type
// reading from experimental data.
//
// -------------------------------------------------------------------
#ifndef G4NUCLEARLEVEL_HH
@@ -34,7 +38,9 @@ class G4NuclearLevel
public:
G4NuclearLevel(const G4double energy, const G4DataVector& eGamma, const G4DataVector& wGamma);
G4NuclearLevel(const G4double energy, const G4double halfLife,
const G4double angularMomentum, const G4DataVector& eGamma,
const G4DataVector& wGamma, const G4DataVector& polarities);
G4NuclearLevel() {};
~G4NuclearLevel();
@@ -47,8 +53,14 @@ public:
const G4DataVector& GammaCumulativeProbabilities() const;
const G4DataVector& GammaPolarities() const;
G4double Energy() const;
G4double AngularMomentum() const;
G4double HalfLife() const;
G4int NumberOfGammas() const;
void PrintAll() const;
@@ -71,7 +83,10 @@ private:
G4DataVector _weights;
G4DataVector _prob;
G4DataVector _cumProb;
G4DataVector _polarities;
G4double _energy;
G4double _halfLife;
G4double _angularMomentum;
G4int _nGammas;
};
@@ -20,6 +20,10 @@
//
// Modifications:
//
// 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
// Added half-life, angular momentum, parity, emissioni type
// reading from experimental data.
//
// -------------------------------------------------------------------
#ifndef G4NUCLEARLEVELMANAGER_HH
@@ -73,14 +77,16 @@ private:
void MakeLevels();
G4int _A;
G4int _Z;
G4int _nucleusA;
G4int _nucleusZ;
G4PtrLevelVector* _levels;
G4double _levelEnergy;
G4double _gammaEnergy;
G4double _probability;
G4double _polarity;
G4double _halfLife;
G4double _angularMomentum;
};
#endif
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VFissionBarrier.hh,v 1.2 1998/11/13 17:38:59 larazb Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VFissionBarrier.hh,v 1.1 1999/01/07 16:11:48 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
@@ -20,6 +20,9 @@
//
// Modifications:
//
// 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
// Added creation time evaluation for products of evaporation
//
// -------------------------------------------------------------------
#ifndef G4VGAMMADEEXCITATION_HH
@@ -61,7 +64,7 @@ protected:
void Initialize();
void UpdateNucleus(const G4Fragment* gamma);
void Update(const G4Fragment* gamma);
void Update();
G4VGammaTransition* _transition; // Owned pointer
G4int _verbose;
@@ -20,6 +20,9 @@
//
// Modifications:
//
// 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
// Added creation time evaluation for products of evaporation
//
// -------------------------------------------------------------------
#ifndef G4VGAMMATRANSITION_HH
@@ -35,9 +38,13 @@ public:
virtual ~G4VGammaTransition() {};
virtual G4double GammaEnergy() = 0;
virtual void SelectGamma() = 0;
virtual G4double GetGammaEnergy() = 0;
virtual G4double GetGammaCreationTime() = 0;
virtual G4double GetEnergyTo() const = 0;
//-- virtual G4double GammaEnergy() = 0;
//-- virtual G4double GetEnergyTo() const = 0;
virtual void SetEnergyFrom(const G4double energy) = 0;
@@ -67,7 +67,7 @@ G4FragmentVector * G4Be8FermiFragment::GetFragment(const G4LorentzVector & aMome
// 2.0*G4NucleiPropertiesTable::GetMassExcess(2,4); // alphas
G4double AvalKineticE = sqrt(aMomentum.e()*aMomentum.e() -
aMomentum.vect().mag2()) -// Be8
2.0*AtomNum[0]; // alphas
2.0*Masses[0]; // alphas
RWTPtrOrderedVector<G4LorentzVector> * SubFragsMomentum =
@@ -40,7 +40,7 @@
// Constructor
//
G4ContinuumGammaDeexcitation::G4ContinuumGammaDeexcitation(): _Z(0), _A(0)
G4ContinuumGammaDeexcitation::G4ContinuumGammaDeexcitation(): _nucleusZ(0), _nucleusA(0)
{ }
@@ -55,11 +55,11 @@ G4VGammaTransition* G4ContinuumGammaDeexcitation::CreateTransition()
G4int A = nucleus.GetA();
G4double excitation = nucleus.GetExcitationEnergy();
if (_A != A || _Z != Z)
if (_nucleusA != A || _nucleusZ != Z)
{
_levelManager.SetNucleus(Z,A);
_A = A;
_Z = Z;
_nucleusA = A;
_nucleusZ = Z;
}
if (_verbose > 1)
@@ -21,6 +21,9 @@
//
// Modifications:
//
// 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
// Added creation time evaluation for products of evaporation
//
// -------------------------------------------------------------------
//
// Class G4ContinuumGammaTransition.cc
@@ -34,25 +37,28 @@
// Constructor
//
G4ContinuumGammaTransition::G4ContinuumGammaTransition(const G4NuclearLevelManager& levelManager,
G4int Z, G4int A, G4double excitation,
G4int verbose):
_Z(Z), _A(A), _excitation(excitation), _levelManager(levelManager)
G4ContinuumGammaTransition::G4ContinuumGammaTransition(
const G4NuclearLevelManager& levelManager,
G4int Z, G4int A,
G4double excitation,
G4int verbose):
_nucleusZ(Z), _nucleusA(A), _excitation(excitation), _levelManager(levelManager)
{
const G4PtrLevelVector* levels = levelManager.GetLevels();
G4double eTolerance = 0.;
if (levels != 0)
{
G4int lastButOne = levelManager.NumberOfLevels() - 2;
if (lastButOne >= 0)
{
G4int lastButOne = levelManager.NumberOfLevels() - 2;
if (lastButOne >= 0)
{
eTolerance = levelManager.MaxLevelEnergy() - levels->at(lastButOne)->Energy();
if (eTolerance < 0.) eTolerance = 0.;
}
eTolerance = levelManager.MaxLevelEnergy() - levels->at(lastButOne)->Energy();
if (eTolerance < 0.) eTolerance = 0.;
}
}
_verbose = verbose;
_eGamma = 0.;
_gammaCreationTime = 0.;
_maxLevelE = levelManager.MaxLevelEnergy() + eTolerance;
_minLevelE = levelManager.MinLevelEnergy();
@@ -60,7 +66,7 @@ G4ContinuumGammaTransition::G4ContinuumGammaTransition(const G4NuclearLevelManag
// Energy range for photon generation; upper limit is defined 5*Gamma(GDR) from GDR peak
_eMin = 0.001 * MeV;
// Giant Dipole Resonance energy
G4double energyGDR = (40.3 / pow(_A,0.2) ) * MeV;
G4double energyGDR = (40.3 / pow(_nucleusA,0.2) ) * MeV;
// Giant Dipole Resonance width
G4double widthGDR = 0.30 * energyGDR;
// Extend
@@ -80,7 +86,7 @@ G4ContinuumGammaTransition::~G4ContinuumGammaTransition() {}
// Override GammaEnergy function from G4VGammaTransition
//
G4double G4ContinuumGammaTransition::GammaEnergy()
void G4ContinuumGammaTransition::SelectGamma()
{
_eGamma = 0.;
@@ -109,7 +115,8 @@ G4double G4ContinuumGammaTransition::GammaEnergy()
<< " finalExcitation = " << finalExcitation
<< " random = " << random << endl;
if (finalExcitation < 0)
// if (finalExcitation < 0)
if(finalExcitation < _minLevelE/2.)
{
_eGamma = _excitation;
finalExcitation = 0.;
@@ -122,15 +129,23 @@ G4double G4ContinuumGammaTransition::GammaEnergy()
_eGamma = _eGamma + diff;
}
return _eGamma;
_gammaCreationTime = GammaTime();
if(_verbose > 10)
G4cout << "*---*---* G4ContinuumTransition: _gammaCreationTime = "
<< _gammaCreationTime/second << endl;
return;
}
G4double G4ContinuumGammaTransition::GetEnergyTo() const
G4double G4ContinuumGammaTransition::GetGammaEnergy()
{
G4double excitation = _excitation - _eGamma;
if (excitation < 0.) excitation = 0.;
return excitation ;
return _eGamma;
}
G4double G4ContinuumGammaTransition::GetGammaCreationTime()
{
return _gammaCreationTime;
}
@@ -150,13 +165,13 @@ G4double G4ContinuumGammaTransition::E1Pdf(G4double e)
if( (_excitation - e) < 0.0 || e < 0 || _excitation < 0) return theProb;
G4ConstantLevelDensityParameter ldPar;
G4double aLevelDensityParam = ldPar.LevelDensityParameter(_A,_Z,_excitation);
G4double aLevelDensityParam = ldPar.LevelDensityParameter(_nucleusA,_nucleusZ,_excitation);
G4double levelDensBef = exp(2.0*sqrt(aLevelDensityParam*_excitation));
G4double levelDensAft = exp(2.0*sqrt(aLevelDensityParam*(_excitation - e)));
if(_verbose > 20)
G4cout << _A << " LevelDensityParameter = " << aLevelDensityParam
G4cout << _nucleusA << " LevelDensityParameter = " << aLevelDensityParam
<< " Bef Aft " << levelDensBef << " " << levelDensAft << endl;
// Now form the probability density
@@ -164,10 +179,10 @@ G4double G4ContinuumGammaTransition::E1Pdf(G4double e)
// Define constants for the photoabsorption cross-section (the reverse
// process of our de-excitation)
// G4double sigma0 = 2.5 * _A * millibarn;
G4double sigma0 = 2.5 * _A;
// G4double sigma0 = 2.5 * _nucleusA * millibarn;
G4double sigma0 = 2.5 * _nucleusA;
G4double Egdp = (40.3 / pow(_A,0.2) )*MeV;
G4double Egdp = (40.3 / pow(_nucleusA,0.2) )*MeV;
G4double GammaR = 0.30 * Egdp;
G4double normC = 1.0 / (pi * hbarc)*(pi * hbarc);
@@ -189,3 +204,41 @@ G4double G4ContinuumGammaTransition::E1Pdf(G4double e)
return theProb;
}
G4double G4ContinuumGammaTransition::GammaTime()
{
G4double GammaR = 0.30 * (40.3 / pow(_nucleusA,0.2) )*MeV;
G4double tau = hbar_Planck/GammaR;
G4double tMin = 0;
G4double tMax = 10.0 * tau;
G4int nBins = 200;
G4double sampleArray[200];
for(G4int i = 0;i<nBins;i++)
{
G4double t = tMin + ((tMax-tMin)/nBins)*i;
sampleArray[i] = (exp(-t/tau))/tau;
}
G4RandGeneralTmp randGeneral(sampleArray, nBins);
G4double random = randGeneral.shoot();
G4double creationTime = tMin + (tMax - tMin) * random;
return creationTime;
}
@@ -27,7 +27,7 @@
#include "G4NuclearLevelManager.hh"
G4DiscreteGammaDeexcitation::G4DiscreteGammaDeexcitation(): _Z(0),_A(0)
G4DiscreteGammaDeexcitation::G4DiscreteGammaDeexcitation(): _nucleusZ(0),_nucleusA(0)
{
_tolerance = 0.1 * MeV;
}
@@ -49,11 +49,11 @@ G4VGammaTransition* G4DiscreteGammaDeexcitation::CreateTransition()
<< "G4DiscreteGammaDeexcitation::CreateTransition - (A,Z) is valid "
<< endl;
if (_A != A || _Z != Z)
if (_nucleusA != A || _nucleusZ != Z)
{
_levelManager.SetNucleus(Z,A);
_A = A;
_Z = Z;
_nucleusA = A;
_nucleusZ = Z;
}
G4double excitation = nucleus.GetExcitationEnergy();
@@ -20,14 +20,18 @@
//
// Modifications:
//
// 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
// Added creation time evaluation for products of evaporation
//
// -------------------------------------------------------------------
#include "G4DiscreteGammaTransition.hh"
#include "Randomize.hh"
#include "G4RandGeneralTmp.hh"
G4DiscreteGammaTransition::G4DiscreteGammaTransition(const G4NuclearLevel& level):
_level(level), _excitation(0.), _gammaEnergy(0.)
_level(level), _excitation(0.), _gammaEnergy(0.), _gammaCreationTime(0.)
{ }
@@ -35,52 +39,86 @@ G4DiscreteGammaTransition::~G4DiscreteGammaTransition()
{ }
G4double G4DiscreteGammaTransition::GammaEnergy()
void G4DiscreteGammaTransition::SelectGamma()
{
_gammaEnergy = 0.;
G4int nGammas = _level.NumberOfGammas();
if (nGammas > 0)
{
G4double random = G4UniformRand();
G4int iGamma = 0;
if (random <= _level.GammaCumulativeProbabilities().at(0)) iGamma = 0;
else
{
G4int i;
for (i=1; i<nGammas; i++)
{
if (random > _level.GammaCumulativeProbabilities().at(i-1) &&
random <= _level.GammaCumulativeProbabilities().at(i))
{ iGamma = i; }
}
}
G4int nGammas = _level.NumberOfGammas();
if (nGammas > 0)
{
G4double random = G4UniformRand();
// Small correction due to the fact that there are mismatches between
// nominal level energies and emitted gamma energies
G4double eCorrection = _level.Energy() - _excitation;
G4int iGamma = 0;
for(iGamma=0;iGamma < nGammas;iGamma++)
{
if(random <= _level.GammaCumulativeProbabilities().at(iGamma))
break;
}
_gammaEnergy = _level.GammaEnergies().at(iGamma) - eCorrection;
if (_gammaEnergy < 0.) _gammaEnergy = 0.;
}
// Small correction due to the fact that there are mismatches between
// nominal level energies and emitted gamma energies
G4double eCorrection = _level.Energy() - _excitation;
_gammaEnergy = _level.GammaEnergies().at(iGamma) - eCorrection;
// Warning: the following check is needed to avoid loops:
// Due essentially to missing nuclear levels in data files, it is
// possible that _gammaEnergy is so low as the nucleus doesn't change
// its level after the transition.
// When such case is found, force the full deexcitation of the nucleus.
//
// NOTE: you should force the transition to the next lower level,
// but this change needs a more complex revision of actual design.
// I leave this for a later revision.
if (_gammaEnergy < _level.Energy()*10e-5) _gammaEnergy = _excitation;
}
G4double tau = _level.HalfLife() / log(2.0);
G4double tMin = 0;
G4double tMax = 10.0 * tau;
G4int nBins = 200;
G4double sampleArray[200];
for(G4int i = 0;i<nBins;i++)
{
G4double t = tMin + ((tMax-tMin)/nBins)*i;
sampleArray[i] = (exp(-t/tau))/tau;
}
G4RandGeneralTmp randGeneral(sampleArray, nBins);
G4double random = randGeneral.shoot();
_gammaCreationTime = tMin + (tMax - tMin) * random;
// if(_verbose > 10)
// G4cout << "*---*---* G4DiscreteTransition: _gammaCreationTime = "
// << _gammaCreationTime/second << endl;
return;
}
G4double G4DiscreteGammaTransition::GetGammaEnergy()
{
return _gammaEnergy;
}
G4double G4DiscreteGammaTransition::GetEnergyTo() const
G4double G4DiscreteGammaTransition::GetGammaCreationTime()
{
G4double energyTo = _excitation - _gammaEnergy;
if (energyTo < 0.) energyTo = 0.;
return energyTo;
return _gammaCreationTime;
}
void G4DiscreteGammaTransition::SetEnergyFrom(const G4double energy)
{
_excitation = energy;
return;
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4DummyMF.cc,v 1.1 1998/08/22 08:53:45 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4DummyMF.cc,v 1.1 1999/01/07 16:11:50 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
@@ -96,7 +96,8 @@ void G4EvaporationChannel::Initialize(const G4Fragment & fragment)
// Coulomb Barrier calculation
CoulombBarrier = CalcCoulombBarrier(AResidual,ZResidual)*MeV;
// Binding Enegy (for separate fragment from nucleus)
BindingEnergy = CalcBindingEnergy(anA,aZ)*MeV;
@@ -145,6 +146,13 @@ G4FragmentVector * G4EvaporationChannel::BreakUp(const G4Fragment & theNucleus)
G4LorentzVector EvaporatedMomentum( momentum, EvaporatedEnergy );
EvaporatedMomentum.boost( theNucleus.GetMomentum().boostVector() );
// to avoid rounding errors in Lorentz boost which then produce
// evaporated fragments with excitation energies ~10^-10 eV
EvaporatedMomentum.setE(sqrt(EvaporatedMomentum.vect().mag2()+EvaporatedMass*EvaporatedMass));
G4Fragment * EvaporatedFragment = new G4Fragment( A, Z, EvaporatedMomentum );
if ( !EvaporatedFragment )
@@ -152,13 +160,15 @@ G4FragmentVector * G4EvaporationChannel::BreakUp(const G4Fragment & theNucleus)
G4LorentzVector FragmentMomentum( theNucleus.GetMomentum() );
FragmentMomentum.boost( -theNucleus.GetMomentum().boostVector() );
G4LorentzVector ResidualMomentum( -momentum, FragmentMomentum.e() - EvaporatedEnergy );
ResidualMomentum.boost( theNucleus.GetMomentum().boostVector() );
G4Fragment * ResidualFragment = new G4Fragment( AResidual, ZResidual, ResidualMomentum );
if ( !ResidualFragment )
G4Exception( "G4EvaporationChannel::BreakUp: Can't create G4Fragment! ");
G4Exception( "G4EvaporationChannel::BreakUp: Can't create G4Fragment! ");
G4FragmentVector * theResult = new G4FragmentVector;
@@ -186,6 +196,7 @@ G4double G4EvaporationChannel::CalcCoulombBarrier(const G4int ARes, const G4int
}
G4double G4EvaporationChannel::CalcBindingEnergy(const G4int anA, const G4int aZ)
// Calculate Binding Energy for separate fragment from nucleus
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ExcitationHandler.cc,v 1.12 1998/12/15 19:27:42 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4ExcitationHandler.cc,v 1.3 1999/05/28 17:14:41 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
@@ -72,7 +72,7 @@ G4bool G4ExcitationHandler::operator!=(const G4ExcitationHandler &right) const
}
G4DynamicParticleVector * G4ExcitationHandler::BreakItUp(const G4Fragment &theInitialState) const
G4ReactionProductVector * G4ExcitationHandler::BreakItUp(const G4Fragment &theInitialState) const
{
G4FragmentVector* theResult = 0;
@@ -84,7 +84,8 @@ G4DynamicParticleVector * G4ExcitationHandler::BreakItUp(const G4Fragment &theIn
// Initial State De-Excitation
if(A<GetMaxA()&&Z<GetMaxZ()) {
if(A<GetMaxA()&&Z<GetMaxZ()&&
exEnergy>G4NucleiPropertiesTable::GetBindingEnergy(Z,A)) {
theResult = theFermiModel->BreakItUp(theInitialState);
@@ -115,7 +116,8 @@ G4DynamicParticleVector * G4ExcitationHandler::BreakItUp(const G4Fragment &theIn
Z = theResult->at(i)->GetZ();
theExcitedNucleus = *(theResult->at(i));
// try to de-excite this fragment
if(A<GetMaxA()&&Z<GetMaxZ()) {
if(A<GetMaxA()&&Z<GetMaxZ()&&
exEnergy>G4NucleiPropertiesTable::GetBindingEnergy(Z,A)) {
theTempResult = theFermiModel->BreakItUp(theExcitedNucleus);
@@ -134,12 +136,13 @@ G4DynamicParticleVector * G4ExcitationHandler::BreakItUp(const G4Fragment &theIn
// If so :
// Remove excited fragment from the result
delete theResult->removeAt(i);
delete theResult->removeAt(i--);
// and add theTempResult elements to theResult
while (theTempResult->entries() > 0)
theResult->insert(theTempResult->removeFirst());
i--;
delete theTempResult;
} else { // If not :
// it doesn't matter, we Follow with the next fragment but
// I have to make
@@ -187,12 +190,12 @@ G4DynamicParticleVector * G4ExcitationHandler::BreakItUp(const G4Fragment &theIn
return Transform(theResult);
}
G4DynamicParticleVector *
G4ReactionProductVector *
G4ExcitationHandler::Transform(G4FragmentVector * theFragmentVector) const
{
if (theFragmentVector == 0) return 0;
// Conversion from G4FragmentVector to G4DynamicParticleVector
// Conversion from G4FragmentVector to G4ReactionProductVector
G4ParticleDefinition *theGamma = G4Gamma::GammaDefinition();
G4ParticleDefinition *theNeutron = G4Neutron::NeutronDefinition();
G4ParticleDefinition *theProton = G4Proton::ProtonDefinition();
@@ -202,7 +205,7 @@ G4ExcitationHandler::Transform(G4FragmentVector * theFragmentVector) const
G4ParticleDefinition *theAlpha = G4Alpha::AlphaDefinition();
G4ParticleDefinition *theKindOfFragment = 0;
theNeutron->SetVerboseLevel(2);
G4DynamicParticleVector * theDynamicParticleVector = new G4DynamicParticleVector;
G4ReactionProductVector * theReactionProductVector = new G4ReactionProductVector;
G4int theFragmentA, theFragmentZ;
G4LorentzVector theFragmentMomentum;
@@ -230,15 +233,20 @@ G4ExcitationHandler::Transform(G4FragmentVector * theFragmentVector) const
theKindOfFragment = theTableOfParticles->FindIon(theFragmentZ,theFragmentA,0,theFragmentZ);
}
if (theKindOfFragment != 0)
theDynamicParticleVector->insert(new G4DynamicParticle(theKindOfFragment,
theFragmentMomentum.vect()));
{
G4ReactionProduct * theNew = new G4ReactionProduct(theKindOfFragment);
theNew->SetMomentum(theFragmentMomentum.vect());
theNew->SetTotalEnergy(theFragmentMomentum.e());
theNew->SetFormationTime(theFragmentVector->at(i)->GetCreationTime());
theReactionProductVector->insert(theNew);
}
}
if (theFragmentVector != 0)
{
theFragmentVector->clearAndDestroy();
delete theFragmentVector;
}
return theDynamicParticleVector;
return theReactionProductVector;
}
@@ -47,39 +47,41 @@ G4bool G4FermiBreakUp::operator!=(const G4FermiBreakUp &right) const
G4FragmentVector * G4FermiBreakUp::BreakItUp(const G4Fragment &theNucleus)
{
// CHECK that Excitation Energy != 0
if (theNucleus.GetExcitationEnergy() == 0) {
G4FragmentVector * theResult = new G4FragmentVector;
theResult->insert(new G4Fragment(theNucleus));
return theResult;
}
// CHECK that Excitation Energy > 0
if (theNucleus.GetExcitationEnergy() <= theNucleus.GetBindingEnergy()) {
G4FragmentVector * theResult = new G4FragmentVector;
theResult->insert(new G4Fragment(theNucleus));
return theResult;
}
// Total energy of nucleus in nucleus rest frame (MeV)
G4double TotalEnergyRF = theNucleus.GetExcitationEnergy()/MeV +
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(theNucleus.GetZ(),theNucleus.GetA())/MeV;
// Total energy of nucleus in nucleus rest frame
G4double TotalEnergyRF = theNucleus.GetExcitationEnergy() +
G4ParticleTable::GetParticleTable()->GetIonTable()->
GetIonMass(theNucleus.GetZ(),theNucleus.GetA());
G4FermiConfigurationList theConfigurationList;
G4FermiConfigurationList theConfigurationList;
// Split the nucleus
G4bool Split = theConfigurationList.Initialize(theNucleus.GetA(), theNucleus.GetZ(),
TotalEnergyRF);
if ( !Split ) {
G4FragmentVector * theResult = new G4FragmentVector;
theResult->insert(new G4Fragment(theNucleus));
// Split the nucleus
G4bool Split = theConfigurationList.Initialize(theNucleus.GetA(),
theNucleus.GetZ(),
TotalEnergyRF);
if ( !Split ) {
G4FragmentVector * theResult = new G4FragmentVector;
theResult->insert(new G4Fragment(theNucleus));
return theResult;
}
return theResult;
}
// Chose a configuration
G4FermiConfiguration theConfiguration(theConfigurationList.ChooseConfiguration());
// Chose a configuration
G4FermiConfiguration theConfiguration(theConfigurationList.ChooseConfiguration());
// Get the fragments corresponding to chosen configuration.
G4FragmentVector * theResult = theConfiguration.GetFragments(theNucleus);
return theResult;
// Get the fragments corresponding to chosen configuration.
G4FragmentVector * theResult = theConfiguration.GetFragments(theNucleus);
return theResult;
}
@@ -8,15 +8,21 @@
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
// V. Lara (Apr 1999)
// Corrected a bug in calculation of probabilities found by N. Ameline
//
#include "G4FermiConfiguration.hh"
// Kappa = V/V_0 it is used in calculation of Coulomb energy
// Kappa is adimensional
const G4double G4FermiConfiguration::Kappa = 1.0;
// r0 is the nuclear radius
const G4double G4FermiConfiguration::r0 = 1.3*fermi;
// A Z Pol ExcitE
// A Z Pol ExcitE
G4StableFermiFragment G4FermiConfiguration::Fragment00( 1, 0, 2, 0.00*keV );
G4StableFermiFragment G4FermiConfiguration::Fragment01( 1, 1, 2, 0.00*keV );
G4StableFermiFragment G4FermiConfiguration::Fragment02( 2, 1, 3, 0.00*keV );
@@ -358,19 +364,20 @@ G4bool G4FermiConfiguration::SplitNucleus(const G4int A, const G4int Z)
G4double G4FermiConfiguration::CoulombBarrier(void)
{
// Calculates Coulomb Barrier (MeV) for given channel with K fragments.
const G4double Coef = ((3. * 1.44) / (5. * 1.3)) * pow(1./(1.+Kappa), 1./3.);
G4double SumA = 0, SumZ = 0;
G4double CoulombEnergy = 0.;
for (G4int i = 0; i < Index.entries(); i++) {
G4double z = theListOfFragments[Index[i]-1]->GetZ();
G4double a = theListOfFragments[Index[i]-1]->GetA();
CoulombEnergy += (z*z) / pow(a, 1./3.);
SumA += a;
SumZ += z;
}
CoulombEnergy -= SumZ*SumZ/pow(SumA, 1./3.);
return -Coef * CoulombEnergy;
// Calculates Coulomb Barrier (MeV) for given channel with K fragments.
const G4double Coef = (3./5.)*1.44*MeV*fermi* pow(1./(1.+Kappa), 1./3.)/r0;
G4double SumA = 0, SumZ = 0;
G4double CoulombEnergy = 0.;
for (G4int i = 0; i < Index.entries(); i++) {
G4double z = theListOfFragments[Index[i]-1]->GetZ();
G4double a = theListOfFragments[Index[i]-1]->GetA();
CoulombEnergy += (z*z) / pow(a, 1./3.);
SumA += a;
SumZ += z;
}
CoulombEnergy -= SumZ*SumZ/pow(SumA, 1./3.);
return -Coef * CoulombEnergy;
}
@@ -380,57 +387,66 @@ G4double G4FermiConfiguration::DecayProbability(const G4int A, const G4double To
// Decay probability for a given channel with K fragments
{
// A: Atomic Weight
// TotalE: Total energy of nucleus (MeV)
// TotalE: Total energy of nucleus (MeV)
G4int K = Index.entries();
G4int i;
const G4double VAK = (1.3/(0.21*sqrt(0.94)))*(1.3/(0.21*sqrt(0.94)))*(1.3/(0.21*sqrt(0.94)))*
Kappa*sqrt(2.0/pi)/3.0;
G4int K = Index.entries();
G4int i;
G4double * GAF = new G4double[K];
GAF[0] = 0.0;
GAF[1] = 1.0/sqrt(pi);
for (i = 2; i < K; i++) {
G4double qk = 1./(1.5*i-2.5);
G4double gq = 1. + qk*(1./12. + qk*(1./288. - qk*(139./51840.)));
GAF[i] = sqrt(0.1591549*qk)/gq;
}
const G4double NucleonMass = 938.0*MeV;
const G4double DimCoeff = pow(r0*sqrt(NucleonMass)/hbarc,3.0)*Kappa*sqrt(2.0/pi)/3.0;
G4double DeltaEnergy = TotalE; // MeV
G4double Weight = 0.;
G4double ProdAMass = 1.;
G4double ProdSpin = 1.;
// Calculation of 1/Gamma(3(n-1)/2)
G4double InvGammaFunc = 1.0;
if (K <= 1) InvGammaFunc = 0.0;
else {
G4double arg = 3.0*(K-1)/2.0 - 1.0;
while (arg > 1.1) {
InvGammaFunc *= arg;
arg--;
}
if ((K-1)%2 == 1) InvGammaFunc *= sqrt(pi)/2.0;
InvGammaFunc = 1.0/InvGammaFunc;
}
G4double DeltaEnergy = TotalE; // MeV
G4double Weight = 0.;
G4double ProdAMass = 1.;
G4double ProdSpin = 1.;
for (i = 0; i<K; i++) {
ProdAMass *= theListOfFragments[Index[i]-1]->GetA();
ProdSpin *= theListOfFragments[Index[i]-1]->GetPolarization();
DeltaEnergy -= (theListOfFragments[Index[i]-1]->GetFragmentMass()/MeV +
theListOfFragments[Index[i]-1]->GetExcitationEnergy()/MeV);
};
if ((DeltaEnergy -= CoulombBarrier()) <= 0.0) {
delete [] GAF;
return Weight;
}
ProdAMass /= A;
ProdAMass *= sqrt(ProdAMass)*ProdSpin;
for (i = 0; i<K; i++) {
ProdAMass *= theListOfFragments[Index[i]-1]->GetA();
// Spin factor S_n
ProdSpin *= theListOfFragments[Index[i]-1]->GetPolarization();
DeltaEnergy -= theListOfFragments[Index[i]-1]->GetFragmentMass() +
theListOfFragments[Index[i]-1]->GetExcitationEnergy();
};
if (K <= 2) {
Weight = 1.1283792*A*Kappa*ProdAMass*sqrt(DeltaEnergy);
if (Index[0] == Index[1]) Weight *= 0.5;
} else {
DeltaEnergy *= 2.71828183/(1.5*K-2.5);
G4double VTK = A*Kappa*DeltaEnergy*sqrt(DeltaEnergy);
G4double VMK = 1.0, RPM= 1.0;
for (G4int i = 0; i < K-1; i++) {
VMK *= VTK;
G4int MRS = 1;
for (G4int j = i+1; j<K; j++) if(Index[i] == Index[j]) MRS++;
RPM *= MRS;
};
Weight = VMK*ProdAMass*GAF[K-1]/(DeltaEnergy*RPM);
}
delete [] GAF;
return Weight;
// Check that there is enough energy to produce K fragments
if ((DeltaEnergy -= CoulombBarrier()) <= 0.0) return Weight; // return 0.0
ProdAMass /= A;
ProdAMass *= sqrt(ProdAMass);
if (K <= 2) {
Weight = InvGammaFunc*A*DimCoeff*ProdAMass*ProdSpin*sqrt(DeltaEnergy);
if (Index[0] == Index[1]) Weight *= 0.5; //Permutation factor G_n
} else {
G4double Base = A*DimCoeff*DeltaEnergy*sqrt(DeltaEnergy);
G4double Powered = 1.0;
G4double PermutationFactor = 1.0;
for (G4int i = 0; i < K-1; i++) {
Powered *= Base;
G4int N = 1;
for (G4int j = i+1; j<K; j++) if(Index[i] == Index[j]) N++;
PermutationFactor *= N;
};
Weight = Powered*ProdAMass*ProdSpin*InvGammaFunc/(DeltaEnergy*PermutationFactor);
}
return Weight;
}
@@ -440,17 +456,17 @@ G4FragmentVector * G4FermiConfiguration::GetFragments(const G4Fragment & theNucl
G4int K = Index.entries();
// Avalaible kinetic energy of system.
G4double AvalKineticEnergy = theNucleus.GetExcitationEnergy()/MeV +
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(theNucleus.GetZ(),theNucleus.GetA())/MeV;
G4double AvalKineticEnergy = theNucleus.GetExcitationEnergy() +
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(theNucleus.GetZ(),theNucleus.GetA());
G4int i;
for (i = 0; i < K; i++)
AvalKineticEnergy -= theListOfFragments[Index[i]-1]->GetFragmentMass()/MeV;
AvalKineticEnergy -= theListOfFragments[Index[i]-1]->GetFragmentMass();
// Calculate Momenta of K fragments
RWTPtrOrderedVector<G4LorentzVector>* MomentumComponents =
FragmentsMomentum(AvalKineticEnergy*MeV);
FragmentsMomentum(AvalKineticEnergy);
G4FragmentVector * theResult = new G4FragmentVector;
@@ -550,19 +566,19 @@ G4FermiConfiguration::FragmentsMomentum(G4double KineticEnergy)
G4double G4FermiConfiguration::RNKSI(const G4int K)
{
G4double csim = (3.0*K-5.0)/(3.0*K-4.0);
G4double pex = 1.5*K-2.5;
G4double fcsim = sqrt(1.0-csim)*pow(csim,pex);
G4double csim = (3.0*K-5.0)/(3.0*K-4.0);
G4double pex = (3.0*K-5.0)/2.0;
G4double fcsim = sqrt(1.0-csim)*pow(csim,pex);
G4double csi = 0.0;
G4double fcsi= 0.0;
G4double rf = 0.0;
do {
csi = G4UniformRand();
fcsi = sqrt(1.0-csi)*pow(csi,pex);
rf = fcsim*G4UniformRand();
} while (rf > fcsi);
return csi;
G4double csi = 0.0;
G4double fcsi= 0.0;
G4double rf = 0.0;
do {
csi = G4UniformRand();
fcsi = sqrt(1.0-csi)*pow(csi,pex);
rf = fcsim*G4UniformRand();
} while (rf > fcsi);
return csi;
}
G4ParticleMomentum G4FermiConfiguration::IsotropicVector(const G4double Magnitude)
@@ -49,45 +49,43 @@ G4bool G4FermiConfigurationList::Initialize(const G4int A, const G4int Z, const
//
// let's split nucleus into k = 2,...,6 fragments
//
Configurations.clear();
NormalizedWeights.clear();
G4FermiConfiguration aConfiguration;
RWTValOrderedVector<G4double> NOTNormalizedWeights;
G4double NormStatWeight = 0.0;
for (G4int k = 2; k <= 6; k++) {
// Initialize Configuration for k fragments
aConfiguration.Initialize(k);
G4bool SplitSuccesed;
do {
// Splits the nucleus into k fragments
SplitSuccesed = aConfiguration.SplitNucleus(A,Z);
if (SplitSuccesed) {
TotNumOfConfigurations++;
NumOfConfigurations[k-1]++;
Configurations.clear();
NormalizedWeights.clear();
G4FermiConfiguration aConfiguration;
RWTValOrderedVector<G4double> NOTNormalizedWeights;
G4double NormStatWeight = 0.0;
for (G4int k = 2; k <= 6; k++) {
// Initialize Configuration for k fragments
aConfiguration.Initialize(k);
G4bool SplitSuccesed;
do {
// Splits the nucleus into k fragments
SplitSuccesed = aConfiguration.SplitNucleus(A,Z);
if (SplitSuccesed) {
TotNumOfConfigurations++;
NumOfConfigurations[k-1]++;
// Non-Normalized statistical weight (decay probavility) for given channel with k fragments
// Decay probability returns very big numbers--> I put a temporal scale factor 10^-6
G4double StatWeight = aConfiguration.DecayProbability(A,TotalEnergyRF)*1.0e-6;
NormStatWeight += StatWeight;
// Statistical weights (it will be normalized...)
NOTNormalizedWeights.insert(StatWeight);
// Non-Normalized statistical weight for given channel with k fragments
G4double StatWeight = aConfiguration.DecayProbability(A,TotalEnergyRF);
NormStatWeight += StatWeight;
// Statistical weights (it will be normalized...)
NOTNormalizedWeights.insert(StatWeight);
G4int NumeroDeConf = Configurations.entries();
// Store configuration
Configurations.insert(aConfiguration);
}
// Repeat splitting into k fragments (it may be several posibilities for a choosen K)
} while (SplitSuccesed);
}
// Store configuration
Configurations.insert(aConfiguration);
}
// Repeat splitting into k fragments (it may be several posibilities for a choosen K)
} while (SplitSuccesed);
}
if (NormStatWeight > 0.0) {
// Let's normalize statistical weights of channels
for (G4int i = 0; i < TotNumOfConfigurations; i++)
NormalizedWeights.insert(NOTNormalizedWeights(i)/NormStatWeight);
if (NormStatWeight > 0.0) {
// Let's normalize statistical weights of channels
for (G4int i = 0; i < TotNumOfConfigurations; i++)
NormalizedWeights.insert(NOTNormalizedWeights(i)/NormStatWeight);
return true;
}
else return false;
return true;
}
else return false;
}
@@ -95,14 +93,14 @@ G4bool G4FermiConfigurationList::Initialize(const G4int A, const G4int Z, const
G4FermiConfiguration G4FermiConfigurationList::ChooseConfiguration(void)
{
G4double RandomWeight = G4UniformRand();
G4double AcumWeight = 0.0;
G4int thisConfig = 0;
do {
AcumWeight += NormalizedWeights(thisConfig); // We are adding the prob. of each configuration
thisConfig++;
} while ((thisConfig <= TotNumOfConfigurations) && (AcumWeight < RandomWeight));
G4double RandomWeight = G4UniformRand();
G4double AcumWeight = 0.0;
G4int thisConfig = 0;
do {
AcumWeight += NormalizedWeights(thisConfig); // We are adding the prob. of each configuration
thisConfig++;
} while ((thisConfig <= TotNumOfConfigurations) && (AcumWeight < RandomWeight));
return Configurations(thisConfig - 1);
return Configurations(thisConfig - 1);
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FissionBarrier.cc,v 1.1 1998/10/15 07:56:56 larazb Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4FissionBarrier.cc,v 1.1 1999/01/07 16:11:54 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MultiFragmentation.cc,v 1.1 1998/08/22 08:53:49 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4MultiFragmentation.cc,v 1.1 1999/01/07 16:11:55 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
@@ -20,21 +20,31 @@
//
// Modifications:
//
// 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
// Added half-life, angular momentum, parity, emissioni type
// reading from experimental data.
//
// -------------------------------------------------------------------
#include "G4NuclearLevel.hh"
#include "globals.hh"
G4NuclearLevel::G4NuclearLevel(const G4double energy,
const G4DataVector& eGamma, const G4DataVector& wGamma)
G4NuclearLevel::G4NuclearLevel(const G4double energy, const G4double halfLife,
const G4double angularMomentum,
const G4DataVector& eGamma,
const G4DataVector& wGamma,
const G4DataVector& polarities)
{
_energy = energy;
_halfLife = halfLife;
_angularMomentum = angularMomentum;
G4int i;
for (i=0; i<eGamma.entries(); i++)
{
_energies.insert(eGamma.at(i));
_weights.insert(wGamma.at(i));
_polarities.insert(polarities.at(i));
}
_nGammas = _energies.entries();
MakeProbabilities();
@@ -87,11 +97,26 @@ const G4DataVector& G4NuclearLevel::GammaCumulativeProbabilities() const
}
const G4DataVector& G4NuclearLevel::GammaPolarities() const
{
return _polarities;
}
G4double G4NuclearLevel::Energy() const
{
return _energy;
}
G4double G4NuclearLevel::AngularMomentum() const
{
return _angularMomentum;
}
G4double G4NuclearLevel::HalfLife() const
{
return _halfLife;
}
G4int G4NuclearLevel::NumberOfGammas() const
{
@@ -101,7 +126,9 @@ G4int G4NuclearLevel::NumberOfGammas() const
void G4NuclearLevel::PrintAll() const
{
G4cout << "---- Level energy = " << _energy << ", " << _nGammas << " photons" << endl;
G4cout << "---- Level energy = " << _energy << ", angular momentum = "
<< _angularMomentum << ", half life " << _halfLife
<< ", " << _nGammas << " photons" << endl;
G4int i;
G4cout << " Gammas: ";
for (i=0; i<_nGammas; i++) { G4cout << _energies.at(i) << " "; }
@@ -111,6 +138,8 @@ void G4NuclearLevel::PrintAll() const
for (i=0; i<_nGammas; i++) { G4cout << _prob.at(i) << " "; }
G4cout << endl << " Cumulative probabilities: ";
for (i=0; i<_nGammas; i++) { G4cout << _cumProb.at(i) << " "; }
G4cout << endl << " Polarities: ";
for (i=0; i<_nGammas; i++) { G4cout << _polarities.at(i) << " "; }
G4cout << endl;
return;
@@ -20,6 +20,10 @@
//
// Modifications:
//
// 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
// Added half-life, angular momentum, parity, emissioni type
// reading from experimental data.
//
// -------------------------------------------------------------------
#include "G4NuclearLevelManager.hh"
@@ -29,13 +33,17 @@
#include "G4ios.hh"
#include <stdlib.h>
#include <fstream.h>
#ifdef WIN32
#include <strstrea.h>
#else
#include <strstream.h>
#endif
G4NuclearLevelManager::G4NuclearLevelManager():
_A(0), _Z(0), _levels(0), _levelEnergy(0), _gammaEnergy(0), _probability(0)
_nucleusA(0), _nucleusZ(0), _levels(0), _levelEnergy(0), _gammaEnergy(0), _probability(0)
{ }
G4NuclearLevelManager::G4NuclearLevelManager(G4int Z, G4int A): _Z(Z), _A(A)
G4NuclearLevelManager::G4NuclearLevelManager(G4int Z, G4int A): _nucleusZ(Z), _nucleusA(A)
{
@@ -59,10 +67,10 @@ G4NuclearLevelManager::~G4NuclearLevelManager()
void G4NuclearLevelManager::SetNucleus(G4int Z, G4int A)
{
if (_Z != Z || _A != A)
if (_nucleusZ != Z || _nucleusA != A)
{
_A = A;
_Z = Z;
_nucleusA = A;
_nucleusZ = Z;
MakeLevels();
}
@@ -74,15 +82,18 @@ G4bool G4NuclearLevelManager::IsValid(G4int Z, G4int A) const
if (A < 0 || Z < 0 || A < Z) valid = false;
G4String dirName = getenv("G4LEVELGAMMADATA");
char* env = getenv("G4LEVELGAMMADATA");
if (env == 0)
G4Exception("G4NuclearLevelManager - Please set the G4LEVELGAMMADATA environment variable");
G4String dirName(env);
char name[100] = {""};
ostrstream ost(name, 100, ios::out);
ost << dirName << "/" << "z" << Z << ".a" << A;
G4String file(name);
ifstream inFile(file);
if (! inFile) valid = false;
return valid;
}
@@ -171,9 +182,11 @@ G4bool G4NuclearLevelManager::Read(ifstream& dataFile)
if (dataFile >> _levelEnergy)
{
dataFile >> _gammaEnergy >> _probability;
dataFile >> _gammaEnergy >> _probability >> _polarity >> _halfLife
>> _angularMomentum;
_levelEnergy *= keV;
_gammaEnergy *= keV;
_halfLife *= second;
// The following adjustment is needed to take care of anomalies in
// data files, where some transitions show up with relative probability
@@ -193,17 +206,20 @@ G4bool G4NuclearLevelManager::Read(ifstream& dataFile)
void G4NuclearLevelManager::MakeLevels()
{
G4String dirName = getenv("G4LEVELGAMMADATA");
char* env = getenv("G4LEVELGAMMADATA");
if (env == 0)
G4Exception("G4NuclearLevelManager: please set the G4LEVELGAMMADATA environment variable");
G4String dirName(env);
char name[100] = {""};
ostrstream ost(name, 100, ios::out);
ost << dirName << "/" << "z" << _Z << ".a" << _A;
ost << dirName << "/" << "z" << _nucleusZ << ".a" << _nucleusA;
G4String file(name);
ifstream inFile(file, ios::in);
if (! inFile)
{
// G4cout << " G4NuclearLevelManager: (" << _Z << "," << _A
// G4cout << " G4NuclearLevelManager: (" << _nucleusZ << "," << _nucleusA
// << ") does not have LevelsAndGammas file" << endl;
return;
}
@@ -219,12 +235,18 @@ void G4NuclearLevelManager::MakeLevels()
G4DataVector eLevel;
G4DataVector eGamma;
G4DataVector wGamma;
G4DataVector pGamma; // polarity
G4DataVector hLevel; // half life
G4DataVector aLevel; // angular momentum
while (Read(inFile))
{
eLevel.insert(_levelEnergy);
eGamma.insert(_gammaEnergy);
wGamma.insert(_probability);
pGamma.insert(_polarity);
hLevel.insert(_halfLife);
aLevel.insert(_angularMomentum);
}
// ---- MGP ---- Don't forget to close the file
@@ -235,8 +257,11 @@ void G4NuclearLevelManager::MakeLevels()
// G4cout << " ==== MakeLevels ===== " << nData << " data read " << endl;
G4double thisLevelEnergy = eLevel.at(0);
G4double thisLevelHalfLife = 0.;
G4double thisLevelAngMom = 0.;
G4DataVector thisLevelEnergies;
G4DataVector thisLevelWeights;
G4DataVector thisLevelPolarities;
G4double e = -1.;
G4int i;
@@ -244,26 +269,39 @@ void G4NuclearLevelManager::MakeLevels()
{
e = eLevel.at(i);
if (e != thisLevelEnergy)
{
// G4cout << "Making a new level... " << e << " "
// << thisLevelEnergies.entries() << " "
// << thisLevelWeights.entries() << endl;
G4NuclearLevel* newLevel = new G4NuclearLevel(thisLevelEnergy,thisLevelEnergies,thisLevelWeights);
{
// G4cout << "Making a new level... " << e << " "
// << thisLevelEnergies.entries() << " "
// << thisLevelWeights.entries() << endl;
G4NuclearLevel* newLevel = new G4NuclearLevel(thisLevelEnergy,
thisLevelHalfLife,
thisLevelAngMom,
thisLevelEnergies,
thisLevelWeights,
thisLevelPolarities);
_levels->insert(newLevel);
// Reset data vectors
thisLevelEnergies.clear();
thisLevelWeights.clear();
thisLevelPolarities.clear();
thisLevelEnergy = e;
}
// Append current data
thisLevelEnergies.insert(eGamma.at(i));
thisLevelWeights.insert(wGamma.at(i));
thisLevelPolarities.insert(pGamma.at(i));
thisLevelHalfLife = hLevel.at(i);
thisLevelAngMom = aLevel.at(i);
}
// Make last level
if (e > 0.)
{
G4NuclearLevel* newLevel = new G4NuclearLevel(e,thisLevelEnergies,thisLevelWeights);
G4NuclearLevel* newLevel = new G4NuclearLevel(e,thisLevelHalfLife,
thisLevelAngMom,
thisLevelEnergies,
thisLevelWeights,
thisLevelPolarities);
_levels->insert(newLevel);
}
@@ -276,10 +314,11 @@ void G4NuclearLevelManager::PrintAll()
G4int nLevels = 0;
if (_levels != 0) nLevels = _levels->entries();
G4cout << " ==== G4NuclearLevelManager ==== (" << _Z << ", " << _A << ") has "
<< nLevels << " levels" << endl
<< "Highest level is at energy " << MaxLevelEnergy() << " MeV " << endl
<< "Lowest level is at energy " << MinLevelEnergy() << " MeV " << endl;
G4cout << " ==== G4NuclearLevelManager ==== (" << _nucleusZ << ", " << _nucleusA
<< ") has " << nLevels << " levels" << endl
<< "Highest level is at energy " << MaxLevelEnergy() << " MeV "
<< endl << "Lowest level is at energy " << MinLevelEnergy()
<< " MeV " << endl;
G4int i = 0;
for (i=0; i<nLevels; i++)
@@ -292,8 +331,11 @@ G4NuclearLevelManager::G4NuclearLevelManager(const G4NuclearLevelManager &right)
_levelEnergy = right._levelEnergy;
_gammaEnergy = right._gammaEnergy;
_probability = right._probability;
_A = right._A;
_Z = right._Z;
_polarity = right._polarity;
_halfLife = right._halfLife;
_angularMomentum = right._angularMomentum;
_nucleusA = right._nucleusA;
_nucleusZ = right._nucleusZ;
if (right._levels != 0)
{
_levels = new G4PtrLevelVector;
@@ -309,3 +351,12 @@ G4NuclearLevelManager::G4NuclearLevelManager(const G4NuclearLevelManager &right)
_levels = 0;
}
}
@@ -1,4 +1,4 @@
// $Id: G4StatMFMicrocanonical.cc,v 1.3 1998/11/12 16:19:51 allison Exp $
// $Id: G4StatMFMicrocanonical.cc,v 1.1 1999/01/07 16:11:57 gunter Exp $
#include "G4StatMFMicrocanonical.hh"
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VFissionBarrier.cc,v 1.1 1998/10/15 07:58:35 larazb Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VFissionBarrier.cc,v 1.1 1999/01/07 16:11:59 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
@@ -20,6 +20,10 @@
//
// Modifications:
//
// 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
// Added creation time evaluation for products of evaporation
//
//
// -------------------------------------------------------------------
#include "G4VGammaDeexcitation.hh"
@@ -32,6 +36,8 @@
#include "G4Fragment.hh"
#include "G4FragmentVector.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
G4VGammaDeexcitation::G4VGammaDeexcitation(): _verbose(0), _transition(0)
{ }
@@ -57,7 +63,7 @@ G4FragmentVector* G4VGammaDeexcitation::DoTransition()
{
products->append(gamma);
UpdateNucleus(gamma);
Update(gamma);
Update();
}
}
@@ -84,7 +90,7 @@ G4FragmentVector* G4VGammaDeexcitation::DoChain()
products->append(gamma);
UpdateNucleus(gamma);
}
Update(gamma);
Update();
}
if (_verbose > 1)
@@ -112,39 +118,49 @@ G4Fragment* G4VGammaDeexcitation::GenerateGamma()
{
G4double eGamma = 0.;
if (_transition != 0) eGamma = _transition->GammaEnergy();
if (_transition != 0)
{
_transition->SelectGamma();
eGamma = _transition->GetGammaEnergy();
}
if (_verbose > 1 && _transition != 0)
{
G4cout << "G4VGammaDeexcitation::GenerateGamma - Gamma energy " << eGamma
<< " ** New excitation " << _transition->GetEnergyTo() << endl;
}
{
G4cout << "G4VGammaDeexcitation::GenerateGamma - Gamma energy " << eGamma
<< " ** New excitation " << _nucleus.GetExcitationEnergy() - eGamma
<< endl;
}
// Photon momentum isotropically generated
if (eGamma > 0.)
{
G4double cosTheta = 1. - 2. * G4UniformRand();
G4double sinTheta = sqrt(1. - cosTheta * cosTheta);
G4double phi = twopi * G4UniformRand();
if (eGamma > 0.)
{
G4double cosTheta = 1. - 2. * G4UniformRand();
G4double sinTheta = sqrt(1. - cosTheta * cosTheta);
G4double phi = twopi * G4UniformRand();
G4ThreeVector pGamma( eGamma * sinTheta * cos(phi),
eGamma * sinTheta * sin(phi),
eGamma * cosTheta );
G4LorentzVector gamma(pGamma, eGamma);
// gamma.boost(_nucleus.GetMomentum().boostVector() );
G4Fragment* gammaFragment = new G4Fragment(gamma,G4Gamma::GammaDefinition());
G4ThreeVector pGamma( eGamma * sinTheta * cos(phi),
eGamma * sinTheta * sin(phi),
eGamma * cosTheta );
if (_verbose > 1)
G4cout << "G4VGammaDeexcitation::GenerateGamma - Gamma fragment generated " << endl;
G4LorentzVector gamma(pGamma, eGamma);
// gamma.boost(_nucleus.GetMomentum().boostVector() );
G4Fragment* gammaFragment = new
G4Fragment(gamma,G4Gamma::GammaDefinition());
return gammaFragment;
}
else
{
return 0;
}
G4double gammaTime = _transition->GetGammaCreationTime();
gammaTime += _nucleus.GetCreationTime();
gammaFragment->SetCreationTime(gammaTime);
if (_verbose > 1)
G4cout << "G4VGammaDeexcitation::GenerateGamma - Gamma fragment generated " << endl;
return gammaFragment;
}
else
{
return 0;
}
}
@@ -157,26 +173,45 @@ void G4VGammaDeexcitation::UpdateNucleus(const G4Fragment* gamma)
G4LorentzVector p4Nucleus(_nucleus.GetMomentum() );
// p4Nucleus.boost(-_nucleus.GetMomentum().boostVector() );
G4LorentzVector p4Residual(p4Nucleus - pGamma, p4Nucleus.e() - eGamma);
// G4LorentzVector p4Residual(p4Nucleus - pGamma, p4Nucleus.e() - eGamma);
//
// Due to a rounding error calculation in G4Fragment excitation energy,
// we must correct p4Residual.e() when we are near to 0.
//
// New tetravector calculation:
G4double Mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(_nucleus.GetZ(),_nucleus.GetA());
G4double newExcitation = p4Nucleus.mag() - Mass - eGamma;
if(newExcitation < 0)
newExcitation = 0;
G4ThreeVector p3Residual(p4Nucleus - pGamma);
G4double newEnergy = sqrt(p3Residual * p3Residual +
(Mass + newExcitation) * (Mass + newExcitation));
G4LorentzVector p4Residual(p3Residual, newEnergy);
// G4LorentzVector p4Residual(-pGamma, p4Nucleus.e() - eGamma);
// p4Residual.boost( _nucleus.GetMomentum().boostVector() );
// Update excited nucleus parameters
_nucleus.SetMomentum(p4Residual);
_nucleus.SetCreationTime(gamma->GetCreationTime());
if (_transition != 0)
{
G4double excitation =_transition->GetEnergyTo();
if (excitation < 0.) excitation = 0.0;
_nucleus.SetExcitationEnergy(excitation);
}
// if (_transition != 0)
// {
// G4double excitation =_transition->GetEnergyTo();
// if (excitation < 0.) excitation = 0.0;
// _nucleus.SetExcitationEnergy(excitation);
// }
return;
}
void G4VGammaDeexcitation::Update(const G4Fragment* gamma)
void G4VGammaDeexcitation::Update()
{
if (_transition != 0)
{
@@ -212,3 +247,8 @@ void G4VGammaDeexcitation::SetVerboseLevel(G4int verbose)
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.2 1998/11/04 16:14:10 gunter Exp $
# $Id: GNUmakefile,v 1.1 1999/01/07 16:12:00 gunter Exp $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
@@ -5,7 +5,7 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4DiffractiveHHScatterer.hh,v 1.1 1998/11/05 16:31:44 gunter Exp $
// $Id: G4DiffractiveHHScatterer.hh,v 1.1 1999/01/07 16:12:00 gunter Exp $
#ifndef G4DiffractiveHHScatterer_h
#define G4DiffractiveHHScatterer_h 1
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4DiffractiveSplitableHadron.hh,v 1.4 1998/11/05 17:55:38 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4DiffractiveSplitableHadron.hh,v 1.2 1999/04/15 12:10:06 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4DiffractiveSplitableHadron_h
@@ -23,7 +23,8 @@
// ------------------------------------------------------------
#include "G4VSplitableHadron.hh"
#include "G4Nucleon.hh"
#include "G4Parton.hh"
class G4DiffractiveSplitableHadron : public G4VSplitableHadron
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FTFModel.hh,v 1.6 1998/12/14 15:21:23 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4FTFModel.hh,v 1.1 1999/01/07 16:12:00 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4FTFModel_h
#define G4FTFModel_h 1
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FTFParticipants.hh,v 1.2 1998/08/26 17:12:00 gcosmo Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4FTFParticipants.hh,v 1.1 1999/01/07 16:12:00 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4FTFParticipants_h
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4DiffractiveSplitableHadron.cc,v 1.4 1998/11/05 17:55:36 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4DiffractiveSplitableHadron.cc,v 1.1 1999/01/07 16:12:01 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// ------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FTFModel.cc,v 1.5 1998/12/09 07:41:26 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4FTFModel.cc,v 1.1 1999/01/07 16:12:01 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// ------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FTFParticipants.cc,v 1.3 1998/11/05 16:32:47 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4FTFParticipants.cc,v 1.1 1999/01/07 16:12:01 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.1 1998/08/22 09:09:10 hpw Exp $
# $Id: GNUmakefile,v 1.1 1999/01/07 16:12:02 gunter Exp $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4TheoFSGenerator.hh,v 1.1 1998/08/22 08:54:31 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4TheoFSGenerator.hh,v 1.2 1999/04/12 15:45:28 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4TheoFSGenerator_h
#define G4TheoFSGenerator_h 1
@@ -1,18 +1,18 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4TheoFSGenerator.cc,v 1.1 1998/08/22 08:54:35 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4TheoFSGenerator.cc,v 1.3 1999/04/18 11:30:49 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4TheoFSGenerator
#include "G4DynamicParticle.hh"
#include "G4TheoFSGenerator.hh"
#include "G4ReactionProductVector.hh"
#include "G4ParticleVector.hh"
#include "G4ReactionProduct.hh"
G4TheoFSGenerator::G4TheoFSGenerator()
{
@@ -62,7 +62,7 @@ G4VParticleChange * G4TheoFSGenerator::ApplyYourself(const G4Track & thePrimary,
theHighEnergyGenerator->Scatter(theNucleus, *aPart);
// Hand over to transport for intra-nuclear transport
G4ParticleVector * theTransportResult =
G4ReactionProductVector * theTransportResult =
theTransport->Propagate(theInitialResult, theHighEnergyGenerator->GetWoundedNucleus());
// Fill particle change
@@ -70,7 +70,13 @@ G4VParticleChange * G4TheoFSGenerator::ApplyYourself(const G4Track & thePrimary,
theParticleChange->SetNumberOfSecondaries(theTransportResult->entries());
for(i=0; i<theTransportResult->entries(); i++)
{
theParticleChange->AddSecondary(theTransportResult->at(i));
G4DynamicParticle * aNew =
new G4DynamicParticle(theTransportResult->at(i)->GetDefinition(),
theTransportResult->at(i)->GetTotalEnergy(),
theTransportResult->at(i)->GetMomentum());
G4double newTime = theParticleChange->GetGlobalTime(theTransportResult->at(i)->GetFormationTime());
theParticleChange->AddSecondary(aNew, newTime);
delete theTransportResult->at(i);
}
// some garbage collection
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.3 1998/12/01 17:37:17 pavliouk Exp $
# $Id: GNUmakefile,v 1.1 1999/01/07 16:12:03 gunter Exp $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
@@ -1,5 +0,0 @@
For the moment a trivial (and hence approximative) interface to pre-equilibrium
is provided, along with the diffractive string approach in case you would like
to try the generator category in this first release.
Note that these two are fairly fresh code, and testing and
physics validation will continue.
@@ -9,7 +9,8 @@
#include "G4KineticTrackVector.hh"
#include "G4FragmentVector.hh"
#include "G4ParticleChange.hh"
#include "G4DynamicParticleVector.hh"
#include "G4ReactionProductVector.hh"
#include "G4ReactionProduct.hh"
class G4GeneratorPrecompoundInterface : public G4VIntraNuclearTransportModel
{
@@ -23,7 +24,7 @@ private:
public:
G4VParticleChange* ApplyYourself(const G4Track& aTrack, G4Nucleus& theNucleus);
G4DynamicParticleVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus);
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus);
private:
@@ -16,10 +16,10 @@
return new G4ParticleChange;
}
G4DynamicParticleVector* G4GeneratorPrecompoundInterface::
G4ReactionProductVector* G4GeneratorPrecompoundInterface::
Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
{
G4DynamicParticleVector * theTotalResult = new G4DynamicParticleVector;
G4ReactionProductVector * theTotalResult = new G4ReactionProductVector;
// decay the strong resonances
G4KineticTrackVector *result1, *secondaries, *result;
@@ -31,7 +31,7 @@
G4ParticleDefinition * pdef;
pdef=result1->at(aResult)->GetDefinition();
secondaries=NULL;
if ( pdef->GetPDGWidth() > 0 || pdef->GetPDGLifeTime() < 1*ns )
if ( pdef->IsShortLived() )
{
secondaries = result1->at(aResult)->Decay();
}
@@ -69,15 +69,24 @@
if(aTrack->GetDefinition() != G4Proton::Proton() &&
aTrack->GetDefinition() != G4Neutron::Neutron())
{
theTotalResult->insert(new G4DynamicParticle(aTrack->GetDefinition(), aTrack->Get4Momentum()));
G4ReactionProduct * theNew = new G4ReactionProduct(aTrack->GetDefinition());
theNew->SetMomentum(aTrack->Get4Momentum().vect());
theNew->SetTotalEnergy(aTrack->Get4Momentum().e());
theTotalResult->insert(theNew);
}
else if(aTrack->Get4Momentum().t() - aTrack->Get4Momentum().mag()>80*MeV)
{
theTotalResult->insert(new G4DynamicParticle(aTrack->GetDefinition(), aTrack->Get4Momentum()));
G4ReactionProduct * theNew = new G4ReactionProduct(aTrack->GetDefinition());
theNew->SetMomentum(aTrack->Get4Momentum().vect());
theNew->SetTotalEnergy(aTrack->Get4Momentum().e());
theTotalResult->insert(theNew);
}
else if(aTrack->GetPosition().mag() > theNucleus->GetNuclearRadius())
{
theTotalResult->insert(new G4DynamicParticle(aTrack->GetDefinition(), aTrack->Get4Momentum()));
G4ReactionProduct * theNew = new G4ReactionProduct(aTrack->GetDefinition());
theNew->SetMomentum(aTrack->Get4Momentum().vect());
theNew->SetTotalEnergy(aTrack->Get4Momentum().e());
theTotalResult->insert(theNew);
}
else
{
@@ -120,11 +129,11 @@
anInitialState.SetNumberOfHoles(numberOfHoles);
anInitialState.SetNumberOfExcitons(numberOfEx);
anInitialState.SetMomentum(exciton4Momentum);
anInitialState.SetExcitationEnergy(exEnergy);
// anInitialState.SetExcitationEnergy(exEnergy); // now a redundant call.
// call pre-compound
const G4Fragment aFragment(anInitialState);
G4DynamicParticleVector * aPreResult = theDeExcitation->DeExcite(aFragment);
G4ReactionProductVector * aPreResult = theDeExcitation->DeExcite(aFragment);
// fill pre-compound part into the result, and return
for(G4int ll=0; ll<aPreResult->entries(); ll++)
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.2 1998/11/24 14:15:38 pavliouk Exp $
# $Id: GNUmakefile,v 1.1 1999/01/07 16:12:04 gunter Exp $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
@@ -5,13 +5,13 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4V3DNucleus.hh,v 1.2 1998/10/30 16:36:36 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4V3DNucleus.hh,v 1.2 1999/04/15 12:10:07 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4V3DNucleus_h
#define G4V3DNucleus_h 1
#include "G4Nucleon.hh"
class G4Nucleon;
#include "G4DynamicParticle.hh"
class G4V3DNucleus
@@ -1,7 +1,8 @@
#ifndef G4VAnnihilator_h
#define G4VAnnihilator_h 1
#include "G4KineticTrackVector.hh"
class G4KineticTrackVector;
class G4KineticTrack;
class G4VAnnihilator
@@ -1,7 +1,8 @@
#ifndef G4VElasticScatterer_h
#define G4VElasticScatterer_h 1
#include "G4KineticTrackVector.hh"
class G4KineticTrackVector;
class G4KineticTrack;
class G4VElasticScatterer
{
@@ -5,15 +5,15 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VHighEnergyGenerator.hh,v 1.1 1998/08/22 08:55:44 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VHighEnergyGenerator.hh,v 1.2 1999/04/15 12:10:08 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4VHighEnergyGenerator_h
#define G4VHighEnergyGenerator_h 1
#include "G4Nucleus.hh"
#include "G4Track.hh"
#include "G4KineticTrackVector.hh"
class G4KineticTrackVector;
#include "G4ReactionProduct.hh"
#include "G4V3DNucleus.hh"
@@ -1,7 +1,8 @@
#ifndef G4VInElasticScatterer_h
#define G4VInElasticScatterer_h 1
#include "G4KineticTrackVector.hh"
class G4KineticTrackVector;
class G4KineticTrack;
class G4VInElasticScatterer
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VIntraNuclearTransportModel.hh,v 1.2 1998/11/27 08:26:52 pavliouk Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VIntraNuclearTransportModel.hh,v 1.3 1999/04/15 12:10:09 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// $Id: G4IntraNuclearTransportMode.hh,v 1.0 1998/06/30
// -----------------------------------------------------------------------------
@@ -26,9 +26,10 @@
#include "G4V3DNucleus.hh"
#include "G4VPreCompoundModel.hh"
#include "G4HadronicInteraction.hh"
#include "G4DynamicParticleVector.hh"
#include "G4ReactionProductVector.hh"
#include "G4ReactionProduct.hh"
#include "G4Track.hh"
class G4KineticTrackVector;
class G4VIntraNuclearTransportModel : public G4HadronicInteraction
@@ -51,7 +52,7 @@ class G4VIntraNuclearTransportModel : public G4HadronicInteraction
virtual G4VParticleChange* ApplyYourself(const G4Track& aTrack,
G4Nucleus& theNucleus) = 0;
virtual G4DynamicParticleVector* Propagate(G4KineticTrackVector* theSecondaries,
virtual G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries,
G4V3DNucleus* theNucleus) = 0;
void SetDeExcitation(G4VPreCompoundModel* const value);
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VKineticNucleon.hh,v 1.1 1998/08/22 08:57:57 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VKineticNucleon.hh,v 1.1 1999/04/15 12:10:09 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4VKineticNucleon_h
#define G4VKineticNucleon_h 1
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VNuclearDensity.hh,v 1.2 1998/10/30 16:35:21 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VNuclearDensity.hh,v 1.1 1999/01/07 16:12:05 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4VNuclearDensity_h
#define G4VNuclearDensity_h 1
@@ -5,15 +5,16 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VPreCompoundModel.hh,v 1.5 1998/11/13 17:27:29 larazb Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VPreCompoundModel.hh,v 1.2 1999/04/12 15:45:38 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4VPreCompoundModel_h
#define G4VPreCompoundModel_h 1
#include "G4HadronicInteraction.hh"
#include "G4DynamicParticleVector.hh"
#include "G4ReactionProductVector.hh"
#include "G4ReactionProduct.hh"
class G4Track;
class G4VParticleChange;
class G4Nucleus;
@@ -42,7 +43,7 @@ public:
virtual G4VParticleChange *
ApplyYourself(const G4Track & thePrimary, G4Nucleus & theNucleus) = 0;
virtual G4DynamicParticleVector*
virtual G4ReactionProductVector*
DeExcite(const G4Fragment& aFragment) const = 0;
void SetExcitationHandler(G4ExcitationHandler *const value);
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4V3DNucleus.cc,v 1.1 1998/08/22 08:55:54 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4V3DNucleus.cc,v 1.1 1999/01/07 16:12:07 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#include "G4V3DNucleus.hh"
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VHighEnergyGenerator.cc,v 1.1 1998/08/22 08:55:56 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VHighEnergyGenerator.cc,v 1.1 1999/01/07 16:12:07 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VHighEnergyGenerator
#include "G4VHighEnergyGenerator.hh"
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VIntraNuclearTransportModel.cc,v 1.1 1998/08/22 08:55:58 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VIntraNuclearTransportModel.cc,v 1.2 1999/07/06 07:28:06 fjones Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// $Id: G4VIntraNuclearTransportModel.cc,v 1.0 1998/06/30
// -----------------------------------------------------------------------------
@@ -15,6 +15,8 @@
// For information related to this code contact:
// CERN, CN Division, ASD Group
// History: first implementation, A. Feliciello, 30th June 1998
// Removed delete of DeExcitation model, deleted elsewhere.
// F.W.Jones, 06-JUL-99
// -----------------------------------------------------------------------------
#include "G4VIntraNuclearTransportModel.hh"
@@ -42,7 +44,8 @@ G4VIntraNuclearTransportModel(const G4VIntraNuclearTransportModel& right)
G4VIntraNuclearTransportModel::~G4VIntraNuclearTransportModel()
{
if(the3DNucleus!=NULL) delete the3DNucleus;
if(theDeExcitation!=NULL) delete theDeExcitation;
// This is deleted by ~G4HadronicInteractionRegistry
// if(theDeExcitation!=NULL) delete theDeExcitation;
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VKineticNucleon.cc,v 1.1 1998/08/22 08:58:11 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VKineticNucleon.cc,v 1.1 1999/04/15 12:10:12 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#include "G4VKineticNucleon.hh"
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VNuclearDensity.cc,v 1.1 1998/08/22 08:55:59 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VNuclearDensity.cc,v 1.1 1999/01/07 16:12:08 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#include "G4VNuclearDensity.hh"
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VPreCompoundModel.cc,v 1.3 1998/09/28 09:25:23 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VPreCompoundModel.cc,v 1.1 1999/01/07 16:12:08 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#include "G4VPreCompoundModel.hh"
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.1 1998/08/22 09:08:30 hpw Exp $
# $Id: GNUmakefile,v 1.1 1999/01/07 16:12:09 gunter Exp $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PreCompoundModel.hh,v 1.5 1998/12/12 12:32:22 larazb Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4PreCompoundModel.hh,v 1.4 1999/04/15 12:10:14 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// by V. Lara
@@ -28,6 +28,7 @@
#include "G4VPreCompoundFragment.hh"
#include "G4PreCompoundParameters.hh"
#include "G4ExcitationHandler.hh"
#include "G4Fragment.hh"
#include "Randomize.hh"
@@ -58,7 +59,7 @@ private:
public:
G4VParticleChange * ApplyYourself(const G4Track & thePrimary, G4Nucleus & theNucleus);
G4DynamicParticleVector* DeExcite(const G4Fragment& aFragment) const;
G4ReactionProductVector* DeExcite(const G4Fragment& aFragment) const;
private:
@@ -75,11 +76,14 @@ private:
G4ThreeVector IsotropicRandom3Vetor(G4double Magnitude = 1.0) const;
G4ThreeVector IsotropicRandom3Vector(G4double Magnitude = 1.0) const;
void PerformEquilibriumEmission(const G4Fragment & aFragment,
G4DynamicParticleVector * theResult) const;
G4ReactionProductVector * theResult) const;
G4ParticleMomentum RotateMomentum(G4ParticleMomentum Pa, G4ParticleMomentum V,
G4ParticleMomentum P) const;
};
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PreCompoundModel.cc,v 1.13 1998/12/14 21:46:55 larazb Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4PreCompoundModel.cc,v 1.6 1999/06/23 09:49:06 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// by V. Lara
@@ -63,95 +63,100 @@ G4bool G4PreCompoundModel::operator!=(const G4PreCompoundModel &right) const
G4VParticleChange * G4PreCompoundModel::ApplyYourself(const G4Track & thePrimary,
G4Nucleus & theNucleus)
{
theResult.Initialize(thePrimary);
// prepare fragment
G4Fragment anInitialState;
G4int anA=theNucleus.GetN();
anA += thePrimary.GetDynamicParticle()->GetDefinition()->GetBaryonNumber();
anInitialState.SetA(anA);
G4int aZ=theNucleus.GetZ();
aZ += thePrimary.GetDynamicParticle()->GetDefinition()->GetPDGCharge();
anInitialState.SetZ(aZ);
// Nucleus mass
// G4double nucleusMass =
// (theNucleus.GetN()-theNucleus.GetZ())*G4Neutron::Neutron()->GetPDGMass()
// + theNucleus.GetZ()*G4Proton::Proton()->GetPDGMass()
// - G4NucleiPropertiesTable::GetBindingEnergy(theNucleus.GetN() , theNucleus.GetZ());
G4double nucleusMass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(theNucleus.GetZ()
,theNucleus.GetN());
theResult.Initialize(thePrimary);
// prepare fragment
G4Fragment anInitialState;
G4int anA=theNucleus.GetN();
anA += thePrimary.GetDynamicParticle()->GetDefinition()->GetBaryonNumber();
anInitialState.SetA(anA);
G4int aZ=theNucleus.GetZ();
aZ += thePrimary.GetDynamicParticle()->GetDefinition()->GetPDGCharge();
anInitialState.SetZ(aZ);
// Nucleus mass
// G4double nucleusMass =
// (theNucleus.GetN()-theNucleus.GetZ())*G4Neutron::Neutron()->GetPDGMass()
// + theNucleus.GetZ()*G4Proton::Proton()->GetPDGMass()
// - G4NucleiPropertiesTable::GetBindingEnergy(theNucleus.GetN() , theNucleus.GetZ());
G4double nucleusMass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(theNucleus.GetZ(),
theNucleus.GetN());
// Excitation Energy
G4double anEnergy = 0;
anEnergy = nucleusMass + thePrimary.GetTotalEnergy();
G4double anEnergy = 0;
anEnergy = nucleusMass + thePrimary.GetTotalEnergy();
// anEnergy += -aZ*G4Proton::Proton()->GetPDGMass()
// - (anA-aZ)*G4Neutron::Neutron()->GetPDGMass()
// -G4NucleiPropertiesTable::GetBindingEnergy(anA,aZ);
anEnergy -= G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(aZ,anA);
anInitialState.SetExcitationEnergy(anEnergy);
// Number of Excitons
anInitialState.SetNumberOfExcitons(thePrimary.GetDynamicParticle()->GetDefinition()->GetBaryonNumber());
// Number of Charged
anInitialState.SetNumberOfCharged(thePrimary.GetDynamicParticle()->GetDefinition()->GetPDGCharge());
// Number of Holes
anInitialState.SetNumberOfHoles(0);
// Momentum
G4ThreeVector p = thePrimary.GetDynamicParticle()->Get4Momentum().vect();
G4LorentzVector momentum(p, sqrt(p.mag2()+(anEnergy+nucleusMass) * (anEnergy+nucleusMass)) );
anInitialState.SetMomentum(momentum);
// call excitation handler
const G4Fragment aFragment(anInitialState);
G4DynamicParticleVector * result = DeExcite(aFragment);
// fill particle change
theResult.SetStatusChange(fStopAndKill);
theResult.SetNumberOfSecondaries(result->length());
for(G4int i=0; i<result->length(); i++)
{
theResult.AddSecondary(result->at(i));
}
delete result;
//return the filled particle change
return &theResult;
anEnergy -= G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(aZ,anA);
// anInitialState.SetExcitationEnergy(anEnergy);
// Number of Excitons
anInitialState.SetNumberOfExcitons(thePrimary.GetDynamicParticle()->GetDefinition()->GetBaryonNumber());
// Number of Charged
anInitialState.SetNumberOfCharged(thePrimary.GetDynamicParticle()->GetDefinition()->GetPDGCharge());
// Number of Holes
anInitialState.SetNumberOfHoles(0);
// Momentum
G4ThreeVector p = thePrimary.GetDynamicParticle()->Get4Momentum().vect();
G4LorentzVector momentum(p, sqrt(p.mag2()+(anEnergy+nucleusMass) * (anEnergy+nucleusMass)) );
anInitialState.SetMomentum(momentum);
// call excitation handler
const G4Fragment aFragment(anInitialState);
G4ReactionProductVector * result = DeExcite(aFragment);
// fill particle change
theResult.SetStatusChange(fStopAndKill);
theResult.SetNumberOfSecondaries(result->length());
for(G4int i=0; i<result->length(); i++)
{
G4DynamicParticle * aNew =
new G4DynamicParticle(result->at(i)->GetDefinition(),
result->at(i)->GetTotalEnergy(),
result->at(i)->GetMomentum());
delete result->at(i);
theResult.AddSecondary(aNew);
}
delete result;
//return the filled particle change
return &theResult;
}
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
G4DynamicParticleVector* G4PreCompoundModel::DeExcite(const G4Fragment & theInitialState) const
G4ReactionProductVector* G4PreCompoundModel::DeExcite(const G4Fragment & theInitialState) const
{
G4DynamicParticleVector * Result = new G4DynamicParticleVector;
G4ReactionProductVector * Result = new G4ReactionProductVector;
// result = GetExcitationHandler()->BreakItUp(aFragment);
G4Fragment aFragment(theInitialState);
// Main loop. It is performed until equilibrium deexcitation.
for (;;) {
// Compute atomic numbers and charges for rest nuclei
for (G4int i = 0; i < NumberOfPossibleFragments; i++) {
theChannels(i)->Init(aFragment);
theChannels(i)->Init(aFragment);
}
// Equilibrium exciton number
G4double EquilibriumExcitonNumber = sqrt(1.19*G4PreCompoundParameters::GetAddress()->GetLevelDensity()*
aFragment.GetA()*aFragment.GetExcitationEnergy()/MeV+0.5);
// Loop for transitions, it is performed while there are preequilibrium transitions.
G4bool ThereIsTransition = false;
do {
@@ -160,22 +165,22 @@ G4DynamicParticleVector* G4PreCompoundModel::DeExcite(const G4Fragment & theInit
aFragment.SetNumberOfHoles(aFragment.GetNumberOfHoles()+1);
aFragment.SetNumberOfExcitons(aFragment.GetNumberOfExcitons()+2);
}
G4double TotalEmissionProbability = 0.0;
G4int i;
for (i = 0; i < NumberOfPossibleFragments; i++) {
theChannels(i)->CalcExcitonLevelDensityRatios(
aFragment.GetNumberOfParticles()+aFragment.GetNumberOfHoles(),
aFragment.GetNumberOfParticles());
theChannels(i)->CalcExcitonLevelDensityRatios(aFragment.GetNumberOfParticles()+
aFragment.GetNumberOfHoles(),
aFragment.GetNumberOfParticles());
theChannels(i)->CalcCondensationProbability(aFragment.GetA());
// Calculate emission probailities
// Calculate emission probailities
if (aFragment.GetNumberOfParticles() <= theChannels(i)->GetA()-0.01)
// if number of particles less than a fragment atomic number
// set probability to emit a fragment 0
theChannels(i)->SetEmissionProbability(0.0);
else if (aFragment.GetNumberOfExcitons() <= theChannels(i)->GetA()+0.01 &&
aFragment.GetNumberOfExcitons() != 1)
theChannels(i)->SetEmissionProbability(0.0);
aFragment.GetNumberOfExcitons() != 1)
theChannels(i)->SetEmissionProbability(0.0);
else if (aFragment.GetNumberOfCharged() <= theChannels(i)->GetZ()-0.01)
// if number of charged particles (protons) is less than charge of fragment
// set probability to emit a fragment 0
@@ -220,7 +225,7 @@ G4DynamicParticleVector* G4PreCompoundModel::DeExcite(const G4Fragment & theInit
// With weight Z/A, number of charged particles is decreased on +1
if ((deltaN > 0 || aFragment.GetNumberOfCharged() > 0) &&
(G4UniformRand() <= aFragment.GetZ()/aFragment.GetA()))
aFragment.SetNumberOfCharged(aFragment.GetNumberOfCharged()+deltaN/2);
aFragment.SetNumberOfCharged(aFragment.GetNumberOfCharged()+deltaN/2);
} else {
// It will be fragment emission
ThereIsTransition = false;
@@ -228,7 +233,7 @@ G4DynamicParticleVector* G4PreCompoundModel::DeExcite(const G4Fragment & theInit
running[0] = theChannels(0)->GetEmissionProbability();
for (i = 1; i < NumberOfPossibleFragments; i++)
running[i]=running[i-1]+theChannels(i)->GetEmissionProbability();
// Choose an emission channel
G4double ChoosedChannel = G4UniformRand()*TotalEmissionProbability;
G4int aChannel = -1;
@@ -244,7 +249,57 @@ G4DynamicParticleVector* G4PreCompoundModel::DeExcite(const G4Fragment & theInit
G4double KineticEnergyOfEmittedFragment =
theChannels(aChannel)->GetKineticEnergy(aFragment);
// G4cout << "Kinetic energy of Emitted fragment " << KineticEnergyOfEmittedFragment << endl;
// G4cout << "Kinetic energy of Emitted fragment " << KineticEnergyOfEmittedFragment << endl;
// Sample Fermi momentum of emitted fragment
static const G4double FermiMaxMom = 250.0; // MeV
G4ThreeVector FermiMomentum(IsotropicRandom3Vector(FermiMaxMom*pow(G4UniformRand(),1./3.)));
G4ThreeVector P12(FermiMomentum +
// (1/#Particles before emission)
( 1.0/G4double(aFragment.GetNumberOfParticles()) )*
aFragment.GetMomentum().vect()
);
G4double p = sqrt(KineticEnergyOfEmittedFragment*(KineticEnergyOfEmittedFragment+
2.0*theChannels(aChannel)->GetNuclearMass()));
G4ParticleMomentum momentum;
if (aFragment.GetMomentum().boostVector().mag2() > 1.e-7) {
// sample a non-isotropic random vector
G4double CosTheta = sqrt(G4UniformRand());
G4double SinTheta = sqrt(1.0 - CosTheta*CosTheta);
G4double Phi = twopi*G4UniformRand();
momentum = G4ParticleMomentum(p*cos(Phi)*SinTheta,
p*sin(Phi)*SinTheta,
p*CosTheta);
momentum = RotateMomentum(P12,aFragment.GetMomentum().boostVector(),momentum);
} else {
momentum = IsotropicRandom3Vector(p);
}
G4LorentzVector EmittedMomentum(momentum,
sqrt(momentum.mag2()+
theChannels(aChannel)->GetNuclearMass() *
theChannels(aChannel)->GetNuclearMass() )
);
// Excitation energy
// check that Excitation energy is > 0
G4double CheckU = theChannels(aChannel)->GetMaximalKineticEnergy() -
KineticEnergyOfEmittedFragment +
theChannels(aChannel)->GetCoulombBarrier();
if (CheckU < 0.0)
G4Exception("G4PreCompoundModel::DeExcite: Excitation energy less than 0! ");
// Update nucleus parameters
// Number of excitons
@@ -253,57 +308,21 @@ G4DynamicParticleVector* G4PreCompoundModel::DeExcite(const G4Fragment & theInit
// Number of charges
aFragment.SetNumberOfCharged(aFragment.GetNumberOfCharged()-
G4int(theChannels(aChannel)->GetZ()));
// Excitation energy
// check that Excitation energy is > 0
G4double CheckU = theChannels(aChannel)->GetMaximalKineticEnergy() -
KineticEnergyOfEmittedFragment +
theChannels(aChannel)->GetCoulombBarrier();
if (CheckU < 0.0)
G4Exception("G4PreCompoundModel::DeExcite: Excitation energy less than 0! ");
aFragment.SetExcitationEnergy(CheckU);
// Atomic number
aFragment.SetA(theChannels(aChannel)->GetRestA());
// Charge
aFragment.SetZ(theChannels(aChannel)->GetRestZ());
// Emited fragment Velocity
// G4double EmittedFragmentVel = sqrt((2.0*KineticEnergyOfEmittedFragment)/
// ( (theChannels(aChannel)->GetNuclearMass()*
// theChannels(aChannel)->GetRestA())/
// (theChannels(aChannel)->GetRestA()+
// theChannels(aChannel)->GetA()))
// );
//G4ParticleMomentum momentum =
// IsotropicRandom3Vetor(EmittedFragmentVel*
// theChannels(aChannel)->GetNuclearMass()/
// (1.0+theChannels(aChannel)->GetA()/
// theChannels(aChannel)->GetRestA()));
G4double p = sqrt(KineticEnergyOfEmittedFragment*(KineticEnergyOfEmittedFragment+
2.0*theChannels(aChannel)->GetNuclearMass()));
G4ParticleMomentum momentum = IsotropicRandom3Vetor(p);
G4LorentzVector EmittedMomentum(momentum,
sqrt(momentum.mag2()+
theChannels(aChannel)->GetNuclearMass() *
theChannels(aChannel)->GetNuclearMass() )
);
// aFragment.SetExcitationEnergy(CheckU);
G4LorentzVector RestMomentum(-momentum,
sqrt(momentum.mag2()+
(theChannels(aChannel)->GetRestNuclearMass()+
aFragment.GetExcitationEnergy()) *
(theChannels(aChannel)->GetRestNuclearMass()+
aFragment.GetExcitationEnergy()
))
);
(theChannels(aChannel)->GetRestNuclearMass()+CheckU)*
(theChannels(aChannel)->GetRestNuclearMass()+CheckU)
)
);
// Perform Lorentz boosts
EmittedMomentum.boost(aFragment.GetMomentum().boostVector());
RestMomentum.boost(aFragment.GetMomentum().boostVector());
@@ -314,9 +333,14 @@ G4DynamicParticleVector* G4PreCompoundModel::DeExcite(const G4Fragment & theInit
// Set emitted fragment momentum
theChannels(aChannel)->SetMomentum(EmittedMomentum);
// Add emitted fragment to Result
G4DynamicParticle * MyDP = new G4DynamicParticle(theChannels(aChannel)->GetDynamicParticle());
Result->insert(MyDP);
G4DynamicParticle MyDP = theChannels(aChannel)->GetDynamicParticle();
G4ReactionProduct * theNew = new G4ReactionProduct(MyDP.GetDefinition());
theNew->SetMomentum(MyDP.GetMomentum());
theNew->SetTotalEnergy(MyDP.Get4Momentum().e());
// delete MyDP;
Result->insert(theNew);
}
} else {
// Perform Equilibrium Emission
@@ -329,7 +353,7 @@ G4DynamicParticleVector* G4PreCompoundModel::DeExcite(const G4Fragment & theInit
G4ThreeVector G4PreCompoundModel::IsotropicRandom3Vetor(G4double Magnitude) const
G4ThreeVector G4PreCompoundModel::IsotropicRandom3Vector(G4double Magnitude) const
// Create a unit vector with a random direction isotropically distributed
{
@@ -346,15 +370,11 @@ G4ThreeVector G4PreCompoundModel::IsotropicRandom3Vetor(G4double Magnitude) cons
void G4PreCompoundModel::PerformEquilibriumEmission(const G4Fragment & aFragment,
G4DynamicParticleVector * Result) const
G4ReactionProductVector * Result) const
{
for (G4int j = 0; j < Result->entries(); j++)
G4LorentzVector mom(Result->at(j)->Get4Momentum());
G4DynamicParticleVector * theEquilibriumResult;
G4ReactionProductVector * theEquilibriumResult;
theEquilibriumResult = GetExcitationHandler()->BreakItUp(aFragment);
while (theEquilibriumResult->entries() > 0)
@@ -364,3 +384,25 @@ void G4PreCompoundModel::PerformEquilibriumEmission(const G4Fragment & aFragment
return;
}
G4ParticleMomentum G4PreCompoundModel::RotateMomentum(G4ParticleMomentum Pa,
G4ParticleMomentum V,
G4ParticleMomentum P) const
{
G4ParticleMomentum U = Pa.unit();
G4double Alpha1 = U * V;
G4double Alpha2 = sqrt(V.mag2() - Alpha1*Alpha1);
G4ThreeVector N = (1./Alpha2)*U.cross(V);
G4ParticleMomentum RotatedMomentum(
( (V.x() - Alpha1*U.x())/Alpha2 ) * P.x() + N.x() * P.y() + U.x() * P.z(),
( (V.y() - Alpha1*U.y())/Alpha2 ) * P.x() + N.y() * P.y() + U.y() * P.z(),
( (V.z() - Alpha1*U.z())/Alpha2 ) * P.x() + N.z() * P.y() + U.z() * P.z()
);
return RotatedMomentum;
}
@@ -17,18 +17,32 @@ ProbabilityDistributionFunction(const G4double & eKin,
{
const G4double r0 = 1.5; // fm
const G4double SingleParticleLevelDensity =
0.595*G4PreCompoundParameters::GetAddress()->GetLevelDensity(); // AC
0.595*G4PreCompoundParameters::GetAddress()->GetLevelDensity(); // AC
G4double R0J = 1.1;
G4double exEnergy = aFragment.GetExcitationEnergy()/MeV;
G4double probA = GetCondensationProbability()*R0J*0.104/
(r0*pow(GetRestA(),1.0/3.0)*sqrt(GetA()*exEnergy));
G4double probB = GetExcitonLevelDensityRatio()*
( (eKin-GetCoulombBarrier())/exEnergy );
G4double ratio = (eKin+GetBindingEnergy() )/exEnergy;
G4double exponent = GetRestA()-1.5;
if ( exponent>100. && ratio<1. ) return 0.;
G4double probC = pow( ratio, exponent );
G4double probD = pow( 1.0 - ratio,
aFragment.GetNumberOfExcitons()-GetA()-1.0 ) ;
// return GetCondensationProbability()*R0J*0.104/
// (r0*pow(GetRestA(),1.0/3.0)*sqrt(GetA()*exEnergy))*
// GetExcitonLevelDensityRatio()*
// ( (eKin-GetCoulombBarrier())/exEnergy )*
// pow( ( (eKin+GetBindingEnergy() )/exEnergy), GetRestA()-1.5)*
// pow(1.0 - (eKin + GetBindingEnergy())/exEnergy ,
// aFragment.GetNumberOfExcitons()-GetA()-1.0 ) ;
return GetCondensationProbability()*R0J*0.104/
(r0*pow(GetRestA(),1.0/3.0)*sqrt(GetA()*exEnergy))*
GetExcitonLevelDensityRatio()*
( (eKin-GetCoulombBarrier())/exEnergy )*
pow( ( (eKin+GetBindingEnergy() )/exEnergy), GetRestA()-1.5)*
pow(1.0 - (eKin + GetBindingEnergy())/exEnergy ,
aFragment.GetNumberOfExcitons()-GetA()-1.0 ) ;
G4double prob = probA*probB*probC*probD;
if (prob < 1.e-100) return 0.;
else return prob;
// Corrections in return statemet by V. Krylov:
// - GetA() and GetRestA() were intechanged
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.1 1998/08/22 09:09:03 hpw Exp $
# $Id: GNUmakefile,v 1.1 1999/01/07 16:12:13 gunter Exp $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
@@ -5,7 +5,7 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4DiffractiveExcitation.hh,v 1.3 1998/12/09 07:30:23 gunter Exp $
// $Id: G4DiffractiveExcitation.hh,v 1.2 1999/04/12 15:45:54 hpw Exp $
#ifndef G4DiffractiveExcitation_h
#define G4DiffractiveExcitation_h 1
@@ -36,6 +36,10 @@ class G4DiffractiveExcitation
G4bool ExciteParticipants (G4VSplitableHadron *aPartner, G4VSplitableHadron * bPartner) const;
G4ExcitedString * String(G4VSplitableHadron * aHadron, G4bool isProjectile) const;
// void SetPtWidth(G4double aValue) { widthOfPtSquare = aValue*aValue; }
// void SetExtraMass(G4double aValue) { minExtraMass = aValue; }
// void SetMinimumMass(G4double aValue) { minmass = aValue; }
private:
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4EventGenerator.hh,v 1.1 1998/08/22 08:57:14 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4EventGenerator.hh,v 1.1 1999/01/07 16:12:13 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4EventGenerator_h
#define G4EventGenerator_h 1
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4InteractionCode.hh,v 1.1 1998/08/22 08:57:15 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4InteractionCode.hh,v 1.1 1999/01/07 16:12:14 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4InteractionCode_h
#define G4InteractionCode_h 1
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4InteractionContent.hh,v 1.2 1998/10/16 07:35:52 maxim Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4InteractionContent.hh,v 1.1 1999/01/07 16:12:14 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4InteractionContent_h
@@ -7,8 +7,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PomeronCrossSection.hh,v 1.4 1998/12/12 19:13:51 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4PomeronCrossSection.hh,v 1.2 1999/04/12 15:45:54 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#include "G4Proton.hh"
#include "G4Neutron.hh"
@@ -66,6 +66,15 @@ class G4PomeronCrossSection
void Setgamma(const G4double agam); // temporary only! GF.
G4double SoftEikonal(G4double s, G4double impactsquare);
G4double HardEikonal(G4double s, G4double impactsquare);
void Pomeron_S(G4double apomeron_S){ pomeron_S = apomeron_S;}
void Pomeron_Gamma(G4double apomeron_Gamma){ pomeron_Gamma = apomeron_Gamma;}
void Pomeron_C(G4double apomeron_C){ pomeron_C = apomeron_C;}
void Pomeron_Rsquare(G4double apomeron_Rsquare){ pomeron_Rsquare = apomeron_Rsquare;}
void Pomeron_Alpha(G4double apomeron_Alpha){ pomeron_Alpha = apomeron_Alpha;}
void Pomeron_Alphaprime(G4double apomeron_Alphaprime){ pomeron_Alphaprime = apomeron_Alphaprime;}
void Pomeron_Gamma_Hard(G4double apomeron_Gamma_Hard){ pomeron_Gamma_Hard = apomeron_Gamma_Hard;}
void Pomeron_Alpha_Hard(G4double apomeron_Alpha_Hard){ pomeron_Alpha_Hard = apomeron_Alpha_Hard;}
private:
G4double PowerSoft(const G4double s);
@@ -5,14 +5,15 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4StringModel.hh,v 1.1 1998/08/22 08:57:16 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4StringModel.hh,v 1.2 1999/04/15 12:10:15 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4StringModel_h
#define G4StringModel_h 1
#include "G4VHighEnergyGenerator.hh"
#include "G4EventGenerator.hh"
#include "G4KineticTrackVector.hh"
class G4V3DNucleus;
class G4VStringFragmentation;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VParticipants.hh,v 1.1 1998/08/22 08:55:46 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VParticipants.hh,v 1.1 1999/04/15 09:33:55 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4VParticipants_h
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VPartonStringModel.hh,v 1.2 1998/10/09 13:33:29 maxim Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VPartonStringModel.hh,v 1.2 1999/04/15 12:10:15 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4VPartonStringModel_h
#define G4VPartonStringModel_h 1
@@ -30,6 +30,7 @@
#include "G4ExcitedStringVector.hh"
#include "G4VStringFragmentation.hh"
#include "G4V3DNucleus.hh"
#include "G4KineticTrackVector.hh"
class G4VPartonStringModel : public G4VHighEnergyGenerator
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VSplitableHadron.hh,v 1.6 1998/11/06 10:02:54 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VSplitableHadron.hh,v 1.1 1999/05/06 13:52:59 stesting Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4VSplitableHadron_h
@@ -23,13 +23,13 @@
// ------------------------------------------------------------
#include "globals.hh"
class G4ParticleDefinition;
#include "G4ParticleDefinition.hh"
#include "G4ReactionProduct.hh"
#include "G4Nucleon.hh"
class G4Nucleon;
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4Parton.hh"
class G4Parton;
class G4VKineticNucleon;
#include <rw/tpordvec.h>
@@ -5,15 +5,15 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VStringFragmentation.hh,v 1.1 1998/08/22 08:55:48 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VStringFragmentation.hh,v 1.1 1999/05/06 13:53:00 stesting Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4VStringFragmentation_h
#define G4VStringFragmentation_h 1
#include "G4ExcitedString.hh"
//GF#include "G4ReactionProductVector.hh"
#include "G4KineticTrackVector.hh"
class G4KineticTrackVector;
class G4VStringFragmentation
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VertexCode.hh,v 1.1 1998/08/22 08:57:18 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VertexCode.hh,v 1.1 1999/01/07 16:12:15 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4VertexCode_h
#define G4VertexCode_h 1
@@ -5,7 +5,7 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4DiffractiveExcitation.cc,v 1.11 1998/12/17 01:11:48 gcosmo Exp $
// $Id: G4DiffractiveExcitation.cc,v 1.4 1999/04/15 15:35:55 hpw Exp $
// ------------------------------------------------------------
// GEANT 4 class implemetation file
//
@@ -262,6 +262,7 @@ G4double G4DiffractiveExcitation::ChooseX(G4double Xmin, G4double Xmax) const
x=Xmin + G4UniformRand() * range;
} while ( Xmin/x < G4UniformRand() );
//debug-hpw cout << "DiffractiveX "<<x<<endl;
return x;
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4EventGenerator.cc,v 1.1 1998/08/22 08:57:24 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4EventGenerator.cc,v 1.1 1999/01/07 16:12:15 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4EventGenerator
#include "G4EventGenerator.hh"
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4InteractionContent.cc,v 1.2 1998/10/08 16:20:37 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4InteractionContent.cc,v 1.1 1999/01/07 16:12:15 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PomeronCrossSection.cc,v 1.7 1998/12/10 08:58:23 maxim Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4PomeronCrossSection.cc,v 1.2 1999/04/12 15:45:57 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#include "G4PomeronCrossSection.hh"
@@ -157,12 +157,15 @@ void G4PomeronCrossSection::Setgamma(const G4double agam)
void G4PomeronCrossSection::InitForNucleon()
{
pomeron_S= 3.0*GeV*GeV;
// pomeron_S= 3.0*GeV*GeV;
pomeron_S= 2.7*GeV*GeV;
// pomeron_Gamma= 2.16/GeV/GeV;
pomeron_Gamma= 3.96/GeV/GeV;
// pomeron_Gamma= 3.96/GeV/GeV;
pomeron_Gamma= (2.6+3.96)/GeV/GeV;
pomeron_C= 1.4;
pomeron_Rsquare= 3.56/GeV/GeV;
pomeron_Alpha= 1.0808;
// pomeron_Alpha= 1.0808;
pomeron_Alpha= 0.9808;
pomeron_Alphaprime= 0.25/GeV/GeV;
pomeron_Gamma_Hard = 0.0002/GeV/GeV; // Note! if pomeron_Gamma_Hard != 0 to fit total pp-crosscection
// pomeron_Gamma_Soft shold be 2.35/GeV/GeV
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4StringModel.cc,v 1.1 1998/08/22 08:57:25 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4StringModel.cc,v 1.1 1999/01/07 16:12:16 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4StringModel
#include "G4StringModel.hh"
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VParticipants.cc,v 1.1 1998/08/22 08:55:59 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VParticipants.cc,v 1.1 1999/04/15 09:33:38 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VPartonStringModel.cc,v 1.10 1998/12/16 14:59:13 gugu Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VPartonStringModel.cc,v 1.2 1999/04/15 09:32:43 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -103,6 +103,10 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
// G4cout << " strings["<<astring<<"] Momentum " << strings->at(astring)->Get4Momentum() << endl;
// G4cout << " strings["<<astring<<"] Mass " << strings->at(astring)->Get4Momentum().mag() << endl;
// G4cout << " strings["<<astring<<"] Position " << strings->at(astring)->GetPosition() << endl;
// G4cout << "Parton Left " << strings->at(astring)->GetLeftParton()->Get4Momentum() << endl;
// G4cout << " code " << strings->at(astring)->GetLeftParton()->GetPDGcode()<< endl;
// G4cout << "Parton Right " << strings->at(astring)->GetRightParton()->Get4Momentum() << endl;
// G4cout << " code " << strings->at(astring)->GetRightParton()->GetPDGcode()<< endl;
generatedKineticTracks=stringFragmentationModel->FragmentString(*strings->at(astring));
@@ -110,7 +114,7 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
if (generatedKineticTracks == NULL)
{
G4cout << "No KineticTracks produced" << endl;
G4cout << "G4VPartonStringModel:No KineticTracks produced" << endl;
continue;
}
@@ -142,13 +146,13 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
// G4cout << " KTsum Momentum " << KTsum << endl;
// G4cout << " KTsum Mass " << KTsum.mag() << endl;
if ( abs( KTsum1.e() - strings->at(astring)->Get4Momentum().e() ) > 1. )
if ( abs( KTsum1.e() - strings->at(astring)->Get4Momentum().e() ) > 1. * MeV )
{
NeedEnergyCorrector=true;
// G4cout << " strings["<<astring<<"] Momentum " << strings->at(astring)->Get4Momentum() << endl;
// G4cout << " strings["<<astring<<"] Mass " << strings->at(astring)->Get4Momentum().mag() << endl;
// G4cout <<" number of generated tracks : " << generatedKineticTracks->entries() << endl;
// G4cout << " strings["<<astring<<"] Mass " << strings->at(astring)->Get4Momentum().mag() << endl;
// G4cout <<" number of generated tracks : " << generatedKineticTracks->entries() << endl;
// for ( G4int bTrack=0; bTrack<generatedKineticTracks->entries();bTrack++)
// {
// G4cout << " Particle : " <<
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VSplitableHadron.cc,v 1.6 1998/11/06 10:20:09 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VSplitableHadron.cc,v 1.1 1999/05/06 13:53:00 stesting Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// ------------------------------------------------------------
@@ -20,6 +20,8 @@
// ------------------------------------------------------------
#include "G4VSplitableHadron.hh"
#include "G4Nucleon.hh"
#include "G4VKineticNucleon.hh"
G4VSplitableHadron::G4VSplitableHadron()
: theCollisionCount(0), theDefinition(NULL)
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VStringFragmentation.cc,v 1.1 1998/08/22 08:56:00 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VStringFragmentation.cc,v 1.1 1999/05/06 13:53:01 stesting Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VStringFragmentation
#include "G4VStringFragmentation.hh"
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.1 1998/08/22 09:08:47 hpw Exp $
# $Id: GNUmakefile,v 1.2 1999/05/07 14:07:08 stesting Exp $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
@@ -27,6 +27,7 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
-I$(G4BASE)/processes/hadronic/cross_sections/include \
-I$(G4BASE)/processes/hadronic/models/generator/management/include \
-I$(G4BASE)/processes/hadronic/models/generator/util/include \
-I$(G4BASE)/processes/hadronic/models/generator/string_common/include \
-I$(G4BASE)/particles/management/include \
-I$(G4BASE)/particles/leptons/include \
-I$(G4BASE)/particles/bosons/include \
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ExcitedStringDecay.hh,v 1.3 1998/12/09 07:53:39 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4ExcitedStringDecay.hh,v 1.1 1999/01/07 16:12:17 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
#ifndef G4ExcitedStringDecay_h
#define G4ExcitedStringDecay_h 1
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LundStringFragmentation.hh,v 1.3 1998/12/09 07:59:36 gunter Exp $
// GEANT4 tag $Name: geant4-00 $ Maxim Komogorov
// $Id: G4LundStringFragmentation.hh,v 1.1 1999/01/07 16:12:17 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $ Maxim Komogorov
//
// -----------------------------------------------------------------------------
// GEANT 4 class implementation file
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4QGSMFragmentation.hh,v 1.3 1998/12/01 15:35:46 maxim Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4QGSMFragmentation.hh,v 1.2 1999/02/19 13:55:48 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// -----------------------------------------------------------------------------
// GEANT 4 class implementation file
@@ -25,7 +25,6 @@ class G4QGSMFragmentation:public G4VLongitudinalStringDecay
{
public:
G4QGSMFragmentation();
G4QGSMFragmentation(const G4QGSMFragmentation &right);
~G4QGSMFragmentation();
const G4QGSMFragmentation & operator=(const G4QGSMFragmentation &right);
@@ -34,9 +33,18 @@ public:
private:
virtual G4double GetLightConeZ(G4double zmin, G4double zmax, G4int PartonEncoding, G4ParticleDefinition* pHadron, G4double Px, G4double Py);
G4QGSMFragmentation(const G4QGSMFragmentation &right);
private:
// model parameters
const G4double arho;
const G4double aphi;
const G4double an;
const G4double ala;
const G4double aksi;
const G4double alft;
};
//******************************************************************************
// Class G4QGSMFragmentation
#endif
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VKinkyStringDecay.hh,v 1.2 1998/11/03 10:10:34 maxim Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VKinkyStringDecay.hh,v 1.1 1999/01/07 16:12:17 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// Maxim Komogorov
//
// -----------------------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VLongitudinalStringDecay.hh,v 1.4 1998/12/01 15:40:47 maxim Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VLongitudinalStringDecay.hh,v 1.3 1999/05/20 15:22:31 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// Maxim Komogorov
//
// -----------------------------------------------------------------------------
@@ -20,6 +20,8 @@
#define G4VLongitudinalStringDecay_h 1
#include "G4VStringFragmentation.hh"
#include "G4DynamicParticle.hh"
#include "G4KineticTrack.hh"
#include "G4KineticTrackVector.hh"
//**********************************************************************************************
@@ -32,7 +34,6 @@ public:
private:
// G4VLongitudinalStringDecay(const G4VLongitudinalStringDecay &right);
// const G4VLongitudinalStringDecay & operator=(const G4VLongitudinalStringDecay &right);
int operator==(const G4VLongitudinalStringDecay &right) const;
int operator!=(const G4VLongitudinalStringDecay &right) const;
@@ -43,14 +44,20 @@ public:
G4int SampleQuarkFlavor(void);
void SampleQuarkPt(G4double* thePx, G4double* thePy);
G4double GetDiquarkSuppress() {return DiquarkSuppress;};
G4double GetDiquarkBreakProb() {return DiquarkBreakProb;};
G4double GetStrangeSuppress() {return StrangeSuppress;};
G4double GetClusterMass() {return ClusterMass;};
G4int GetClusterLoopInterrupt() {return ClusterLoopInterrupt;};
G4ParticleDefinition* CreateHadron(G4int id1, G4int id2, G4bool theGivenSpin, G4int theSpin);
void Sample4Momentum(G4LorentzVector* Mom, G4double Mass, G4LorentzVector* AntiMom, G4double AntiMass, G4double InitialMass);
protected:
// Additional protected declarations
virtual G4double GetLightConeZ(G4double zmin, G4double zmax, G4int PartonEncoding, G4ParticleDefinition* pHadron, G4double Px, G4double Py) = 0;
G4ParticleDefinition* CreateHadron(G4int id1, G4int id2, G4bool theGivenSpin, G4int theSpin);
void CalculateHadronTimePosition(G4double theInitialStringMass, G4KineticTrackVector *);
G4ParticleDefinition* FindParticle(G4int Encoding);
void Sample4Momentum(G4LorentzVector* Mom, G4double Mass, G4LorentzVector* AntiMom, G4double AntiMass, G4double InitialMass);
// Additional Implementation Declarations
@@ -66,8 +73,89 @@ private:
G4int ClusterLoopInterrupt;
void ConstructParticle();
class SimpleString
{
private:
class SideOfString;
public:
SimpleString(const G4ExcitedString& excitedString, G4VLongitudinalStringDecay * stringdecay)
: left(new SideOfString(excitedString.GetLeftParton()->GetPDGcode(),excitedString.Get4Momentum().mag())),
right(new SideOfString(excitedString.GetRightParton()->GetPDGcode(),excitedString.Get4Momentum().mag())),
MassSquare(excitedString.Get4Momentum().mag2()),
theStringDecay(stringdecay),
decay(0), stable(0), Side(0)
{};
~SimpleString()
{
delete right;
delete left;
};
SideOfString * Left(){return left;};
SideOfString * Right(){return right;};
SideOfString * Stable(){return stable;};
SideOfString * Decay(){return decay;};
const G4double MassSquared(){return MassSquare;};
G4ParticleDefinition * Splitup(G4int & NewDecayEncoding);
G4bool SplitLast(G4KineticTrackVector * LeftVector,G4KineticTrackVector * RightVector);
G4int GetDecayDirection() { return Side;};
void update();
private:
SimpleString(){cout << " error calling bad ctor for class SimpleString"<< endl;};
SideOfString * left, * right;
SideOfString * decay, * stable;
G4double MassSquare;
G4VLongitudinalStringDecay *theStringDecay;
G4int Side;
class SideOfString
{
public:
G4int Encoding(){return theEncoding;};
G4double w(){return thew;};
G4double Px(){return thepx;};
G4double Py(){return thepy;};
void decreasew(G4double deltaw){thew -= deltaw;};
void setEncoding(G4int aEncoding){theEncoding=aEncoding;};
void setpxpy(G4double px,G4double py){thepx=px; thepy=py;};
SideOfString(G4int aEncoding, G4double aw)
{
theEncoding = aEncoding;
thew = aw;
thepx = thepy = 0;
}
;
SideOfString(void) {};
// void Init(G4int aEncoding, G4double aw) {
// theEncoding = aEncoding;
// thew = aw;
// thepx = thepy = 0;
// };
private:
G4int theEncoding;
G4double thew, thepx, thepy;
};
};
G4KineticTrackVector * LightFragmentationTest(const G4ExcitedString& theString);
G4bool StopFragmenting(SimpleString& string);
G4double IsFragmentable(SimpleString & theString);
G4double MinFragmentationMass(SimpleString & theString,
G4ParticleDefinition*& Hadron1,
G4ParticleDefinition*& Hadron2);
G4KineticTrack * SplitEandP(G4ParticleDefinition * pHadron,
SimpleString * string, G4int newDecayEncoding);
};
//**********************************************************************************************
// Class G4VLongitudinalStringDecay
#endif
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ExcitedStringDecay.cc,v 1.2 1998/12/09 07:53:44 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4ExcitedStringDecay.cc,v 1.1 1999/01/07 16:12:18 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4ExcitedStringDecay
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LundStringFragmentation.cc,v 1.3 1998/12/09 07:59:43 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4LundStringFragmentation.cc,v 1.1 1999/01/07 16:12:18 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// -----------------------------------------------------------------------------
// GEANT 4 class implementation file

Some files were not shown because too many files have changed in this diff Show More