Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
@@ -0,0 +1,18 @@
#------------------------------------------------------------------------------
# CMakeLists.txt
# Module : G4hadronic_abla_abla
# Package: Geant4.src.G4processes.G4hadronic.G4hadronic_models.G4hadronic_abla_abla
#
# CMakeLists.txt for building a single granular library.
#
# Generated on : 24/9/2010
#
# $Id: CMakeLists.txt 75830 2013-11-06 17:05:14Z gcosmo $
#
#------------------------------------------------------------------------------
if(GEANT4_BUILD_GRANULAR_LIBS)
include(Geant4MacroLibraryTargets)
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
endif()
@@ -0,0 +1,36 @@
# $Id: GNUmakefile 75830 2013-11-06 17:05:14Z gcosmo $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
name := G4hadronic_abla_abla
ifndef G4INSTALL
G4INSTALL = ../../../../..
endif
include $(G4INSTALL)/config/architecture.gmk
CPPFLAGS += -DG4HADRONIC_ALLOC_EXPORT
CPPFLAGS += -I$(G4BASE)/geometry/management/include \
-I$(G4BASE)/geometry/volumes/include \
-I$(G4BASE)/global/HEPGeometry/include \
-I$(G4BASE)/global/HEPRandom/include \
-I$(G4BASE)/global/management/include \
-I$(G4BASE)/materials/include \
-I$(G4BASE)/particles/bosons/include \
-I$(G4BASE)/particles/hadrons/barions/include \
-I$(G4BASE)/particles/hadrons/ions/include \
-I$(G4BASE)/particles/hadrons/mesons/include \
-I$(G4BASE)/particles/leptons/include \
-I$(G4BASE)/particles/management/include \
-I$(G4BASE)/processes/management/include \
-I$(G4BASE)/processes/hadronic/models/management/include \
-I$(G4BASE)/processes/hadronic/util/include \
-I$(G4BASE)/processes/hadronic/models/util/include \
-I$(G4BASE)/processes/hadronic/models/de_excitation/handler/include \
-I$(G4BASE)/processes/hadronic/models/de_excitation/evaporation/include \
-I$(G4BASE)/track/include \
-I$(G4BASE)/intercoms/include
include $(G4INSTALL)/config/common.gmk
+27 -1
View File
@@ -3,7 +3,7 @@
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
$Id: History,v 1.2 2010-11-11 02:13:12 dennis Exp $
$Id: History 76294 2013-11-08 13:13:27Z gcosmo $
---------------------------------------------------------------------
History file for the ABLA evaporation/fission model
@@ -16,6 +16,32 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
6 November 2013 - Davide Mancusi (hadr-abla-V09-06-03)
--------------------------------------------------
- Fix segfault on the production of exotic fragments.
6 November 2013 - Davide Mancusi (hadr-abla-V09-06-02)
--------------------------------------------------
- Fix clang warnings.
6 November 2013 - Davide Mancusi (hadr-abla-V09-06-01)
--------------------------------------------------
- Remove some old unused source files.
- Fix dependencies and includes in GNUmakefile and sources.cmake.
30 October 2013 - Davide Mancusi (hadr-abla-V09-06-00)
--------------------------------------------------
- Resurrect the ABLA model.
12 May 2012 - Davide Mancusi (hadr-abla-V09-05-01)
--------------------------------------------------
- Update the ABLA files to the latest version (includes some bug fixes and some
refactoring) and add build files.
15 September 2011 Dennis Wright
-------------------------------
- use new G4Exception. Files affected: G4Abla.cc, G4AblaDataFile.cc
10 November 2010 Dennis Wright
-------------------------------
- the code in this directory is not used as of this date
@@ -23,17 +23,29 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// Translation of INCL4.2/ABLA V3
// ABLAXX statistical de-excitation model
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Davide Mancusi, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
//
#define ABLAXX_IN_GEANT4_MODE 1
#include "globals.hh"
#ifndef G4Abla_hh
#define G4Abla_hh 1
#ifdef ABLAXX_IN_GEANT4_MODE
#include "globals.hh"
#else
#include "G4INCLGeant4Compat.hh"
#include "G4INCLConfig.hh"
#endif
#include "G4AblaRandom.hh"
#include "G4AblaDataDefs.hh"
#include "G4InclDataDefs.hh"
#include "G4AblaFissionBase.hh"
/**
* Class containing ABLA de-excitation code.
@@ -42,11 +54,6 @@
class G4Abla {
public:
/**
* Basic constructor.
*/
G4Abla();
/**
* This constructor is used by standalone test driver and the Geant4 interface.
*
@@ -54,14 +61,11 @@ public:
* @param aVolant data structure for ABLA output
* @param aVarNtp data structure for transfering ABLA output to Geant4 interface
*/
G4Abla(G4Hazard *aHazard, G4Volant *aVolant, G4VarNtp *aVarntp);
/**
* Constructor that is to be used only for testing purposes.
* @param aHazard random seeds
* @param aVolant data structure for ABLA output
*/
G4Abla(G4Hazard *hazard, G4Volant *volant);
#ifdef ABLAXX_IN_GEANT4_MODE
G4Abla(G4Volant *aVolant, G4VarNtp *aVarntp);
#else
G4Abla(G4INCL::Config *config, G4Volant *aVolant, G4VarNtp *aVarntp);
#endif
/**
* Basic destructor.
@@ -73,6 +77,13 @@ public:
*/
void setVerboseLevel(G4int level);
/**
* Get the internal output data structure pointer.
*/
G4Volant* getVolant() {
return volant;
}
/**
* Main interface to the de-excitation code.
*
@@ -87,7 +98,7 @@ public:
* @param momZ momentum z-component
* @param eventnumber number of the event
*/
void breakItUp(G4double nucleusA, G4double nucleusZ, G4double nucleusMass, G4double excitationEnergy,
void breakItUp(G4int nucleusA, G4int nucleusZ, G4double nucleusMass, G4double excitationEnergy,
G4double angularMomentum, G4double recoilEnergy, G4double momX, G4double momY, G4double momZ,
G4int eventnumber);
@@ -127,17 +138,17 @@ public:
/**
*
*/
// G4double spdef(G4int a, G4int z, G4int optxfis);
G4double spdef(G4int a, G4int z, G4int optxfis);
/**
* Calculation of fissility parameter
*/
// G4double fissility(int a,int z, int optxfis);
G4double fissility(int a,int z, int optxfis);
/**
* Main evaporation routine.
*/
void evapora(G4double zprf, G4double aprf, G4double ee, G4double jprf,
void evapora(G4double zprf, G4double aprf, G4double *ee_par, G4double jprf,
G4double *zf_par, G4double *af_par, G4double *mtota_par,
G4double *pleva_par, G4double *pxeva_par, G4double *pyeva_par,
G4int *ff_par, G4int *inttype_par, G4int *inum_par);
@@ -148,7 +159,7 @@ public:
void direct(G4double zprf,G4double a, G4double ee, G4double jprf,
G4double *probp_par, G4double *probn_par, G4double *proba_par,
G4double *probf_par, G4double *ptotl_par, G4double *sn_par, G4double *sbp_par, G4double *sba_par, G4double *ecn_par,
G4double *ecp_par,G4double *eca_par, G4double *bp_par, G4double *ba_par, G4int inttype, G4int inum, G4int itest);
G4double *ecp_par,G4double *eca_par, G4double *bp_par, G4double *ba_par, G4int, G4int inum, G4int itest);
/**
* Level density parameters.
@@ -223,6 +234,12 @@ public:
*/
void barfit(G4int iz, G4int ia, G4int il, G4double *sbfis, G4double *segs, G4double *selmax);
/**
* Random numbers.
*/
G4double haz(G4int k);
void standardRandom(G4double *rndm, G4long *seed);
/**
* TIRAGE ALEATOIRE DANS UNE EXPONENTIELLLE : Y=EXP(-X/T)
*/
@@ -252,38 +269,6 @@ public:
*
*/
void guet(G4double *x_par, G4double *z_par, G4double *find_par);
// Fission
public:
/**
*
*/
G4double spdef(G4int a, G4int z, G4int optxfis);
/**
*
*/
G4double fissility(G4int a, G4int z, G4int optxfis);
// void evapora(G4double zprf, G4double aprf, G4double ee, G4double jprf,
// G4double *zf_par, G4double *af_par, G4double *mtota_par,
// G4double *pleva_par, G4double *pxeva_par);
// G4double bfms67(G4double zms, G4double ams);
// void lpoly(G4double x, G4int n, G4double pl[]);
// G4double expohaz(G4int k, G4double T);
// G4double fd(G4double E);
// G4double f(G4double E);
// G4double fmaxhaz(G4double k, G4double T);
void even_odd(G4double r_origin,G4double r_even_odd,G4int &i_out);
G4double umass(G4double z,G4double n,G4double beta);
G4double ecoul(G4double z1,G4double n1,G4double beta1,G4double z2,G4double n2,G4double beta2,G4double d);
void fissionDistri(G4double &a,G4double &z,G4double &e,
G4double &a1,G4double &z1,G4double &e1,G4double &v1,
G4double &a2,G4double &z2,G4double &e2,G4double &v2);
void standardRandom(G4double *rndm, G4long *seed);
G4double haz(G4int k);
G4double gausshaz(int k, double xmoy, double sig);
public:
// Coordinate system transformations:
@@ -312,16 +297,17 @@ public:
G4int idnint(G4double value);
G4double utilabs(G4double a);
G4double dmin1(G4double a, G4double b, G4double c);
G4Ec2sub* getFrldmTable() {
return ec2sub;
}
private:
G4int verboseLevel;
G4int ilast;
G4AblaFissionBase *fissionModel;
G4Pace *pace;
G4Hazard *hazard;
G4Ald *ald;
G4Ablamain *ablamain;
G4Emdpar *emdpar;
G4Eenuc *eenuc;
G4Ec2sub *ec2sub;
G4Ecld *ecld;
@@ -330,4 +316,9 @@ private:
G4Opt *opt;
G4Volant *volant;
G4VarNtp *varntp;
#ifndef ABLAXX_IN_GEANT4_MODE
G4INCL::Config *theConfig;
#endif
};
#endif
@@ -23,18 +23,29 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// Translation of INCL4.2/ABLA V3
// ABLAXX statistical de-excitation model
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Davide Mancusi, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
//
#define ABLAXX_IN_GEANT4_MODE 1
#include "globals.hh"
// Data structures needed by ABLA evaporation code.
#ifndef G4AblaDataDefs_hh
#define G4AblaDataDefs_hh 1
#ifdef ABLAXX_IN_GEANT4_MODE
#include "globals.hh"
#else
#include "G4INCLGeant4Compat.hh"
#endif
#include <cmath>
// ABLA
class G4Nevent {
@@ -75,6 +86,18 @@ public:
~G4Ec2sub() {};
G4double ecnz[EC2SUBROWS][EC2SUBCOLS];
/**
* Dump the contents of the ecnz data table.
*/
void dump() {
for(G4int i = 0; i < EC2SUBROWS; i++) {
for(G4int j = 0; j < EC2SUBCOLS; j++) {
//G4cout << ecnz[i][j] << " ";
}
// G4cout << G4endl;
}
}
};
class G4Ald {
@@ -82,21 +105,14 @@ public:
/**
*
*/
G4Ald() {};
G4Ald()
:av(0.0), as(0.0), ak(0.0), optafan(0.0)
{};
~G4Ald() {};
G4double av,as,ak,optafan;
};
class G4Ablamain {
public:
G4Ablamain() {};
~G4Ablamain() {};
G4double ap,zp,at,zt,eap,beta,bmaxnuc,crtot,crnuc,r_0, r_p,r_t,pi,bfpro,snpro,sppro,shell;
G4int imax, inum;
};
#define ECLDROWS 154
#define ECLDCOLS 99
/**
@@ -137,7 +153,10 @@ class G4Fiss {
*/
public:
G4Fiss() {};
G4Fiss()
:akap(0.0), bet(0.0), homega(0.0), koeff(0.0), ifis(0.0),
optshp(0), optxfis(0), optles(0), optcol(0)
{};
~G4Fiss() {};
G4double akap,bet,homega,koeff,ifis;
@@ -167,7 +186,9 @@ public:
class G4Opt {
public:
G4Opt() {};
G4Opt()
:optemd(0), optcha(0), eefac(0.0)
{};
~G4Opt() {};
G4int optemd,optcha;
@@ -178,31 +199,23 @@ public:
#define XHESIZE 50
class G4Eenuc {
public:
G4Eenuc() {};
G4Eenuc() {
for(G4int i = 0; i < EENUCSIZE; ++i) {
she[i] = 0.0;
}
for(G4int i = 0; i < XHESIZE; ++i) {
for(G4int j = 0; j < EENUCSIZE; ++j) {
xhe[i][j] = 0.0;
}
}
};
~G4Eenuc() {};
G4double she[EENUCSIZE],xhe[XHESIZE][EENUCSIZE];
};
#define EMDPARSIZE 1000
/**
* Energies widths and cross sections for em excitation.
*/
class G4Emdpar {
public:
G4Emdpar() {};
~G4Emdpar() {};
G4double egdr,egqr,fwhmgdr,fwhmgqr,cremde1,cremde2;
G4double ae1[EMDPARSIZE],be1[EMDPARSIZE],ce1[EMDPARSIZE],ae2[EMDPARSIZE];
G4double be2[EMDPARSIZE],ce2[EMDPARSIZE],sre1[EMDPARSIZE],sre2[EMDPARSIZE];
G4double xre1[EMDPARSIZE],xre2[EMDPARSIZE],ds1,ds2;
};
//#define VOLANTSIZE 200
#define VOLANTSIZE 2000
#define VOLANTSIZE 301
/**
* Evaporation and fission output data.
*/
@@ -210,20 +223,404 @@ public:
class G4Volant {
public:
G4Volant() {};
G4Volant()
{
clear();
}
~G4Volant() {};
void clear()
{
for(G4int i = 0; i < VOLANTSIZE; i++) {
copied[i] = false;
acv[i] = 0;
zpcv[i] = 0;
pcv[i] = 0;
xcv[i] = 0;
ycv[i] = 0;
zcv[i] = 0;
iv = 0;
}
}
G4double getTotalMass()
{
G4double total = 0.0;
for(G4int i = 0; i <= iv; i++) {
total += acv[i];
}
return total;
}
void dump()
{
G4cout <<"i \t ACV \t ZPCV \t PCV" << G4endl;
G4double totA = 0.0, totZ = 0.0, totP = 0.0;
// G4cout <<"i \t ACV \t ZPCV \t PCV" << G4endl;
for(G4int i = 0; i <= iv; i++) {
G4cout << "volant" << i << "\t" << acv[i] << " \t " << zpcv[i] << " \t " << pcv[i] << G4endl;
if(i == 0 && acv[i] != 0) {
// G4cout <<"G4Volant: Particle stored at index " << i << G4endl;
}
totA += acv[i];
totZ += zpcv[i];
totP += pcv[i];
// G4cout << "volant" << i << "\t" << acv[i] << " \t " << zpcv[i] << " \t " << pcv[i] << G4endl;
}
// G4cout <<"Particle count index (iv) = " << iv << G4endl;
// G4cout <<"ABLA Total: A = " << totA << " Z = " << totZ << " momentum = " << totP << G4endl;
}
G4double acv[VOLANTSIZE],zpcv[VOLANTSIZE],pcv[VOLANTSIZE],xcv[VOLANTSIZE];
G4double ycv[VOLANTSIZE],zcv[VOLANTSIZE];
G4bool copied[VOLANTSIZE];
G4int iv;
};
#define VARNTPSIZE 301
class G4VarNtp {
public:
G4VarNtp() {
clear();
};
~G4VarNtp() {};
/**
* Clear and initialize all variables and arrays.
*/
void clear() {
particleIndex = 0;
projType = 0;
projEnergy = 0.0;
targetA = 0;
targetZ = 0;
masp = 0.0; mzsp = 0.0; exsp = 0.0; mrem = 0.0;
// To be deleted?
spectatorA = 0;
spectatorZ = 0;
spectatorEx = 0.0;
spectatorM = 0.0;
spectatorT = 0.0;
spectatorP1 = 0.0;
spectatorP2 = 0.0;
spectatorP3 = 0.0;
massini = 0;
mzini = 0;
exini = 0;
pcorem = 0;
mcorem = 0;
pxrem = 0;
pyrem = 0;
pzrem = 0;
erecrem = 0;
mulncasc = 0;
mulnevap = 0;
mulntot = 0;
bimpact = 0.0;
jremn = 0;
kfis = 0;
estfis = 0;
izfis = 0;
iafis = 0;
ntrack = 0;
needsFermiBreakup = false;
for(G4int i = 0; i < VARNTPSIZE; i++) {
itypcasc[i] = 0;
avv[i] = 0;
zvv[i] = 0;
enerj[i] = 0.0;
plab[i] = 0.0;
tetlab[i] = 0.0;
philab[i] = 0.0;
full[i] = false;
}
}
/**
* Add a particle to the INCL/ABLA final output.
*/
void addParticle(G4double A, G4double Z, G4double E, G4double P, G4double theta, G4double phi) {
if(full[particleIndex]) {
// G4cout <<"A = " << Z << " Z = " << Z << G4endl;
} else {
avv[particleIndex] = (int) A;
zvv[particleIndex] = (int) Z;
enerj[particleIndex] = E;
plab[particleIndex] = P;
tetlab[particleIndex] = theta;
philab[particleIndex] = phi;
full[particleIndex] = true;
ntrack = particleIndex + 1;
particleIndex++;
}
}
/**
* Baryon number conservation check.
*/
G4int getTotalBaryonNumber() {
G4int baryonNumber = 0;
for(G4int i = 0; i < ntrack; i++) {
if(avv[i] > 0) {
baryonNumber += avv[i];
}
}
return baryonNumber;
}
/**
* Return total energy.
*/
G4double getTotalEnergy() {
G4double energy = 0.0;
for(G4int i = 0; i < ntrack; i++) {
energy += std::sqrt(std::pow(plab[i], 2) + std::pow(getMass(i), 2)); // E^2 = p^2 + m^2
}
return energy;
}
/**
* Return total three momentum.
*/
G4double getTotalThreeMomentum() {
G4double momentum = 0;
for(G4int i = 0; i < ntrack; i++) {
momentum += plab[i];
}
return momentum;
}
G4double getMomentumSum() {
G4double momentum = 0;
for(G4int i = 0; i < ntrack; i++) {
momentum += plab[i];
}
return momentum;
}
G4double getMass(G4int particle) {
const G4double protonMass = 938.272;
const G4double neutronMass = 939.565;
const G4double pionMass = 139.57;
G4double mass = 0.0;
if(avv[particle] == 1 && zvv[particle] == 1) mass = protonMass;
if(avv[particle] == 1 && zvv[particle] == 0) mass = neutronMass;
if(avv[particle] == -1) mass = pionMass;
if(avv[particle] > 1)
mass = avv[particle] * protonMass + zvv[particle] * neutronMass;
return mass;
}
/**
* Dump debugging output.
*/
void dump() {
G4int nProton = 0, nNeutron = 0;
G4int nPiPlus = 0, nPiZero = 0, nPiMinus = 0;
G4int nH2 = 0, nHe3 = 0, nAlpha = 0;
G4int nFragments = 0;
G4int nParticles = 0;
for(G4int i = 0; i < ntrack; i++) {
nParticles++;
if(avv[i] == 1 && zvv[i] == 1) nProton++; // Count multiplicities
if(avv[i] == 1 && zvv[i] == 0) nNeutron++;
if(avv[i] == -1 && zvv[i] == 1) nPiPlus++;
if(avv[i] == -1 && zvv[i] == 0) nPiZero++;
if(avv[i] == -1 && zvv[i] == -1) nPiMinus++;
if(avv[i] == 2 && zvv[i] == 1) nH2++;
if(avv[i] == 3 && zvv[i] == 2) nHe3++;
if(avv[i] == 4 && zvv[i] == 2) nAlpha++;
if( zvv[i] > 2) nFragments++;
}
}
/**
* Projectile type.
*/
G4int projType;
/**
* Projectile energy.
*/
G4double projEnergy;
/**
* Target mass number.
*/
G4int targetA;
/**
* Target charge number.
*/
G4int targetZ;
/**
* Projectile spectator A, Z, Eex;
*/
G4double masp, mzsp, exsp, mrem;
/**
* Spectator nucleus mass number for light ion projectile support.
*/
G4int spectatorA;
/**
* Spectator nucleus charge number for light ion projectile support.
*/
G4int spectatorZ;
/**
* Spectator nucleus excitation energy for light ion projectile support.
*/
G4double spectatorEx;
/**
* Spectator nucleus mass.
*/
G4double spectatorM;
/**
* Spectator nucleus kinetic energy.
*/
G4double spectatorT;
/**
* Spectator nucleus momentum x-component.
*/
G4double spectatorP1;
/**
* Spectator nucleus momentum y-component.
*/
G4double spectatorP2;
/**
* Spectator nucleus momentum z-component.
*/
G4double spectatorP3;
/**
* A of the remnant.
*/
G4double massini;
/**
* Z of the remnant.
*/
G4double mzini;
/**
* Excitation energy.
*/
G4double exini;
G4double pcorem, mcorem, pxrem, pyrem, pzrem, erecrem;
/**
* Cascade n multip.
*/
G4int mulncasc;
/**
* Evaporation n multip.
*/
G4int mulnevap;
/**
* Total n multip.
*/
G4int mulntot;
/**
* Impact parameter.
*/
G4double bimpact;
/**
* Remnant Intrinsic Spin.
*/
G4int jremn;
/**
* Fission 1/0=Y/N.
*/
G4int kfis;
/**
* Excit energy at fis.
*/
G4double estfis;
/**
* Z of fiss nucleus.
*/
G4int izfis;
/**
* A of fiss nucleus.
*/
G4int iafis;
/**
* Number of particles.
*/
G4int ntrack;
/**
* The state of the index:
* true = reserved
* false = free
*/
G4bool full[VARNTPSIZE];
/**
* Does this nucleus require Fermi break-up treatment? Only
* applicable when used together with Geant4.
* true = do fermi break-up (and skip ABLA part)
* false = use ABLA
*/
G4bool needsFermiBreakup;
/**
* emitted in cascade (0) or evaporation (1).
*/
G4int itypcasc[VARNTPSIZE];
/**
* A (-1 for pions).
*/
G4int avv[VARNTPSIZE];
/**
* Z
*/
G4int zvv[VARNTPSIZE];
/**
* Kinetic energy.
*/
G4double enerj[VARNTPSIZE];
/**
* Momentum.
*/
G4double plab[VARNTPSIZE];
/**
* Theta angle.
*/
G4double tetlab[VARNTPSIZE];
/**
* Phi angle.
*/
G4double philab[VARNTPSIZE];
private:
G4int particleIndex;
};
#endif
@@ -23,25 +23,33 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// Translation of INCL4.2/ABLA V3
// ABLAXX statistical de-excitation model
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Davide Mancusi, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
//
#define ABLAXX_IN_GEANT4_MODE 1
#include "globals.hh"
#ifndef G4AblaDataFile_hh
#define G4AblaDataFile_hh 1
#include "G4InclAblaVirtualData.hh"
#include "G4AblaVirtualData.hh"
/**
* Read INCL/ABLA data from files.
* Read ABLA data from files.
*/
class G4AblaDataFile : public G4InclAblaVirtualData {
class G4AblaDataFile : public G4AblaVirtualData {
public:
#ifdef ABLAXX_IN_GEANT4_MODE
G4AblaDataFile();
#else
G4AblaDataFile(G4INCL::Config *);
#endif
~G4AblaDataFile();
/**
* Read all data from files.
@@ -50,8 +58,9 @@ public:
private:
G4int verboseLevel;
G4String *dataPath;
#ifndef ABLAXX_IN_GEANT4_MODE
G4INCL::Config *theConfig;
#endif
};
#endif
@@ -0,0 +1,101 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// ABLAXX statistical de-excitation model
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Davide Mancusi, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
//
#define ABLAXX_IN_GEANT4_MODE 1
#include "globals.hh"
#ifndef G4AblaFission_hh
#define G4AblaFission_hh 1
#include "G4AblaFissionBase.hh"
#include "G4AblaRandom.hh"
class G4AblaFission : public G4AblaFissionBase {
public:
G4AblaFission();
~G4AblaFission();
void doFission(G4double &A, G4double &Z, G4double &E,
G4double &A1, G4double &Z1, G4double &E1, G4double &K1,
G4double &A2, G4double &Z2, G4double &E2, G4double &K2);
/**
*
*/
G4double spdef(G4int a, G4int z, G4int optxfis);
/**
*
*/
G4double fissility(G4int a, G4int z, G4int optxfis);
// void evapora(G4double zprf, G4double aprf, G4double ee, G4double jprf,
// G4double *zf_par, G4double *af_par, G4double *mtota_par,
// G4double *pleva_par, G4double *pxeva_par);
// G4double bfms67(G4double zms, G4double ams);
// void lpoly(G4double x, G4int n, G4double pl[]);
// G4double expohaz(G4int k, G4double T);
// G4double fd(G4double E);
// G4double f(G4double E);
// G4double fmaxhaz(G4double k, G4double T);
void even_odd(G4double r_origin,G4double r_even_odd,G4int &i_out);
G4double umass(G4double z,G4double n,G4double beta);
G4double ecoul(G4double z1,G4double n1,G4double beta1,G4double z2,G4double n2,G4double beta2,G4double d);
void fissionDistri(G4double &a,G4double &z,G4double &e,
G4double &a1,G4double &z1,G4double &e1,G4double &v1,
G4double &a2,G4double &z2,G4double &e2,G4double &v2);
void standardRandom(G4double *rndm, G4long *seed);
G4double haz(G4int k);
G4double gausshaz(int k, double xmoy, double sig);
G4int min(G4int a, G4int b);
G4double min(G4double a, G4double b);
G4int max(G4int a, G4int b);
G4double max(G4double a, G4double b);
G4int nint(G4double number);
G4int secnds(G4int x);
G4int mod(G4int a, G4int b);
G4double dmod(G4double a, G4double b);
G4double dint(G4double a);
G4int idint(G4double a);
G4double utilabs(G4double a);
G4double dmin1(G4double a, G4double b, G4double c);
private:
};
#endif
@@ -0,0 +1,77 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// ABLAXX statistical de-excitation model
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Davide Mancusi, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
//
#define ABLAXX_IN_GEANT4_MODE 1
#include "globals.hh"
#ifndef G4AblaFissionBase_hh
#define G4AblaFissionBase_hh 1
#ifdef ABLAXX_IN_GEANT4_MODE
#include "globals.hh"
#else
#include "G4INCLGeant4Compat.hh"
#endif
//#include "G4InclUtils.hh"
/*
* Abstract interface to fission models.
*/
class G4AblaFissionBase {
public:
G4AblaFissionBase();
virtual ~G4AblaFissionBase();
virtual void doFission(G4double &A, G4double &Z, G4double &E,
G4double &A1, G4double &Z1, G4double &E1, G4double &K1,
G4double &A2, G4double &Z2, G4double &E2, G4double &K2) = 0;
void setVerboseLevel(G4int level) {
verboseLevel = level;
}
void about() {
// G4cout << ";; " << aboutModel << G4endl;
}
void setAboutString(G4String anAbout) {
aboutModel = anAbout;
}
private:
G4int verboseLevel;
G4String aboutModel;
};
#endif
@@ -23,82 +23,54 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// Defines an interface to evaporation models of Bertini cascase (BERT)
// based on INUCL code.
// ABLAXX statistical de-excitation model
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Davide Mancusi, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
//
#ifndef G4ABLAEVAPORATION_h
#define G4ABLAEVAPORATION_h 1
#define ABLAXX_IN_GEANT4_MODE 1
#include "globals.hh"
#include "G4VEvaporation.hh"
#include "G4Fragment.hh"
#include "G4DynamicParticle.hh"
#ifndef G4AblaInterface_hh
#define G4AblaInterface_hh 1
#ifdef ABLAXX_IN_GEANT4_MODE
#include "G4VPreCompoundModel.hh"
#include "G4ReactionProduct.hh"
#include "G4Fragment.hh"
#include "G4HadFinalState.hh"
#include "G4HadProjectile.hh"
#include "G4Nucleus.hh"
#include "G4Abla.hh"
//#include "G4VCoulombBarrier.hh"
//#define DEBUG
/**
* Geant4 interface to the ABLA evaporation code.
*/
class G4AblaEvaporation : public G4VEvaporation {
class G4AblaInterface : public G4VPreCompoundModel {
public:
/**
* Constructor.
*/
G4AblaEvaporation();
G4AblaInterface();
virtual ~G4AblaInterface();
/**
* Destructor.
*/
~G4AblaEvaporation();
virtual G4ReactionProductVector *DeExcite(G4Fragment &aFragment);
virtual G4HadFinalState *ApplyYourself(G4HadProjectile const &, G4Nucleus &) {
return NULL;
}
private:
G4AblaEvaporation(const G4AblaEvaporation &right);
G4VarNtp *ablaResult;
G4Volant *volant;
G4Abla *theABLAModel;
G4long eventNumber;
const G4AblaEvaporation & operator=(const G4AblaEvaporation &right);
G4bool operator==(const G4AblaEvaporation &right) const;
G4bool operator!=(const G4AblaEvaporation &right) const;
void fillResult( std::vector<G4DynamicParticle *> secondaryParticleVector,
G4FragmentVector * aResult );
/// \brief Convert an Abla particle to a G4ReactionProduct
G4ReactionProduct *toG4Particle(G4int A, G4int Z , G4double kinE, G4double px, G4double py, G4double pz) const;
public:
/**
* The method for calling
*/
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus);
void setVerboseLevel( const G4int verbose );
private:
/**
* Seeds for the random number generator.
*/
G4Hazard *hazard;
/**
* The verbosity of the interface class.
*/
G4int verboseLevel;
/**
* Event number used in the ABLA code.
*/
G4int eventNumber;
// For Coulomb Barrier calculation
// G4VCoulombBarrier * theCoulombBarrierPtr;
G4double CoulombBarrier;
#ifdef DEBUG
#endif
/// \brief Convert A and Z to a G4ParticleDefinition
G4ParticleDefinition *toG4ParticleDefinition (G4int A, G4int Z) const;
};
#endif // ABLAXX_IN_GEANT4_MODE
#endif
@@ -0,0 +1,43 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// ABLAXX statistical de-excitation model
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Davide Mancusi, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
//
#define ABLAXX_IN_GEANT4_MODE 1
#include "globals.hh"
#ifndef G4ABLARANDOM_HH
#define G4ABLARANDOM_HH
namespace G4AblaRandom {
double flat();
}
#endif
@@ -23,32 +23,46 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// Translation of INCL4.2/ABLA V3
// ABLAXX statistical de-excitation model
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Davide Mancusi, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
//
#define ABLAXX_IN_GEANT4_MODE 1
#include "globals.hh"
#ifndef G4AblaVirtualData_hh
#define G4AblaVirtualData_hh 1
#ifdef ABLAXX_IN_GEANT4_MODE
#include "globals.hh"
#else
#include "G4INCLGeant4Compat.hh"
#include "G4INCLConfig.hh"
#endif
/**
* An interface to data used by INCL and ABLA. This interface allows
* An interface to data used by ABLA. This interface allows
* us to abstract the actual source of data. Currently the data is
* read from datafiles by using class G4InclAblaDataFile. @see
* G4InclAblaDataFile
* read from datafiles by using class G4AblaDataFile. @see
* G4AblaDataFile
*/
class G4AblaVirtualData {
protected:
/**
* Constructor
* Constructor, destructor
*/
#ifdef ABLAXX_IN_GEANT4_MODE
G4AblaVirtualData();
#else
G4AblaVirtualData(G4INCL::Config *);
#endif
virtual ~G4AblaVirtualData();
public:
/**
@@ -98,8 +112,8 @@ public:
private:
static const G4int alphaRows = 155;
static const G4int alphaCols = 100;
static const G4int alphaRows = 154;
static const G4int alphaCols = 99;
static const G4int paceRows = 500;
static const G4int paceCols = 500;
@@ -0,0 +1,103 @@
#------------------------------------------------------------------------------
# sources.cmake
# Module : G4hadronic_hetcpp_utils
# Package: Geant4.src.G4processes.G4hadronic.G4hadronic_models.G4had_hetcpp.G4hadronic_hetcpp_utils
#
# Sources description for a library.
# Lists the sources and headers of the code explicitely.
# Lists include paths needed.
# Lists the internal granular and global dependencies of the library.
# Source specific properties should be added at the end.
#
# Generated on : 24/9/2010
#
# $Id: sources.cmake 75830 2013-11-06 17:05:14Z gcosmo $
#
#------------------------------------------------------------------------------
# List external includes needed.
include_directories(${CLHEP_INCLUDE_DIRS})
# List internal includes needed.
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/util/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/util/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/handler/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/evaporation/include)
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
#
# Define the Geant4 Module.
#
include(Geant4MacroDefineModule)
GEANT4_DEFINE_MODULE(NAME G4hadronic_abla_abla
HEADERS
G4AblaRandom.hh
G4AblaDataDefs.hh
G4AblaFissionBase.hh
G4Abla.hh
G4AblaFission.hh
G4AblaDataFile.hh
G4AblaInterface.hh
G4AblaVirtualData.hh
SOURCES
G4AblaFissionBase.cc
G4AblaDataFile.cc
G4AblaRandom.cc
G4AblaVirtualData.cc
G4AblaFission.cc
G4AblaInterface.cc
G4Abla.cc
GRANULAR_DEPENDENCIES
G4baryons
G4bosons
G4geometrymng
G4globman
G4hadronic_mgt
G4hadronic_util
G4hadronic_xsect
G4ions
G4leptons
G4materials
G4mesons
G4partman
G4procman
G4track
G4volumes
G4intercoms
G4had_preequ_exciton
G4had_mod_man
G4had_mod_util
G4hadronic_deex_evaporation
G4hadronic_deex_fermi_breakup
G4hadronic_deex_handler
G4hadronic_deex_management
G4hadronic_deex_multifragmentation
G4hadronic_deex_photon_evaporation
G4hadronic_deex_util
GLOBAL_DEPENDENCIES
G4geometry
G4global
G4materials
G4particles
G4track
G4intercoms
LINK_LIBRARIES)# List any source specific properties here
File diff suppressed because it is too large Load Diff
@@ -23,52 +23,81 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// Translation of INCL4.2/ABLA V3
// ABLAXX statistical de-excitation model
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Davide Mancusi, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
//
#define ABLAXX_IN_GEANT4_MODE 1
#include "globals.hh"
#include "G4AblaDataFile.hh"
//#include "G4HadronicException.hh"
#include "globals.hh" // Needed for G4Exception.
#ifdef ABLAXX_IN_GEANT4_MODE
#include "globals.hh"
#else
#include "G4INCLGeant4Compat.hh"
#endif
#include <fstream>
#include <cmath>
#include <iostream>
#include <cstdlib>
G4AblaDataFile::G4AblaDataFile()
{
#ifdef ABLAXX_IN_GEANT4_MODE
G4AblaDataFile::G4AblaDataFile() {
#else
G4AblaDataFile::G4AblaDataFile(G4INCL::Config *config)
: G4AblaVirtualData(config) {
theConfig = config;
#endif
verboseLevel = 0;
}
G4AblaDataFile::~G4AblaDataFile()
{
}
/**
* Read all data from files.
*/
bool G4AblaDataFile::readData()
{
#ifdef ABLAXX_IN_GEANT4_MODE
if(!getenv("G4ABLADATA")) {
// throw G4HadronicException(__FILE__, __LINE__, "ERROR: Data
// missing. Set environment variable G4ABLA3.0 to point to the
// directory containing data files needed by INCL and ABLA
// models.");
G4String errorMessage1 = "ERROR: Data missing. Set environment variable G4ABLADATA\n";
G4String errorMessage2 = "\t to point to the directory containing data files needed\n";
G4String errorMessage3 = "\t by INCL and ABLA models.\n";
G4String errorMessage = errorMessage1 + errorMessage2 + errorMessage3;
G4Exception(errorMessage);
// G4String errorMessage1 = "ERROR: Data missing. Set environment variable G4ABLADATA\n";
// G4String errorMessage2 = "\t to point to the directory containing data files needed\n";
// G4String errorMessage3 = "\t by INCL and ABLA models.\n";
// G4String errorMessage = errorMessage1 + errorMessage2 + errorMessage3;
// G4Exception(errorMessage);
G4ExceptionDescription ed;
ed << " Data missing: set environment variable G4ABLADATA\n"
<< " to point to the directory containing data files needed\n"
<< " by the ABLA model" << G4endl;
G4Exception("G4AblaDataFile::readData()","ABLA_001",
FatalException, ed);
}
G4String dataPath(getenv("G4ABLADATA"));
#else
G4String dataPath(theConfig->getABLAv3pCxxDataFilePath().c_str());
#endif
G4String flAlphaFile(dataPath + "/flalpha.dat");
G4String frldmFile( dataPath + "/frldm.dat");
G4String vgsldFile( dataPath + "/vgsld.dat");
G4String pace2File( dataPath + "/pace2.dat");
if(verboseLevel > 1) {
G4cout <<"Data path = " << dataPath << G4endl;
G4cout <<"FlAlphaFile = " << flAlphaFile << G4endl;
G4cout <<"FrldmFile = " << frldmFile << G4endl;
G4cout <<"VgsldFile = " << vgsldFile << G4endl;
G4cout <<"Pace2File = " << pace2File << G4endl;
// G4cout <<"Data path = " << dataPath << G4endl;
// G4cout <<"FlAlphaFile = " << flAlphaFile << G4endl;
// G4cout <<"FrldmFile = " << frldmFile << G4endl;
// G4cout <<"VgsldFile = " << vgsldFile << G4endl;
// G4cout <<"Pace2File = " << pace2File << G4endl;
}
std::ifstream flalphain(flAlphaFile.c_str());
@@ -81,37 +110,42 @@ bool G4AblaDataFile::readData()
std::filebuf *buf3 = vgsldin.rdbuf();
std::filebuf *buf4 = pace2in.rdbuf();
if (!((buf1->is_open()) && (buf2->is_open()) && (buf3->is_open()) && (buf4->is_open()))) {
G4Exception("ERROR: Data missing. Could not find ABLA data file in " + dataPath +
" defined by environment variable G4ABLADATA");
#ifdef ABLAXX_IN_GEANT4_MODE
G4ExceptionDescription ed;
ed << " Data missing: could not find ABLA data file in " << dataPath
<< "defined by environment variable G4ABLADATA" << G4endl;
G4Exception("G4AblaDataFile::readData()", "ABLA002", FatalException, ed);
#else
std::cerr << "Error opening file." << std::endl;
#endif
}
G4double flalpha, frldm, vgsld, pace2;
const G4int rows = 98;
const G4int cols = 153;
G4double fflalpha, ffrldm, fvgsld, fpace2;
const G4int rows = 99;
const G4int cols = 154;
const G4int massnumbers = 263;
for(int i = 0; i < rows; i++) {
for(int j = 0; j < cols; j++) {
setAlpha(j, i, 0.0);
setEcnz( j, i, 0.0);
setVgsld(j, i, 0.0);
setVgsld(j, i, 0.0);
}
}
for(int i = 0; i < rows; i++) {
for(int j = 0; j < cols; j++) {
flalphain >> flalpha;
frldmin >> frldm;
vgsldin >> vgsld;
setAlpha(j, i, flalpha);
setEcnz( j, i, frldm);
setVgsld(j, i, vgsld);
flalphain >> fflalpha;
frldmin >> ffrldm;
vgsldin >> fvgsld;
setAlpha(j, i, fflalpha);
setEcnz( j, i, ffrldm);
setVgsld(j, i, fvgsld);
}
}
flalphain.close();
frldmin.close();
vgsldin.close();
int A = 0, Zbegin = 0, Zend = 0;
G4String str1, str2, str3;
for(int i = 0; i < 500; i++) {
for(int j = 0; j < 500; j++) {
@@ -119,20 +153,23 @@ bool G4AblaDataFile::readData()
}
}
int A = 0, Zbegin = 0, Zend = 0;
for(int i = 0; i < massnumbers; i++) {
pace2in >> str1 >> A >> str2 >> Zbegin >> str3 >> Zend;
for(int j = Zbegin; j <= Zend; j++) {
pace2in >> pace2;
setPace2(A, j, pace2);
if(Zbegin >= 0 && Zbegin < getPaceCols() &&
A >= 0 && A < getPaceRows()) {
for(int j = Zbegin; j <= Zend; j++) {
pace2in >> fpace2;
setPace2(A, j, fpace2);
}
}
}
pace2in.close();
if(std::fabs(getPace2(A, Zend) - 114516.10) > 1e-6) {
G4cout <<"ERROR: Problem in parsing datafile " + pace2File << G4endl;
if(std::abs(getPace2(A, Zend) - 114516.10) > 1e-6) {
std::cerr << "ERROR: Problem in parsing datafile " + pace2File << std::endl;
return false;
}
return true;
}
@@ -1,317 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
//
#include <numeric>
// #include "G4IonTable.hh"
// #include "globals.hh"
// #include "G4V3DNucleus.hh"
// #include "G4DynamicParticleVector.hh"
// #include "G4EvaporationInuclCollider.hh"
// #include "G4InuclEvaporation.hh"
// #include "G4InuclNuclei.hh"
// #include "G4Track.hh"
// #include "G4Nucleus.hh"
// #include "G4Nucleon.hh"
// #include "G4NucleiModel.hh"
#include "G4HadronicException.hh"
// #include "G4LorentzVector.hh"
// #include "G4EquilibriumEvaporator.hh"
// #include "G4Fissioner.hh"
// #include "G4BigBanger.hh"
// #include "G4InuclElementaryParticle.hh"
// #include "G4InuclParticle.hh"
// #include "G4CollisionOutput.hh"
#include "G4AblaEvaporation.hh"
#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4PionZero.hh"
G4AblaEvaporation::G4AblaEvaporation() {
verboseLevel=0;
hazard = new G4Hazard();
// set initial values:
// First random seed:
// (Premiere graine)
// hazard->ial = 38035;
hazard->ial = 979678188;
// other seeds:
hazard->igraine[0] = 3997;
hazard->igraine[1] = 15573;
hazard->igraine[2] = 9971;
hazard->igraine[3] = 9821;
hazard->igraine[4] = 99233;
hazard->igraine[5] = 11167;
hazard->igraine[6] = 12399;
hazard->igraine[7] = 11321;
hazard->igraine[8] = 9825;
hazard->igraine[9] = 2587;
hazard->igraine[10] = 1775;
hazard->igraine[11] = 56799;
hazard->igraine[12] = 1156;
// hazard->igraine[13] = 11207;
hazard->igraine[13] = 38957;
hazard->igraine[14] = 35779;
hazard->igraine[15] = 10055;
hazard->igraine[16] = 76533;
hazard->igraine[17] = 33759;
hazard->igraine[18] = 13227;
}
G4AblaEvaporation::G4AblaEvaporation(const G4AblaEvaporation &) : G4VEvaporation() {
throw G4HadronicException(__FILE__, __LINE__, "G4AblaEvaporation::copy_constructor meant to not be accessable.");
}
G4AblaEvaporation::~G4AblaEvaporation() {
}
const G4AblaEvaporation & G4AblaEvaporation::operator=(const G4AblaEvaporation &) {
throw G4HadronicException(__FILE__, __LINE__, "G4AblaEvaporation::operator= meant to not be accessable.");
return *this;
}
G4bool G4AblaEvaporation::operator==(const G4AblaEvaporation &) const {
return false;
}
G4bool G4AblaEvaporation::operator!=(const G4AblaEvaporation &) const {
return true;
}
void G4AblaEvaporation::setVerboseLevel( const G4int verbose ) {
verboseLevel = verbose;
}
G4FragmentVector * G4AblaEvaporation::BreakItUp(const G4Fragment &theNucleus) {
G4VarNtp *varntp = new G4VarNtp();
G4Volant *volant = new G4Volant();
G4Abla *abla = new G4Abla(hazard, volant, varntp);
G4cout <<"Initializing evaporation..." << G4endl;
abla->initEvapora();
G4cout <<"Initialization complete!" << G4endl;
G4double nucleusA = theNucleus.GetA();
G4double nucleusZ = theNucleus.GetZ();
G4double nucleusMass = G4NucleiProperties::GetAtomicMass(nucleusA, nucleusZ);
G4double excitationEnergy = theNucleus.GetExcitationEnergy();
G4double angularMomentum = 0.0; // Don't know how to get this quantity... From Geant4???
G4LorentzVector tmp = theNucleus.GetMomentum();
G4ThreeVector momentum = tmp.vect();
G4double recoilEnergy = tmp.e();
G4double momX = momentum.x();
G4double momY = momentum.y();
G4double momZ = momentum.z();
// G4double energy = tmp.e();
G4double exitationE = theNucleus.GetExcitationEnergy() * MeV;
varntp->ntrack = -1;
varntp->massini = theNucleus.GetA();
varntp->mzini = theNucleus.GetZ();
std::vector<G4DynamicParticle*> cascadeParticles;
G4FragmentVector * theResult = new G4FragmentVector;
if (theNucleus.GetExcitationEnergy() <= 0.0) { // Check that Excitation Energy > 0
theResult->push_back(new G4Fragment(theNucleus));
return theResult;
}
// G4double mTar = G4NucleiProperties::GetAtomicMass(A, Z); // Mass of the target nucleus
varntp->exini = exitationE;
G4int particleI, n = 0;
// Print diagnostic messages. 0 = silent, 1 and 2 = verbose
// verboseLevel = 3;
// Increase the event number:
eventNumber++;
G4DynamicParticle *cascadeParticle = 0;
// G4ParticleDefinition *aParticleDefinition = 0;
// Map Geant4 particle types to corresponding INCL4 types.
enum bulletParticleType {nucleus = 0, proton = 1, neutron = 2, pionPlus = 3, pionZero = 4,
pionMinus = 5, deuteron = 6, triton = 7, he3 = 8, he4 = 9};
// Check wheter the input is acceptable. This will contain more tests in the future.
// void breakItUp(G4double nucleusA, G4double nucleusZ, G4double nucleusMass, G4double excitationEnergy,
// G4double angularMomentum, G4double recoilEnergy, G4double momX, G4double momY, G4double momZ)
G4cout <<"Calling the actual ABLA model..." << G4endl;
G4cout <<"Excitation energy: " << excitationEnergy << G4endl;
abla->breakItUp(nucleusA, nucleusZ, nucleusMass, excitationEnergy, angularMomentum, recoilEnergy, momX, momY, momZ,
eventNumber);
G4cout <<"Done." << G4endl;
if(verboseLevel > 0) {
// Diagnostic output
G4cout <<"G4AblaEvaporation: Target A: " << nucleusA << G4endl;
G4cout <<"G4AblaEvaporation: Target Z: " << nucleusZ << G4endl;
for(particleI = 0; particleI < varntp->ntrack; particleI++) {
G4cout << n << " ";
G4cout << varntp->massini << " " << varntp->mzini << " ";
G4cout << varntp->exini << " " << varntp->mulncasc << " " << varntp->mulnevap << " " << varntp->mulntot << " ";
G4cout << varntp->bimpact << " " << varntp->jremn << " " << varntp->kfis << " " << varntp->estfis << " ";
G4cout << varntp->izfis << " " << varntp->iafis << " " << varntp->ntrack << " " << varntp->itypcasc[particleI] << " ";
G4cout << varntp->avv[particleI] << " " << varntp->zvv[particleI] << " " << varntp->enerj[particleI] << " ";
G4cout << varntp->plab[particleI] << " " << varntp->tetlab[particleI] << " " << varntp->philab[particleI] << G4endl;
}
}
// Loop through the INCL4+ABLA output.
G4double momx, momy, momz; // Momentum components of the outcoming particles.
G4double eKin;
G4cout <<"varntp->ntrack = " << varntp->ntrack << G4endl;
for(particleI = 0; particleI < varntp->ntrack; particleI++) {
// Get energy/momentum and construct momentum vector:
// In INCL4 coordinates!
momx = varntp->plab[particleI]*std::cos(varntp->tetlab[particleI]*CLHEP::pi/180.0)*std::sin(varntp->philab[particleI]*CLHEP::pi/180.0)*MeV;
momy = varntp->plab[particleI]*std::sin(varntp->tetlab[particleI]*CLHEP::pi/180.0)*std::sin(varntp->philab[particleI]*CLHEP::pi/180.0)*MeV;
momz = varntp->plab[particleI]*std::cos(varntp->tetlab[particleI]*CLHEP::pi/180.0)*MeV;
eKin = varntp->enerj[particleI] * MeV;
if(verboseLevel > 1) {
// G4cout <<"Momentum direction: (x ,y,z)";
// G4cout << "(" << momx <<"," << momy << "," << momz << ")" << G4endl;
}
// This vector tells the direction of the particle.
G4ThreeVector momDirection(momx, momy, momz);
momDirection = momDirection.unit();
// Identify the particle/nucleus:
G4int particleIdentified = 0;
// Proton
if((varntp->avv[particleI] == 1) && (varntp->zvv[particleI] == 1)) {
cascadeParticle =
new G4DynamicParticle(G4Proton::ProtonDefinition(), momDirection, eKin);
particleIdentified++;
}
// Neutron
if((varntp->avv[particleI] == 1) && (varntp->zvv[particleI] == 0)) {
cascadeParticle =
new G4DynamicParticle(G4Neutron::NeutronDefinition(), momDirection, eKin);
particleIdentified++;
}
// PionPlus
if((varntp->avv[particleI] == -1) && (varntp->zvv[particleI] == 1)) {
cascadeParticle =
new G4DynamicParticle(G4PionPlus::PionPlusDefinition(), momDirection, eKin);
particleIdentified++;
}
// PionZero
if((varntp->avv[particleI] == -1) && (varntp->zvv[particleI] == 0)) {
cascadeParticle =
new G4DynamicParticle(G4PionZero::PionZeroDefinition(), momDirection, eKin);
particleIdentified++;
}
// PionMinus
if((varntp->avv[particleI] == -1) && (varntp->zvv[particleI] == -1)) {
cascadeParticle =
new G4DynamicParticle(G4PionMinus::PionMinusDefinition(), momDirection, eKin);
particleIdentified++;
}
// Nuclei fragment
if((varntp->avv[particleI] > 1) && (varntp->zvv[particleI] >= 1)) {
G4ParticleDefinition * aIonDef = 0;
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
G4int A = G4int(varntp->avv[particleI]);
G4int Z = G4int(varntp->zvv[particleI]);
aIonDef = theTableOfParticles->FindIon(Z, A, 0, Z);
cascadeParticle =
new G4DynamicParticle(aIonDef, momDirection, eKin);
particleIdentified++;
}
// Check that the particle was identified properly.
if(particleIdentified == 1) {
// Put data into G4HadFinalState:
cascadeParticle->Set4Momentum(cascadeParticle->Get4Momentum());
cascadeParticles.push_back(cascadeParticle);
// theResult.AddSecondary(cascadeParticle);
}
// Particle identification failed. Checking why...
else {
// Particle was identified as more than one particle type.
if(particleIdentified > 1) {
G4cout <<"G4InclCascadeInterface: One outcoming particle was identified as";
G4cout <<"more than one particle type. This is probably due to a bug in the interface." << G4endl;
G4cout <<"Particle A:" << varntp->avv[particleI] << "Z: " << varntp->zvv[particleI] << G4endl;
G4cout << "(particleIdentified =" << particleIdentified << ")" << G4endl;
}
}
}
// End of conversion
// Clean up: Clean up the number of generated particles in the
// common block VARNTP_ for the processing of the next event.
varntp->ntrack = 0;
// End of cleanup.
// Free allocated memory
delete varntp;
delete abla;
fillResult(cascadeParticles, theResult);
return theResult;
}
void G4AblaEvaporation::fillResult( std::vector<G4DynamicParticle *> secondaryParticleVector,
G4FragmentVector * aResult )
{
// Fill the vector pParticleChange with secondary particles stored in vector.
G4cout <<"Size of the secondary particle vector = " << secondaryParticleVector.size() << G4endl;
for ( size_t i = 0 ; i < secondaryParticleVector.size() ; i++ ) {
G4int aZ = static_cast<G4int> (secondaryParticleVector[i]->GetDefinition()->GetPDGCharge() );
G4int aA = static_cast<G4int> (secondaryParticleVector[i]->GetDefinition()->GetBaryonNumber());
G4LorentzVector aMomentum = secondaryParticleVector[i]->Get4Momentum();
if(aA>0) {
aResult->push_back( new G4Fragment(aA, aZ, aMomentum) );
} else {
aResult->push_back( new G4Fragment(aMomentum, secondaryParticleVector[i]->GetDefinition()) );
}
}
return;
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,43 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// ABLAXX statistical de-excitation model
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Davide Mancusi, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
//
#define ABLAXX_IN_GEANT4_MODE 1
#include "globals.hh"
#include "G4AblaFissionBase.hh"
G4AblaFissionBase::G4AblaFissionBase()
{
verboseLevel = 0;
}
G4AblaFissionBase::~G4AblaFissionBase() {}
@@ -0,0 +1,143 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// ABLAXX statistical de-excitation model
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Davide Mancusi, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
//
#define ABLAXX_IN_GEANT4_MODE 1
#include "globals.hh"
#ifdef ABLAXX_IN_GEANT4_MODE
#include "G4AblaInterface.hh"
#include "G4ParticleDefinition.hh"
#include "G4ReactionProductVector.hh"
#include "G4ReactionProduct.hh"
#include "G4DynamicParticle.hh"
#include "G4IonTable.hh"
#include "G4SystemOfUnits.hh"
#include "G4PhysicalConstants.hh"
#include <iostream>
#include <cmath>
G4AblaInterface::G4AblaInterface() :
G4VPreCompoundModel(NULL, "ABLA"),
ablaResult(new G4VarNtp),
volant(new G4Volant),
theABLAModel(new G4Abla(volant, ablaResult)),
eventNumber(0)
{
theABLAModel->initEvapora();
}
G4AblaInterface::~G4AblaInterface() {
delete volant;
delete ablaResult;
delete theABLAModel;
}
G4ReactionProductVector *G4AblaInterface::DeExcite(G4Fragment &aFragment) {
volant->clear();
ablaResult->clear();
const G4int ARem = aFragment.GetA_asInt();
const G4int ZRem = aFragment.GetZ_asInt();
const G4double nuclearMass = aFragment.GetGroundStateMass() / MeV;
const G4double eStarRem = aFragment.GetExcitationEnergy() / MeV;
const G4double jRem = aFragment.GetAngularMomentum().mag() / hbar_Planck;
const G4LorentzVector &pRem = aFragment.GetMomentum();
const G4double eTotRem = pRem.e();
const G4double eKinRem = (eTotRem - pRem.invariantMass()) / MeV;
const G4double pxRem = pRem.x() / MeV;
const G4double pyRem = pRem.y() / MeV;
const G4double pzRem = pRem.z() / MeV;
eventNumber++;
theABLAModel->breakItUp(ARem, ZRem,
nuclearMass,
eStarRem,
jRem,
eKinRem,
pxRem,
pyRem,
pzRem,
eventNumber);
G4ReactionProductVector *result = new G4ReactionProductVector;
for(int j = 0; j < ablaResult->ntrack; ++j) { // Copy ABLA result to the EventInfo
G4ReactionProduct *product = toG4Particle(ablaResult->avv[j],
ablaResult->zvv[j],
ablaResult->enerj[j],
ablaResult->plab[j]*std::sin(ablaResult->tetlab[j]*pi/180.0)*std::cos(ablaResult->philab[j]*pi/180.0),
ablaResult->plab[j]*std::sin(ablaResult->tetlab[j]*pi/180.0)*std::sin(ablaResult->philab[j]*pi/180.0),
ablaResult->plab[j]*std::cos(ablaResult->tetlab[j]*pi/180.0));
if(product)
result->push_back(product);
}
return result;
}
G4ParticleDefinition *G4AblaInterface::toG4ParticleDefinition(G4int A, G4int Z) const {
if (A == 1 && Z == 1) return G4Proton::Proton();
else if(A == 1 && Z == 0) return G4Neutron::Neutron();
else if(A == 0 && Z == 1) return G4PionPlus::PionPlus();
else if(A == 0 && Z == -1) return G4PionMinus::PionMinus();
else if(A == 0 && Z == 0) return G4PionZero::PionZero();
else if(A == 2 && Z == 1) return G4Deuteron::Deuteron();
else if(A == 3 && Z == 1) return G4Triton::Triton();
else if(A == 3 && Z == 2) return G4He3::He3();
else if(A == 4 && Z == 2) return G4Alpha::Alpha();
else if(A > 0 && Z > 0 && A >= Z) { // Returns ground state ion definition
return G4IonTable::GetIonTable()->GetIon(Z, A, 0);
} else { // Error, unrecognized particle
G4cout << "Can't convert particle with A=" << A << ", Z=" << Z << " to G4ParticleDefinition, trouble ahead" << G4endl;
return 0;
}
}
G4ReactionProduct *G4AblaInterface::toG4Particle(G4int A, G4int Z,
G4double kinE,
G4double px,
G4double py, G4double pz) const {
G4ParticleDefinition *def = toG4ParticleDefinition(A, Z);
if(def == 0) { // Check if we have a valid particle definition
return 0;
}
const double energy = kinE * MeV;
const G4ThreeVector momentum(px, py, pz);
const G4ThreeVector momentumDirection = momentum.unit();
G4DynamicParticle p(def, momentumDirection, energy);
G4ReactionProduct *r = new G4ReactionProduct(def);
(*r) = p;
return r;
}
#endif // ABLAXX_IN_GEANT4_MODE
@@ -0,0 +1,56 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// ABLAXX statistical de-excitation model
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Davide Mancusi, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
//
#define ABLAXX_IN_GEANT4_MODE 1
#include "globals.hh"
#include "G4AblaRandom.hh"
#ifdef ABLAXX_IN_GEANT4_MODE
#include "globals.hh"
#include "Randomize.hh"
#else
#include "G4INCLRandom.hh"
#endif // ABLAXX_IN_GEANT4_MODE
namespace G4AblaRandom {
double flat() {
#ifdef ABLAXX_IN_GEANT4_MODE
return G4UniformRand();
#else
return G4INCL::Random::shoot();
#endif
}
}
@@ -23,19 +23,24 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// Translation of INCL4.2/ABLA V3
// ABLAXX statistical de-excitation model
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Davide Mancusi, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
//
#define ABLAXX_IN_GEANT4_MODE 1
#include "globals.hh"
#include "G4AblaVirtualData.hh"
G4AblaVirtualData::G4AblaVirtualData()
{
}
#ifdef ABLAXX_IN_GEANT4_MODE
G4AblaVirtualData::G4AblaVirtualData() {}
#else
G4AblaVirtualData::G4AblaVirtualData(G4INCL::Config *) {}
#endif
G4AblaVirtualData::~G4AblaVirtualData() {}
bool G4AblaVirtualData::setAlpha(int A, int Z, double value)
{