Import Geant4 6.2.0 source tree
This commit is contained in:
@@ -18,6 +18,7 @@ SUBDIRS += fission
|
||||
SUBDIRS += fermi_breakup
|
||||
SUBDIRS += multifragmentation
|
||||
SUBDIRS += util
|
||||
SUBDIRS += ablation
|
||||
|
||||
|
||||
SUBLIBS = G4hadronic_deex_handler
|
||||
@@ -29,5 +30,6 @@ SUBLIBS += G4hadronic_deex_fission
|
||||
SUBLIBS += G4hadronic_deex_fermi_breakup
|
||||
SUBLIBS += G4hadronic_deex_multifagmentation
|
||||
SUBLIBS += G4hadronic_deex_util
|
||||
SUBLIBS += G4hadronic_ablation
|
||||
|
||||
include $(G4INSTALL)/config/globlib.gmk
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
# $Id: GNUmakefile,v 1.2 2004/05/28 08:23:47 hpw Exp $
|
||||
# -----------------------------------------------------------
|
||||
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
|
||||
# -----------------------------------------------------------
|
||||
|
||||
name := G4hadronic_ablation
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../../../../..
|
||||
endif
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
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/magneticfield/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/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/im_r_matrix/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/evaporation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/fermi_breakup/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/photon_evaporation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/multifragmentation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/handler/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/pre_equilibrium/exciton_model/include \
|
||||
-I$(G4BASE)/particles/management/include \
|
||||
-I$(G4BASE)/particles/leptons/include \
|
||||
-I$(G4BASE)/particles/bosons/include \
|
||||
-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
|
||||
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * *
|
||||
// * Parts of this code which have been developed by QinetiQ Ltd *
|
||||
// * under contract to the European Space Agency (ESA) are the *
|
||||
// * intellectual property of ESA. Rights to use, copy, modify and *
|
||||
// * redistribute this software for general public use are granted *
|
||||
// * in compliance with any licensing, distribution and development *
|
||||
// * policy adopted by the Geant4 Collaboration. This code has been *
|
||||
// * written by QinetiQ Ltd for the European Space Agency, under ESA *
|
||||
// * contract 17191/03/NL/LvH (Aurora Programme). *
|
||||
// * *
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef G4WilsonAblationModel_h
|
||||
#define G4WilsonAblationModel_h 1
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
//
|
||||
// MODULE: G4WilsonAblationModel.hh
|
||||
//
|
||||
// Version: B.1
|
||||
// Date: 15/04/04
|
||||
// Author: P R Truscott
|
||||
// Organisation: QinetiQ Ltd, UK
|
||||
// Customer: ESA/ESTEC, NOORDWIJK
|
||||
// Contract: 17191/03/NL/LvH
|
||||
//
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
//
|
||||
// CHANGE HISTORY
|
||||
// --------------
|
||||
//
|
||||
// 6 October 2003, P R Truscott, QinetiQ Ltd, UK
|
||||
// Created.
|
||||
//
|
||||
// 15 March 2004, P R Truscott, QinetiQ Ltd, UK
|
||||
// Beta release
|
||||
//
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
#include "G4VEvaporation.hh"
|
||||
#include "G4VEvaporationChannel.hh"
|
||||
#include "G4Fragment.hh"
|
||||
#include "G4FragmentVector.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include <vector>
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
class G4WilsonAblationModel : public G4VEvaporation
|
||||
{
|
||||
public:
|
||||
G4WilsonAblationModel();
|
||||
~G4WilsonAblationModel();
|
||||
|
||||
typedef std::vector<G4ParticleDefinition*> VectorOfFragmentTypes;
|
||||
|
||||
G4FragmentVector * BreakItUp (const G4Fragment &theNucleus);
|
||||
void SetProduceSecondaries (G4bool);
|
||||
G4bool GetProduceSecondaries ();
|
||||
void SetVerboseLevel (G4int);
|
||||
G4int GetVerboseLevel ();
|
||||
|
||||
private:
|
||||
void SelectSecondariesByEvaporation (G4Fragment*);
|
||||
void SelectSecondariesByDefault (G4ThreeVector);
|
||||
void PrintWelcomeMessage ();
|
||||
|
||||
private:
|
||||
G4bool produceSecondaries;
|
||||
G4int verboseLevel;
|
||||
G4double B;
|
||||
G4int nFragTypes;
|
||||
G4ParticleDefinition *fragType[6];
|
||||
G4FragmentVector *fragmentVector;
|
||||
VectorOfFragmentTypes evapType;
|
||||
|
||||
class SumProbabilities :
|
||||
public std::binary_function<G4double,G4double,G4double>
|
||||
{
|
||||
public:
|
||||
SumProbabilities() : total(0.0) {}
|
||||
G4double operator() (G4double& /* probSoFar */, G4VEvaporationChannel*& frag)
|
||||
{
|
||||
total += frag->GetEmissionProbability();
|
||||
return total;
|
||||
}
|
||||
|
||||
G4double GetTotal() { return total; }
|
||||
public:
|
||||
G4double total;
|
||||
};
|
||||
|
||||
|
||||
|
||||
};
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
inline void G4WilsonAblationModel::SetProduceSecondaries
|
||||
(G4bool produceSecondaries1)
|
||||
{produceSecondaries = produceSecondaries1;}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
inline G4bool G4WilsonAblationModel::GetProduceSecondaries ()
|
||||
{return produceSecondaries;}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
inline void G4WilsonAblationModel::SetVerboseLevel (G4int verboseLevel1)
|
||||
{verboseLevel = verboseLevel1;}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
inline G4int G4WilsonAblationModel::GetVerboseLevel ()
|
||||
{return verboseLevel;}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
#endif
|
||||
@@ -0,0 +1,511 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * *
|
||||
// * Parts of this code which have been developed by QinetiQ Ltd *
|
||||
// * under contract to the European Space Agency (ESA) are the *
|
||||
// * intellectual property of ESA. Rights to use, copy, modify and *
|
||||
// * redistribute this software for general public use are granted *
|
||||
// * in compliance with any licensing, distribution and development *
|
||||
// * policy adopted by the Geant4 Collaboration. This code has been *
|
||||
// * written by QinetiQ Ltd for the European Space Agency, under ESA *
|
||||
// * contract 17191/03/NL/LvH (Aurora Programme). *
|
||||
// * *
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
//
|
||||
// MODULE: G4WilsonAblationModel.cc
|
||||
//
|
||||
// Version: B.1
|
||||
// Date: 15/04/04
|
||||
// Author: P R Truscott
|
||||
// Organisation: QinetiQ Ltd, UK
|
||||
// Customer: ESA/ESTEC, NOORDWIJK
|
||||
// Contract: 17191/03/NL/LvH
|
||||
//
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
//
|
||||
// CHANGE HISTORY
|
||||
// --------------
|
||||
//
|
||||
// 6 October 2003, P R Truscott, QinetiQ Ltd, UK
|
||||
// Created.
|
||||
//
|
||||
// 15 March 2004, P R Truscott, QinetiQ Ltd, UK
|
||||
// Beta release
|
||||
//
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
#include "G4WilsonAblationModel.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4He3.hh"
|
||||
#include "G4Triton.hh"
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4AlphaEvaporationChannel.hh"
|
||||
#include "G4He3EvaporationChannel.hh"
|
||||
#include "G4TritonEvaporationChannel.hh"
|
||||
#include "G4DeuteronEvaporationChannel.hh"
|
||||
#include "G4ProtonEvaporationChannel.hh"
|
||||
#include "G4NeutronEvaporationChannel.hh"
|
||||
#include "G4LorentzVector.hh"
|
||||
#include "G4VEvaporationChannel.hh"
|
||||
|
||||
#include <iomanip>
|
||||
#include <numeric>
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
G4WilsonAblationModel::G4WilsonAblationModel()
|
||||
{
|
||||
//
|
||||
//
|
||||
// Send message to stdout to advise that the G4Abrasion model is being used.
|
||||
//
|
||||
PrintWelcomeMessage();
|
||||
//
|
||||
//
|
||||
// Set the default verbose level to 0 - no output.
|
||||
//
|
||||
verboseLevel = 0;
|
||||
//
|
||||
//
|
||||
// Set the binding energy per nucleon .... did I mention that this is a crude
|
||||
// model for nuclear de-excitation?
|
||||
//
|
||||
B = 10.0 * MeV;
|
||||
//
|
||||
//
|
||||
// It is possuble to switch off secondary particle production (other than the
|
||||
// final nuclear fragment). The default is on.
|
||||
//
|
||||
produceSecondaries = true;
|
||||
//
|
||||
//
|
||||
// Now we need to define the decay modes. We're using the G4Evaporation model
|
||||
// to help determine the kinematics of the decay.
|
||||
//
|
||||
nFragTypes = 6;
|
||||
fragType[0] = G4Alpha::Alpha();
|
||||
fragType[1] = G4He3::He3();
|
||||
fragType[2] = G4Triton::Triton();
|
||||
fragType[3] = G4Deuteron::Deuteron();
|
||||
fragType[4] = G4Proton::Proton();
|
||||
fragType[5] = G4Neutron::Neutron();
|
||||
//
|
||||
//
|
||||
// Set verboseLevel default to no output.
|
||||
//
|
||||
verboseLevel = 0;
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
G4WilsonAblationModel::~G4WilsonAblationModel()
|
||||
{;}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
G4FragmentVector *G4WilsonAblationModel::BreakItUp
|
||||
(const G4Fragment &theNucleus)
|
||||
{
|
||||
//
|
||||
//
|
||||
// Initilise the pointer to the G4FragmentVector used to return the information
|
||||
// about the breakup.
|
||||
//
|
||||
fragmentVector = new G4FragmentVector;
|
||||
fragmentVector->clear();
|
||||
//
|
||||
//
|
||||
// Get the A, Z and excitation of the nucleus.
|
||||
//
|
||||
G4int A = (G4int) theNucleus.GetA();
|
||||
G4int Z = (G4int) theNucleus.GetZ();
|
||||
G4double ex = theNucleus.GetExcitationEnergy();
|
||||
if (verboseLevel >= 2)
|
||||
{
|
||||
G4cout <<"oooooooooooooooooooooooooooooooooooooooo"
|
||||
<<"oooooooooooooooooooooooooooooooooooooooo"
|
||||
<<G4endl;
|
||||
G4cout.precision(6);
|
||||
G4cout <<"IN G4WilsonAblationModel" <<G4endl;
|
||||
G4cout <<"Initial prefragment A=" <<A
|
||||
<<", Z=" <<Z
|
||||
<<", excitation energy = " <<ex/MeV <<" MeV"
|
||||
<<G4endl;
|
||||
}
|
||||
//
|
||||
//
|
||||
// Check that there is a nucleus to speak of. It's possible there isn't one
|
||||
// or its just a proton or neutron. In either case, the excitation energy
|
||||
// (from the Lorentz vector) is not used.
|
||||
//
|
||||
if (A == 0)
|
||||
{
|
||||
if (verboseLevel >= 2)
|
||||
{
|
||||
G4cout <<"No nucleus to decay" <<G4endl;
|
||||
G4cout <<"oooooooooooooooooooooooooooooooooooooooo"
|
||||
<<"oooooooooooooooooooooooooooooooooooooooo"
|
||||
<<G4endl;
|
||||
}
|
||||
return fragmentVector;
|
||||
}
|
||||
else if (A == 1)
|
||||
{
|
||||
G4LorentzVector lorentzVector = theNucleus.GetMomentum();
|
||||
lorentzVector.setE(lorentzVector.e()-ex+10.0*eV);
|
||||
if (Z == 0)
|
||||
{
|
||||
G4Fragment *fragment = new G4Fragment(lorentzVector,G4Neutron::Neutron());
|
||||
fragmentVector->push_back(fragment);
|
||||
}
|
||||
else
|
||||
{
|
||||
G4Fragment *fragment = new G4Fragment(lorentzVector,G4Proton::Proton());
|
||||
fragmentVector->push_back(fragment);
|
||||
}
|
||||
if (verboseLevel >= 2)
|
||||
{
|
||||
G4cout <<"Final fragment is in fact only a nucleon) :" <<G4endl;
|
||||
G4cout <<(*fragmentVector)[0] <<G4endl;
|
||||
G4cout <<"oooooooooooooooooooooooooooooooooooooooo"
|
||||
<<"oooooooooooooooooooooooooooooooooooooooo"
|
||||
<<G4endl;
|
||||
}
|
||||
return fragmentVector;
|
||||
}
|
||||
//
|
||||
//
|
||||
// Then the number of nucleons ablated (either as nucleons or light nuclear
|
||||
// fragments) is based on a simple argument for the binding energy per nucleon.
|
||||
//
|
||||
G4int DAabl = (G4int) (ex / B);
|
||||
if (DAabl > A) DAabl = A;
|
||||
if (verboseLevel >= 2)
|
||||
G4cout <<"Number of nucleons ejected = " <<DAabl <<G4endl;
|
||||
|
||||
//
|
||||
//
|
||||
// Determine the nuclear fragment from the ablation process by sampling the
|
||||
// Rudstam equation.
|
||||
//
|
||||
G4int AF = A - DAabl;
|
||||
G4int ZF = 0;
|
||||
if (AF > 0)
|
||||
{
|
||||
G4double AFd = static_cast<G4double>(AF);
|
||||
G4double R = 11.8 / pow(AFd, 0.45);
|
||||
G4int minZ = Z - DAabl;
|
||||
if (minZ <= 0) minZ = 1;
|
||||
//
|
||||
//
|
||||
// Here we define an integral probability distribution based on the Rudstam
|
||||
// equation assuming a constant AF.
|
||||
//
|
||||
G4double sig[100];
|
||||
G4double sum = 0.0;
|
||||
for (G4int ii=minZ; ii<= Z; ii++)
|
||||
{
|
||||
sum += exp(-R*pow(abs(ii - 0.486*AFd + 3.8E-04*AFd*AFd),1.5));
|
||||
sig[ii] = sum;
|
||||
}
|
||||
//
|
||||
//
|
||||
// Now sample that distribution to determine a value for ZF.
|
||||
//
|
||||
G4double xi = G4UniformRand();
|
||||
G4int iz = minZ;
|
||||
G4bool found = false;
|
||||
while (iz <= Z && !found)
|
||||
{
|
||||
found = (xi <= sig[iz]/sum);
|
||||
if (!found) iz++;
|
||||
}
|
||||
if (iz > Z)
|
||||
ZF = Z;
|
||||
else
|
||||
ZF = iz;
|
||||
}
|
||||
G4int DZabl = Z - ZF;
|
||||
if (verboseLevel >= 2)
|
||||
G4cout <<"Final fragment A=" <<AF
|
||||
<<", Z=" <<ZF
|
||||
<<G4endl;
|
||||
//
|
||||
//
|
||||
// Now determine the nucleons or nuclei which have bee ablated. The preference
|
||||
// is for the production of alphas, then other nuclei in order of decreasing
|
||||
// binding energy. The energies assigned to the products of the decay are
|
||||
// provisional for the moment (the 10eV is just to avoid errors with negative
|
||||
// excitation energies due to rounding).
|
||||
//
|
||||
G4double totalEpost = 0.0;
|
||||
evapType.clear();
|
||||
for (G4int ift=0; ift<nFragTypes; ift++)
|
||||
{
|
||||
G4ParticleDefinition *type = fragType[ift];
|
||||
G4double n = floor((G4double) DAabl / type->GetBaryonNumber() + 1.0E-10);
|
||||
G4double n1 = 1.0E+10;
|
||||
if (fragType[ift]->GetPDGCharge() > 0.0)
|
||||
n1 = floor((G4double) DZabl / type->GetPDGCharge() + 1.0E-10);
|
||||
if (n > n1) n = n1;
|
||||
if (n > 0.0)
|
||||
{
|
||||
G4double mass = type->GetPDGMass();
|
||||
for (G4int j=0; j<(G4int) n; j++)
|
||||
{
|
||||
totalEpost += mass;
|
||||
evapType.push_back(type);
|
||||
}
|
||||
DAabl -= (G4int) (n * type->GetBaryonNumber() + 1.0E-10);
|
||||
DZabl -= (G4int) (n * type->GetPDGCharge() + 1.0E-10);
|
||||
if (verboseLevel >= 2)
|
||||
G4cout <<"Particle type: " <<std::setw(10) <<type->GetParticleName()
|
||||
<<", number of particles emitted = " <<n
|
||||
<<G4endl;
|
||||
}
|
||||
}
|
||||
//
|
||||
//
|
||||
// Determine the properties of the final nuclear fragment.
|
||||
//
|
||||
G4double massFinalFrag = 0.0;
|
||||
if (AF > 0.0)
|
||||
massFinalFrag = G4ParticleTable::GetParticleTable()->GetIonTable()->
|
||||
GetIonMass(ZF,AF);
|
||||
totalEpost += massFinalFrag;
|
||||
//
|
||||
//
|
||||
// Add the total energy from the fragment. Note that the fragment is assumed
|
||||
// to be de-excited and does not undergo photo-evaporation .... I did mention
|
||||
// this is a bit of a crude model?
|
||||
//
|
||||
G4double massPreFrag = theNucleus.GetGroundStateMass();
|
||||
G4double totalEpre = massPreFrag + ex;
|
||||
G4double excess = totalEpre - totalEpost;
|
||||
// G4Fragment *resultNucleus(theNucleus);
|
||||
G4Fragment *resultNucleus = new G4Fragment(A, Z, theNucleus.GetMomentum());
|
||||
G4ThreeVector boost(0.0,0.0,0.0);
|
||||
G4int nEvap = 0;
|
||||
if (produceSecondaries && evapType.size()>0)
|
||||
{
|
||||
if (excess > 0.0)
|
||||
{
|
||||
SelectSecondariesByEvaporation (resultNucleus);
|
||||
nEvap = fragmentVector->size();
|
||||
boost = resultNucleus->GetMomentum().findBoostToCM();
|
||||
if (evapType.size() > 0)
|
||||
SelectSecondariesByDefault (boost);
|
||||
}
|
||||
else
|
||||
SelectSecondariesByDefault(G4ThreeVector(0.0,0.0,0.0));
|
||||
}
|
||||
if (AF > 0)
|
||||
{
|
||||
G4double mass = G4ParticleTable::GetParticleTable()->GetIonTable()->
|
||||
GetIonMass(ZF,AF);
|
||||
G4double e = mass + 10.0*eV;
|
||||
G4double p = sqrt(e*e-mass*mass);
|
||||
G4ThreeVector direction(0.0,0.0,1.0);
|
||||
G4LorentzVector lorentzVector = G4LorentzVector(direction*p, e);
|
||||
lorentzVector.boost(-boost);
|
||||
*resultNucleus = G4Fragment(AF, ZF, lorentzVector);
|
||||
fragmentVector->push_back(resultNucleus);
|
||||
}
|
||||
//
|
||||
//
|
||||
// Provide verbose output on the ablation products if requested.
|
||||
//
|
||||
if (verboseLevel >= 2)
|
||||
{
|
||||
if (nEvap > 0)
|
||||
{
|
||||
G4cout <<"----------------------" <<G4endl;
|
||||
G4cout <<"Evaporated particles :" <<G4endl;
|
||||
G4cout <<"----------------------" <<G4endl;
|
||||
}
|
||||
G4int ie = 0;
|
||||
G4FragmentVector::iterator iter;
|
||||
for (iter = fragmentVector->begin(); iter != fragmentVector->end(); ++iter)
|
||||
{
|
||||
if (ie == nEvap)
|
||||
{
|
||||
G4cout <<*iter <<G4endl;
|
||||
G4cout <<"---------------------------------" <<G4endl;
|
||||
G4cout <<"Particles from default emission :" <<G4endl;
|
||||
G4cout <<"---------------------------------" <<G4endl;
|
||||
}
|
||||
G4cout <<*iter <<G4endl;
|
||||
}
|
||||
G4cout <<"oooooooooooooooooooooooooooooooooooooooo"
|
||||
<<"oooooooooooooooooooooooooooooooooooooooo"
|
||||
<<G4endl;
|
||||
}
|
||||
|
||||
return fragmentVector;
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void G4WilsonAblationModel::SelectSecondariesByEvaporation
|
||||
(G4Fragment *intermediateNucleus)
|
||||
{
|
||||
G4bool evaporate = true;
|
||||
while (evaporate && evapType.size() != 0)
|
||||
{
|
||||
//
|
||||
//
|
||||
// Here's the cheaky bit. We're hijacking the G4Evaporation model, in order to
|
||||
// more accurately sample to kinematics, but the species of the nuclear
|
||||
// fragments will be the ones of our choosing as above.
|
||||
//
|
||||
std::vector <G4VEvaporationChannel*> theChannels;
|
||||
theChannels.clear();
|
||||
VectorOfFragmentTypes::iterator iter;
|
||||
std::vector <VectorOfFragmentTypes::iterator> iters;
|
||||
iters.clear();
|
||||
iter = std::find(evapType.begin(), evapType.end(), G4Alpha::Alpha());
|
||||
if (iter != evapType.end())
|
||||
{
|
||||
theChannels.push_back(new G4AlphaEvaporationChannel);
|
||||
iters.push_back(iter);
|
||||
}
|
||||
iter = std::find(evapType.begin(), evapType.end(), G4He3::He3());
|
||||
if (iter != evapType.end())
|
||||
{
|
||||
theChannels.push_back(new G4He3EvaporationChannel);
|
||||
iters.push_back(iter);
|
||||
}
|
||||
iter = std::find(evapType.begin(), evapType.end(), G4Triton::Triton());
|
||||
if (iter != evapType.end())
|
||||
{
|
||||
theChannels.push_back(new G4TritonEvaporationChannel);
|
||||
iters.push_back(iter);
|
||||
}
|
||||
iter = std::find(evapType.begin(), evapType.end(), G4Deuteron::Deuteron());
|
||||
if (iter != evapType.end())
|
||||
{
|
||||
theChannels.push_back(new G4DeuteronEvaporationChannel);
|
||||
iters.push_back(iter);
|
||||
}
|
||||
iter = std::find(evapType.begin(), evapType.end(), G4Proton::Proton());
|
||||
if (iter != evapType.end())
|
||||
{
|
||||
theChannels.push_back(new G4ProtonEvaporationChannel);
|
||||
iters.push_back(iter);
|
||||
}
|
||||
iter = std::find(evapType.begin(), evapType.end(), G4Neutron::Neutron());
|
||||
if (iter != evapType.end())
|
||||
{
|
||||
theChannels.push_back(new G4NeutronEvaporationChannel);
|
||||
iters.push_back(iter);
|
||||
}
|
||||
G4int nChannels = theChannels.size();
|
||||
|
||||
std::vector<G4VEvaporationChannel*>::iterator iterEv;
|
||||
for (iterEv=theChannels.begin(); iterEv!=theChannels.end(); iterEv++)
|
||||
(*iterEv)->Initialize(*intermediateNucleus);
|
||||
G4double totalProb = std::accumulate(theChannels.begin(),
|
||||
theChannels.end(), 0.0, SumProbabilities());
|
||||
if (totalProb > 0.0)
|
||||
{
|
||||
//
|
||||
//
|
||||
// The emission probability for at least one of the evaporation channels is
|
||||
// positive, therefore work out which one should be selected and decay
|
||||
// the nucleus.
|
||||
//
|
||||
G4double totalProb1 = 0.0;
|
||||
G4double probEvapType[6] = {0.0};
|
||||
for (G4int ich=0; ich<nChannels; ich++)
|
||||
{
|
||||
totalProb1 += theChannels[ich]->GetEmissionProbability();
|
||||
probEvapType[ich] = totalProb1 / totalProb;
|
||||
}
|
||||
G4double xi = G4UniformRand();
|
||||
G4int i = 0;
|
||||
for (i=0; i<nChannels; i++)
|
||||
if (xi < probEvapType[i]) break;
|
||||
if (i > nChannels) i = nChannels - 1;
|
||||
G4FragmentVector *evaporationResult = theChannels[i]->
|
||||
BreakUp(*intermediateNucleus);
|
||||
fragmentVector->push_back((*evaporationResult)[0]);
|
||||
*intermediateNucleus = *(*evaporationResult)[1];
|
||||
delete evaporationResult->back();
|
||||
delete evaporationResult;
|
||||
evapType.erase(iters[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
//
|
||||
// Probability for further evaporation is nil so have to escape from this
|
||||
// routine and set the energies of the secondaries to 10eV.
|
||||
//
|
||||
evaporate = false;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void G4WilsonAblationModel::SelectSecondariesByDefault (G4ThreeVector boost)
|
||||
{
|
||||
for (unsigned i=0; i<evapType.size(); i++)
|
||||
{
|
||||
G4ParticleDefinition *type = fragType[i];
|
||||
G4double mass = type->GetPDGMass();
|
||||
G4double e = mass + 10.0*eV;
|
||||
G4double p = sqrt(e*e-mass*mass);
|
||||
G4double costheta = 2.0*G4UniformRand() - 1.0;
|
||||
G4double sintheta = sqrt((1.0 - costheta)*(1.0 + costheta));
|
||||
G4double phi = twopi * G4UniformRand() * rad;
|
||||
G4ThreeVector direction(sintheta*cos(phi),sintheta*sin(phi),costheta);
|
||||
G4LorentzVector lorentzVector = G4LorentzVector(direction*p, e);
|
||||
lorentzVector.boost(-boost);
|
||||
G4Fragment *fragment =
|
||||
new G4Fragment(lorentzVector, type);
|
||||
fragmentVector->push_back(fragment);
|
||||
}
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void G4WilsonAblationModel::PrintWelcomeMessage ()
|
||||
{
|
||||
G4cout <<G4endl;
|
||||
G4cout <<" *****************************************************************"
|
||||
<<G4endl;
|
||||
G4cout <<" Nuclear ablation model for nuclear-nuclear interactions activated"
|
||||
<<G4endl;
|
||||
G4cout <<" (Written by QinetiQ Ltd for the European Space Agency)"
|
||||
<<G4endl;
|
||||
G4cout <<" *****************************************************************"
|
||||
<<G4endl;
|
||||
G4cout << G4endl;
|
||||
|
||||
return;
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
+16
-3
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4FermiConfigurationList.hh,v 1.2 2003/11/20 09:46:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4FermiConfigurationList.hh,v 1.3 2004/05/09 16:49:07 lara Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Hadronic Process: Nuclear De-excitations
|
||||
// by V. Lara (Nov 1998)
|
||||
@@ -41,7 +41,10 @@ public:
|
||||
G4FermiConfigurationList();
|
||||
|
||||
~G4FermiConfigurationList()
|
||||
{};
|
||||
{
|
||||
std::for_each(Configurations.begin(),Configurations.end(),
|
||||
DeleteConfiguration());
|
||||
}
|
||||
|
||||
private:
|
||||
G4FermiConfigurationList(const G4FermiConfigurationList &right);
|
||||
@@ -67,6 +70,16 @@ private:
|
||||
|
||||
std::vector<G4FermiConfiguration*> Configurations;
|
||||
|
||||
struct DeleteConfiguration
|
||||
{
|
||||
template<typename T>
|
||||
void operator()(const T* ptr) const
|
||||
{
|
||||
delete ptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
+43
-17
@@ -50,7 +50,11 @@ G4int G4FermiSplitter::Initialize(const G4int a, const G4int z, const G4int n)
|
||||
A = a;
|
||||
Z = z;
|
||||
K = n;
|
||||
splits.clear();
|
||||
|
||||
|
||||
// Form all possible partition by combination
|
||||
// of A partitions and Z partitions (Z partitions include null parts)
|
||||
G4FermiIntegerPartition PartitionA;
|
||||
PartitionA.Initialize(A,K);
|
||||
do // for each partition of A
|
||||
@@ -89,25 +93,47 @@ G4int G4FermiSplitter::Initialize(const G4int a, const G4int z, const G4int n)
|
||||
// fragments pool
|
||||
if (static_cast<G4int>(multiplicities.size()) == K)
|
||||
{
|
||||
splits.clear();
|
||||
splits.resize(num_rows);
|
||||
std::vector<std::vector<const G4VFermiFragment*> > tsplits;
|
||||
tsplits.clear();
|
||||
tsplits.resize(num_rows);
|
||||
G4int group_size = num_rows;
|
||||
for (G4int i = 0; i < K; i++)
|
||||
{
|
||||
{
|
||||
az_pair = std::make_pair(partA[i],partZ[i]);
|
||||
for (G4int j = 0; j < num_rows/multiplicities[i]; j++)
|
||||
{ // number of times that we have to introduce the same data
|
||||
G4int k=0;
|
||||
std::multimap<const std::pair<G4int,G4int>, const G4VFermiFragment*,
|
||||
std::less<const std::pair<G4int,G4int> > >::iterator pos;
|
||||
for (pos = theFragmentsPool->LowerBound(az_pair);
|
||||
pos != theFragmentsPool->UpperBound(az_pair); ++pos)
|
||||
{
|
||||
G4int tmp = j*multiplicities[i]+k;
|
||||
splits[tmp].push_back(pos->second);
|
||||
k++;
|
||||
}
|
||||
}
|
||||
}
|
||||
group_size /= multiplicities[i];
|
||||
std::multimap<const std::pair<G4int,G4int>, const G4VFermiFragment*,
|
||||
std::less<const std::pair<G4int,G4int> > >::iterator pos;
|
||||
pos = theFragmentsPool->LowerBound(az_pair);
|
||||
for (G4int k = 0; k < num_rows/group_size; k++)
|
||||
{
|
||||
if (pos == theFragmentsPool->UpperBound(az_pair))
|
||||
{
|
||||
pos = theFragmentsPool->LowerBound(az_pair);
|
||||
}
|
||||
for (G4int l = 0; l < group_size; l++)
|
||||
{
|
||||
tsplits[k*group_size+l].push_back(pos->second);
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
// Remove wrong splits
|
||||
for (std::vector<std::vector<const G4VFermiFragment*> >::iterator
|
||||
itsplits1 = tsplits.begin(); itsplits1 != tsplits.end(); itsplits1++)
|
||||
{
|
||||
std::sort((itsplits1)->begin(), (itsplits1)->end(),
|
||||
std::greater<const G4VFermiFragment*>());
|
||||
}
|
||||
// add splits (eliminating a few of them that are repeated)
|
||||
std::vector<std::vector<const G4VFermiFragment*> >::iterator
|
||||
itlastsplit = tsplits.begin();
|
||||
splits.push_back((*itlastsplit));
|
||||
for (std::vector<std::vector<const G4VFermiFragment*> >::iterator
|
||||
itsplits2 = itlastsplit+1; itsplits2 != tsplits.end(); itsplits2++)
|
||||
{
|
||||
if ( (*itsplits2) != (*itlastsplit)) splits.push_back((*itsplits2));
|
||||
itlastsplit++;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (PartitionZ.Next());
|
||||
|
||||
+2
-2
@@ -87,7 +87,7 @@ G4double G4E1Probability::EmissionProbDensity(const G4Fragment& frag,
|
||||
// For now, just use the constant approximation (not reliable near magic
|
||||
// nuclei).
|
||||
|
||||
G4ConstantLevelDensityParameter a;
|
||||
static G4ConstantLevelDensityParameter a;
|
||||
|
||||
G4double aLevelDensityParam = a.LevelDensityParameter(static_cast<G4int>(Afrag),
|
||||
static_cast<G4int>(Zfrag),
|
||||
@@ -106,7 +106,7 @@ G4double G4E1Probability::EmissionProbDensity(const G4Fragment& frag,
|
||||
G4double Egdp = (40.3 / pow(Afrag,0.2) )*MeV;
|
||||
G4double GammaR = 0.30 * Egdp;
|
||||
|
||||
G4double normC = 1.0 / ((pi * hbarc)*(pi * hbarc));
|
||||
static G4double normC = 1.0 / ((pi * hbarc)*(pi * hbarc));
|
||||
|
||||
// CD
|
||||
//cout<<" PROB TESTS "<<G4endl;
|
||||
|
||||
Reference in New Issue
Block a user