Import Geant4 0.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-01 15:25:35 +02:00
parent 54d6b71f95
commit b97f8d0df7
3237 changed files with 807095 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
# $Id: GNUmakefile,v 2.5 1998/11/06 18:03:57 hpw Exp $
# ----------------------------------------------------------------
# GNUmakefile for hadronic processes library. G.Folger 10-Dec-97.
# ----------------------------------------------------------------
name := G4hadronic
SUBDIRS = management
SUBDIRS += util
SUBDIRS += processes
SUBDIRS += cross_sections
SUBDIRS += stopping
SUBDIRS += models/low_energy
SUBDIRS += models/high_energy
SUBDIRS += models/neutron_hp
SUBDIRS += models/generator/de_excitation
SUBDIRS += models/generator/diffractive_string
SUBDIRS += models/generator/high_energy
SUBDIRS += models/generator/kinetic_model
SUBDIRS += models/generator/management
SUBDIRS += models/generator/pre_equilibrium
SUBDIRS += models/generator/quark_gluon_string
SUBDIRS += models/generator/string_common
SUBDIRS += models/generator/string_fragmentation
SUBDIRS += models/generator/util
SUBLIBS = G4hadronic_mgt G4hadronic_util G4hadronic_proc
SUBLIBS += G4hadronic_xsect G4hadronic_stop
SUBLIBS += G4hadronic_neu G4hadronic_HE G4hadronic_LE
SUBLIBS += G4hadronic_deex G4hadronic_diffstring G4hadronic_HE_gen G4hadronic_kinetic
SUBLIBS += G4hadronic_man_gen G4hadronic_preequ G4hadronic_qgstring G4hadronic_string_common
SUBLIBS += G4hadronic_stringfrag G4hadronic_util_gen
ifndef G4INSTALL
G4INSTALL = ../../..
endif
include $(G4INSTALL)/config/globlib.gmk
@@ -0,0 +1,29 @@
# $Id: GNUmakefile,v 2.0 1998/07/02 16:21:50 gunter Exp $
# ----------------------------------------------------------------
# GNUmakefile for hadronic management library. G.Folger 10-Dec-97
# ----------------------------------------------------------------
name := G4hadronic_xsect
ifndef G4INSTALL
G4INSTALL = ../../../..
endif
include $(G4INSTALL)/config/architecture.gmk
CPPFLAGS += -I$(G4BASE)/global/management/include \
-I$(G4BASE)/global/HEPRandom/include \
-I$(G4BASE)/global/HEPGeometry/include \
-I$(G4BASE)/geometry/management/include \
-I$(G4BASE)/geometry/volumes/include \
-I$(G4BASE)/track/include \
-I$(G4BASE)/particles/management/include \
-I$(G4BASE)/particles/leptons/include \
-I$(G4BASE)/particles/bosons/include \
-I$(G4BASE)/particles/hadrons/mesons/include \
-I$(G4BASE)/particles/hadrons/barions/include \
-I$(G4BASE)/particles/hadrons/ions/include \
-I$(G4BASE)/processes/management/include \
-I$(G4BASE)/materials/include
include $(G4INSTALL)/config/common.gmk
@@ -0,0 +1,65 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4CrossSectionDataStore.hh,v 2.0 1998/07/02 16:21:37 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// GEANT4 physics class: G4CrossSectionDataStore -- header file
// F.W. Jones, TRIUMF, 19-NOV-97
//
#ifndef G4CrossSectionDataStore_h
#define G4CrossSectionDataStore_h 1
#include "G4ParticleDefinition.hh"
#include "G4DynamicParticle.hh"
#include "G4Element.hh"
#include "G4VCrossSectionDataSet.hh"
class G4CrossSectionDataStore
{
public:
G4CrossSectionDataStore() :
NDataSetList(0), verboseLevel(0)
{
}
~G4CrossSectionDataStore()
{
}
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*);
void AddDataSet(G4VCrossSectionDataSet*);
void BuildPhysicsTable(const G4ParticleDefinition&);
void DumpPhysicsTable(const G4ParticleDefinition&);
void SetVerboseLevel(G4int value)
{
verboseLevel = value;
}
G4int GetVerboseLevel(G4int value)
{
return verboseLevel;
}
private:
enum { NDataSetMax = 100 };
G4VCrossSectionDataSet* DataSetList[NDataSetMax];
G4int NDataSetList;
G4int verboseLevel;
};
#endif
@@ -0,0 +1,64 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronCaptureDataSet.hh,v 2.0 1998/07/02 16:21:39 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// GEANT4 physics class: G4HadronCaptureDataSet -- header file
// F.W. Jones, TRIUMF, 19-MAY-98
//
#ifndef G4HadronCaptureDataSet_h
#define G4HadronCaptureDataSet_h 1
#include "G4VCrossSectionDataSet.hh"
#include "G4HadronCrossSections.hh"
#include "G4DynamicParticle.hh"
#include "G4Element.hh"
class G4HadronCaptureDataSet : public G4VCrossSectionDataSet
{
public:
G4HadronCaptureDataSet()
{
theHadronCrossSections = G4HadronCrossSections::Instance();
}
~G4HadronCaptureDataSet()
{
}
G4bool IsApplicable(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
return theHadronCrossSections->IsApplicable(aParticle, anElement);
}
G4double GetCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
return theHadronCrossSections->GetCaptureCrossSection(aParticle,
anElement);
}
void BuildPhysicsTable(const G4ParticleDefinition&)
{
}
void DumpPhysicsTable(const G4ParticleDefinition&)
{
}
private:
G4HadronCrossSections* theHadronCrossSections;
};
#endif
@@ -0,0 +1,191 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronCrossSections.hh,v 2.1 1998/11/07 03:27:24 fjones Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// GEANT4 Hadron physics class -- header file
// F.W. Jones, TRIUMF, 03-DEC-96
//
// This class encapsulates cross section data and interpolations
// from the Geant3/Gheisha routine GHESIG.
// For further comments see G4HadronCrossSections.cc.
//
// Note: this is implemented as a SINGLETON class
//
// 27-MAR-97 FWJ: first version for Alpha release
// 14-APR-97 FWJ: class name changed from G4LCrossSectionData
// to G4HadronicCrossSections
// 14-APR-98 FWJ: rewritten as class G4HadronCrossSections
// and adapted to G4CrossSectionDataSet/DataStore class design.
// 26-JUN-98 FWJ: added elastic/inelastic caching to improve performance.
// 06-NOV-98 FWJ: added first-order correction for low-energy
// inelastic cross sections
//
#ifndef G4HadronCrossSections_h
#define G4HadronCrossSections_h 1
#include "globals.hh"
#include "G4Element.hh"
#include "G4VProcess.hh"
#include "G4DynamicParticle.hh"
//#include "G4ParticleTypes.hh"
#include "G4PionPlus.hh"
#include "G4PionZero.hh"
#include "G4PionMinus.hh"
#include "G4KaonPlus.hh"
#include "G4KaonZeroShort.hh"
#include "G4KaonZeroLong.hh"
#include "G4KaonMinus.hh"
#include "G4Proton.hh"
#include "G4AntiProton.hh"
#include "G4Neutron.hh"
#include "G4Deuteron.hh"
#include "G4Triton.hh"
#include "G4Alpha.hh"
#include "G4AntiNeutron.hh"
#include "G4Lambda.hh"
#include "G4AntiLambda.hh"
#include "G4SigmaPlus.hh"
#include "G4SigmaZero.hh"
#include "G4SigmaMinus.hh"
#include "G4AntiSigmaPlus.hh"
#include "G4AntiSigmaZero.hh"
#include "G4AntiSigmaMinus.hh"
#include "G4XiZero.hh"
#include "G4XiMinus.hh"
#include "G4AntiXiZero.hh"
#include "G4AntiXiMinus.hh"
#include "G4OmegaMinus.hh"
#include "G4AntiOmegaMinus.hh"
//#include "G4LPhysicsFreeVector.hh"
enum { TSIZE=41, PSIZE=35, NELAB=17, NCNLW=15, NFISS=21 };
class G4HadronCrossSections
{
public:
G4HadronCrossSections() : verboseLevel(0)
{
}
~G4HadronCrossSections()
{
}
static G4HadronCrossSections* Instance()
{
if (!theInstance) theInstance = new G4HadronCrossSections();
return theInstance;
}
G4bool IsApplicable(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
return (GetParticleCode(aParticle) > 0);
}
G4double GetElasticCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
if (aParticle->GetDefinition() != prevParticleDefinition ||
anElement != prevElement ||
aParticle->GetKineticEnergy() != prevKineticEnergy)
CalcScatteringCrossSections(aParticle, anElement);
return sigelastic;
}
G4double GetInelasticCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
if (aParticle->GetDefinition() != prevParticleDefinition ||
anElement != prevElement ||
aParticle->GetKineticEnergy() != prevKineticEnergy)
CalcScatteringCrossSections(aParticle, anElement);
return siginelastic;
}
G4double GetCaptureCrossSection(const G4DynamicParticle*,
const G4Element*);
G4double GetFissionCrossSection(const G4DynamicParticle*,
const G4Element*);
static void SetCorrectInelasticNearZero(G4bool value)
{
correctInelasticNearZero = value;
}
static G4bool GetCorrectInelasticNearZero()
{
return correctInelasticNearZero;
}
void SetVerboseLevel(G4int value)
{
verboseLevel = value;
}
G4int GetVerboseLevel()
{
return verboseLevel;
}
private:
G4int GetParticleCode(const G4DynamicParticle*);
void CalcScatteringCrossSections(const G4DynamicParticle*,
const G4Element*);
static G4HadronCrossSections* theInstance;
G4double sigelastic, siginelastic;
G4ParticleDefinition* prevParticleDefinition;
G4Element* prevElement;
G4double prevKineticEnergy;
static G4bool correctInelasticNearZero;
G4int verboseLevel;
// The following arrays are declared static to allow the use of initializers.
// They are initialized in G4HadronCrossSections.cc, thus providing some
// data hiding.
static G4float plab[TSIZE];
static G4float csel[PSIZE][TSIZE];
static G4float csin[PSIZE][TSIZE];
static G4float cspiel[3][TSIZE];
static G4float cspiin[3][TSIZE];
static G4float cspnel[3][TSIZE];
static G4float cspnin[3][TSIZE];
static G4float elab[NELAB];
static G4float cnlwat[NCNLW], cnlwel[NCNLW][NELAB], cnlwin[NCNLW][NELAB];
static G4float cscap[100];
static G4float ekfiss[NFISS], csfiss[4][NFISS];
static G4float alpha[PSIZE], alphac[TSIZE];
static G4float partel[35], partin[35];
static G4int icorr[35], intrc[35];
static G4float csa[4];
static G4int ipart2[7];
};
#endif
@@ -0,0 +1,64 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronElasticDataSet.hh,v 2.0 1998/07/02 16:21:41 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// GEANT4 physics class: G4HadronElasticDataSet -- header file
// F.W. Jones, TRIUMF, 28-JAN-97
//
#ifndef G4HadronElasticDataSet_h
#define G4HadronElasticDataSet_h 1
#include "G4VCrossSectionDataSet.hh"
#include "G4HadronCrossSections.hh"
#include "G4DynamicParticle.hh"
#include "G4Element.hh"
class G4HadronElasticDataSet : public G4VCrossSectionDataSet
{
public:
G4HadronElasticDataSet()
{
theHadronCrossSections = G4HadronCrossSections::Instance();
}
~G4HadronElasticDataSet()
{
}
G4bool IsApplicable(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
return theHadronCrossSections->IsApplicable(aParticle, anElement);
}
G4double GetCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
return theHadronCrossSections->GetElasticCrossSection(aParticle,
anElement);
}
void BuildPhysicsTable(const G4ParticleDefinition&)
{
}
void DumpPhysicsTable(const G4ParticleDefinition&)
{
}
private:
G4HadronCrossSections* theHadronCrossSections;
};
#endif
@@ -0,0 +1,64 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronFissionDataSet.hh,v 2.0 1998/07/02 16:21:43 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// GEANT4 physics class: G4HadronFissionDataSet -- header file
// F.W. Jones, TRIUMF, 19-MAY-98
//
#ifndef G4HadronFissionDataSet_h
#define G4HadronFissionDataSet_h 1
#include "G4VCrossSectionDataSet.hh"
#include "G4HadronCrossSections.hh"
#include "G4DynamicParticle.hh"
#include "G4Element.hh"
class G4HadronFissionDataSet : public G4VCrossSectionDataSet
{
public:
G4HadronFissionDataSet()
{
theHadronCrossSections = G4HadronCrossSections::Instance();
}
~G4HadronFissionDataSet()
{
}
G4bool IsApplicable(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
return theHadronCrossSections->IsApplicable(aParticle, anElement);
}
G4double GetCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
return theHadronCrossSections->GetFissionCrossSection(aParticle,
anElement);
}
void BuildPhysicsTable(const G4ParticleDefinition&)
{
}
void DumpPhysicsTable(const G4ParticleDefinition&)
{
}
private:
G4HadronCrossSections* theHadronCrossSections;
};
#endif
@@ -0,0 +1,64 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronInelasticDataSet.hh,v 2.0 1998/07/02 16:21:46 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// GEANT4 physics class: G4HadronInelasticDataSet -- header file
// F.W. Jones, TRIUMF, 19-MAY-98
//
#ifndef G4HadronInelasticDataSet_h
#define G4HadronInelasticDataSet_h 1
#include "G4VCrossSectionDataSet.hh"
#include "G4HadronCrossSections.hh"
#include "G4DynamicParticle.hh"
#include "G4Element.hh"
class G4HadronInelasticDataSet : public G4VCrossSectionDataSet
{
public:
G4HadronInelasticDataSet()
{
theHadronCrossSections = G4HadronCrossSections::Instance();
}
~G4HadronInelasticDataSet()
{
}
G4bool IsApplicable(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
return theHadronCrossSections->IsApplicable(aParticle, anElement);
}
G4double GetCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
return theHadronCrossSections->GetInelasticCrossSection(aParticle,
anElement);
}
void BuildPhysicsTable(const G4ParticleDefinition&)
{
}
void DumpPhysicsTable(const G4ParticleDefinition&)
{
}
private:
G4HadronCrossSections* theHadronCrossSections;
};
#endif
@@ -0,0 +1,37 @@
// by JPW, working, but to be cleaned up. @@@@
#ifndef G4ProtonInelasticCrossSection_h
#define G4ProtonInelasticCrossSection_h
#include "globals.hh"
#include "G4Proton.hh"
#include "G4VCrossSectionDataSet.hh"
class G4ProtonInelasticCrossSection : public G4VCrossSectionDataSet
{
public:
virtual
G4bool IsApplicable(const G4DynamicParticle* aPart, const G4Element*)
{
G4bool result = false;
if(( aPart->GetDefinition()==G4Proton::Proton()) &&
( aPart->GetKineticEnergy()<20*GeV) ) result = true;
return result;
}
virtual
G4double GetCrossSection(const G4DynamicParticle*, const G4Element*);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&)
{}
virtual
void DumpPhysicsTable(const G4ParticleDefinition&)
{G4cout << "G4ProtonInelasticCrossSection: uses formula"<<endl;}
};
#endif
@@ -0,0 +1,63 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VCrossSectionDataSet.hh,v 2.1 1998/07/13 19:06:01 jwellisc Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// GEANT4 physics abstract class: G4VCrossSectionData -- header file
// F.W. Jones, TRIUMF, 20-JAN-97
//
#ifndef G4VCrossSectionDataSet_h
#define G4VCrossSectionDataSet_h 1
#include "G4DynamicParticle.hh"
#include "G4Element.hh"
class G4VCrossSectionDataSet
{
public:
G4VCrossSectionDataSet() :
verboseLevel(0)
{
}
virtual ~G4VCrossSectionDataSet()
{
}
virtual
G4bool IsApplicable(const G4DynamicParticle*, const G4Element*) = 0;
virtual
G4double GetCrossSection(const G4DynamicParticle*, const G4Element*) = 0;
virtual
void BuildPhysicsTable(const G4ParticleDefinition&) = 0;
virtual
void DumpPhysicsTable(const G4ParticleDefinition&) = 0;
void SetVerboseLevel(G4int value)
{
verboseLevel = value;
}
G4int GetVerboseLevel(G4int value)
{
return verboseLevel;
}
protected:
G4int verboseLevel;
};
#endif
@@ -0,0 +1,75 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4CrossSectionDataStore.cc,v 2.0 1998/07/02 16:21:51 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// GEANT4 physics class: G4CrossSectionDataStore
// F.W. Jones, TRIUMF, 19-NOV-97
//
#include "G4CrossSectionDataStore.hh"
G4double
G4CrossSectionDataStore::GetCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
if (NDataSetList == 0) {
G4Exception("G4CrossSectionDataStore: no data sets registered");
return DBL_MIN;
}
for (G4int i = NDataSetList-1; i >= 0; i--) {
if (DataSetList[i]->IsApplicable(aParticle, anElement))
return DataSetList[i]->GetCrossSection(aParticle, anElement);
}
G4Exception("G4CrossSectionDataStore: no applicable data set found "
"for particle/element");
return DBL_MIN;
}
void
G4CrossSectionDataStore::AddDataSet(G4VCrossSectionDataSet* aDataSet)
{
if (NDataSetList == NDataSetMax) {
G4Exception("G4CrossSectionDataStore::AddDataSet: "
"reached maximum number of data sets");
return;
}
DataSetList[NDataSetList] = aDataSet;
NDataSetList++;
}
void
G4CrossSectionDataStore::
BuildPhysicsTable(const G4ParticleDefinition& aParticleType)
{
if (NDataSetList == 0) {
G4Exception("G4CrossSectionDataStore: no data sets registered");
return;
}
for (G4int i = NDataSetList-1; i >= 0; i--) {
DataSetList[i]->BuildPhysicsTable(aParticleType);
}
}
void
G4CrossSectionDataStore::
DumpPhysicsTable(const G4ParticleDefinition& aParticleType)
{
if (NDataSetList == 0) {
G4Exception("G4CrossSectionDataStore: no data sets registered");
return;
}
for (G4int i = NDataSetList-1; i >= 0; i--) {
DataSetList[i]->DumpPhysicsTable(aParticleType);
}
}
@@ -0,0 +1,16 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronCaptureDataSet.cc,v 2.0 1998/07/02 16:21:53 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// G4 Physics class: HadronCaptureDataSet for cross sections
// F.W. Jones, TRIUMF, 19-MAY-98
//
#include "G4HadronCaptureDataSet.hh"
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,16 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronElasticDataSet.cc,v 2.0 1998/07/02 16:21:56 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// G4 Physics class: HadronElasticDataSet for cross sections
// F.W. Jones, TRIUMF, 28-JAN-98
//
#include "G4HadronElasticDataSet.hh"
@@ -0,0 +1,16 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronFissionDataSet.cc,v 2.0 1998/07/02 16:21:58 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// G4 Physics class: HadronFissionDataSet for cross sections
// F.W. Jones, TRIUMF, 19-MAY-98
//
#include "G4HadronFissionDataSet.hh"
@@ -0,0 +1,16 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronInelasticDataSet.cc,v 2.0 1998/07/02 16:21:59 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// G4 Physics class: HadronInelasticDataSet for cross sections
// F.W. Jones, TRIUMF, 19-MAY-98
//
#include "G4HadronInelasticDataSet.hh"
@@ -0,0 +1,37 @@
// By JPW, working, but to be cleaned up. @@@
#include "G4ProtonInelasticCrossSection.hh"
#include "globals.hh"
G4double G4ProtonInelasticCrossSection::
GetCrossSection(const G4DynamicParticle* aPart, const G4Element* anEle)
{
G4double atomicNumber = anEle->GetN();
G4double nOfProtons = anEle->GetZ();
G4double nOfNeutrons = atomicNumber-nOfProtons;
G4double kineticEnergy = aPart->GetKineticEnergy()/GeV;
G4double a = atomicNumber;
const G4double nuleonRadius=1.36E-15;
const G4double pi=3.14159265;
G4double fac=pi*nuleonRadius*nuleonRadius;
G4double b0=2.247-0.915*(1-pow(a,-0.3333));
G4double fac1=b0*(1-pow(a,-0.3333));
G4double fac2=1.;
if(nOfNeutrons>1.5) fac2=log((nOfNeutrons));
G4double crossSection = 1E31*fac*fac2*(1+pow(a,0.3333)-fac1);
// high energy correction
crossSection = (1-0.15*exp(-kineticEnergy))*crossSection/(1.00-0.0007*a);
// first try on low energies: rise
G4double ff1= 0.70-0.002*a; // slope of the drop at medium energies.
G4double ff2= 1.00+1/a; // start of the slope.
G4double ff3= 0.8+18/a-0.002*a; // stephight
fac=1-(1/(1+exp(-8*ff1*(log10(kineticEnergy)+1.37*ff2))));
crossSection = crossSection*(1+ff3*fac);
// low energy return to zero
ff1=1.-1/a-0.001*a; // slope of the rise
ff2=1.17-2.7/a-0.0014*a; // start of the rise
fac=-8.*ff1*(log10(kineticEnergy)+2.0*ff2);
fac=1/(1+exp(fac));
crossSection = crossSection*fac;
return crossSection*millibarn;
}
@@ -0,0 +1,16 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VCrossSectionDataSet.cc,v 2.0 1998/07/02 16:22:01 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// GEANT4 physics abstract class: G4VCrossSectionDataSet
// F.W. Jones, TRIUMF, 20-JAN-97
//
#include "G4VCrossSectionDataSet.hh"
@@ -0,0 +1,31 @@
# $Id: GNUmakefile,v 2.0 1998/07/02 16:22:17 gunter Exp $
# ----------------------------------------------------------------
# GNUmakefile for hadronic management library. G.Folger 10-Dec-97
# ----------------------------------------------------------------
name := G4hadronic_mgt
ifndef G4INSTALL
G4INSTALL = ../../../..
endif
include $(G4INSTALL)/config/architecture.gmk
CPPFLAGS += -I$(G4BASE)/global/management/include \
-I$(G4BASE)/global/HEPRandom/include \
-I$(G4BASE)/global/HEPGeometry/include \
-I$(G4BASE)/track/include \
-I$(G4BASE)/geometry/volumes/include \
-I$(G4BASE)/geometry/management/include \
-I$(G4BASE)/processes/hadronic/util/include \
-I$(G4BASE)/processes/hadronic/cross_sections/include \
-I$(G4BASE)/particles/management/include \
-I$(G4BASE)/particles/leptons/include \
-I$(G4BASE)/particles/bosons/include \
-I$(G4BASE)/particles/hadrons/mesons/include \
-I$(G4BASE)/particles/hadrons/barions/include \
-I$(G4BASE)/particles/hadrons/ions/include \
-I$(G4BASE)/processes/management/include \
-I$(G4BASE)/materials/include
include $(G4INSTALL)/config/common.gmk
@@ -0,0 +1,68 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4EnergyRangeManager.hh,v 2.0 1998/07/02 16:22:08 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Process: Energy Range Manager
// original by H.P. Wellisch
// modified by J.L. Chuma, TRIUMF, 22-Nov-1996
// Last modified: 24-Mar-1997
#ifndef G4EnergyRangeManager_h
#define G4EnergyRangeManager_h 1
#include "G4HadronicInteraction.hh"
class G4EnergyRangeManager
{
public:
G4EnergyRangeManager()
{ theHadronicInteractionCounter = 0; }
~G4EnergyRangeManager()
{ }
G4EnergyRangeManager( const G4EnergyRangeManager &right );
G4EnergyRangeManager & operator=( const G4EnergyRangeManager &right );
public:
inline G4bool operator==( const G4EnergyRangeManager &right ) const
{ return ( this == (G4EnergyRangeManager *) &right ); }
inline G4bool operator!=( const G4EnergyRangeManager &right ) const
{ return ( this != (G4EnergyRangeManager *) &right ); }
void RegisterMe( G4HadronicInteraction *a );
G4HadronicInteraction *GetHadronicInteraction(
const G4double kineticEnergy,
const G4Material *aMaterial,
const G4Element *anElement ) const;
private:
inline G4int GetHadronicInteractionCounter() const
{ return theHadronicInteractionCounter; }
private:
enum { MAX_NUMBER_OF_MODELS = 100 };
G4HadronicInteraction *
theHadronicInteraction[ MAX_NUMBER_OF_MODELS ];
G4int theHadronicInteractionCounter;
};
#endif
@@ -0,0 +1,89 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronInelasticProcess.hh,v 2.1 1998/07/13 19:02:45 jwellisc Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Inelastic Process class
// The specific particle inelastic processes derive from this class
// This is an abstract base class, since the pure virtual function
// PostStepDoIt has not been defined yet.
//
// J.L. Chuma, TRIUMF, 10-Mar-1997
// Last modified: 27-Mar-1997
//
// 14-APR-98 F.W.Jones: variant G4HadronInelastic process for
// G4CrossSectionDataSet/DataStore class design.
// 29-JUN-98 F.W.Jones: default data set G4HadronCrossSections
//
#ifndef G4HadronInelasticProcess_h
#define G4HadronInelasticProcess_h 1
#include "G4HadronicProcess.hh"
//#include "G4LPhysicsFreeVector.hh"
#include "G4HadronCrossSections.hh"
#include "G4CrossSectionDataStore.hh"
#include "G4HadronInelasticDataSet.hh"
class G4HadronInelasticProcess : public G4HadronicProcess
{
public:
G4HadronInelasticProcess(
const G4String &processName,
G4ParticleDefinition *aParticle ) :
G4HadronicProcess( processName ),
theCrossSectionDataStore(new G4CrossSectionDataStore)
{
theCrossSectionDataStore->AddDataSet(new G4HadronInelasticDataSet);
theParticle = aParticle;
// BuildThePhysicsTable();
}
virtual ~G4HadronInelasticProcess()
{ }
G4double GetMeanFreePath(
const G4Track &aTrack,
G4double previousStepSize,
G4ForceCondition *condition );
void BuildThePhysicsTable();
G4double GetMicroscopicCrossSection(
const G4DynamicParticle *aParticle,
const G4Element *anElement);
G4VParticleChange *PostStepDoIt(
const G4Track &aTrack, const G4Step &aStep )
{
SetDispatch( this );
return G4HadronicProcess::GeneralPostStepDoIt( aTrack, aStep );
}
void SetCrossSectionDataStore(G4CrossSectionDataStore* aDataStore)
{
theCrossSectionDataStore = aDataStore;
}
G4CrossSectionDataStore* GetCrossSectionDataStore()
{
return theCrossSectionDataStore;
}
protected:
// G4HadronicCrossSections theCrossSectionData;
G4CrossSectionDataStore* theCrossSectionDataStore;
G4ParticleDefinition *theParticle;
};
#endif
@@ -0,0 +1,172 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronicInteraction.hh,v 2.3 1998/08/24 11:47:22 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Interaction abstract base class
// This class is the base class for the model classes.
// It sorts out the energy-range for the models and provides
// class utilities.
// original by H.P. Wellisch
// Modified by J.L.Chuma, TRIUMF, 21-Mar-1997
// Last modified: 3-Apr-1997
// Added units to energy initialization: J.L. Chuma 04-Apr-97
// Modified by J.L.Chuma, 05-May-97 to Initialize theBlockedCounter
// Modified by J.L.Chuma, 08-Jul-97 to implement the Nucleus changes
#ifndef G4HadronicInteraction_h
#define G4HadronicInteraction_h 1
#include "G4ParticleChange.hh"
#include "G4DynamicParticle.hh"
#include "G4ReactionDynamics.hh"
#include "G4Material.hh"
#include "G4Nucleus.hh"
#include "G4Track.hh"
class G4HadronicInteraction
{
public:
G4HadronicInteraction() :
verboseLevel(0), theMinEnergy(0.0*GeV), theMaxEnergy(25.0*GeV),
theBlockedCounter(0), theMinCounter(0), theMaxCounter(0),
theMinCounterElements(0), theMaxCounterElements(0),
theBlockedCounterElements(0)
{ }
virtual ~G4HadronicInteraction()
{ }
private:
inline G4HadronicInteraction(
const G4HadronicInteraction &right )
{ *this = right; }
inline const G4HadronicInteraction & operator=(
const G4HadronicInteraction &right )
{
if(this!=&right) G4Exception("unintended use of G4HadronicInteraction::operator=");
return right;
}
public:
inline G4bool operator==(
const G4HadronicInteraction &right ) const
{ return ( this == (G4HadronicInteraction *) &right ); }
inline G4bool operator!=(
const G4HadronicInteraction &right ) const
{ return ( this != (G4HadronicInteraction *) &right ); }
inline G4double GetMinEnergy() const
{ return theMinEnergy; }
G4double GetMinEnergy( const G4Material *aMaterial,
const G4Element *anElement ) const;
inline void SetMinEnergy( const G4double anEnergy )
{ theMinEnergy = anEnergy; }
void SetMinEnergy( G4double anEnergy,
G4Element *anElement );
void SetMinEnergy( G4double anEnergy,
G4Material *aMaterial );
inline G4double GetMaxEnergy() const
{ return theMaxEnergy; }
G4double GetMaxEnergy( const G4Material *aMaterial,
const G4Element *anElement ) const;
inline void SetMaxEnergy( const G4double anEnergy )
{ theMaxEnergy = anEnergy; }
void SetMaxEnergy( G4double anEnergy,
G4Element *anElement );
void SetMaxEnergy( G4double anEnergy,
G4Material *aMaterial );
inline const G4HadronicInteraction *GetMyPointer() const
{ return this; }
inline G4int GetVerboseLevel() const
{ return verboseLevel; }
inline void SetVerboseLevel( G4int value )
{ verboseLevel = value; }
virtual G4VParticleChange *ApplyYourself(
const G4Track &aTrack, G4Nucleus & targetNucleus ) = 0;
void DeActivateFor( G4Material *aMaterial );
void DeActivateFor( G4Element *anElement );
G4bool IsBlocked( const G4Material *aMaterial ) const;
G4bool IsBlocked( const G4Element *anElement) const;
protected:
G4ParticleChange theParticleChange;
// the G4VParticleChange object which is modified and returned
// by address by the ApplyYourself method,
// (instead of aParticleChange as found in G4VProcess)
G4int verboseLevel;
// control flag for output messages
// 0: silent
// 1: warning messages
// 2: more
// (instead of verboseLevel as found in G4VProcess)
G4ReactionDynamics theReactionDynamics;
// these two have global validity
// units are assumed to be MeV
G4double theMinEnergy;
G4double theMaxEnergy;
private:
enum { MAX_LIST_SIZE = 500 };
// the following allow for restrictions/additions for specific materials
G4double theMinEnergyList[ MAX_LIST_SIZE ];
G4Material *theMinMaterials[ MAX_LIST_SIZE ];
G4int theMinCounter;
G4double theMaxEnergyList[ MAX_LIST_SIZE ];
G4Material *theMaxMaterials[ MAX_LIST_SIZE ];
G4int theMaxCounter;
G4Material *theBlockedList[ MAX_LIST_SIZE ];
G4int theBlockedCounter;
// the following allow for restrictions/additions for specific elements
G4double theMinEnergyListElements[ MAX_LIST_SIZE ];
G4Element *theMinElements[ MAX_LIST_SIZE ];
G4int theMinCounterElements;
G4double theMaxEnergyListElements[ MAX_LIST_SIZE ];
G4Element *theMaxElements[ MAX_LIST_SIZE ];
G4int theMaxCounterElements;
G4Element *theBlockedListElements[ MAX_LIST_SIZE ];
G4int theBlockedCounterElements;
};
#endif
@@ -0,0 +1,106 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronicProcess.hh,v 2.0 1998/07/02 16:22:13 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
// This is the top level Hadronic Process class
// The inelastic, elastic, capture, and fission processes
// should derive from this class
// This is an abstract base class, since the pure virtual function
// PostStepDoIt has not been defined yet.
// Note: there is no .cc file
//
// original by H.P.Wellisch
// J.L. Chuma, TRIUMF, 10-Mar-1997
// Last modified: 04-Apr-1997
#ifndef G4HadronicProcess_h
#define G4HadronicProcess_h 1
#include "globals.hh"
#include "G4VDiscreteProcess.hh"
#include "G4EnergyRangeManager.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4Element.hh"
#include "G4ElementVector.hh"
#include "G4ElementTable.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsVector.hh"
#include "G4Nucleus.hh"
#include "G4ReactionProduct.hh"
class G4HadronicProcess : public G4VDiscreteProcess
{
public:
G4HadronicProcess( const G4String &processName = "Hadronic" ) :
G4VDiscreteProcess( processName )
{ }
virtual ~G4HadronicProcess()
{ }
inline void RegisterMe( G4HadronicInteraction *a )
{ GetManagerPointer()->RegisterMe( a ); }
inline G4HadronicInteraction *GetHadronicInteraction()
{ return theInteraction; }
inline G4HadronicInteraction *ChooseHadronicInteraction(
G4double kineticEnergy, G4Material *aMaterial, G4Element *anElement )
{ return GetManagerPointer()->
GetHadronicInteraction( kineticEnergy, aMaterial, anElement ); }
inline const G4EnergyRangeManager &GetEnergyRangeManager() const
{ return theEnergyRangeManager; }
inline void SetEnergyRangeManager( const G4EnergyRangeManager &value )
{ theEnergyRangeManager = value; }
G4Element * ChooseAandZ( const G4DynamicParticle *aParticle,
const G4Material *aMaterial );
virtual G4VParticleChange *PostStepDoIt( const G4Track &aTrack,
const G4Step &aStep ) = 0;
G4VParticleChange *GeneralPostStepDoIt( const G4Track &aTrack,
const G4Step &aStep );
void SetDispatch( G4HadronicProcess *value )
{ dispatch=value; }
virtual G4double GetMicroscopicCrossSection( const G4DynamicParticle *aParticle,
const G4Element *anElement ) = 0;
G4double GetCurrentZ()
{ return currentZ; }
G4double GetCurrentN()
{ return currentN; }
protected:
inline G4EnergyRangeManager *GetManagerPointer()
{ return &theEnergyRangeManager; }
G4EnergyRangeManager theEnergyRangeManager;
G4HadronicInteraction *theInteraction;
G4Nucleus targetNucleus;
private:
G4double currentZ;
G4double currentN;
G4HadronicProcess *dispatch;
};
#endif
@@ -0,0 +1,82 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4InelasticInteraction.hh,v 2.3 1998/07/13 19:03:32 jwellisc Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Process: Inelastic Interaction
// This class is an abstract base class, since the pure virtual
// function ApplyYourself has not been defined yet.
// original by H.P. Wellisch
// Modified by J.L. Chuma, TRIUMF, 22-Nov-1996
// Modified by J.L. Chuma 27-Mar-1997
// Modified by J.L. Chuma 30-Apr-1997
// Modified by J.L. Chuma 05-Aug-1997 to pass the original incident particle to
// CalculateMomenta
// Modified by J.L. Chuma 05-Jun-1998 to include quasiElastic flag to allow for
// TwoBody to be called directly, bypassing
// TwoCluster, and allowing TwoCluster to be
// called with no secondaries
#ifndef G4InelasticInteraction_h
#define G4InelasticInteraction_h 1
#include "globals.hh"
#include "G4FastVector.hh"
#include "G4HadronicInteraction.hh"
#include "G4ReactionProduct.hh"
#include "G4ParticleTypes.hh"
#include "Randomize.hh"
class G4InelasticInteraction : public G4HadronicInteraction
{
public:
G4InelasticInteraction() : G4HadronicInteraction()
{ }
virtual ~G4InelasticInteraction()
{ }
protected:
G4double Pmltpc( G4int np, G4int nm, G4int nz, G4int n,
G4double b, G4double c );
G4bool MarkLeadingStrangeParticle( const G4ReactionProduct &currentParticle,
const G4ReactionProduct &targetParticle,
G4ReactionProduct &leadParticle );
void SetUpPions( const G4int np, const G4int nm, const G4int nz,
G4FastVector<G4ReactionProduct,128> &vec,
G4int &vecLen );
void GetNormalizationConstant( const G4double availableEnergy,
G4double &n,
G4double &anpn );
void CalculateMomenta( G4FastVector<G4ReactionProduct,128> &vec,
G4int &vecLen,
const G4DynamicParticle *originalIncident,
const G4DynamicParticle *originalTarget,
G4ReactionProduct &modifiedOriginal,
G4Nucleus &targetNucleus,
G4ReactionProduct &currentParticle,
G4ReactionProduct &targetParticle,
G4bool &incidentHasChanged,
G4bool &targetHasChanged,
G4bool quasiElastic );
void SetUpChange( G4FastVector<G4ReactionProduct,128> &vec,
G4int &vecLen,
G4ReactionProduct &currentParticle,
G4ReactionProduct &targetParticle,
G4bool &incidentHasChanged );
};
#endif
@@ -0,0 +1,122 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4EnergyRangeManager.cc,v 2.3 1998/07/13 17:38:15 fjones Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Process: Energy Range Manager
// original by H.P. Wellisch
// modified by J.L. Chuma, TRIUMF, 22-Nov-1996
// Last modified: 24-Mar-1997
// fix in the counter-hndling: H.P. Wellisch 04-Apr-97
// throw an exception if no model found: J.L. Chuma 04-Apr-97
#include "G4EnergyRangeManager.hh"
#include "Randomize.hh"
G4EnergyRangeManager::G4EnergyRangeManager(
const G4EnergyRangeManager &right )
{
if( this != &right )
{
for( G4int i=0; i<theHadronicInteractionCounter; ++i )
theHadronicInteraction[i] = right.theHadronicInteraction[i];
theHadronicInteractionCounter = right.theHadronicInteractionCounter;
}
}
G4EnergyRangeManager &
G4EnergyRangeManager::operator=(
const G4EnergyRangeManager &right )
{
if( this != &right )
{
for( G4int i=0; i<theHadronicInteractionCounter; ++i )
theHadronicInteraction[i] =
right.theHadronicInteraction[i];
theHadronicInteractionCounter =
right.theHadronicInteractionCounter;
}
return *this;
}
void
G4EnergyRangeManager::RegisterMe(
G4HadronicInteraction *a )
{
if( theHadronicInteractionCounter+1 > MAX_NUMBER_OF_MODELS )
G4Exception(
"EnergyRangeManager::RegisterMe: TOO MANY MODELS");
theHadronicInteraction[ theHadronicInteractionCounter++ ] = a;
}
G4HadronicInteraction *
G4EnergyRangeManager::GetHadronicInteraction(
const G4double kineticEnergy,
const G4Material *aMaterial,
const G4Element *anElement ) const
{
G4int counter = GetHadronicInteractionCounter();
if( counter == 0 )
G4Exception("GetHadronicInteraction: NO MODELS STORED");
G4int cou = 0, memory = 0, memor2 = 0;
G4double emi1 = 0.0, ema1 = 0.0, emi2 = 0.0, ema2 = 0.0;
for( G4int i=0; i<counter; i++ ) {
G4double low = theHadronicInteraction[i]->GetMinEnergy( aMaterial, anElement );
// Work-around for particles with 0 kinetic energy, which still
// require a model to return a ParticleChange
if (low == 0.) low = -DBL_MIN;
G4double high = theHadronicInteraction[i]->GetMaxEnergy( aMaterial, anElement );
if( low < kineticEnergy && high >= kineticEnergy )
{
++cou;
emi2 = emi1;
ema2 = ema1;
emi1 = low;
ema1 = high;
memor2 = memory;
memory = i;
}
}
G4int m;
G4double rand;
switch ( cou )
{
case 0:
G4Exception("GetHadronicInteraction: No model found for this energy range");
return 0;
case 1:
m = memory;
break;
case 2:
if( (emi2<=emi1 && ema2>=ema1) || (emi2>=emi1 && ema2<=ema1) )
G4Exception(
"GetHadronicInteraction: Energy ranges of two models fully overlapping");
rand = G4UniformRand();
if( emi1 < emi2 )
{
if( (ema1-kineticEnergy)/(ema1-emi2)<rand )
m = memory;
else
m = memor2;
} else {
if( (ema2-kineticEnergy)/(ema2-emi1)<rand )
m = memor2;
else
m = memory;
}
break;
default:
G4Exception(
"GetHadronicInteraction: More than two competing models in this energy range");
}
return theHadronicInteraction[m];
}
/* end of file */
@@ -0,0 +1,112 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronInelasticProcess.cc,v 2.1 1998/08/24 11:56:59 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Inelastic Process Class
// J.L. Chuma, TRIUMF, 24-Mar-1997
// Last modified: 27-Mar-1997
// J.P. Wellisch: Bug hunting, 23-Apr-97
// Modified by J.L.Chuma 8-Jul-97 to eliminate possible division by zero for sigma
//
// 14-APR-98 F.W.Jones: variant G4HadronInelastic process for
// G4CrossSectionDataSet/DataStore class design.
//
// 17-JUN-98 F.W.Jones: removed extraneous code causing core dump.
//
#include "G4HadronInelasticProcess.hh"
G4double G4HadronInelasticProcess::GetMeanFreePath(
const G4Track &aTrack,
G4double previousStepSize,
G4ForceCondition *condition )
{
const G4DynamicParticle *aParticle = aTrack.GetDynamicParticle();
if( aParticle->GetDefinition() != theParticle )
G4Exception( this->GetProcessName()+
" called for "+
aParticle->GetDefinition()->GetParticleName() );
G4Material *aMaterial = aTrack.GetMaterial();
G4int nElements = aMaterial->GetNumberOfElements();
// returns the mean free path in GEANT4 internal units
const RWTPtrVector<G4Element> *theElementVector =
aMaterial->GetElementVector();
const G4double *theAtomicNumDensityVector =
aMaterial->GetAtomicNumDensityVector();
G4Element *anElement = (*theElementVector)[0];
G4int j = anElement->GetIndex();
// This apparently should not be here (not useful and dumps core)
// FWJ 17-JUN-1998
// G4bool isOutRange;
// G4double xSection = (*((*thePhysicsTable)(j))).GetValue(
// aParticle->GetTotalMomentum()/GeV, isOutRange );
G4double sigma = 0.0;
for( G4int i=0; i<nElements; ++i )
{
G4double xSection =
GetMicroscopicCrossSection( aParticle, (*theElementVector)[i] );
sigma += theAtomicNumDensityVector[i] * xSection;
}
if( sigma > 0.0 )
return 1.0/sigma;
else
return DBL_MAX;
}
void
G4HadronInelasticProcess::BuildThePhysicsTable()
{
if (!theCrossSectionDataStore) {
// G4Exception("G4HadronInelasticProcess::BuildThePhysicsTable: "
// "no CrossSectionDataStore");
return;
}
theCrossSectionDataStore->BuildPhysicsTable(*theParticle);
// G4int numberOfElements = G4Element::GetNumberOfElements();
// thePhysicsTable = new G4PhysicsTable( numberOfElements );
//
// // make a PhysicsVector for each element
//
// static const G4ElementTable *theElementTable = G4Element::GetElementTable();
// for( G4int i=0; i<numberOfElements; ++i )
// (*thePhysicsTable)(i) =
// theCrossSectionData.MakePhysicsVector( *this, *theParticle,
// (*theElementTable)[i] );
}
G4double G4HadronInelasticProcess::GetMicroscopicCrossSection(
const G4DynamicParticle *aParticle,
const G4Element *anElement)
{
// returns the microscopic cross section in GEANT4 internal units
if (!theCrossSectionDataStore) {
G4Exception("G4HadronInelasticProcess::GetMicroscopicCrossSection:"
"no CrossSectionDataStore");
return DBL_MIN;
}
return theCrossSectionDataStore->GetCrossSection(aParticle, anElement);
// G4bool isOutRange;
// G4int j = anElement->GetIndex();
//
// G4double s = (*((*thePhysicsTable)(j))).GetValue(
// aParticle->GetTotalMomentum()/GeV, isOutRange );
// return s;
}
/* end of file */
@@ -0,0 +1,206 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronicInteraction.cc,v 2.2 1998/07/13 17:22:13 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Interaction base class
// original by H.P. Wellisch
// modified by J.L. Chuma, TRIUMF, 21-Mar-1997
// Last modified: 04-Apr-1997
#include "G4HadronicInteraction.hh"
G4double
G4HadronicInteraction::GetMinEnergy(
const G4Material *aMaterial, const G4Element *anElement ) const
{
G4int i;
if( IsBlocked(aMaterial) )return 0.*GeV;
if( IsBlocked(anElement) )return 0.*GeV;
for( i=0; i<theMinCounterElements; ++i )
{
if( anElement == theMinElements[i] )return theMinEnergyListElements[i];
}
for( i=0; i<theMinCounter; ++i )
{
if( aMaterial == theMinMaterials[i] )return theMinEnergyList[i];
}
if( verboseLevel > 0 )
G4cout << "*** Warning from HadronicInteraction::GetMinEnergy" << endl
<< " material " << aMaterial->GetName()
<< " not found in min energy List" << endl;
return theMinEnergy;
}
void
G4HadronicInteraction::SetMinEnergy(
G4double anEnergy,
G4Element *anElement )
{
if( IsBlocked(anElement) )
G4cout << "*** Warning from HadronicInteraction::SetMinEnergy" << endl
<< " The model is not active for the Element "
<< anElement->GetName() << "." << endl;
for( G4int i=0; i<theMinCounterElements; ++i )
{
if( anElement == theMinElements[i] )
{
theMinEnergyListElements[i] = anEnergy;
return;
}
}
if( theMinCounterElements == MAX_LIST_SIZE )
G4Exception("SetMinEnergy: exceeded size of min energy element List");
theMinElements[theMinCounterElements] = anElement;
theMinEnergyListElements[theMinCounterElements++] = anEnergy;
}
void
G4HadronicInteraction::SetMinEnergy(
G4double anEnergy,
G4Material *aMaterial )
{
if( IsBlocked(aMaterial) )
G4cout << "*** Warning from HadronicInteraction::SetMinEnergy" << endl
<< " The model is not active for the Material "
<< aMaterial->GetName() << "." << endl;
for( G4int i=0; i<theMinCounter; ++i )
{
if( aMaterial == theMinMaterials[i] )
{
theMinEnergyList[i] = anEnergy;
return;
}
}
if( theMinCounter == MAX_LIST_SIZE )
G4Exception("SetMinEnergy: exceeded size of min energy material List");
theMinMaterials[theMinCounter] = aMaterial;
theMinEnergyList[theMinCounter++] = anEnergy;
}
G4double
G4HadronicInteraction::GetMaxEnergy(
const G4Material *aMaterial, const G4Element *anElement ) const
{
G4int i;
if( IsBlocked(aMaterial) )return 0.0*GeV;
if( IsBlocked(anElement) )return 0.0*GeV;
for( i=0; i<theMaxCounterElements; ++i )
{
if( anElement == theMaxElements[i] )return theMaxEnergyListElements[i];
}
for( i=0; i<theMaxCounter; ++i )
{
if( aMaterial == theMaxMaterials[i] )return theMaxEnergyList[i];
}
if( verboseLevel > 0 )
G4cout << "*** Warning from HadronicInteraction::GetMaxEnergy" << endl
<< " material " << aMaterial->GetName()
<< " not found in min energy List" << endl;
return theMaxEnergy;
}
void
G4HadronicInteraction::SetMaxEnergy(
G4double anEnergy,
G4Element *anElement )
{
if( IsBlocked(anElement) )
G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << endl
<< "Warning: The model is not active for the Element "
<< anElement->GetName() << "." << endl;
for( G4int i=0; i<theMaxCounterElements; ++i )
{
if( anElement == theMaxElements[i] )
{
theMaxEnergyListElements[i] = anEnergy;
return;
}
}
if( theMaxCounterElements == MAX_LIST_SIZE )
G4Exception("SetMaxEnergy: exceeded size of max energy element List");
theMaxElements[theMaxCounterElements] = anElement;
theMaxEnergyListElements[theMaxCounterElements++] = anEnergy;
}
void
G4HadronicInteraction::SetMaxEnergy(
G4double anEnergy,
G4Material *aMaterial )
{
if( IsBlocked(aMaterial) )
G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << endl
<< "Warning: The model is not active for the Material "
<< aMaterial->GetName() << "." << endl;
for( G4int i=0; i<theMaxCounter; ++i )
{
if( aMaterial == theMaxMaterials[i] )
{
theMaxEnergyList[i] = anEnergy;
return;
}
}
if( theMaxCounter == MAX_LIST_SIZE )
G4Exception("SetMaxEnergy: exceeded size of max energy material List");
theMaxMaterials[theMaxCounter] = aMaterial;
theMaxEnergyList[theMaxCounter++] = anEnergy;
}
void
G4HadronicInteraction::DeActivateFor( G4Material *aMaterial )
{
if( theBlockedCounter == MAX_LIST_SIZE )
G4Exception("DeActivateFor: exceeded size of blocked material List");
theBlockedList[ theBlockedCounter++ ] = aMaterial;
}
void
G4HadronicInteraction::DeActivateFor( G4Element *anElement )
{
if( theBlockedCounterElements == MAX_LIST_SIZE )
G4Exception("DeActivateFor: exceeded size of blocked elements List");
theBlockedListElements[ theBlockedCounterElements++ ] = anElement;
}
G4bool
G4HadronicInteraction::IsBlocked( const G4Material *aMaterial ) const
{
G4bool tt = false;
for( G4int i=0; i<theBlockedCounter; ++i )
{
if( aMaterial == theBlockedList[i] )
{
tt = true;
break;
}
}
return tt;
}
G4bool
G4HadronicInteraction::IsBlocked( const G4Element *anElement ) const
{
G4bool tt = false;
for( G4int i=0; i<theBlockedCounterElements; ++i )
{
if( anElement == theBlockedListElements[i] )
{
tt = true;
break;
}
}
return tt;
}
/* end of file */
@@ -0,0 +1,72 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HadronicProcess.cc,v 2.0 1998/07/02 16:22:25 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
// HPW to implement the choosing of an element for scattering.
#include "G4HadronicProcess.hh"
G4Element * G4HadronicProcess::ChooseAandZ(
const G4DynamicParticle *aParticle, const G4Material *aMaterial )
{
currentZ = 0;
currentN = 0;
const G4int numberOfElements = aMaterial->GetNumberOfElements();
const G4ElementVector *theElementVector = aMaterial->GetElementVector();
if( numberOfElements == 1 )
{
currentZ = G4double((*theElementVector)(0)->GetZ());
currentN = (*theElementVector)(0)->GetN();
targetNucleus.SetParameters(currentN, currentZ);
return (*theElementVector)(0);
}
const G4double *theAtomicNumberDensity = aMaterial->GetAtomicNumDensityVector();
G4double crossSectionTotal = 0;
G4int i;
for( i=0; i < numberOfElements; ++i )
crossSectionTotal += theAtomicNumberDensity[i] *
dispatch->GetMicroscopicCrossSection( aParticle, (*theElementVector)(i) );
G4double crossSectionSum= 0.;
G4double random = G4UniformRand()*crossSectionTotal;
for( i=0; i < numberOfElements; ++i )
{
crossSectionSum += theAtomicNumberDensity[i] *
dispatch->GetMicroscopicCrossSection( aParticle, (*theElementVector)(i) );
if( random<=crossSectionSum )
{
currentZ = G4double((*theElementVector)(i)->GetZ());
currentN = (*theElementVector)(i)->GetN();
targetNucleus.SetParameters(currentN, currentZ);
return (*theElementVector)(i);
}
}
currentZ = G4double((*theElementVector)(numberOfElements-1)->GetZ());
currentN = (*theElementVector)(numberOfElements-1)->GetN();
targetNucleus.SetParameters(currentN, currentZ);
return (*theElementVector)(numberOfElements-1);
}
G4VParticleChange *G4HadronicProcess::GeneralPostStepDoIt(
const G4Track &aTrack, const G4Step &aStep )
{
const G4DynamicParticle *aParticle = aTrack.GetDynamicParticle();
G4Material *aMaterial = aTrack.GetMaterial();
G4double kineticEnergy = aParticle->GetKineticEnergy();
G4Element * anElement = ChooseAandZ( aParticle, aMaterial );
theInteraction = ChooseHadronicInteraction( kineticEnergy,
aMaterial, anElement );
G4VParticleChange *result =
theInteraction->ApplyYourself( aTrack, targetNucleus);
ResetNumberOfInteractionLengthLeft();
return result;
}
/* end of file */
@@ -0,0 +1,365 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
// Hadronic Process: Inelastic Interaction
// original by H.P. Wellisch
// modified by J.L. Chuma, TRIUMF, 22-Nov-1996
// Last modified: 27-Mar-1997
// J.P. Wellisch: 23-Apr-97: G4Exception removed
// J.P. Wellisch: 24-Apr-97: correction for SetUpPions
// Modified by J.L. Chuma, 30-Apr-97: added originalTarget to CalculateMomenta
// since TwoBody needed to reset the target particle
// J.L. Chuma, 20-Jun-97: Modified CalculateMomenta to correct the decision process
// for whether to use GenerateXandPt or TwoCluster
// J.L. Chuma, 06-Aug-97: added original incident particle, before Fermi motion and
// evaporation effects are included, needed for calculating
// self absorption and corrections for single particle spectra
// HPW removed misunderstanding of LocalEnergyDeposit, 11.04.98.
#include "G4InelasticInteraction.hh"
#include "Randomize.hh"
G4double
G4InelasticInteraction::Pmltpc( // used in Cascade functions
G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c )
{
const G4double expxu = 82.; // upper bound for arg. of exp
const G4double expxl = -expxu; // lower bound for arg. of exp
G4double npf = 0.0;
G4double nmf = 0.0;
G4double nzf = 0.0;
G4int i;
for( i=2; i<=np; i++ )npf += log((double)i);
for( i=2; i<=nm; i++ )nmf += log((double)i);
for( i=2; i<=nz; i++ )nzf += log((double)i);
G4double r;
r = min( expxu, max( expxl, -(np-nm+nz+b)*(np-nm+nz+b)/(2*c*c*n*n)-npf-nmf-nzf ) );
return exp(r);
}
G4bool
G4InelasticInteraction::MarkLeadingStrangeParticle(
const G4ReactionProduct &currentParticle,
const G4ReactionProduct &targetParticle,
G4ReactionProduct &leadParticle )
{
// the following was in GenerateXandPt and TwoCluster
// add a parameter to the GenerateXandPt function telling it about the strange particle
//
// assumes that the original particle was a strange particle
//
G4bool lead = false;
if( (currentParticle.GetMass() >= G4KaonPlus::KaonPlus()->GetPDGMass()) &&
(currentParticle.GetDefinition() != G4Proton::Proton()) &&
(currentParticle.GetDefinition() != G4Neutron::Neutron()) )
{
lead = true;
leadParticle = currentParticle; // set lead to the incident particle
}
else if( (targetParticle.GetMass() >= G4KaonPlus::KaonPlus()->GetPDGMass()) &&
(targetParticle.GetDefinition() != G4Proton::Proton()) &&
(targetParticle.GetDefinition() != G4Neutron::Neutron()) )
{
lead = true;
leadParticle = targetParticle; // set lead to the target particle
}
return lead;
}
void
G4InelasticInteraction::SetUpPions(
const G4int np,
const G4int nm,
const G4int nz,
G4FastVector<G4ReactionProduct,128> &vec,
G4int &vecLen )
{
if( np+nm+nz == 0 )return;
G4int i;
G4ReactionProduct *p = new G4ReactionProduct [np+nm+nz];
for( i=0; i<np; ++i )
{
p[i].SetDefinition( G4PionPlus::PionPlus() );
(G4UniformRand() < 0.5) ? p[i].SetSide( -1 ) : p[i].SetSide( 1 );
vec.SetElement( vecLen++, &p[i] );
}
for( i=np; i<np+nm; ++i )
{
p[i].SetDefinition( G4PionMinus::PionMinus() );
(G4UniformRand() < 0.5) ? p[i].SetSide( -1 ) : p[i].SetSide( 1 );
vec.SetElement( vecLen++, &p[i] );
}
for( i=np+nm; i<np+nm+nz; ++i )
{
p[i].SetDefinition( G4PionZero::PionZero() );
(G4UniformRand() < 0.5) ? p[i].SetSide( -1 ) : p[i].SetSide( 1 );
vec.SetElement( vecLen++, &p[i] );
}
}
void
G4InelasticInteraction::GetNormalizationConstant(
const G4double energy, // MeV, <0 means annihilation channels
G4double &n,
G4double &anpn )
{
const G4double expxu = 82.; // upper bound for arg. of exp
const G4double expxl = -expxu; // lower bound for arg. of exp
const G4int numSec = 60;
//
// the only difference between the calculation for annihilation channels
// and normal is the starting value, iBegin, for the loop below
//
G4int iBegin = 1;
G4double en = energy;
if( energy < 0.0 )
{
iBegin = 2;
en *= -1.0;
}
//
// number of total particles vs. centre of mass Energy - 2*proton mass
//
G4double aleab = log(en/GeV);
n = 3.62567 + aleab*(0.665843 + aleab*(0.336514 + aleab*(0.117712 + 0.0136912*aleab)));
n -= 2.0;
//
// normalization constant for kno-distribution
//
anpn = 0.0;
G4double test, temp;
for( G4int i=iBegin; i<=numSec; ++i )
{
temp = pi*i/(2.0*n*n);
test = exp( min( expxu, max( expxl, -(pi/4.0)*(i*i)/(n*n) ) ) );
if( temp < 1.0 )
{
if( test >= 1.0e-10 )anpn += temp*test;
}
else
anpn += temp*test;
}
}
void
G4InelasticInteraction::CalculateMomenta(
G4FastVector<G4ReactionProduct,128> &vec,
G4int &vecLen,
const G4DynamicParticle *originalIncident, // the original incident particle
const G4DynamicParticle *originalTarget,
G4ReactionProduct &modifiedOriginal, // Fermi motion and evap. effects included
G4Nucleus &targetNucleus,
G4ReactionProduct &currentParticle,
G4ReactionProduct &targetParticle,
G4bool &incidentHasChanged,
G4bool &targetHasChanged,
G4bool quasiElastic )
{
theReactionDynamics.ProduceStrangeParticlePairs( vec, vecLen,
modifiedOriginal, originalTarget,
currentParticle, targetParticle,
incidentHasChanged, targetHasChanged );
if( quasiElastic )
{
theReactionDynamics.TwoBody( vec, vecLen,
modifiedOriginal, originalTarget,
currentParticle, targetParticle,
targetNucleus, targetHasChanged );
return;
}
G4ReactionProduct leadingStrangeParticle;
G4bool leadFlag = MarkLeadingStrangeParticle( currentParticle,
targetParticle,
leadingStrangeParticle );
//
// Note: the number of secondaries can be reduced in GenerateXandPt and TwoCluster
//
G4bool finishedGenXPt = false;
G4bool annihilation = false;
if( originalIncident->GetDefinition()->GetPDGEncoding() < 0 &&
currentParticle.GetMass() == 0.0 && targetParticle.GetMass() == 0.0 )
{
// original was an anti-particle and annihilation has taken place
annihilation = true;
G4double ekcor = 1.0;
G4double ek = originalIncident->GetKineticEnergy()/GeV;
const G4double tarmas = originalTarget->GetDefinition()->GetPDGMass()/GeV;
if( ek > 1.0 )ekcor = 1./ek;
const G4double atomicWeight = targetNucleus.GetN();
ek = 2*tarmas + ek*(1.+ekcor/atomicWeight);
modifiedOriginal.SetKineticEnergy( ek*GeV );
//
// evaporation -- re-calculate black track energies
// this was Done already just before the cascade
//
G4double tkin = targetNucleus.EvaporationEffects( ek*GeV )/GeV;
ek -= tkin;
ek = max( 0.0001, ek );
modifiedOriginal.SetKineticEnergy( ek*GeV );
G4double amas = originalIncident->GetDefinition()->GetPDGMass()/GeV;
G4double et = ek + amas;
G4double p = sqrt( abs(et*et-amas*amas) );
G4double pp = modifiedOriginal.GetMomentum().mag()/GeV;
if( pp > 0.0 )
{
G4ThreeVector momentum = modifiedOriginal.GetMomentum();
modifiedOriginal.SetMomentum( momentum * (p/pp) );
}
if( ek <= 0.0001 )
{
modifiedOriginal.SetKineticEnergy( 0.0 );
modifiedOriginal.SetMomentum( 0.0, 0.0, 0.0 );
}
}
const G4double twsup[] = { 1.0, 0.7, 0.5, 0.3, 0.2, 0.1 };
G4double rand1 = G4UniformRand();
G4double rand2 = G4UniformRand();
if( annihilation || (vecLen >= 6) ||
(modifiedOriginal.GetKineticEnergy()/GeV >= 1.0) &&
(((originalIncident->GetDefinition() == G4KaonPlus::KaonPlus() ||
originalIncident->GetDefinition() == G4KaonMinus::KaonMinus() ||
originalIncident->GetDefinition() == G4KaonZeroLong::KaonZeroLong() ||
originalIncident->GetDefinition() == G4KaonZeroShort::KaonZeroShort()) &&
rand1 < 0.5) || rand2 > twsup[vecLen]) )
finishedGenXPt =
theReactionDynamics.GenerateXandPt( vec, vecLen,
modifiedOriginal, originalIncident,
currentParticle, targetParticle,
targetNucleus, incidentHasChanged,
targetHasChanged, leadFlag,
leadingStrangeParticle );
if( finishedGenXPt )return;
G4bool finishedTwoClu = false;
if( modifiedOriginal.GetTotalMomentum()/MeV < 1.0 )vecLen = 0;
else
{
theReactionDynamics.SuppressChargedPions( vec, vecLen,
modifiedOriginal, currentParticle,
targetParticle, targetNucleus,
incidentHasChanged, targetHasChanged );
finishedTwoClu = theReactionDynamics.TwoCluster( vec, vecLen,
modifiedOriginal, originalIncident,
currentParticle, targetParticle,
targetNucleus, incidentHasChanged,
targetHasChanged, leadFlag,
leadingStrangeParticle );
}
if( finishedTwoClu )return;
//
// PNBlackTrackEnergy is the kinetic energy available for
// proton/neutron black track particles [was enp(1) in fortran code]
// DTABlackTrackEnergy is the kinetic energy available for
// deuteron/triton/alpha particles [was enp(3) in fortran code]
//const G4double pnCutOff = 0.1;
//const G4double dtaCutOff = 0.1;
//if( (targetNucleus.GetN() >= 1.5)
// && !(incidentHasChanged || targetHasChanged)
// && (targetNucleus.GetPNBlackTrackEnergy()/MeV <= pnCutOff)
// && (targetNucleus.GetDTABlackTrackEnergy()/MeV <= dtaCutOff) )
//{
// the atomic weight of the target nucleus is >= 1.5 AND
// neither the incident nor the target particles have changed AND
// there is no kinetic energy available for either proton/neutron
// or for deuteron/triton/alpha black track particles
// For diffraction scattering on heavy nuclei use elastic routines instead
//G4cerr << "*** Error in G4InelasticInteraction::CalculateMomenta" << endl;
//G4cerr << "*** the elastic scattering would be better here ***" <<endl;
//}
theReactionDynamics.TwoBody( vec, vecLen,
modifiedOriginal, originalTarget,
currentParticle, targetParticle,
targetNucleus, targetHasChanged );
}
void
G4InelasticInteraction::SetUpChange(
G4FastVector<G4ReactionProduct,128> &vec,
G4int &vecLen,
G4ReactionProduct &currentParticle,
G4ReactionProduct &targetParticle,
G4bool &incidentHasChanged )
{
G4ParticleDefinition *aKaonZL = G4KaonZeroLong::KaonZeroLong();
G4ParticleDefinition *aKaonZS = G4KaonZeroShort::KaonZeroShort();
G4int i;
if( currentParticle.GetDefinition() == aKaonZL )
{
if( G4UniformRand() <= 0.5 )
{
currentParticle.SetDefinition( aKaonZS );
incidentHasChanged = true;
}
}
else if( currentParticle.GetDefinition() == aKaonZS )
{
if( G4UniformRand() > 0.5 )
{
currentParticle.SetDefinition( aKaonZL );
incidentHasChanged = true;
}
}
if( targetParticle.GetDefinition() == aKaonZL )
{
if( G4UniformRand() <= 0.5 )targetParticle.SetDefinition( aKaonZS );
}
else if( targetParticle.GetDefinition() == aKaonZS )
{
if( G4UniformRand() > 0.5 )targetParticle.SetDefinition( aKaonZL );
}
for( i=0; i<vecLen; ++i )
{
if( vec[i]->GetDefinition() == aKaonZL )
{
if( G4UniformRand() <= 0.5 )vec[i]->SetDefinition( aKaonZS );
}
else if( vec[i]->GetDefinition() == aKaonZS )
{
if( G4UniformRand() > 0.5 )vec[i]->SetDefinition( aKaonZL );
}
}
if( incidentHasChanged )
{
theParticleChange.SetNumberOfSecondaries( vecLen+2 );
G4DynamicParticle* p0 = new G4DynamicParticle;
p0->SetDefinition( currentParticle.GetDefinition() );
p0->SetMomentum( currentParticle.GetMomentum() );
theParticleChange.AddSecondary( p0 );
theParticleChange.SetStatusChange( fStopAndKill );
theParticleChange.SetEnergyChange( 0.0 );
}
else
{
theParticleChange.SetNumberOfSecondaries( vecLen+1 );
G4double p = currentParticle.GetMomentum().mag()/MeV;
G4ThreeVector m = currentParticle.GetMomentum();
if( p > DBL_MIN )
theParticleChange.SetMomentumChange( m.x()/p, m.y()/p, m.z()/p );
else
theParticleChange.SetMomentumChange( 0.0, 0.0, 0.0 );
theParticleChange.SetEnergyChange( currentParticle.GetKineticEnergy() );
}
if( targetParticle.GetMass() > 0.0 ) // targetParticle can be eliminated in TwoBody
{
G4DynamicParticle *p1 = new G4DynamicParticle;
p1->SetDefinition( targetParticle.GetDefinition() );
p1->SetMomentum( targetParticle.GetMomentum() );
theParticleChange.AddSecondary( p1 );
}
G4DynamicParticle *p;
for( i=0; i<vecLen; ++i )
{
p = new G4DynamicParticle();
p->SetDefinition( vec[i]->GetDefinition() );
p->SetMomentum( vec[i]->GetMomentum() );
theParticleChange.AddSecondary( p );
}
}
/* end of file */
@@ -0,0 +1,31 @@
# $Id: GNUmakefile,v 2.5 1998/11/06 18:03:59 hpw Exp $
# --------------------------------------------------------------
# GNUmakefile for hadronic models library. G.Folger 10-Dec-97
# --------------------------------------------------------------
name := G4hadronic_models
SUBDIRS = low_energy
SUBDIRS += high_energy
SUBDIRS += neutron_hp
SUBDIRS += generator/de_excitation
SUBDIRS += generator/diffractive_string
SUBDIRS += generator/high_energy
SUBDIRS += generator/kinetic_model
SUBDIRS += generator/management
SUBDIRS += generator/pre_equilibrium
SUBDIRS += generator/quark_gluon_string
SUBDIRS += generator/string_common
SUBDIRS += generator/string_fragmentation
SUBDIRS += generator/util
SUBLIBS = G4hadronic_HE G4hadronic_LE G4hadronic_neu
SUBLIBS += G4hadronic_deex G4hadronic_diffstring G4hadronic_HE_gen G4hadronic_kinetic
SUBLIBS += G4hadronic_man_gen G4hadronic_preequ G4hadronic_qgstring G4hadronic_string_common
SUBLIBS += G4hadronic_stringfrag G4hadronic_util_gen
ifndef G4INSTALL
G4INSTALL = ../../../..
endif
include $(G4INSTALL)/config/globlib.gmk
@@ -0,0 +1,18 @@
# $Id: GNUmakefile,v 2.3 1998/11/06 18:03:59 hpw Exp $
# ----------------------------------------------------------------
# GNUmakefile for hadronic processes library. G.Folger 10-Dec-97.
# ----------------------------------------------------------------
name := G4hadronic_gen
SUBDIRS = de_excitation diffractive_string high_energy kinetic_model management
SUBDIRS += string_common string_fragmentation util pre_equilibrium quark_gluon_string
SUBLIBS = G4hadronic_deex G4hadronic_diffstring G4hadronic_HE_gen G4hadronic_kinetic
SUBLIBS += G4hadronic_man_gen G4hadronic_preequ G4hadronic_qgstring G4hadronic_string_common
SUBLIBS += G4hadronic_stringfrag G4hadronic_util_gen
ifndef G4INSTALL
G4INSTALL = ../../../../..
endif
include $(G4INSTALL)/config/globlib.gmk
@@ -0,0 +1,21 @@
$Id: History,v 2.0 1998/07/02 16:22:33 gunter Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Hadronics/models/Generator History file
---------------------------------------
This file should be used by G4 developers to briefly summarize all major
modifications introduced in the code and keep track of all tags.
It DOES NOT substitute the CVS log-message one should put at every
committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
GF 12-May-98: Add more functions to G4Fancy3DNucleus:
doLorentzContraction with algorithm given by Nicolai
give access to all nucleons with a RWTPtrOrederedVector
Required a mod to G4Nucleon, ie. add operator ==
@@ -0,0 +1,39 @@
# $Id: GNUmakefile,v 1.1 1998/08/22 09:07:55 hpw Exp $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
name := G4hadronic_deex
ifndef G4INSTALL
G4INSTALL = ../../../../../..
endif
include $(G4INSTALL)/config/architecture.gmk
G4TMPDIR = $(G4TMP)/$(G4SYSTEM)/$(name)
CPPFLAGS += -I$(G4BASE)/global/management/include \
-I$(G4BASE)/global/HEPRandom/include \
-I$(G4BASE)/global/HEPNumerics/include \
-I$(G4BASE)/global/HEPGeometry/include \
-I$(G4BASE)/track/include \
-I$(G4BASE)/geometry/volumes/include \
-I$(G4BASE)/geometry/management/include \
-I$(G4BASE)/processes/management/include \
-I$(G4BASE)/processes/hadronic/management/include/ \
-I$(G4BASE)/processes/hadronic/util/include \
-I$(G4BASE)/processes/hadronic/processes/include \
-I$(G4BASE)/processes/hadronic/cross_sections/include \
-I$(G4BASE)/processes/hadronic/models/generator/util/include \
-I$(G4BASE)/particles/management/include \
-I$(G4BASE)/particles/leptons/include \
-I$(G4BASE)/particles/bosons/include \
-I$(G4BASE)/particles/hadrons/mesons/include \
-I$(G4BASE)/particles/hadrons/barions/include \
-I$(G4BASE)/particles/hadrons/ions/include \
-I$(G4BASE)/particles/shortlived/include \
-I$(G4BASE)/materials/include
include $(G4INSTALL)/config/common.gmk
@@ -0,0 +1,44 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
#ifndef G4B9FermiFragment_h
#define G4B9FermiFragment_h 1
#include "G4UnstableFermiFragment.hh"
#include "G4IonTable.hh"
class G4B9FermiFragment : public G4UnstableFermiFragment
{
public:
G4B9FermiFragment(const G4int anA, const G4int aZ, const G4int Pol, const G4double ExE):
G4UnstableFermiFragment(anA,aZ,Pol,ExE)
{};
~G4B9FermiFragment();
private:
G4B9FermiFragment();
G4B9FermiFragment(const G4B9FermiFragment &right);
const G4B9FermiFragment & operator=(const G4B9FermiFragment &right);
G4bool operator==(const G4B9FermiFragment &right) const;
G4bool operator!=(const G4B9FermiFragment &right) const;
public:
G4FragmentVector * GetFragment(const G4LorentzVector & aMomentum);
};
#endif
@@ -0,0 +1,43 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
#ifndef G4Be8FermiFragment_h
#define G4Be8FermiFragment_h 1
#include "G4UnstableFermiFragment.hh"
#include "G4IonTable.hh"
class G4Be8FermiFragment : public G4UnstableFermiFragment
{
public:
G4Be8FermiFragment(const G4int anA, const G4int aZ, const G4int Pol, const G4double ExE):
G4UnstableFermiFragment(anA,aZ,Pol,ExE)
{};
~G4Be8FermiFragment();
private:
G4Be8FermiFragment();
G4Be8FermiFragment(const G4Be8FermiFragment &right);
const G4Be8FermiFragment & operator=(const G4Be8FermiFragment &right);
G4bool operator==(const G4Be8FermiFragment &right) const;
G4bool operator!=(const G4Be8FermiFragment &right) const;
public:
G4FragmentVector * GetFragment(const G4LorentzVector & aMomentum);
};
#endif
@@ -0,0 +1,146 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
#ifndef G4CompetitiveFission_h
#define G4CompetitiveFission_h 1
#include "G4VEvaporationChannel.hh"
#include "G4Fragment.hh"
#include "G4VFissionBarrier.hh"
#include "G4FissionBarrier.hh"
#include "G4VEmissionProbability.hh"
#include "G4FissionProbability.hh"
#include "G4VLevelDensityParameter.hh"
#include "G4FissionLevelDensityParameter.hh"
#include "G4FissionParameters.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
#include "Randomize.hh"
class G4CompetitiveFission : public G4VEvaporationChannel
{
public:
G4CompetitiveFission();
virtual ~G4CompetitiveFission();
private:
G4CompetitiveFission(const G4CompetitiveFission &right);
const G4CompetitiveFission & operator=(const G4CompetitiveFission &right);
public:
G4bool operator==(const G4CompetitiveFission &right) const;
G4bool operator!=(const G4CompetitiveFission &right) const;
public:
G4FragmentVector * BreakUp(const G4Fragment &theNucleus);
void Initialize(const G4Fragment & fragment);
inline void SetFissionBarrier(G4VFissionBarrier * aBarrier)
{
if (MyOwnFissionBarrier) delete theFissionBarrierPtr;
theFissionBarrierPtr = aBarrier;
MyOwnFissionBarrier = false;
}
inline void SetEmissionStrategy(G4VEmissionProbability * aFissionProb)
{
if (MyOwnFissionProbability) delete theFissionProbabilityPtr;
theFissionProbabilityPtr = aFissionProb;
MyOwnFissionProbability = false;
}
inline void SetLevelDensityParameter(G4VLevelDensityParameter * aLevelDensity)
{
if (MyOwnLevelDensity) delete theLevelDensityPtr;
theLevelDensityPtr = aLevelDensity;
MyOwnLevelDensity = false;
}
inline G4double GetFissionBarrier(void) const { return FissionBarrier; }
inline G4double GetEmissionProbability(void) const { return FissionProbability; }
inline G4double GetLevelDensityParameter(void) const { return LevelDensityParameter; }
inline G4double GetMaximalKineticEnergy(void) const { return MaximalKineticEnergy; }
private:
// Maximal Kinetic Energy that can be carried by fragment
G4double MaximalKineticEnergy;
// For Fission barrier
G4VFissionBarrier * theFissionBarrierPtr;
G4double FissionBarrier;
G4bool MyOwnFissionBarrier;
// For Fission probability emission
G4VEmissionProbability * theFissionProbabilityPtr;
G4double FissionProbability;
G4bool MyOwnFissionProbability;
// For Level Density calculation
G4bool MyOwnLevelDensity;
G4VLevelDensityParameter * theLevelDensityPtr;
G4double LevelDensityParameter;
// --------------------
// Sample AtomicNumber of Fission products
G4int FissionAtomicNumber(const G4int A, const G4FissionParameters & theParam);
G4double MassDistribution(const G4double x, const G4double A, const G4FissionParameters & theParam);
// Sample Charge of fission products
G4int FissionCharge(const G4double A, const G4double Z, const G4double Af);
// Sample Kinetic energy of fission products
G4double FissionKineticEnergy(const G4double A, const G4double Z,
const G4double Af1, const G4double Zf1,
const G4double Af2, const G4double Zf2,
const G4double U, const G4double Tmax,
const G4FissionParameters & theParam);
G4double Ratio(const G4double A,const G4double A11,const G4double B1,const G4double A00);
G4double SymmetricRatio(const G4double A,const G4double A11);
G4double AsymmetricRatio(const G4double A,const G4double A11);
G4ThreeVector IsotropicVector(const G4double Magnitude = 1.0);
};
#endif
@@ -0,0 +1,42 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
// Hadronic Process: Nuclear De-excitations (photon evaporation)
// by C. Dallapiccola (Nov 1998)
//
#ifndef G4ConstantLevelDensityParameter_h
#define G4ConstantLevelDensityParameter_h 1
#include "G4VLevelDensityParameter.hh"
class G4ConstantLevelDensityParameter : public G4VLevelDensityParameter
{
public:
G4ConstantLevelDensityParameter() : EvapLevelDensityParameter(0.125*(1./MeV)) {};
virtual ~G4ConstantLevelDensityParameter() {};
private:
G4ConstantLevelDensityParameter(const G4ConstantLevelDensityParameter &right);
const G4ConstantLevelDensityParameter & operator=(const G4ConstantLevelDensityParameter &right);
G4bool operator==(const G4ConstantLevelDensityParameter &right) const;
G4bool operator!=(const G4ConstantLevelDensityParameter &right) const;
public:
G4double LevelDensityParameter(const G4int A,const G4int Z,const G4double U) const
{return A * EvapLevelDensityParameter;}
private:
const G4double EvapLevelDensityParameter;
};
#endif
@@ -0,0 +1,67 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4ContinuumGammaDeexcitation
//
// Authors: Carlo Dallapiccola (dallapiccola@umdhep.umd.edu)
// Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 23 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
//
//
// Class G4ContinuumGammaDeexcitation.hh
//
#ifndef G4ContinuumGammaDeexcitation_hh
#define G4ContinuumGammaDeexcitation_hh
#include "G4VGammaDeexcitation.hh"
#include "globals.hh"
#include "G4ContinuumGammaTransition.hh"
#include "G4Fragment.hh"
#include "G4NuclearLevelManager.hh"
class G4ContinuumGammaDeexcitation : public G4VGammaDeexcitation
{
public:
// Constructor
G4ContinuumGammaDeexcitation();
// Destructor
~G4ContinuumGammaDeexcitation();
// Functions
public:
virtual G4VGammaTransition* CreateTransition();
virtual G4bool CanDoTransition() const;
private:
G4int _Z;
G4int _A;
G4NuclearLevelManager _levelManager;
};
#endif
@@ -0,0 +1,70 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4ContinuumGammaTransition
//
// Authors: Carlo Dallapiccola (dallapiccola@umdhep.umd.edu)
// Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 23 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
//
// Header file for G4ContinuumGammaTransition
//
#ifndef G4ContinuumGammaTransition_hh
#define G4ContinuumGammaTransition_hh
#include "globals.hh"
#include "G4VGammaTransition.hh"
#include "G4NuclearLevelManager.hh"
#include "G4VLevelDensityParameter.hh"
class G4ContinuumGammaTransition : public G4VGammaTransition
{
public:
// Constructor
G4ContinuumGammaTransition(const G4NuclearLevelManager& levelManager,
G4int Z, G4int A, G4double excitation, G4int verbose);
// Destructor
~G4ContinuumGammaTransition();
// Functions
virtual G4double GammaEnergy();
virtual G4double GetEnergyTo() const;
virtual void SetEnergyFrom(const G4double energy);
private:
G4double E1Pdf(G4double energy);
G4int _A;
G4int _Z;
G4double _eMin;
G4double _eMax;
G4double _maxLevelE;
G4double _minLevelE;
G4double _excitation;
G4double _eGamma;
G4NuclearLevelManager _levelManager;
};
#endif
@@ -0,0 +1,62 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4DiscreteGammaDeexcitation
//
// Author: Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 23 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
//
#ifndef G4DiscreteGammaDeexcitation_hh
#define G4DiscreteGammaDeexcitation_hh
#include "G4VGammaDeexcitation.hh"
#include "globals.hh"
#include "G4DiscreteGammaTransition.hh"
#include "G4Fragment.hh"
#include "G4NuclearLevelManager.hh"
class G4DiscreteGammaDeexcitation : public G4VGammaDeexcitation
{
public:
// Constructor
G4DiscreteGammaDeexcitation();
// Destructor
~G4DiscreteGammaDeexcitation();
// Functions
public:
virtual G4VGammaTransition* CreateTransition();
virtual G4bool CanDoTransition() const;
private:
G4int _Z;
G4int _A;
G4double _tolerance;
G4NuclearLevelManager _levelManager;
};
#endif
@@ -0,0 +1,58 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4DiscreteGammaTransition
//
// Author: Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 23 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4DiscreteGammaTransition_hh
#define G4DiscreteGammaTransition_hh
#include "globals.hh"
#include "G4VGammaTransition.hh"
#include "G4NuclearLevel.hh"
class G4DiscreteGammaTransition : public G4VGammaTransition
{
public:
// Constructor
G4DiscreteGammaTransition(const G4NuclearLevel& level);
// Destructor
~G4DiscreteGammaTransition();
// Functions
public:
virtual G4double GammaEnergy();
virtual G4double GetEnergyTo() const;
virtual void SetEnergyFrom(const G4double energy);
private:
G4double _gammaEnergy;
G4NuclearLevel _level;
G4double _excitation;
};
#endif
@@ -0,0 +1,36 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4DummyMF.hh,v 1.1 1998/08/22 08:53:34 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
#ifndef G4DummyMF_h
#define G4DummyMF_h 1
#include "G4MultiFragmentation.hh"
class G4DummyMF : public G4MultiFragmentation
{
public:
G4DummyMF();
~G4DummyMF();
private:
G4DummyMF(const G4DummyMF &right);
const G4DummyMF & operator=(const G4DummyMF &right);
int operator==(const G4DummyMF &right) const;
int operator!=(const G4DummyMF &right) const;
public:
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus);
};
#endif
@@ -0,0 +1,41 @@
//
//
#ifndef G4DummyProbability_hh
#define G4DummyProbability_hh
#include "globals.hh"
#include "G4VEmissionProbability.hh"
#include "G4Fragment.hh"
#include "G4VLevelDensityParameter.hh"
class G4DummyProbability : public G4VEmissionProbability
{
public:
G4DummyProbability() {};
~G4DummyProbability();
G4double EmissionProbability(const G4Fragment& frag, const G4double excite);
G4double EmissionProbDensity(const G4Fragment& frag, const G4double ePhoton);
private:
// G4DummyProbability() {};
G4DummyProbability(const G4DummyProbability& right);
const G4DummyProbability& operator=(const G4DummyProbability& right);
G4bool operator==(const G4DummyProbability& right) const;
G4bool operator!=(const G4DummyProbability& right) const;
};
#endif
@@ -0,0 +1,44 @@
//
//
#ifndef G4E1Probability_hh
#define G4E1Probability_hh
#include "globals.hh"
#include "G4VEmissionProbability.hh"
#include "G4Fragment.hh"
#include "G4VLevelDensityParameter.hh"
class G4E1Probability : public G4VEmissionProbability
{
public:
G4E1Probability() {};
~G4E1Probability();
G4double EmissionProbability(const G4Fragment& frag, const G4double excite);
G4double EmissionProbDensity(const G4Fragment& frag, const G4double ePhoton);
private:
// G4E1Probability() {};
G4E1Probability(const G4E1Probability& right);
const G4E1Probability& operator=(const G4E1Probability& right);
G4bool operator==(const G4E1Probability& right) const;
G4bool operator!=(const G4E1Probability& right) const;
// Integrator (simple Gaussian quadrature)
G4double EmissionIntegration(const G4Fragment& frag, const G4double excite,
const G4double lowLim, const G4double upLim,
const G4int numIters);
// G4VLevelDensityParameter* _levelDensity; // Don't need this
};
#endif
@@ -0,0 +1,44 @@
//
//
#ifndef G4E1Probability001_hh
#define G4E1Probability001_hh
#include "globals.hh"
#include "G4VEmissionProbability.hh"
#include "G4Fragment.hh"
#include "G4VLevelDensityParameter.hh"
class G4E1Probability001 : public G4VEmissionProbability
{
public:
G4E1Probability001() {};
~G4E1Probability001();
G4double EmissionProbability(const G4Fragment& frag, const G4double excite);
G4double EmissionProbDensity(const G4Fragment& frag, const G4double ePhoton);
private:
// G4E1Probability001() {};
G4E1Probability001(const G4E1Probability001& right);
const G4E1Probability001& operator=(const G4E1Probability001& right);
G4bool operator==(const G4E1Probability001& right) const;
G4bool operator!=(const G4E1Probability001& right) const;
// Integrator (simple Gaussian quadrature)
G4double EmissionIntegration(const G4Fragment& frag, const G4double excite,
const G4double lowLim, const G4double upLim,
const G4int numIters);
// G4VLevelDensityParameter* _levelDensity; // Don't need this
};
#endif
@@ -0,0 +1,44 @@
//
//
#ifndef G4E1Probability01_hh
#define G4E1Probability01_hh
#include "globals.hh"
#include "G4VEmissionProbability.hh"
#include "G4Fragment.hh"
#include "G4VLevelDensityParameter.hh"
class G4E1Probability01 : public G4VEmissionProbability
{
public:
G4E1Probability01() {};
~G4E1Probability01();
G4double EmissionProbability(const G4Fragment& frag, const G4double excite);
G4double EmissionProbDensity(const G4Fragment& frag, const G4double ePhoton);
private:
// G4E1Probability01() {};
G4E1Probability01(const G4E1Probability01& right);
const G4E1Probability01& operator=(const G4E1Probability01& right);
G4bool operator==(const G4E1Probability01& right) const;
G4bool operator!=(const G4E1Probability01& right) const;
// Integrator (simple Gaussian quadrature)
G4double EmissionIntegration(const G4Fragment& frag, const G4double excite,
const G4double lowLim, const G4double upLim,
const G4int numIters);
// G4VLevelDensityParameter* _levelDensity; // Don't need this
};
#endif
@@ -0,0 +1,44 @@
//
//
#ifndef G4E1Probability10_hh
#define G4E1Probability10_hh
#include "globals.hh"
#include "G4VEmissionProbability.hh"
#include "G4Fragment.hh"
#include "G4VLevelDensityParameter.hh"
class G4E1Probability10 : public G4VEmissionProbability
{
public:
G4E1Probability10() {};
~G4E1Probability10();
G4double EmissionProbability(const G4Fragment& frag, const G4double excite);
G4double EmissionProbDensity(const G4Fragment& frag, const G4double ePhoton);
private:
// G4E1Probability10() {};
G4E1Probability10(const G4E1Probability10& right);
const G4E1Probability10& operator=(const G4E1Probability10& right);
G4bool operator==(const G4E1Probability10& right) const;
G4bool operator!=(const G4E1Probability10& right) const;
// Integrator (simple Gaussian quadrature)
G4double EmissionIntegration(const G4Fragment& frag, const G4double excite,
const G4double lowLim, const G4double upLim,
const G4int numIters);
// G4VLevelDensityParameter* _levelDensity; // Don't need this
};
#endif
@@ -0,0 +1,44 @@
//
//
#ifndef G4E1Probability100_hh
#define G4E1Probability100_hh
#include "globals.hh"
#include "G4VEmissionProbability.hh"
#include "G4Fragment.hh"
#include "G4VLevelDensityParameter.hh"
class G4E1Probability100 : public G4VEmissionProbability
{
public:
G4E1Probability100() {};
~G4E1Probability100();
G4double EmissionProbability(const G4Fragment& frag, const G4double excite);
G4double EmissionProbDensity(const G4Fragment& frag, const G4double ePhoton);
private:
// G4E1Probability100() {};
G4E1Probability100(const G4E1Probability100& right);
const G4E1Probability100& operator=(const G4E1Probability100& right);
G4bool operator==(const G4E1Probability100& right) const;
G4bool operator!=(const G4E1Probability100& right) const;
// Integrator (simple Gaussian quadrature)
G4double EmissionIntegration(const G4Fragment& frag, const G4double excite,
const G4double lowLim, const G4double upLim,
const G4int numIters);
// G4VLevelDensityParameter* _levelDensity; // Don't need this
};
#endif
@@ -0,0 +1,45 @@
//
//
#ifndef G4E1SingleProbability001_hh
#define G4E1SingleProbability001_hh
#include "globals.hh"
#include "G4VEmissionProbability.hh"
#include "G4Fragment.hh"
#include "G4VLevelDensityParameter.hh"
class G4E1SingleProbability001 : public G4VEmissionProbability
{
public:
G4E1SingleProbability001() {};
~G4E1SingleProbability001();
G4double EmissionProbability(const G4Fragment& frag, const G4double excite);
G4double EmissionProbDensity(const G4Fragment& frag, const G4double ePhoton);
private:
// G4E1SingleProbability001() {};
G4E1SingleProbability001(const G4E1SingleProbability001& right);
const G4E1SingleProbability001& operator=(const G4E1SingleProbability001&
right);
G4bool operator==(const G4E1SingleProbability001& right) const;
G4bool operator!=(const G4E1SingleProbability001& right) const;
// Integrator (simple Gaussian quadrature)
G4double EmissionIntegration(const G4Fragment& frag, const G4double excite,
const G4double lowLim, const G4double upLim,
const G4int numIters);
// G4VLevelDensityParameter* _levelDensity; // Don't need this
};
#endif
@@ -0,0 +1,45 @@
//
//
#ifndef G4E1SingleProbability01_hh
#define G4E1SingleProbability01_hh
#include "globals.hh"
#include "G4VEmissionProbability.hh"
#include "G4Fragment.hh"
#include "G4VLevelDensityParameter.hh"
class G4E1SingleProbability01 : public G4VEmissionProbability
{
public:
G4E1SingleProbability01() {};
~G4E1SingleProbability01();
G4double EmissionProbability(const G4Fragment& frag, const G4double excite);
G4double EmissionProbDensity(const G4Fragment& frag, const G4double ePhoton);
private:
// G4E1SingleProbability01() {};
G4E1SingleProbability01(const G4E1SingleProbability01& right);
const G4E1SingleProbability01& operator=(const G4E1SingleProbability01&
right);
G4bool operator==(const G4E1SingleProbability01& right) const;
G4bool operator!=(const G4E1SingleProbability01& right) const;
// Integrator (simple Gaussian quadrature)
G4double EmissionIntegration(const G4Fragment& frag, const G4double excite,
const G4double lowLim, const G4double upLim,
const G4int numIters);
// G4VLevelDensityParameter* _levelDensity; // Don't need this
};
#endif
@@ -0,0 +1,44 @@
//
//
#ifndef G4E1SingleProbability1_hh
#define G4E1SingleProbability1_hh
#include "globals.hh"
#include "G4VEmissionProbability.hh"
#include "G4Fragment.hh"
#include "G4VLevelDensityParameter.hh"
class G4E1SingleProbability1 : public G4VEmissionProbability
{
public:
G4E1SingleProbability1() {};
~G4E1SingleProbability1();
G4double EmissionProbability(const G4Fragment& frag, const G4double excite);
G4double EmissionProbDensity(const G4Fragment& frag, const G4double ePhoton);
private:
// G4E1SingleProbability1() {};
G4E1SingleProbability1(const G4E1SingleProbability1& right);
const G4E1SingleProbability1& operator=(const G4E1SingleProbability1& right);
G4bool operator==(const G4E1SingleProbability1& right) const;
G4bool operator!=(const G4E1SingleProbability1& right) const;
// Integrator (simple Gaussian quadrature)
G4double EmissionIntegration(const G4Fragment& frag, const G4double excite,
const G4double lowLim, const G4double upLim,
const G4int numIters);
// G4VLevelDensityParameter* _levelDensity; // Don't need this
};
#endif
@@ -0,0 +1,45 @@
//
//
#ifndef G4E1SingleProbability10_hh
#define G4E1SingleProbability10_hh
#include "globals.hh"
#include "G4VEmissionProbability.hh"
#include "G4Fragment.hh"
#include "G4VLevelDensityParameter.hh"
class G4E1SingleProbability10 : public G4VEmissionProbability
{
public:
G4E1SingleProbability10() {};
~G4E1SingleProbability10();
G4double EmissionProbability(const G4Fragment& frag, const G4double excite);
G4double EmissionProbDensity(const G4Fragment& frag, const G4double ePhoton);
private:
// G4E1SingleProbability10() {};
G4E1SingleProbability10(const G4E1SingleProbability10& right);
const G4E1SingleProbability10& operator=(const G4E1SingleProbability10&
right);
G4bool operator==(const G4E1SingleProbability10& right) const;
G4bool operator!=(const G4E1SingleProbability10& right) const;
// Integrator (simple Gaussian quadrature)
G4double EmissionIntegration(const G4Fragment& frag, const G4double excite,
const G4double lowLim, const G4double upLim,
const G4int numIters);
// G4VLevelDensityParameter* _levelDensity; // Don't need this
};
#endif
@@ -0,0 +1,45 @@
//
//
#ifndef G4E1SingleProbability100_hh
#define G4E1SingleProbability100_hh
#include "globals.hh"
#include "G4VEmissionProbability.hh"
#include "G4Fragment.hh"
#include "G4VLevelDensityParameter.hh"
class G4E1SingleProbability100 : public G4VEmissionProbability
{
public:
G4E1SingleProbability100() {};
~G4E1SingleProbability100();
G4double EmissionProbability(const G4Fragment& frag, const G4double excite);
G4double EmissionProbDensity(const G4Fragment& frag, const G4double ePhoton);
private:
// G4E1SingleProbability100() {};
G4E1SingleProbability100(const G4E1SingleProbability100& right);
const G4E1SingleProbability100& operator=(const G4E1SingleProbability100&
right);
G4bool operator==(const G4E1SingleProbability100& right) const;
G4bool operator!=(const G4E1SingleProbability100& right) const;
// Integrator (simple Gaussian quadrature)
G4double EmissionIntegration(const G4Fragment& frag, const G4double excite,
const G4double lowLim, const G4double upLim,
const G4int numIters);
// G4VLevelDensityParameter* _levelDensity; // Don't need this
};
#endif
@@ -0,0 +1,135 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
#ifndef G4Evaporation_h
#define G4Evaporation_h 1
#include "globals.hh"
#include <rw/tvvector.h>
#include <rw/tpordvec.h>
#include "G4ios.hh"
#include "G4VEvaporation.hh"
#include "G4VEvaporationChannel.hh"
#include "G4EvaporationChannel.hh"
#include "G4CompetitiveFission.hh"
#include "G4PhotonEvaporation.hh"
#include "G4Fragment.hh"
#include "G4NucleiPropertiesTable.hh"
#include "G4NucleiProperties.hh"
#include "Randomize.hh"
class G4Evaporation : public G4VEvaporation
{
public:
G4Evaporation();
~G4Evaporation();
private:
G4Evaporation(const G4Evaporation &right);
const G4Evaporation & operator=(const G4Evaporation &right);
G4bool operator==(const G4Evaporation &right) const;
G4bool operator!=(const G4Evaporation &right) const;
public:
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus);
private:
enum {TotNumberOfChannels = 34,
NumberOfFissionChannel = TotNumberOfChannels-2,
NumberOfGammaChannel = TotNumberOfChannels-1,
NumExcitedStates = 35};
// Excitation energy levels for each channel
RWTValVector<G4double> ExcitEnergyChann00; // n
RWTValVector<G4double> ExcitEnergyChann01; // p
RWTValVector<G4double> ExcitEnergyChann02; // deuteron
RWTValVector<G4double> ExcitEnergyChann03; // triton
RWTValVector<G4double> ExcitEnergyChann04; // He3
RWTValVector<G4double> ExcitEnergyChann05; // alpha
RWTValVector<G4double> ExcitEnergyChann06; // He5
RWTValVector<G4double> ExcitEnergyChann07; // He6
RWTValVector<G4double> ExcitEnergyChann08; // Li5
RWTValVector<G4double> ExcitEnergyChann09; // Li5
RWTValVector<G4double> ExcitEnergyChann10;
RWTValVector<G4double> ExcitEnergyChann11;
RWTValVector<G4double> ExcitEnergyChann12;
RWTValVector<G4double> ExcitEnergyChann13;
RWTValVector<G4double> ExcitEnergyChann14;
RWTValVector<G4double> ExcitEnergyChann15;
RWTValVector<G4double> ExcitEnergyChann16;
RWTValVector<G4double> ExcitEnergyChann17;
RWTValVector<G4double> ExcitEnergyChann18;
RWTValVector<G4double> ExcitEnergyChann19;
RWTValVector<G4double> ExcitEnergyChann20;
RWTValVector<G4double> ExcitEnergyChann21;
RWTValVector<G4double> ExcitEnergyChann22;
RWTValVector<G4double> ExcitEnergyChann23;
RWTValVector<G4double> ExcitEnergyChann24;
RWTValVector<G4double> ExcitEnergyChann25;
RWTValVector<G4double> ExcitEnergyChann26;
RWTValVector<G4double> ExcitEnergyChann27;
RWTValVector<G4double> ExcitEnergyChann28;
RWTValVector<G4double> ExcitEnergyChann29;
RWTValVector<G4double> ExcitEnergyChann30;
RWTValVector<G4double> ExcitEnergyChann31;
// Spin of excitation energy levels for each channel
RWTValVector<G4int> ExcitSpinChann00;
RWTValVector<G4int> ExcitSpinChann01;
RWTValVector<G4int> ExcitSpinChann02;
RWTValVector<G4int> ExcitSpinChann03;
RWTValVector<G4int> ExcitSpinChann04;
RWTValVector<G4int> ExcitSpinChann05;
RWTValVector<G4int> ExcitSpinChann06;
RWTValVector<G4int> ExcitSpinChann07;
RWTValVector<G4int> ExcitSpinChann08;
RWTValVector<G4int> ExcitSpinChann09;
RWTValVector<G4int> ExcitSpinChann10;
RWTValVector<G4int> ExcitSpinChann11;
RWTValVector<G4int> ExcitSpinChann12;
RWTValVector<G4int> ExcitSpinChann13;
RWTValVector<G4int> ExcitSpinChann14;
RWTValVector<G4int> ExcitSpinChann15;
RWTValVector<G4int> ExcitSpinChann16;
RWTValVector<G4int> ExcitSpinChann17;
RWTValVector<G4int> ExcitSpinChann18;
RWTValVector<G4int> ExcitSpinChann19;
RWTValVector<G4int> ExcitSpinChann20;
RWTValVector<G4int> ExcitSpinChann21;
RWTValVector<G4int> ExcitSpinChann22;
RWTValVector<G4int> ExcitSpinChann23;
RWTValVector<G4int> ExcitSpinChann24;
RWTValVector<G4int> ExcitSpinChann25;
RWTValVector<G4int> ExcitSpinChann26;
RWTValVector<G4int> ExcitSpinChann27;
RWTValVector<G4int> ExcitSpinChann28;
RWTValVector<G4int> ExcitSpinChann29;
RWTValVector<G4int> ExcitSpinChann30;
RWTValVector<G4int> ExcitSpinChann31;
G4VEvaporationChannel * theChannels[TotNumberOfChannels];
};
#endif
@@ -0,0 +1,199 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
//
#ifndef G4EvaporationChannel_h
#define G4EvaporationChannel_h 1
#include "G4VEvaporationChannel.hh"
#include "G4VEmissionProbability.hh"
#include "G4EvaporationProbability.hh"
#include "G4VLevelDensityParameter.hh"
#include "G4EvaporationLevelDensityParameter.hh"
#include "G4NucleiProperties.hh"
#include "Randomize.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
#include <rw/tvvector.h>
class G4EvaporationChannel : public G4VEvaporationChannel
{
public:
// only available constructor
G4EvaporationChannel(const G4int theGamma,
const G4int theA,
const G4int theZ,
RWTValVector<G4double> * theExcitationEnergies,
RWTValVector<G4int> * theExcitationSpins);
// destructor
~G4EvaporationChannel();
private:
// default constructor
G4EvaporationChannel() {};
// copy constructor
G4EvaporationChannel(const G4EvaporationChannel & right);
const G4EvaporationChannel & operator=(const G4EvaporationChannel & right);
public:
G4bool operator==(const G4EvaporationChannel & right) const;
G4bool operator!=(const G4EvaporationChannel & right) const;
public:
void Initialize(const G4Fragment & fragment);
G4FragmentVector * BreakUp(const G4Fragment & theNucleus);
inline void SetEmissionStrategy(G4VEmissionProbability * aStrategy)
{
if (MyOwnEvaporationProbability) delete theEvaporationProbabilityPtr;
theEvaporationProbabilityPtr = aStrategy;
MyOwnEvaporationProbability = false;
}
inline void SetLevelDensityParameter(G4VLevelDensityParameter * aLevelDensity)
{
if (MyOwnLevelDensity) delete theLevelDensityPtr;
theLevelDensityPtr = aLevelDensity;
MyOwnLevelDensity = false;
}
inline G4double GetLevelDensityParameter(void) const { return LevelDensityParameter;}
private:
// This data member define the channel.
// They are intializated at object creation (constructor) time.
// Gamma is A_f(2S_f+1) factor, where A_f is fragment atomic number and S_f is fragment spin
G4int Gamma;
// Atomic Number
G4int A;
// Charge
G4int Z;
//
RWTValVector<G4double> * ExcitationEnergies;
//
RWTValVector<G4int> * ExcitationSpins;
// For evaporation probability calcualtion
G4bool MyOwnEvaporationProbability;
G4VEmissionProbability * theEvaporationProbabilityPtr;
// For Level Density calculation
G4bool MyOwnLevelDensity;
G4VLevelDensityParameter * theLevelDensityPtr;
G4double LevelDensityParameter;
//---------------------------------------------------
// This values depends on the nucleus that is being evaporated.
// They are calculated through the Initialize method which takes as parameters
// the atomic number, charge and excitation energy of nucleus.
// Residual Atomic Number
G4int AResidual;
// Residual Charge
G4int ZResidual;
// Coulomb Barrier
G4double CoulombBarrier;
// Binding Energy
G4double BindingEnergy;
// Emission Probability
G4double EmissionProbability;
// Maximal Kinetic Energy that can be carried by fragment
G4double MaximalKineticEnergy;
public:
inline G4int GetGamma(void) const
{return Gamma;}
inline G4int GetA(void) const
{return A;}
inline G4int GetZ(void) const
{return Z;}
inline G4double GetCoulombBarrier(void) const
{return CoulombBarrier;}
inline G4double GetBindingEnergy(void) const
{return BindingEnergy;}
inline G4double GetEmissionProbability(void) const
{return EmissionProbability;}
inline G4double GetExcitationEnergy(const G4int i) const
{
if (ExcitationEnergies != 0 && i < ExcitationEnergies->length())
return ExcitationEnergies->operator()(i);
else return 0.0;
}
inline G4int GetExcitationSpin(const G4int i) const
{
if (ExcitationSpins != 0 && i < ExcitationSpins->length())
return ExcitationSpins->operator()(i);
else return 0;
}
inline G4double GetMaximalKineticEnergy(void) const
{ return MaximalKineticEnergy; }
// ----------------------
inline G4int GetResidualA(void) const
{ return AResidual; }
inline G4int GetResidualZ(void) const
{ return ZResidual; }
private:
// Coulomb barrier calculation
G4double CalcCoulombBarrier(const G4int ARes, const G4int ZRes);
// Calculate Binding Energy for separate fragment from nucleus
G4double CalcBindingEnergy(const G4int anA, const G4int aZ);
// Calculate maximal kinetic energy that can be carried by fragment (in MeV)
G4double CalcMaximalKineticEnergy(const G4double U);
// Samples fragment kinetic energy (in MeV).
G4double CalcKineticEnergy(void);
// This has to be removed and put in Random Generator
G4ThreeVector IsotropicVector(const G4double Magnitude = 1.0);
};
#endif
@@ -0,0 +1,45 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
//
#ifndef G4EvaporationLevelDensityParameter_h
#define G4EvaporationLevelDensityParameter_h 1
#include "G4VLevelDensityParameter.hh"
class G4EvaporationLevelDensityParameter : public G4VLevelDensityParameter
{
public:
G4EvaporationLevelDensityParameter() : EvapLevelDensityParameter(0.125*(1./MeV)) {};
virtual ~G4EvaporationLevelDensityParameter() {};
private:
G4EvaporationLevelDensityParameter(const G4EvaporationLevelDensityParameter &right);
const G4EvaporationLevelDensityParameter & operator=(const G4EvaporationLevelDensityParameter &right);
G4bool operator==(const G4EvaporationLevelDensityParameter &right) const;
G4bool operator!=(const G4EvaporationLevelDensityParameter &right) const;
public:
G4double LevelDensityParameter(const G4int A,const G4int Z,const G4double U) const
{return EvapLevelDensityParameter;}
private:
const G4double EvapLevelDensityParameter;
};
#endif
@@ -0,0 +1,61 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
//
#ifndef G4EvaporationProbability_h
#define G4EvaporationProbability_h 1
#include "G4VEmissionProbability.hh"
#include "G4EvaporationChannel.hh"
class G4EvaporationProbability : public G4VEmissionProbability
{
public:
// Only available constructor
G4EvaporationProbability(G4VEvaporationChannel * aChannel)
{ theChannel = aChannel; };
~G4EvaporationProbability() {};
private:
// Default constructor
G4EvaporationProbability() {};
// Copy constructor
G4EvaporationProbability(const G4EvaporationProbability &right);
const G4EvaporationProbability & operator=(const G4EvaporationProbability &right);
G4bool operator==(const G4EvaporationProbability &right) const;
G4bool operator!=(const G4EvaporationProbability &right) const;
public:
G4double EmissionProbability(const G4Fragment & fragment, const G4double photonExcitation);
private:
G4double DostrovskyApproximation(const G4int A, const G4double U);
G4double BotvinaApproximation(const G4int A, const G4double U);
G4double NikolaiApproximation(const G4int A, const G4double U);
G4VEvaporationChannel * theChannel;
};
#endif
@@ -0,0 +1,201 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ExcitationHandler.hh,v 1.6 1998/12/12 12:34:57 larazb Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
// Modif (30 June 1998) by V. Lara:
// -Using G4ParticleTable and therefore G4IonTable
// it can return all kind of fragments produced in
// deexcitation
// -It uses default algorithms for:
// Evaporation: G4StatEvaporation
// MultiFragmentation: G4DummyMF (a dummy one)
// Fermi Breakup model: G4StatFermiBreakUp
#ifndef G4ExcitationHandler_h
#define G4ExcitationHandler_h 1
#include "G4MultiFragmentation.hh"
#include "G4VFermiBreakUp.hh"
#include "G4VEvaporation.hh"
#include "G4VPhotonEvaporation.hh"
#include "G4Fragment.hh"
#include "G4DynamicParticle.hh"
#include "G4DynamicParticleVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
// needed for default models
#include "G4Evaporation.hh"
#include "G4StatMF.hh"
#include "G4FermiBreakUp.hh"
#include "G4PhotonEvaporation.hh"
#include "G4IonConstructor.hh"
class G4ExcitationHandler
{
public:
G4ExcitationHandler();
~G4ExcitationHandler();
private:
G4ExcitationHandler(const G4ExcitationHandler &right);
const G4ExcitationHandler & operator=(const G4ExcitationHandler &right);
G4bool operator==(const G4ExcitationHandler &right) const;
G4bool operator!=(const G4ExcitationHandler &right) const;
public:
G4DynamicParticleVector * BreakItUp(const G4Fragment &theInitialState) const;
void SetEvaporation(G4VEvaporation *const value);
void SetMultiFragmentation(G4MultiFragmentation *const value);
void SetFermiModel(G4VFermiBreakUp *const value);
void SetPhotonEvaporation(G4VPhotonEvaporation * const value);
void SetMaxZForFermiBreakUp(G4int aZ);
void SetMaxAForFermiBreakUp(G4int anA);
void SetMaxAandZForFermiBreakUp(G4int anA,G4int aZ);
void SetMinEForMultiFrag(G4double anE);
private:
G4DynamicParticleVector * Transform(G4FragmentVector * theFragmentVector) const;
const G4VEvaporation * GetEvaporation() const;
const G4MultiFragmentation * GetMultiFragmentation() const;
const G4VFermiBreakUp * GetFermiModel() const;
const G4VPhotonEvaporation * GetPhotonEvaporation() const;
const G4int GetMaxZ() const;
const G4int GetMaxA() const;
const G4double GetMinE() const;
private:
G4VEvaporation *theEvaporation;
G4MultiFragmentation *theMultiFragmentation;
G4VFermiBreakUp *theFermiModel;
G4VPhotonEvaporation * thePhotonEvaporation;
G4int maxZForFermiBreakUp;
G4int maxAForFermiBreakUp;
G4double minEForMultiFrag;
G4ParticleTable *theTableOfParticles;
G4bool MyOwnEvaporationClass;
G4bool MyOwnMultiFragmentationClass;
G4bool MyOwnFermiBreakUpClass;
G4bool MyOwnPhotonEvaporationClass;
};
inline const G4VEvaporation * G4ExcitationHandler::GetEvaporation() const
{
return theEvaporation;
}
inline void G4ExcitationHandler::SetEvaporation(G4VEvaporation *const value)
{
if (theEvaporation != 0 && MyOwnEvaporationClass) delete theEvaporation;
MyOwnEvaporationClass = false;
theEvaporation = value;
}
inline const G4MultiFragmentation * G4ExcitationHandler::GetMultiFragmentation() const
{
return theMultiFragmentation;
}
inline void G4ExcitationHandler::SetMultiFragmentation(G4MultiFragmentation *const value)
{
if (theMultiFragmentation != 0 && MyOwnMultiFragmentationClass) delete theMultiFragmentation;
MyOwnMultiFragmentationClass = false;
theMultiFragmentation = value;
}
inline const G4VFermiBreakUp * G4ExcitationHandler::GetFermiModel() const
{
return theFermiModel;
}
inline void G4ExcitationHandler::SetFermiModel(G4VFermiBreakUp *const value)
{
if (theFermiModel != 0 && MyOwnFermiBreakUpClass) delete theFermiModel;
MyOwnFermiBreakUpClass = false;
theFermiModel = value;
}
inline const G4VPhotonEvaporation * G4ExcitationHandler::GetPhotonEvaporation() const
{
return thePhotonEvaporation;
}
inline void G4ExcitationHandler::SetPhotonEvaporation(G4VPhotonEvaporation *const value)
{
if (thePhotonEvaporation != 0 && MyOwnPhotonEvaporationClass) delete thePhotonEvaporation;
MyOwnPhotonEvaporationClass = false;
thePhotonEvaporation = value;
}
inline void G4ExcitationHandler::SetMaxZForFermiBreakUp(G4int aZ)
{
maxZForFermiBreakUp = aZ;
}
inline void G4ExcitationHandler::SetMaxAForFermiBreakUp(G4int anA)
{
maxAForFermiBreakUp = anA;
}
inline void G4ExcitationHandler::SetMaxAandZForFermiBreakUp(G4int anA, G4int aZ)
{
maxAForFermiBreakUp = anA;
maxZForFermiBreakUp = aZ;
}
inline void G4ExcitationHandler::SetMinEForMultiFrag(G4double anE)
{
// minEForMultiFrag = anE;
minEForMultiFrag = 1.0*GeV;
}
inline const G4int G4ExcitationHandler::GetMaxZ() const
{
return maxZForFermiBreakUp;
}
inline const G4int G4ExcitationHandler::GetMaxA() const
{
return maxAForFermiBreakUp;
}
inline const G4double G4ExcitationHandler::GetMinE() const
{
return minEForMultiFrag;
}
#endif
@@ -0,0 +1,40 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
#ifndef G4FermiBreakUp_h
#define G4FermiBreakUp_h 1
#include "G4VFermiBreakUp.hh"
#include "G4FermiConfiguration.hh"
#include "G4FermiConfigurationList.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
class G4FermiBreakUp : public G4VFermiBreakUp
{
public:
G4FermiBreakUp();
~G4FermiBreakUp();
private:
G4FermiBreakUp(const G4FermiBreakUp &right);
const G4FermiBreakUp & operator=(const G4FermiBreakUp &right);
G4bool operator==(const G4FermiBreakUp &right) const;
G4bool operator!=(const G4FermiBreakUp &right) const;
public:
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus);
};
#endif
@@ -0,0 +1,199 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
#ifndef G4FermiConfiguration_h
#define G4FermiConfiguration_h 1
#include "globals.hh"
#include "Randomize.hh"
#include "G4VFermiFragment.hh"
#include "G4StableFermiFragment.hh"
#include "G4B9FermiFragment.hh"
#include "G4Be8FermiFragment.hh"
#include "G4He5FermiFragment.hh"
#include "G4Li5FermiFragment.hh"
#include "G4ParticleMomentum.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
#include "G4Fragment.hh"
#include <rw/tvvector.h>
#include <rw/tvordvec.h>
static const G4int NumberOfFragments = 100;
class G4FermiConfiguration
{
public:
G4FermiConfiguration();
~G4FermiConfiguration();
G4FermiConfiguration(const G4FermiConfiguration &right);
const G4FermiConfiguration & operator=(const G4FermiConfiguration &right);
G4bool operator==(const G4FermiConfiguration &right) const;
G4bool operator!=(const G4FermiConfiguration &right) const;
public:
void Initialize(const G4int max);
G4bool SplitNucleus(const G4int A, const G4int Z);
G4double DecayProbability(const G4int A, const G4double TotalE);
G4FragmentVector * GetFragments(const G4Fragment & theNucleus);
private:
G4double CoulombBarrier(void);
// RWTPtrOrderedVector<G4ParticleMomentum>* FragmentsMomentum(G4double KineticEnergy);
RWTPtrOrderedVector<G4LorentzVector>* FragmentsMomentum(G4double KineticEnergy);
G4double RNKSI(const G4int K);
G4ParticleMomentum IsotropicVector(const G4double Magnitude = 1.0);
// Kappa = V/V_0 it is used in calculation of Coulomb energy
static const G4double Kappa;
static G4StableFermiFragment Fragment00;
static G4StableFermiFragment Fragment01;
static G4StableFermiFragment Fragment02;
static G4StableFermiFragment Fragment03;
static G4StableFermiFragment Fragment04;
static G4StableFermiFragment Fragment05;
static G4He5FermiFragment Fragment06; // He5
static G4Li5FermiFragment Fragment07; // Li5
static G4StableFermiFragment Fragment08;
static G4StableFermiFragment Fragment09;
static G4StableFermiFragment Fragment10;
static G4StableFermiFragment Fragment11;
static G4StableFermiFragment Fragment12;
static G4StableFermiFragment Fragment13;
static G4StableFermiFragment Fragment14;
static G4StableFermiFragment Fragment15;
static G4StableFermiFragment Fragment16;
static G4Be8FermiFragment Fragment17; // Be8
static G4StableFermiFragment Fragment18;
static G4B9FermiFragment Fragment19; // B9
static G4StableFermiFragment Fragment20;
static G4StableFermiFragment Fragment21;
static G4StableFermiFragment Fragment22;
static G4StableFermiFragment Fragment23;
static G4StableFermiFragment Fragment24;
static G4StableFermiFragment Fragment25;
static G4StableFermiFragment Fragment26;
static G4StableFermiFragment Fragment27;
static G4StableFermiFragment Fragment28;
static G4StableFermiFragment Fragment29;
static G4StableFermiFragment Fragment30;
static G4StableFermiFragment Fragment31;
static G4StableFermiFragment Fragment32;
static G4StableFermiFragment Fragment33;
static G4StableFermiFragment Fragment34;
static G4StableFermiFragment Fragment35;
static G4StableFermiFragment Fragment36;
static G4StableFermiFragment Fragment37;
static G4StableFermiFragment Fragment38;
static G4StableFermiFragment Fragment39;
static G4StableFermiFragment Fragment40;
static G4StableFermiFragment Fragment41;
static G4StableFermiFragment Fragment42;
static G4StableFermiFragment Fragment43;
static G4StableFermiFragment Fragment44;
static G4StableFermiFragment Fragment45;
static G4StableFermiFragment Fragment46;
static G4StableFermiFragment Fragment47;
static G4StableFermiFragment Fragment48;
static G4StableFermiFragment Fragment49;
static G4StableFermiFragment Fragment50;
static G4StableFermiFragment Fragment51;
static G4StableFermiFragment Fragment52;
static G4StableFermiFragment Fragment53;
static G4StableFermiFragment Fragment54;
static G4StableFermiFragment Fragment55;
static G4StableFermiFragment Fragment56;
static G4StableFermiFragment Fragment57;
static G4StableFermiFragment Fragment58;
static G4StableFermiFragment Fragment59;
static G4StableFermiFragment Fragment60;
static G4StableFermiFragment Fragment61;
static G4StableFermiFragment Fragment62;
static G4StableFermiFragment Fragment63;
static G4StableFermiFragment Fragment64;
static G4StableFermiFragment Fragment65;
static G4StableFermiFragment Fragment66;
static G4StableFermiFragment Fragment67;
static G4StableFermiFragment Fragment68;
static G4StableFermiFragment Fragment69;
static G4StableFermiFragment Fragment70;
static G4StableFermiFragment Fragment71;
static G4StableFermiFragment Fragment72;
static G4StableFermiFragment Fragment73;
static G4StableFermiFragment Fragment74;
static G4StableFermiFragment Fragment75;
static G4StableFermiFragment Fragment76;
static G4StableFermiFragment Fragment77;
static G4StableFermiFragment Fragment78;
static G4StableFermiFragment Fragment79;
static G4StableFermiFragment Fragment80;
static G4StableFermiFragment Fragment81;
static G4StableFermiFragment Fragment82;
static G4StableFermiFragment Fragment83;
static G4StableFermiFragment Fragment84;
static G4StableFermiFragment Fragment85;
static G4StableFermiFragment Fragment86;
static G4StableFermiFragment Fragment87;
static G4StableFermiFragment Fragment88;
static G4StableFermiFragment Fragment89;
static G4StableFermiFragment Fragment90;
static G4StableFermiFragment Fragment91;
static G4StableFermiFragment Fragment92;
static G4StableFermiFragment Fragment93;
static G4StableFermiFragment Fragment94;
static G4StableFermiFragment Fragment95;
static G4StableFermiFragment Fragment96;
static G4StableFermiFragment Fragment97;
static G4StableFermiFragment Fragment98;
static G4StableFermiFragment Fragment99;
static G4VFermiFragment * theListOfFragments[NumberOfFragments];
// G4VFermiFragment * theConfiguration[MaxConfigSize];
// G4int Index[MaxConfigSize];
RWTValOrderedVector<G4int> Index;
};
#endif
@@ -0,0 +1,61 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
#ifndef G4FermiConfigurationList_h
#define G4FermiConfigurationList_h 1
#include "globals.hh"
#include "G4FermiConfiguration.hh"
#include "Randomize.hh"
#include <rw/tvvector.h>
#include <rw/tvordvec.h>
class G4FermiConfigurationList
{
public:
G4FermiConfigurationList();
~G4FermiConfigurationList()
{};
private:
G4FermiConfigurationList(const G4FermiConfigurationList &right);
const G4FermiConfigurationList & operator=(const G4FermiConfigurationList &right);
G4bool operator==(const G4FermiConfigurationList &right) const;
G4bool operator!=(const G4FermiConfigurationList &right) const;
public:
G4bool Initialize(const G4int A, const G4int Z, const G4double TotalEnergyRF);
G4FermiConfiguration ChooseConfiguration(void);
private:
enum {MaxNumOfFragments = 6};
G4double TotNumOfConfigurations; // NumberOfFragments;
G4double NumOfConfigurations[MaxNumOfFragments]; // NumberOfChannelsPerFragment[MaxNumOfFragments];
RWTValOrderedVector<G4double> NormalizedWeights;
RWTValOrderedVector<G4FermiConfiguration> Configurations;
};
#endif
@@ -0,0 +1,44 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FissionBarrier.hh,v 1.1 1998/10/15 07:52:46 larazb Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
#ifndef G4FissionBarrier_h
#define G4FissionBarrier_h 1
#include "G4VFissionBarrier.hh"
#include "globals.hh"
class G4FissionBarrier : public G4VFissionBarrier
{
public:
G4FissionBarrier() {};
~G4FissionBarrier() {};
private:
G4FissionBarrier(const G4FissionBarrier & right);
const G4FissionBarrier & operator=(const G4FissionBarrier & right);
G4bool operator==(const G4FissionBarrier & right) const;
G4bool operator!=(const G4FissionBarrier & right) const;
public:
G4double FissionBarrier(const G4int A, const G4int Z);
private:
G4double BarashenkovFissionBarrier(const G4int A, const G4int Z);
};
#endif
@@ -0,0 +1,47 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
//
#ifndef G4FissionLevelDensityParameter_h
#define G4FissionLevelDensityParameter_h 1
#include "G4VLevelDensityParameter.hh"
#include "G4EvaporationLevelDensityParameter.hh"
class G4FissionLevelDensityParameter : public G4VLevelDensityParameter
{
public:
G4FissionLevelDensityParameter() {};
virtual ~G4FissionLevelDensityParameter() {};
private:
G4FissionLevelDensityParameter(const G4FissionLevelDensityParameter &right);
const G4FissionLevelDensityParameter & operator=(const G4FissionLevelDensityParameter &right);
G4bool operator==(const G4FissionLevelDensityParameter &right) const;
G4bool operator!=(const G4FissionLevelDensityParameter &right) const;
public:
G4double LevelDensityParameter(const G4int A,const G4int Z,const G4double U) const;
private:
G4EvaporationLevelDensityParameter theEvaporationLevelDensityParameter;
};
#endif
@@ -0,0 +1,77 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
//
#ifndef G4FissionParameters_h
#define G4FissionParameters_h 1
#include "globals.hh"
class G4FissionParameters
{
public:
// Only available constructor
G4FissionParameters(const G4int A, const G4int Z, const G4double ExEnergy, const G4double FissionBarrier);
~G4FissionParameters() {};
private:
// Default constructor
G4FissionParameters() {};
// Copy constructor
G4FissionParameters(const G4FissionParameters &right);
const G4FissionParameters & operator=(const G4FissionParameters &right);
G4bool operator==(const G4FissionParameters &right) const;
G4bool operator!=(const G4FissionParameters &right) const;
public:
inline G4double GetA1(void) const { return A1; }
inline G4double GetA2(void) const { return A2; }
inline G4double GetAs(void) const { return As; }
inline G4double GetSigma1(void) const { return Sigma1; }
inline G4double GetSigma2(void) const { return Sigma2; }
inline G4double GetSigmaS(void) const { return SigmaS; }
inline G4double GetW(void) const { return w; }
private:
// Mean numbers of the corresponding Gaussians for assymmetric
// fission
static const G4double A1;
static const G4double A2;
// Mean number for symmetric fission
G4double As;
// Dispersions of the corresponding Gaussians for assymmetric
// fission
G4double Sigma1;
G4double Sigma2;
// Dispersion for symmetric fission
G4double SigmaS;
// Weight which determines the relative contribution of symmetric
// and assymmetric components
G4double w;
};
#endif
@@ -0,0 +1,58 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
//
#ifndef G4FissionProbability_h
#define G4FissionProbability_h 1
#include "G4VEmissionProbability.hh"
#include "G4VEvaporationChannel.hh"
#include "G4EvaporationLevelDensityParameter.hh"
#include "G4FissionLevelDensityParameter.hh"
class G4FissionProbability : public G4VEmissionProbability
{
public:
// Only available constructor
G4FissionProbability(G4VEvaporationChannel * aChannel)
{ theChannel = aChannel; };
~G4FissionProbability() {};
private:
// Default constructor
G4FissionProbability() {};
// Copy constructor
G4FissionProbability(const G4FissionProbability &right);
const G4FissionProbability & operator=(const G4FissionProbability &right);
G4bool operator==(const G4FissionProbability &right) const;
G4bool operator!=(const G4FissionProbability &right) const;
public:
G4double EmissionProbability(const G4Fragment & fragment, const G4double photonExcitation);
private:
G4VEvaporationChannel * theChannel;
G4EvaporationLevelDensityParameter theEvapLDP;
G4FissionLevelDensityParameter theFissLDP;
};
#endif
@@ -0,0 +1,45 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
#ifndef G4He5FermiFragment_h
#define G4He5FermiFragment_h 1
#include "G4UnstableFermiFragment.hh"
#include "G4IonTable.hh"
class G4He5FermiFragment : public G4UnstableFermiFragment
{
public:
G4He5FermiFragment(const G4int anA, const G4int aZ, const G4int Pol, const G4double ExE):
G4UnstableFermiFragment(anA,aZ,Pol,ExE)
{};
~G4He5FermiFragment();
private:
G4He5FermiFragment();
G4He5FermiFragment(const G4He5FermiFragment &right);
const G4He5FermiFragment & operator=(const G4He5FermiFragment &right);
G4bool operator==(const G4He5FermiFragment &right) const;
G4bool operator!=(const G4He5FermiFragment &right) const;
public:
G4FragmentVector * GetFragment(const G4LorentzVector & aMomentum);
};
#endif
@@ -0,0 +1,45 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
#ifndef G4Li5FermiFragment_h
#define G4Li5FermiFragment_h 1
#include "G4UnstableFermiFragment.hh"
#include "G4IonTable.hh"
class G4Li5FermiFragment : public G4UnstableFermiFragment
{
public:
G4Li5FermiFragment(const G4int anA, const G4int aZ, const G4int Pol, const G4double ExE):
G4UnstableFermiFragment(anA,aZ,Pol,ExE)
{};
~G4Li5FermiFragment();
private:
G4Li5FermiFragment();
G4Li5FermiFragment(const G4Li5FermiFragment &right);
const G4Li5FermiFragment & operator=(const G4Li5FermiFragment &right);
G4bool operator==(const G4Li5FermiFragment &right) const;
G4bool operator!=(const G4Li5FermiFragment &right) const;
public:
G4FragmentVector * GetFragment(const G4LorentzVector & aMomentum);
};
#endif
@@ -0,0 +1,40 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4MultiFragmentation.hh,v 1.1 1998/08/22 08:53:36 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
#ifndef G4MultiFragmentation_h
#define G4MultiFragmentation_h 1
#include "G4FragmentVector.hh"
class G4MultiFragmentation
{
public:
G4MultiFragmentation();
virtual ~G4MultiFragmentation();
private:
G4MultiFragmentation(const G4MultiFragmentation &right);
const G4MultiFragmentation & operator=(const G4MultiFragmentation &right);
int operator==(const G4MultiFragmentation &right) const;
int operator!=(const G4MultiFragmentation &right) const;
public:
virtual G4FragmentVector * BreakItUp(const G4Fragment &theNucleus) = 0;
};
#endif
@@ -0,0 +1,99 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4NuclearLevel
//
// Author: Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 25 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4NUCLEARLEVEL_HH
#define G4NUCLEARLEVEL_HH
#include "globals.hh"
#include "G4NuclearLevel.hh"
#include "G4DataVector.hh"
class G4NuclearLevel
{
public:
G4NuclearLevel(const G4double energy, const G4DataVector& eGamma, const G4DataVector& wGamma);
G4NuclearLevel() {};
~G4NuclearLevel();
const G4DataVector& GammaEnergies() const;
const G4DataVector& GammaWeights() const;
const G4DataVector& GammaProbabilities() const;
const G4DataVector& GammaCumulativeProbabilities() const;
G4double Energy() const;
G4int NumberOfGammas() const;
void PrintAll() const;
G4bool operator==(const G4NuclearLevel &right) const;
G4bool operator!=(const G4NuclearLevel &right) const;
G4bool operator<(const G4NuclearLevel &right) const;
protected:
private:
// G4NuclearLevel(const G4NuclearLevel &right);
// const G4NuclearLevel& operator=(const G4NuclearLevel &right);
void MakeProbabilities();
void MakeCumProb();
G4DataVector _energies;
G4DataVector _weights;
G4DataVector _prob;
G4DataVector _cumProb;
G4double _energy;
G4int _nGammas;
};
#endif
@@ -0,0 +1,100 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4NuclearLevelManager
//
// Author: Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 25 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4NUCLEARLEVELMANAGER_HH
#define G4NUCLEARLEVELMANAGER_HH
#include "globals.hh"
#include "G4PtrLevelVector.hh"
#include "G4NuclearLevel.hh"
#include "G4ios.hh"
#include <fstream.h>
class G4NuclearLevelManager
{
public:
G4NuclearLevelManager();
G4NuclearLevelManager(G4int Z, G4int A);
~G4NuclearLevelManager();
void SetNucleus(G4int Z, G4int A);
G4bool IsValid(G4int Z, G4int A) const;
G4int NumberOfLevels() const;
const G4PtrLevelVector* GetLevels() const;
const G4NuclearLevel* NearestLevel(G4double energy, G4double eDiffMax=9999.*GeV) const;
const G4NuclearLevel* LowestLevel() const;
const G4NuclearLevel* HighestLevel() const;
G4double MinLevelEnergy() const;
G4double MaxLevelEnergy() const;
void PrintAll();
G4NuclearLevelManager(const G4NuclearLevelManager &right);
protected:
private:
const G4NuclearLevelManager& operator=(const G4NuclearLevelManager &right);
G4bool operator==(const G4NuclearLevelManager &right) const;
G4bool operator!=(const G4NuclearLevelManager &right) const;
G4bool Read(ifstream& aDataFile);
void MakeLevels();
G4int _A;
G4int _Z;
G4PtrLevelVector* _levels;
G4double _levelEnergy;
G4double _gammaEnergy;
G4double _probability;
};
#endif
@@ -0,0 +1,78 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4PhotonEvaporation
//
// Author: Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 23 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4PHOTONEVAPORATION_HH
#define G4PHOTONEVAPORATION_HH
#include "globals.hh"
#include "G4VPhotonEvaporation.hh"
#include "G4VEvaporationChannel.hh"
#include "G4VEmissionProbability.hh"
#include "G4VGammaDeexcitation.hh"
class G4Fragment;
class G4PhotonEvaporation : public G4VPhotonEvaporation, public G4VEvaporationChannel
{
public:
G4PhotonEvaporation();
virtual ~G4PhotonEvaporation();
virtual G4FragmentVector* BreakItUp(const G4Fragment& nucleus);
virtual void Initialize(const G4Fragment& fragment);
virtual G4FragmentVector* BreakUp(const G4Fragment& nucleus);
virtual G4double GetEmissionProbability() const;
virtual void SetEmissionStrategy(G4VEmissionProbability* probAlgorithm);
void SetVerboseLevel(G4int verbose);
private:
G4int _verbose;
G4bool _myOwnProbAlgorithm;
G4VEmissionProbability* _probAlgorithm;
G4VGammaDeexcitation* _discrDeexcitation;
G4VGammaDeexcitation* _contDeexcitation;
G4VGammaDeexcitation* _cdDeexcitation;
G4Fragment _nucleus;
G4double _gammaE;
G4PhotonEvaporation(const G4PhotonEvaporation &right);
const G4PhotonEvaporation& operator=(const G4PhotonEvaporation &right);
// MGP - Check == and != multiple inheritance... must be a mess!
G4bool operator==(const G4PhotonEvaporation &right) const;
G4bool operator!=(const G4PhotonEvaporation &right) const;
};
#endif
@@ -0,0 +1,37 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4PtrLevelVector
//
// Author: Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 25 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4PTRLEVELVECTOR_HH
#define G4PTRLEVELVECTOR_HH
class G4NuclearLevel;
#include <rw/tpsrtvec.h>
typedef RWTPtrSortedVector<G4NuclearLevel> G4PtrLevelVector;
#endif
@@ -0,0 +1,86 @@
//
// -----------------------------------------------------------------------
// HEP Random
// --- G4RandGeneralTmp ---
// class header file
// -----------------------------------------------------------------------
// Class defining methods for shooting generally distributed random values,
// given a user-defined probability distribution function.
// =======================================================================
// S.Magni & G.Pieri - Created: 29 April 1998
// G.Cosmo - Added constructor using default engine from the
// static generator: 20 Aug 1998
// =======================================================================
#ifndef G4RandGeneralTmp_h
#define G4RandGeneralTmp_h 1
#include "CLHEP/Random/Random.h"
class G4RandGeneralTmp : public HepRandom {
public:
G4RandGeneralTmp ( HepDouble* aProbFunc, HepInt theProbSize );
G4RandGeneralTmp ( HepRandomEngine& anEngine,
HepDouble* aProbFunc, HepInt theProbSize );
G4RandGeneralTmp ( HepRandomEngine* anEngine,
HepDouble* aProbFunc, HepInt theProbSize );
// These constructors should be used to instantiate a G4RandGeneralTmp
// distribution object defining a local engine for it.
// The static generator will be skeeped using the non-static methods
// defined below. In case no engine is specified in the constructor, the
// default engine used by the static generator is applied.
// If the engine is passed by pointer the corresponding engine object
// will be deleted by the G4RandGeneralTmp destructor.
// If the engine is passed by reference the corresponding engine object
// will not be deleted by the RandGauss destructor.
// The probability distribution function (Pdf) must be provided by the user
// as an array of positive real number. The array size must also be
// provided. The Pdf doesn't need to be normalized to 1.
virtual ~G4RandGeneralTmp();
// Destructor
// Methods to shoot random values using the static generator
// N.B.: The methods are NOT static since they use nonstatic members
// theIntegralPdf & nBins
inline HepDouble shoot();
inline void shootArray ( const HepInt size, HepDouble* vect);
// Methods to shoot random values using a given engine
// by-passing the static generator.
HepDouble shoot( HepRandomEngine* anEngine );
void shootArray ( HepRandomEngine* anEngine, const HepInt size,
HepDouble* vect );
// Methods using the localEngine to shoot random values, by-passing
// the static generator.
HepDouble fire();
void fireArray ( const HepInt size, HepDouble* vect);
HepDouble operator()();
private:
// Private copy constructor. Defining it here disallows use.
G4RandGeneralTmp(const G4RandGeneralTmp&){;}
HepRandomEngine* localEngine;
HepBoolean deleteEngine;
HepDouble* theIntegralPdf;
HepInt nBins;
};
#include "G4RandGeneralTmp.icc"
#endif
@@ -0,0 +1,19 @@
// -----------------------------------------------------------------------
// HEP Random
// --- RandGeneralTmp ---
// inlined functions implementation file
// -----------------------------------------------------------------------
// =======================================================================
// Gabriele Cosmo - Created: 20th August 1998
// =======================================================================
inline HepDouble G4RandGeneralTmp::shoot()
{
return fire();
}
inline void G4RandGeneralTmp::shootArray( const HepInt size, HepDouble* vect )
{
fireArray(size, vect);
}
@@ -0,0 +1,43 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
#ifndef G4StableFermiFragment_h
#define G4StableFermiFragment_h 1
#include "G4VFermiFragment.hh"
class G4StableFermiFragment : public G4VFermiFragment
{
public:
G4StableFermiFragment(const G4int anA, const G4int aZ, const G4int Pol, const G4double ExE):
G4VFermiFragment(anA,aZ,Pol,ExE)
{};
~G4StableFermiFragment();
private:
G4StableFermiFragment();
G4StableFermiFragment(const G4StableFermiFragment &right);
const G4StableFermiFragment & operator=(const G4StableFermiFragment &right);
G4bool operator==(const G4StableFermiFragment &right) const;
G4bool operator!=(const G4StableFermiFragment &right) const;
public:
G4FragmentVector * GetFragment(const G4LorentzVector & aMomentum);
};
#endif
@@ -0,0 +1,103 @@
#ifndef G4StatMF_h
#define G4StatMF_h 1
#include <rw/tvordvec.h>
#include "globals.hh"
#include "G4MultiFragmentation.hh"
#include "G4Fragment.hh"
#include "G4FragmentVector.hh"
#include "G4StatMFFragment.hh"
#include "G4StatMFParameters.hh"
#include "G4VStatMFCanonical.hh"
#include "G4StatMFMicrocanonical.hh"
#include "G4StatMFMacrocanonical.hh"
#include "G4NucleiProperties.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
#include "Randomize.hh"
class G4StatMF : public G4MultiFragmentation
{
public:
G4StatMF();
~G4StatMF();
private:
G4StatMF(const G4StatMF & right);
G4StatMF & operator=(const G4StatMF & right);
G4bool operator==(const G4StatMF & right);
G4bool operator!=(const G4StatMF & right);
public:
G4FragmentVector *BreakItUp(const G4Fragment &theNucleus);
private:
// This finds temperature of breaking channel.
G4bool FindTemperatureOfBreakingChannel(const G4Fragment & theFragment,
const G4double & Multiplicity,
G4double & Temperature,
G4double & EnergyCol);
// Calculate asymptotic fragments momenta
void CoulombImpulse(const G4Fragment & theFragment,
const G4int & NumberOfChargedFragments,
const G4int & Multiplicity,
const G4double & Temperature,
const G4double & CoulombEnergy,
G4ThreeVector * MomentumOfFragments);
// Randomly samples fragments positions inside prolongated ellipsoid
void Place(const G4Fragment & theFragment,
const G4int & Multiplicity,
G4ThreeVector * Position);
// This method will find a solution of Newton's equation of motion
// for fragments in the self-consistent time-dependent Coulomb field
void SolveEqOfMotion(G4ThreeVector * InitialPos,
G4ThreeVector * InitialVel,
G4ThreeVector * FinalVel,
const G4int & Multiplicity,
const G4double & CoulombEnergy,
const G4double & KineticEnergy);
// Calculates fragments momentum components at the breakup instant.
// Fragment kinetic energies will be calculated according to the
// Boltzamann distribution at given temperature.
void CalculateFragmentsMomentum(const G4int & INET,
const G4int & NFrags,
const G4double & T,
const G4double & TotKineticE,
G4ThreeVector * Momentum);
// Rotates a 3-vector P to close momentum triangle P + A + B = 0
G4ThreeVector Rotor(const G4ThreeVector & P,
const G4ThreeVector & A,
const G4ThreeVector & B);
G4double CalculateFragmentExcitationEnergy(const G4int & index, const G4double & T);
// Samples a isotropic random vectorwith a magnitud given by Magnitude.
// By default Magnitude = 1
G4ThreeVector IsotropicVector(const G4double Magnitude = 1.0);
private:
// G4StatMFMicrocanonical * theMicrocanonicalSim;
// G4StatMFMacrocanonical * theMacrocanonicalSim;
G4VStatMFCanonical * theSim;
};
#endif
@@ -0,0 +1,127 @@
#ifndef G4StatMFFragment_h
#define G4StatMFFragment_h 1
#include "G4StatMFParameters.hh"
class G4StatMFFragment {
public:
// default constructor
G4StatMFFragment():
InvLevelDensity(0.0),
ZARatio(0.0),
DegeneracyFactor(0.0),
Multiplicity(0.0),
A(0.0),
Z(0.0),
Energy(0.0)
{};
// destructor
~G4StatMFFragment() {};
private:
// copy constructor
G4StatMFFragment(const G4StatMFFragment & right);
// operators
const G4StatMFFragment & operator=(const G4StatMFFragment & right);
public:
G4bool operator==(const G4StatMFFragment & right) const;
G4bool operator!=(const G4StatMFFragment & right) const;
private:
// Inverse Level Density
G4double InvLevelDensity;
// Z/A ratio
G4double ZARatio;
// Degeneracy Factor
G4double DegeneracyFactor;
// Fragments Multiplicitie
G4double Multiplicity;
// Atomic number
G4double A;
// Charge
G4double Z;
// Energy
G4double Energy;
public:
void SetInvLevelDensity(const G4double value) {
InvLevelDensity = value;
}
void SetInvLevelDensity(const G4int value) {
//
if (value == 0) InvLevelDensity = 0.0;
else InvLevelDensity = G4StatMFParameters::GetEpsilon0()/
(1.0+0.002*((value+1.0)/25.0)*((value+1.0)/25.0));
}
const G4double GetInvLevelDensity() const {
return InvLevelDensity;
}
void SetZARatio(const G4double value) {
ZARatio = value;
}
const G4double GetZARatio() const {
return ZARatio;
}
void SetDegeneracyFactor(const G4double value) {
DegeneracyFactor = value;
}
const G4double GetDegeneracyFactor() const {
return DegeneracyFactor;
}
void SetMultiplicity(const G4double value) {
Multiplicity = value;
}
const G4double GetMultiplicity() const {
return Multiplicity;
}
void SetA(const G4double value) {
A = value;
}
const G4double GetA() const {
return A;
}
void SetZ(const G4double value) {
Z = value;
}
const G4double GetZ() const {
return Z;
}
void SetEnergy(const G4double value) {
Energy = value;
}
const G4double GetEnergy() const {
return Energy;
}
};
#endif
@@ -0,0 +1,94 @@
#ifndef G4StatMFMacrocanonical_h
#define G4StatMFMacrocanonical_h 1
#include <rw/tvordvec.h>
#include "G4Fragment.hh"
#include "G4StatMFFragment.hh"
#include "G4StatMFParameters.hh"
#include "G4VStatMFCanonical.hh"
#include "Randomize.hh"
class G4StatMFMacrocanonical : public G4VStatMFCanonical {
public:
// G4StatMFMacrocanonical class must be initialized with a G4Fragment.
G4StatMFMacrocanonical(const G4Fragment & theFragment);
// destructor
~G4StatMFMacrocanonical();
private:
// default constructor
G4StatMFMacrocanonical() {};
// copy constructor
G4StatMFMacrocanonical(const G4StatMFMacrocanonical &right) {};
// operators
G4StatMFMacrocanonical & operator=(const G4StatMFMacrocanonical & right);
G4bool operator==(const G4StatMFMacrocanonical & right) const;
G4bool operator!=(const G4StatMFMacrocanonical & right) const;
public:
// Choice of fragment atomic numbers and charges.
void ChooseAandZ(const G4Fragment &theFragment);
private:
// Initailization method
void Initialize(const G4Fragment & theFragment);
//
void CalculateTemperature(const G4Fragment & theFragment);
// Calculates excitation energy per nucleon and summed fragment multiplicity and entropy
void FragmentsExcitationEnergyAndEntropy(const G4Fragment & theFragment,
const G4double Kappa,
G4double & ExcitEnergyPerNucleon,
G4double & TotalMultiplicity);
// This calculates fragment charges over fragment atomic numbers
void CalculateZARatio(const G4Fragment & theFragment, const G4double & Kappa);
//
void CalculateMultiplicities(const G4Fragment & theFragment, const G4double & Kappa);
// Calculates fragment multiplicities
void MeanFragmentMultiplicities(const G4Fragment & theFragment, const G4double & Kappa);
// Calculate Fragment energies at actual temperature
void FragmentEnergies(const G4Fragment & theFragment,const G4double & Kappa);
// Calculates summed fragments entropy
G4double TotalFragmentsEntropy(const G4double & A, const G4double & Kappa);
// Determines fragments multiplicities and compute total fragment multiplicity
G4double ChooseA(const G4double A, RWTValVector<G4double> & ANumbers);
//
void ChooseZ(const G4int & Z, const G4double Multiplicity);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Chemical Potential \mu
G4double ChemPotentialMu;
// Chemical Potential \nu
G4double ChemPotentialNu;
//
G4double YN, YP, Y2, Y3, Y4;
};
#endif
@@ -0,0 +1,109 @@
#ifndef G4StatMFMicrocanonical_h
#define G4StatMFMicrocanonical_h 1
//#include <rw/tvvector.h>
#include <rw/tvordvec.h>
#include "G4Fragment.hh"
#include "G4StatMFFragment.hh"
#include "G4StatMFParameters.hh"
#include "G4VStatMFCanonical.hh"
#include "Randomize.hh"
//class G4StatMF1DVector : public RWTValVector<G4int> {
//public:
// G4StatMF1DVector() {};
// G4StatMF1DVector(G4int n):RWTValVector<G4int>(n) {};
//};
class G4StatMFMicrocanonical : public G4VStatMFCanonical {
public:
// G4StatMFMicrocanonical class must be initialized with a G4Fragment.
G4StatMFMicrocanonical(const G4Fragment & theFragment);
// destructor
~G4StatMFMicrocanonical();
private:
// default constructor
G4StatMFMicrocanonical() {};
// copy constructor
G4StatMFMicrocanonical(const G4StatMFMicrocanonical &right) {};
// operators
G4StatMFMicrocanonical & operator=(const G4StatMFMicrocanonical & right);
G4bool operator==(const G4StatMFMicrocanonical & right) const;
G4bool operator!=(const G4StatMFMicrocanonical & right) const;
public:
// Choice of fragment atomic numbers and charges.
void ChooseAandZ(const G4Fragment &theFragment);
private:
// Initailization method
void Initialize(const G4Fragment & theFragment);
// Calculate Entropy of Compound Nucleus
G4double CalcEntropyOfCompoundNucleus(const G4Fragment & theFragment, G4double & TConf);
G4bool DistributeNucleonsBetweenFragments(const G4int & k, G4int * ANumbers);
G4double CalcFragmentsConfigProbability(const G4Fragment & theFragment, const G4int & M,
const G4int * ANumbers, const G4double & SCompound);
G4double CalcFreeInternalEnergy(const G4Fragment & theFragment, const G4double & T);
// Gives fragments charges
void ChooseZ(const G4Fragment & theFragment, const G4int & FragmentMultiplicity);
// -----------
G4double CalcEnergyConfiguration(const G4double A, const G4double Z, const G4int M,
G4double * ECOLA, G4double * EA, const G4int * Anumbers,
const G4double T);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Statistical weights
G4double W, WW2, WW3, WW4;
RWTValOrderedVector<G4double> W2, W3, W4;
// Number of configurations for breakups with multiplicities 2, 3 and 4
G4int M2, M3, M4;
// Atomic numbers of fragments for each configuration with multiplicities 2, 3 and 4
// RWTValOrderedVector<G4StatMF1DVector> ANum2;
// RWTValOrderedVector< RWTValVector<G4int> > ANum2;
RWTValOrderedVector< G4int* > ANum2;
// RWTValOrderedVector<G4StatMF1DVector> ANum3;
// RWTValOrderedVector< RWTValVector<G4int> > ANum3;
RWTValOrderedVector< G4int* > ANum3;
// RWTValOrderedVector<G4StatMF1DVector> ANum4;
// RWTValOrderedVector< RWTValVector<G4int> > ANum4;
RWTValOrderedVector< G4int* > ANum4;
// Statistical weight of compound nucleus
G4double WCompoundNucleus;
};
#endif
@@ -0,0 +1,67 @@
#ifndef G4StatMFParameters_h
#define G4StatMFParameters_h 1
#include "globals.hh"
class G4StatMFParameters
{
private:
static G4StatMFParameters theStatMFParameters;
// +----------------------+
// | Constant Parameters: |
// +----------------------+
// Kappa is used for calculate volume V_f for translational motion of fragments
static const G4double Kappa;
// KappaCoulomb is used for calculate Coulomb term energy
static const G4double KappaCoulomb;
// Inverse level density
static const G4double Epsilon0;
// Bethe-Weizsacker coefficients
static const G4double E0;
static const G4double Beta0;
static const G4double Gamma0;
// Critical temperature (for liquid-gas phase transitions)
static const G4double CriticalTemp;
// Nuclear radius
static const G4double r0;
// default constructor
G4StatMFParameters()
// :
// Kappa(1.0),
// KappaCoulomb(2.0),
// Epsilon0(16.0), // MeV
// E0(16.0), // MeV
// Beta0(18.0), // MeV
// Gamma0(25.0), // MeV
// CriticalTemp(18.0), // MeV
// r0(1.17) // fm
{}
public:
~G4StatMFParameters() {};
static G4StatMFParameters * GetAddress();
static G4double GetKappa() { return Kappa; }
static G4double GetKappaCoulomb() { return KappaCoulomb; }
static G4double GetEpsilon0() { return Epsilon0; }
static G4double GetE0() { return E0; }
static G4double GetBeta0() { return Beta0; }
static G4double GetGamma0() { return Gamma0; }
static G4double GetCriticalTemp() { return CriticalTemp; }
static G4double Getr0() { return r0; }
};
#endif
@@ -0,0 +1,52 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
#ifndef G4UnstableFermiFragment_h
#define G4UnstableFermiFragment_h 1
#include "G4VFermiFragment.hh"
#include "Randomize.hh"
class G4UnstableFermiFragment : public G4VFermiFragment
{
public:
G4UnstableFermiFragment(const G4int anA, const G4int aZ, const G4int Pol, const G4double ExE):
G4VFermiFragment(anA,aZ,Pol,ExE)
{};
~G4UnstableFermiFragment();
protected:
G4UnstableFermiFragment();
private:
G4UnstableFermiFragment(const G4UnstableFermiFragment &right);
const G4UnstableFermiFragment & operator=(const G4UnstableFermiFragment &right);
G4bool operator==(const G4UnstableFermiFragment &right) const;
G4bool operator!=(const G4UnstableFermiFragment &right) const;
public:
RWTPtrOrderedVector<G4LorentzVector> *
FragmentsMomentum(G4double KinE, const G4int K, const G4double * Masses);
private:
G4double RNKSI(const G4int K);
G4ParticleMomentum IsotropicVector(const G4double Magnitude = 1.0);
};
#endif
@@ -0,0 +1,41 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
//
#ifndef G4VEmissionProbability_h
#define G4VEmissionProbability_h 1
#include "globals.hh"
#include "G4Fragment.hh"
class G4VEmissionProbability
{
public:
G4VEmissionProbability() {};
virtual ~G4VEmissionProbability() {}; // *
private:
G4VEmissionProbability(const G4VEmissionProbability &right);
const G4VEmissionProbability & operator=(const G4VEmissionProbability &right);
G4bool operator==(const G4VEmissionProbability &right) const;
G4bool operator!=(const G4VEmissionProbability &right) const;
public:
virtual G4double EmissionProbability(const G4Fragment & fragment, const G4double photonExcitation) = 0;
};
#endif
@@ -0,0 +1,41 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998) written from G4Evaporation.hh (May 1998)
//
#ifndef G4VEvaporation_h
#define G4VEvaporation_h 1
#include "globals.hh"
#include "G4Fragment.hh"
class G4VEvaporation
{
public:
G4VEvaporation() {};
virtual ~G4VEvaporation() {}; // *
private:
G4VEvaporation(const G4VEvaporation &right);
const G4VEvaporation & operator=(const G4VEvaporation &right);
G4bool operator==(const G4VEvaporation &right) const;
G4bool operator!=(const G4VEvaporation &right) const;
public:
virtual G4FragmentVector * BreakItUp(const G4Fragment &theNucleus) = 0;
};
#endif
@@ -0,0 +1,54 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
//
#ifndef G4VEvaporationChannel_h
#define G4VEvaporationChannel_h 1
#include "globals.hh"
#include "G4Fragment.hh"
class G4VEvaporationChannel
{
public:
G4VEvaporationChannel() {};
virtual ~G4VEvaporationChannel() {};
private:
G4VEvaporationChannel(const G4VEvaporationChannel & right);
const G4VEvaporationChannel & operator=(const G4VEvaporationChannel & right);
public:
G4bool operator==(const G4VEvaporationChannel & right) const;
G4bool operator!=(const G4VEvaporationChannel & right) const;
public:
virtual void Initialize(const G4Fragment & fragment) = 0;
virtual G4FragmentVector * BreakUp(const G4Fragment & theNucleus) = 0;
virtual G4double GetEmissionProbability(void) const = 0;
virtual inline G4int GetA(void) const { return 0; }
virtual inline G4int GetZ(void) const { return 0; }
virtual inline G4int GetResidualA(void) const { return 0; }
virtual inline G4int GetResidualZ(void) const { return 0; }
virtual inline G4int GetGamma(void) const { return 0; }
virtual inline G4double GetLevelDensityParameter(void) const { return 0.0; }
virtual inline G4double GetCoulombBarrier(void) const { return 0.0; }
virtual inline G4double GetMaximalKineticEnergy(void) const { return 0.0; };
virtual inline G4double GetFissionBarrier(void) const { return 0.0;}
};
#endif
@@ -0,0 +1,37 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
#ifndef G4VFermiBreakUp_h
#define G4VFermiBreakUp_h 1
#include "globals.hh"
#include "G4FragmentVector.hh"
class G4VFermiBreakUp
{
public:
G4VFermiBreakUp();
virtual ~G4VFermiBreakUp();
private:
G4VFermiBreakUp(const G4VFermiBreakUp &right);
const G4VFermiBreakUp & operator=(const G4VFermiBreakUp &right);
G4bool operator==(const G4VFermiBreakUp &right) const;
G4bool operator!=(const G4VFermiBreakUp &right) const;
public:
virtual G4FragmentVector * BreakItUp(const G4Fragment &theNucleus) = 0;
};
#endif
@@ -0,0 +1,71 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
#ifndef G4VFermiFragment_h
#define G4VFermiFragment_h 1
#include "G4FragmentVector.hh"
#include "G4NucleiProperties.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
class G4VFermiFragment
{
public:
G4VFermiFragment(const G4int anA, const G4int aZ, const G4int Pol, const G4double ExE):
A(anA),
Z(aZ),
Polarization(Pol),
ExcitEnergy(ExE)
{}
virtual ~G4VFermiFragment() {};
protected:
G4VFermiFragment() {};
private:
G4VFermiFragment(const G4VFermiFragment &right);
const G4VFermiFragment & operator=(const G4VFermiFragment &right);
G4bool operator==(const G4VFermiFragment &right) const;
G4bool operator!=(const G4VFermiFragment &right) const;
public:
virtual G4FragmentVector * GetFragment(const G4LorentzVector & aMomentum) = 0;
G4int GetA(void) {return A;}
G4int GetZ(void) {return Z;}
G4int GetPolarization(void) {return Polarization;}
G4double GetExcitationEnergy(void) {return ExcitEnergy;}
G4double GetFragmentMass(void){
return G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z,A) + ExcitEnergy;
}
protected:
G4int A;
G4int Z;
G4int Polarization;
G4double ExcitEnergy;
};
#endif
@@ -0,0 +1,39 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VFissionBarrier.hh,v 1.2 1998/11/13 17:38:59 larazb Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
#ifndef G4VFissionBarrier_h
#define G4VFissionBarrier_h 1
#include "globals.hh"
class G4VFissionBarrier
{
public:
G4VFissionBarrier() {};
virtual ~G4VFissionBarrier() {};
private:
G4VFissionBarrier(const G4VFissionBarrier & right);
const G4VFissionBarrier & operator=(const G4VFissionBarrier & right);
G4bool operator==(const G4VFissionBarrier & right) const;
G4bool operator!=(const G4VFissionBarrier & right) const;
public:
virtual G4double FissionBarrier(const G4int A, const G4int Z) = 0;
};
#endif
@@ -0,0 +1,99 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4VGammaDeexcitation
//
// Author: Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 23 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4VGAMMADEEXCITATION_HH
#define G4VGAMMADEEXCITATION_HH
#include "globals.hh"
#include "G4VGammaTransition.hh"
#include "G4Fragment.hh"
#include "G4FragmentVector.hh"
class G4VGammaDeexcitation
{
public:
G4VGammaDeexcitation();
virtual ~G4VGammaDeexcitation();
virtual G4VGammaTransition* CreateTransition() = 0;
virtual G4bool CanDoTransition() const = 0;
// Single gamma transition
virtual G4FragmentVector* DoTransition();
// Chain of gamma transitions
virtual G4FragmentVector* DoChain();
virtual G4Fragment* GenerateGamma();
virtual const G4Fragment& GetNucleus() const;
virtual void SetNucleus(const G4Fragment& nucleus);
virtual void SetVerboseLevel(G4int verbose);
protected:
void Initialize();
void UpdateNucleus(const G4Fragment* gamma);
void Update(const G4Fragment* gamma);
G4VGammaTransition* _transition; // Owned pointer
G4int _verbose;
private:
G4Fragment _nucleus;
G4VGammaDeexcitation(const G4VGammaDeexcitation &right);
const G4VGammaDeexcitation& operator=(const G4VGammaDeexcitation &right);
G4bool operator==(const G4VGammaDeexcitation &right) const;
G4bool operator!=(const G4VGammaDeexcitation &right) const;
};
#endif
@@ -0,0 +1,59 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4VGammaTransition
//
// Author: Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 23 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4VGAMMATRANSITION_HH
#define G4VGAMMATRANSITION_HH
#include "globals.hh"
class G4VGammaTransition
{
public:
G4VGammaTransition() {};
virtual ~G4VGammaTransition() {};
virtual G4double GammaEnergy() = 0;
virtual G4double GetEnergyTo() const = 0;
virtual void SetEnergyFrom(const G4double energy) = 0;
private:
G4VGammaTransition(const G4VGammaTransition &right);
const G4VGammaTransition& operator=(const G4VGammaTransition &right);
G4bool operator==(const G4VGammaTransition &right) const;
G4bool operator!=(const G4VGammaTransition &right) const;
protected:
G4int _verbose;
};
#endif
@@ -0,0 +1,40 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
//
#ifndef G4VLevelDensityParameter_h
#define G4VLevelDensityParameter_h 1
#include "globals.hh"
class G4VLevelDensityParameter
{
public:
G4VLevelDensityParameter() {};
virtual ~G4VLevelDensityParameter() {};
private:
G4VLevelDensityParameter(const G4VLevelDensityParameter &right);
const G4VLevelDensityParameter & operator=(const G4VLevelDensityParameter &right);
G4bool operator==(const G4VLevelDensityParameter &right) const;
G4bool operator!=(const G4VLevelDensityParameter &right) const;
public:
virtual G4double LevelDensityParameter(const G4int A,const G4int Z,const G4double U) const = 0;
};
#endif
@@ -0,0 +1,50 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4VPhotonEvaporation
//
// Author: Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 23 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
#ifndef G4VPHOTONEVAPORATION_HH
#define G4VPHOTONEVAPORATION_HH
#include "globals.hh"
#include "G4Fragment.hh"
class G4VPhotonEvaporation
{
public:
G4VPhotonEvaporation() {};
virtual ~G4VPhotonEvaporation() {};
G4bool operator==(const G4VPhotonEvaporation &right) const;
G4bool operator!=(const G4VPhotonEvaporation &right) const;
virtual G4FragmentVector* BreakItUp(const G4Fragment &theNucleus) = 0;
private:
G4VPhotonEvaporation(const G4VPhotonEvaporation &right);
const G4VPhotonEvaporation& operator=(const G4VPhotonEvaporation &right);
};
#endif
@@ -0,0 +1,137 @@
#ifndef G4VStatMFCanonical_h
#define G4VStatMFCanonical_h 1
#include <rw/tvordvec.h>
#include "G4Fragment.hh"
#include "G4StatMFFragment.hh"
#include "G4StatMFParameters.hh"
#include "Randomize.hh"
class G4VStatMFCanonical
{
public:
G4VStatMFCanonical() {};
virtual ~G4VStatMFCanonical() {};
private:
// copy constructor
G4VStatMFCanonical(const G4VStatMFCanonical & right) {};
// operators
G4VStatMFCanonical & operator=(const G4VStatMFCanonical & right);
G4bool operator==(const G4VStatMFCanonical & right);
G4bool operator!=(const G4VStatMFCanonical & right);
public:
// Choice of fragment atomic numbers and charges
virtual void ChooseAandZ(const G4Fragment & theFragment) = 0;
G4double GetMeanMultiplicity(void) const {return MeanMultiplicity;}
G4double GetMeanTemperature(void) const { return MeanTemperature; }
G4double GetMeanEntropy(void) const { return MeanEntropy; }
G4int GetMultiplicity(void) const { return Multiplicity; }
G4int GetFragmentA(const G4int & i) const
{
if (i < FragmentsA.entries() && i >= 0) return FragmentsA(i);
else {
cout << "G4VStatMFCanonical::GetFragmentA: trying to get access to fragment "
<< i << " from a total of "
<< FragmentsZ.entries() << " fragments" << endl;
return -1;
}
}
G4int GetFragmentZ(const G4int & i) const
{
if (i < FragmentsZ.entries() && i >= 0) return FragmentsZ(i);
else {
cout << "G4VStatMFCanonical::GetFragmentZ: trying to get access to fragment "
<< i << " from a total of "
<< FragmentsZ.entries() << " fragments" << endl;
return -1;
}
}
G4double GetFragmentInvLevelDensity(const G4int & i) const
{
if (i < theChannels.length() && i >= 0) return theChannels(i)->GetInvLevelDensity();
else {
cout << "G4VStatMFCanonical::GetFragmentInvLevelDensity: trying to get access to channel "
<< i << " from a total of "
<< theChannels.length() << " channels." << endl;
return 0;
}
}
void SortFragments(void);
G4int GetNumOfNeutrons(void) const { return NumOfNeutrons; }
G4int GetNumOfCharged(void) const { return NumOfCharged; }
G4int GetOrderedA(const G4int & i) const
{
if (i < OrderedA.entries()) return OrderedA(i);
else return 0;
}
G4int GetOrderedZ(const G4int & i) const
{
if (i < OrderedZ.entries()) return OrderedZ(i);
else return 0;
}
G4double Beta(const G4double & T) const ;
G4double DBetaDT(const G4double & T) const ;
protected:
// the possible channels
RWTPtrOrderedVector<G4StatMFFragment> theChannels;
// Free internal energy at temperature T = 0
G4double FreeInternalE0;
// Mean breakup multiplicity
G4double MeanMultiplicity;
// Mean channel temperature
G4double MeanTemperature;
// Mean channel entropy
G4double MeanEntropy;
// Multiplicity
G4int Multiplicity;
// Fragment Atomic Numbers
RWTValOrderedVector<G4int> FragmentsA;
// Fragment Charges
RWTValOrderedVector<G4int> FragmentsZ;
G4int NumOfNeutrons;
G4int NumOfCharged;
RWTValOrderedVector<G4int> OrderedA;
RWTValOrderedVector<G4int> OrderedZ;
};
#endif
@@ -0,0 +1,96 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
#include "G4B9FermiFragment.hh"
G4B9FermiFragment::G4B9FermiFragment()
{
}
G4B9FermiFragment::G4B9FermiFragment(const G4B9FermiFragment &right)
{
G4Exception("G4B9FermiFragment::copy_constructor meant to not be accessable");
}
G4B9FermiFragment::~G4B9FermiFragment()
{
}
const G4B9FermiFragment & G4B9FermiFragment::operator=(const G4B9FermiFragment &right)
{
G4Exception("G4B9FermiFragment::operator= meant to not be accessable");
return *this;
}
G4bool G4B9FermiFragment::operator==(const G4B9FermiFragment &right) const
{
return false;
}
G4bool G4B9FermiFragment::operator!=(const G4B9FermiFragment &right) const
{
return true;
}
G4FragmentVector * G4B9FermiFragment::GetFragment(const G4LorentzVector & aMomentum)
// B9 ----> alpha + alpha + proton
{
const G4int NumSubFrag = 3;
G4double Masses[NumSubFrag];
G4double Charges[NumSubFrag];
G4double AtomNum[NumSubFrag];
Masses[0] = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(2,4); // alpha
Masses[1] = Masses[0]; // alpha
Masses[2] = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(1,1); // proton
AtomNum[0] = 4;
AtomNum[1] = 4;
AtomNum[2] = 1;
Charges[0] = 2;
Charges[1] = 2;
Charges[2] = 1;
// G4double AvalKineticE = G4NucleiPropertiesTable::GetMassExcess(Z,A) + ExcitEnergy - // B9
// G4NucleiPropertiesTable::GetMassExcess(1,1) - // proton
// 2.0*G4NucleiPropertiesTable::GetMassExcess(2,4);
G4double AvalKineticE = sqrt(aMomentum.e()*aMomentum.e() -
aMomentum.vect().mag2()) - // B9
Masses[2] - // proton
2.0*Masses[0];
RWTPtrOrderedVector<G4LorentzVector> * SubFragsMomentum =
FragmentsMomentum(AvalKineticE, NumSubFrag,Masses);
G4FragmentVector * theResult = new G4FragmentVector;
for (G4int i = 0; i < NumSubFrag; i++) {
// Lorentz boost
SubFragsMomentum->at(i)->boost(aMomentum.boostVector());
theResult->insert(new G4Fragment(AtomNum[i],Charges[i],*(SubFragsMomentum->at(i))));
}
SubFragsMomentum->clearAndDestroy();
delete SubFragsMomentum;
return theResult;
}
@@ -0,0 +1,92 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Nov 1998)
#include "G4Be8FermiFragment.hh"
G4Be8FermiFragment::G4Be8FermiFragment()
{
}
G4Be8FermiFragment::G4Be8FermiFragment(const G4Be8FermiFragment &right)
{
G4Exception("G4Be8FermiFragment::copy_constructor meant to not be accessable");
}
G4Be8FermiFragment::~G4Be8FermiFragment()
{
}
const G4Be8FermiFragment & G4Be8FermiFragment::operator=(const G4Be8FermiFragment &right)
{
G4Exception("G4Be8FermiFragment::operator= meant to not be accessable");
return *this;
}
G4bool G4Be8FermiFragment::operator==(const G4Be8FermiFragment &right) const
{
return false;
}
G4bool G4Be8FermiFragment::operator!=(const G4Be8FermiFragment &right) const
{
return true;
}
G4FragmentVector * G4Be8FermiFragment::GetFragment(const G4LorentzVector & aMomentum)
// Be8 ----> alpha + alpha
{
const G4int NumSubFrag = 2;
G4double Masses[NumSubFrag];
G4double Charges[NumSubFrag];
G4double AtomNum[NumSubFrag];
Masses[0] = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(2,4); // alpha
Masses[1] = Masses[0]; // alpha
AtomNum[0] = 4;
AtomNum[1] = 4;
Charges[0] = 2;
Charges[1] = 2;
// G4double AvalKineticE = G4NucleiPropertiesTable::GetMassExcess(Z,A) + ExcitEnergy - // Be8
// 2.0*G4NucleiPropertiesTable::GetMassExcess(2,4); // alphas
G4double AvalKineticE = sqrt(aMomentum.e()*aMomentum.e() -
aMomentum.vect().mag2()) -// Be8
2.0*AtomNum[0]; // alphas
RWTPtrOrderedVector<G4LorentzVector> * SubFragsMomentum =
FragmentsMomentum(AvalKineticE, NumSubFrag,Masses);
G4FragmentVector * theResult = new G4FragmentVector;
for (G4int i = 0; i < NumSubFrag; i++) {
// Lorentz boost
SubFragsMomentum->at(i)->boost(aMomentum.boostVector());
theResult->insert(new G4Fragment(AtomNum[i],Charges[i],*(SubFragsMomentum->at(i))));
}
SubFragsMomentum->clearAndDestroy();
delete SubFragsMomentum;
return theResult;
}
@@ -0,0 +1,460 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (Oct 1998)
// some corrections by V. Krylov (Oct. 1988)
// some corrections to V. Krylov by V. Lara (Dec. 1988)
#include "G4CompetitiveFission.hh"
G4CompetitiveFission::G4CompetitiveFission()
{
theFissionBarrierPtr = new G4FissionBarrier;
MyOwnFissionBarrier = true;
theFissionProbabilityPtr = new G4FissionProbability(this);
MyOwnFissionProbability = true;
theLevelDensityPtr = new G4FissionLevelDensityParameter;
MyOwnLevelDensity = true;
MaximalKineticEnergy = -1000.0*MeV;
FissionBarrier = 0.0;
FissionProbability = 0.0;
LevelDensityParameter = 0.0;
}
G4CompetitiveFission::G4CompetitiveFission(const G4CompetitiveFission &right)
{
}
G4CompetitiveFission::~G4CompetitiveFission()
{
if (MyOwnFissionBarrier) delete theFissionBarrierPtr;
if (MyOwnFissionProbability) delete theFissionProbabilityPtr;
if (MyOwnLevelDensity) delete theLevelDensityPtr;
}
const G4CompetitiveFission & G4CompetitiveFission::operator=(const G4CompetitiveFission &right)
{
G4Exception("G4CompetitiveFission::operator= meant to not be accessable");
return *this;
}
G4bool G4CompetitiveFission::operator==(const G4CompetitiveFission &right) const
{
return (this == (G4CompetitiveFission *) &right);
}
G4bool G4CompetitiveFission::operator!=(const G4CompetitiveFission &right) const
{
return (this != (G4CompetitiveFission *) &right);
}
void G4CompetitiveFission::Initialize(const G4Fragment & fragment)
{
G4int anA = fragment.GetA();
G4int aZ = fragment.GetZ();
G4double ExEnergy = fragment.GetExcitationEnergy();
// Calculate Fission Barrier
FissionBarrier = theFissionBarrierPtr->FissionBarrier(anA,aZ);
// Saddle point excitation energy ---> A = 65
// Fission is excluded for A < 65
if (anA >= 65) {
MaximalKineticEnergy = ExEnergy - FissionBarrier;
LevelDensityParameter = theLevelDensityPtr->LevelDensityParameter(anA,aZ,ExEnergy);
FissionProbability = theFissionProbabilityPtr->EmissionProbability(fragment,0);
}
else {
MaximalKineticEnergy = -1000.0*MeV;
LevelDensityParameter = 0.0;
FissionProbability = 0.0;
}
return;
}
G4FragmentVector * G4CompetitiveFission::BreakUp(const G4Fragment & theNucleus)
{
// Nucleus data
// Excitation energy (in MeV)
G4double U = theNucleus.GetExcitationEnergy()/MeV;
// Check that U > 0
if (U <= 0.0) {
G4FragmentVector * theResult = new G4FragmentVector;
theResult->insert(new G4Fragment(theNucleus));
return theResult;
}
// Atomic number of nucleus
G4int A = theNucleus.GetA();
// Charge of nucleus
G4int Z = theNucleus.GetZ();
// Atomic Mass of Nucleus (in MeV)
G4double M = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z,A)/MeV;
// Nucleus Momentum
G4LorentzVector theNucleusMomentum = theNucleus.GetMomentum();
// Calculate fission parameters
G4FissionParameters theParameters(A,Z,U*MeV,FissionBarrier);
// First fragment
G4int A1 = 0;
G4int Z1 = 0;
G4double M1 = 0.0;
// Second fragment
G4int A2 = 0;
G4int Z2 = 0;
G4double M2 = 0.0;
G4double FragmentsExcitationEnergy = 0.0;
G4double FragmentsKineticEnergy = 0.0;
G4int Trials = 0;
do {
// First fragment
A1 = FissionAtomicNumber(A,theParameters);
Z1 = FissionCharge(A,Z,A1);
M1 = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z1,A1)/MeV;
// Second Fragment
A2 = A - A1;
Z2 = Z - Z1;
if (A2 < 1 || Z2 < 0)
G4Exception("G4CompetitiveFission::BreakUp: Can't define second fragment! ");
M2 = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Z2,A2)/MeV;
// Check that fragment masses are less or equal than total energy
// if (M1 + M2 > theNucleusMomentum.mag()/MeV)
if (M1 + M2 > theNucleusMomentum.e()/MeV)
G4Exception("G4CompetitiveFission::BreakUp: Fragments Mass > Total Energy");
// Maximal Kinetic Energy (available energy for fragments)
// G4double Tmax = theNucleusMomentum.mag()/MeV - M1 - M2;
G4double Tmax = M + U - M1 - M2;
FragmentsKineticEnergy = FissionKineticEnergy( A , Z,
A1, Z1,
A2, Z2,
U , Tmax,
theParameters);
// Excitation Energy
FragmentsExcitationEnergy = Tmax - FragmentsKineticEnergy;
} while (FragmentsExcitationEnergy < 0.0 && Trials++ < 100);
if (FragmentsExcitationEnergy <= 0.0)
G4Exception("G4CompetitiveFission::BreakItUp: Excitation energy for fragments < 0.0!");
// while (FragmentsExcitationEnergy < 0 && Trials < 100);
// Fragment 1
G4double U1 = FragmentsExcitationEnergy * (G4double(A1)/G4double(A));
// Fragment 2
G4double U2 = FragmentsExcitationEnergy * (G4double(A2)/G4double(A));
G4double Pmax = sqrt( 2 * ( ( (M1+U1)*(M2+U2) ) /
( (M1+U1)+(M2+U2) ) ) * FragmentsKineticEnergy);
G4ParticleMomentum momentum1 = IsotropicVector( Pmax );
G4ParticleMomentum momentum2( -momentum1 );
// Perform a Galileo boost for fragments
momentum1 += (theNucleusMomentum.boostVector() * (M1+U1));
momentum2 += (theNucleusMomentum.boostVector() * (M2+U2));
// Create 4-momentum for first fragment
// Warning!! Energy conservation is broken
G4LorentzVector FourMomentum1( momentum1 , sqrt(momentum1.mag2() + (M1+U1)*(M1+U1)));
// Create 4-momentum for second fragment
// Warning!! Energy conservation is broken
G4LorentzVector FourMomentum2( momentum2 , sqrt(momentum2.mag2() + (M2+U2)*(M2+U2)));
// Create Fragments
G4Fragment * Fragment1 = new G4Fragment( A1, Z1, FourMomentum1);
if (!Fragment1) G4Exception("G4CompetitiveFission::BreakItUp: Can't create Fragment1! ");
G4Fragment * Fragment2 = new G4Fragment( A2, Z2, FourMomentum2);
if (!Fragment2) G4Exception("G4CompetitiveFission::BreakItUp: Can't create Fragment2! ");
// Create Fragment Vector
G4FragmentVector * theResult = new G4FragmentVector;
theResult->insert(Fragment1);
theResult->insert(Fragment2);
return theResult;
}
G4int G4CompetitiveFission::FissionAtomicNumber(const G4int A, const G4FissionParameters & theParam)
// Calculates the atomic number of a fission product
{
// For Simplicity reading code
const G4double A1 = theParam.GetA1();
const G4double A2 = theParam.GetA2();
const G4double As = theParam.GetAs();
const G4double Sigma1 = theParam.GetSigma1();
const G4double Sigma2 = theParam.GetSigma2();
const G4double SigmaS = theParam.GetSigmaS();
const G4double w = theParam.GetW();
G4double FasymAsym = 2.0*exp(-((A2-As)*(A2-As))/(2.0*Sigma2*Sigma2)) +
exp(-((A1-As)*(A1-As))/(2.0*Sigma1*Sigma1));
G4double FsymA1A2 = exp(-((As-(A1+A2))*(As-(A1+A2)))/(2.0*SigmaS*SigmaS));
G4double C2A = A2 + 3.72*Sigma2;
G4double C2S = As + 3.72*SigmaS;
G4double C2 = 0.0;
if (w > 1000.0 ) C2 = C2S;
else if (w < 0.001) C2 = C2A;
else C2 = max(C2A,C2S);
G4double C1 = A-C2;
if (C1 < 30.0) {
C2 = A-30.0;
C1 = 30.0;
}
G4double Am1 = (As + A1)/2.0;
G4double Am2 = (A1 + A2)/2.0;
// Get Mass distributions as sum of symmetric and asymmetric Gasussians
G4double Mass1 = MassDistribution(As,A,theParam);
G4double Mass2 = MassDistribution(Am1,A,theParam);
G4double Mass3 = MassDistribution(A1,A,theParam);
G4double Mass4 = MassDistribution(Am2,A,theParam);
G4double Mass5 = MassDistribution(A2,A,theParam);
// get maximal value among Mass1,...,Mass5
G4double MassMax = Mass1;
if (Mass2 > MassMax) MassMax = Mass2;
if (Mass3 > MassMax) MassMax = Mass3;
if (Mass4 > MassMax) MassMax = Mass4;
if (Mass5 > MassMax) MassMax = Mass5;
// Sample a fragment mass number, which lies between C1 and C2
G4double m;
G4double Pm;
do {
m = C1+G4UniformRand()*(C2-C1);
Pm = MassDistribution(m,A,theParam);
} while (G4UniformRand() > Pm/MassMax);
// return static_cast<G4int>(m+0.5);
return G4int(m+0.5);
}
G4double G4CompetitiveFission::MassDistribution(const G4double x, const G4double A,
const G4FissionParameters & theParam)
// This method gives mass distribution F(x) = F_{asym}(x)+w*F_{sym}(x)
// which consist of symmetric and asymmetric sum of gaussians components.
{
G4double Xsym = exp(-0.5*(x-theParam.GetAs())*(x-theParam.GetAs())/
(theParam.GetSigmaS()*theParam.GetSigmaS()));
G4double Xasym = exp(-0.5*(x-theParam.GetA2())*(x-theParam.GetA2())/
(theParam.GetSigma2()*theParam.GetSigma2())) +
exp(-0.5*(x-(A-theParam.GetA2()))*(x-(A-theParam.GetA2()))/
(theParam.GetSigma2()*theParam.GetSigma2())) +
0.5*exp(-0.5*(x-theParam.GetA1())*(x-theParam.GetA1())/
(theParam.GetSigma1()*theParam.GetSigma1())) +
0.5*exp(-0.5*(x-(A-theParam.GetA1()))*(x-(A-theParam.GetA1()))/
(theParam.GetSigma1()*theParam.GetSigma1()));
if (theParam.GetW() > 1000) return Xsym;
else if (theParam.GetW() < 0.001) return Xasym;
else return theParam.GetW()*Xsym+Xasym;
}
G4int G4CompetitiveFission::FissionCharge(const G4double A,
const G4double Z,
const G4double Af)
// Calculates the charge of a fission product for a given atomic number Af
{
const G4double sigma = 0.6;
G4double DeltaZ = 0.0;
if (Af >= 134.0) DeltaZ = -0.45; // 134 <= Af
else if (A <= (A-134.0)) DeltaZ = 0.45; // Af <= (A-134)
else DeltaZ = -0.45*(Af-(A/2.0))/(134.0-(A/2.0)); // (A-134) < Af < 134
G4double Zmean = (Af/A)*Z + DeltaZ;
G4double theZ;
do {
theZ = RandGauss::shoot(Zmean,sigma);
} while (theZ < 1.0 || theZ > (Z-1.0) || theZ > Af);
// return static_cast<G4int>(theZ+0.5);
return G4int(theZ+0.5);
}
G4double G4CompetitiveFission::FissionKineticEnergy(const G4double A, const G4double Z,
const G4double Af1, const G4double Zf1,
const G4double Af2, const G4double Zf2,
const G4double U, const G4double Tmax,
const G4FissionParameters & theParam)
// Gives the kinetic energy of fission products
{
// Find maximal value of A for fragments
G4double AfMax = max(Af1,Af2);
if (AfMax < (A/2.0)) AfMax = A - AfMax;
// Weights for symmetric and asymmetric components
G4double Pas;
if (theParam.GetW() > 1000) Pas = 0.0;
else {
G4double P1 = 0.5*exp(-0.5*(AfMax-theParam.GetA1())*(AfMax-theParam.GetA1())/
(theParam.GetSigma1()*theParam.GetSigma1()));
G4double P2 = exp(-0.5*(AfMax-theParam.GetA2())*(AfMax-theParam.GetA2())/
(theParam.GetSigma2()*theParam.GetSigma2()));
Pas = P1+P2;
}
G4double Ps;
if (theParam.GetW() < 0.001) Ps = 0.0;
else
Ps = theParam.GetW()*exp(-0.5*(AfMax-theParam.GetAs())*(AfMax-theParam.GetAs())/
(theParam.GetSigmaS()*theParam.GetSigmaS()));
G4double Psy = Ps/(Pas+Ps);
// Fission fractions Xsy and Xas formed in symmetric and asymmetric modes
G4double PPas = theParam.GetSigma1() + 2.0 * theParam.GetSigma2();
G4double PPsy = theParam.GetW() * theParam.GetSigmaS();
G4double Xas = PPas / (PPas+PPsy);
G4double Xsy = PPsy / (PPas+PPsy);
// Average kinetic energy for symmetric and asymmetric components
G4double Eaverage = 0.1071*(Z*Z)/pow(A,1.0/3.0) + 22.2;
// Compute maximal average kinetic energy of fragments and Energy Dispersion (sqrt)
G4double TaverageAfMax;
G4double ESigma;
// Select randomly fission mode (symmetric or asymmetric)
if (G4UniformRand() > Psy) { // Asymmetric Mode
G4double A11 = theParam.GetA1()-0.7979*theParam.GetSigma1();
G4double A12 = theParam.GetA1()+0.7979*theParam.GetSigma1();
G4double A21 = theParam.GetA2()-0.7979*theParam.GetSigma2();
G4double A22 = theParam.GetA2()+0.7979*theParam.GetSigma2();
// scale factor
G4double ScaleFactor = 0.5*theParam.GetSigma1()*(AsymmetricRatio(A,A11)+AsymmetricRatio(A,A12))+
theParam.GetSigma2()*(AsymmetricRatio(A,A21)+AsymmetricRatio(A,A22));
// Compute average kinetic energy for fragment with AfMax
TaverageAfMax = (Eaverage + 12.5 * Xsy) * (PPas/ScaleFactor) * AsymmetricRatio(A,AfMax);
ESigma = 10.0; // MeV
} else { // Symmetric Mode
G4double As0 = theParam.GetAs() + 0.7979*theParam.GetSigmaS();
// scale factor
G4double ScaleFactor = theParam.GetW()*theParam.GetSigmaS()*SymmetricRatio(A,As0);
// Compute average kinetic energy for fragment with AfMax
TaverageAfMax = (Eaverage - 12.5*Xas) * (PPsy/ScaleFactor) * SymmetricRatio(A,AfMax);
ESigma = 8.0; // MeV
}
// Select randomly, in accordance with Gaussian distribution, fragment kinetic energy
G4double KineticEnergy;
G4int i = 0;
do {
KineticEnergy = RandGauss::shoot(TaverageAfMax,ESigma);
if (i++ > 100) return Eaverage;
} while (KineticEnergy < Eaverage-3.72*ESigma ||
KineticEnergy > Eaverage+3.72*ESigma ||
KineticEnergy > Tmax);
return KineticEnergy;
}
G4double G4CompetitiveFission::AsymmetricRatio(const G4double A,const G4double A11)
{
const G4double B1 = 23.5;
const G4double A00 = 134.0;
return Ratio(A,A11,B1,A00);
}
G4double G4CompetitiveFission::SymmetricRatio(const G4double A,const G4double A11)
{
const G4double B1 = 5.32;
const G4double A00 = A/2.0;
return Ratio(A,A11,B1,A00);
}
G4double G4CompetitiveFission::Ratio(const G4double A,const G4double A11,
const G4double B1,const G4double A00)
{
if (A == 0) G4Exception("G4CompetitiveFission::Ratio: A == 0!");
if (A11 >= A/2.0 && A11 <= (A00+10.0)) return 1.0-B1*((A11-A00)/A)*((A11-A00)/A);
else return 1.0-B1*(10.0/A)*(10.0/A)-2.0*(10.0/A)*B1*((A11-A00-10.0)/A);
}
G4ThreeVector G4CompetitiveFission::IsotropicVector(const G4double Magnitude)
// Samples a isotropic random vectorwith a magnitud given by Magnitude.
// By default Magnitude = 1.0
{
G4double CosTheta = 1.0 - 2.0*G4UniformRand();
G4double SinTheta = sqrt(1.0 - CosTheta*CosTheta);
G4double Phi = twopi*G4UniformRand();
G4ThreeVector Vector(Magnitude*cos(Phi)*SinTheta,
Magnitude*sin(Phi)*SinTheta,
Magnitude*CosTheta);
return Vector;
}
@@ -0,0 +1,46 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// Hadronic Process: Nuclear De-excitations
// Constant level density parameter (for photon evaporation)
//
// by C. Dallapiccola (Nov 1998)
//
#include "G4ConstantLevelDensityParameter.hh"
G4ConstantLevelDensityParameter::
G4ConstantLevelDensityParameter(const G4ConstantLevelDensityParameter& right) :
EvapLevelDensityParameter(0.125*(1./MeV))
{
G4Exception("G4ConstantLevelDensityParameter::copy_constructor meant to not be accessable");
}
const G4ConstantLevelDensityParameter & G4ConstantLevelDensityParameter::
operator=(const G4ConstantLevelDensityParameter &right)
{
G4Exception("G4ConstantLevelDensityParameter::operator= meant to not be accessable");
return *this;
}
G4bool G4ConstantLevelDensityParameter::operator==(const G4ConstantLevelDensityParameter &right) const
{
return false;
}
G4bool G4ConstantLevelDensityParameter::operator!=(const G4ConstantLevelDensityParameter &right) const
{
return true;
}
@@ -0,0 +1,131 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4ContinuumGammaDeexcitation
//
// Authors: Carlo Dallapiccola (dallapiccola@umdhep.umd.edu)
// Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 23 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
//
// Class G4ContinuumGammaDeexcitation.cc
//
// Concrete class derived from G4VGammaDeexcitation
//
//
#include "G4ContinuumGammaDeexcitation.hh"
#include "G4Gamma.hh"
#include "G4ContinuumGammaTransition.hh"
#include "G4NuclearLevelManager.hh"
#include "G4Fragment.hh"
#include "G4ConstantLevelDensityParameter.hh"
//
// Constructor
//
G4ContinuumGammaDeexcitation::G4ContinuumGammaDeexcitation(): _Z(0), _A(0)
{ }
G4ContinuumGammaDeexcitation::~G4ContinuumGammaDeexcitation()
{ }
G4VGammaTransition* G4ContinuumGammaDeexcitation::CreateTransition()
{
G4Fragment nucleus = GetNucleus();
G4int Z = nucleus.GetZ();
G4int A = nucleus.GetA();
G4double excitation = nucleus.GetExcitationEnergy();
if (_A != A || _Z != Z)
{
_levelManager.SetNucleus(Z,A);
_A = A;
_Z = Z;
}
if (_verbose > 1)
G4cout << "G4ContinuumGammaDeexcitation::CreateTransition - Created" << endl;
return new G4ContinuumGammaTransition(_levelManager,Z,A,excitation,_verbose );
}
G4bool G4ContinuumGammaDeexcitation::CanDoTransition() const
{
G4bool canDo = true;
if (_transition == 0)
{
canDo = false;
if (_verbose > 0)
G4cout
<< "G4ContinuumGammaDeexcitation::CanDoTransition - Null transition "
<< endl;
}
G4Fragment nucleus = GetNucleus();
G4double excitation = nucleus.GetExcitationEnergy();
G4double A = nucleus.GetA();
G4double Z = nucleus.GetZ();
if (A <2 || Z<3)
{
canDo = false;
if (_verbose > 0)
G4cout
<< "G4ContinuumGammaDeexcitation::CanDoTransition - n/p/H"
<< endl;
}
if (excitation <= 0.)
{
canDo = false;
if (_verbose > 0)
G4cout
<< "G4ContinuumGammaDeexcitation::CanDoTransition - Excitation <= 0"
<< endl;
}
if (excitation <= _levelManager.MaxLevelEnergy())
{
canDo = false;
if (_verbose > 0)
G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - Excitation "
<< excitation << " below max discrete level "
<< _levelManager.MaxLevelEnergy() << endl;
}
if (canDo)
{ if (_verbose > 1)
G4cout <<"G4ContinuumGammaDeexcitation::CanDoTransition - CanDo"
<< endl;
}
return canDo;
}
@@ -0,0 +1,191 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4ContinuumGammaTransition
//
// Authors: Carlo Dallapiccola (dallapiccola@umdhep.umd.edu)
// Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 23 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
//
// Class G4ContinuumGammaTransition.cc
//
#include "G4ContinuumGammaTransition.hh"
#include "G4VLevelDensityParameter.hh"
#include "G4ConstantLevelDensityParameter.hh"
#include "G4RandGeneralTmp.hh"
//
// Constructor
//
G4ContinuumGammaTransition::G4ContinuumGammaTransition(const G4NuclearLevelManager& levelManager,
G4int Z, G4int A, G4double excitation,
G4int verbose):
_Z(Z), _A(A), _excitation(excitation), _levelManager(levelManager)
{
const G4PtrLevelVector* levels = levelManager.GetLevels();
G4double eTolerance = 0.;
if (levels != 0)
{
G4int lastButOne = levelManager.NumberOfLevels() - 2;
if (lastButOne >= 0)
{
eTolerance = levelManager.MaxLevelEnergy() - levels->at(lastButOne)->Energy();
if (eTolerance < 0.) eTolerance = 0.;
}
}
_verbose = verbose;
_eGamma = 0.;
_maxLevelE = levelManager.MaxLevelEnergy() + eTolerance;
_minLevelE = levelManager.MinLevelEnergy();
// Energy range for photon generation; upper limit is defined 5*Gamma(GDR) from GDR peak
_eMin = 0.001 * MeV;
// Giant Dipole Resonance energy
G4double energyGDR = (40.3 / pow(_A,0.2) ) * MeV;
// Giant Dipole Resonance width
G4double widthGDR = 0.30 * energyGDR;
// Extend
G4double factor = 5;
_eMax = energyGDR + factor * widthGDR;
if (_eMax > excitation) _eMax = _excitation;
}
//
// Destructor
//
G4ContinuumGammaTransition::~G4ContinuumGammaTransition() {}
//
// Override GammaEnergy function from G4VGammaTransition
//
G4double G4ContinuumGammaTransition::GammaEnergy()
{
_eGamma = 0.;
G4int nBins = 200;
G4double sampleArray[200];
G4int i;
for (i=0; i<nBins; i++)
{
G4double e = _eMin + ( (_eMax - _eMin) / nBins) * i;
sampleArray[i] = E1Pdf(e);
if(_verbose > 10)
G4cout << "*---* G4ContinuumTransition: e = " << e
<< " pdf = " << sampleArray[i] << endl;
}
G4RandGeneralTmp randGeneral(sampleArray, nBins);
G4double random = randGeneral.shoot();
_eGamma = _eMin + (_eMax - _eMin) * random;
G4double finalExcitation = _excitation - _eGamma;
if(_verbose > 10)
G4cout << "*---*---* G4ContinuumTransition: eGamma = " << _eGamma
<< " finalExcitation = " << finalExcitation
<< " random = " << random << endl;
if (finalExcitation < 0)
{
_eGamma = _excitation;
finalExcitation = 0.;
}
if (finalExcitation < _maxLevelE && finalExcitation > 0.)
{
G4double levelE = _levelManager.NearestLevel(finalExcitation)->Energy();
G4double diff = finalExcitation - levelE;
_eGamma = _eGamma + diff;
}
return _eGamma;
}
G4double G4ContinuumGammaTransition::GetEnergyTo() const
{
G4double excitation = _excitation - _eGamma;
if (excitation < 0.) excitation = 0.;
return excitation ;
}
void G4ContinuumGammaTransition::SetEnergyFrom(const G4double energy)
{
if (energy > 0.) _excitation = energy;
return;
}
G4double G4ContinuumGammaTransition::E1Pdf(G4double e)
{
G4double theProb = 0.0;
if( (_excitation - e) < 0.0 || e < 0 || _excitation < 0) return theProb;
G4ConstantLevelDensityParameter ldPar;
G4double aLevelDensityParam = ldPar.LevelDensityParameter(_A,_Z,_excitation);
G4double levelDensBef = exp(2.0*sqrt(aLevelDensityParam*_excitation));
G4double levelDensAft = exp(2.0*sqrt(aLevelDensityParam*(_excitation - e)));
if(_verbose > 20)
G4cout << _A << " LevelDensityParameter = " << aLevelDensityParam
<< " Bef Aft " << levelDensBef << " " << levelDensAft << endl;
// Now form the probability density
// Define constants for the photoabsorption cross-section (the reverse
// process of our de-excitation)
// G4double sigma0 = 2.5 * _A * millibarn;
G4double sigma0 = 2.5 * _A;
G4double Egdp = (40.3 / pow(_A,0.2) )*MeV;
G4double GammaR = 0.30 * Egdp;
G4double normC = 1.0 / (pi * hbarc)*(pi * hbarc);
G4double numerator = sigma0 * e*e * GammaR*GammaR;
G4double denominator = (e*e - Egdp*Egdp)* (e*e - Egdp*Egdp) + GammaR*GammaR*e*e;
// if (denominator < 1.0e-9) denominator = 1.0e-9;
G4double sigmaAbs = numerator/denominator ;
if(_verbose > 20)
G4cout << ".. " << Egdp << " .. " << GammaR
<< " .. " << normC << " .. " << sigmaAbs
<< " .. " << e*e << " .. " << levelDensAft/levelDensBef
<< endl;
// theProb = normC * sigmaAbs * e*e * levelDensAft/levelDensBef;
theProb = sigmaAbs * e*e * levelDensAft/levelDensBef;
return theProb;
}
@@ -0,0 +1,151 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4DiscreteGammaDeexcitation
//
// Author: Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 23 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
#include "G4DiscreteGammaDeexcitation.hh"
#include "G4DiscreteGammaTransition.hh"
#include "G4NuclearLevelManager.hh"
G4DiscreteGammaDeexcitation::G4DiscreteGammaDeexcitation(): _Z(0),_A(0)
{
_tolerance = 0.1 * MeV;
}
G4DiscreteGammaDeexcitation::~G4DiscreteGammaDeexcitation() {}
G4VGammaTransition* G4DiscreteGammaDeexcitation::CreateTransition()
{
G4Fragment nucleus = GetNucleus();
G4int A = nucleus.GetA();
G4int Z = nucleus.GetZ();
if (_levelManager.IsValid(Z,A))
{
if (_verbose > 1)
G4cout
<< "G4DiscreteGammaDeexcitation::CreateTransition - (A,Z) is valid "
<< endl;
if (_A != A || _Z != Z)
{
_levelManager.SetNucleus(Z,A);
_A = A;
_Z = Z;
}
G4double excitation = nucleus.GetExcitationEnergy();
// const G4NuclearLevel* level =_levelManager.NearestLevel(excitation, _tolerance);
const G4NuclearLevel* level =_levelManager.NearestLevel(excitation);
if (level != 0)
{
if (_verbose > 0)
G4cout
<< "G4DiscreteGammaDeexcitation::CreateTransition - Created from level energy "
<< level->Energy() << ", excitation is "
<< excitation << endl;
return new G4DiscreteGammaTransition(*level);
}
else
{
if (_verbose > 0)
G4cout
<< "G4DiscreteGammaDeexcitation::CreateTransition - No transition created from "
<< excitation << " within tolerance " << _tolerance << endl;
return 0;
}
}
else return 0;
}
G4bool G4DiscreteGammaDeexcitation::CanDoTransition() const
{
G4bool canDo = true;
if (_transition == 0)
{
canDo = false;
if (_verbose > 0)
G4cout
<< "G4DiscreteGammaDeexcitation::CanDoTransition - Null transition "
<< endl;
}
G4Fragment nucleus = GetNucleus();
G4double A = nucleus.GetA();
G4double Z = nucleus.GetZ();
if (A <2 || Z<3 || Z>92)
{
canDo = false;
if (_verbose > 0)
G4cout
<< "G4DiscreteGammaDeexcitation::CanDoTransition - n/p/H/>U"
<< endl;
}
G4double excitation = nucleus.GetExcitationEnergy();
if (excitation <= 0.)
{
canDo = false;
if (_verbose > 0)
G4cout
<< "G4DiscreteGammaDeexcitation::CanDoTransition - Excitation <= 0"
<< endl;
}
if (excitation > _levelManager.MaxLevelEnergy() + _tolerance) canDo = false;
if (excitation < _levelManager.MinLevelEnergy() - _tolerance) canDo = false;
// The following is a protection to avoid looping in case of elements with very low
// ensdf levels
if (excitation < _levelManager.MinLevelEnergy() * 0.9) canDo = false;
if (_verbose > 0)
{
G4cout << "G4DiscreteGammaDeexcitation::CanDoTransition - Excitation "
<< excitation << ", Min-Max are "
<< _levelManager.MinLevelEnergy() << " "
<< _levelManager.MaxLevelEnergy() << endl;
}
if (canDo)
{ if (_verbose > 0)
G4cout <<"G4DiscreteGammaDeexcitation::CanDoTransition - CanDo" << endl; }
// else
// {
// delete _transition;
// _transition = 0;
// }
return canDo;
}
@@ -0,0 +1,86 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// -------------------------------------------------------------------
// GEANT 4 class file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// CERN, Geneva, Switzerland
//
// File name: G4ContDiscrGammaTransition
//
// Author: Maria Grazia Pia (pia@genova.infn.it)
//
// Creation date: 23 October 1998
//
// Modifications:
//
// -------------------------------------------------------------------
#include "G4DiscreteGammaTransition.hh"
#include "Randomize.hh"
G4DiscreteGammaTransition::G4DiscreteGammaTransition(const G4NuclearLevel& level):
_level(level), _excitation(0.), _gammaEnergy(0.)
{ }
G4DiscreteGammaTransition::~G4DiscreteGammaTransition()
{ }
G4double G4DiscreteGammaTransition::GammaEnergy()
{
_gammaEnergy = 0.;
G4int nGammas = _level.NumberOfGammas();
if (nGammas > 0)
{
G4double random = G4UniformRand();
G4int iGamma = 0;
if (random <= _level.GammaCumulativeProbabilities().at(0)) iGamma = 0;
else
{
G4int i;
for (i=1; i<nGammas; i++)
{
if (random > _level.GammaCumulativeProbabilities().at(i-1) &&
random <= _level.GammaCumulativeProbabilities().at(i))
{ iGamma = i; }
}
}
// Small correction due to the fact that there are mismatches between
// nominal level energies and emitted gamma energies
G4double eCorrection = _level.Energy() - _excitation;
_gammaEnergy = _level.GammaEnergies().at(iGamma) - eCorrection;
if (_gammaEnergy < 0.) _gammaEnergy = 0.;
}
return _gammaEnergy;
}
G4double G4DiscreteGammaTransition::GetEnergyTo() const
{
G4double energyTo = _excitation - _gammaEnergy;
if (energyTo < 0.) energyTo = 0.;
return energyTo;
}
void G4DiscreteGammaTransition::SetEnergyFrom(const G4double energy)
{
_excitation = energy;
return;
}

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