Import Geant4 9.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:37:50 +02:00
parent a8e9364cea
commit 96c8bcd0af
6923 changed files with 198390 additions and 41849 deletions
@@ -0,0 +1,331 @@
//
// ********************************************************************
// * 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: G4Abla.hh,v 1.7 2007/12/03 19:36:05 miheikki Exp $
// Translation of INCL4.2/ABLA V3
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
#include "globals.hh"
#include "G4AblaDataDefs.hh"
#include "G4InclDataDefs.hh"
/**
* Class containing ABLA de-excitation code.
*/
class G4Abla {
public:
/**
*
* We support Doxygen with JavaDoc style.
*
* \author{pekka.kaitaniemi@helsinki.fi}
*/
/**
* A constructor.
*/
G4Abla();
/**
* This constructor is used by standalone test driver and the Geant4 interface.
*
* @param aHazard random seeds
* @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);
/**
*
*/
G4Abla(G4Hazard *hazard, G4Volant *volant);
/**
* A destructor.
* A more elaborate description of the destructor.
*/
~G4Abla();
/**
*
*/
void setVerboseLevel(G4int level);
/**
* Main interface to the de-excitation code.
*
* @param nucleusA mass number of the nucleus
* @param nucleusZ charge number of the nucleus
* @param nucleusMass mass of the nucleus
* @param excitationEnergy excitation energy of the nucleus
* @param angularMomentum angular momentum of the nucleus (produced as output by INCL4)
* @param recoilEnergy recoil energy of the nucleus
* @param momX momentum x-component
* @param momY momentum y-component
* @param momZ momentum z-component
* @param eventnumber number of the event
*/
void breakItUp(G4double nucleusA, G4double nucleusZ, G4double nucleusMass, G4double excitationEnergy,
G4double angularMomentum, G4double recoilEnergy, G4double momX, G4double momY, G4double momZ,
G4int eventnumber);
// Evaporation
public:
/**
* Initialize ABLA evaporation code.
*/
void initEvapora();
/**
* qrot including damping
* Input: z,a,bet,sig,u
* Output: qr - collective enhancement factor
* See junghans et al., nucl. phys. a 629 (1998) 635
*/
void qrot(G4double z, G4double a, G4double bet, G4double sig, G4double u, G4double *qr);
/**
* Model de la goutte liquide de c. f. weizsacker.
* usually an obsolete option
*/
void mglw(G4double a, G4double z, G4double *el);
/**
* Mglms
*/
void mglms(G4double a, G4double z, G4int refopt4, G4double *el);
/**
*
*/
// G4double spdef(G4int a, G4int z, G4int optxfis);
/**
* Calculation of fissility parameter
*/
// G4double fissility(int a,int z, int optxfis);
/**
* Main evaporation routine.
*/
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 *pyeva_par,
G4int *ff_par, G4int *inttype_par, G4int *inum_par);
/**
* Calculation of particle emission probabilities.
*/
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);
/**
* Level density parameters.
*/
void densniv(G4double a, G4double z, G4double ee, G4double esous, G4double *dens, G4double bshell, G4double bs, G4double bk,
G4double *temp, G4int optshp, G4int optcol, G4double defbet);
/**
* This subroutine calculates the fission barriers
* of the liquid-drop model of Myers and Swiatecki (1967).
* Analytic parameterization of Dahlinger 1982
* replaces tables. Barrier heights from Myers and Swiatecki
*/
G4double bfms67(G4double zms, G4double ams);
/**
* This subroutine calculates the ordinary legendre polynomials of
* order 0 to n-1 of argument x and stores them in the vector pl.
* They are calculated by recursion relation from the first two
* polynomials.
* Written by A.J.Sierk LANL t-9 February, 1984
*/
void lpoly(G4double x, G4int n, G4double pl[]);
/**
* This function will calculate the liquid-drop nuclear mass for spheri
* configuration according to the preprint NUCLEAR GROUND-STATE
* MASSES and DEFORMATIONS by P. Mo"ller et al. from August 16, 1993 p.
* All constants are taken from this publication for consistency.
*/
G4double eflmac(G4int ia, G4int iz, G4int flag, G4int optshp);
/**
* Procedure for calculating the pairing correction to the binding
* energy of a specific nucleus.
*/
void appariem(G4double a, G4double z, G4double *del);
/**
* PROCEDURE FOR CALCULATING THE PARITY OF THE NUMBER N.
* RETURNS -1 IF N IS ODD AND +1 IF N IS EVEN
*/
void parite(G4double n, G4double *par);
/**
* RISE TIME IN WHICH THE FISSION WIDTH HAS REACHED
* 90 PERCENT OF ITS FINAL VALUE
*/
G4double tau(G4double bet, G4double homega, G4double ef, G4double t);
/**
* KRAMERS FAKTOR - REDUCTION OF THE FISSION PROBABILITY
* INDEPENDENT OF EXCITATION ENERGY
*/
G4double cram(G4double bet, G4double homega);
/**
* CALCULATION OF THE SURFACE BS OR CURVATURE BK OF A NUCLEUS
* RELATIVE TO THE SPHERICAL CONFIGURATION
* BASED ON MYERS, DROPLET MODEL FOR ARBITRARY SHAPES
*/
G4double bipol(int iflag, G4double y);
/**
* THIS SUBROUTINE RETURNS THE BARRIER HEIGHT BFIS, THE
* GROUND-STATE ENERGY SEGS, IN MEV, AND THE ANGULAR MOMENTUM
* AT WHICH THE FISSION BARRIER DISAPPEARS, LMAX, IN UNITS OF
* H-BAR, WHEN CALLED WITH INTEGER AGUMENTS IZ, THE ATOMIC
* NUMBER, IA, THE ATOMIC MASS NUMBER, AND IL, THE ANGULAR
* MOMENTUM IN UNITS OF H-BAR. (PLANCK'S CONSTANT DIVIDED BY
* 2*PI).
*/
void barfit(G4int iz, G4int ia, G4int il, G4double *sbfis, G4double *segs, G4double *selmax);
/**
* TIRAGE ALEATOIRE DANS UNE EXPONENTIELLLE : Y=EXP(-X/T)
*/
G4double expohaz(G4int k, G4double T);
/**
* DISTRIBUTION DE MAXWELL
*/
G4double fd(G4double E);
/**
*FONCTION INTEGRALE DE FD(E)
*/
G4double f(G4double E);
/**
* tirage aleatoire dans une maxwellienne
*/
G4double fmaxhaz(G4double T);
/**
*
*/
G4double pace2(G4double a, G4double z);
/**
*
*/
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:
void lorab(G4double gam, G4double eta, G4double ein, G4double pin[],
G4double *eout, G4double pout[]);
void translab(G4double gamrem, G4double etrem, G4double csrem[4], G4int nopart, G4int ndec);
void translabpf(G4double masse1, G4double t1, G4double p1, G4double ctet1,
G4double phi1, G4double gamrem, G4double etrem, G4double R[][4],
G4double *plab1, G4double *gam1, G4double *eta1, G4double csdir[]);
void rotab(G4double R[4][4], G4double pin[4], G4double pout[4]);
// Utils
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);
G4int idnint(G4double value);
G4double utilabs(G4double a);
G4double dmin1(G4double a, G4double b, G4double c);
private:
G4int verboseLevel;
G4Pace *pace;
G4Hazard *hazard;
G4Ald *ald;
G4Ablamain *ablamain;
G4Emdpar *emdpar;
G4Eenuc *eenuc;
G4Ec2sub *ec2sub;
G4Ecld *ecld;
G4Fb *fb;
G4Fiss *fiss;
G4Opt *opt;
G4Volant *volant;
G4VarNtp *varntp;
};
@@ -0,0 +1,229 @@
//
// ********************************************************************
// * 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: G4AblaDataDefs.hh,v 1.6 2007/12/03 19:36:06 miheikki Exp $
// Translation of INCL4.2/ABLA V3
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
// Data structures needed by ABLA evaporation code.
#ifndef G4AblaDataDefs_hh
#define G4AblaDataDefs_hh 1
// ABLA
class G4Nevent {
public:
G4Nevent() {};
~G4Nevent() {};
G4int ii;
};
// ABLA
#define PACESIZEROWS 500
#define PACESIZECOLS 500
/**
* Masses.
*/
class G4Pace {
public:
G4Pace() {};
~G4Pace() {};
G4double dm[PACESIZEROWS][PACESIZECOLS];
};
#define EC2SUBROWS 154
#define EC2SUBCOLS 99
/**
*
*/
class G4Ec2sub {
public:
G4Ec2sub() {};
~G4Ec2sub() {};
G4double ecnz[EC2SUBROWS][EC2SUBCOLS];
};
class G4Ald {
public:
/**
*
*/
G4Ald() {};
~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
/**
* Shell corrections and deformations.
*/
class G4Ecld {
public:
G4Ecld() {};
~G4Ecld() {};
/**
* Ground state shell correction frldm for a spherical ground state.
*/
G4double ecgnz[ECLDROWS][ECLDCOLS];
/**
* Shell correction for the saddle point (now: == 0).
*/
G4double ecfnz[ECLDROWS][ECLDCOLS];
/**
* Difference between deformed ground state and ldm value.
*/
G4double vgsld[ECLDROWS][ECLDCOLS];
/**
* Alpha ground state deformation (this is not beta2!)
* beta2 = std::sqrt(5/(4pi)) * alpha
*/
G4double alpha[ECLDROWS][ECLDCOLS];
};
class G4Fiss {
/**
* Options and parameters for fission channel.
*/
public:
G4Fiss() {};
~G4Fiss() {};
G4double akap,bet,homega,koeff,ifis;
G4int optshp, optxfis,optles,optcol;
};
#define FBROWS 101
#define FBCOLS 161
/**
* Fission barriers.
*/
class G4Fb {
public:
G4Fb() {};
~G4Fb() {;}
// G4double efa[FBROWS][FBCOLS];
G4double efa[FBCOLS][FBROWS];
};
/**
* Options
*/
class G4Opt {
public:
G4Opt() {};
~G4Opt() {};
G4int optemd,optcha;
G4double eefac;
};
#define EENUCSIZE 2002
#define XHESIZE 50
class G4Eenuc {
public:
G4Eenuc() {};
~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
/**
* Evaporation and fission output data.
*/
class G4Volant {
public:
G4Volant() {};
~G4Volant() {};
void dump()
{
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;
}
}
G4double acv[VOLANTSIZE],zpcv[VOLANTSIZE],pcv[VOLANTSIZE],xcv[VOLANTSIZE];
G4double ycv[VOLANTSIZE],zcv[VOLANTSIZE];
G4int iv;
};
#endif
@@ -0,0 +1,104 @@
//
// ********************************************************************
// * 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: G4AblaEvaporation.hh,v 1.1 2007/09/11 13:18:42 miheikki Exp $
// Defines an interface to evaporation models of Bertini cascase (BERT)
// based on INUCL code.
//
#ifndef G4ABLAEVAPORATION_h
#define G4ABLAEVAPORATION_h 1
#include "globals.hh"
#include "G4VEvaporation.hh"
#include "G4Fragment.hh"
#include "G4DynamicParticle.hh"
#include "G4Abla.hh"
//#include "G4VCoulombBarrier.hh"
//#define DEBUG
/**
* Geant4 interface to the ABLA evaporation code.
*/
class G4AblaEvaporation : public G4VEvaporation {
public:
/**
* Constructor.
*/
G4AblaEvaporation();
/**
* Destructor.
*/
~G4AblaEvaporation();
private:
G4AblaEvaporation(const G4AblaEvaporation &right);
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 );
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
};
#endif
@@ -0,0 +1,820 @@
//
// ********************************************************************
// * 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: G4Incl.hh,v 1.10 2007/12/03 19:36:06 miheikki Exp $
// Translation of INCL4.2/ABLA V3
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
#ifndef G4Incl_hh
#define G4Incl_hh 1
#include "globals.hh"
#include "G4InclDataDefs.hh"
#include "G4Abla.hh"
#include <fstream>
using namespace std;
/**
* Class containing INCL4 hadronic cascade algorithm.
*/
class G4Incl {
public:
/**
*
* Support for Doxygen JavaDoc style.
*
* \author{pekka.kaitaniemi@helsinki.fi}
*/
/**
* Constructor to be used with Geant4.
* @param hazard a pointer to G4Hazard structure.
* @param calincl a pointer to G4Calincl structure.
* @param ws a pointer to G4Ws structure.
* @param mat a pointer to G4Mat structure.
* @param varntp a pointer to G4VarNtp structure.
*/
G4Incl(G4Hazard *hazard, G4Calincl *calincl, G4Ws *ws, G4Mat *mat, G4VarNtp *varntp);
/**
* Constructor for private unit testing purposes.
* @param hazard a pointer to G4Hazard structure.
* @param dton a pointer to G4Dton structure.
* @param saxw a pointer to G4Saxw structure.
* @param ws a pointer to G4Ws structure.
*/
G4Incl(G4Hazard *hazard, G4Dton *dton, G4Saxw *saxw, G4Ws *ws);
G4Incl();
~G4Incl(); // Destructor
G4double energyTest(G4int i); // Test for NaN energy of particle i.
void dumpBl5(std::ofstream& dumpOut); // Dump the contents of G4Bl5.
void dumpSaxw(std::ofstream& dumpOut); // Dump the contents of G4Saxw.
void dumpBl1(std::ofstream& dumpOut); // Dump the contents of G4Bl1.
void dumpBl2(std::ofstream& dumpOut); // Dump the contents of G4Bl2.
void dumpBl3(std::ofstream& dumpOut); // Dump the contents of G4Bl3.
/**
* Set verbosity level.
*/
void setVerboseLevel(G4int level);
/**
* Get verbosity level.
*/
G4int getVerboseLevel();
void setDtonData(G4Dton *newDton); // Set internal data.
void setWsData(G4Ws *newWs);
void setHazardData(G4Hazard *newHazard);
void setSaxwData(G4Saxw *newSaxw);
void setSpl2Data(G4Spl2 *newSpl2);
void setMatData(G4Mat *newMat);
void setCalinclData(G4Calincl *newCalincl);
void setLightNucData(G4LightNuc *newLightNuc);
void setLightGausNucData(G4LightGausNuc *newLightGausNuc);
void setBl1Data(G4Bl1 *newBl1);
void setBl2Data(G4Bl2 *newBl2);
void setBl3Data(G4Bl3 *newBl3);
void setBl4Data(G4Bl4 *newBl4);
void setBl5Data(G4Bl5 *newBl5);
void setBl6Data(G4Bl6 *newBl6);
void setBl8Data(G4Bl8 *newBl8);
void setBl9Data(G4Bl9 *newBl9);
void setBl10Data(G4Bl10 *newBl10);
void setKindData(G4Kind *newKind);
public:
/**
* Process one event with INCL4 only.
*/
void processEventIncl();
/**
* Process one event with INCL4 and built-in ABLA evaporation and fission.
*/
void processEventInclAbla(G4int eventnumber);
public: // Methods used to initialize INCL
/**
* Initialize INCL.
*
* @param initRandomSeed choose whether INCL should initialize random seeds.
*/
void initIncl(G4bool initRandomSeed);
/**
* Initialize target materials.
*
* @param izmat charge number
* @param iamat mass number
* @param imat material number (array index)
*/
void initMaterial(G4int izmat, G4int iamat, G4int imat);
/**
* A normal member taking two arguments and returning an integer value.
*
* @param l an integer argument.
* @param q a constant character pointer.
* @return The test results
*/
G4double deutv(G4int l, G4double q);
/**
* Returns the values of the function:
* \f[
* (0.23162461 + (j - 1))^2
* \f]
*
* @param j an integer parameter
* @return a double value
*/
G4double fm2(G4int j);
/**
* Interpolates function described by class G4Saxw around a point.
*
* @param xv interpolation point
* @return a double value
*/
G4double interpolateFunction(G4double xv);
/**
* Calculates the first derivative of the function stored in class G4Saxw.
*
* @param xv an integer parameter
*/
void firstDerivative(G4int k);
/**
* Returns the values of the function:
* \f[
* \frac{r^2}{1 + e^{\frac{r - r_{0}}{A_{dif}}}}
* \f]
*
* @param r a G4double argument
* @return a double value
*/
G4double wsax(G4double r);
/**
* Returns the values of the function:
* \f[
* \frac{1}{A_{dif}^{2}} \frac{r^3 e^{r - r_0}}{1 + e^{\frac{r - r_{0}}{A_{dif}}}}
* \f]
*
* @param r a G4double argument
* @return a double value
*/
G4double derivWsax(G4double r);
/**
* Returns the values of the function:
* \f[
* r^2 (1.0 + r_0 \frac{r^2}{A_{dif}}) e^{-\frac{r^2}{A_{dif}^2}}
* \f]
* @param r a G4double argument
* @return a double value
*/
G4double dmho(G4double r);
/**
* Returns the values of the function:
* \f[
* -\frac{2r^4}{A_{dif}^2} (r_0(1.0 - \frac{r^2}{A_{dif}^2}) - 1.0) e^{-\frac{r^2}{A_{dif}^2}}
* \f]
*
* @param r a G4double argument
* @return a double value
*/
G4double derivMho(G4double r);
/**
* Returns the values of the function:
* \f[
* \frac{r^4}{A_{dif}^2} e^{-\frac{1}{2} \frac{r^2}{A_{dif}^2}}
* \f]
*
* @param r a G4double argument
* @return a double value
*/
G4double derivGaus(G4double r);
/**
* Ce subroutine appele sur le premier tir va calculer la densite du deuton
* dans l'espace des impulsions et preparer l'interpolation permettant ensuite
* le tir au hasard d'un module de l'impulsion (q).
* Ce subroutine remplit le G4Spl2:
* xsp, ysp integrale normalisee de la densite de 0 a q.
* a(),b(),c() coefs des nsp points pour une interpolation du second degre.
* q est en fm-1.
*/
void densDeut();
/**
* Integrate using Alkazhov's method.
*
* @param ami a double parameter
* @param ama a double parameter
* @param dr a double parameter
* @param functionChoice an integer parameter
* @return a double value
*/
G4double integrate(G4double ami, G4double ama, G4double step, G4int functionChoice);
/**
* Deuteron density
*
* @param q a double parameter
* @return a double value
*/
G4double dens(G4double q);
/**
*
*/
void spl2ab();
/**
*
* @param xv a double parameter
* @return a double value
*/
G4double splineab(G4double xv);
public: // Main INCL routines
/**
* INCL model as a function.
*/
void pnu(G4int *ibert_p, G4int *nopart_p, G4int *izrem_p, G4int *iarem_p, G4double *esrem_p,
G4double *erecrem_p, G4double *alrem_p, G4double *berem_p, G4double *garem_p,
G4double *bimpact_p, G4int *l_p);
/**
* Single nucleon-nucleon collision.
*/
void collis(G4double *p1_p, G4double *p2_p, G4double *p3_p, G4double *e1_p, G4double *pout11_p, G4double *pout12_p,
G4double *pout13_p, G4double *eout1_p, G4double *q1_p, G4double *q2_p, G4double *q3_p,
G4double *q4_p, G4int *np_p, G4int *ip_p, G4int *k2_p, G4int *k3_p, G4int *k4_p,
G4int *k5_p, G4int *m1_p, G4int *m2_p, G4int *is1_p, G4int *is2_p);
/**
* This routine describes the anisotropic decay of a particle of
* mass xi into 2 particles of masses x1,x2.
* The anisotropy is supposed to follow a 1+3*hel*(std::cos(theta))**2 law
* with respect to the direction of the incoming particle.
*
* In the input, p1,p2,p3 is the momentum of particle xi.
*
* In the output, p1,p2,p3 is the momentum of particle x1,
* while q1,q2,q3 is the momentum of particle x2.
*
* @param p1_p pointer to momentum component 1
* @param p2_p pointer to momentum component 2
* @param p3_p pointer to momentum component 3
* @param wp_p pointer to a double parameter
* @param q1_p pointer to momentum component 1
* @param q2_p pointer to momentum component 2
* @param q3_p pointer to momentum component 3
* @param wq_p pointer to a double parameter
* @param xi_p pointer to a double parameter
* @param x1_p pointer to momentum component 1
* @param x2_p pointer to momentum component 2
* @param x3_p pointer to momentum compone n3
* @param hel_p pointer to a double parameter
*/
void decay2(G4double *p1_p, G4double *p2_p, G4double *p3_p, G4double *wp_p, G4double *q1_p,
G4double *q2_p, G4double *q3_p, G4double *wq_p, G4double *xi_p, G4double *x1_p,
G4double *x2_p, G4double *hel_p);
/**
* Time calculation.
*
* @param i an index of particle 1
* @param j an index of particle 2
*/
void time(G4int i, G4int j);
/**
* New time.
*
* @param l1 an integer parameter
* @param l2 an integer parameter
*/
void newt(G4int l1, G4int l2);
/**
*
*
* @param l1 an integer parameter
*/
void new1(G4int l1);
/**
*
*
* @param y1 a double parameter
* @param y2 a double parameter
* @param y3 a double parameter
* @param q1 a double parameter
* @param q2 a double parameter
* @param q3 a double parameter
* @param q4 a double parameter
* @param npion number of pions
* @param l1 an integer parameter
*/
void new2(G4double y1, G4double y2, G4double y3, G4double q1, G4double q2, G4double q3,
G4double q4, G4int npion, G4int l1);
/**
*
*
* @param y1 a double parameter
* @param y2 a double parameter
* @param y3 a double parameter
* @param q1 a double parameter
* @param q2 a double parameter
* @param q3 a double parameter
* @param q4 a double parameter
* @param npion number of pions
* @param l1 an integer parameter
*/
void new3(G4double y1, G4double y2, G4double y3, G4double q1, G4double q2, G4double q3,
G4double q4, G4int npion, G4int l1);
/**
* Lorentz transformation.
*
* @param q1 a double parameter
* @param q2 a double parameter
* @param q3 a double parameter
* @param b1 a double parameter
* @param b2 a double parameter
* @param b3 a double parameter
* @param E energy
*/
void loren(G4double *q1, G4double *q2, G4double *q3, G4double *b1, G4double *b2, G4double *b3, G4double *E);
/**
* Pauli blocking.
*
* @param l an integer parameter
* @param xr a double parameter
* @param pr a double parameter
* @return a double value
*/
G4double pauliBlocking(G4int l, G4double xr, G4double pr);
/**
* Fit by J. Vandermeulen.
* Low energy fit from reference J.Cugnon, D. L'hote and J. Vandermeulen, NIM B111 (1996) 215.
*
* @param E energy
* @param m a double parameter m = 0, 1, 2 for nucleon-nucleon, nucleon-delta, delta-delta
* @param i a double parameter i = 2, 0, -2 for pp, pn, nn
* @return a double value
*/
G4double lowEnergy(G4double E, G4double m, G4double i);
/**
* Total cross-sections.
*
* @param E energy
* @param m an integer parameter m=0,1,2 for nucleon-nucleon, nucleon-delta, delta-delta
* @param i an integer parameter i = 2, 0, -2 for pp, pn, nn
* @return a double value
*/
G4double totalCrossSection(G4double E, G4int m, G4int i);
/**
*
*
* @param Ein energy
* @param d a double parameter
* @param i an integer parameter
* @param isa an integer parameter
* @return a double value
*/
G4double srec(G4double Ein, G4double d, G4int i, G4int isa);
/**
* Delta production cross section.
*
* @param E energy
* @param i an integer parameter
* @return a double value
*/
G4double deltaProductionCrossSection(G4double E, G4int i);
/**
* Sigma(pi+ + p) in the (3,3) region.
* New fit by J. Vandermeulen and constant value above the (3,3) resonance.
*
* @param x a double parameter
* @return a double value
*/
G4double pionNucleonCrossSection(G4double x);
/**
* Transmission probability for a nucleon of kinetic energy
* E on the edge of the well of depth v0 (nr approximation).
* ,
* of the nucleus and r is the target radius
*
* @param E kinetic energy
* @param iz the isospin of the nucleon
* @param izn the instanteneous charge
* @param r
* @param v0
* @return a double value
*/
G4double transmissionProb(G4double E, G4double iz, G4double izn, G4double r, G4double v0);
/**
*
*
* @param x1 a double parameter
* @param x2 a double parameter
* @param x3 a double parameter
* @param p1 a double parameter
* @param p2 a double parameter
* @param p3 a double parameter
* @param E a double parameter
* @param r2 a double parameter
* @return a double value
*/
G4double ref(G4double x1, G4double x2, G4double x3, G4double p1,
G4double p2, G4double p3, G4double E, G4double r2);
/**
* ForceAbsor
*/
void forceAbsor(G4int *nopart, G4int *iarem, G4int *izrem, G4double *esrem, G4double *erecrem,
G4double *alrem, G4double *berem, G4double *garem, G4int *jrem);
/**
* ForceAbs
* @param iprojo projectile
* @param at target mass number
* @param zt target charge number
* @param ep projectile energy
* @param bmax a double parameter
* @param pt a double parameter
* @return absorption probability
*/
G4double forceAbs(G4double iprojo, G4double at, G4double zt, G4double ep, G4double bmax, G4double pt);
/**
* absoprption xsec revised version rkt-97/5
* neutron data from barashenkov
* this gives absorption xsec for given zp,ap,zt,at,e (mev/nucleon)
* arguement changed to mev; then e=ep/ap mev/nucleon
* can be used for neutrons also.
* this has coulomb as ours
* @param zp projectile charge number
* @param zp projectile mass number
* @param zt a double parameter
* @param zt target charge number
* @param at target mass number
* @param ep projectile energy
*/
G4double xabs2(G4double zp, G4double ap, G4double zt, G4double at, G4double ep);
/**
* Standard random number generator.
* @param *rndm pointer to the variable reserved for random number
* @param *seed pointer to the random seed
*/
void standardRandom(G4double *rndm, G4long *seed);
/**
* First derivative of a gaussian potential.
* @param *rndm pointer to the variable reserved for random number
*/
void gaussianRandom(G4double *rndm);
/**
* Safe exponential function which eliminates the CPU under and overflows.
* @param x a double parameter
* @return a double value
*/
G4double safeExp(G4double x);
/**
* Nuclear radius
* @param A mass number (double parameter)
*/
G4double radius(G4double A);
/** Parametrisation de la section efficace de réaction calculée par incl4.1
* iprojo=1 proton incident, iprojo=2, neutron incident).
* entre al et u, entre 10 et 100 mev protons, 20 et 100 mev neutrons.
* bon ordre de grandeur pour les noyaux légers (c, o ...), trés faux
* a energie sup a 100 mev.
* (Comment needs to be translated)
* @param projectile an integer parameter (1 = proton, 2 = neutron)
* @param E energy of the projectile (double parameter)
* @param A target mass number (double parameter)
* @return cross section (double value)
*/
G4double crossSection(G4int projectile, G4double E, G4double A);
/**
* coulombTransm
* subroutine coulomb_transm(e,fm1,z1,fm2,z2,proba)
* calcul du coulombien dans lahet (proba de transmission ou
* d'entree dans le potentiel nucleaire).
* @param E energy (a double parameter)
* @param fm1 a double parameter
* @param z1 a double parameter
* @param fm2 a double parameter
* @param z2 a double parameter
* @return a double value
*/
G4double coulombTransm(G4double E, G4double fm1, G4double z1, G4double fm2, G4double z2);
/**
* Clmb1
* @param eta a double parameter \f$\eta = c_2*z_1*z_2*\sqrt{m/E}\f$
* @param rho a double parameter \f$\rho = c_3*(r_1+r_2)*\sqrt{mE}\f$
* @return a double value
*/
G4double clmb1(G4double rho, G4double eta, G4double *ml);
/**
* First derivative of a gaussian potential.
* @param eta a double parameter \f$\eta = c_2*z_1*z_2*\sqrt{m/E}\f$
* @param rho a double parameter \f$\rho = c_3*(r_1+r_2)*\sqrt{mE}\f$
* @return a double value
*/
G4double clmb2(G4double rho, G4double eta, G4double *t1);
public: // Utilities
/**
* Returns the smaller of two numbers.
* @param a a double value
* @param b a double value
* @return a double value
*/
G4double min(G4double a, G4double b);
/**
* Returns the smaller of two numbers.
* @param a an integer value
* @param b an integer value
* @return an integer value
*/
G4int min(G4int a, G4int b);
/**
* Returns the greater of two numbers.
* @param a a double value
* @param b a double value
* @return a double value
*/
G4double max(G4double a, G4double b);
/**
* Returns the greater of two numbers.
* @param a an integer value
* @param b an integer value
* @return an integer value
*/
G4int max(G4int a, G4int b);
/**
* Rounds a double to the nearest int
* @param a double parameter
* @return an integer value
*/
G4int nint(G4double number);
/**
* Calls a function
* @param functionChoice an integer value representing the choice of
* function (0 = wsax, 1 = derivWsax, 2 = dmho, 3 = derivMho, 4 = derivGaus)
* @param r a double parameter
* @return a double value
*/
G4double callFunction(G4int functionChoice, G4double r);
G4double am(G4double a, G4double b, G4double c, G4double d);
G4double pcm(G4double e, G4double a, G4double c);
G4double sign(G4double a, G4double b);
G4double utilabs(G4double a);
G4double amax1(G4double a, G4double b);
G4double w(G4double a, G4double b, G4double c, G4double d);
G4int idnint(G4double a);
private:
/**
* Random seeds for INCL4 internal random number generators.
*/
G4Hazard *hazard;
/**
* Data structure for INCL4.
*/
G4Dton *dton;
/**
* Data structure for INCL4. Contains the Woods-Saxon potential
* functions for target nuclei.
*/
G4Saxw *saxw;
/**
* Data structure for INCL4.
*/
G4Ws *ws;
/**
* G4Spl2
*/
G4Spl2 *spl2;
/**
* G4LightGausNuc
*/
G4LightGausNuc *light_gaus_nuc;
/**
* G4LightNuc
*/
G4LightNuc *light_nuc;
/**
* G4Calincl
*/
G4Calincl *calincl;
/**
* G4Mat
*/
G4Mat *mat;
/**
*
*/
G4Bl1 *bl1;
/**
*
*/
G4Bl2 *bl2;
/**
*
*/
G4Bl3 *bl3;
/**
*
*/
G4Bl4 *bl4;
/**
*
*/
G4Bl5 *bl5;
/**
*
*/
G4Bl6 *bl6;
/**
*
*/
G4Bl8 *bl8;
/**
*
*/
G4Bl9 *bl9;
/**
*
*/
G4Bl10 *bl10;
/**
*
*/
G4Kind *kindstruct;
/**
*
*/
G4Paul *paul;
/**
* Detailed information of the cascade
*/
G4VarAvat *varavat;
/**
* Cascade output.
*/
G4VarNtp *varntp;
/**
* For storing the results of the evaporation.
*/
G4VarNtp *evaporationResult;
/**
* Defines the verbosity of console output. Values can be between 0
* and 4 where 0 means silent and 4 the most verbose possible
* output.
*/
G4int verboseLevel;
/**
* Function ID for wsax.
* @see wsax
* @see integrate
* @see callFunction
*/
G4int wsaxFunction;
/**
* Function ID for derivWsax.
* @see derivWsax
* @see integrate
* @see callFunction
*/
G4int derivWsaxFunction;
/**
* Function ID for dmho.
* @see derivWsax
* @see integrate
* @see callFunction
*/
G4int dmhoFunction;
/**
* Function ID for derivMho.
* @see derivMho
* @see integrate
* @see callFunction
*/
G4int derivMhoFunction;
/**
* Function ID for derivGaus.
* @see derivGaus
* @see integrate
* @see callFunction
*/
G4int derivGausFunction;
/**
* Function ID for dens.
* @see dens
* @see integrate
* @see callFunction
*/
G4int densFunction;
G4int kind[300]; //= (*kind_p);
G4double ep[300]; // = (*ep_p);
G4double alpha[300]; // = (*alpha_p);
G4double beta[300]; // = (*beta_p);
G4double gam[300]; // = (*gam_p);
G4Volant *volant;
G4Abla *abla;
};
#endif
@@ -0,0 +1,122 @@
//
// ********************************************************************
// * 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: G4InclAblaCascadeInterface.hh,v 1.6 2007/10/31 10:44:22 miheikki Exp $
// Translation of INCL4.2/ABLA V3
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
// CLASS DESCRIPTION
// This class is a preliminary interface code for INCL4 cascade
// code. This class is intended to be used as an interface for
// colliding hadrons (protons, neutrons, pions) to nuclei.
// This class was created by Pekka Kaitaniemi
// (kaitanie@cc.helsinki.fi) , Helsinki Institute of Physics using
// G4CascadeInterface as a template.
#ifndef G4INCLABLACASCADEINTERFACE_H
#define G4INCLABLACASCADEINTERFACE_H 1
#include "G4Nucleon.hh"
#include "G4Nucleus.hh"
#include "G4HadronicInteraction.hh"
#include "G4VIntraNuclearTransportModel.hh"
#include "G4KineticTrackVector.hh"
#include "G4FragmentVector.hh"
#include "G4ParticleChange.hh"
#include "G4ReactionProductVector.hh"
#include "G4ReactionProduct.hh"
// INCL includes
#include "G4InclDataDefs.hh"
#include "G4AblaDataDefs.hh"
#include "G4Incl.hh"
#include <fstream>
#include <iostream>
using namespace std;
/**
* Interface for INCL/ABLA. This interface handles basic hadron
* bullet particles (protons, neutrons, pions).
* @see G4InclAblaLightIonInterface
*/
class G4InclAblaCascadeInterface : public G4VIntraNuclearTransportModel {
public:
/**
* Basic constructor.
*/
G4InclAblaCascadeInterface();
G4int operator==(G4InclAblaCascadeInterface& right) {
return (this == &right);
}
G4int operator!=(G4InclAblaCascadeInterface& right) {
return (this != &right);
}
~G4InclAblaCascadeInterface(); // Destructor
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus); // Idle
/**
* Main method to apply the INCL/ABLA physics model.
* @param aTrack the projectile particle
* @param theNucleus target nucleus
* @return the output of the INCL/ABLA physics model
*/
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& theNucleus);
private:
G4int outputVerbosity;
G4int verboseLevel;
private:
G4Hazard *hazard; // The random seeds used by INCL.
G4VarNtp *varntp;
G4Calincl *calincl;
G4Ws *ws;
G4Mat *mat;
G4Incl *incl;
G4HadFinalState theResult;
ofstream diagdata;
G4int eventNumber;
G4double previousTargetA;
G4double previousTargetZ;
};
#endif // G4INCLABLACASCADEINTERFACE_H
@@ -0,0 +1,57 @@
//
// ********************************************************************
// * 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: G4InclAblaDataFile.hh,v 1.2 2007/10/31 10:44:22 miheikki Exp $
// Translation of INCL4.2/ABLA V3
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
#ifndef G4InclAblaDataFile_hh
#define G4InclAblaDataFile_hh 1
#include "G4InclAblaVirtualData.hh"
/**
* Read INCL/ABLA data from files.
*/
class G4InclAblaDataFile : public G4InclAblaVirtualData {
public:
G4InclAblaDataFile();
/**
* Read all data from files.
*/
bool readData();
private:
G4int verboseLevel;
G4String *dataPath;
};
#endif
@@ -0,0 +1,123 @@
//
// ********************************************************************
// * 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: G4InclAblaLightIonInterface.hh,v 1.5 2007/10/31 10:44:22 miheikki Exp $
// Translation of INCL4.2/ABLA V3
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
// CLASS DESCRIPTION
// This class is a preliminary interface code for INCL4 cascade and
// ABLA evaporation codes. This class is intended to be used as an
// interface for colliding light ions (deuterons, tritons, he3 and
// alphas) to nuclei.
// This class was created by Pekka Kaitaniemi
// (kaitanie@cc.helsinki.fi) , Helsinki Institute of Physics using
// G4CascadeInterface as a template.
#ifndef G4INCLABLALIGHTIONINTERFACE_H
#define G4INCLABLALIGHTIONINTERFACE_H 1
#include "G4Nucleon.hh"
#include "G4Nucleus.hh"
#include "G4HadronicInteraction.hh"
#include "G4VIntraNuclearTransportModel.hh"
#include "G4KineticTrackVector.hh"
#include "G4FragmentVector.hh"
#include "G4ParticleChange.hh"
#include "G4ReactionProductVector.hh"
#include "G4ReactionProduct.hh"
// INCL includes
#include "G4InclDataDefs.hh"
#include "G4AblaDataDefs.hh"
#include "G4Incl.hh"
#include <fstream>
#include <iostream>
using namespace std;
/**
* Interface for INCL/ABLA. This interface handles basic light ion
* bullet particles (deuterons, tritons, he3 and alphas).
* @see G4InclAblaLightIonInterface
*/
class G4InclAblaLightIonInterface : public G4VIntraNuclearTransportModel {
public:
/**
* Basic constructor.
*/
G4InclAblaLightIonInterface();
G4int operator==(G4InclAblaLightIonInterface& right) {
return (this == &right);
}
G4int operator!=(G4InclAblaLightIonInterface& right) {
return (this != &right);
}
~G4InclAblaLightIonInterface(); // Destructor
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus); // Idle
/**
* Main method to apply the INCL/ABLA physics model.
* @param aTrack the projectile particle
* @param theNucleus target nucleus
* @return the output of the INCL/ABLA physics model
*/
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& theNucleus);
private:
G4int outputVerbosity;
G4int verboseLevel;
private:
G4Hazard *hazard; // The random seeds used by INCL.
G4VarNtp *varntp;
G4Calincl *calincl;
G4Ws *ws;
G4Mat *mat;
G4Incl *incl;
G4HadFinalState theResult;
ofstream diagdata;
G4int eventNumber;
G4double previousTargetA;
G4double previousTargetZ;
};
#endif // G4INCLABLALIGHTIONINTERFACE_H
@@ -0,0 +1,113 @@
//
// ********************************************************************
// * 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: G4InclAblaVirtualData.hh,v 1.3 2007/12/03 19:36:06 miheikki Exp $
// Translation of INCL4.2/ABLA V3
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
#ifndef G4InclAblaVirtualData_hh
#define G4InclAblaVirtualData_hh 1
#include "globals.hh"
/**
* An interface to data used by INCL and 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
*/
class G4InclAblaVirtualData {
protected:
/**
* Constructor
*/
G4InclAblaVirtualData();
public:
/**
* Set the value of Alpha.
*/
G4bool setAlpha(G4int A, G4int Z, G4double value);
/**
* Set the value of Ecnz.
*/
G4bool setEcnz(G4int A, G4int Z, G4double value);
/**
* Set the value of Vgsld.
*/
G4bool setVgsld(G4int A, G4int Z, G4double value);
/**
* Set the value of Pace2.
*/
G4bool setPace2(G4int A, G4int Z, G4double value);
G4double getAlpha(G4int A, G4int Z);
/**
* Get the value of Alpha.
*/
G4double getEcnz(G4int A, G4int Z);
/**
* Get the value of Vgsld.
*/
G4double getVgsld(G4int A, G4int Z);
/**
* Get the value of Pace2.
*/
G4double getPace2(G4int A, G4int Z);
G4int getAlphaRows();
G4int getAlphaCols();
G4int getPaceRows();
G4int getPaceCols();
virtual G4bool readData() = 0;
private:
static const G4int alphaRows = 155;
static const G4int alphaCols = 100;
static const G4int paceRows = 500;
static const G4int paceCols = 500;
G4double alpha[alphaRows][alphaCols];
G4double ecnz[alphaRows][alphaCols];
G4double vgsld[alphaRows][alphaCols];
G4double pace2[paceRows][paceCols];
};
#endif
@@ -0,0 +1,122 @@
//
// ********************************************************************
// * 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: G4InclCascadeInterface.hh,v 1.5 2007/10/31 10:44:22 miheikki Exp $
// Translation of INCL4.2/ABLA V3
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
// CLASS DESCRIPTION
// This class is a preliminary interface code for INCL4 cascade
// code. This class is intended to be used as an interface for
// colliding hadrons (protons, neutrons, pions) to nuclei.
// This class was created by Pekka Kaitaniemi
// (kaitanie@cc.helsinki.fi) , Helsinki Institute of Physics using
// G4CascadeInterface as a template.
#ifndef G4INCLCASCADEINTERFACE_H
#define G4INCLCASCADEINTERFACE_H 1
#include "G4Nucleon.hh"
#include "G4Nucleus.hh"
#include "G4HadronicInteraction.hh"
#include "G4VIntraNuclearTransportModel.hh"
#include "G4KineticTrackVector.hh"
#include "G4FragmentVector.hh"
#include "G4ParticleChange.hh"
#include "G4ReactionProductVector.hh"
#include "G4ReactionProduct.hh"
// INCL includes
#include "G4InclDataDefs.hh"
#include "G4AblaDataDefs.hh"
#include "G4Incl.hh"
#include <fstream>
#include <iostream>
using namespace std;
/**
* Interface for INCL. This interface handles basic hadron
* bullet particles (protons, neutrons, pions).
* @see G4InclAblaLightIonInterface
*/
class G4InclCascadeInterface : public G4VIntraNuclearTransportModel {
public:
/**
* Basic constructor.
*/
G4InclCascadeInterface();
G4int operator==(G4InclCascadeInterface& right) {
return (this == &right);
}
G4int operator!=(G4InclCascadeInterface& right) {
return (this != &right);
}
~G4InclCascadeInterface(); // Destructor
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus); // Idle
/**
* Main method to apply the INCL/ABLA physics model.
* @param aTrack the projectile particle
* @param theNucleus target nucleus
* @return the output of the INCL/ABLA physics model
*/
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& theNucleus);
private:
G4int outputVerbosity;
G4int verboseLevel;
private:
G4Hazard *hazard; // The random seeds used by INCL.
G4VarNtp *varntp;
G4Calincl *calincl;
G4Ws *ws;
G4Mat *mat;
G4Incl *incl;
G4HadFinalState theResult;
ofstream diagdata;
G4int eventNumber;
G4double previousTargetA;
G4double previousTargetZ;
};
#endif // G4INCLCASCADEINTERFACE_H
@@ -0,0 +1,687 @@
//
// ********************************************************************
// * 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: G4InclDataDefs.hh,v 1.2 2007/09/11 13:18:43 miheikki Exp $
// Translation of INCL4.2/ABLA V3
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
// All data structures needed by INCL4 are defined here.
#ifndef InclDataDefs_hh
#define InclDataDefs_hh 1
#define FSIZE 15
/**
* Initial values of a hadronic cascade problem.
*/
class G4Calincl {
public:
G4Calincl() {};
~G4Calincl() {};
/**
* Here f is an array containing the following initial values:
* - f[0] : target mass number
* - f[1] : target charge number
* - f[2] : bullet energy
* - f[3] : minimum proton energy to leave the target (default: 0.0)
* - f[4] : nuclear potential (default: 45.0 MeV)
* - f[5] : time scale (default: 1.0)
* - f[6] : bullet type (1: proton, 2: neutron, 3: pi+, 4: pi0 5: pi-, 6:H2, 7: H3, 8: He3, 9: He4
* - f[7] : minimum neutron energy to leave the target (default: 0.0)
* - f[8] : target material identifier (G4Mat)
* - f[9] : not used
* - f[10] : not used
* - f[11] : not used
* - f[12] : not used
* - f[13] : not used
* - f[14] : not used
*/
G4double f[FSIZE];
/**
* Number of events to be processed.
*/
G4int icoup;
};
#define IGRAINESIZE 19
/**
* Random seeds used by internal random number generators.
* @see G4Incl::standardRandom
* @see G4Incl::gaussianRandom
*/
class G4Hazard{
public:
G4Hazard() {};
~G4Hazard() {};
/**
* Random seed
*/
G4long ial;
/**
* An array of random seeds.
*/
G4long igraine[IGRAINESIZE];
};
#define MATSIZE 500
#define MATGEOSIZE 6
/**
* Target nuclei to be taken into account in the cascade problem.
*/
class G4Mat {
public:
G4Mat() { };
~G4Mat() { };
/**
* Charge numbers.
*/
G4int zmat[MATSIZE];
/**
* Mass number
*/
G4int amat[MATSIZE];
/**
*
*/
G4double bmax_geo[MATGEOSIZE][MATSIZE];
/**
* Number of materials.
*/
G4int nbmat;
};
#define LGNSIZE 9
/**
* Properties of light nucleus used as a bullet.
*/
class G4LightGausNuc {
public:
G4LightGausNuc() {};
~G4LightGausNuc() {};
G4double rms1t[LGNSIZE];
G4double pf1t[LGNSIZE];
G4double pfln[LGNSIZE];
G4double tfln[LGNSIZE];
G4double vnuc[LGNSIZE];
};
#define LNSIZE 30
/**
* Data of light nuclei.
*/
class G4LightNuc {
public:
G4LightNuc() {};
~G4LightNuc() {};
/**
* r
*/
G4double r[LNSIZE];
/**
* a
*/
G4double a[LNSIZE];
};
#define SAXWROWS 30
#define SAXWCOLS 500
/**
* Woods-Saxon density and its first derivative.
*/
class G4Saxw {
public:
G4Saxw() {};
~G4Saxw() {};
/**
* x
*/
G4double x[SAXWROWS][SAXWCOLS];
/**
* y
*/
G4double y[SAXWROWS][SAXWCOLS];
/**
* s
*/
G4double s[SAXWROWS][SAXWCOLS];
/**
* imat
*/
G4int imat;
/**
* n
*/
G4int n;
/**
* k
*/
G4int k;
};
/**
* Parameters for INCL4 model.
*/
class G4Ws {
public:
G4Ws() {};
~G4Ws() {};
/**
* r0
*/
G4double r0;
/**
* adif
*/
G4double adif;
/**
* Maximum radius of the nucleus
*/
G4double rmaxws;
/**
* drws
*/
G4double drws;
/**
* Shape of the surface of the nucleus:
* - -1: Woods-Saxon density with impact parameter dependence
* - 0: Woods-Saxon density without impact parameter dependence
* - 1: Sharp surface (hard sphere)
*/
G4double nosurf;
/**
* Parameter related to the maximum radius of the nucleus.
*
* rmaxws = r0 + xfoisa*A
*/
G4double xfoisa;
/**
* Pauli blocking used in the simulation:
* - 0: statistic Pauli blocking
* - 1: strict Pauli blocking
* - 2: no Pauli blocking
*/
G4double npaulstr;
/**
* Maximum impact parameter
*/
G4double bmax;
};
#define DTONSIZE 13
/**
* Random seeds used by internal random number generators.
* @see G4Incl::standardRandom
* @see G4Incl::gaussianRandom
*/
class G4Dton {
public:
G4Dton() {};
~G4Dton() {};
G4double c[DTONSIZE];
G4double d[DTONSIZE];
G4double fn;
};
#define SPL2SIZE 100
/**
* Random seeds used by internal random number generators.
* @see G4Incl::standardRandom
* @see G4Incl::gaussianRandom
*/
class G4Spl2 {
public:
G4Spl2() {};
~G4Spl2() {};
G4double x[SPL2SIZE];
G4double y[SPL2SIZE];
G4double a[SPL2SIZE];
G4double b[SPL2SIZE];
G4double c[SPL2SIZE];
G4int n;
};
// incl4.2.cc:
//#define BL1SIZE 300
#define BL1SIZE 3000
/**
* Random seeds used by internal random number generators.
* @see G4Incl::standardRandom
* @see G4Incl::gaussianRandom
*/
class G4Bl1 {
public:
G4Bl1() {};
~G4Bl1() {};
G4double p1[BL1SIZE],p2[BL1SIZE],p3[BL1SIZE];
G4double eps[BL1SIZE];
G4int ind1[BL1SIZE],ind2[BL1SIZE];
G4double ta;
};
#define BL2CROISSIZE 19900
#define BL2INDSIZE 19900
/**
*
*/
class G4Bl2 {
public:
G4Bl2() {};
~G4Bl2() {};
/**
*
*/
G4double crois[BL2CROISSIZE];
/**
*
*/
G4int k;
/**
*
*/
G4int ind[BL2INDSIZE];
/**
*
*/
G4int jnd[BL2INDSIZE];
};
//#define BL3SIZE 300
#define BL3SIZE 3000
/**
*
*/
class G4Bl3 {
public:
G4Bl3() {};
~G4Bl3() {};
/**
* r1 and r2
*/
G4double r1,r2;
/**
* Nucleon positions
*/
G4double x1[BL3SIZE], x2[BL3SIZE],x3[BL3SIZE];
/**
* Mass numbers
*/
G4int ia1,ia2;
/**
* rab2
*/
G4double rab2;
};
/**
* G4Bl4
*/
class G4Bl4 {
public:
G4Bl4() {};
~G4Bl4() {};
/**
* tmax5
*/
G4double tmax5;
};
//#define BL5SIZE 300
#define BL5SIZE 3000
/**
* G4Bl5
*/
class G4Bl5 {
public:
G4Bl5() {};
~G4Bl5() {};
/**
* tlg
*/
G4double tlg[BL5SIZE];
/**
* nesc
*/
G4int nesc[BL5SIZE];
};
/**
* G4Bl6
*/
class G4Bl6 {
public:
G4Bl6() {};
~G4Bl6() {};
/**
* xx10
*/
G4double xx10;
/**
* isa
*/
G4double isa;
};
/**
* G4Bl8
*/
class G4Bl8 {
public:
G4Bl8() {};
~G4Bl8() {};
/**
* rathr
*/
G4double rathr;
/**
* ramass
*/
G4double ramass;
};
//#define BL9SIZE 300
#define BL9SIZE 3000
/**
* G4Bl9
*/
class G4Bl9 {
public:
G4Bl9() {
l1 = 0;
l2 = 0;
};
~G4Bl9() {};
/**
* hel
*/
G4double hel[BL9SIZE];
/**
* l1 and l2
*/
G4int l1,l2;
};
/**
* G4Bl10
*/
class G4Bl10 {
public:
G4Bl10() {};
~G4Bl10() {};
/**
* ri4, rs4, r2i, r2s, pdummy, pf
*/
G4double ri4,rs4,r2i,r2s,pdummy,pf;
};
/**
* G4Kind
*/
class G4Kind {
public:
G4Kind() {};
~G4Kind() {};
/**
* kindf7
*/
G4int kindf7;
};
#define VARSIZE 3
#define VAEPSSIZE 250
#define VAAVM 1000
/**
* Extra information on collisions between nucleons.
*/
class G4VarAvat {
public:
G4VarAvat() {};
~G4VarAvat() {};
/**
*
*/
G4int kveux;
/**
*
*/
G4double bavat;
/**
*
*/
G4int nopartavat,ncolavat;
/**
*
*/
G4double r1_in[VARSIZE],r1_first_avat[VARSIZE];
/**
*
*/
G4double epsd[VAEPSSIZE],eps2[VAEPSSIZE],eps4[VAEPSSIZE],eps6[VAEPSSIZE],epsf[VAEPSSIZE];
/**
*
*/
G4int nb_avat;
/**
*
*/
G4double timeavat[VAAVM],l1avat[VAAVM],l2avat[VAAVM],jpartl1[VAAVM],jpartl2[VAAVM];
/**
*
*/
G4double del1avat[VAAVM],del2avat[VAAVM],energyavat[VAAVM];
/**
*
*/
G4double bloc_paul[VAAVM],bloc_cdpp[VAAVM],go_out[VAAVM];
};
#define VARNTPSIZE 255
class G4VarNtp {
public:
G4VarNtp() {};
~G4VarNtp() {};
/**
* A of the remnant.
*/
G4double massini;
/**
* Z of the remnant.
*/
G4double mzini;
/**
* Excitation energy.
*/
G4double exini;
/**
* 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;
/**
* 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];
};
/**
* Pauli blocking.
*/
class G4Paul {
public:
G4Paul() {};
~G4Paul() {};
/**
*
*/
G4double ct0,ct1,ct2,ct3,ct4,ct5,ct6,pr,pr2,xrr,xrr2;
/**
*
*/
G4double cp0,cp1,cp2,cp3,cp4,cp5,cp6;
};
#endif
@@ -0,0 +1,123 @@
//
// ********************************************************************
// * 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: G4InclLightIonInterface.hh,v 1.5 2007/10/31 10:44:22 miheikki Exp $
// Translation of INCL4.2/ABLA V3
// Pekka Kaitaniemi, HIP (translation)
// Christelle Schmidt, IPNL (fission code)
// Alain Boudard, CEA (contact person INCL/ABLA)
// Aatos Heikkinen, HIP (project coordination)
// CLASS DESCRIPTION
// This class is a preliminary interface code for INCL4 cascade and
// ABLA evaporation codes. This class is intended to be used as an
// interface for colliding light ions (deuterons, tritons, he3 and
// alphas) to nuclei.
// This class was created by Pekka Kaitaniemi
// (kaitanie@cc.helsinki.fi) , Helsinki Institute of Physics using
// G4CascadeInterface as a template.
#ifndef G4INCLLIGHTIONINTERFACE_H
#define G4INCLLIGHTIONINTERFACE_H 1
#include "G4Nucleon.hh"
#include "G4Nucleus.hh"
#include "G4HadronicInteraction.hh"
#include "G4VIntraNuclearTransportModel.hh"
#include "G4KineticTrackVector.hh"
#include "G4FragmentVector.hh"
#include "G4ParticleChange.hh"
#include "G4ReactionProductVector.hh"
#include "G4ReactionProduct.hh"
// INCL includes
#include "G4InclDataDefs.hh"
#include "G4AblaDataDefs.hh"
#include "G4Incl.hh"
#include <fstream>
#include <iostream>
using namespace std;
/**
* Interface for INCL. This interface handles basic light ion
* bullet particles (deuterons, tritons, he3 and alphas).
* @see G4InclAblaLightIonInterface
*/
class G4InclLightIonInterface : public G4VIntraNuclearTransportModel {
public:
/**
* Basic constructor.
*/
G4InclLightIonInterface();
G4int operator==(G4InclLightIonInterface& right) {
return (this == &right);
}
G4int operator!=(G4InclLightIonInterface& right) {
return (this != &right);
}
~G4InclLightIonInterface(); // Destructor
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus); // Idle
/**
* Main method to apply the INCL/ABLA physics model.
* @param aTrack the projectile particle
* @param theNucleus target nucleus
* @return the output of the INCL/ABLA physics model
*/
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& theNucleus);
private:
G4int outputVerbosity;
G4int verboseLevel;
private:
G4Hazard *hazard; // The random seeds used by INCL.
G4VarNtp *varntp;
G4Calincl *calincl;
G4Ws *ws;
G4Mat *mat;
G4Incl *incl;
G4HadFinalState theResult;
ofstream diagdata;
G4int eventNumber;
G4double previousTargetA;
G4double previousTargetZ;
};
#endif // G4INCLLIGHTIONINTERFACE_H