Import Geant4 9.4.0 source tree
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4hadronic_incl_cascade
|
||||
# Package: Geant4.src.G4processes.G4hadronic.G4hadronic_models.G4hadronic_incl_cascade
|
||||
#
|
||||
# CMakeLists.txt for building a single granular library.
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: CMakeLists.txt,v 1.1 2010/09/29 19:02:35 bmorgan Exp $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
include(Geant4MacroLibraryTargets)
|
||||
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
|
||||
endif()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.8 2008/07/11 08:25:37 gcosmo Exp $
|
||||
# $Id: GNUmakefile,v 1.13 2010/11/13 00:08:36 kaitanie Exp $
|
||||
# -----------------------------------------------------------
|
||||
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
|
||||
# -----------------------------------------------------------
|
||||
@@ -9,8 +9,18 @@ ifndef G4INSTALL
|
||||
G4INSTALL = ../../../../..
|
||||
endif
|
||||
|
||||
ifdef G4INCLDEBUG
|
||||
CPPFLAGS += -DG4INCLDEBUG
|
||||
endif
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
# INCL_DEBUG_LOG : Produce an ASCII log that contains detailed avatar
|
||||
# and particle information
|
||||
ifdef G4INCL_DEBUG_LOG
|
||||
CPPFLAGS += -DG4INCL_DEBUG_LOG
|
||||
endif
|
||||
|
||||
CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/global/HEPRandom/include \
|
||||
-I$(G4BASE)/global/HEPNumerics/include \
|
||||
@@ -25,7 +35,14 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/cross_sections/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/evaporation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/fermi_breakup/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/photon_evaporation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/multifragmentation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/handler/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/pre_equilibrium/exciton_model/include/ \
|
||||
-I$(G4BASE)/particles/management/include \
|
||||
-I$(G4BASE)/particles/leptons/include \
|
||||
-I$(G4BASE)/particles/bosons/include \
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
==========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Physics Simulation
|
||||
==========================================================
|
||||
$Id: History,v 1.26 2009/12/09 10:36:40 kaitanie Exp $
|
||||
$Id: History,v 1.37 2010/11/17 20:19:09 kaitanie Exp $
|
||||
---------------------------------------------------------------------
|
||||
|
||||
History file for the Liege cascade INCL Model
|
||||
@@ -16,6 +16,88 @@ code and to keep track of all tags.
|
||||
* Please list in reverse chronological order (last date on top)
|
||||
---------------------------------------------------------------
|
||||
|
||||
17 November 2010 - Pekka Kaitaniemi (hadr-incl-V09-03-10)
|
||||
---------------------------------------------------------
|
||||
- Fixed several issues reported by Coverity:
|
||||
o Fix: Fragment vector and Fermi break-up related emory leaks in
|
||||
INCL/ABLA interfaces
|
||||
o Initialize INCL internal variables properly
|
||||
o Check array boundaries in datafile reader
|
||||
|
||||
16 November 2010 - Gabriele Cosmo (hadr-incl-V09-03-09)
|
||||
-------------------------------------------------------
|
||||
- More minor fixes from Coverity reports...
|
||||
|
||||
12 November 2010 - Pekka Kaitaniemi (hadr-incl-V09-03-08)
|
||||
---------------------------------------------------------
|
||||
- Fixed several minor variable initialization issues reported by Coverity
|
||||
|
||||
11 November 2010 - Pekka Kaitaniemi (hadr-incl-V09-03-07)
|
||||
---------------------------------------------------------
|
||||
- Fixed some minor variable initialization issues reported by Coverity
|
||||
- Updated interfaces:
|
||||
o INCL + built-in ABLA de-excitation: G4InclAblaCascadeInterface and
|
||||
G4InclAblaLightIonInterface
|
||||
o INCL + PreCompound model: G4InclCascadeInterface and
|
||||
G4InclLightIonInterface
|
||||
|
||||
03 November 2010 - Pekka Kaitaniemi (hadr-incl-V09-03-06)
|
||||
---------------------------------------------------------
|
||||
- Fixed insufficient array index safeguard in ABLA
|
||||
- Silenced debugging output printed by G4InclAblaCascadeInterface
|
||||
|
||||
29 October 2010 - Gunter Folger (hadr-incl-V09-03-05)
|
||||
-----------------------------------------------------
|
||||
- Fixed several more compilation warnings for conversion of double to int
|
||||
in G4Incl.cc, G4InclAblaCascadeInterface.cc, and G4InclAblaLightIonInterface.cc.
|
||||
|
||||
28 October 2010 - Gabriele Cosmo (hadr-incl-V09-03-04)
|
||||
-----------------------------------------------------
|
||||
- Fixed compilation warning in G4InclDataDefs.hh for conversion of double
|
||||
to integer in initialization.
|
||||
|
||||
25 October 2010 - Pekka Kaitaniemi (hadr-incl-V09-03-03)
|
||||
--------------------------------------------------------
|
||||
- Refactored INCL input data structure to its own class G4InclInput
|
||||
o Made data members private
|
||||
o Access to input data only through accessor methods
|
||||
o INCL now uses integer A and Z internally as well as in the interface
|
||||
|
||||
14 September 2010 - Pekka Kaitaniemi (hadr-incl-V09-03-02)
|
||||
----------------------------------------------------------
|
||||
- Migrated to integer A and Z when using G4Nucleus
|
||||
- Bugfixes:
|
||||
o Make sure we use Geant4 random number generators everywhere
|
||||
o Silenced some unnecessary warnings
|
||||
o Make sure we use INCL for all light ion projectiles up to Carbon-12
|
||||
|
||||
16 August 2010 - Pekka Kaitaniemi
|
||||
---------------------------------
|
||||
- Moved the INCL input initialization to the INCL input class
|
||||
- Implemented inverse-kinematics treatment for ion-hydrogen collisions
|
||||
|
||||
01 June 2010 - Pekka Kaitaniemi
|
||||
-------------------------------
|
||||
- Improved the Fermi break-up configuration
|
||||
|
||||
26 February 2010 - Pekka Kaitaniemi
|
||||
-----------------------------------
|
||||
- Merged INCL light ion projectile support to the integration branch
|
||||
o Support infrastructure for light ions up to Carbon
|
||||
o Use Geant4 Fermi break-up for projectile spectators and light cascade
|
||||
remnants
|
||||
|
||||
14 June 2010 - Gabriele Cosmo (hadr-incl-V09-03-01)
|
||||
------------------------------------------------------
|
||||
- Added missing virtual destructor to G4AblaFissionBase,
|
||||
G4InclAblaVirtualData and G4InclRandomNumbers.
|
||||
|
||||
27 April 2010 - Pekka Kaitaniemi (hadr-incl-V09-03-00)
|
||||
------------------------------------------------------
|
||||
- Fix: Nuclear deformation and shell effect data reader now constructs
|
||||
the corresponding data tables correctly.
|
||||
- Added some internal logging facilities to INCL (disabled by default)
|
||||
|
||||
09 December 2009 - Pekka Kaitaniemi (hadr-incl-V09-02-08)
|
||||
---------------------------------------------------------
|
||||
- Fix: Added a safeguard against division by zero in INCL nucleon
|
||||
@@ -87,6 +169,11 @@ code and to keep track of all tags.
|
||||
-----------------------------------------------------
|
||||
- use GetNuclearMass() instead of GetAtomicMass() in G4AblaEvaporation.cc
|
||||
|
||||
10 October 2008 - Pekka Kaitaniemi
|
||||
------------------------------------
|
||||
- Added ability to use Geant4 Fermi break-up
|
||||
for light cascade remnants
|
||||
|
||||
12 September 2008 - Pekka Kaitaniemi (hadr-incl-V09-01-02)
|
||||
------------------------------------
|
||||
- Bug fixes in INCL cascade:
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Abla.hh,v 1.11 2008/06/25 17:20:03 kaitanie Exp $
|
||||
// $Id: G4Abla.hh,v 1.14 2010/11/17 20:19:09 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4VInclLogger.hh"
|
||||
#include "G4InclRandomNumbers.hh"
|
||||
#include "G4AblaDataDefs.hh"
|
||||
#include "G4InclDataDefs.hh"
|
||||
@@ -47,11 +48,6 @@
|
||||
class G4Abla {
|
||||
|
||||
public:
|
||||
/**
|
||||
* Basic constructor.
|
||||
*/
|
||||
G4Abla();
|
||||
|
||||
/**
|
||||
* This constructor is used by standalone test driver and the Geant4 interface.
|
||||
*
|
||||
@@ -61,24 +57,20 @@ public:
|
||||
*/
|
||||
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);
|
||||
|
||||
/**
|
||||
* Basic destructor.
|
||||
*/
|
||||
~G4Abla();
|
||||
|
||||
/**
|
||||
* Register the INCL/ABLA internal variable logger.
|
||||
*/
|
||||
void registerLogger(G4VInclLogger *theLogger);
|
||||
|
||||
/**
|
||||
* Set verbosity level.
|
||||
*/
|
||||
void setVerboseLevel(G4int level) {
|
||||
verboseLevel = level;
|
||||
}
|
||||
void setVerboseLevel(G4int level);
|
||||
|
||||
/**
|
||||
* Get the internal output data structure pointer.
|
||||
@@ -101,7 +93,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);
|
||||
|
||||
@@ -162,7 +154,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.
|
||||
@@ -321,6 +313,8 @@ private:
|
||||
G4Opt *opt;
|
||||
G4Volant *volant;
|
||||
G4VarNtp *varntp;
|
||||
|
||||
G4VInclLogger *theLogger;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AblaDataDefs.hh,v 1.9 2008/06/25 17:20:04 kaitanie Exp $
|
||||
// $Id: G4AblaDataDefs.hh,v 1.13 2010/11/13 00:08:36 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -94,7 +94,9 @@ public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
G4Ald() {};
|
||||
G4Ald()
|
||||
:av(0.0), as(0.0), ak(0.0), optafan(0.0)
|
||||
{};
|
||||
~G4Ald() {};
|
||||
|
||||
G4double av,as,ak,optafan;
|
||||
@@ -140,7 +142,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;
|
||||
@@ -170,7 +175,9 @@ public:
|
||||
class G4Opt {
|
||||
|
||||
public:
|
||||
G4Opt() {};
|
||||
G4Opt()
|
||||
:optemd(0), optcha(0), eefac(0.0)
|
||||
{};
|
||||
~G4Opt() {};
|
||||
|
||||
G4int optemd,optcha;
|
||||
@@ -181,14 +188,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 VOLANTSIZE 200
|
||||
#define VOLANTSIZE 2000
|
||||
#define VOLANTSIZE 301
|
||||
/**
|
||||
* Evaporation and fission output data.
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AblaEvaporation.hh,v 1.1 2007/09/11 13:18:42 miheikki Exp $
|
||||
// $Id: G4AblaEvaporation.hh,v 1.3 2010/10/26 02:47:59 kaitanie Exp $
|
||||
// Defines an interface to evaporation models of Bertini cascase (BERT)
|
||||
// based on INUCL code.
|
||||
//
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "G4VEvaporation.hh"
|
||||
#include "G4Fragment.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
|
||||
#include "G4Abla.hh"
|
||||
|
||||
//#include "G4VCoulombBarrier.hh"
|
||||
@@ -95,6 +94,12 @@ private:
|
||||
// G4VCoulombBarrier * theCoulombBarrierPtr;
|
||||
G4double CoulombBarrier;
|
||||
|
||||
/**
|
||||
* ABLA evaporation
|
||||
*/
|
||||
G4Abla *abla;
|
||||
G4VarNtp *varntp;
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AblaFissionBase.hh,v 1.2 2008/06/25 17:20:04 kaitanie Exp $
|
||||
// $Id: G4AblaFissionBase.hh,v 1.5 2010/10/26 02:47:59 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -34,6 +34,7 @@
|
||||
#define G4AblaFissionBase_hh 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4InclUtils.hh"
|
||||
|
||||
/*
|
||||
* Abstract interface to fission models.
|
||||
@@ -42,15 +43,23 @@
|
||||
class G4AblaFissionBase {
|
||||
|
||||
public:
|
||||
G4AblaFissionBase() {}
|
||||
~G4AblaFissionBase() {}
|
||||
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;
|
||||
if(verboseLevel > G4InclUtils::silent) {
|
||||
about();
|
||||
G4cout <<";; Fission model verbosity level set to " << verboseLevel << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
void about() {
|
||||
G4cout << aboutModel << G4endl;
|
||||
G4cout << ";; " << aboutModel << G4endl;
|
||||
}
|
||||
|
||||
void setAboutString(G4String about) {
|
||||
@@ -58,6 +67,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
G4String aboutModel;
|
||||
};
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Incl.hh,v 1.15 2009/11/18 10:43:14 kaitanie Exp $
|
||||
// $Id: G4Incl.hh,v 1.19 2010/11/13 00:08:36 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -38,6 +38,8 @@
|
||||
#include "G4InclDataDefs.hh"
|
||||
#include "G4Abla.hh"
|
||||
#include <fstream>
|
||||
#include "G4VInclLogger.hh"
|
||||
#include "G4InclInput.hh"
|
||||
|
||||
using namespace std;
|
||||
/**
|
||||
@@ -62,7 +64,7 @@ public:
|
||||
* @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);
|
||||
G4Incl(G4Hazard *hazard, G4InclInput *calincl, G4Ws *ws, G4Mat *mat, G4VarNtp *varntp);
|
||||
|
||||
/**
|
||||
* Constructor for private unit testing purposes.
|
||||
@@ -85,6 +87,19 @@ public:
|
||||
void dumpBl2(std::ofstream& dumpOut); // Dump the contents of G4Bl2.
|
||||
void dumpBl3(std::ofstream& dumpOut); // Dump the contents of G4Bl3.
|
||||
|
||||
/**
|
||||
* Set Fermi break-up use flag.
|
||||
*/
|
||||
void setUseFermiBreakUp(G4bool useIt);
|
||||
|
||||
/**
|
||||
* Set projectile spectator use flag.
|
||||
*
|
||||
* Select whether or not to produce so-called spectator nucleus from
|
||||
* the projectile nucleons that do not hit the target.
|
||||
*/
|
||||
void setUseProjectileSpectators(G4bool useIt);
|
||||
|
||||
/**
|
||||
* Set verbosity level.
|
||||
*/
|
||||
@@ -100,7 +115,7 @@ public:
|
||||
void setSaxwData(G4Saxw *newSaxw);
|
||||
void setSpl2Data(G4Spl2 *newSpl2);
|
||||
void setMatData(G4Mat *newMat);
|
||||
void setCalinclData(G4Calincl *newCalincl);
|
||||
void setInput(G4InclInput *newCalincl);
|
||||
void setLightNucData(G4LightNuc *newLightNuc);
|
||||
void setLightGausNucData(G4LightGausNuc *newLightGausNuc);
|
||||
void setBl1Data(G4Bl1 *newBl1);
|
||||
@@ -114,16 +129,26 @@ public:
|
||||
void setBl10Data(G4Bl10 *newBl10);
|
||||
void setKindData(G4Kind *newKind);
|
||||
|
||||
/**
|
||||
* Register the logger.
|
||||
*/
|
||||
void registerLogger(G4VInclLogger *aLogger) {
|
||||
if(aLogger != 0) {
|
||||
theLogger = aLogger;
|
||||
abla->registerLogger(aLogger);
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
/**
|
||||
* Process one event with INCL4 only.
|
||||
*/
|
||||
void processEventIncl();
|
||||
void processEventIncl(G4InclInput *input);
|
||||
|
||||
/**
|
||||
* Process one event with INCL4 and built-in ABLA evaporation and fission.
|
||||
*/
|
||||
void processEventInclAbla(G4int eventnumber);
|
||||
void processEventInclAbla(G4InclInput *input, G4int eventnumber);
|
||||
|
||||
public: // Methods used to initialize INCL
|
||||
/**
|
||||
@@ -279,7 +304,12 @@ public: // Main INCL routines
|
||||
*/
|
||||
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);
|
||||
G4double *bimpact_p, G4int *l_p, G4double *xjrem, G4double *yjrem, G4double *zjrem);
|
||||
|
||||
//C projection de JREM sur Z:
|
||||
// MREM=ANINT(ZJREM/197.328)
|
||||
// IF (MREM.GT.JREM) MREM=JREM
|
||||
// IF (MREM.LT.-JREM) MREM=-JREM
|
||||
|
||||
/**
|
||||
* Single nucleon-nucleon collision.
|
||||
@@ -459,7 +489,16 @@ public: // Main INCL routines
|
||||
* @param v0
|
||||
* @return a double value
|
||||
*/
|
||||
G4double transmissionProb(G4double E, G4double iz, G4double izn, G4double r, G4double v0);
|
||||
// G4double transmissionProb(G4double E, G4double iz, G4double izn, G4double r, G4double v0);
|
||||
// G4double transmissionProb(G4double E, G4int iz, G4int izn, G4double r, G4double v0)
|
||||
G4double transmissionProb(G4double E, G4int iz, G4int ia, G4int izn, G4double r, G4double v0);
|
||||
// G4double transmissionProb(G4double E, G4int iz, G4int ia, G4int izn,G4double R, G4double v0);
|
||||
// G4double transmissionProb(G4double E, G4double iz, G4double izn, G4double r, G4double v0);
|
||||
|
||||
void projo_spec(G4int ia1, G4int ips,
|
||||
G4double fmpinc, G4double pinc, G4double tlab);
|
||||
|
||||
void ordered(G4double t, G4int nb);
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -535,7 +574,7 @@ public: // Main INCL routines
|
||||
* Nuclear radius
|
||||
* @param A mass number (double parameter)
|
||||
*/
|
||||
G4double radius(G4double A);
|
||||
G4double radius(G4int A);
|
||||
|
||||
/** Parametrisation de la section efficace de réaction calculée par incl4.1
|
||||
* iprojo=1 proton incident, iprojo=2, neutron incident).
|
||||
@@ -636,8 +675,23 @@ public: // Utilities
|
||||
G4double amax1(G4double a, G4double b);
|
||||
G4double w(G4double a, G4double b, G4double c, G4double d);
|
||||
G4int idnint(G4double a);
|
||||
|
||||
void print_log_start_step();
|
||||
void print_log_end_step();
|
||||
void print_log_entry(G4int iavatars, G4int iselected, G4int iparticles, G4int imin);
|
||||
void print_avatars();
|
||||
void print_one_avatar(G4int index);
|
||||
void print_one_particle(G4int index);
|
||||
void print_three_vector(G4double x, G4double y, G4double z);
|
||||
void print_map();
|
||||
|
||||
private:
|
||||
|
||||
/*
|
||||
* (Re)Initialize INCL internal variables
|
||||
*/
|
||||
void clearState();
|
||||
|
||||
/**
|
||||
* Random seeds for INCL4 internal random number generators.
|
||||
*/
|
||||
@@ -675,9 +729,9 @@ public: // Utilities
|
||||
G4LightNuc *light_nuc;
|
||||
|
||||
/**
|
||||
* G4Calincl
|
||||
* INCL input data structure
|
||||
*/
|
||||
G4Calincl *calincl;
|
||||
G4InclInput *calincl;
|
||||
|
||||
/**
|
||||
* G4Mat
|
||||
@@ -734,6 +788,11 @@ public: // Utilities
|
||||
*/
|
||||
G4Kind *kindstruct;
|
||||
|
||||
/**
|
||||
* Projectile properties.
|
||||
*/
|
||||
G4Bev *bev;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -809,15 +868,40 @@ public: // Utilities
|
||||
*/
|
||||
G4int densFunction;
|
||||
|
||||
/**
|
||||
* Use fermi break-up?
|
||||
*/
|
||||
G4bool useFermiBreakup;
|
||||
|
||||
/**
|
||||
* Projectile spectator nucleus support?
|
||||
*/
|
||||
G4bool useProjSpect;
|
||||
|
||||
/**
|
||||
* Type of the particle at index i.
|
||||
*
|
||||
* The extension to large composite projectiles the value is
|
||||
* negative for projectile spectators. Otherwise the particle types
|
||||
* are given in exactly the same way as in G4Calincl::f[6].
|
||||
* @see G4Calincl::f
|
||||
*/
|
||||
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);
|
||||
|
||||
G4VBe *be;
|
||||
G4InclProjSpect *ps;
|
||||
G4InclFermi *fermi;
|
||||
G4QuadvectProjo *qvp;
|
||||
G4Volant *volant;
|
||||
G4Abla *abla;
|
||||
G4InclRandomInterface *randomGenerator;
|
||||
|
||||
G4VInclLogger *theLogger;
|
||||
G4int inside_step; // Flag to determine whether we are inside or outside a simulation step
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4InclAblaCascadeInterface.hh,v 1.8 2009/11/18 10:43:14 kaitanie Exp $
|
||||
// $Id: G4InclAblaCascadeInterface.hh,v 1.11 2010/11/13 00:08:36 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -90,6 +90,7 @@ using namespace std;
|
||||
* as well.
|
||||
*
|
||||
* @see G4InclAblaLightIonInterface
|
||||
* @see G4InclCascadeInterface
|
||||
*/
|
||||
|
||||
class G4InclAblaCascadeInterface : public G4VIntraNuclearTransportModel {
|
||||
@@ -128,7 +129,7 @@ private:
|
||||
private:
|
||||
G4Hazard *hazard; // The random seeds used by INCL.
|
||||
G4VarNtp *varntp;
|
||||
G4Calincl *calincl;
|
||||
G4InclInput *calincl;
|
||||
G4Ws *ws;
|
||||
G4Mat *mat;
|
||||
G4Incl *incl;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4InclAblaDataFile.hh,v 1.2 2007/10/31 10:44:22 miheikki Exp $
|
||||
// $Id: G4InclAblaDataFile.hh,v 1.4 2010/11/17 20:19:09 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -42,6 +42,7 @@ class G4InclAblaDataFile : public G4InclAblaVirtualData {
|
||||
|
||||
public:
|
||||
G4InclAblaDataFile();
|
||||
~G4InclAblaDataFile();
|
||||
|
||||
/**
|
||||
* Read all data from files.
|
||||
@@ -50,8 +51,6 @@ public:
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
|
||||
G4String *dataPath;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4InclAblaLightIonInterface.hh,v 1.5 2007/10/31 10:44:22 miheikki Exp $
|
||||
// $Id: G4InclAblaLightIonInterface.hh,v 1.7 2010/10/26 02:47:59 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -45,9 +45,6 @@
|
||||
#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"
|
||||
@@ -107,7 +104,7 @@ private:
|
||||
private:
|
||||
G4Hazard *hazard; // The random seeds used by INCL.
|
||||
G4VarNtp *varntp;
|
||||
G4Calincl *calincl;
|
||||
G4InclInput *calincl;
|
||||
G4Ws *ws;
|
||||
G4Mat *mat;
|
||||
G4Incl *incl;
|
||||
@@ -118,6 +115,8 @@ private:
|
||||
G4int eventNumber;
|
||||
G4double previousTargetA;
|
||||
G4double previousTargetZ;
|
||||
G4bool useProjectileSpectator;
|
||||
G4bool useFermiBreakup;
|
||||
};
|
||||
|
||||
#endif // G4INCLABLALIGHTIONINTERFACE_H
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4InclAblaVirtualData.hh,v 1.5 2008/06/25 17:20:04 kaitanie Exp $
|
||||
// $Id: G4InclAblaVirtualData.hh,v 1.6 2010/06/14 16:10:01 gcosmo Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -46,9 +46,10 @@ class G4InclAblaVirtualData {
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Constructor, destructor
|
||||
*/
|
||||
G4InclAblaVirtualData();
|
||||
virtual ~G4InclAblaVirtualData();
|
||||
|
||||
public:
|
||||
/**
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4InclCascadeInterface.hh,v 1.5 2007/10/31 10:44:22 miheikki Exp $
|
||||
// $Id: G4InclCascadeInterface.hh,v 1.8 2010/11/13 00:08:36 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -59,15 +59,41 @@
|
||||
#include "G4AblaDataDefs.hh"
|
||||
#include "G4Incl.hh"
|
||||
|
||||
// Geant4 de-excitation
|
||||
#include "G4ExcitationHandler.hh"
|
||||
#include "G4PreCompoundModel.hh"
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
* <h1>INCL intra-nuclear cascade with Geant4 PreCompound for de-excitation</h1>
|
||||
*
|
||||
* Interface for INCL. This interface handles basic hadron
|
||||
* bullet particles (protons, neutrons, pions).
|
||||
* @see G4InclAblaLightIonInterface
|
||||
*
|
||||
* Example usage in case of protons:
|
||||
* @code
|
||||
* G4InclCascadeInterface* inclModel = new G4InclCascadeInterface;
|
||||
* inclModel -> SetMinEnergy(0.0 * MeV); // Set the energy limits
|
||||
* inclModel -> SetMaxEnergy(3.0 * GeV);
|
||||
*
|
||||
* G4ProtonInelasticProcess* protonInelasticProcess = new G4ProtonInelasticProcess();
|
||||
* G4ProtonInelasticCrossSection* protonInelasticCrossSection = new G4ProtonInelasticCrossSection();
|
||||
*
|
||||
* protonInelasticProcess -> RegisterMe(inclModel);
|
||||
* protonInelasticProcess -> AddDataSet(protonInelasticCrossSection);
|
||||
*
|
||||
* particle = G4Proton::Proton();
|
||||
* processManager = particle -> GetProcessManager();
|
||||
* processManager -> AddDiscreteProcess(protonInelasticProcess);
|
||||
* @endcode
|
||||
* The same setup procedure is needed for neutron and pion inelastic processes
|
||||
* as well.
|
||||
*
|
||||
* @see G4InclLightIonInterface
|
||||
*/
|
||||
|
||||
class G4InclCascadeInterface : public G4VIntraNuclearTransportModel {
|
||||
@@ -76,7 +102,7 @@ public:
|
||||
/**
|
||||
* Basic constructor.
|
||||
*/
|
||||
G4InclCascadeInterface();
|
||||
G4InclCascadeInterface(const G4String& name = "INCL Cascade with Geant4 PreCompound");
|
||||
|
||||
|
||||
G4int operator==(G4InclCascadeInterface& right) {
|
||||
@@ -92,10 +118,10 @@ public:
|
||||
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus); // Idle
|
||||
|
||||
/**
|
||||
* Main method to apply the INCL/ABLA physics model.
|
||||
* Main method to apply the INCL physics model.
|
||||
* @param aTrack the projectile particle
|
||||
* @param theNucleus target nucleus
|
||||
* @return the output of the INCL/ABLA physics model
|
||||
* @return the output of the INCL physics model
|
||||
*/
|
||||
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& theNucleus);
|
||||
|
||||
@@ -106,17 +132,20 @@ private:
|
||||
private:
|
||||
G4Hazard *hazard; // The random seeds used by INCL.
|
||||
G4VarNtp *varntp;
|
||||
G4Calincl *calincl;
|
||||
G4InclInput *calincl;
|
||||
G4Ws *ws;
|
||||
G4Mat *mat;
|
||||
G4Incl *incl;
|
||||
|
||||
|
||||
G4HadFinalState theResult;
|
||||
ofstream diagdata;
|
||||
|
||||
G4int eventNumber;
|
||||
G4double previousTargetA;
|
||||
G4double previousTargetZ;
|
||||
|
||||
G4ExcitationHandler *theExcitationHandler;
|
||||
G4PreCompoundModel *thePrecoModel;
|
||||
};
|
||||
|
||||
#endif // G4INCLCASCADEINTERFACE_H
|
||||
#endif // G4INCLABLACASCADEINTERFACE_H
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4InclDataDefs.hh,v 1.7 2009/11/18 10:43:14 kaitanie Exp $
|
||||
// $Id: G4InclDataDefs.hh,v 1.12 2010/11/17 20:19:09 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -35,39 +35,92 @@
|
||||
#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];
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4HadProjectile.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4Track.hh"
|
||||
|
||||
/**
|
||||
* Number of events to be processed.
|
||||
*/
|
||||
G4int icoup;
|
||||
class G4InclFermi {
|
||||
public:
|
||||
G4InclFermi() {
|
||||
G4double hc = 197.328;
|
||||
G4double fmp = 938.2796;
|
||||
pf=1.37*hc;
|
||||
pf2=pf*pf;
|
||||
tf=std::sqrt(pf*pf+fmp*fmp)-fmp;
|
||||
};
|
||||
~G4InclFermi() {};
|
||||
|
||||
G4double tf,pf,pf2;
|
||||
};
|
||||
|
||||
#define max_a_proj 61
|
||||
|
||||
/**
|
||||
* (eps_c,p1_s,p2_s,p3_s,eps_c used to store the kinematics of
|
||||
* nucleons for composit projectiles before entering the potential)
|
||||
*/
|
||||
class G4QuadvectProjo {
|
||||
public:
|
||||
G4QuadvectProjo() {
|
||||
for(G4int i = 0; i < max_a_proj; ++i) {
|
||||
eps_c[i] = 0.0;
|
||||
t_c[i] = 0.0;
|
||||
p3_c[i] = 0.0;
|
||||
p1_s[i] = 0.0;
|
||||
p2_s[i] = 0.0;
|
||||
p3_s[i] = 0.0;
|
||||
}
|
||||
};
|
||||
|
||||
~G4QuadvectProjo() {};
|
||||
|
||||
G4double eps_c[max_a_proj],p3_c[max_a_proj],
|
||||
p1_s[max_a_proj],p2_s[max_a_proj],p3_s[max_a_proj],
|
||||
t_c[max_a_proj];
|
||||
};
|
||||
|
||||
class G4VBe {
|
||||
public:
|
||||
G4VBe()
|
||||
:ia_be(0), iz_be(0),
|
||||
rms_be(0.0), pms_be(0.0), bind_be(0.0)
|
||||
{ };
|
||||
|
||||
~G4VBe() {};
|
||||
|
||||
G4int ia_be, iz_be;
|
||||
G4double rms_be, pms_be, bind_be;
|
||||
};
|
||||
|
||||
/**
|
||||
* Projectile spectator
|
||||
*/
|
||||
class G4InclProjSpect {
|
||||
public:
|
||||
G4InclProjSpect() {
|
||||
// G4cout <<"Projectile spectator data structure created!" << G4endl;
|
||||
clear();
|
||||
};
|
||||
~G4InclProjSpect() {};
|
||||
|
||||
void clear() {
|
||||
for(G4int i = 0; i < 21; i++) tab[i] = 0.0;
|
||||
for(G4int i = 0; i < 61; i++) n_projspec[i] = 0;
|
||||
a_projspec = 0;
|
||||
z_projspec = 0;
|
||||
t_projspec = 0.0;
|
||||
ex_projspec = 0.0;
|
||||
p1_projspec = 0.0;
|
||||
p2_projspec = 0.0;
|
||||
p3_projspec = 0.0;
|
||||
m_projspec = 0.0;
|
||||
};
|
||||
|
||||
G4double tab[21];
|
||||
G4int n_projspec[61];
|
||||
G4int a_projspec,z_projspec;
|
||||
G4double ex_projspec,t_projspec, p1_projspec, p2_projspec, p3_projspec, m_projspec;
|
||||
};
|
||||
|
||||
#define IGRAINESIZE 19
|
||||
@@ -78,7 +131,13 @@ public:
|
||||
*/
|
||||
class G4Hazard{
|
||||
public:
|
||||
G4Hazard() {};
|
||||
G4Hazard() {
|
||||
ial = 0;
|
||||
for(G4int i = 0; i < IGRAINESIZE; ++i) {
|
||||
igraine[i] = 0;
|
||||
}
|
||||
};
|
||||
|
||||
~G4Hazard() {};
|
||||
|
||||
/**
|
||||
@@ -99,7 +158,21 @@ public:
|
||||
*/
|
||||
class G4Mat {
|
||||
public:
|
||||
G4Mat() { };
|
||||
G4Mat() {
|
||||
nbmat = 0;
|
||||
|
||||
for(G4int i = 0; i < MATSIZE; ++i) {
|
||||
zmat[i] = 0;
|
||||
amat[i] = 0;
|
||||
}
|
||||
|
||||
for(G4int i = 0; i < MATGEOSIZE; ++i) {
|
||||
for(G4int j = 0; j < MATSIZE; ++j) {
|
||||
bmax_geo[i][j] = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
~G4Mat() { };
|
||||
|
||||
/**
|
||||
@@ -129,7 +202,16 @@ public:
|
||||
*/
|
||||
class G4LightGausNuc {
|
||||
public:
|
||||
G4LightGausNuc() {};
|
||||
G4LightGausNuc() {
|
||||
for(G4int i = 0; i < LGNSIZE; ++i) {
|
||||
rms1t[i] = 0.0;
|
||||
pf1t[i] = 0.0;
|
||||
pfln[i] = 0.0;
|
||||
tfln[i] = 0.0;
|
||||
vnuc[i] = 0.0;
|
||||
}
|
||||
};
|
||||
|
||||
~G4LightGausNuc() {};
|
||||
|
||||
G4double rms1t[LGNSIZE];
|
||||
@@ -145,7 +227,13 @@ public:
|
||||
*/
|
||||
class G4LightNuc {
|
||||
public:
|
||||
G4LightNuc() {};
|
||||
G4LightNuc() {
|
||||
for(G4int i = 0; i < LNSIZE; ++i) {
|
||||
r[i] = 0.0;
|
||||
a[i] = 0.0;
|
||||
}
|
||||
};
|
||||
|
||||
~G4LightNuc() {};
|
||||
|
||||
/**
|
||||
@@ -166,7 +254,17 @@ public:
|
||||
*/
|
||||
class G4Saxw {
|
||||
public:
|
||||
G4Saxw() {};
|
||||
G4Saxw() {
|
||||
for(G4int i = 0; i < SAXWROWS; ++i) {
|
||||
for(G4int j = 0; j < SAXWCOLS; ++j) {
|
||||
x[i][j] = 0.0;
|
||||
y[i][j] = 0.0;
|
||||
s[i][j] = 0.0;
|
||||
}
|
||||
}
|
||||
imat = 0; n = 0; k = 0;
|
||||
};
|
||||
|
||||
~G4Saxw() {};
|
||||
|
||||
/**
|
||||
@@ -205,7 +303,18 @@ public:
|
||||
*/
|
||||
class G4Ws {
|
||||
public:
|
||||
G4Ws() {};
|
||||
G4Ws() {
|
||||
fneck = 0.0;
|
||||
r0 = 0.0;
|
||||
adif = 0.0;
|
||||
rmaxws = 0.0;
|
||||
drws = 0.0;
|
||||
nosurf = 0.0;
|
||||
xfoisa = 0.0;
|
||||
bmax = 0.0;
|
||||
npaulstr = 0.0;
|
||||
};
|
||||
|
||||
~G4Ws() {};
|
||||
|
||||
/**
|
||||
@@ -255,6 +364,8 @@ public:
|
||||
* Maximum impact parameter
|
||||
*/
|
||||
G4double bmax;
|
||||
|
||||
G4double fneck;
|
||||
};
|
||||
|
||||
#define DTONSIZE 13
|
||||
@@ -265,7 +376,14 @@ public:
|
||||
*/
|
||||
class G4Dton {
|
||||
public:
|
||||
G4Dton() {};
|
||||
G4Dton() {
|
||||
fn = 0.0;
|
||||
for(G4int i = 0; i < DTONSIZE; ++i) {
|
||||
c[i] = 0.0;
|
||||
d[i] = 0.0;
|
||||
}
|
||||
};
|
||||
|
||||
~G4Dton() {};
|
||||
|
||||
G4double c[DTONSIZE];
|
||||
@@ -281,7 +399,14 @@ public:
|
||||
*/
|
||||
class G4Spl2 {
|
||||
public:
|
||||
G4Spl2() {};
|
||||
G4Spl2() {
|
||||
for(G4int i = 0; i < SPL2SIZE; ++i) {
|
||||
x[i] = 0.0; y[i] = 0.0;
|
||||
a[i] = 0.0; b[i] = 0.0; c[i] = 0.0;
|
||||
}
|
||||
n = 0;
|
||||
};
|
||||
|
||||
~G4Spl2() {};
|
||||
|
||||
G4double x[SPL2SIZE];
|
||||
@@ -303,23 +428,47 @@ public:
|
||||
*/
|
||||
class G4Bl1 {
|
||||
public:
|
||||
G4Bl1() {};
|
||||
G4Bl1() {
|
||||
ta = 0.0;
|
||||
for(G4int i = 0; i < BL1SIZE; ++i) {
|
||||
p1[i] = 0.0; p2[i] = 0.0; p3[i] = 0.0; eps[i] = 0.0;
|
||||
ind1[i] = 0; ind2[i] = 0;
|
||||
}
|
||||
};
|
||||
|
||||
~G4Bl1() {};
|
||||
|
||||
G4double p1[BL1SIZE],p2[BL1SIZE],p3[BL1SIZE];
|
||||
G4double eps[BL1SIZE];
|
||||
G4int ind1[BL1SIZE],ind2[BL1SIZE];
|
||||
G4double ta;
|
||||
|
||||
void dump(G4int numberOfParticles) {
|
||||
static G4int dumpNumber = 0;
|
||||
G4cout <<"Dump number" << dumpNumber << " of particle 4-momenta (G4Bl1):" << G4endl;
|
||||
G4cout <<"ta = " << ta << G4endl;
|
||||
for(G4int i = 0; i < numberOfParticles; i++) {
|
||||
G4cout <<"i = " << i << " p1 = " << p1[i] << " p2 = " << p2[i] << " p3 = " << p3[i] << " eps = " << eps[i] << G4endl;
|
||||
}
|
||||
dumpNumber++;
|
||||
}
|
||||
};
|
||||
|
||||
#define BL2CROISSIZE 19900
|
||||
#define BL2INDSIZE 19900
|
||||
#define BL2SIZE 19900
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class G4Bl2 {
|
||||
public:
|
||||
G4Bl2() {};
|
||||
G4Bl2() {
|
||||
k = 0;
|
||||
for(G4int i = 0; i < BL2SIZE; ++i) {
|
||||
crois[i] = 0.0;
|
||||
ind[i] = 0;
|
||||
jnd[i] = 0;
|
||||
}
|
||||
};
|
||||
|
||||
~G4Bl2() {};
|
||||
|
||||
void dump() {
|
||||
@@ -335,7 +484,7 @@ public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
G4double crois[BL2CROISSIZE];
|
||||
G4double crois[BL2SIZE];
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -345,12 +494,12 @@ public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
G4int ind[BL2INDSIZE];
|
||||
G4int ind[BL2SIZE];
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
G4int jnd[BL2INDSIZE];
|
||||
G4int jnd[BL2SIZE];
|
||||
};
|
||||
|
||||
//#define BL3SIZE 300
|
||||
@@ -360,7 +509,16 @@ public:
|
||||
*/
|
||||
class G4Bl3 {
|
||||
public:
|
||||
G4Bl3() {};
|
||||
G4Bl3() {
|
||||
r1 = 0.0; r2 = 0.0;
|
||||
ia1 = 0; ia2 = 0;
|
||||
rab2 = 0.0;
|
||||
|
||||
for(G4int i = 0; i < BL3SIZE; ++i) {
|
||||
x1[i] = 0.0; x2[i] = 0.0; x3[i] = 0.0;
|
||||
}
|
||||
};
|
||||
|
||||
~G4Bl3() {};
|
||||
|
||||
/**
|
||||
@@ -382,6 +540,18 @@ public:
|
||||
* rab2
|
||||
*/
|
||||
G4double rab2;
|
||||
|
||||
void dump() {
|
||||
static G4int dumpNumber = 0;
|
||||
G4cout <<"Dump number" << dumpNumber << " of particle positions (G4Bl3):" << G4endl;
|
||||
G4cout <<" ia1 = " << ia1 << G4endl;
|
||||
G4cout <<" ia2 = " << ia2 << G4endl;
|
||||
G4cout <<" rab2 = " << rab2 << G4endl;
|
||||
for(G4int i = 0; i <= (ia1 + ia2); i++) {
|
||||
G4cout <<"i = " << i << " x1 = " << x1[i] << " x2 = " << x2[i] << " x3 = " << x3[i] << G4endl;
|
||||
}
|
||||
dumpNumber++;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -389,7 +559,10 @@ public:
|
||||
*/
|
||||
class G4Bl4 {
|
||||
public:
|
||||
G4Bl4() {};
|
||||
G4Bl4()
|
||||
:tmax5(0.0)
|
||||
{};
|
||||
|
||||
~G4Bl4() {};
|
||||
|
||||
/**
|
||||
@@ -405,7 +578,13 @@ public:
|
||||
*/
|
||||
class G4Bl5 {
|
||||
public:
|
||||
G4Bl5() {};
|
||||
G4Bl5() {
|
||||
for(G4int i = 0; i < BL5SIZE; ++i) {
|
||||
tlg[i] = 0.0;
|
||||
nesc[i] = 0;
|
||||
}
|
||||
};
|
||||
|
||||
~G4Bl5() {};
|
||||
|
||||
/**
|
||||
@@ -424,7 +603,10 @@ public:
|
||||
*/
|
||||
class G4Bl6 {
|
||||
public:
|
||||
G4Bl6() {};
|
||||
G4Bl6()
|
||||
:xx10(0.0), isa(0.0)
|
||||
{};
|
||||
|
||||
~G4Bl6() {};
|
||||
|
||||
/**
|
||||
@@ -443,7 +625,10 @@ public:
|
||||
*/
|
||||
class G4Bl8 {
|
||||
public:
|
||||
G4Bl8() {};
|
||||
G4Bl8()
|
||||
:rathr(0.0), ramass(0.0)
|
||||
{};
|
||||
|
||||
~G4Bl8() {};
|
||||
|
||||
/**
|
||||
@@ -467,6 +652,9 @@ public:
|
||||
G4Bl9() {
|
||||
l1 = 0;
|
||||
l2 = 0;
|
||||
for(G4int i = 0; i < BL9SIZE; ++i) {
|
||||
hel[i] = 0.0;
|
||||
}
|
||||
};
|
||||
~G4Bl9() {};
|
||||
|
||||
@@ -486,7 +674,9 @@ public:
|
||||
*/
|
||||
class G4Bl10 {
|
||||
public:
|
||||
G4Bl10() {};
|
||||
G4Bl10()
|
||||
:ri4(0.0), rs4(0.0), r2i(0.0), r2s(0.0), pdummy(0.0), pf(0.0)
|
||||
{};
|
||||
~G4Bl10() {};
|
||||
|
||||
/**
|
||||
@@ -500,7 +690,9 @@ public:
|
||||
*/
|
||||
class G4Kind {
|
||||
public:
|
||||
G4Kind() {};
|
||||
G4Kind()
|
||||
:kindf7(0)
|
||||
{};
|
||||
~G4Kind() {};
|
||||
|
||||
/**
|
||||
@@ -509,6 +701,49 @@ public:
|
||||
G4int kindf7;
|
||||
};
|
||||
|
||||
/**
|
||||
* Projectile parameters.
|
||||
*/
|
||||
class G4Bev {
|
||||
public:
|
||||
/**
|
||||
* Initialize all variables to zero.
|
||||
*/
|
||||
G4Bev() {
|
||||
ia_be = 0;
|
||||
iz_be = 0;
|
||||
rms_be = 0.0;
|
||||
pms_be = 0.0;
|
||||
bind_be = 0.0;
|
||||
};
|
||||
~G4Bev() {};
|
||||
|
||||
/**
|
||||
* Mass number.
|
||||
*/
|
||||
G4int ia_be;
|
||||
|
||||
/**
|
||||
* Charge number.
|
||||
*/
|
||||
G4int iz_be;
|
||||
|
||||
/**
|
||||
* rms
|
||||
*/
|
||||
G4double rms_be;
|
||||
|
||||
/**
|
||||
* pms
|
||||
*/
|
||||
G4double pms_be;
|
||||
|
||||
/**
|
||||
* bind
|
||||
*/
|
||||
G4double bind_be;
|
||||
};
|
||||
|
||||
#define VARSIZE 3
|
||||
#define VAEPSSIZE 250
|
||||
#define VAAVM 1000
|
||||
@@ -517,7 +752,40 @@ public:
|
||||
*/
|
||||
class G4VarAvat {
|
||||
public:
|
||||
G4VarAvat() {};
|
||||
G4VarAvat() {
|
||||
kveux = 0;
|
||||
bavat = 0.0;
|
||||
nopartavat = 0; ncolavat = 0;
|
||||
nb_avat = 0;
|
||||
|
||||
for(G4int i = 0; i < VARSIZE; ++i) {
|
||||
r1_in[i] = 0.0;
|
||||
r1_first_avat[i] = 0.0;
|
||||
}
|
||||
|
||||
for(G4int i = 0; i < VAEPSSIZE; ++i) {
|
||||
epsd[i] = 0.0;
|
||||
eps2[i] = 0.0;
|
||||
eps4[i] = 0.0;
|
||||
eps6[i] = 0.0;
|
||||
epsf[i] = 0.0;
|
||||
}
|
||||
|
||||
for(G4int i = 0; i < VAAVM; ++i) {
|
||||
timeavat[i] = 0.0;
|
||||
l1avat[i] = 0.0;
|
||||
l2avat[i] = 0.0;
|
||||
jpartl1[i] = 0.0;
|
||||
jpartl2[i] = 0.0;
|
||||
del1avat[i] = 0.0;
|
||||
del2avat[i] = 0.0;
|
||||
energyavat[i] = 0.0;
|
||||
bloc_paul[i] = 0.0;
|
||||
bloc_cdpp[i] = 0.0;
|
||||
go_out[i] = 0.0;
|
||||
}
|
||||
};
|
||||
|
||||
~G4VarAvat() {};
|
||||
|
||||
/**
|
||||
@@ -566,10 +834,13 @@ public:
|
||||
G4double bloc_paul[VAAVM],bloc_cdpp[VAAVM],go_out[VAAVM];
|
||||
};
|
||||
|
||||
#define VARNTPSIZE 255
|
||||
#define VARNTPSIZE 301
|
||||
class G4VarNtp {
|
||||
public:
|
||||
G4VarNtp() {};
|
||||
G4VarNtp() {
|
||||
clear();
|
||||
};
|
||||
|
||||
~G4VarNtp() {};
|
||||
|
||||
/**
|
||||
@@ -581,6 +852,16 @@ public:
|
||||
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;
|
||||
@@ -589,6 +870,7 @@ public:
|
||||
pxrem = 0;
|
||||
pyrem = 0;
|
||||
pzrem = 0;
|
||||
erecrem = 0;
|
||||
mulncasc = 0;
|
||||
mulnevap = 0;
|
||||
mulntot = 0;
|
||||
@@ -599,6 +881,7 @@ public:
|
||||
izfis = 0;
|
||||
iafis = 0;
|
||||
ntrack = 0;
|
||||
needsFermiBreakup = false;
|
||||
for(G4int i = 0; i < VARNTPSIZE; i++) {
|
||||
itypcasc[i] = 0;
|
||||
avv[i] = 0;
|
||||
@@ -611,6 +894,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 <<"G4VarNtp: Error. Index i = " << particleIndex << " is already occupied by particle:" << G4endl;
|
||||
@@ -750,6 +1036,51 @@ public:
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
@@ -765,7 +1096,7 @@ public:
|
||||
*/
|
||||
G4double exini;
|
||||
|
||||
G4double pcorem, mcorem, pxrem, pyrem, pzrem;
|
||||
G4double pcorem, mcorem, pxrem, pyrem, pzrem, erecrem;
|
||||
|
||||
/**
|
||||
* Cascade n multip.
|
||||
@@ -824,6 +1155,14 @@ public:
|
||||
*/
|
||||
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).
|
||||
*/
|
||||
@@ -869,7 +1208,12 @@ private:
|
||||
*/
|
||||
class G4Paul {
|
||||
public:
|
||||
G4Paul() {};
|
||||
G4Paul()
|
||||
:ct0(0.0), ct1(0.0), ct2(0.0), ct3(0.0), ct4(0.0), ct5(0.0), ct6(0.0),
|
||||
pr(0.0), pr2(0.0), xrr(0.0), xrr2(0.0),
|
||||
cp0(0.0), cp1(0.0), cp2(0.0), cp3(0.0), cp4(0.0), cp5(0.0), cp6(0.0)
|
||||
{};
|
||||
|
||||
~G4Paul() {};
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef G4INCLINPUT_HH
|
||||
#define G4INCLINPUT_HH 1
|
||||
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4HadProjectile.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4Triton.hh"
|
||||
#include "G4He3.hh"
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
|
||||
#define FSIZE 15
|
||||
/**
|
||||
* Initial values of a hadronic cascade problem.
|
||||
*/
|
||||
class G4InclInput {
|
||||
public:
|
||||
G4InclInput() {
|
||||
isExtended = false;
|
||||
breakupThreshold = 10;
|
||||
fTargetA = 0;
|
||||
fTargetZ = 0;
|
||||
fBulletType = 0;
|
||||
fBulletE = 0.0;
|
||||
fTimeScale = 1.0;
|
||||
fNuclearPotential = 45.0; // Nuclear potential
|
||||
icoup = 0;
|
||||
|
||||
theExtendedProjectileA = 0;
|
||||
theExtendedProjectileZ = 0;
|
||||
isExtended = false;
|
||||
|
||||
fMinProtonE = 0.0;
|
||||
fNuclearPotential = 45.0;
|
||||
fTimeScale = 1.0;
|
||||
fMinNeutronEnergy = 0.0;
|
||||
|
||||
usingInverseKinematics = false;
|
||||
};
|
||||
|
||||
G4InclInput(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus, G4bool inverseKinematics);
|
||||
|
||||
~G4InclInput();
|
||||
|
||||
void printInfo();
|
||||
|
||||
static void printProjectileTargetInfo(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus);
|
||||
|
||||
static G4bool canUseInverseKinematics(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus);
|
||||
|
||||
G4double bulletE() {
|
||||
return fBulletE;
|
||||
}
|
||||
|
||||
G4int getClusterOption() { return 0; }; // No clusters (and in 4.2 there never will be!)
|
||||
|
||||
G4int bulletType() {
|
||||
return fBulletType;
|
||||
};
|
||||
|
||||
void setExtendedProjectileInfo(const G4ParticleDefinition *pd);
|
||||
|
||||
G4int getBulletType(const G4ParticleDefinition *pd);
|
||||
static G4ParticleDefinition* getParticleDefinition(G4int inclParticleCode);
|
||||
|
||||
G4bool isInverseKinematics() {
|
||||
return usingInverseKinematics;
|
||||
};
|
||||
|
||||
G4int targetA() { return fTargetA; };
|
||||
G4int targetZ() { return fTargetZ; };
|
||||
|
||||
G4int extendedProjectileA() { return theExtendedProjectileA; };
|
||||
G4int extendedProjectileZ() { return theExtendedProjectileZ; };
|
||||
G4bool isExtendedProjectile() { return isExtended; };
|
||||
void isExtendedProjectile(G4bool ext) { isExtended = ext; };
|
||||
|
||||
G4double getPotential() { return fNuclearPotential; };
|
||||
|
||||
G4int getBreakupThreshold() { return breakupThreshold; };
|
||||
G4double getTimeScale() { return fTimeScale; };
|
||||
|
||||
private:
|
||||
G4int theExtendedProjectileA;
|
||||
G4int theExtendedProjectileZ;
|
||||
G4bool isExtended;
|
||||
|
||||
G4int breakupThreshold;
|
||||
/**
|
||||
* Here f is an array containing the following initial values:
|
||||
* - f[0] : target mass number
|
||||
* - f[1] : target charge number
|
||||
*/
|
||||
G4int fTargetA, fTargetZ;
|
||||
|
||||
/*
|
||||
* - f[2] : bullet energy
|
||||
*/
|
||||
G4double fBulletE;
|
||||
|
||||
/*
|
||||
* - f[3] : minimum proton energy to leave the target (default: 0.0)
|
||||
*/
|
||||
G4double fMinProtonE;
|
||||
|
||||
/*
|
||||
* - f[4] : nuclear potential (default: 45.0 MeV)
|
||||
*/
|
||||
G4double fNuclearPotential;
|
||||
|
||||
/*
|
||||
* - f[5] : time scale (default: 1.0)
|
||||
*/
|
||||
G4double fTimeScale;
|
||||
|
||||
/*
|
||||
* - f[6] : bullet type (1: proton, 2: neutron, 3: pi+, 4: pi0 5: pi-, 6:H2, 7: H3, 8: He3, 9: He4
|
||||
*/
|
||||
G4int fBulletType;
|
||||
|
||||
/*
|
||||
* - f[7] : minimum neutron energy to leave the target (default: 0.0)
|
||||
*/
|
||||
G4double fMinNeutronEnergy;
|
||||
|
||||
/*
|
||||
* - 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;
|
||||
|
||||
G4bool usingInverseKinematics;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4InclLightIonInterface.hh,v 1.5 2007/10/31 10:44:22 miheikki Exp $
|
||||
// $Id: G4InclLightIonInterface.hh,v 1.8 2010/11/13 00:08:36 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -45,9 +45,6 @@
|
||||
#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"
|
||||
@@ -60,15 +57,19 @@
|
||||
#include "G4AblaDataDefs.hh"
|
||||
#include "G4Incl.hh"
|
||||
|
||||
// Geant4 de-excitation
|
||||
#include "G4ExcitationHandler.hh"
|
||||
#include "G4PreCompoundModel.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
|
||||
* Interface for INCL with Geant4 PreCompound de-excitation. This
|
||||
* interface handles basic light ion bullet particles from deuterons
|
||||
* up to carbon-12. @see G4InclAblaLightIonInterface
|
||||
*/
|
||||
|
||||
class G4InclLightIonInterface : public G4VIntraNuclearTransportModel {
|
||||
@@ -93,10 +94,10 @@ public:
|
||||
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus); // Idle
|
||||
|
||||
/**
|
||||
* Main method to apply the INCL/ABLA physics model.
|
||||
* Main method to apply the INCL physics model.
|
||||
* @param aTrack the projectile particle
|
||||
* @param theNucleus target nucleus
|
||||
* @return the output of the INCL/ABLA physics model
|
||||
* @return the output of the INCL physics model
|
||||
*/
|
||||
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& theNucleus);
|
||||
|
||||
@@ -107,7 +108,7 @@ private:
|
||||
private:
|
||||
G4Hazard *hazard; // The random seeds used by INCL.
|
||||
G4VarNtp *varntp;
|
||||
G4Calincl *calincl;
|
||||
G4InclInput *calincl;
|
||||
G4Ws *ws;
|
||||
G4Mat *mat;
|
||||
G4Incl *incl;
|
||||
@@ -118,6 +119,11 @@ private:
|
||||
G4int eventNumber;
|
||||
G4double previousTargetA;
|
||||
G4double previousTargetZ;
|
||||
G4bool useProjectileSpectator;
|
||||
G4bool useFermiBreakup;
|
||||
|
||||
G4ExcitationHandler *theExcitationHandler;
|
||||
G4PreCompoundModel *thePrecoModel;
|
||||
};
|
||||
|
||||
#endif // G4INCLLIGHTIONINTERFACE_H
|
||||
#endif // G4INCLABLALIGHTIONINTERFACE_H
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4InclRandomNumbers.hh,v 1.3 2008/06/25 17:20:04 kaitanie Exp $
|
||||
// $Id: G4InclRandomNumbers.hh,v 1.8 2010/11/13 00:08:36 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -42,18 +42,20 @@
|
||||
class G4InclRandomInterface {
|
||||
|
||||
public:
|
||||
G4InclRandomInterface() { }
|
||||
G4InclRandomInterface() {
|
||||
this->seed = 1337; // Default seed, this is never actually used.
|
||||
}
|
||||
G4InclRandomInterface(G4long seed) {
|
||||
this->seed = seed;
|
||||
}
|
||||
|
||||
~G4InclRandomInterface() { }
|
||||
virtual ~G4InclRandomInterface() { }
|
||||
|
||||
/**
|
||||
* Provide evenly distributed random numbers.
|
||||
*/
|
||||
virtual G4double getRandom() = 0;
|
||||
|
||||
virtual void printSeeds() = 0;
|
||||
private:
|
||||
G4long seed;
|
||||
};
|
||||
@@ -76,6 +78,8 @@ public:
|
||||
G4double getRandom() {
|
||||
return 0.5;
|
||||
}
|
||||
|
||||
void printSeeds() {};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -95,6 +99,10 @@ public:
|
||||
G4double getRandom() {
|
||||
return G4UniformRand();
|
||||
}
|
||||
|
||||
void printSeeds() {
|
||||
G4cout <<"Using Geant4 random number generator." << G4endl;
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef G4InclUtils_hh
|
||||
#define G4InclUtils_hh 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
class G4InclUtils
|
||||
{
|
||||
public:
|
||||
static G4double calculate4MomentumScaling(G4int A, G4int Z, G4double excitationE, G4double kineticE,
|
||||
G4double px, G4double py, G4double pz);
|
||||
|
||||
protected:
|
||||
G4InclUtils();
|
||||
~G4InclUtils();
|
||||
|
||||
public:
|
||||
// Verbosity levels:
|
||||
static const G4int silent = 0;
|
||||
static const G4int debug = 2;
|
||||
static const G4int verbose = 3;
|
||||
static const G4int verboseAll = 5;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Ranecu.hh,v 1.3 2008/06/25 17:20:04 kaitanie Exp $
|
||||
// $Id: G4Ranecu.hh,v 1.5 2010/10/26 02:47:59 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -38,6 +38,10 @@ class G4Ranecu : public G4InclRandomInterface {
|
||||
~G4Ranecu();
|
||||
|
||||
G4double getRandom();
|
||||
void printSeeds() {
|
||||
G4cout <<"Seed1 = " << iseed1 << G4endl;
|
||||
G4cout <<"Seed2 = " << iseed2 << G4endl;
|
||||
};
|
||||
|
||||
private:
|
||||
G4long iseed1, iseed2;
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VInclLogger.hh,v 1.2 2010/10/26 02:47:59 kaitanie 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 G4VInclLogger_hh
|
||||
#define G4VInclLogger_hh 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4String.hh"
|
||||
|
||||
/**
|
||||
* INCL logger interface
|
||||
*
|
||||
* Interface that allows us to generate graphs and histograms of the
|
||||
* INCL internal variables.
|
||||
*/
|
||||
class G4VInclLogger {
|
||||
|
||||
public:
|
||||
G4VInclLogger() {};
|
||||
~G4VInclLogger() {};
|
||||
|
||||
/**
|
||||
* Book 1D histogram.
|
||||
*/
|
||||
virtual void bookHistogram1D(G4String name, G4int bins, G4double xmin, G4double xmax) = 0;
|
||||
|
||||
/**
|
||||
* Book 2D histogram.
|
||||
*/
|
||||
virtual void bookHistogram2D(G4String name, G4int binsx, G4double xmin, G4double xmax,
|
||||
G4int binsy, G4double ymin, G4double ymax) = 0;
|
||||
|
||||
/**
|
||||
* Fill 1D histogram.
|
||||
*/
|
||||
virtual void fillHistogram1D(G4String name, G4double value) = 0;
|
||||
|
||||
/**
|
||||
* Fill 2D histogram.
|
||||
*/
|
||||
virtual void fillHistogram2D(G4String name, G4double xvalue, G4double yvalue) = 0;
|
||||
|
||||
/**
|
||||
* Save the histograms.
|
||||
*/
|
||||
virtual void saveHistograms() = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,130 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4hadronic_incl_cascade
|
||||
# Package: Geant4.src.G4processes.G4hadronic.G4hadronic_models.G4hadronic_incl_cascade
|
||||
#
|
||||
# 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,v 1.7 2010/11/30 11:38:26 bmorgan Exp $
|
||||
# GEANT4 Tag $Name: geant4-09-04 $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# 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/HEPNumerics/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/particles/shortlived/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/cross_sections/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/evaporation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/fermi_breakup/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/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/multifragmentation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/photon_evaporation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/util/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/util/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/pre_equilibrium/exciton_model/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/processes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/util/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4hadronic_incl_cascade
|
||||
HEADERS
|
||||
G4Abla.hh
|
||||
G4AblaDataDefs.hh
|
||||
G4AblaEvaporation.hh
|
||||
G4AblaFission.hh
|
||||
G4AblaFissionBase.hh
|
||||
G4AblaFissionSimfis18.hh
|
||||
G4Incl.hh
|
||||
G4InclAblaCascadeInterface.hh
|
||||
G4InclAblaDataFile.hh
|
||||
G4InclAblaLightIonInterface.hh
|
||||
G4InclAblaVirtualData.hh
|
||||
G4InclCascadeInterface.hh
|
||||
G4InclDataDefs.hh
|
||||
G4InclInput.hh
|
||||
G4InclLightIonInterface.hh
|
||||
G4InclRandomNumbers.hh
|
||||
G4InclUtils.hh
|
||||
G4Ranecu.hh
|
||||
G4VInclLogger.hh
|
||||
SOURCES
|
||||
G4Abla.cc
|
||||
G4AblaEvaporation.cc
|
||||
G4AblaFission.cc
|
||||
G4AblaFissionBase.cc
|
||||
G4AblaFissionSimfis18.cc
|
||||
G4Incl.cc
|
||||
G4InclAblaCascadeInterface.cc
|
||||
G4InclAblaDataFile.cc
|
||||
G4InclAblaLightIonInterface.cc
|
||||
G4InclAblaVirtualData.cc
|
||||
G4InclCascadeInterface.cc
|
||||
G4InclInput.cc
|
||||
G4InclLightIonInterface.cc
|
||||
G4InclUtils.cc
|
||||
G4Ranecu.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4baryons
|
||||
G4bosons
|
||||
G4geometrymng
|
||||
G4globman
|
||||
G4had_mod_man
|
||||
G4had_mod_util
|
||||
G4had_preequ_exciton
|
||||
G4hadronic_deex_evaporation
|
||||
G4hadronic_deex_fermi_breakup
|
||||
G4hadronic_deex_handler
|
||||
G4hadronic_mgt
|
||||
G4hadronic_proc
|
||||
G4hadronic_util
|
||||
G4hadronic_xsect
|
||||
G4hepnumerics
|
||||
G4ions
|
||||
G4leptons
|
||||
G4materials
|
||||
G4mesons
|
||||
G4partman
|
||||
G4procman
|
||||
G4shortlived
|
||||
G4track
|
||||
G4volumes
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4geometry
|
||||
G4global
|
||||
G4materials
|
||||
G4particles
|
||||
G4track
|
||||
LINK_LIBRARIES
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Abla.cc,v 1.20 2009/11/18 10:43:14 kaitanie Exp $
|
||||
// $Id: G4Abla.cc,v 1.27 2010/11/17 20:19:09 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -40,33 +40,6 @@
|
||||
#include "G4AblaFissionSimfis18.hh"
|
||||
#include "G4AblaFission.hh"
|
||||
|
||||
G4Abla::G4Abla()
|
||||
{
|
||||
verboseLevel = 0;
|
||||
ilast = 0;
|
||||
}
|
||||
|
||||
G4Abla::G4Abla(G4Hazard *hazard, G4Volant *volant)
|
||||
{
|
||||
verboseLevel = 0;
|
||||
ilast = 0;
|
||||
volant = volant; // ABLA internal particle data
|
||||
volant->iv = 0;
|
||||
hazard = hazard; // Random seeds
|
||||
|
||||
randomGenerator = new G4InclGeant4Random();
|
||||
//randomGenerator = new G4Ranecu();
|
||||
varntp = new G4VarNtp();
|
||||
pace = new G4Pace();
|
||||
ald = new G4Ald();
|
||||
eenuc = new G4Eenuc();
|
||||
ec2sub = new G4Ec2sub();
|
||||
ecld = new G4Ecld();
|
||||
fb = new G4Fb();
|
||||
fiss = new G4Fiss();
|
||||
opt = new G4Opt();
|
||||
}
|
||||
|
||||
G4Abla::G4Abla(G4Hazard *aHazard, G4Volant *aVolant, G4VarNtp *aVarntp)
|
||||
{
|
||||
verboseLevel = 0;
|
||||
@@ -97,8 +70,18 @@ G4Abla::G4Abla(G4Hazard *aHazard, G4Volant *aVolant, G4VarNtp *aVarntp)
|
||||
opt = new G4Opt();
|
||||
}
|
||||
|
||||
void G4Abla::setVerboseLevel(G4int level)
|
||||
{
|
||||
verboseLevel = level;
|
||||
if(verboseLevel > G4InclUtils::silent) {
|
||||
G4cout <<";; G4Abla: Setting verbose level to " << verboseLevel << G4endl;
|
||||
}
|
||||
fissionModel->setVerboseLevel(verboseLevel);
|
||||
}
|
||||
|
||||
G4Abla::~G4Abla()
|
||||
{
|
||||
delete fissionModel;
|
||||
delete randomGenerator;
|
||||
delete pace;
|
||||
delete ald;
|
||||
@@ -110,6 +93,12 @@ G4Abla::~G4Abla()
|
||||
delete opt;
|
||||
}
|
||||
|
||||
void G4Abla::registerLogger(G4VInclLogger *theLogger) {
|
||||
if(theLogger != NULL) {
|
||||
this->theLogger = theLogger;
|
||||
}
|
||||
}
|
||||
|
||||
// Main interface to the evaporation
|
||||
|
||||
// Possible problem with generic Geant4 interface: ABLA evaporation
|
||||
@@ -117,7 +106,7 @@ G4Abla::~G4Abla()
|
||||
// work. Maybe there is a way to obtain this information from
|
||||
// G4Fragment?
|
||||
|
||||
void G4Abla::breakItUp(G4double nucleusA, G4double nucleusZ, G4double nucleusMass, G4double excitationEnergy,
|
||||
void G4Abla::breakItUp(G4int nucleusA, G4int nucleusZ, G4double nucleusMass, G4double excitationEnergy,
|
||||
G4double angularMomentum, G4double recoilEnergy, G4double momX, G4double momY, G4double momZ,
|
||||
G4int eventnumber)
|
||||
{
|
||||
@@ -186,8 +175,8 @@ void G4Abla::breakItUp(G4double nucleusA, G4double nucleusZ, G4double nucleusMas
|
||||
G4int inttype = 0;
|
||||
G4double esrem = excitationEnergy;
|
||||
|
||||
G4double aprf = nucleusA;
|
||||
G4double zprf = nucleusZ;
|
||||
G4double aprf = (double) nucleusA;
|
||||
G4double zprf = (double) nucleusZ;
|
||||
G4double mcorem = nucleusMass;
|
||||
G4double ee = excitationEnergy;
|
||||
G4double jprf = angularMomentum; // actually root-mean-squared
|
||||
@@ -207,6 +196,9 @@ void G4Abla::breakItUp(G4double nucleusA, G4double nucleusZ, G4double nucleusMas
|
||||
//volant->iv = 1;
|
||||
|
||||
G4double pcorem = std::sqrt(erecrem*(erecrem +2.*938.2796*nucleusA));
|
||||
#ifdef G4INCLDEBUG
|
||||
theLogger->fillHistogram1D("pcorem", pcorem);
|
||||
#endif
|
||||
// G4double pcorem = std::sqrt(std::pow(momX,2) + std::pow(momY,2) + std::pow(momZ,2));
|
||||
if(pcorem != 0) { // Guard against division by zero.
|
||||
alrem = pxrem/pcorem;
|
||||
@@ -464,8 +456,8 @@ void G4Abla::breakItUp(G4double nucleusA, G4double nucleusZ, G4double nucleusMas
|
||||
// G4double *zf_par, G4double *af_par, G4double *mtota_par,
|
||||
// G4double *pleva_par, G4double *pxeva_par, G4double *pyeva_par,
|
||||
// G4double *ff_par, G4int *inttype_par, G4int *inum_par);
|
||||
G4double zf1, af1, malpha1, ffpleva1, ffpxeva1, ffpyeva1;
|
||||
G4int ff1, ftype1;
|
||||
G4double zf1 = 0.0, af1 = 0.0, malpha1 = 0.0, ffpleva1 = 0.0, ffpxeva1 = 0.0, ffpyeva1 = 0.0;
|
||||
G4int ff1 = 0, ftype1 = 0;
|
||||
evapora(zff1, aff1, epf1_out, 0.0, &zf1, &af1, &malpha1, &ffpleva1,
|
||||
&ffpxeva1, &ffpyeva1, &ff1, &ftype1, &inum);
|
||||
// C On ajoute le fragment:
|
||||
@@ -541,8 +533,8 @@ void G4Abla::breakItUp(G4double nucleusA, G4double nucleusZ, G4double nucleusMas
|
||||
// G4double *zf_par, G4double *af_par, G4double *mtota_par,
|
||||
// G4double *pleva_par, G4double *pxeva_par, G4double *pyeva_par,
|
||||
// G4double *ff_par, G4int *inttype_par, G4int *inum_par);
|
||||
G4double zf2, af2, malpha2, ffpleva2, ffpxeva2, ffpyeva2;
|
||||
G4int ff2, ftype2;
|
||||
G4double zf2 = 0.0, af2 = 0.0, malpha2 = 0.0, ffpleva2 = 0.0, ffpxeva2 = 0.0, ffpyeva2 = 0.0;
|
||||
G4int ff2 = 0, ftype2 = 0;
|
||||
evapora(zff2,aff2,epf2_out,0.0,&zf2,&af2,&malpha2,&ffpleva2,
|
||||
&ffpxeva2,&ffpyeva2,&ff2,&ftype2,&inum);
|
||||
// C On ajoute le fragment:
|
||||
@@ -1589,7 +1581,7 @@ void G4Abla::direct(G4double zprf, G4double a, G4double ee, G4double jprf,
|
||||
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 *ba_par, G4int, G4int inum, G4int itest)
|
||||
{
|
||||
G4int dummy0 = 0;
|
||||
|
||||
@@ -1739,7 +1731,6 @@ void G4Abla::direct(G4double zprf, G4double a, G4double ee, G4double jprf,
|
||||
static G4double y = 0.0;
|
||||
|
||||
imaxwell = 1;
|
||||
inttype = 0;
|
||||
|
||||
// limiting of excitation energy where fission occurs
|
||||
// Note, this is not the dynamical hindrance (see end of routine)
|
||||
@@ -2823,9 +2814,9 @@ G4double G4Abla::bipol(int iflag, G4double y)
|
||||
|
||||
i = idint(y/(2.0e-02)) + 1;
|
||||
|
||||
if(i >= bsbkSize) {
|
||||
if((i + 1) >= bsbkSize) {
|
||||
if(verboseLevel > 2) {
|
||||
G4cout <<"G4Abla error: index i = " << i << " is greater than array size permits." << G4endl;
|
||||
G4cout <<"G4Abla error: index " << i + 1 << " is greater than array size permits." << G4endl;
|
||||
}
|
||||
bipolResult = 0.0;
|
||||
}
|
||||
@@ -3685,9 +3676,8 @@ void G4Abla::rotab(G4double R[4][4], G4double pin[4], G4double pout[4])
|
||||
// the future the random number generation must be factored into its
|
||||
// own class
|
||||
|
||||
void G4Abla::standardRandom(G4double *rndm, G4long *seed)
|
||||
void G4Abla::standardRandom(G4double *rndm, G4long*)
|
||||
{
|
||||
(*seed) = (*seed); // Avoid warning during compilation.
|
||||
// Use Geant4 G4UniformRand
|
||||
(*rndm) = randomGenerator->getRandom();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AblaEvaporation.cc,v 1.4 2008/10/24 21:07:40 dennis Exp $
|
||||
// $Id: G4AblaEvaporation.cc,v 1.6 2010/10/26 02:47:59 kaitanie Exp $
|
||||
//
|
||||
#include <numeric>
|
||||
// #include "G4IonTable.hh"
|
||||
@@ -81,6 +81,13 @@ G4AblaEvaporation::G4AblaEvaporation() {
|
||||
hazard->igraine[16] = 76533;
|
||||
hazard->igraine[17] = 33759;
|
||||
hazard->igraine[18] = 13227;
|
||||
|
||||
G4VarNtp *evaporationResult = new G4VarNtp();
|
||||
G4Volant *volant = new G4Volant();
|
||||
|
||||
// Initialize evaporation.
|
||||
abla = new G4Abla(hazard, volant, evaporationResult);
|
||||
abla->initEvapora();
|
||||
}
|
||||
|
||||
G4AblaEvaporation::G4AblaEvaporation(const G4AblaEvaporation &) : G4VEvaporation() {
|
||||
@@ -107,19 +114,9 @@ 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();
|
||||
G4FragmentVector * G4AblaEvaporation::BreakItUp(const G4Fragment &theNucleus) {
|
||||
G4int nucleusA = theNucleus.GetA_asInt();
|
||||
G4int nucleusZ = theNucleus.GetZ_asInt();
|
||||
G4double nucleusMass = G4NucleiProperties::GetNuclearMass(nucleusA, nucleusZ);
|
||||
G4double excitationEnergy = theNucleus.GetExcitationEnergy();
|
||||
G4double angularMomentum = 0.0; // Don't know how to get this quantity... From Geant4???
|
||||
@@ -136,8 +133,8 @@ G4FragmentVector * G4AblaEvaporation::BreakItUp(const G4Fragment &theNucleus) {
|
||||
G4double exitationE = theNucleus.GetExcitationEnergy() * MeV;
|
||||
|
||||
varntp->ntrack = -1;
|
||||
varntp->massini = theNucleus.GetA();
|
||||
varntp->mzini = theNucleus.GetZ();
|
||||
varntp->massini = theNucleus.GetA_asInt();
|
||||
varntp->mzini = theNucleus.GetZ_asInt();
|
||||
|
||||
std::vector<G4DynamicParticle*> cascadeParticles;
|
||||
G4FragmentVector * theResult = new G4FragmentVector;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AblaFission.cc,v 1.3 2008/11/06 08:42:00 gcosmo Exp $
|
||||
// $Id: G4AblaFission.cc,v 1.5 2010/11/17 20:19:09 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -35,6 +35,8 @@
|
||||
|
||||
G4AblaFission::G4AblaFission()
|
||||
{
|
||||
hazard = 0;
|
||||
randomGenerator = 0;
|
||||
}
|
||||
|
||||
G4AblaFission::G4AblaFission(G4Hazard *hzr, G4InclRandomInterface *rndm)
|
||||
@@ -1085,9 +1087,8 @@ void G4AblaFission::fissionDistri(G4double &a,G4double &z,G4double &e,
|
||||
}
|
||||
}
|
||||
|
||||
void G4AblaFission::standardRandom(G4double *rndm, G4long *seed)
|
||||
void G4AblaFission::standardRandom(G4double *rndm, G4long*)
|
||||
{
|
||||
(*seed) = (*seed); // Avoid warning during compilation.
|
||||
// Use Geant4 G4UniformRand
|
||||
(*rndm) = randomGenerator->getRandom();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4AblaFissionBase.cc,v 1.3 2010/10/26 02:47:59 kaitanie 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 "G4AblaFissionBase.hh"
|
||||
|
||||
G4AblaFissionBase::G4AblaFissionBase()
|
||||
{
|
||||
verboseLevel = 0;
|
||||
}
|
||||
|
||||
G4AblaFissionBase::~G4AblaFissionBase() {}
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AblaFissionSimfis18.cc,v 1.3 2008/11/06 08:42:00 gcosmo Exp $
|
||||
// $Id: G4AblaFissionSimfis18.cc,v 1.5 2010/11/17 20:19:09 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -35,6 +35,8 @@
|
||||
|
||||
G4AblaFissionSimfis18::G4AblaFissionSimfis18()
|
||||
{
|
||||
hazard = 0;
|
||||
randomGenerator = 0;
|
||||
}
|
||||
|
||||
G4AblaFissionSimfis18::G4AblaFissionSimfis18(G4Hazard *hzr, G4InclRandomInterface *rndm)
|
||||
@@ -1411,9 +1413,8 @@ void G4AblaFissionSimfis18::fissionDistri(G4double &a,G4double &z,G4double &e,
|
||||
}
|
||||
}
|
||||
|
||||
void G4AblaFissionSimfis18::standardRandom(G4double *rndm, G4long *seed)
|
||||
void G4AblaFissionSimfis18::standardRandom(G4double *rndm, G4long*)
|
||||
{
|
||||
(*seed) = (*seed); // Avoid warning during compilation.
|
||||
// Use Geant4 G4UniformRand
|
||||
(*rndm) = randomGenerator->getRandom();
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4InclAblaCascadeInterface.cc,v 1.13 2009/12/04 13:16:57 kaitanie Exp $
|
||||
// $Id: G4InclAblaCascadeInterface.cc,v 1.20 2010/11/17 20:19:09 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -33,6 +33,7 @@
|
||||
//#define DEBUGINCL 1
|
||||
|
||||
#include "G4InclAblaCascadeInterface.hh"
|
||||
#include "G4FermiBreakUp.hh"
|
||||
#include "math.h"
|
||||
#include "G4GenericIon.hh"
|
||||
#include "CLHEP/Random/Random.h"
|
||||
@@ -45,10 +46,13 @@ G4InclAblaCascadeInterface::G4InclAblaCascadeInterface(const G4String& nam)
|
||||
hazard->ial = (*table_entry);
|
||||
|
||||
varntp = new G4VarNtp();
|
||||
calincl = new G4Calincl();
|
||||
calincl = 0;
|
||||
ws = new G4Ws();
|
||||
mat = new G4Mat();
|
||||
incl = new G4Incl(hazard, calincl, ws, mat, varntp);
|
||||
if(!getenv("G4INCLABLANOFERMIBREAKUP")) { // Use Fermi Break-up by default if it is NOT explicitly disabled
|
||||
incl->setUseFermiBreakUp(true);
|
||||
}
|
||||
|
||||
verboseLevel = 0;
|
||||
}
|
||||
@@ -57,7 +61,6 @@ G4InclAblaCascadeInterface::~G4InclAblaCascadeInterface()
|
||||
{
|
||||
delete hazard;
|
||||
delete varntp;
|
||||
delete calincl;
|
||||
delete ws;
|
||||
delete mat;
|
||||
delete incl;
|
||||
@@ -67,8 +70,7 @@ G4HadFinalState* G4InclAblaCascadeInterface::ApplyYourself(const G4HadProjectile
|
||||
{
|
||||
G4int maxTries = 200;
|
||||
|
||||
G4int particleI, n = 0;
|
||||
|
||||
G4int particleI;
|
||||
G4int bulletType = 0;
|
||||
|
||||
// Print diagnostic messages: 0 = silent, 1 and 2 = verbose
|
||||
@@ -85,20 +87,18 @@ G4HadFinalState* G4InclAblaCascadeInterface::ApplyYourself(const G4HadProjectile
|
||||
G4cout <<"G4InclAblaCascadeInterface: Now processing INCL4 event number:" << eventNumber << G4endl;
|
||||
}
|
||||
|
||||
// INCL4 needs the energy in units MeV
|
||||
G4double bulletE = aTrack.GetKineticEnergy() * MeV;
|
||||
|
||||
#ifdef DEBUGINCL
|
||||
G4cout <<"Bullet energy = " << bulletE / MeV << G4endl;
|
||||
#endif
|
||||
|
||||
G4double targetA = theNucleus.GetN();
|
||||
G4double targetZ = theNucleus.GetZ();
|
||||
|
||||
G4double eKin;
|
||||
G4double momx = 0.0, momy = 0.0, momz = 0.0;
|
||||
G4DynamicParticle *cascadeParticle = 0;
|
||||
G4ParticleDefinition *aParticleDefinition = 0;
|
||||
|
||||
G4FermiBreakUp *fermiBreakUp = new G4FermiBreakUp();
|
||||
G4FragmentVector *theFermiBreakupResult = 0;
|
||||
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
|
||||
|
||||
// INCL assumes the projectile particle is going in the direction of
|
||||
// the Z-axis. Here we construct proper rotation to convert the
|
||||
@@ -112,16 +112,11 @@ G4HadFinalState* G4InclAblaCascadeInterface::ApplyYourself(const G4HadProjectile
|
||||
|
||||
theResult.Clear(); // Make sure the output data structure is clean.
|
||||
|
||||
// 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};
|
||||
calincl = new G4InclInput(aTrack, theNucleus, false);
|
||||
incl->setInput(calincl);
|
||||
|
||||
// Coding particles for use with INCL4 and ABLA
|
||||
if (aTrack.GetDefinition() == G4Proton::Proton() ) bulletType = proton;
|
||||
if (aTrack.GetDefinition() == G4Neutron::Neutron() ) bulletType = neutron;
|
||||
if (aTrack.GetDefinition() == G4PionPlus::PionPlus() ) bulletType = pionPlus;
|
||||
if (aTrack.GetDefinition() == G4PionMinus::PionMinus() ) bulletType = pionMinus;
|
||||
if (aTrack.GetDefinition() == G4PionZero::PionZero() ) bulletType = pionZero;
|
||||
// G4InclInput::printProjectileTargetInfo(aTrack, theNucleus);
|
||||
// calincl->printInfo();
|
||||
|
||||
#ifdef DEBUGINCL
|
||||
G4int baryonBullet = 0, chargeBullet = 0;
|
||||
@@ -138,19 +133,8 @@ G4HadFinalState* G4InclAblaCascadeInterface::ApplyYourself(const G4HadProjectile
|
||||
G4cout <<"Energy in the beginning = " << labv.e() / MeV << G4endl;
|
||||
#endif
|
||||
|
||||
for(int i = 0; i < 15; i++) {
|
||||
calincl->f[i] = 0.0; // Initialize INCL input data
|
||||
}
|
||||
|
||||
// Check wheter the input is acceptable.
|
||||
if((bulletType != 0) && ((targetA != 1) && (targetZ != 1))) {
|
||||
calincl->f[0] = targetA; // Target mass number
|
||||
calincl->f[1] = targetZ; // Charge number
|
||||
calincl->f[6] = bulletType; // Type
|
||||
calincl->f[2] = bulletE; // Energy [MeV]
|
||||
calincl->f[5] = 1.0; // Time scaling
|
||||
calincl->f[4] = 45.0; // Nuclear potential
|
||||
|
||||
if((calincl->bulletType() != 0) && ((calincl->targetA() != 1) && (calincl->targetZ() != 1))) {
|
||||
ws->nosurf = -2; // Nucleus surface, -2 = Woods-Saxon
|
||||
ws->xfoisa = 8;
|
||||
ws->npaulstr = 0;
|
||||
@@ -159,8 +143,8 @@ G4HadFinalState* G4InclAblaCascadeInterface::ApplyYourself(const G4HadProjectile
|
||||
varntp->ntrack = 0;
|
||||
|
||||
mat->nbmat = 1;
|
||||
mat->amat[0] = int(calincl->f[0]);
|
||||
mat->zmat[0] = int(calincl->f[1]);
|
||||
mat->amat[0] = int(calincl->targetA());
|
||||
mat->zmat[0] = int(calincl->targetZ());
|
||||
|
||||
incl->initIncl(true);
|
||||
|
||||
@@ -169,7 +153,7 @@ G4HadFinalState* G4InclAblaCascadeInterface::ApplyYourself(const G4HadProjectile
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"G4InclAblaCascadeInterface: Try number = " << nTries << G4endl;
|
||||
}
|
||||
incl->processEventInclAbla(eventNumber);
|
||||
incl->processEventInclAbla(calincl, eventNumber);
|
||||
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"G4InclAblaCascadeInterface: number of tracks = " << varntp->ntrack <<G4endl;
|
||||
@@ -180,40 +164,20 @@ G4HadFinalState* G4InclAblaCascadeInterface::ApplyYourself(const G4HadProjectile
|
||||
/**
|
||||
* Diagnostic output
|
||||
*/
|
||||
G4cout <<"G4InclAblaCascadeInterface: Bullet type: " << bulletType << G4endl;
|
||||
G4cout <<"G4Incl4AblaCascadeInterface: Bullet energy: " << bulletE << " MeV" << G4endl;
|
||||
G4cout <<"G4InclAblaCascadeInterface: Bullet type: " << calincl->bulletType() << G4endl;
|
||||
G4cout <<"G4Incl4AblaCascadeInterface: Bullet energy: " << calincl->bulletE() << " MeV" << G4endl;
|
||||
|
||||
G4cout <<"G4InclAblaCascadeInterface: Target A: " << targetA << G4endl;
|
||||
G4cout <<"G4InclAblaCascadeInterface: Target Z: " << targetZ << G4endl;
|
||||
G4cout <<"G4InclAblaCascadeInterface: Target A: " << calincl->targetA() << G4endl;
|
||||
G4cout <<"G4InclAblaCascadeInterface: Target Z: " << calincl->targetZ() << G4endl;
|
||||
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"G4InclAblaCascadeInterface: Bullet type: " << bulletType << G4endl;
|
||||
diagdata <<"G4InclAblaCascadeInterface: Bullet energy: " << bulletE << " MeV" << G4endl;
|
||||
diagdata <<"G4InclAblaCascadeInterface: Bullet type: " << calincl->bulletType() << G4endl;
|
||||
diagdata <<"G4InclAblaCascadeInterface: Bullet energy: " << calincl->bulletE() << " MeV" << G4endl;
|
||||
|
||||
diagdata <<"G4InclAblaCascadeInterface: Target A: " << targetA << G4endl;
|
||||
diagdata <<"G4InclAblaCascadeInterface: Target Z: " << targetZ << G4endl;
|
||||
diagdata <<"G4InclAblaCascadeInterface: Target A: " << calincl->targetA() << G4endl;
|
||||
diagdata <<"G4InclAblaCascadeInterface: Target Z: " << calincl->targetZ() << G4endl;
|
||||
}
|
||||
|
||||
for(particleI = 0; particleI < varntp->ntrack; particleI++) {
|
||||
G4cout << n << " " << calincl->f[6] << " " << calincl->f[2] << " ";
|
||||
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;
|
||||
// For diagnostic output
|
||||
if(verboseLevel > 3) {
|
||||
diagdata << n << " " << calincl->f[6] << " " << calincl->f[2] << " ";
|
||||
diagdata << varntp->massini << " " << varntp->mzini << " ";
|
||||
diagdata << varntp->exini << " " << varntp->mulncasc << " " << varntp->mulnevap << " " << varntp->mulntot << " ";
|
||||
diagdata << varntp->bimpact << " " << varntp->jremn << " " << varntp->kfis << " " << varntp->estfis << " ";
|
||||
diagdata << varntp->izfis << " " << varntp->iafis << " " << varntp->ntrack << " ";
|
||||
diagdata << varntp->itypcasc[particleI] << " ";
|
||||
diagdata << varntp->avv[particleI] << " " << varntp->zvv[particleI] << " " << varntp->enerj[particleI] << " ";
|
||||
diagdata << varntp->plab[particleI] << " " << varntp->tetlab[particleI] << " " << varntp->philab[particleI] << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check whether a valid cascade was produced.
|
||||
@@ -226,19 +190,8 @@ G4HadFinalState* G4InclAblaCascadeInterface::ApplyYourself(const G4HadProjectile
|
||||
|
||||
theResult.SetStatusChange(stopAndKill);
|
||||
|
||||
if(bulletType == proton) {
|
||||
aParticleDefinition = G4Proton::ProtonDefinition();
|
||||
} else if(bulletType == neutron) {
|
||||
aParticleDefinition = G4Neutron::NeutronDefinition();
|
||||
} else if(bulletType == pionPlus) {
|
||||
aParticleDefinition = G4PionPlus::PionPlusDefinition();
|
||||
} else if(bulletType == pionZero) {
|
||||
aParticleDefinition = G4PionZero::PionZeroDefinition();
|
||||
} else if(bulletType == pionMinus) {
|
||||
aParticleDefinition = G4PionMinus::PionMinusDefinition();
|
||||
} else { // Projectile was not regognized
|
||||
aParticleDefinition = 0;
|
||||
}
|
||||
G4int bulletType = calincl->bulletType();
|
||||
aParticleDefinition = G4InclInput::getParticleDefinition(bulletType);
|
||||
|
||||
if(aParticleDefinition != 0) {
|
||||
cascadeParticle = new G4DynamicParticle();
|
||||
@@ -327,7 +280,6 @@ G4HadFinalState* G4InclAblaCascadeInterface::ApplyYourself(const G4HadProjectile
|
||||
|
||||
if((varntp->avv[particleI] > 1) && (varntp->zvv[particleI] >= 1)) { // Nucleus fragment
|
||||
G4ParticleDefinition * aIonDef = 0;
|
||||
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
|
||||
|
||||
G4int A = G4int(varntp->avv[particleI]);
|
||||
G4int Z = G4int(varntp->zvv[particleI]);
|
||||
@@ -405,6 +357,108 @@ G4HadFinalState* G4InclAblaCascadeInterface::ApplyYourself(const G4HadProjectile
|
||||
}
|
||||
}
|
||||
|
||||
// Finally do Fermi break-up if needed
|
||||
if(varntp->needsFermiBreakup) {
|
||||
// baryonNumberBalanceInINCL -= varntp->massini;
|
||||
// chargeNumberBalanceInINCL -= varntp->mzini;
|
||||
// Call Fermi Break-up
|
||||
G4double nuclearMass = G4NucleiProperties::GetNuclearMass(G4int(varntp->massini), G4int(varntp->mzini)) + varntp->exini * MeV;
|
||||
G4LorentzVector fragmentMomentum(varntp->pxrem * MeV, varntp->pyrem * MeV, varntp->pzrem * MeV,
|
||||
varntp->erecrem * MeV + nuclearMass);
|
||||
G4double momentumScaling = G4InclUtils::calculate4MomentumScaling(G4int(varntp->massini), G4int(varntp->mzini),
|
||||
varntp->exini,
|
||||
varntp->erecrem,
|
||||
varntp->pxrem,
|
||||
varntp->pyrem,
|
||||
varntp->pzrem);
|
||||
G4LorentzVector p4(momentumScaling * varntp->pxrem * MeV, momentumScaling * varntp->pyrem * MeV,
|
||||
momentumScaling * varntp->pzrem * MeV,
|
||||
varntp->erecrem + nuclearMass);
|
||||
|
||||
// For four-momentum, baryon number and charge conservation check:
|
||||
G4LorentzVector fourMomentumBalance = p4;
|
||||
G4int baryonNumberBalance = G4int(varntp->massini);
|
||||
G4int chargeBalance = G4int(varntp->mzini);
|
||||
|
||||
G4LorentzRotation toFragmentZ;
|
||||
toFragmentZ.rotateZ(-p4.theta());
|
||||
toFragmentZ.rotateY(-p4.phi());
|
||||
G4LorentzRotation toFragmentLab = toFragmentZ.inverse();
|
||||
// p4 *= toFragmentZ;
|
||||
|
||||
G4LorentzVector p4rest = p4;
|
||||
// p4rest.boost(-p4.boostVector());
|
||||
if(verboseLevel > 0) {
|
||||
G4cout <<"Cascade remnant nucleus:" << G4endl;
|
||||
G4cout <<"p4: " << G4endl;
|
||||
G4cout <<" px: " << p4.px() <<" py: " << p4.py() <<" pz: " << p4.pz() << G4endl;
|
||||
G4cout <<" E = " << p4.e() << G4endl;
|
||||
|
||||
G4cout <<"p4rest: " << G4endl;
|
||||
G4cout <<" px: " << p4rest.px() <<" py: " << p4rest.py() <<" pz: " << p4rest.pz() << G4endl;
|
||||
G4cout <<" E = " << p4rest.e() << G4endl;
|
||||
}
|
||||
|
||||
G4Fragment theCascadeRemnant(G4int(varntp->massini), G4int(varntp->mzini), p4rest);
|
||||
theFermiBreakupResult = fermiBreakUp->BreakItUp(theCascadeRemnant);
|
||||
if(theFermiBreakupResult != 0) {
|
||||
G4FragmentVector::iterator fragment;
|
||||
for(fragment = theFermiBreakupResult->begin(); fragment != theFermiBreakupResult->end(); fragment++) {
|
||||
G4ParticleDefinition *theFragmentDefinition = 0;
|
||||
if((*fragment)->GetA_asInt() == 1 && (*fragment)->GetZ_asInt() == 0) { // Neutron
|
||||
theFragmentDefinition = G4Neutron::NeutronDefinition();
|
||||
} else if ((*fragment)->GetA_asInt() == 1 && (*fragment)->GetZ_asInt() == 1) {
|
||||
theFragmentDefinition = G4Proton::ProtonDefinition();
|
||||
} else {
|
||||
theFragmentDefinition = theTableOfParticles->GetIon((*fragment)->GetZ_asInt(), (*fragment)->GetA_asInt(), (*fragment)->GetExcitationEnergy());
|
||||
}
|
||||
|
||||
if(theFragmentDefinition != 0) {
|
||||
G4DynamicParticle *theFragment = new G4DynamicParticle(theFragmentDefinition, (*fragment)->GetMomentum());
|
||||
G4LorentzVector labMomentum = theFragment->Get4Momentum();
|
||||
// labMomentum.boost(p4.boostVector());
|
||||
// labMomentum *= toFragmentLab;
|
||||
// labMomentum *= toLabFrame;
|
||||
theFragment->Set4Momentum(labMomentum);
|
||||
fourMomentumBalance -= theFragment->Get4Momentum();
|
||||
baryonNumberBalance -= theFragmentDefinition->GetAtomicMass();
|
||||
chargeBalance -= theFragmentDefinition->GetAtomicNumber();
|
||||
if(verboseLevel > 0) {
|
||||
G4cout <<"Resulting fragment: " << G4endl;
|
||||
G4cout <<" kinetic energy = " << theFragment->GetKineticEnergy() / MeV << " MeV" << G4endl;
|
||||
G4cout <<" momentum = " << theFragment->GetMomentum().mag() / MeV << " MeV" << G4endl;
|
||||
}
|
||||
theResult.AddSecondary(theFragment);
|
||||
} else {
|
||||
G4cout <<"G4InclAblaCascadeInterface: Error. Fragment produced by Fermi break-up does not exist." << G4endl;
|
||||
G4cout <<"Resulting fragment: " << G4endl;
|
||||
G4cout <<" Z = " << (*fragment)->GetZ_asInt() << G4endl;
|
||||
G4cout <<" A = " << (*fragment)->GetA_asInt() << G4endl;
|
||||
G4cout <<" Excitation : " << (*fragment)->GetExcitationEnergy() / MeV << " MeV" << G4endl;
|
||||
G4cout <<" momentum = " << (*fragment)->GetMomentum().mag() / MeV << " MeV" << G4endl;
|
||||
}
|
||||
}
|
||||
delete theFermiBreakupResult;
|
||||
theFermiBreakupResult = 0;
|
||||
|
||||
if(std::abs(fourMomentumBalance.mag() / MeV) > 0.1 * MeV) {
|
||||
G4cout <<"Four-momentum balance after remnant nucleus Fermi break-up:" << G4endl;
|
||||
G4cout <<"Magnitude: " << fourMomentumBalance.mag() / MeV << " MeV" << G4endl;
|
||||
G4cout <<"Vector components (px, py, pz, E) = ("
|
||||
<< fourMomentumBalance.px() << ", "
|
||||
<< fourMomentumBalance.py() << ", "
|
||||
<< fourMomentumBalance.pz() << ", "
|
||||
<< fourMomentumBalance.e() << ")" << G4endl;
|
||||
}
|
||||
if(baryonNumberBalance != 0) {
|
||||
G4cout <<"Baryon number balance after remnant nucleus Fermi break-up: " << baryonNumberBalance << G4endl;
|
||||
}
|
||||
if(chargeBalance != 0) {
|
||||
G4cout <<"Charge balance after remnant nucleus Fermi break-up: " << chargeBalance << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUGINCL
|
||||
G4cout <<"--------------------------------------------------------------------------------" << G4endl;
|
||||
G4double pt = std::sqrt(std::pow(labv.x(), 2) + std::pow(labv.y(), 2));
|
||||
@@ -448,7 +502,6 @@ G4HadFinalState* G4InclAblaCascadeInterface::ApplyYourself(const G4HadProjectile
|
||||
else { // If the bullet type was not recognized by the interface, it will be returned back without any interaction.
|
||||
theResult.SetStatusChange(stopAndKill);
|
||||
|
||||
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
|
||||
cascadeParticle = new G4DynamicParticle(theTableOfParticles->FindParticle(aTrack.GetDefinition()), aTrack.Get4Momentum());
|
||||
|
||||
theResult.AddSecondary(cascadeParticle);
|
||||
@@ -471,26 +524,26 @@ G4HadFinalState* G4InclAblaCascadeInterface::ApplyYourself(const G4HadProjectile
|
||||
}
|
||||
}
|
||||
|
||||
if((targetA == 1) && (targetZ == 1)) { // Unsupported target
|
||||
if((calincl->targetA() == 1) && (calincl->targetZ() == 1)) { // Unsupported target
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"Unsupported target: " << G4endl;
|
||||
G4cout <<"Target A: " << targetA << G4endl;
|
||||
G4cout <<"TargetZ: " << targetZ << G4endl;
|
||||
G4cout <<"Target A: " << calincl->targetA() << G4endl;
|
||||
G4cout <<"TargetZ: " << calincl->targetZ() << G4endl;
|
||||
}
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"Unsupported target: " << G4endl;
|
||||
diagdata <<"Target A: " << targetA << G4endl;
|
||||
diagdata <<"TargetZ: " << targetZ << G4endl;
|
||||
diagdata <<"Target A: " << calincl->targetA() << G4endl;
|
||||
diagdata <<"TargetZ: " << calincl->targetZ() << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
if(bulletE < 100) { // INCL does not support E < 100 MeV.
|
||||
if(calincl->bulletE() < 100) { // INCL does not support E < 100 MeV.
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"Unsupported bullet energy: " << bulletE << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
G4cout <<"Unsupported bullet energy: " << calincl->bulletE() << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
G4cout <<"WARNING: Returning the original bullet with original energy back to Geant4." << G4endl;
|
||||
}
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"Unsupported bullet energy: " << bulletE << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
diagdata <<"Unsupported bullet energy: " << calincl->bulletE() << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -499,6 +552,9 @@ G4HadFinalState* G4InclAblaCascadeInterface::ApplyYourself(const G4HadProjectile
|
||||
}
|
||||
}
|
||||
|
||||
delete fermiBreakUp;
|
||||
delete calincl;
|
||||
calincl = 0;
|
||||
return &theResult;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4InclAblaDataFile.cc,v 1.7 2008/06/25 17:20:04 kaitanie Exp $
|
||||
// $Id: G4InclAblaDataFile.cc,v 1.10 2010/11/17 20:19:09 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -35,11 +35,15 @@
|
||||
#include "globals.hh" // Needed for G4Exception.
|
||||
#include <fstream>
|
||||
|
||||
G4InclAblaDataFile::G4InclAblaDataFile()
|
||||
G4InclAblaDataFile::G4InclAblaDataFile() : G4InclAblaVirtualData()
|
||||
{
|
||||
verboseLevel = 0;
|
||||
}
|
||||
|
||||
G4InclAblaDataFile::~G4InclAblaDataFile()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Read all data from files.
|
||||
*/
|
||||
@@ -89,29 +93,28 @@ bool G4InclAblaDataFile::readData()
|
||||
const G4int rows = 99;
|
||||
const G4int cols = 154;
|
||||
const G4int massnumbers = 263;
|
||||
for(int i = 0; i < cols; i++) {
|
||||
for(int j = 0; j < rows; j++) {
|
||||
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 < cols; i++) {
|
||||
for(int j = 0; j < rows; j++) {
|
||||
for(int i = 0; i < rows; i++) {
|
||||
for(int j = 0; j < cols; j++) {
|
||||
flalphain >> flalpha;
|
||||
frldmin >> frldm;
|
||||
vgsldin >> vgsld;
|
||||
setAlpha(i, j, flalpha);
|
||||
setEcnz( i, j, frldm);
|
||||
setVgsld(i, j, vgsld);
|
||||
setAlpha(j, i, flalpha);
|
||||
setEcnz( j, i, frldm);
|
||||
setVgsld(j, i, vgsld);
|
||||
}
|
||||
}
|
||||
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,11 +122,15 @@ bool G4InclAblaDataFile::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 >> pace2;
|
||||
setPace2(A, j, pace2);
|
||||
}
|
||||
}
|
||||
}
|
||||
pace2in.close();
|
||||
|
||||
@@ -23,14 +23,17 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4InclAblaLightIonInterface.cc,v 1.11 2009/12/04 13:16:57 kaitanie Exp $
|
||||
// $Id: G4InclAblaLightIonInterface.cc,v 1.16 2010/11/17 20:19:09 kaitanie 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 <vector>
|
||||
|
||||
#include "G4InclAblaLightIonInterface.hh"
|
||||
#include "G4FermiBreakUp.hh"
|
||||
#include "math.h"
|
||||
#include "G4GenericIon.hh"
|
||||
#include "CLHEP/Random/Random.h"
|
||||
@@ -43,12 +46,21 @@ G4InclAblaLightIonInterface::G4InclAblaLightIonInterface()
|
||||
hazard->ial = (*table_entry);
|
||||
|
||||
varntp = new G4VarNtp();
|
||||
calincl = new G4Calincl();
|
||||
calincl = 0;
|
||||
ws = new G4Ws();
|
||||
mat = new G4Mat();
|
||||
incl = new G4Incl(hazard, calincl, ws, mat, varntp);
|
||||
|
||||
useProjectileSpectator = true;
|
||||
useFermiBreakup = true;
|
||||
incl->setUseProjectileSpectators(useProjectileSpectator);
|
||||
if(!getenv("G4INCLABLANOFERMIBREAKUP")) { // Use Fermi Break-up by default if it is NOT explicitly disabled
|
||||
incl->setUseFermiBreakUp(true);
|
||||
useFermiBreakup = true;
|
||||
}
|
||||
verboseLevel = 0;
|
||||
if(getenv("G4INCLVERBOSE")) {
|
||||
verboseLevel = 1;
|
||||
}
|
||||
}
|
||||
|
||||
G4InclAblaLightIonInterface::~G4InclAblaLightIonInterface()
|
||||
@@ -63,18 +75,25 @@ G4InclAblaLightIonInterface::~G4InclAblaLightIonInterface()
|
||||
|
||||
G4HadFinalState* G4InclAblaLightIonInterface::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& theNucleus)
|
||||
{
|
||||
// const G4bool useFermiBreakup = false;
|
||||
G4int maxTries = 200;
|
||||
|
||||
G4int particleI, n = 0;
|
||||
G4int particleI;
|
||||
|
||||
G4int bulletType = 0;
|
||||
G4int baryonNumberBalanceInINCL = 0;
|
||||
G4int chargeNumberBalanceInINCL = 0;
|
||||
|
||||
// Print diagnostic messages: 0 = silent, 1 and 2 = verbose
|
||||
verboseLevel = 0;
|
||||
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
|
||||
|
||||
// Increase the event number:
|
||||
eventNumber++;
|
||||
|
||||
// Clean up the INCL input
|
||||
if(calincl != 0) {
|
||||
delete calincl;
|
||||
calincl = 0;
|
||||
}
|
||||
|
||||
if (verboseLevel > 1) {
|
||||
G4cout << " >>> G4InclAblaLightIonInterface::ApplyYourself called" << G4endl;
|
||||
}
|
||||
@@ -83,11 +102,42 @@ G4HadFinalState* G4InclAblaLightIonInterface::ApplyYourself(const G4HadProjectil
|
||||
G4cout <<"G4InclAblaLightIonInterface: Now processing INCL4 event number:" << eventNumber << G4endl;
|
||||
}
|
||||
|
||||
// INCL4 needs the energy in units MeV
|
||||
G4double bulletE = aTrack.GetKineticEnergy() / MeV;
|
||||
// Inverse kinematics for targets with Z = 1 and A = 1
|
||||
// if(false) {
|
||||
G4LorentzRotation toBreit = aTrack.Get4Momentum().boostVector();
|
||||
|
||||
G4double targetA = theNucleus.GetN();
|
||||
G4double targetZ = theNucleus.GetZ();
|
||||
if(theNucleus.GetZ_asInt() == 1 && theNucleus.GetA_asInt() == 1 && G4InclInput::canUseInverseKinematics(aTrack, theNucleus)) {
|
||||
G4ParticleDefinition *oldTargetDef = theTableOfParticles->GetIon(theNucleus.GetA_asInt(), theNucleus.GetZ_asInt(), 0.0);
|
||||
const G4ParticleDefinition *oldProjectileDef = aTrack.GetDefinition();
|
||||
|
||||
if(oldProjectileDef != 0 && oldTargetDef != 0) {
|
||||
G4int oldTargetA = oldTargetDef->GetAtomicMass();
|
||||
G4int newTargetA = oldProjectileDef->GetAtomicMass();
|
||||
G4int newTargetZ = oldProjectileDef->GetAtomicNumber();
|
||||
|
||||
if(newTargetA > 0 && newTargetZ > 0) {
|
||||
G4Nucleus swappedTarget(oldProjectileDef->GetAtomicMass(), oldProjectileDef->GetAtomicNumber());
|
||||
|
||||
// G4cout <<"Original projectile kinE = " << aTrack.GetKineticEnergy() / MeV << G4endl;
|
||||
|
||||
// We need the same energy/nucleon.
|
||||
G4double projectileE = ((aTrack.GetKineticEnergy() / MeV) / newTargetA) * oldTargetA * MeV;
|
||||
|
||||
// G4cout <<"projectileE = " << projectileE << G4endl;
|
||||
G4DynamicParticle swappedProjectileParticle(oldTargetDef, G4ThreeVector(0.0, 0.0, 1.0), projectileE);
|
||||
const G4LorentzVector swapped4Momentum = (swappedProjectileParticle.Get4Momentum()*=toBreit);
|
||||
swappedProjectileParticle.Set4Momentum(swapped4Momentum);
|
||||
const G4HadProjectile swappedProjectile(swappedProjectileParticle);
|
||||
// G4cout <<"New projectile kinE = " << swappedProjectile.GetKineticEnergy() / MeV << G4endl;
|
||||
calincl = new G4InclInput(swappedProjectile, swappedTarget, true);
|
||||
} else {
|
||||
G4cout <<"Badly defined target after swapping. Falling back to normal (non-swapped) mode." << G4endl;
|
||||
calincl = new G4InclInput(aTrack, theNucleus, false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
calincl = new G4InclInput(aTrack, theNucleus, false);
|
||||
}
|
||||
|
||||
G4double eKin;
|
||||
G4double momx = 0.0, momy = 0.0, momz = 0.0;
|
||||
@@ -104,31 +154,65 @@ G4HadFinalState* G4InclAblaLightIonInterface::ApplyYourself(const G4HadProjectil
|
||||
toZ.rotateY(-projectileMomentum.theta());
|
||||
G4LorentzRotation toLabFrame = toZ.inverse();
|
||||
|
||||
/*
|
||||
G4cout <<"Projectile theta = " << projectileMomentum.theta() << " phi = " << projectileMomentum.phi() << G4endl;
|
||||
G4cout <<"Projectile momentum "
|
||||
<< "(px = " << projectileMomentum.px()
|
||||
<< ", py = " << projectileMomentum.py()
|
||||
<< ", pz = " << projectileMomentum.pz() << ")" << G4endl;
|
||||
G4cout << "Projectile energy = " << bulletE << " MeV" << G4endl;
|
||||
*/
|
||||
|
||||
G4FermiBreakUp *fermiBreakUp = new G4FermiBreakUp();
|
||||
G4FragmentVector *theSpectatorFermiBreakupResult = 0;
|
||||
G4FragmentVector *theFermiBreakupResult = 0;
|
||||
|
||||
theResult.Clear(); // Make sure the output data structure is clean.
|
||||
|
||||
std::vector<G4DynamicParticle*> result; // Temporary list for the results
|
||||
|
||||
// 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};
|
||||
pionMinus = 5, deuteron = 6, triton = 7, he3 = 8, he4 = 9,
|
||||
c12 = -12}; // Carbon beam support.
|
||||
|
||||
// Coding particles for use with INCL4 and ABLA
|
||||
if (aTrack.GetDefinition() == G4Deuteron::Deuteron() ) bulletType = deuteron;
|
||||
if (aTrack.GetDefinition() == G4Triton::Triton() ) bulletType = triton;
|
||||
if (aTrack.GetDefinition() == G4He3::He3() ) bulletType = he3;
|
||||
if (aTrack.GetDefinition() == G4Alpha::Alpha() ) bulletType = he4;
|
||||
G4int bulletType = calincl->bulletType();
|
||||
chargeNumberBalanceInINCL = calincl->targetZ();
|
||||
baryonNumberBalanceInINCL = calincl->targetA();
|
||||
|
||||
for(int i = 0; i < 15; i++) {
|
||||
calincl->f[i] = 0.0; // Initialize INCL input data
|
||||
// G4cout <<"Type of the projectile (INCL projectile code): " << bulletType << G4endl;
|
||||
|
||||
if(bulletType == proton) {
|
||||
chargeNumberBalanceInINCL += 1;
|
||||
baryonNumberBalanceInINCL += 1;
|
||||
} else if(bulletType == neutron) {
|
||||
baryonNumberBalanceInINCL += 1;
|
||||
} else if(bulletType == pionPlus) { //Note: positive pion doesn't contribute to the baryon and charge number counters
|
||||
chargeNumberBalanceInINCL += 1;
|
||||
} else if(bulletType == pionMinus) {
|
||||
chargeNumberBalanceInINCL -= 1;
|
||||
} else if(bulletType == deuteron) {
|
||||
chargeNumberBalanceInINCL += 1;
|
||||
baryonNumberBalanceInINCL += 2;
|
||||
} else if(bulletType == triton) {
|
||||
chargeNumberBalanceInINCL += 1;
|
||||
baryonNumberBalanceInINCL += 3;
|
||||
} else if(bulletType == he3) {
|
||||
chargeNumberBalanceInINCL += 2;
|
||||
baryonNumberBalanceInINCL += 3;
|
||||
} else if(bulletType == he4) {
|
||||
chargeNumberBalanceInINCL += 2;
|
||||
baryonNumberBalanceInINCL += 4;
|
||||
} if(bulletType == c12) {
|
||||
chargeNumberBalanceInINCL += 6;
|
||||
baryonNumberBalanceInINCL += 12;
|
||||
} if(bulletType == -666) {
|
||||
chargeNumberBalanceInINCL += calincl->extendedProjectileZ();
|
||||
baryonNumberBalanceInINCL += calincl->extendedProjectileA();
|
||||
}
|
||||
|
||||
// Check wheter the input is acceptable.
|
||||
if((bulletType != 0) && ((targetA != 1) && (targetZ != 1))) {
|
||||
calincl->f[0] = targetA; // Target mass number
|
||||
calincl->f[1] = targetZ; // Charge number
|
||||
calincl->f[6] = bulletType; // Type
|
||||
calincl->f[2] = bulletE; // Energy [MeV]
|
||||
calincl->f[5] = 1.0; // Time scaling
|
||||
calincl->f[4] = 45.0; // Nuclear potential
|
||||
|
||||
if((bulletType != 0) && ((calincl->targetA() != 1) && (calincl->targetZ() != 1))) {
|
||||
ws->nosurf = -2; // Nucleus surface, -2 = Woods-Saxon
|
||||
ws->xfoisa = 8;
|
||||
ws->npaulstr = 0;
|
||||
@@ -137,9 +221,10 @@ G4HadFinalState* G4InclAblaLightIonInterface::ApplyYourself(const G4HadProjectil
|
||||
varntp->ntrack = 0;
|
||||
|
||||
mat->nbmat = 1;
|
||||
mat->amat[0] = int(calincl->f[0]);
|
||||
mat->zmat[0] = int(calincl->f[1]);
|
||||
mat->amat[0] = int(calincl->targetA());
|
||||
mat->zmat[0] = int(calincl->targetA());
|
||||
|
||||
incl->setInput(calincl);
|
||||
incl->initIncl(true);
|
||||
|
||||
while((varntp->ntrack <= 0) && (nTries < maxTries)) { // Loop until we produce real cascade
|
||||
@@ -147,7 +232,7 @@ G4HadFinalState* G4InclAblaLightIonInterface::ApplyYourself(const G4HadProjectil
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"G4InclAblaLightIonInterface: Try number = " << nTries << G4endl;
|
||||
}
|
||||
incl->processEventInclAbla(eventNumber);
|
||||
incl->processEventInclAbla(calincl, eventNumber);
|
||||
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"G4InclAblaLightIonInterface: number of tracks = " << varntp->ntrack <<G4endl;
|
||||
@@ -158,39 +243,22 @@ G4HadFinalState* G4InclAblaLightIonInterface::ApplyYourself(const G4HadProjectil
|
||||
/**
|
||||
* Diagnostic output
|
||||
*/
|
||||
G4cout <<"G4InclAblaLightIonInterface: Bullet type: " << bulletType << G4endl;
|
||||
G4cout <<"G4Incl4AblaCascadeInterface: Bullet energy: " << bulletE << " MeV" << G4endl;
|
||||
|
||||
G4cout <<"G4InclAblaLightIonInterface: Target A: " << targetA << G4endl;
|
||||
G4cout <<"G4InclAblaLightIonInterface: Target Z: " << targetZ << G4endl;
|
||||
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"G4InclAblaLightIonInterface: Bullet type: " << bulletType << G4endl;
|
||||
diagdata <<"G4InclAblaLightIonInterface: Bullet energy: " << bulletE << " MeV" << G4endl;
|
||||
|
||||
diagdata <<"G4InclAblaLightIonInterface: Target A: " << targetA << G4endl;
|
||||
diagdata <<"G4InclAblaLightIonInterface: Target Z: " << targetZ << G4endl;
|
||||
G4cout <<"G4InclAblaLightIonInterface: Bullet type: " << calincl->bulletType() << G4endl;
|
||||
G4cout <<"G4Incl4AblaCascadeInterface: Bullet energy: " << calincl->bulletE() << " MeV" << G4endl;
|
||||
if(bulletType == -666) {
|
||||
G4cout <<" Extended projectile: A = " << calincl->extendedProjectileA()
|
||||
<<" Z = " << calincl->extendedProjectileZ() << G4endl;
|
||||
}
|
||||
|
||||
for(particleI = 0; particleI < varntp->ntrack; particleI++) {
|
||||
G4cout << n << " " << calincl->f[6] << " " << calincl->f[2] << " ";
|
||||
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;
|
||||
// For diagnostic output
|
||||
if(verboseLevel > 3) {
|
||||
diagdata << n << " " << calincl->f[6] << " " << calincl->f[2] << " ";
|
||||
diagdata << varntp->massini << " " << varntp->mzini << " ";
|
||||
diagdata << varntp->exini << " " << varntp->mulncasc << " " << varntp->mulnevap << " " << varntp->mulntot << " ";
|
||||
diagdata << varntp->bimpact << " " << varntp->jremn << " " << varntp->kfis << " " << varntp->estfis << " ";
|
||||
diagdata << varntp->izfis << " " << varntp->iafis << " " << varntp->ntrack << " ";
|
||||
diagdata << varntp->itypcasc[particleI] << " ";
|
||||
diagdata << varntp->avv[particleI] << " " << varntp->zvv[particleI] << " " << varntp->enerj[particleI] << " ";
|
||||
diagdata << varntp->plab[particleI] << " " << varntp->tetlab[particleI] << " " << varntp->philab[particleI] << G4endl;
|
||||
}
|
||||
G4cout <<"G4InclAblaLightIonInterface: Target A: " << calincl->targetA() << G4endl;
|
||||
G4cout <<"G4InclAblaLightIonInterface: Target Z: " << calincl->targetZ() << G4endl;
|
||||
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"G4InclAblaLightIonInterface: Bullet type: " << calincl->bulletType() << G4endl;
|
||||
diagdata <<"G4InclAblaLightIonInterface: Bullet energy: " << calincl->bulletE() << " MeV" << G4endl;
|
||||
|
||||
diagdata <<"G4InclAblaLightIonInterface: Target A: " << calincl->targetA() << G4endl;
|
||||
diagdata <<"G4InclAblaLightIonInterface: Target Z: " << calincl->targetZ() << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,7 +298,7 @@ G4HadFinalState* G4InclAblaLightIonInterface::ApplyYourself(const G4HadProjectil
|
||||
cascadeParticle = new G4DynamicParticle();
|
||||
cascadeParticle->SetDefinition(aParticleDefinition);
|
||||
cascadeParticle->Set4Momentum(aTrack.Get4Momentum());
|
||||
theResult.AddSecondary(cascadeParticle);
|
||||
result.push_back(cascadeParticle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,8 +306,10 @@ G4HadFinalState* G4InclAblaLightIonInterface::ApplyYourself(const G4HadProjectil
|
||||
// Elementary particles are converted to G4DynamicParticle.
|
||||
theResult.SetStatusChange(stopAndKill);
|
||||
|
||||
for(particleI = 0; particleI < varntp->ntrack; particleI++) { // Loop through the INCL4+ABLA output.
|
||||
for(particleI = 0; particleI <= varntp->ntrack; particleI++) { // Loop through the INCL4+ABLA output.
|
||||
// Get energy/momentum and construct momentum vector in INCL4 coordinates.
|
||||
// if(varntp->itypcasc[particleI] == -1) continue; // Avoid nucleons that are part of the spectator
|
||||
if(varntp->avv[particleI] == 0 && varntp->zvv[particleI] == 0) continue;
|
||||
momx = varntp->plab[particleI]*std::sin(varntp->tetlab[particleI]*CLHEP::pi/180.0)*std::cos(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;
|
||||
@@ -261,35 +331,40 @@ G4HadFinalState* G4InclAblaLightIonInterface::ApplyYourself(const G4HadProjectil
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4Proton::ProtonDefinition(), momDirection, eKin);
|
||||
particleIdentified++;
|
||||
baryonNumberBalanceInINCL -= 1;
|
||||
chargeNumberBalanceInINCL -= 1;
|
||||
}
|
||||
|
||||
if((varntp->avv[particleI] == 1) && (varntp->zvv[particleI] == 0)) { // Neutron
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4Neutron::NeutronDefinition(), momDirection, eKin);
|
||||
particleIdentified++;
|
||||
baryonNumberBalanceInINCL -= 1;
|
||||
}
|
||||
|
||||
if((varntp->avv[particleI] == -1) && (varntp->zvv[particleI] == 1)) { // PionPlus
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4PionPlus::PionPlusDefinition(), momDirection, eKin);
|
||||
particleIdentified++;
|
||||
chargeNumberBalanceInINCL -= 1;
|
||||
}
|
||||
|
||||
if((varntp->avv[particleI] == -1) && (varntp->zvv[particleI] == 0)) { // PionZero
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4PionZero::PionZeroDefinition(), momDirection, eKin);
|
||||
particleIdentified++;
|
||||
chargeNumberBalanceInINCL -= 0;
|
||||
}
|
||||
|
||||
if((varntp->avv[particleI] == -1) && (varntp->zvv[particleI] == -1)) { // PionMinus
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4PionMinus::PionMinusDefinition(), momDirection, eKin);
|
||||
particleIdentified++;
|
||||
chargeNumberBalanceInINCL -= -1;
|
||||
}
|
||||
|
||||
if((varntp->avv[particleI] > 1) && (varntp->zvv[particleI] >= 1)) { // Nucleus fragment
|
||||
G4ParticleDefinition * aIonDef = 0;
|
||||
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
|
||||
G4ParticleDefinition * aIonDef = 0;
|
||||
|
||||
G4int A = G4int(varntp->avv[particleI]);
|
||||
G4int Z = G4int(varntp->zvv[particleI]);
|
||||
@@ -312,12 +387,14 @@ G4HadFinalState* G4InclAblaLightIonInterface::ApplyYourself(const G4HadProjectil
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(aIonDef, momDirection, eKin);
|
||||
particleIdentified++;
|
||||
baryonNumberBalanceInINCL -= A;
|
||||
chargeNumberBalanceInINCL -= Z;
|
||||
}
|
||||
}
|
||||
|
||||
if(particleIdentified == 1) { // Particle identified properly.
|
||||
cascadeParticle->Set4Momentum(cascadeParticle->Get4Momentum()*=toLabFrame);
|
||||
theResult.AddSecondary(cascadeParticle); // Put data into G4HadFinalState.
|
||||
cascadeParticle->Set4Momentum(cascadeParticle->Get4Momentum()*=toLabFrame);
|
||||
result.push_back(cascadeParticle);
|
||||
}
|
||||
else { // Particle identification failed.
|
||||
if(particleIdentified > 1) { // Particle was identified as more than one particle type.
|
||||
@@ -331,7 +408,223 @@ G4HadFinalState* G4InclAblaLightIonInterface::ApplyYourself(const G4HadProjectil
|
||||
}
|
||||
}
|
||||
|
||||
// Spectator nucleus Fermi break-up
|
||||
if(useFermiBreakup && useProjectileSpectator && varntp->masp > 1) {
|
||||
baryonNumberBalanceInINCL -= G4int(varntp->masp);
|
||||
G4double nuclearMass = G4NucleiProperties::GetNuclearMass(G4int(varntp->masp), G4int(varntp->mzsp)) + varntp->exsp * MeV;
|
||||
// Use momentum scaling to compensate for different masses in G4 and INCL:
|
||||
G4double momentumScaling = G4InclUtils::calculate4MomentumScaling(G4int(varntp->masp),
|
||||
G4int(varntp->mzsp),
|
||||
varntp->exsp,
|
||||
varntp->spectatorT,
|
||||
varntp->spectatorP1,
|
||||
varntp->spectatorP2,
|
||||
varntp->spectatorP3);
|
||||
G4LorentzVector p4(momentumScaling * varntp->spectatorP1 * MeV, momentumScaling * varntp->spectatorP2 * MeV,
|
||||
momentumScaling * varntp->spectatorP3 * MeV,
|
||||
varntp->spectatorT * MeV + nuclearMass);
|
||||
// Four-momentum, baryon number and charge balance:
|
||||
G4LorentzVector fourMomentumBalance = p4;
|
||||
G4int baryonNumberBalance = G4int(varntp->masp);
|
||||
chargeNumberBalanceInINCL -= G4int(varntp->mzsp);
|
||||
G4int chargeBalance = G4int(varntp->mzsp);
|
||||
|
||||
G4LorentzRotation toFragmentZ;
|
||||
// Assume that Fermi breakup uses Z as the direction of the projectile
|
||||
toFragmentZ.rotateZ(-p4.theta());
|
||||
toFragmentZ.rotateY(-p4.phi());
|
||||
G4LorentzRotation toFragmentLab = toFragmentZ.inverse();
|
||||
// p4 *= toFragmentZ;
|
||||
|
||||
G4LorentzVector p4rest = p4;
|
||||
// p4rest.boost(-p4.boostVector());
|
||||
if(verboseLevel > 0) {
|
||||
G4cout <<"Spectator nucleus:" << G4endl;
|
||||
G4cout <<"p4: " << G4endl;
|
||||
G4cout <<" px: " << p4.px() <<" py: " << p4.py() <<" pz: " << p4.pz() << G4endl;
|
||||
G4cout <<" E = " << p4.e() << G4endl;
|
||||
G4cout <<"p4rest: " << G4endl;
|
||||
G4cout <<" px: " << p4rest.px() <<" py: " << p4rest.py() <<" pz: " << p4rest.pz() << G4endl;
|
||||
G4cout <<" E = " << p4rest.e() << G4endl;
|
||||
}
|
||||
G4Fragment theSpectatorNucleus(G4int(varntp->masp), G4int(varntp->mzsp), p4rest);
|
||||
theSpectatorFermiBreakupResult = fermiBreakUp->BreakItUp(theSpectatorNucleus);
|
||||
if(theSpectatorFermiBreakupResult != 0) {
|
||||
G4FragmentVector::iterator fragment;
|
||||
for(fragment = theSpectatorFermiBreakupResult->begin(); fragment != theSpectatorFermiBreakupResult->end(); fragment++) {
|
||||
G4ParticleDefinition *theFragmentDefinition = 0;
|
||||
if((*fragment)->GetA_asInt() == 1 && (*fragment)->GetZ_asInt() == 0) { // Neutron
|
||||
theFragmentDefinition = G4Neutron::NeutronDefinition();
|
||||
} else if ((*fragment)->GetA_asInt() == 1 && (*fragment)->GetZ_asInt() == 1) {
|
||||
theFragmentDefinition = G4Proton::ProtonDefinition();
|
||||
} else {
|
||||
theFragmentDefinition = theTableOfParticles->GetIon((*fragment)->GetZ_asInt(), (*fragment)->GetA_asInt(), (*fragment)->GetExcitationEnergy());
|
||||
}
|
||||
if(theFragmentDefinition != 0) {
|
||||
G4DynamicParticle *theFragment = new G4DynamicParticle(theFragmentDefinition, (*fragment)->GetMomentum());
|
||||
G4LorentzVector labMomentum = theFragment->Get4Momentum();
|
||||
// labMomentum.boost(p4.boostVector());
|
||||
// labMomentum *= toFragmentLab;
|
||||
// labMomentum *= toLabFrame;
|
||||
theFragment->Set4Momentum(labMomentum);
|
||||
fourMomentumBalance -= theFragment->Get4Momentum();
|
||||
baryonNumberBalance -= theFragmentDefinition->GetAtomicMass();
|
||||
chargeBalance -= theFragmentDefinition->GetAtomicNumber();
|
||||
if(verboseLevel > 0) {
|
||||
G4cout <<"Resulting fragment: " << G4endl;
|
||||
G4cout <<" kinetic energy = " << theFragment->GetKineticEnergy() / MeV << " MeV" << G4endl;
|
||||
G4cout <<" momentum = " << theFragment->GetMomentum().mag() / MeV << " MeV" << G4endl;
|
||||
}
|
||||
result.push_back(theFragment);
|
||||
} else {
|
||||
G4cout <<"G4InclAblaCascadeInterface: Error. Fragment produced by Fermi break-up does not exist."
|
||||
<< G4endl;
|
||||
G4cout <<"Resulting fragment: " << G4endl;
|
||||
G4cout <<" Z = " << (*fragment)->GetZ_asInt() << G4endl;
|
||||
G4cout <<" A = " << (*fragment)->GetA_asInt() << G4endl;
|
||||
G4cout <<" Excitation : " << (*fragment)->GetExcitationEnergy() / MeV << " MeV" << G4endl;
|
||||
G4cout <<" momentum = " << (*fragment)->GetMomentum().mag() / MeV << " MeV" << G4endl;
|
||||
}
|
||||
}
|
||||
delete theSpectatorFermiBreakupResult;
|
||||
theSpectatorFermiBreakupResult = 0;
|
||||
|
||||
if(std::abs(fourMomentumBalance.mag() / MeV) > 0.1 * MeV) {
|
||||
G4cout <<"Four-momentum balance after spectator nucleus Fermi break-up:" << G4endl;
|
||||
G4cout <<"Magnitude: " << fourMomentumBalance.mag() / MeV << " MeV" << G4endl;
|
||||
G4cout <<"Vector components (px, py, pz, E) = ("
|
||||
<< fourMomentumBalance.px() << ", "
|
||||
<< fourMomentumBalance.py() << ", "
|
||||
<< fourMomentumBalance.pz() << ", "
|
||||
<< fourMomentumBalance.e() << ")" << G4endl;
|
||||
}
|
||||
if(baryonNumberBalance != 0) {
|
||||
G4cout <<"Event " << eventNumber << ": Baryon number balance after spectator nucleus Fermi break-up: " << baryonNumberBalance << G4endl;
|
||||
}
|
||||
if(chargeBalance != 0) {
|
||||
G4cout <<"Event " << eventNumber <<": Charge balance after spectator nucleus Fermi break-up: " << chargeBalance << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Finally do Fermi break-up if needed
|
||||
if(varntp->needsFermiBreakup && varntp->massini > 0) {
|
||||
baryonNumberBalanceInINCL -= G4int(varntp->massini);
|
||||
chargeNumberBalanceInINCL -= G4int(varntp->mzini);
|
||||
// Call Fermi Break-up
|
||||
G4double nuclearMass = G4NucleiProperties::GetNuclearMass(G4int(varntp->massini), G4int(varntp->mzini)) + varntp->exini * MeV;
|
||||
G4LorentzVector fragmentMomentum(varntp->pxrem * MeV, varntp->pyrem * MeV, varntp->pzrem * MeV,
|
||||
varntp->erecrem * MeV + nuclearMass);
|
||||
G4double momentumScaling = G4InclUtils::calculate4MomentumScaling(G4int(varntp->massini), G4int(varntp->mzini),
|
||||
varntp->exini,
|
||||
varntp->erecrem,
|
||||
varntp->pxrem,
|
||||
varntp->pyrem,
|
||||
varntp->pzrem);
|
||||
G4LorentzVector p4(momentumScaling * varntp->pxrem * MeV, momentumScaling * varntp->pyrem * MeV,
|
||||
momentumScaling * varntp->pzrem * MeV,
|
||||
varntp->erecrem + nuclearMass);
|
||||
|
||||
// For four-momentum, baryon number and charge conservation check:
|
||||
G4LorentzVector fourMomentumBalance = p4;
|
||||
G4int baryonNumberBalance = G4int(varntp->massini);
|
||||
G4int chargeBalance = G4int(varntp->mzini);
|
||||
|
||||
G4LorentzRotation toFragmentZ;
|
||||
toFragmentZ.rotateZ(-p4.theta());
|
||||
toFragmentZ.rotateY(-p4.phi());
|
||||
G4LorentzRotation toFragmentLab = toFragmentZ.inverse();
|
||||
// p4 *= toFragmentZ;
|
||||
|
||||
G4LorentzVector p4rest = p4;
|
||||
// p4rest.boost(-p4.boostVector());
|
||||
if(verboseLevel > 0) {
|
||||
G4cout <<"Cascade remnant nucleus:" << G4endl;
|
||||
G4cout <<"p4: " << G4endl;
|
||||
G4cout <<" px: " << p4.px() <<" py: " << p4.py() <<" pz: " << p4.pz() << G4endl;
|
||||
G4cout <<" E = " << p4.e() << G4endl;
|
||||
|
||||
G4cout <<"p4rest: " << G4endl;
|
||||
G4cout <<" px: " << p4rest.px() <<" py: " << p4rest.py() <<" pz: " << p4rest.pz() << G4endl;
|
||||
G4cout <<" E = " << p4rest.e() << G4endl;
|
||||
}
|
||||
|
||||
G4Fragment theCascadeRemnant(G4int(varntp->massini), G4int(varntp->mzini), p4rest);
|
||||
theFermiBreakupResult = fermiBreakUp->BreakItUp(theCascadeRemnant);
|
||||
if(theFermiBreakupResult != 0) {
|
||||
G4FragmentVector::iterator fragment;
|
||||
for(fragment = theFermiBreakupResult->begin(); fragment != theFermiBreakupResult->end(); fragment++) {
|
||||
G4ParticleDefinition *theFragmentDefinition = 0;
|
||||
if((*fragment)->GetA_asInt() == 1 && (*fragment)->GetZ_asInt() == 0) { // Neutron
|
||||
theFragmentDefinition = G4Neutron::NeutronDefinition();
|
||||
} else if ((*fragment)->GetA_asInt() == 1 && (*fragment)->GetZ_asInt() == 1) {
|
||||
theFragmentDefinition = G4Proton::ProtonDefinition();
|
||||
} else {
|
||||
theFragmentDefinition = theTableOfParticles->GetIon((*fragment)->GetZ_asInt(), (*fragment)->GetA_asInt(), (*fragment)->GetExcitationEnergy());
|
||||
}
|
||||
|
||||
if(theFragmentDefinition != 0) {
|
||||
G4DynamicParticle *theFragment = new G4DynamicParticle(theFragmentDefinition, (*fragment)->GetMomentum());
|
||||
G4LorentzVector labMomentum = theFragment->Get4Momentum();
|
||||
// labMomentum.boost(p4.boostVector());
|
||||
// labMomentum *= toFragmentLab;
|
||||
// labMomentum *= toLabFrame;
|
||||
theFragment->Set4Momentum(labMomentum);
|
||||
fourMomentumBalance -= theFragment->Get4Momentum();
|
||||
baryonNumberBalance -= theFragmentDefinition->GetAtomicMass();
|
||||
chargeBalance -= theFragmentDefinition->GetAtomicNumber();
|
||||
if(verboseLevel > 0) {
|
||||
G4cout <<"Resulting fragment: " << G4endl;
|
||||
G4cout <<" kinetic energy = " << theFragment->GetKineticEnergy() / MeV << " MeV" << G4endl;
|
||||
G4cout <<" momentum = " << theFragment->GetMomentum().mag() / MeV << " MeV" << G4endl;
|
||||
}
|
||||
result.push_back(theFragment);
|
||||
} else {
|
||||
G4cout <<"G4InclAblaCascadeInterface: Error. Fragment produced by Fermi break-up does not exist." << G4endl;
|
||||
G4cout <<"Resulting fragment: " << G4endl;
|
||||
G4cout <<" Z = " << (*fragment)->GetZ_asInt() << G4endl;
|
||||
G4cout <<" A = " << (*fragment)->GetA_asInt() << G4endl;
|
||||
G4cout <<" Excitation : " << (*fragment)->GetExcitationEnergy() / MeV << " MeV" << G4endl;
|
||||
G4cout <<" momentum = " << (*fragment)->GetMomentum().mag() / MeV << " MeV" << G4endl;
|
||||
}
|
||||
}
|
||||
delete theFermiBreakupResult;
|
||||
theFermiBreakupResult = 0;
|
||||
|
||||
if(std::abs(fourMomentumBalance.mag() / MeV) > 0.1 * MeV) {
|
||||
G4cout <<"Four-momentum balance after remnant nucleus Fermi break-up:" << G4endl;
|
||||
G4cout <<"Magnitude: " << fourMomentumBalance.mag() / MeV << " MeV" << G4endl;
|
||||
G4cout <<"Vector components (px, py, pz, E) = ("
|
||||
<< fourMomentumBalance.px() << ", "
|
||||
<< fourMomentumBalance.py() << ", "
|
||||
<< fourMomentumBalance.pz() << ", "
|
||||
<< fourMomentumBalance.e() << ")" << G4endl;
|
||||
}
|
||||
if(baryonNumberBalance != 0) {
|
||||
G4cout <<"Baryon number balance after remnant nucleus Fermi break-up: " << baryonNumberBalance << G4endl;
|
||||
}
|
||||
if(chargeBalance != 0) {
|
||||
G4cout <<"Charge balance after remnant nucleus Fermi break-up: " << chargeBalance << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
varntp->ntrack = 0; // Clean up the number of generated particles in the event.
|
||||
|
||||
if(baryonNumberBalanceInINCL != 0 && verboseLevel > 1) {
|
||||
G4cout <<"Event " << eventNumber <<": G4InclAblaLightIonInterface: Baryon number conservation problem in INCL detected!" << G4endl;
|
||||
G4cout <<"Baryon number balance: " << baryonNumberBalanceInINCL << G4endl;
|
||||
if(baryonNumberBalanceInINCL < 0) {
|
||||
G4cout <<"Event " << eventNumber <<": Too many outcoming baryons!" << G4endl;
|
||||
} else if(baryonNumberBalanceInINCL > 0) {
|
||||
G4cout <<"Event " << eventNumber <<": Too few outcoming baryons!" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
if(chargeNumberBalanceInINCL != 0 && verboseLevel > 1) {
|
||||
G4cout <<"Event " << eventNumber <<": G4InclAblaLightIonInterface: Charge number conservation problem in INCL detected!" << G4endl;
|
||||
G4cout <<"Event " << eventNumber <<": Charge number balance: " << chargeNumberBalanceInINCL << G4endl;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Report unsupported features.
|
||||
@@ -343,7 +636,7 @@ G4HadFinalState* G4InclAblaLightIonInterface::ApplyYourself(const G4HadProjectil
|
||||
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
|
||||
cascadeParticle = new G4DynamicParticle(theTableOfParticles->FindParticle(aTrack.GetDefinition()), aTrack.Get4Momentum());
|
||||
|
||||
theResult.AddSecondary(cascadeParticle);
|
||||
result.push_back(cascadeParticle);
|
||||
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"G4InclAblaLightIonInterface: Error processing event number (internal) " << eventNumber << G4endl;
|
||||
@@ -363,26 +656,26 @@ G4HadFinalState* G4InclAblaLightIonInterface::ApplyYourself(const G4HadProjectil
|
||||
}
|
||||
}
|
||||
|
||||
if((targetA == 1) && (targetZ == 1)) { // Unsupported target
|
||||
if((calincl->targetA() == 1) && (calincl->targetZ() == 1)) { // Unsupported target
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"Unsupported target: " << G4endl;
|
||||
G4cout <<"Target A: " << targetA << G4endl;
|
||||
G4cout <<"TargetZ: " << targetZ << G4endl;
|
||||
G4cout <<"Target A: " << calincl->targetA() << G4endl;
|
||||
G4cout <<"TargetZ: " << calincl->targetZ() << G4endl;
|
||||
}
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"Unsupported target: " << G4endl;
|
||||
diagdata <<"Target A: " << targetA << G4endl;
|
||||
diagdata <<"TargetZ: " << targetZ << G4endl;
|
||||
diagdata <<"Target A: " << calincl->targetA() << G4endl;
|
||||
diagdata <<"TargetZ: " << calincl->targetZ() << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
if(bulletE < 100) { // INCL does not support E < 100 MeV.
|
||||
if(calincl->bulletE() < 100) { // INCL does not support E < 100 MeV.
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"Unsupported bullet energy: " << bulletE << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
G4cout <<"Unsupported bullet energy: " << calincl->bulletE() << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
G4cout <<"WARNING: Returning the original bullet with original energy back to Geant4." << G4endl;
|
||||
}
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"Unsupported bullet energy: " << bulletE << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
diagdata <<"Unsupported bullet energy: " << calincl->bulletE() << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,6 +684,25 @@ G4HadFinalState* G4InclAblaLightIonInterface::ApplyYourself(const G4HadProjectil
|
||||
}
|
||||
}
|
||||
|
||||
// Finally copy the accumulated secondaries into the result collection:
|
||||
G4ThreeVector boostVector = aTrack.Get4Momentum().boostVector();
|
||||
G4LorentzRotation boostBack = toBreit.inverse();
|
||||
|
||||
for(std::vector<G4DynamicParticle*>::iterator i = result.begin(); i != result.end(); ++i) {
|
||||
// If the calculation was performed in inverse kinematics we have to
|
||||
// convert the result back...
|
||||
if(calincl->isInverseKinematics()) {
|
||||
G4LorentzVector mom = (*i)->Get4Momentum();
|
||||
mom.setPz(-1.0 * mom.pz()); // Reverse the z-component of the momentum vector
|
||||
mom *= boostBack;
|
||||
(*i)->Set4Momentum(mom);
|
||||
}
|
||||
theResult.AddSecondary((*i));
|
||||
}
|
||||
|
||||
delete fermiBreakUp;
|
||||
delete calincl;
|
||||
calincl = 0;
|
||||
return &theResult;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4InclAblaVirtualData.cc,v 1.2 2007/09/11 13:19:25 miheikki Exp $
|
||||
// $Id: G4InclAblaVirtualData.cc,v 1.3 2010/06/14 16:10:01 gcosmo Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -32,10 +32,8 @@
|
||||
|
||||
#include "G4InclAblaVirtualData.hh"
|
||||
|
||||
G4InclAblaVirtualData::G4InclAblaVirtualData()
|
||||
{
|
||||
|
||||
}
|
||||
G4InclAblaVirtualData::G4InclAblaVirtualData() {}
|
||||
G4InclAblaVirtualData::~G4InclAblaVirtualData() {}
|
||||
|
||||
bool G4InclAblaVirtualData::setAlpha(int A, int Z, double value)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4InclCascadeInterface.cc,v 1.10 2007/12/10 16:32:02 gunter Exp $
|
||||
// $Id: G4InclCascadeInterface.cc,v 1.15 2010/11/17 20:19:09 kaitanie Exp $
|
||||
// Translation of INCL4.2/ABLA V3
|
||||
// Pekka Kaitaniemi, HIP (translation)
|
||||
// Christelle Schmidt, IPNL (fission code)
|
||||
@@ -33,30 +33,41 @@
|
||||
//#define DEBUGINCL 1
|
||||
|
||||
#include "G4InclCascadeInterface.hh"
|
||||
#include "G4FermiBreakUp.hh"
|
||||
#include "math.h"
|
||||
#include "G4GenericIon.hh"
|
||||
#include "CLHEP/Random/Random.h"
|
||||
|
||||
G4InclCascadeInterface::G4InclCascadeInterface()
|
||||
G4InclCascadeInterface::G4InclCascadeInterface(const G4String& nam)
|
||||
:G4VIntraNuclearTransportModel(nam)
|
||||
{
|
||||
hazard = new G4Hazard();
|
||||
const G4long* table_entry = CLHEP::HepRandom::getTheSeeds(); // Get random seed from CLHEP.
|
||||
hazard->ial = (*table_entry);
|
||||
|
||||
varntp = new G4VarNtp();
|
||||
calincl = new G4Calincl();
|
||||
calincl = 0;
|
||||
ws = new G4Ws();
|
||||
mat = new G4Mat();
|
||||
incl = new G4Incl(hazard, calincl, ws, mat, varntp);
|
||||
|
||||
theExcitationHandler = new G4ExcitationHandler;
|
||||
thePrecoModel = new G4PreCompoundModel(theExcitationHandler);
|
||||
|
||||
if(!getenv("G4INCLABLANOFERMIBREAKUP")) { // Use Fermi Break-up by default if it is NOT explicitly disabled
|
||||
incl->setUseFermiBreakUp(true);
|
||||
}
|
||||
|
||||
verboseLevel = 0;
|
||||
}
|
||||
|
||||
G4InclCascadeInterface::~G4InclCascadeInterface()
|
||||
{
|
||||
delete thePrecoModel;
|
||||
delete theExcitationHandler;
|
||||
|
||||
delete hazard;
|
||||
delete varntp;
|
||||
delete calincl;
|
||||
delete ws;
|
||||
delete mat;
|
||||
delete incl;
|
||||
@@ -66,8 +77,7 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
{
|
||||
G4int maxTries = 200;
|
||||
|
||||
G4int particleI, n = 0;
|
||||
|
||||
G4int particleI;
|
||||
G4int bulletType = 0;
|
||||
|
||||
// Print diagnostic messages: 0 = silent, 1 and 2 = verbose
|
||||
@@ -84,20 +94,17 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
G4cout <<"G4InclCascadeInterface: Now processing INCL4 event number:" << eventNumber << G4endl;
|
||||
}
|
||||
|
||||
// INCL4 needs the energy in units MeV
|
||||
G4double bulletE = aTrack.GetKineticEnergy() * MeV;
|
||||
|
||||
#ifdef DEBUGINCL
|
||||
G4cout <<"Bullet energy = " << bulletE / MeV << G4endl;
|
||||
#endif
|
||||
|
||||
G4double targetA = theNucleus.GetN();
|
||||
G4double targetZ = theNucleus.GetZ();
|
||||
|
||||
G4double eKin;
|
||||
G4double momx = 0.0, momy = 0.0, momz = 0.0;
|
||||
G4DynamicParticle *cascadeParticle = 0;
|
||||
G4ParticleDefinition *aParticleDefinition = 0;
|
||||
|
||||
G4ReactionProductVector *thePrecoResult = 0;
|
||||
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
|
||||
|
||||
// INCL assumes the projectile particle is going in the direction of
|
||||
// the Z-axis. Here we construct proper rotation to convert the
|
||||
@@ -111,16 +118,11 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
|
||||
theResult.Clear(); // Make sure the output data structure is clean.
|
||||
|
||||
// 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};
|
||||
calincl = new G4InclInput(aTrack, theNucleus, false);
|
||||
incl->setInput(calincl);
|
||||
|
||||
// Coding particles for use with INCL4 and ABLA
|
||||
if (aTrack.GetDefinition() == G4Proton::Proton() ) bulletType = proton;
|
||||
if (aTrack.GetDefinition() == G4Neutron::Neutron() ) bulletType = neutron;
|
||||
if (aTrack.GetDefinition() == G4PionPlus::PionPlus() ) bulletType = pionPlus;
|
||||
if (aTrack.GetDefinition() == G4PionMinus::PionMinus() ) bulletType = pionMinus;
|
||||
if (aTrack.GetDefinition() == G4PionZero::PionZero() ) bulletType = pionZero;
|
||||
// G4InclInput::printProjectileTargetInfo(aTrack, theNucleus);
|
||||
// calincl->printInfo();
|
||||
|
||||
#ifdef DEBUGINCL
|
||||
G4int baryonBullet = 0, chargeBullet = 0;
|
||||
@@ -133,22 +135,12 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
G4double amass = theNucleus.AtomicMass(targetA, targetZ);
|
||||
G4double eKinSum = bulletE;
|
||||
G4LorentzVector labv = G4LorentzVector(0.0, 0.0, std::sqrt(bulletE*(bulletE + 2.*mass)), bulletE + mass + amass);
|
||||
G4LorentzVector labvA = G4LorentzVector(0.0, 0.0, 0.0, 0.0);
|
||||
G4cout <<"Energy in the beginning = " << labv.e() / MeV << G4endl;
|
||||
#endif
|
||||
|
||||
for(int i = 0; i < 15; i++) {
|
||||
calincl->f[i] = 0.0; // Initialize INCL input data
|
||||
}
|
||||
|
||||
// Check wheter the input is acceptable.
|
||||
if((bulletType != 0) && ((targetA != 1) && (targetZ != 1))) {
|
||||
calincl->f[0] = targetA; // Target mass number
|
||||
calincl->f[1] = targetZ; // Charge number
|
||||
calincl->f[6] = bulletType; // Type
|
||||
calincl->f[2] = bulletE; // Energy [MeV]
|
||||
calincl->f[5] = 1.0; // Time scaling
|
||||
calincl->f[4] = 45.0; // Nuclear potential
|
||||
|
||||
if((calincl->bulletType() != 0) && ((calincl->targetA() != 1) && (calincl->targetZ() != 1))) {
|
||||
ws->nosurf = -2; // Nucleus surface, -2 = Woods-Saxon
|
||||
ws->xfoisa = 8;
|
||||
ws->npaulstr = 0;
|
||||
@@ -157,8 +149,8 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
varntp->ntrack = 0;
|
||||
|
||||
mat->nbmat = 1;
|
||||
mat->amat[0] = int(calincl->f[0]);
|
||||
mat->zmat[0] = int(calincl->f[1]);
|
||||
mat->amat[0] = int(calincl->targetA());
|
||||
mat->zmat[0] = int(calincl->targetZ());
|
||||
|
||||
incl->initIncl(true);
|
||||
|
||||
@@ -167,7 +159,7 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"G4InclCascadeInterface: Try number = " << nTries << G4endl;
|
||||
}
|
||||
incl->processEventIncl();
|
||||
incl->processEventIncl(calincl);
|
||||
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"G4InclCascadeInterface: number of tracks = " << varntp->ntrack <<G4endl;
|
||||
@@ -178,40 +170,20 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
/**
|
||||
* Diagnostic output
|
||||
*/
|
||||
G4cout <<"G4InclCascadeInterface: Bullet type: " << bulletType << G4endl;
|
||||
G4cout <<"G4Incl4AblaCascadeInterface: Bullet energy: " << bulletE << " MeV" << G4endl;
|
||||
G4cout <<"G4InclCascadeInterface: Bullet type: " << calincl->bulletType() << G4endl;
|
||||
G4cout <<"G4Incl4AblaCascadeInterface: Bullet energy: " << calincl->bulletE() << " MeV" << G4endl;
|
||||
|
||||
G4cout <<"G4InclCascadeInterface: Target A: " << targetA << G4endl;
|
||||
G4cout <<"G4InclCascadeInterface: Target Z: " << targetZ << G4endl;
|
||||
G4cout <<"G4InclCascadeInterface: Target A: " << calincl->targetA() << G4endl;
|
||||
G4cout <<"G4InclCascadeInterface: Target Z: " << calincl->targetZ() << G4endl;
|
||||
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"G4InclCascadeInterface: Bullet type: " << bulletType << G4endl;
|
||||
diagdata <<"G4InclCascadeInterface: Bullet energy: " << bulletE << " MeV" << G4endl;
|
||||
diagdata <<"G4InclCascadeInterface: Bullet type: " << calincl->bulletType() << G4endl;
|
||||
diagdata <<"G4InclCascadeInterface: Bullet energy: " << calincl->bulletE() << " MeV" << G4endl;
|
||||
|
||||
diagdata <<"G4InclCascadeInterface: Target A: " << targetA << G4endl;
|
||||
diagdata <<"G4InclCascadeInterface: Target Z: " << targetZ << G4endl;
|
||||
diagdata <<"G4InclCascadeInterface: Target A: " << calincl->targetA() << G4endl;
|
||||
diagdata <<"G4InclCascadeInterface: Target Z: " << calincl->targetZ() << G4endl;
|
||||
}
|
||||
|
||||
for(particleI = 0; particleI < varntp->ntrack; particleI++) {
|
||||
G4cout << n << " " << calincl->f[6] << " " << calincl->f[2] << " ";
|
||||
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;
|
||||
// For diagnostic output
|
||||
if(verboseLevel > 3) {
|
||||
diagdata << n << " " << calincl->f[6] << " " << calincl->f[2] << " ";
|
||||
diagdata << varntp->massini << " " << varntp->mzini << " ";
|
||||
diagdata << varntp->exini << " " << varntp->mulncasc << " " << varntp->mulnevap << " " << varntp->mulntot << " ";
|
||||
diagdata << varntp->bimpact << " " << varntp->jremn << " " << varntp->kfis << " " << varntp->estfis << " ";
|
||||
diagdata << varntp->izfis << " " << varntp->iafis << " " << varntp->ntrack << " ";
|
||||
diagdata << varntp->itypcasc[particleI] << " ";
|
||||
diagdata << varntp->avv[particleI] << " " << varntp->zvv[particleI] << " " << varntp->enerj[particleI] << " ";
|
||||
diagdata << varntp->plab[particleI] << " " << varntp->tetlab[particleI] << " " << varntp->philab[particleI] << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check whether a valid cascade was produced.
|
||||
@@ -224,26 +196,15 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
|
||||
theResult.SetStatusChange(stopAndKill);
|
||||
|
||||
if(bulletType == proton) {
|
||||
aParticleDefinition = G4Proton::ProtonDefinition();
|
||||
}
|
||||
if(bulletType == neutron) {
|
||||
aParticleDefinition = G4Neutron::NeutronDefinition();
|
||||
}
|
||||
if(bulletType == pionPlus) {
|
||||
aParticleDefinition = G4PionPlus::PionPlusDefinition();
|
||||
}
|
||||
if(bulletType == pionZero) {
|
||||
aParticleDefinition = G4PionZero::PionZeroDefinition();
|
||||
}
|
||||
if(bulletType == pionMinus) {
|
||||
aParticleDefinition = G4PionMinus::PionMinusDefinition();
|
||||
}
|
||||
G4int bulletType = calincl->bulletType();
|
||||
aParticleDefinition = G4InclInput::getParticleDefinition(bulletType);
|
||||
|
||||
cascadeParticle = new G4DynamicParticle();
|
||||
cascadeParticle->SetDefinition(aParticleDefinition);
|
||||
cascadeParticle->Set4Momentum(aTrack.Get4Momentum());
|
||||
theResult.AddSecondary(cascadeParticle);
|
||||
if(aParticleDefinition != 0) {
|
||||
cascadeParticle = new G4DynamicParticle();
|
||||
cascadeParticle->SetDefinition(aParticleDefinition);
|
||||
cascadeParticle->Set4Momentum(aTrack.Get4Momentum());
|
||||
theResult.AddSecondary(cascadeParticle);
|
||||
}
|
||||
}
|
||||
|
||||
// Convert INCL4 output to Geant4 compatible data structures.
|
||||
@@ -251,7 +212,14 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
theResult.SetStatusChange(stopAndKill);
|
||||
|
||||
#ifdef DEBUGINCL
|
||||
G4cout << "E [MeV]" << std::setw(12) << " Ekin [MeV]" << std::setw(12) << " E* [MeV]" << std::setw(12) << "Px [MeV]" << std::setw(12) << " Py [MeV]" << std::setw(12) << "Pz [MeV]" << std::setw(12) << "Pt [MeV]" << std::setw(12) << "A" << std::setw(12) << "Z" << G4endl;
|
||||
G4cout << "E [MeV]" << std::setw(12)
|
||||
<< " Ekin [MeV]" << std::setw(12)
|
||||
<< "Px [MeV]" << std::setw(12)
|
||||
<< " Py [MeV]" << std::setw(12)
|
||||
<< "Pz [MeV]" << std::setw(12)
|
||||
<< "Pt [MeV]" << std::setw(12)
|
||||
<< "A" << std::setw(12)
|
||||
<< "Z" << G4endl;
|
||||
#endif
|
||||
|
||||
for(particleI = 0; particleI < varntp->ntrack; particleI++) { // Loop through the INCL4+ABLA output.
|
||||
@@ -318,7 +286,6 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
|
||||
if((varntp->avv[particleI] > 1) && (varntp->zvv[particleI] >= 1)) { // Nucleus fragment
|
||||
G4ParticleDefinition * aIonDef = 0;
|
||||
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
|
||||
|
||||
G4int A = G4int(varntp->avv[particleI]);
|
||||
G4int Z = G4int(varntp->zvv[particleI]);
|
||||
@@ -357,9 +324,12 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
G4double m = pd->GetPDGMass();
|
||||
G4double p = mom.mag();
|
||||
labv -= fm;
|
||||
G4double px = mom.x() * MeV;
|
||||
G4double py = mom.y() * MeV;
|
||||
G4double pz = mom.z() * MeV;
|
||||
if(varntp->avv[particleI] > 1) {
|
||||
labvA += fm;
|
||||
}
|
||||
G4double px = mom.x() * MeV;
|
||||
G4double py = mom.y() * MeV;
|
||||
G4double pz = mom.z() * MeV;
|
||||
G4double pt = std::sqrt(px*px+py*py);
|
||||
G4double e = fm.e();
|
||||
eKinSum -= cascadeParticle->GetKineticEnergy() * MeV;
|
||||
@@ -372,7 +342,6 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
}
|
||||
G4cout << fm.e() / MeV
|
||||
<< std::setw(12) << cascadeParticle->GetKineticEnergy() / MeV
|
||||
<< std::setw(12) << exE / MeV
|
||||
<< std::setw(12) << mom.x() / MeV
|
||||
<< std::setw(12) << mom.y() / MeV
|
||||
<< std::setw(12) << mom.z() / MeV
|
||||
@@ -393,12 +362,115 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G4double nuclearMass = G4NucleiProperties::GetNuclearMass(G4int(varntp->massini), G4int(varntp->mzini)) + varntp->exini * MeV;
|
||||
G4LorentzVector fragmentMomentum(varntp->pxrem * MeV, varntp->pyrem * MeV, varntp->pzrem * MeV,
|
||||
varntp->erecrem * MeV + nuclearMass);
|
||||
G4double momentumScaling = G4InclUtils::calculate4MomentumScaling(G4int(varntp->massini), G4int(varntp->mzini),
|
||||
varntp->exini,
|
||||
varntp->erecrem,
|
||||
varntp->pxrem,
|
||||
varntp->pyrem,
|
||||
varntp->pzrem);
|
||||
G4LorentzVector p4(momentumScaling * varntp->pxrem * MeV, momentumScaling * varntp->pyrem * MeV,
|
||||
momentumScaling * varntp->pzrem * MeV,
|
||||
varntp->erecrem + nuclearMass);
|
||||
|
||||
// For four-momentum, baryon number and charge conservation check:
|
||||
G4LorentzVector fourMomentumBalance = p4;
|
||||
G4int baryonNumberBalance = G4int(varntp->massini);
|
||||
G4int chargeBalance = G4int(varntp->mzini);
|
||||
|
||||
G4LorentzRotation toFragmentZ;
|
||||
toFragmentZ.rotateZ(-p4.theta());
|
||||
toFragmentZ.rotateY(-p4.phi());
|
||||
G4LorentzRotation toFragmentLab = toFragmentZ.inverse();
|
||||
p4 *= toFragmentZ;
|
||||
|
||||
G4LorentzVector p4rest = p4;
|
||||
p4rest.boost(-p4.boostVector());
|
||||
if(verboseLevel > 0) {
|
||||
G4cout <<"Cascade remnant nucleus:" << G4endl;
|
||||
G4cout <<"p4: " << G4endl;
|
||||
G4cout <<" px: " << p4.px() <<" py: " << p4.py() <<" pz: " << p4.pz() << G4endl;
|
||||
G4cout <<" E = " << p4.e() << G4endl;
|
||||
|
||||
G4cout <<"p4rest: " << G4endl;
|
||||
G4cout <<" px: " << p4rest.px() <<" py: " << p4rest.py() <<" pz: " << p4rest.pz() << G4endl;
|
||||
G4cout <<" E = " << p4rest.e() << G4endl;
|
||||
}
|
||||
|
||||
G4Fragment theCascadeRemnant(G4int(varntp->massini), G4int(varntp->mzini), p4rest);
|
||||
thePrecoResult = thePrecoModel->DeExcite(theCascadeRemnant);
|
||||
if(thePrecoResult != 0) {
|
||||
G4ReactionProductVector::iterator fragment;
|
||||
for(fragment = thePrecoResult->begin(); fragment != thePrecoResult->end(); fragment++) {
|
||||
G4ParticleDefinition *theFragmentDefinition = (*fragment)->GetDefinition();
|
||||
|
||||
if(theFragmentDefinition != 0) {
|
||||
G4DynamicParticle *theFragment = new G4DynamicParticle(theFragmentDefinition, (*fragment)->GetMomentum());
|
||||
G4LorentzVector labMomentum = theFragment->Get4Momentum();
|
||||
labMomentum.boost(p4.boostVector());
|
||||
labMomentum *= toFragmentLab;
|
||||
labMomentum *= toLabFrame;
|
||||
theFragment->Set4Momentum(labMomentum);
|
||||
fourMomentumBalance -= theFragment->Get4Momentum();
|
||||
baryonNumberBalance -= theFragmentDefinition->GetAtomicMass();
|
||||
chargeBalance -= theFragmentDefinition->GetAtomicNumber();
|
||||
if(verboseLevel > 0) {
|
||||
G4cout <<"Resulting fragment: " << G4endl;
|
||||
G4cout <<" kinetic energy = " << theFragment->GetKineticEnergy() / MeV << " MeV" << G4endl;
|
||||
G4cout <<" momentum = " << theFragment->GetMomentum().mag() / MeV << " MeV" << G4endl;
|
||||
}
|
||||
theResult.AddSecondary(theFragment);
|
||||
} else {
|
||||
G4cout <<"G4InclCascadeInterface: Error. Fragment produced by Fermi break-up does not exist." << G4endl;
|
||||
G4cout <<"Resulting fragment: " << G4endl;
|
||||
G4cout <<" momentum = " << (*fragment)->GetMomentum().mag() / MeV << " MeV" << G4endl;
|
||||
}
|
||||
}
|
||||
delete thePrecoResult;
|
||||
thePrecoResult = 0;
|
||||
|
||||
if(verboseLevel > 1 && std::abs(fourMomentumBalance.mag() / MeV) > 0.1 * MeV) {
|
||||
G4cout <<"Four-momentum balance after remnant nucleus Fermi break-up:" << G4endl;
|
||||
G4cout <<"Magnitude: " << fourMomentumBalance.mag() / MeV << " MeV" << G4endl;
|
||||
G4cout <<"Vector components (px, py, pz, E) = ("
|
||||
<< fourMomentumBalance.px() << ", "
|
||||
<< fourMomentumBalance.py() << ", "
|
||||
<< fourMomentumBalance.pz() << ", "
|
||||
<< fourMomentumBalance.e() << ")" << G4endl;
|
||||
}
|
||||
if(baryonNumberBalance != 0 && verboseLevel > 1) {
|
||||
G4cout <<"Baryon number balance after remnant nucleus Fermi break-up: " << baryonNumberBalance << G4endl;
|
||||
}
|
||||
if(chargeBalance != 0 && verboseLevel > 1) {
|
||||
G4cout <<"Charge balance after remnant nucleus Fermi break-up: " << chargeBalance << G4endl;
|
||||
}
|
||||
}
|
||||
// } // if(needsFermiBreakUp)
|
||||
|
||||
#ifdef DEBUGINCL
|
||||
G4cout <<"--------------------------------------------------------------------------------" << G4endl;
|
||||
G4double pt = std::sqrt(std::pow(labv.x(), 2) + std::pow(labv.y(), 2));
|
||||
G4cout << labv.e() / MeV << std::setw(12) << eKinSum / MeV << std::setw(12) << labv.x() << std::setw(12) << labv.y() << std::setw(12) << labv.z() << std::setw(12) << pt / MeV << std::setw(12) << baryonNumber << std::setw(12) << chargeNumber << " totals" << G4endl;
|
||||
G4double ptA = std::sqrt(std::pow(labvA.x(), 2) + std::pow(labvA.y(), 2));
|
||||
G4cout << labv.e() / MeV << std::setw(12)
|
||||
<< eKinSum / MeV << std::setw(12)
|
||||
<< labv.x() / MeV << std::setw(12)
|
||||
<< labv.y() / MeV << std::setw(12)
|
||||
<< labv.z() / MeV << std::setw(12)
|
||||
<< pt / MeV << std::setw(12)
|
||||
<< baryonNumber << std::setw(12)
|
||||
<< chargeNumber << " totals" << G4endl;
|
||||
G4cout << " - " << std::setw(12)
|
||||
<< " - " << std::setw(12)
|
||||
<< labvA.x() / MeV << std::setw(12)
|
||||
<< labvA.y() / MeV << std::setw(12)
|
||||
<< labvA.z() / MeV << std::setw(12)
|
||||
<< ptA / MeV << std::setw(12)
|
||||
<< " - " << std::setw(12) << " - " << " totals ABLA" << G4endl;
|
||||
G4cout << G4endl;
|
||||
|
||||
|
||||
if(verboseLevel > 3) {
|
||||
if(baryonNumber != 0) {
|
||||
G4cout <<"WARNING G4InclCascadeInterface: Baryon number conservation violated." << G4endl;
|
||||
@@ -411,7 +483,7 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
varntp->ntrack = 0; // Clean up the number of generated particles in the event.
|
||||
}
|
||||
/**
|
||||
@@ -421,7 +493,6 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
else { // If the bullet type was not recognized by the interface, it will be returned back without any interaction.
|
||||
theResult.SetStatusChange(stopAndKill);
|
||||
|
||||
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
|
||||
cascadeParticle = new G4DynamicParticle(theTableOfParticles->FindParticle(aTrack.GetDefinition()), aTrack.Get4Momentum());
|
||||
|
||||
theResult.AddSecondary(cascadeParticle);
|
||||
@@ -430,7 +501,7 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
G4cout <<"ERROR G4InclCascadeInterface: Processing event number (internal) failed " << eventNumber << G4endl;
|
||||
}
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"ERROR G4InclCascadeInterface: Processing event number (internal) failed " << eventNumber << G4endl;
|
||||
diagdata <<"ERROR G4InclCascadeInterface: Error processing event number (internal) failed " << eventNumber << G4endl;
|
||||
}
|
||||
|
||||
if(bulletType == 0) {
|
||||
@@ -444,26 +515,26 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
}
|
||||
}
|
||||
|
||||
if((targetA == 1) && (targetZ == 1)) { // Unsupported target
|
||||
if((calincl->targetA() == 1) && (calincl->targetZ() == 1)) { // Unsupported target
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"Unsupported target: " << G4endl;
|
||||
G4cout <<"Target A: " << targetA << G4endl;
|
||||
G4cout <<"TargetZ: " << targetZ << G4endl;
|
||||
G4cout <<"Target A: " << calincl->targetA() << G4endl;
|
||||
G4cout <<"TargetZ: " << calincl->targetZ() << G4endl;
|
||||
}
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"Unsupported target: " << G4endl;
|
||||
diagdata <<"Target A: " << targetA << G4endl;
|
||||
diagdata <<"TargetZ: " << targetZ << G4endl;
|
||||
diagdata <<"Target A: " << calincl->targetA() << G4endl;
|
||||
diagdata <<"TargetZ: " << calincl->targetZ() << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
if(bulletE < 100) { // INCL does not support E < 100 MeV.
|
||||
if(calincl->bulletE() < 100) { // INCL does not support E < 100 MeV.
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"Unsupported bullet energy: " << bulletE << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
G4cout <<"Unsupported bullet energy: " << calincl->bulletE() << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
G4cout <<"WARNING: Returning the original bullet with original energy back to Geant4." << G4endl;
|
||||
}
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"Unsupported bullet energy: " << bulletE << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
diagdata <<"Unsupported bullet energy: " << calincl->bulletE() << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -472,6 +543,8 @@ G4HadFinalState* G4InclCascadeInterface::ApplyYourself(const G4HadProjectile& aT
|
||||
}
|
||||
}
|
||||
|
||||
delete calincl;
|
||||
calincl = 0;
|
||||
return &theResult;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#include "G4InclInput.hh"
|
||||
|
||||
G4InclInput::G4InclInput(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus, G4bool inverseKinematics = false) {
|
||||
usingInverseKinematics = inverseKinematics;
|
||||
|
||||
fTargetA = theNucleus.GetA_asInt(); // Target mass number
|
||||
fTargetZ = theNucleus.GetZ_asInt(); // Target charge number
|
||||
fBulletType = getBulletType(aTrack.GetDefinition()); // Projectile type (INCL particle code)
|
||||
fBulletE = aTrack.GetKineticEnergy() / MeV; // Projectile energy (total, in MeV)
|
||||
fTimeScale = 1.0; // Time scaling
|
||||
fNuclearPotential = 45.0; // Nuclear potential
|
||||
setExtendedProjectileInfo(aTrack.GetDefinition());
|
||||
icoup = 0;
|
||||
breakupThreshold = 10;
|
||||
fMinNeutronEnergy = 0.0;
|
||||
fMinProtonE = 0.0;
|
||||
}
|
||||
|
||||
G4InclInput::~G4InclInput() {}
|
||||
|
||||
void G4InclInput::printInfo() {
|
||||
G4cout <<"Target: A = " << targetA() << " Z = " << targetZ() << G4endl;
|
||||
G4cout <<"Projectile: type = " << bulletType() << " energy = " << bulletE() << G4endl;
|
||||
}
|
||||
|
||||
void G4InclInput::printProjectileTargetInfo(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus) {
|
||||
G4cout <<"Projectile = " << aTrack.GetDefinition()->GetParticleName() << G4endl;
|
||||
G4cout <<" four-momentum: " << aTrack.Get4Momentum() << G4endl;
|
||||
G4cout <<"Energy = " << aTrack.GetKineticEnergy() / MeV << G4endl;
|
||||
G4cout <<"Target A = " << theNucleus.GetA_asInt() << " Z = " << theNucleus.GetZ_asInt() << G4endl;
|
||||
}
|
||||
|
||||
|
||||
G4bool G4InclInput::canUseInverseKinematics(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus) {
|
||||
G4int targetA = theNucleus.GetA_asInt();
|
||||
const G4ParticleDefinition *projectileDef = aTrack.GetDefinition();
|
||||
G4int projectileA = projectileDef->GetAtomicMass();
|
||||
// G4int projectileZ = projectileDef->GetAtomicNumber();
|
||||
if(targetA > 0 && targetA < 18 && (projectileDef != G4Proton::Proton() &&
|
||||
projectileDef != G4Neutron::Neutron() &&
|
||||
projectileDef != G4PionPlus::PionPlus() &&
|
||||
projectileDef != G4PionZero::PionZero() &&
|
||||
projectileDef != G4PionMinus::PionMinus()) &&
|
||||
projectileA > 1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void G4InclInput::setExtendedProjectileInfo(const G4ParticleDefinition *pd) {
|
||||
if(getBulletType(pd) == -666) {
|
||||
theExtendedProjectileA = pd->GetAtomicMass();
|
||||
theExtendedProjectileZ = pd->GetAtomicNumber();
|
||||
isExtended = true;
|
||||
} else {
|
||||
isExtended = false;
|
||||
}
|
||||
}
|
||||
|
||||
G4int G4InclInput::getBulletType(const G4ParticleDefinition *pd) {
|
||||
// G4ParticleTable *pt = G4ParticleTable::GetParticleTable();
|
||||
|
||||
if(pd == G4Proton::Proton()) {
|
||||
return 1;
|
||||
} else if(pd == G4Neutron::Neutron()) {
|
||||
return 2;
|
||||
} else if(pd == G4PionPlus::PionPlus()) {
|
||||
return 3;
|
||||
} else if(pd == G4PionMinus::PionMinus()) {
|
||||
return 5;
|
||||
} else if(pd == G4PionZero::PionZero()) {
|
||||
return 4;
|
||||
} else if(pd == G4Deuteron::Deuteron()) {
|
||||
return 6;
|
||||
} else if(pd == G4Triton::Triton()) {
|
||||
return 7;
|
||||
} else if(pd == G4He3::He3()) {
|
||||
return 8;
|
||||
} else if(pd == G4Alpha::Alpha()) {
|
||||
return 9;
|
||||
// } else if(pd == pt->GetIon(6, 12, 0.0)) { // C12 special case. This should be phased-out in favor of "extended projectile"
|
||||
// return -12;
|
||||
} else { // Is this extended projectile?
|
||||
G4int A = pd->GetAtomicMass();
|
||||
G4int Z = pd->GetAtomicNumber();
|
||||
if(A > 4 && A <= 16 && Z > 2 && Z <= 8) { // Ions from Lithium to Oxygen
|
||||
return -666; // Code of an extended projectile
|
||||
}
|
||||
}
|
||||
G4cout <<"Error! Projectile " << pd->GetParticleName() << " not defined!" << G4endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4ParticleDefinition* G4InclInput::getParticleDefinition(G4int inclParticleCode) {
|
||||
switch(inclParticleCode) {
|
||||
case 1:
|
||||
return G4Proton::ProtonDefinition();
|
||||
break;
|
||||
case 2:
|
||||
return G4Neutron::NeutronDefinition();
|
||||
break;
|
||||
case 3:
|
||||
return G4PionPlus::PionPlusDefinition();
|
||||
break;
|
||||
case 4:
|
||||
return G4PionMinus::PionMinusDefinition();
|
||||
break;
|
||||
case 5:
|
||||
return G4PionZero::PionZeroDefinition();
|
||||
break;
|
||||
case 6:
|
||||
return G4Deuteron::DeuteronDefinition();
|
||||
break;
|
||||
case 7:
|
||||
return G4Triton::Triton();
|
||||
break;
|
||||
case 8:
|
||||
return G4He3::He3Definition();
|
||||
break;
|
||||
case 9:
|
||||
return G4Alpha::AlphaDefinition();
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -23,14 +23,17 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4InclLightIonInterface.cc,v 1.10 2007/12/10 16:32:07 gunter Exp $
|
||||
// $Id: G4InclLightIonInterface.cc,v 1.15 2010/11/17 20:19:09 kaitanie 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 <vector>
|
||||
|
||||
#include "G4InclLightIonInterface.hh"
|
||||
#include "G4FermiBreakUp.hh"
|
||||
#include "math.h"
|
||||
#include "G4GenericIon.hh"
|
||||
#include "CLHEP/Random/Random.h"
|
||||
@@ -38,20 +41,36 @@
|
||||
G4InclLightIonInterface::G4InclLightIonInterface()
|
||||
{
|
||||
hazard = new G4Hazard();
|
||||
|
||||
const G4long* table_entry = CLHEP::HepRandom::getTheSeeds(); // Get random seed from CLHEP.
|
||||
hazard->ial = (*table_entry);
|
||||
|
||||
theExcitationHandler = new G4ExcitationHandler;
|
||||
thePrecoModel = new G4PreCompoundModel(theExcitationHandler);
|
||||
|
||||
varntp = new G4VarNtp();
|
||||
calincl = new G4Calincl();
|
||||
calincl = 0;
|
||||
ws = new G4Ws();
|
||||
mat = new G4Mat();
|
||||
incl = new G4Incl(hazard, calincl, ws, mat, varntp);
|
||||
|
||||
useProjectileSpectator = true;
|
||||
useFermiBreakup = true;
|
||||
incl->setUseProjectileSpectators(useProjectileSpectator);
|
||||
if(!getenv("G4INCLABLANOFERMIBREAKUP")) { // Use Fermi Break-up by default if it is NOT explicitly disabled
|
||||
incl->setUseFermiBreakUp(true);
|
||||
useFermiBreakup = true;
|
||||
}
|
||||
verboseLevel = 0;
|
||||
if(getenv("G4INCLVERBOSE")) {
|
||||
verboseLevel = 1;
|
||||
}
|
||||
}
|
||||
|
||||
G4InclLightIonInterface::~G4InclLightIonInterface()
|
||||
{
|
||||
delete thePrecoModel;
|
||||
delete theExcitationHandler;
|
||||
|
||||
delete hazard;
|
||||
delete varntp;
|
||||
delete calincl;
|
||||
@@ -62,18 +81,25 @@ G4InclLightIonInterface::~G4InclLightIonInterface()
|
||||
|
||||
G4HadFinalState* G4InclLightIonInterface::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& theNucleus)
|
||||
{
|
||||
// const G4bool useFermiBreakup = false;
|
||||
G4int maxTries = 200;
|
||||
|
||||
G4int particleI, n = 0;
|
||||
G4int particleI;
|
||||
|
||||
G4int bulletType = 0;
|
||||
G4int baryonNumberBalanceInINCL = 0;
|
||||
G4int chargeNumberBalanceInINCL = 0;
|
||||
|
||||
// Print diagnostic messages: 0 = silent, 1 and 2 = verbose
|
||||
verboseLevel = 0;
|
||||
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
|
||||
|
||||
// Increase the event number:
|
||||
eventNumber++;
|
||||
|
||||
// Clean up the INCL input
|
||||
if(calincl != 0) {
|
||||
delete calincl;
|
||||
calincl = 0;
|
||||
}
|
||||
|
||||
if (verboseLevel > 1) {
|
||||
G4cout << " >>> G4InclLightIonInterface::ApplyYourself called" << G4endl;
|
||||
}
|
||||
@@ -82,11 +108,42 @@ G4HadFinalState* G4InclLightIonInterface::ApplyYourself(const G4HadProjectile& a
|
||||
G4cout <<"G4InclLightIonInterface: Now processing INCL4 event number:" << eventNumber << G4endl;
|
||||
}
|
||||
|
||||
// INCL4 needs the energy in units MeV
|
||||
G4double bulletE = aTrack.GetKineticEnergy() / MeV;
|
||||
// Inverse kinematics for targets with Z = 1 and A = 1
|
||||
// if(false) {
|
||||
G4LorentzRotation toBreit = aTrack.Get4Momentum().boostVector();
|
||||
|
||||
G4double targetA = theNucleus.GetN();
|
||||
G4double targetZ = theNucleus.GetZ();
|
||||
if(theNucleus.GetZ_asInt() == 1 && theNucleus.GetA_asInt() == 1 && G4InclInput::canUseInverseKinematics(aTrack, theNucleus)) {
|
||||
G4ParticleDefinition *oldTargetDef = theTableOfParticles->GetIon(theNucleus.GetA_asInt(), theNucleus.GetZ_asInt(), 0.0);
|
||||
const G4ParticleDefinition *oldProjectileDef = aTrack.GetDefinition();
|
||||
|
||||
if(oldTargetDef != 0 && oldProjectileDef != 0) {
|
||||
G4int oldTargetA = oldTargetDef->GetAtomicMass();
|
||||
G4int newTargetA = oldProjectileDef->GetAtomicMass();
|
||||
G4int newTargetZ = oldProjectileDef->GetAtomicNumber();
|
||||
|
||||
if(newTargetA > 0 && newTargetZ > 0) {
|
||||
G4Nucleus swappedTarget(oldProjectileDef->GetAtomicMass(), oldProjectileDef->GetAtomicNumber());
|
||||
|
||||
// G4cout <<"Original projectile kinE = " << aTrack.GetKineticEnergy() / MeV << G4endl;
|
||||
|
||||
// We need the same energy/nucleon.
|
||||
G4double projectileE = ((aTrack.GetKineticEnergy() / MeV) / newTargetA) * oldTargetA * MeV;
|
||||
|
||||
// G4cout <<"projectileE = " << projectileE << G4endl;
|
||||
G4DynamicParticle swappedProjectileParticle(oldTargetDef, G4ThreeVector(0.0, 0.0, 1.0), projectileE);
|
||||
const G4LorentzVector swapped4Momentum = (swappedProjectileParticle.Get4Momentum()*=toBreit);
|
||||
swappedProjectileParticle.Set4Momentum(swapped4Momentum);
|
||||
const G4HadProjectile swappedProjectile(swappedProjectileParticle);
|
||||
// G4cout <<"New projectile kinE = " << swappedProjectile.GetKineticEnergy() / MeV << G4endl;
|
||||
calincl = new G4InclInput(swappedProjectile, swappedTarget, true);
|
||||
} else {
|
||||
G4cout <<"Badly defined target after swapping. Falling back to normal (non-swapped) mode." << G4endl;
|
||||
calincl = new G4InclInput(aTrack, theNucleus, false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
calincl = new G4InclInput(aTrack, theNucleus, false);
|
||||
}
|
||||
|
||||
G4double eKin;
|
||||
G4double momx = 0.0, momy = 0.0, momz = 0.0;
|
||||
@@ -103,31 +160,64 @@ G4HadFinalState* G4InclLightIonInterface::ApplyYourself(const G4HadProjectile& a
|
||||
toZ.rotateY(-projectileMomentum.theta());
|
||||
G4LorentzRotation toLabFrame = toZ.inverse();
|
||||
|
||||
/*
|
||||
G4cout <<"Projectile theta = " << projectileMomentum.theta() << " phi = " << projectileMomentum.phi() << G4endl;
|
||||
G4cout <<"Projectile momentum "
|
||||
<< "(px = " << projectileMomentum.px()
|
||||
<< ", py = " << projectileMomentum.py()
|
||||
<< ", pz = " << projectileMomentum.pz() << ")" << G4endl;
|
||||
G4cout << "Projectile energy = " << bulletE << " MeV" << G4endl;
|
||||
*/
|
||||
|
||||
G4ReactionProductVector *thePrecoResult = 0;
|
||||
G4ReactionProductVector *theSpectatorPrecoResult = 0;
|
||||
|
||||
theResult.Clear(); // Make sure the output data structure is clean.
|
||||
|
||||
std::vector<G4DynamicParticle*> result; // Temporary list for the results
|
||||
|
||||
// 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};
|
||||
pionMinus = 5, deuteron = 6, triton = 7, he3 = 8, he4 = 9,
|
||||
c12 = -12}; // Carbon beam support.
|
||||
|
||||
// Coding particles for use with INCL4 and ABLA
|
||||
if (aTrack.GetDefinition() == G4Deuteron::Deuteron() ) bulletType = deuteron;
|
||||
if (aTrack.GetDefinition() == G4Triton::Triton() ) bulletType = triton;
|
||||
if (aTrack.GetDefinition() == G4He3::He3() ) bulletType = he3;
|
||||
if (aTrack.GetDefinition() == G4Alpha::Alpha() ) bulletType = he4;
|
||||
G4int bulletType = calincl->bulletType();
|
||||
chargeNumberBalanceInINCL = calincl->targetZ();
|
||||
baryonNumberBalanceInINCL = calincl->targetA();
|
||||
|
||||
for(int i = 0; i < 15; i++) {
|
||||
calincl->f[i] = 0.0; // Initialize INCL input data
|
||||
// G4cout <<"Type of the projectile (INCL projectile code): " << bulletType << G4endl;
|
||||
|
||||
if(bulletType == proton) {
|
||||
chargeNumberBalanceInINCL += 1;
|
||||
baryonNumberBalanceInINCL += 1;
|
||||
} else if(bulletType == neutron) {
|
||||
baryonNumberBalanceInINCL += 1;
|
||||
} else if(bulletType == pionPlus) { //Note: positive pion doesn't contribute to the baryon and charge number counters
|
||||
chargeNumberBalanceInINCL += 1;
|
||||
} else if(bulletType == pionMinus) {
|
||||
chargeNumberBalanceInINCL -= 1;
|
||||
} else if(bulletType == deuteron) {
|
||||
chargeNumberBalanceInINCL += 1;
|
||||
baryonNumberBalanceInINCL += 2;
|
||||
} else if(bulletType == triton) {
|
||||
chargeNumberBalanceInINCL += 1;
|
||||
baryonNumberBalanceInINCL += 3;
|
||||
} else if(bulletType == he3) {
|
||||
chargeNumberBalanceInINCL += 2;
|
||||
baryonNumberBalanceInINCL += 3;
|
||||
} else if(bulletType == he4) {
|
||||
chargeNumberBalanceInINCL += 2;
|
||||
baryonNumberBalanceInINCL += 4;
|
||||
} if(bulletType == c12) {
|
||||
chargeNumberBalanceInINCL += 6;
|
||||
baryonNumberBalanceInINCL += 12;
|
||||
} if(bulletType == -666) {
|
||||
chargeNumberBalanceInINCL += calincl->extendedProjectileZ();
|
||||
baryonNumberBalanceInINCL += calincl->extendedProjectileA();
|
||||
}
|
||||
|
||||
// Check wheter the input is acceptable.
|
||||
if((bulletType != 0) && ((targetA != 1) && (targetZ != 1))) {
|
||||
calincl->f[0] = targetA; // Target mass number
|
||||
calincl->f[1] = targetZ; // Charge number
|
||||
calincl->f[6] = bulletType; // Type
|
||||
calincl->f[2] = bulletE; // Energy [MeV]
|
||||
calincl->f[5] = 1.0; // Time scaling
|
||||
calincl->f[4] = 45.0; // Nuclear potential
|
||||
|
||||
if((bulletType != 0) && ((calincl->targetA() != 1) && (calincl->targetZ() != 1))) {
|
||||
ws->nosurf = -2; // Nucleus surface, -2 = Woods-Saxon
|
||||
ws->xfoisa = 8;
|
||||
ws->npaulstr = 0;
|
||||
@@ -136,9 +226,10 @@ G4HadFinalState* G4InclLightIonInterface::ApplyYourself(const G4HadProjectile& a
|
||||
varntp->ntrack = 0;
|
||||
|
||||
mat->nbmat = 1;
|
||||
mat->amat[0] = int(calincl->f[0]);
|
||||
mat->zmat[0] = int(calincl->f[1]);
|
||||
mat->amat[0] = int(calincl->targetA());
|
||||
mat->zmat[0] = int(calincl->targetA());
|
||||
|
||||
incl->setInput(calincl);
|
||||
incl->initIncl(true);
|
||||
|
||||
while((varntp->ntrack <= 0) && (nTries < maxTries)) { // Loop until we produce real cascade
|
||||
@@ -146,7 +237,7 @@ G4HadFinalState* G4InclLightIonInterface::ApplyYourself(const G4HadProjectile& a
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"G4InclLightIonInterface: Try number = " << nTries << G4endl;
|
||||
}
|
||||
incl->processEventIncl();
|
||||
incl->processEventIncl(calincl);
|
||||
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"G4InclLightIonInterface: number of tracks = " << varntp->ntrack <<G4endl;
|
||||
@@ -157,39 +248,22 @@ G4HadFinalState* G4InclLightIonInterface::ApplyYourself(const G4HadProjectile& a
|
||||
/**
|
||||
* Diagnostic output
|
||||
*/
|
||||
G4cout <<"G4InclLightIonInterface: Bullet type: " << bulletType << G4endl;
|
||||
G4cout <<"G4Incl4AblaCascadeInterface: Bullet energy: " << bulletE << " MeV" << G4endl;
|
||||
|
||||
G4cout <<"G4InclLightIonInterface: Target A: " << targetA << G4endl;
|
||||
G4cout <<"G4InclLightIonInterface: Target Z: " << targetZ << G4endl;
|
||||
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"G4InclLightIonInterface: Bullet type: " << bulletType << G4endl;
|
||||
diagdata <<"G4InclLightIonInterface: Bullet energy: " << bulletE << " MeV" << G4endl;
|
||||
|
||||
diagdata <<"G4InclLightIonInterface: Target A: " << targetA << G4endl;
|
||||
diagdata <<"G4InclLightIonInterface: Target Z: " << targetZ << G4endl;
|
||||
G4cout <<"G4InclLightIonInterface: Bullet type: " << calincl->bulletType() << G4endl;
|
||||
G4cout <<"G4Incl4AblaCascadeInterface: Bullet energy: " << calincl->bulletE() << " MeV" << G4endl;
|
||||
if(bulletType == -666) {
|
||||
G4cout <<" Extended projectile: A = " << calincl->extendedProjectileA()
|
||||
<<" Z = " << calincl->extendedProjectileZ() << G4endl;
|
||||
}
|
||||
|
||||
for(particleI = 0; particleI < varntp->ntrack; particleI++) {
|
||||
G4cout << n << " " << calincl->f[6] << " " << calincl->f[2] << " ";
|
||||
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;
|
||||
// For diagnostic output
|
||||
if(verboseLevel > 3) {
|
||||
diagdata << n << " " << calincl->f[6] << " " << calincl->f[2] << " ";
|
||||
diagdata << varntp->massini << " " << varntp->mzini << " ";
|
||||
diagdata << varntp->exini << " " << varntp->mulncasc << " " << varntp->mulnevap << " " << varntp->mulntot << " ";
|
||||
diagdata << varntp->bimpact << " " << varntp->jremn << " " << varntp->kfis << " " << varntp->estfis << " ";
|
||||
diagdata << varntp->izfis << " " << varntp->iafis << " " << varntp->ntrack << " ";
|
||||
diagdata << varntp->itypcasc[particleI] << " ";
|
||||
diagdata << varntp->avv[particleI] << " " << varntp->zvv[particleI] << " " << varntp->enerj[particleI] << " ";
|
||||
diagdata << varntp->plab[particleI] << " " << varntp->tetlab[particleI] << " " << varntp->philab[particleI] << G4endl;
|
||||
}
|
||||
G4cout <<"G4InclLightIonInterface: Target A: " << calincl->targetA() << G4endl;
|
||||
G4cout <<"G4InclLightIonInterface: Target Z: " << calincl->targetZ() << G4endl;
|
||||
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"G4InclLightIonInterface: Bullet type: " << calincl->bulletType() << G4endl;
|
||||
diagdata <<"G4InclLightIonInterface: Bullet energy: " << calincl->bulletE() << " MeV" << G4endl;
|
||||
|
||||
diagdata <<"G4InclLightIonInterface: Target A: " << calincl->targetA() << G4endl;
|
||||
diagdata <<"G4InclLightIonInterface: Target Z: " << calincl->targetZ() << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,32 +279,42 @@ G4HadFinalState* G4InclLightIonInterface::ApplyYourself(const G4HadProjectile& a
|
||||
|
||||
if(bulletType == proton) {
|
||||
aParticleDefinition = G4Proton::ProtonDefinition();
|
||||
}
|
||||
if(bulletType == neutron) {
|
||||
} else if(bulletType == neutron) {
|
||||
aParticleDefinition = G4Neutron::NeutronDefinition();
|
||||
}
|
||||
if(bulletType == pionPlus) {
|
||||
} else if(bulletType == pionPlus) {
|
||||
aParticleDefinition = G4PionPlus::PionPlusDefinition();
|
||||
}
|
||||
if(bulletType == pionZero) {
|
||||
} else if(bulletType == pionZero) {
|
||||
aParticleDefinition = G4PionZero::PionZeroDefinition();
|
||||
}
|
||||
if(bulletType == pionMinus) {
|
||||
} else if(bulletType == pionMinus) {
|
||||
aParticleDefinition = G4PionMinus::PionMinusDefinition();
|
||||
} else if(bulletType == deuteron) {
|
||||
aParticleDefinition = G4Deuteron::DeuteronDefinition();
|
||||
} else if(bulletType == triton) {
|
||||
aParticleDefinition = G4Triton::TritonDefinition();
|
||||
} else if(bulletType == he3) {
|
||||
aParticleDefinition = G4He3::He3Definition();
|
||||
} else if(bulletType == he4) {
|
||||
aParticleDefinition = G4Alpha::AlphaDefinition();
|
||||
} else { // Particle was not recognized. Probably an unsupported particle was given as input
|
||||
aParticleDefinition = 0;
|
||||
}
|
||||
|
||||
cascadeParticle = new G4DynamicParticle();
|
||||
cascadeParticle->SetDefinition(aParticleDefinition);
|
||||
cascadeParticle->Set4Momentum(aTrack.Get4Momentum());
|
||||
theResult.AddSecondary(cascadeParticle);
|
||||
if(aParticleDefinition != 0) {
|
||||
cascadeParticle = new G4DynamicParticle();
|
||||
cascadeParticle->SetDefinition(aParticleDefinition);
|
||||
cascadeParticle->Set4Momentum(aTrack.Get4Momentum());
|
||||
result.push_back(cascadeParticle);
|
||||
}
|
||||
}
|
||||
|
||||
// Convert INCL4 output to Geant4 compatible data structures.
|
||||
// Elementary particles are converted to G4DynamicParticle.
|
||||
theResult.SetStatusChange(stopAndKill);
|
||||
|
||||
for(particleI = 0; particleI < varntp->ntrack; particleI++) { // Loop through the INCL4+ABLA output.
|
||||
for(particleI = 0; particleI <= varntp->ntrack; particleI++) { // Loop through the INCL4+ABLA output.
|
||||
// Get energy/momentum and construct momentum vector in INCL4 coordinates.
|
||||
// if(varntp->itypcasc[particleI] == -1) continue; // Avoid nucleons that are part of the spectator
|
||||
if(varntp->avv[particleI] == 0 && varntp->zvv[particleI] == 0) continue;
|
||||
momx = varntp->plab[particleI]*std::sin(varntp->tetlab[particleI]*CLHEP::pi/180.0)*std::cos(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;
|
||||
@@ -252,35 +336,40 @@ G4HadFinalState* G4InclLightIonInterface::ApplyYourself(const G4HadProjectile& a
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4Proton::ProtonDefinition(), momDirection, eKin);
|
||||
particleIdentified++;
|
||||
baryonNumberBalanceInINCL -= 1;
|
||||
chargeNumberBalanceInINCL -= 1;
|
||||
}
|
||||
|
||||
if((varntp->avv[particleI] == 1) && (varntp->zvv[particleI] == 0)) { // Neutron
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4Neutron::NeutronDefinition(), momDirection, eKin);
|
||||
particleIdentified++;
|
||||
baryonNumberBalanceInINCL -= 1;
|
||||
}
|
||||
|
||||
if((varntp->avv[particleI] == -1) && (varntp->zvv[particleI] == 1)) { // PionPlus
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4PionPlus::PionPlusDefinition(), momDirection, eKin);
|
||||
particleIdentified++;
|
||||
chargeNumberBalanceInINCL -= 1;
|
||||
}
|
||||
|
||||
if((varntp->avv[particleI] == -1) && (varntp->zvv[particleI] == 0)) { // PionZero
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4PionZero::PionZeroDefinition(), momDirection, eKin);
|
||||
particleIdentified++;
|
||||
chargeNumberBalanceInINCL -= 0;
|
||||
}
|
||||
|
||||
if((varntp->avv[particleI] == -1) && (varntp->zvv[particleI] == -1)) { // PionMinus
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4PionMinus::PionMinusDefinition(), momDirection, eKin);
|
||||
particleIdentified++;
|
||||
chargeNumberBalanceInINCL -= -1;
|
||||
}
|
||||
|
||||
if((varntp->avv[particleI] > 1) && (varntp->zvv[particleI] >= 1)) { // Nucleus fragment
|
||||
G4ParticleDefinition * aIonDef = 0;
|
||||
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
|
||||
G4ParticleDefinition * aIonDef = 0;
|
||||
|
||||
G4int A = G4int(varntp->avv[particleI]);
|
||||
G4int Z = G4int(varntp->zvv[particleI]);
|
||||
@@ -303,12 +392,14 @@ G4HadFinalState* G4InclLightIonInterface::ApplyYourself(const G4HadProjectile& a
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(aIonDef, momDirection, eKin);
|
||||
particleIdentified++;
|
||||
baryonNumberBalanceInINCL -= A;
|
||||
chargeNumberBalanceInINCL -= Z;
|
||||
}
|
||||
}
|
||||
|
||||
if(particleIdentified == 1) { // Particle identified properly.
|
||||
cascadeParticle->Set4Momentum(cascadeParticle->Get4Momentum()*=toLabFrame);
|
||||
theResult.AddSecondary(cascadeParticle); // Put data into G4HadFinalState.
|
||||
cascadeParticle->Set4Momentum(cascadeParticle->Get4Momentum()*=toLabFrame);
|
||||
result.push_back(cascadeParticle);
|
||||
}
|
||||
else { // Particle identification failed.
|
||||
if(particleIdentified > 1) { // Particle was identified as more than one particle type.
|
||||
@@ -322,7 +413,203 @@ G4HadFinalState* G4InclLightIonInterface::ApplyYourself(const G4HadProjectile& a
|
||||
}
|
||||
}
|
||||
|
||||
// Spectator nucleus Fermi break-up
|
||||
if(useFermiBreakup && useProjectileSpectator && varntp->masp > 1) {
|
||||
baryonNumberBalanceInINCL -= G4int(varntp->masp);
|
||||
G4double nuclearMass = G4NucleiProperties::GetNuclearMass(G4int(varntp->masp), G4int(varntp->mzsp)) + varntp->exsp * MeV;
|
||||
// Use momentum scaling to compensate for different masses in G4 and INCL:
|
||||
G4double momentumScaling = G4InclUtils::calculate4MomentumScaling(G4int(varntp->masp),
|
||||
G4int(varntp->mzsp),
|
||||
varntp->exsp,
|
||||
varntp->spectatorT,
|
||||
varntp->spectatorP1,
|
||||
varntp->spectatorP2,
|
||||
varntp->spectatorP3);
|
||||
G4LorentzVector p4(momentumScaling * varntp->spectatorP1 * MeV, momentumScaling * varntp->spectatorP2 * MeV,
|
||||
momentumScaling * varntp->spectatorP3 * MeV,
|
||||
varntp->spectatorT * MeV + nuclearMass);
|
||||
// Four-momentum, baryon number and charge balance:
|
||||
G4LorentzVector fourMomentumBalance = p4;
|
||||
G4int baryonNumberBalance = G4int(varntp->masp);
|
||||
chargeNumberBalanceInINCL -= G4int(varntp->mzsp);
|
||||
G4int chargeBalance = G4int(varntp->mzsp);
|
||||
|
||||
G4LorentzRotation toFragmentZ;
|
||||
// Assume that Fermi breakup uses Z as the direction of the projectile
|
||||
toFragmentZ.rotateZ(-p4.theta());
|
||||
toFragmentZ.rotateY(-p4.phi());
|
||||
G4LorentzRotation toFragmentLab = toFragmentZ.inverse();
|
||||
p4 *= toFragmentZ;
|
||||
|
||||
G4LorentzVector p4rest = p4;
|
||||
p4rest.boost(-p4.boostVector());
|
||||
if(verboseLevel > 0) {
|
||||
G4cout <<"Spectator nucleus:" << G4endl;
|
||||
G4cout <<"p4: " << G4endl;
|
||||
G4cout <<" px: " << p4.px() <<" py: " << p4.py() <<" pz: " << p4.pz() << G4endl;
|
||||
G4cout <<" E = " << p4.e() << G4endl;
|
||||
G4cout <<"p4rest: " << G4endl;
|
||||
G4cout <<" px: " << p4rest.px() <<" py: " << p4rest.py() <<" pz: " << p4rest.pz() << G4endl;
|
||||
G4cout <<" E = " << p4rest.e() << G4endl;
|
||||
}
|
||||
G4Fragment theSpectatorNucleus(G4int(varntp->masp), G4int(varntp->mzsp), p4rest);
|
||||
theSpectatorPrecoResult = thePrecoModel->DeExcite(theSpectatorNucleus);
|
||||
if(theSpectatorPrecoResult != 0) {
|
||||
G4ReactionProductVector::iterator fragment;
|
||||
for(fragment = theSpectatorPrecoResult->begin(); fragment != theSpectatorPrecoResult->end(); fragment++) {
|
||||
G4ParticleDefinition *theFragmentDefinition = (*fragment)->GetDefinition();
|
||||
|
||||
if(theFragmentDefinition != 0) {
|
||||
G4DynamicParticle *theFragment = new G4DynamicParticle(theFragmentDefinition, (*fragment)->GetMomentum());
|
||||
G4LorentzVector labMomentum = theFragment->Get4Momentum();
|
||||
labMomentum.boost(p4.boostVector());
|
||||
labMomentum *= toFragmentLab;
|
||||
labMomentum *= toLabFrame;
|
||||
theFragment->Set4Momentum(labMomentum);
|
||||
fourMomentumBalance -= theFragment->Get4Momentum();
|
||||
baryonNumberBalance -= theFragmentDefinition->GetAtomicMass();
|
||||
chargeBalance -= theFragmentDefinition->GetAtomicNumber();
|
||||
if(verboseLevel > 0) {
|
||||
G4cout <<"Resulting fragment: " << G4endl;
|
||||
G4cout <<" kinetic energy = " << theFragment->GetKineticEnergy() / MeV << " MeV" << G4endl;
|
||||
G4cout <<" momentum = " << theFragment->GetMomentum().mag() / MeV << " MeV" << G4endl;
|
||||
}
|
||||
theResult.AddSecondary(theFragment);
|
||||
} else {
|
||||
G4cout <<"G4InclCascadeInterface: Error. Fragment produced by Fermi break-up does not exist." << G4endl;
|
||||
G4cout <<"Resulting fragment: " << G4endl;
|
||||
G4cout <<" momentum = " << (*fragment)->GetMomentum().mag() / MeV << " MeV" << G4endl;
|
||||
}
|
||||
}
|
||||
delete theSpectatorPrecoResult;
|
||||
theSpectatorPrecoResult = 0;
|
||||
|
||||
if(verboseLevel > 1 && std::abs(fourMomentumBalance.mag() / MeV) > 0.1 * MeV) {
|
||||
G4cout <<"Four-momentum balance after remnant nucleus Fermi break-up:" << G4endl;
|
||||
G4cout <<"Magnitude: " << fourMomentumBalance.mag() / MeV << " MeV" << G4endl;
|
||||
G4cout <<"Vector components (px, py, pz, E) = ("
|
||||
<< fourMomentumBalance.px() << ", "
|
||||
<< fourMomentumBalance.py() << ", "
|
||||
<< fourMomentumBalance.pz() << ", "
|
||||
<< fourMomentumBalance.e() << ")" << G4endl;
|
||||
}
|
||||
if(baryonNumberBalance != 0 && verboseLevel > 1) {
|
||||
G4cout <<"Baryon number balance after remnant nucleus Fermi break-up: " << baryonNumberBalance << G4endl;
|
||||
}
|
||||
if(chargeBalance != 0 && verboseLevel > 1) {
|
||||
G4cout <<"Charge balance after remnant nucleus Fermi break-up: " << chargeBalance << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Finally do Fermi break-up if needed
|
||||
if(varntp->massini > 0) {
|
||||
baryonNumberBalanceInINCL -= G4int(varntp->massini);
|
||||
chargeNumberBalanceInINCL -= G4int(varntp->mzini);
|
||||
// Call Fermi Break-up
|
||||
G4double nuclearMass = G4NucleiProperties::GetNuclearMass(G4int(varntp->massini), G4int(varntp->mzini)) + varntp->exini * MeV;
|
||||
G4LorentzVector fragmentMomentum(varntp->pxrem * MeV, varntp->pyrem * MeV, varntp->pzrem * MeV,
|
||||
varntp->erecrem * MeV + nuclearMass);
|
||||
G4double momentumScaling = G4InclUtils::calculate4MomentumScaling(G4int(varntp->massini), G4int(varntp->mzini),
|
||||
varntp->exini,
|
||||
varntp->erecrem,
|
||||
varntp->pxrem,
|
||||
varntp->pyrem,
|
||||
varntp->pzrem);
|
||||
G4LorentzVector p4(momentumScaling * varntp->pxrem * MeV, momentumScaling * varntp->pyrem * MeV,
|
||||
momentumScaling * varntp->pzrem * MeV,
|
||||
varntp->erecrem + nuclearMass);
|
||||
|
||||
// For four-momentum, baryon number and charge conservation check:
|
||||
G4LorentzVector fourMomentumBalance = p4;
|
||||
G4int baryonNumberBalance = G4int(varntp->massini);
|
||||
G4int chargeBalance = G4int(varntp->mzini);
|
||||
|
||||
G4LorentzRotation toFragmentZ;
|
||||
toFragmentZ.rotateZ(-p4.theta());
|
||||
toFragmentZ.rotateY(-p4.phi());
|
||||
G4LorentzRotation toFragmentLab = toFragmentZ.inverse();
|
||||
p4 *= toFragmentZ;
|
||||
|
||||
G4LorentzVector p4rest = p4;
|
||||
p4rest.boost(-p4.boostVector());
|
||||
if(verboseLevel > 0) {
|
||||
G4cout <<"Cascade remnant nucleus:" << G4endl;
|
||||
G4cout <<"p4: " << G4endl;
|
||||
G4cout <<" px: " << p4.px() <<" py: " << p4.py() <<" pz: " << p4.pz() << G4endl;
|
||||
G4cout <<" E = " << p4.e() << G4endl;
|
||||
|
||||
G4cout <<"p4rest: " << G4endl;
|
||||
G4cout <<" px: " << p4rest.px() <<" py: " << p4rest.py() <<" pz: " << p4rest.pz() << G4endl;
|
||||
G4cout <<" E = " << p4rest.e() << G4endl;
|
||||
}
|
||||
|
||||
G4Fragment theCascadeRemnant(G4int(varntp->massini), G4int(varntp->mzini), p4rest);
|
||||
thePrecoResult = thePrecoModel->DeExcite(theCascadeRemnant);
|
||||
if(thePrecoResult != 0) {
|
||||
G4ReactionProductVector::iterator fragment;
|
||||
for(fragment = thePrecoResult->begin(); fragment != thePrecoResult->end(); fragment++) {
|
||||
G4ParticleDefinition *theFragmentDefinition = (*fragment)->GetDefinition();
|
||||
|
||||
if(theFragmentDefinition != 0) {
|
||||
G4DynamicParticle *theFragment = new G4DynamicParticle(theFragmentDefinition, (*fragment)->GetMomentum());
|
||||
G4LorentzVector labMomentum = theFragment->Get4Momentum();
|
||||
labMomentum.boost(p4.boostVector());
|
||||
labMomentum *= toFragmentLab;
|
||||
labMomentum *= toLabFrame;
|
||||
theFragment->Set4Momentum(labMomentum);
|
||||
fourMomentumBalance -= theFragment->Get4Momentum();
|
||||
baryonNumberBalance -= theFragmentDefinition->GetAtomicMass();
|
||||
chargeBalance -= theFragmentDefinition->GetAtomicNumber();
|
||||
if(verboseLevel > 0) {
|
||||
G4cout <<"Resulting fragment: " << G4endl;
|
||||
G4cout <<" kinetic energy = " << theFragment->GetKineticEnergy() / MeV << " MeV" << G4endl;
|
||||
G4cout <<" momentum = " << theFragment->GetMomentum().mag() / MeV << " MeV" << G4endl;
|
||||
}
|
||||
theResult.AddSecondary(theFragment);
|
||||
} else {
|
||||
G4cout <<"G4InclCascadeInterface: Error. Fragment produced by Fermi break-up does not exist." << G4endl;
|
||||
G4cout <<"Resulting fragment: " << G4endl;
|
||||
G4cout <<" momentum = " << (*fragment)->GetMomentum().mag() / MeV << " MeV" << G4endl;
|
||||
}
|
||||
}
|
||||
delete thePrecoResult;
|
||||
thePrecoResult = 0;
|
||||
|
||||
if(verboseLevel > 1 && std::abs(fourMomentumBalance.mag() / MeV) > 0.1 * MeV) {
|
||||
G4cout <<"Four-momentum balance after remnant nucleus Fermi break-up:" << G4endl;
|
||||
G4cout <<"Magnitude: " << fourMomentumBalance.mag() / MeV << " MeV" << G4endl;
|
||||
G4cout <<"Vector components (px, py, pz, E) = ("
|
||||
<< fourMomentumBalance.px() << ", "
|
||||
<< fourMomentumBalance.py() << ", "
|
||||
<< fourMomentumBalance.pz() << ", "
|
||||
<< fourMomentumBalance.e() << ")" << G4endl;
|
||||
}
|
||||
if(baryonNumberBalance != 0 && verboseLevel > 1) {
|
||||
G4cout <<"Baryon number balance after remnant nucleus Fermi break-up: " << baryonNumberBalance << G4endl;
|
||||
}
|
||||
if(chargeBalance != 0 && verboseLevel > 1) {
|
||||
G4cout <<"Charge balance after remnant nucleus Fermi break-up: " << chargeBalance << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
varntp->ntrack = 0; // Clean up the number of generated particles in the event.
|
||||
|
||||
if(baryonNumberBalanceInINCL != 0 && verboseLevel > 1) {
|
||||
G4cout <<"Event " << eventNumber <<": G4InclLightIonInterface: Baryon number conservation problem in INCL detected!" << G4endl;
|
||||
G4cout <<"Baryon number balance: " << baryonNumberBalanceInINCL << G4endl;
|
||||
if(baryonNumberBalanceInINCL < 0) {
|
||||
G4cout <<"Event " << eventNumber <<": Too many outcoming baryons!" << G4endl;
|
||||
} else if(baryonNumberBalanceInINCL > 0) {
|
||||
G4cout <<"Event " << eventNumber <<": Too few outcoming baryons!" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
if(chargeNumberBalanceInINCL != 0 && verboseLevel > 1) {
|
||||
G4cout <<"Event " << eventNumber <<": G4InclLightIonInterface: Charge number conservation problem in INCL detected!" << G4endl;
|
||||
G4cout <<"Event " << eventNumber <<": Charge number balance: " << chargeNumberBalanceInINCL << G4endl;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Report unsupported features.
|
||||
@@ -334,7 +621,7 @@ G4HadFinalState* G4InclLightIonInterface::ApplyYourself(const G4HadProjectile& a
|
||||
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
|
||||
cascadeParticle = new G4DynamicParticle(theTableOfParticles->FindParticle(aTrack.GetDefinition()), aTrack.Get4Momentum());
|
||||
|
||||
theResult.AddSecondary(cascadeParticle);
|
||||
result.push_back(cascadeParticle);
|
||||
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"G4InclLightIonInterface: Error processing event number (internal) " << eventNumber << G4endl;
|
||||
@@ -347,40 +634,59 @@ G4HadFinalState* G4InclLightIonInterface::ApplyYourself(const G4HadProjectile& a
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"G4InclLightIonInterface: Unknown bullet type" << G4endl;
|
||||
G4cout <<"Bullet particle name: " << cascadeParticle->GetDefinition()->GetParticleName() << G4endl;
|
||||
}
|
||||
}
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"G4InclLightIonInterface: Unknown bullet type" << G4endl;
|
||||
diagdata <<"Bullet particle name: " << cascadeParticle->GetDefinition()->GetParticleName() << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
if((targetA == 1) && (targetZ == 1)) { // Unsupported target
|
||||
if((calincl->targetA() == 1) && (calincl->targetZ() == 1)) { // Unsupported target
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"Unsupported target: " << G4endl;
|
||||
G4cout <<"Target A: " << targetA << G4endl;
|
||||
G4cout <<"TargetZ: " << targetZ << G4endl;
|
||||
G4cout <<"Target A: " << calincl->targetA() << G4endl;
|
||||
G4cout <<"TargetZ: " << calincl->targetZ() << G4endl;
|
||||
}
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"Unsupported target: " << G4endl;
|
||||
diagdata <<"Target A: " << targetA << G4endl;
|
||||
diagdata <<"TargetZ: " << targetZ << G4endl;
|
||||
diagdata <<"Target A: " << calincl->targetA() << G4endl;
|
||||
diagdata <<"TargetZ: " << calincl->targetZ() << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
if(bulletE < 100) { // INCL does not support E < 100 MeV.
|
||||
if(calincl->bulletE() < 100) { // INCL does not support E < 100 MeV.
|
||||
if(verboseLevel > 1) {
|
||||
G4cout <<"Unsupported bullet energy: " << bulletE << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
G4cout <<"Unsupported bullet energy: " << calincl->bulletE() << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
G4cout <<"WARNING: Returning the original bullet with original energy back to Geant4." << G4endl;
|
||||
}
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"Unsupported bullet energy: " << bulletE << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
diagdata <<"Unsupported bullet energy: " << calincl->bulletE() << " MeV. (Lower limit is 100 MeV)." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
if(verboseLevel > 3) {
|
||||
diagdata <<"WARNING: returning the original bullet with original energy back to Geant4." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
// Finally copy the accumulated secondaries into the result collection:
|
||||
G4ThreeVector boostVector = aTrack.Get4Momentum().boostVector();
|
||||
G4LorentzRotation boostBack = toBreit.inverse();
|
||||
|
||||
for(std::vector<G4DynamicParticle*>::iterator i = result.begin(); i != result.end(); ++i) {
|
||||
// If the calculation was performed in inverse kinematics we have to
|
||||
// convert the result back...
|
||||
if(calincl->isInverseKinematics()) {
|
||||
G4LorentzVector mom = (*i)->Get4Momentum();
|
||||
mom.setPz(-1.0 * mom.pz()); // Reverse the z-component of the momentum vector
|
||||
mom *= boostBack;
|
||||
(*i)->Set4Momentum(mom);
|
||||
}
|
||||
theResult.AddSecondary((*i));
|
||||
}
|
||||
|
||||
delete calincl;
|
||||
calincl = 0;
|
||||
return &theResult;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#include "G4InclUtils.hh"
|
||||
#include "G4NucleiProperties.hh"
|
||||
|
||||
G4double G4InclUtils::calculate4MomentumScaling(G4int A, G4int Z, G4double excitationE, G4double kineticE,
|
||||
G4double px, G4double py, G4double pz)
|
||||
{
|
||||
G4double nuclearMass = (G4NucleiProperties::GetNuclearMass(A, Z) / MeV + excitationE) * MeV;
|
||||
return std::sqrt(kineticE*kineticE + 2.0 * kineticE * nuclearMass)/std::sqrt(px*px + py*py + pz*pz);
|
||||
}
|
||||
Reference in New Issue
Block a user