Import Geant4 6.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:56:29 +02:00
parent 1d812b78b1
commit e083ffb441
1415 changed files with 111223 additions and 21207 deletions
+9 -3
View File
@@ -1,11 +1,12 @@
# $Id: GNUmakefile,v 1.13 2003/11/24 12:54:22 gcosmo Exp $
# $Id: GNUmakefile,v 1.16 2004/06/01 05:37:56 hpw Exp $
# --------------------------------------------------------------
# GNUmakefile for hadronic models library. G.Folger 10-Dec-97
# --------------------------------------------------------------
name := G4hadronic_models
SUBDIRS = binary_cascade
SUBDIRS = abrasion
SUBDIRS += binary_cascade
SUBDIRS += cascade/evaporation
SUBDIRS += cascade/utils
SUBDIRS += cascade/cascade
@@ -21,6 +22,8 @@ SUBDIRS += de_excitation/management
SUBDIRS += de_excitation/multifragmentation
SUBDIRS += de_excitation/photon_evaporation
SUBDIRS += de_excitation/util
SUBDIRS += de_excitation/ablation
SUBDIRS += em_dissociation
SUBDIRS += high_energy
SUBDIRS += im_r_matrix
SUBDIRS += isotope_production
@@ -38,7 +41,8 @@ SUBDIRS += radioactive_decay
SUBDIRS += theo_high_energy
SUBDIRS += util
SUBLIBS = G4hadronic_binary
SUBLIBS = G4hadronic_abrasion
SUBLIBS += G4hadronic_binary
SUBLIBS += G4hadronic_coherent_elastic
SUBLIBS += G4hadronic_HE
SUBLIBS += G4had_im_r_matrix
@@ -64,6 +68,8 @@ SUBLIBS += G4hadronic_deex_management
SUBLIBS += G4hadronic_deex_multifragmentation
SUBLIBS += G4hadronic_deex_photon_evaporation
SUBLIBS += G4hadronic_deex_util
SUBLIBS += G4hadronic_ablation
SUBLIBS += G4hadronic_em_dissociation
SUBLIBS += G4had_preequ_exciton
SUBLIBS += G4had_muon_nuclear
SUBLIBS += G4had_string_diff
@@ -0,0 +1,50 @@
# $Id: GNUmakefile,v 1.2 2004/05/28 13:00:45 hpw Exp $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
name := G4hadronic_abrasion
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/ablation/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/de_excitation/ablation/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
@@ -0,0 +1,95 @@
//
// ********************************************************************
// * 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 G4NuclearAbrasionGeometry_h
#define G4NuclearAbrasionGeometry_h 1
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// MODULE: G4NuclearAbrasionGeometry.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
// --------------
//
// 18 November 2003, P R Truscott, QinetiQ Ltd, UK
// Created.
//
// 15 March 2004, P R Truscott, QinetiQ Ltd, UK
// Beta release
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
////////////////////////////////////////////////////////////////////////////////
//
#include "globals.hh"
////////////////////////////////////////////////////////////////////////////////
//
class G4NuclearAbrasionGeometry
{
public:
G4NuclearAbrasionGeometry (G4double AP, G4double AT, G4double r);
~G4NuclearAbrasionGeometry ();
void SetPeripheralThreshold (G4double);
G4double GetPeripheralThreshold ();
G4double F ();
G4double P ();
G4double GetExcitationEnergyOfProjectile ();
G4double GetExcitationEnergyOfTarget ();
private:
G4double AP;
G4double AT;
G4double rP;
G4double rT;
G4double r;
G4double n;
G4double b;
G4double m;
G4double Q;
G4double S;
G4double T;
G4double R;
G4double U;
G4double rth;
G4double B;
};
#endif
@@ -0,0 +1,152 @@
//
// ********************************************************************
// * 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 G4WilsonAbrasionModel_h
#define G4WilsonAbrasionModel_h
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// MODULE: G4WilsonAbrasionModel.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
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// Class Description
//
//
// Class Description - End
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
////////////////////////////////////////////////////////////////////////////////
//
#include "globals.hh"
#include "G4HadronicInteraction.hh"
#include "G4WilsonAblationModel.hh"
#include "G4ExcitationHandler.hh"
#include "G4HadFinalState.hh"
#include "G4Track.hh"
#include "G4Nucleus.hh"
#include "G4Fragment.hh"
#include "G4HadProjectile.hh"
////////////////////////////////////////////////////////////////////////////////
//
class G4WilsonAbrasionModel : public G4HadronicInteraction
{
public:
G4WilsonAbrasionModel (G4bool useAblation1 = false);
G4WilsonAbrasionModel (G4ExcitationHandler *);
~G4WilsonAbrasionModel ();
G4WilsonAbrasionModel(const G4WilsonAbrasionModel &right);
const G4WilsonAbrasionModel& operator=(G4WilsonAbrasionModel &right);
virtual G4HadFinalState *ApplyYourself
(const G4HadProjectile &, G4Nucleus &);
void SetVerboseLevel (G4int);
void SetUseAblation (G4bool);
G4bool GetUseAblation ();
void SetConserveMomentum (G4bool);
G4bool GetConserveMomentum ();
void SetExcitationHandler (G4ExcitationHandler *);
G4ExcitationHandler *GetExcitationHandler ();
private:
void PrintWelcomeMessage ();
G4Fragment *GetAbradedNucleons (G4int, G4double, G4double, G4double);
G4double GetNucleonInducedExcitation (G4double, G4double, G4double);
void SetConserveEnergy (G4bool);
G4bool GetConserveEnergy ();
private:
G4double r0sq;
G4double npK;
G4bool useAblation;
G4WilsonAblationModel *theAblation;
G4ExcitationHandler *theExcitationHandler;
G4ExcitationHandler *theExcitationHandlerx;
G4bool conserveEnergy;
G4bool conserveMomentum;
G4double B;
G4double third;
};
////////////////////////////////////////////////////////////////////////////////
//
inline void G4WilsonAbrasionModel::SetExcitationHandler
(G4ExcitationHandler *aExcitationHandler)
{theExcitationHandler = aExcitationHandler;}
inline G4ExcitationHandler *G4WilsonAbrasionModel::GetExcitationHandler ()
{return theExcitationHandler;}
inline G4bool G4WilsonAbrasionModel::GetUseAblation ()
{return useAblation;}
inline void G4WilsonAbrasionModel::SetConserveEnergy (G4bool conserveEnergy1)
{conserveEnergy = conserveEnergy1;}
inline G4bool G4WilsonAbrasionModel::GetConserveEnergy ()
{return conserveEnergy;}
inline void G4WilsonAbrasionModel::SetConserveMomentum
(G4bool conserveMomentum1)
{conserveMomentum = conserveMomentum1;}
inline G4bool G4WilsonAbrasionModel::GetConserveMomentum ()
{return conserveMomentum;}
inline void G4WilsonAbrasionModel::SetVerboseLevel (G4int verboseLevel1)
{
verboseLevel = verboseLevel1;
if (useAblation)
theAblation->SetVerboseLevel(verboseLevel);
}
////////////////////////////////////////////////////////////////////////////////
//
#endif
@@ -0,0 +1,227 @@
//
// ********************************************************************
// * 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: G4NuclearAbrasionGeometry.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
// --------------
//
// 18 November 2003, P R Truscott, QinetiQ Ltd, UK
// Created.
//
// 15 March 2004, P R Truscott, QinetiQ Ltd, UK
// Beta release
//
// 4 June 2004, J.P. Wellisch, CERN, Switzerland
// resolving technical portability issues.
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
////////////////////////////////////////////////////////////////////////////////
//
#include "G4NuclearAbrasionGeometry.hh"
#include "G4WilsonRadius.hh"
////////////////////////////////////////////////////////////////////////////////
//
G4NuclearAbrasionGeometry::G4NuclearAbrasionGeometry (G4double AP1,
G4double AT1, G4double r1)
{
//
//
// Initialise variables for interaction geometry.
//
G4WilsonRadius aR;
AP = AP1;
AT = AT1;
rP = aR.GetWilsonRadius(AP);
rT = aR.GetWilsonRadius(AT);
r = r1;
n = rP / (rP + rT);
b = r / (rP + rT);
m = rT / rP;
Q = (1.0 - b)/n;
S = Q * Q;
T = S * Q;
R = sqrt(m*n);
U = 1.0/m - 2.0;
//
//
// Initialise the threshold radius-ratio at which interactions are considered
// peripheral or central.
//
rth = 2.0/3.0;
B = 10.0 * MeV;
}
////////////////////////////////////////////////////////////////////////////////
//
G4NuclearAbrasionGeometry::~G4NuclearAbrasionGeometry ()
{;}
////////////////////////////////////////////////////////////////////////////////
//
void G4NuclearAbrasionGeometry::SetPeripheralThreshold (G4double rth1)
{if (rth1 > 0.0 && rth1 <= 1.0) rth = rth1;}
////////////////////////////////////////////////////////////////////////////////
//
G4double G4NuclearAbrasionGeometry::GetPeripheralThreshold ()
{return rth;}
////////////////////////////////////////////////////////////////////////////////
//
G4double G4NuclearAbrasionGeometry::P ()
{
//
//
// Initialise the value for P, then determine the actual value depending upon
// whether the projectile is larger or smaller than the target and these radii
// in relation to the impact parameter.
//
G4double P = 0.0;
if (rT > rP)
{
if (rT-rP<=r && r<=rT+rP) P = 0.125*R*U*S - 0.125*(0.5*R*U+1.0)*T;
else P = -1.0;
}
else
{
if (rP-rT<=r && r<=rP+rT) P = 0.125*R*U*S - 0.125*(0.5*sqrt(n/m)*U-
(sqrt(1.0-m*m)/n - 1.0)*sqrt((2.0-m)/pow(m,5.0)))*T;
else P = (sqrt(1.0-m*m)/n-1.0)*sqrt(1.0-b*b/n/n);
}
if (!(P <= 1.0 && P>= -1.0))
{
if (P > 1.0) P = 1.0;
else P = -1.0;
}
return P;
}
////////////////////////////////////////////////////////////////////////////////
//
G4double G4NuclearAbrasionGeometry::F ()
{
//
//
// Initialise the value for F, then determine the actual value depending upon
// whether the projectile is larger or smaller than the target and these radii
// in relation to the impact parameter.
//
G4double F = 0.0;
if (rT > rP)
{
if (rT-rP<=r && r<=rT+rP) F = 0.75*R*S - 0.125*(3.0*R-1.0)*T;
else F = 1.0;
}
else
{
if (rP-rT<=r && r<=rP+rT) F = 0.75*R*S - 0.125*(3.0*sqrt(n/m)-
(1.0-pow(1.0-m*m,3.0/2.0))*sqrt(1.0-pow(1.0-m,2.0))/pow(m,3.0))*T;
else F = (1.0-pow(1.0-m*m,3.0/2.0))*sqrt(1.0-b*b/n/n);
}
if (!(F <= 1.0 && F>= 0.0))
{
if (F > 1.0) F = 1.0;
else F = 0.0;
}
return F;
}
////////////////////////////////////////////////////////////////////////////////
//
G4double G4NuclearAbrasionGeometry::GetExcitationEnergyOfProjectile ()
{
G4double F1 = F();
G4double P1 = P();
G4double Es = 0.0;
Es = 0.95 * MeV * 4.0 * pi * rP*rP/fermi/fermi *
(1.0+P1-pow(1.0-F1,2.0/3.0));
// if (rT < rP && r < rP-rT)
if ((r-rP)/rT < rth)
{
G4double omega = 0.0;
if (AP < 12.0) omega = 1500.0;
else if (AP <= 16.0) omega = 1500.0 - 320.0*(AP-12.0);
Es *= 1.0 + F1*(5.0+omega*F1*F1);
}
if (Es < 0.0)
Es = 0.0;
else if (Es > B * AP)
Es = B * AP;
return Es;
}
//////////////////////////////////////////////////////////////////////////////////////
//
G4double G4NuclearAbrasionGeometry::GetExcitationEnergyOfTarget ()
{
//
//
// This member function declares a new G4NuclearAbrasionGeometry object but with the
// projectile and target exchanged to determine the values for F and P. Determination
// of the excess surface area and excitation energy is as above.
//
G4NuclearAbrasionGeometry *revAbrasionGeometry =
new G4NuclearAbrasionGeometry(AT, AP, r);
G4double F1 = revAbrasionGeometry->F();
G4double P1 = revAbrasionGeometry->P();
G4double Es = 0.0;
Es = 0.95 * MeV * 4.0 * pi * rT*rT/fermi/fermi *
(1.0+P1-pow(1.0-F1,2.0/3.0));
// if (rP < rT && r < rT-rP)
if ((r-rT)/rP < rth)
{
G4double omega = 0.0;
if (AT < 12.0) omega = 1500.0;
else if (AT <= 16.0) omega = 1500.0 - 320.0*(AT-12.0);
Es *= 1.0 + F1*(5.0+omega*F1*F1);
}
if (Es < 0.0)
Es = 0.0;
else if (Es > B * AT)
Es = B * AT;
return Es;
}
////////////////////////////////////////////////////////////////////////////////
//
@@ -0,0 +1,813 @@
//
// ********************************************************************
// * 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: G4WilsonAbrasionModel.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 "G4WilsonAbrasionModel.hh"
#include "G4WilsonRadius.hh"
#include "G4NuclearAbrasionGeometry.hh"
#include "G4WilsonAblationModel.hh"
#include "G4ExcitationHandler.hh"
#include "G4Evaporation.hh"
#include "G4FermiBreakUp.hh"
#include "G4StatMF.hh"
#include "G4ParticleDefinition.hh"
#include "G4DynamicParticle.hh"
#include "Randomize.hh"
#include "G4Fragment.hh"
#include "G4VNuclearDensity.hh"
#include "G4NuclearShellModelDensity.hh"
#include "G4NuclearFermiDensity.hh"
#include "G4FermiMomentum.hh"
#include "G4ReactionProductVector.hh"
#include "G4LorentzVector.hh"
#include "G4ParticleMomentum.hh"
#include "G4Poisson.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
#include "globals.hh"
////////////////////////////////////////////////////////////////////////////////
//
G4WilsonAbrasionModel::G4WilsonAbrasionModel (G4bool useAblation1)
{
//
//
// 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;
useAblation = useAblation1;
//
//
// No de-excitation handler has been supplied - define the default handler.
//
theExcitationHandler = new G4ExcitationHandler;
theExcitationHandlerx = new G4ExcitationHandler;
if (useAblation)
{
theAblation = new G4WilsonAblationModel;
theAblation->SetVerboseLevel(verboseLevel);
theExcitationHandler->SetEvaporation(theAblation);
theExcitationHandlerx->SetEvaporation(theAblation);
}
else
{
theAblation = NULL;
G4Evaporation * theEvaporation = new G4Evaporation;
G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
G4StatMF * theMF = new G4StatMF;
theExcitationHandler->SetEvaporation(theEvaporation);
theExcitationHandler->SetFermiModel(theFermiBreakUp);
theExcitationHandler->SetMultiFragmentation(theMF);
theExcitationHandler->SetMaxAandZForFermiBreakUp(12, 6);
theExcitationHandler->SetMinEForMultiFrag(5.0*MeV);
theEvaporation = new G4Evaporation;
theFermiBreakUp = new G4FermiBreakUp;
theExcitationHandlerx->SetEvaporation(theEvaporation);
theExcitationHandlerx->SetFermiModel(theFermiBreakUp);
theExcitationHandlerx->SetMaxAandZForFermiBreakUp(12, 6);
}
//
//
// Set the minimum and maximum range for the model (despite nomanclature, this
// is in energy per nucleon number).
//
SetMinEnergy(70.0*MeV);
SetMaxEnergy(10.1*GeV);
isBlocked = false;
//
//
// npK, when mutiplied by the nuclear Fermi momentum, determines the range of
// momentum over which the secondary nucleon momentum is sampled.
//
npK = 5.0;
B = 10.0 * MeV;
third = 1.0 / 3.0;
conserveEnergy = false;
conserveMomentum = true;
}
////////////////////////////////////////////////////////////////////////////////
//
G4WilsonAbrasionModel::G4WilsonAbrasionModel (G4ExcitationHandler *aExcitationHandler)
{
//
//
// 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;
//
//
// The user is able to provide the excitation handler as well as an argument
// which is provided in this instantiation is used to determine
// whether the spectators of the interaction are free following the abrasion.
//
theExcitationHandler = aExcitationHandler;
theExcitationHandlerx = new G4ExcitationHandler;
G4Evaporation * theEvaporation = new G4Evaporation;
G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
theExcitationHandlerx->SetEvaporation(theEvaporation);
theExcitationHandlerx->SetFermiModel(theFermiBreakUp);
theExcitationHandlerx->SetMaxAandZForFermiBreakUp(12, 6);
//
//
// Set the minimum and maximum range for the model (despite nomanclature, this
// is in energy per nucleon number).
//
SetMinEnergy(70.0*MeV);
SetMaxEnergy(10.1*GeV);
isBlocked = false;
//
//
// npK, when mutiplied by the nuclear Fermi momentum, determines the range of
// momentum over which the secondary nucleon momentum is sampled.
//
npK = 5.0;
B = 10.0 * MeV;
third = 1.0 / 3.0;
conserveEnergy = false;
conserveMomentum = true;
}
////////////////////////////////////////////////////////////////////////////////
//
G4WilsonAbrasionModel::~G4WilsonAbrasionModel ()
{
//
//
// The destructor doesn't have to do a great deal!
//
delete theExcitationHandler;
delete theExcitationHandlerx;
}
////////////////////////////////////////////////////////////////////////////////
//
G4HadFinalState *G4WilsonAbrasionModel::ApplyYourself (
const G4HadProjectile &theTrack, G4Nucleus &theTarget)
{
//
//
// The secondaries will be returned in G4HadFinalState &theParticleChange -
// initialise this. The original track will always be discontinued and
// secondaries followed.
//
theParticleChange.Clear();
theParticleChange.SetStatusChange(stopAndKill);
//
//
// Get relevant information about the projectile and target (A, Z, energy/nuc,
// momentum, etc).
//
const G4ParticleDefinition *definitionP = theTrack.GetDefinition();
const G4double AP = definitionP->GetBaryonNumber();
const G4double ZP = definitionP->GetPDGCharge();
G4LorentzVector pP = theTrack.Get4Momentum();
G4double E = theTrack.GetKineticEnergy()/AP;
G4double AT = theTarget.GetN();
G4double ZT = theTarget.GetZ();
G4double TotalEPre = theTrack.GetTotalEnergy() +
theTarget.AtomicMass(AT, ZT) + theTarget.GetEnergyDeposit();
G4double TotalEPost = 0.0;
//
//
// Determine the radii of the projectile and target nuclei.
//
G4WilsonRadius aR;
G4double rP = aR.GetWilsonRadius(AP);
G4double rT = aR.GetWilsonRadius(AT);
G4double rPsq = rP * rP;
G4double rTsq = rT * rT;
if (verboseLevel >= 2)
{
G4cout <<"########################################"
<<"########################################"
<<G4endl;
G4cout.precision(6);
G4cout <<"IN G4WilsonAbrasionModel" <<G4endl;
G4cout <<"Initial projectile A=" <<AP
<<", Z=" <<ZP
<<", radius = " <<rP/fermi <<" fm"
<<G4endl;
G4cout <<"Initial target A=" <<AT
<<", Z=" <<ZT
<<", radius = " <<rT/fermi <<" fm"
<<G4endl;
G4cout <<"Projectile momentum and Energy/nuc = " <<pP <<" ," <<E <<G4endl;
}
//
//
// The following variables are used to determine the impact parameter in the
// near-field (i.e. taking into consideration the electrostatic repulsion).
//
G4double rm = ZP * ZT * elm_coupling / (E * AP);
G4double r = 0.0;
G4double rsq = 0.0;
//
//
// Initialise some of the variables which wll be used to calculate the chord-
// length for nucleons in the projectile and target, and hence calculate the
// number of abraded nucleons and the excitation energy.
//
G4NuclearAbrasionGeometry *theAbrasionGeometry = NULL;
G4double CT = 0.0;
G4double F = 0.0;
G4int Dabr = 0;
//
//
// The following loop is performed until the number of nucleons which are
// abraded by the process is >1, i.e. an interaction MUST occur.
//
while (Dabr == 0)
{
//
//
// Sample the impact parameter. For the moment, this class takes account of
// electrostatic effects on the impact parameter, but (like HZETRN AND NUCFRG2)
// does not make any correction for the effects of nuclear-nuclear repulsion.
//
G4double rPT = rP + rT;
G4double rPTsq = rPT * rPT;
r = 1.1 * rPT;
while (r > rPT)
{
G4double bsq = rPTsq * G4UniformRand();
r = (rm + sqrt(rm*rm + 4.0*bsq)) / 2.0;
}
rsq = r * r;
//
//
// Now determine the chord-length through the target nucleus.
//
if (rT > rP)
{
G4double x = (rPsq + rsq - rTsq) / 2.0 / r;
if (x > 0.0) CT = 2.0 * sqrt(rTsq - x*x);
else CT = 2.0 * sqrt(rTsq - rsq);
}
else
{
G4double x = (rTsq + rsq - rPsq) / 2.0 / r;
if (x > 0.0) CT = 2.0 * sqrt(rTsq - x*x);
else CT = 2.0 * rT;
}
//
//
// Determine the number of abraded nucleons. Note that the mean number of
// abraded nucleons is used to sample the Poisson distribution. The Poisson
// distribution is sampled only ten times with the current impact parameter,
// and if it fails after this to find a case for which the number of abraded
// nucleons >1, the impact parameter is re-sampled.
//
theAbrasionGeometry = new G4NuclearAbrasionGeometry(AP,AT,r);
F = theAbrasionGeometry->F();
G4double lambda = 16.6*fermi / pow(E/MeV,0.26);
G4double Mabr = F * AP * (1.0 - exp(-CT/lambda));
G4long n = 0;
for (G4int i = 0; i<10; i++)
{
n = G4Poisson(Mabr);
if (n > 0)
{
if (n>AP) Dabr = (G4int) AP;
else Dabr = (G4int) n;
break;
}
}
}
if (verboseLevel >= 2)
{
G4cout <<G4endl;
G4cout <<"Impact parameter = " <<r/fermi <<" fm" <<G4endl;
G4cout <<"# Abraded nucleons = " <<Dabr <<G4endl;
}
//
//
// The number of abraded nucleons must be no greater than the number of
// nucleons in either the projectile or the target. If AP - Dabr < 2 or
// AT - Dabr < 2 then either we have only a nucleon left behind in the
// projectile/target or we've tried to abrade too many nucleons - and Dabr
// should be limited.
//
if (AP - (G4double) Dabr < 2.0) Dabr = (G4int) AP;
if (AT - (G4double) Dabr < 2.0) Dabr = (G4int) AT;
//
//
// Determine the abraded secondary nucleons from the projectile. *fragmentP
// is a pointer to the prefragment from the projectile and nSecP is the number
// of nucleons in theParticleChange which have been abraded. The total energy
// from these is determined.
//
G4ThreeVector boost = pP.findBoostToCM();
G4Fragment *fragmentP = GetAbradedNucleons (Dabr, AP, ZP, rP);
G4int nSecP = theParticleChange.GetNumberOfSecondaries();
G4int i = 0;
for (i=0; i<nSecP; i++)
{
TotalEPost += theParticleChange.GetSecondary(i)->
GetParticle()->GetTotalEnergy();
}
//
//
// Determine the number of spectators in the interaction region for the
// projectile.
//
G4int DspcP = (G4int) (AP*F) - Dabr;
if (DspcP <= 0) DspcP = 0;
else if (DspcP > AP-Dabr) DspcP = ((G4int) AP) - Dabr;
//
//
// Determine excitation energy associated with excess surface area of the
// projectile (EsP) and the excitation due to scattering of nucleons which are
// retained within the projectile (ExP). Add the total energy from the excited
// nucleus to the total energy of the secondaries.
//
G4bool excitationAbsorbedByProjectile = false;
if (fragmentP != NULL)
{
G4double EsP = theAbrasionGeometry->GetExcitationEnergyOfProjectile();
G4double ExP = 0.0;
if (Dabr < AT)
excitationAbsorbedByProjectile = G4UniformRand() < 0.5;
if (excitationAbsorbedByProjectile)
ExP = GetNucleonInducedExcitation(rP, rT, r);
G4double xP = EsP + ExP;
if (xP > B*(AP-Dabr)) xP = B*(AP-Dabr);
G4LorentzVector lorentzVector = fragmentP->GetMomentum();
lorentzVector.setE(lorentzVector.e()+xP);
fragmentP->SetMomentum(lorentzVector);
TotalEPost += lorentzVector.e();
}
G4double EMassP = TotalEPost;
//
//
// Determine the abraded secondary nucleons from the target. Note that it's
// assumed that the same number of nucleons are abraded from the target as for
// the projectile, and obviously no boost is applied to the products. *fragmentT
// is a pointer to the prefragment from the target and nSec is the total number
// of nucleons in theParticleChange which have been abraded. The total energy
// from these is determined.
//
G4Fragment *fragmentT = GetAbradedNucleons (Dabr, AT, ZT, rT);
G4int nSec = theParticleChange.GetNumberOfSecondaries();
for (i=nSecP; i<nSec; i++)
{
TotalEPost += theParticleChange.GetSecondary(i)->
GetParticle()->GetTotalEnergy();
}
//
//
// Determine the number of spectators in the interaction region for the
// target.
//
G4int DspcT = (G4int) (AT*F) - Dabr;
if (DspcT <= 0) DspcT = 0;
else if (DspcT > AP-Dabr) DspcT = ((G4int) AT) - Dabr;
//
//
// Determine excitation energy associated with excess surface area of the
// target (EsT) and the excitation due to scattering of nucleons which are
// retained within the target (ExT). Add the total energy from the excited
// nucleus to the total energy of the secondaries.
//
if (fragmentT != NULL)
{
G4double EsT = theAbrasionGeometry->GetExcitationEnergyOfTarget();
G4double ExT = 0.0;
if (!excitationAbsorbedByProjectile)
ExT = GetNucleonInducedExcitation(rT, rP, r);
G4double xT = EsT + ExT;
if (xT > B*(AT-Dabr)) xT = B*(AT-Dabr);
G4LorentzVector lorentzVector = fragmentT->GetMomentum();
lorentzVector.setE(lorentzVector.e()+xT);
fragmentT->SetMomentum(lorentzVector);
TotalEPost += lorentzVector.e();
}
//
//
// Now determine the difference between the pre and post interaction
// energy - this will be used to determine the Lorentz boost if conservation
// of energy is to be imposed/attempted.
//
G4double deltaE = TotalEPre - TotalEPost;
if (deltaE > 0.0 && conserveEnergy)
{
G4double beta = sqrt(1.0 - EMassP*EMassP/pow(deltaE+EMassP,2.0));
boost = boost / boost.mag() * beta;
}
//
//
// Now boost the secondaries from the projectile.
//
G4ThreeVector pBalance = pP.vect();
for (i=0; i<nSecP; i++)
{
G4DynamicParticle *dynamicP = theParticleChange.GetSecondary(i)->
GetParticle();
G4LorentzVector lorentzVector = dynamicP->Get4Momentum();
lorentzVector.boost(-boost);
dynamicP->Set4Momentum(lorentzVector);
pBalance -= lorentzVector.vect();
}
//
//
// Set the boost for the projectile prefragment. This is now based on the
// conservation of momentum. However, if the user selected momentum of the
// prefragment is not to be conserved this simply boosted to the velocity of the
// original projectile times the ratio of the unexcited to the excited mass
// of the prefragment (the excitation increases the effective mass of the
// prefragment, and therefore modifying the boost is an attempt to prevent
// the momentum of the prefragment being excessive).
//
if (fragmentP != NULL)
{
G4LorentzVector lorentzVector = fragmentP->GetMomentum();
G4double m = lorentzVector.m();
if (conserveMomentum)
fragmentP->SetMomentum
(G4LorentzVector(pBalance,sqrt(pBalance.mag2()+m*m+1.0*eV*eV)));
else
{
G4double mg = fragmentP->GetGroundStateMass();
fragmentP->SetMomentum(lorentzVector.boost(-boost * mg/m));
}
}
//
//
// Output information to user if verbose information requested.
//
if (verboseLevel >= 2)
{
G4cout <<G4endl;
G4cout <<"-----------------------------------" <<G4endl;
G4cout <<"Secondary nucleons from projectile:" <<G4endl;
G4cout <<"-----------------------------------" <<G4endl;
G4cout.precision(7);
for (i=0; i<nSecP; i++)
{
G4cout <<"Particle # " <<i <<G4endl;
theParticleChange.GetSecondary(i)->GetParticle()->DumpInfo();
G4DynamicParticle *dyn = theParticleChange.GetSecondary(i)->GetParticle();
G4cout <<"New nucleon (P) " <<dyn->GetDefinition()->GetParticleName()
<<" : " <<dyn->Get4Momentum()
<<G4endl;
}
G4cout <<"---------------------------" <<G4endl;
G4cout <<"The projectile prefragment:" <<G4endl;
G4cout <<"---------------------------" <<G4endl;
if (fragmentP != NULL)
G4cout <<*fragmentP <<G4endl;
else
G4cout <<"(No residual prefragment)" <<G4endl;
G4cout <<G4endl;
G4cout <<"-------------------------------" <<G4endl;
G4cout <<"Secondary nucleons from target:" <<G4endl;
G4cout <<"-------------------------------" <<G4endl;
G4cout.precision(7);
for (i=nSecP; i<nSec; i++)
{
G4cout <<"Particle # " <<i <<G4endl;
theParticleChange.GetSecondary(i)->GetParticle()->DumpInfo();
G4DynamicParticle *dyn = theParticleChange.GetSecondary(i)->GetParticle();
G4cout <<"New nucleon (T) " <<dyn->GetDefinition()->GetParticleName()
<<" : " <<dyn->Get4Momentum()
<<G4endl;
}
G4cout <<"-----------------------" <<G4endl;
G4cout <<"The target prefragment:" <<G4endl;
G4cout <<"-----------------------" <<G4endl;
if (fragmentT != NULL)
G4cout <<*fragmentT <<G4endl;
else
G4cout <<"(No residual prefragment)" <<G4endl;
}
//
//
// Now we can decay the nuclear fragments if present. The secondaries are
// collected and boosted as well. This is performed first for the projectile...
//
if (fragmentP !=NULL)
{
G4ReactionProductVector *products = NULL;
if (fragmentP->GetZ() != fragmentP->GetA())
products = theExcitationHandler->BreakItUp(*fragmentP);
else
products = theExcitationHandlerx->BreakItUp(*fragmentP);
delete fragmentP;
fragmentP = NULL;
G4ReactionProductVector::iterator iter;
for (iter = products->begin(); iter != products->end(); ++iter)
{
G4DynamicParticle *secondary =
new G4DynamicParticle((*iter)->GetDefinition(),
(*iter)->GetTotalEnergy(), (*iter)->GetMomentum());
G4String particleName = (*iter)->GetDefinition()->GetParticleName();
if (verboseLevel >= 2 && particleName.find("[",0) < particleName.size())
{
G4cout <<"------------------------" <<G4endl;
G4cout <<"The projectile fragment:" <<G4endl;
G4cout <<"------------------------" <<G4endl;
G4cout <<" fragmentP = " <<particleName
<<" Energy = " <<secondary->GetKineticEnergy()
<<G4endl;
}
}
}
//
//
// Now decay the target nucleus - no boost is applied since in this
// approximation it is assumed that there is negligible momentum transfer from
// the projectile.
//
if (fragmentT != NULL)
{
G4ReactionProductVector *products = NULL;
if (fragmentT->GetZ() != fragmentT->GetA())
products = theExcitationHandler->BreakItUp(*fragmentT);
else
products = theExcitationHandlerx->BreakItUp(*fragmentT);
delete fragmentT;
fragmentT = NULL;
G4ReactionProductVector::iterator iter;
for (iter = products->begin(); iter != products->end(); ++iter)
{
G4DynamicParticle *secondary =
new G4DynamicParticle((*iter)->GetDefinition(),
(*iter)->GetTotalEnergy(), (*iter)->GetMomentum());
theParticleChange.AddSecondary (secondary);
G4String particleName = (*iter)->GetDefinition()->GetParticleName();
if (verboseLevel >= 2 && particleName.find("[",0) < particleName.size())
{
G4cout <<"--------------------" <<G4endl;
G4cout <<"The target fragment:" <<G4endl;
G4cout <<"--------------------" <<G4endl;
G4cout <<" fragmentT = " <<particleName
<<" Energy = " <<secondary->GetKineticEnergy()
<<G4endl;
}
}
}
if (verboseLevel >= 2)
G4cout <<"########################################"
<<"########################################"
<<G4endl;
delete theAbrasionGeometry;
return &theParticleChange;
}
////////////////////////////////////////////////////////////////////////////////
//
G4Fragment *G4WilsonAbrasionModel::GetAbradedNucleons (G4int Dabr, G4double A,
G4double Z, G4double r)
{
//
//
// Initialise variables. tau is the Fermi radius of the nucleus. The variables
// p..., C... and g(amma) are used to help sample the secondary nucleon
// spectrum.
//
G4double pK = hbarc * pow(9.0 * pi / 4.0 * A, third) / (1.29 * r);
if (A <= 24.0) pK *= -0.229*pow(A,third) + 1.62;
G4double pKsq = pK * pK;
G4double p1sq = 2.0/5.0 * pKsq;
G4double p2sq = 6.0/5.0 * pKsq;
G4double p3sq = 500.0 * 500.0;
G4double C1 = 1.0;
G4double C2 = 0.03;
G4double C3 = 0.0002;
G4double g = 90.0 * MeV;
G4double maxn = C1 + C2 + C3;
//
//
// initialise the number of secondary nucleons abraded to zero, and initially set
// the type of nucleon abraded to proton ... just for now.
//
G4double Aabr = 0.0;
G4double Zabr = 0.0;
G4ParticleDefinition *typeNucleon = G4Proton::ProtonDefinition();
G4DynamicParticle *dynamicNucleon = NULL;
G4ParticleMomentum pabr(0.0, 0.0, 0.0);
//
//
// Now go through each abraded nucleon and sample type, spectrum and angle.
//
for (G4int i=0; i<Dabr; i++)
{
//
//
// Sample the nucleon momentum distribution by simple rejection techniques. We
// reject values of p == 0.0 since this causes bad behaviour in the sinh term.
//
G4double p = 0.0;
G4bool found = false;
while (!found)
{
while (p <= 0.0) p = npK * pK * G4UniformRand();
G4double psq = p * p;
found = maxn * G4UniformRand() < C1*exp(-psq/p1sq/2.0) +
C2*exp(-psq/p2sq/2.0) + C3*exp(-psq/p3sq/2.0) + p/g/sinh(p/g);
}
//
//
// Determine the type of particle abraded. Can only be proton or neutron,
// and the probability is determine to be proportional to the ratio as found
// in the nucleus at each stage.
//
G4double prob = (Z-Zabr)/(A-Aabr);
if (G4UniformRand()<prob)
{
Zabr++;
typeNucleon = G4Proton::ProtonDefinition();
}
else
typeNucleon = G4Neutron::NeutronDefinition();
Aabr++;
//
//
// The angular distribution of the secondary nucleons is approximated to an
// isotropic distribution in the rest frame of the nucleus (this will be Lorentz
// boosted later.
//
G4double costheta = 2.*G4UniformRand()-1.0;
G4double sintheta = sqrt((1.0 - costheta)*(1.0 + costheta));
G4double phi = 2.0*pi*G4UniformRand()*rad;
G4ThreeVector direction(sintheta*cos(phi),sintheta*sin(phi),costheta);
G4double nucleonMass = typeNucleon->GetPDGMass();
G4double E = sqrt(p*p + nucleonMass*nucleonMass)-nucleonMass;
dynamicNucleon = new G4DynamicParticle(typeNucleon,direction,E);
theParticleChange.AddSecondary (dynamicNucleon);
pabr += p*direction;
}
//
//
// Next determine the details of the nuclear prefragment .. that is if there
// is one or more protons in the residue. (Note that the 1 eV in the total
// energy is a safety factor to avoid any possibility of negative rest mass
// energy.)
//
G4Fragment *fragment = NULL;
if (Z-Zabr>=1.0)
{
G4double ionMass = G4ParticleTable::GetParticleTable()->GetIonTable()->
GetIonMass(G4lrint(Z-Zabr),G4lrint(A-Aabr));
G4double E = sqrt(pabr.mag2() + ionMass*ionMass);
G4LorentzVector lorentzVector = G4LorentzVector(-pabr, E + 1.0*eV);
fragment =
new G4Fragment((G4int) (A-Aabr), (G4int) (Z-Zabr), lorentzVector);
}
return fragment;
}
////////////////////////////////////////////////////////////////////////////////
//
G4double G4WilsonAbrasionModel::GetNucleonInducedExcitation
(G4double rP, G4double rT, G4double r)
{
//
//
// Initialise variables.
//
G4double Cl = 0.0;
G4double rPsq = rP * rP;
G4double rTsq = rT * rT;
G4double rsq = r * r;
//
//
// Depending upon the impact parameter, a different form of the chord length is
// is used.
//
if (r > rT) Cl = 2.0*sqrt(rPsq + 2.0*r*rT - rsq - rTsq);
else Cl = 2.0*rP;
G4double bP = (rPsq+rsq-rTsq)/2.0/r;
G4double Ct = 2.0*sqrt(rPsq - bP*bP);
G4double Ex = 13.0 * Cl / fermi;
if (Ct > 1.5*fermi)
Ex += 13.0 * Cl / fermi /3.0 * (Ct/fermi - 1.5);
return Ex;
}
////////////////////////////////////////////////////////////////////////////////
//
void G4WilsonAbrasionModel::SetUseAblation (G4bool useAblation1)
{
if (useAblation != useAblation1)
{
useAblation = useAblation1;
delete theExcitationHandler;
delete theExcitationHandlerx;
theExcitationHandler = new G4ExcitationHandler;
theExcitationHandlerx = new G4ExcitationHandler;
if (useAblation)
{
theAblation = new G4WilsonAblationModel;
theAblation->SetVerboseLevel(verboseLevel);
theExcitationHandler->SetEvaporation(theAblation);
theExcitationHandlerx->SetEvaporation(theAblation);
}
else
{
theAblation = NULL;
G4Evaporation * theEvaporation = new G4Evaporation;
G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
G4StatMF * theMF = new G4StatMF;
theExcitationHandler->SetEvaporation(theEvaporation);
theExcitationHandler->SetFermiModel(theFermiBreakUp);
theExcitationHandler->SetMultiFragmentation(theMF);
theExcitationHandler->SetMaxAandZForFermiBreakUp(12, 6);
theExcitationHandler->SetMinEForMultiFrag(5.0*MeV);
theEvaporation = new G4Evaporation;
theFermiBreakUp = new G4FermiBreakUp;
theExcitationHandlerx->SetEvaporation(theEvaporation);
theExcitationHandlerx->SetFermiModel(theFermiBreakUp);
theExcitationHandlerx->SetMaxAandZForFermiBreakUp(12, 6);
}
}
return;
}
////////////////////////////////////////////////////////////////////////////////
//
void G4WilsonAbrasionModel::PrintWelcomeMessage ()
{
G4cout <<G4endl;
G4cout <<" *****************************************************************"
<<G4endl;
G4cout <<" Nuclear abrasion model for nuclear-nuclear interactions activated"
<<G4endl;
G4cout <<" (Written by QinetiQ Ltd for the European Space Agency)"
<<G4endl;
G4cout <<" *****************************************************************"
<<G4endl;
G4cout << G4endl;
return;
}
////////////////////////////////////////////////////////////////////////////////
//
@@ -211,6 +211,11 @@ G4HadFinalState * G4BinaryCascade::ApplyYourself(const G4HadProjectile & aTrack,
theParticleChange.SetStatusChange(stopAndKill);
G4ReactionProductVector::iterator iter;
G4double Efinal=0;
if (abs(theParticleChange.GetWeightChange() -1 ) > 1e-5 )
{
G4cout <<" BIC-weight change " << theParticleChange.GetWeightChange()<< G4endl;
}
for(iter = products->begin(); iter != products->end(); ++iter)
{
G4DynamicParticle * aNew =
@@ -245,6 +250,10 @@ G4HadFinalState * G4BinaryCascade::ApplyYourself(const G4HadProjectile & aTrack,
the3DNucleus = NULL; // protect from wrong usage...
if(getenv("BCDEBUG") ) G4cerr << " ######### Binary Cascade Reaction number ends ######### "<<eventcounter<<G4endl;
if (abs(theParticleChange.GetWeightChange() -1 ) > 1e-5 )
{
G4cout <<" BIC-fin-weight change " << theParticleChange.GetWeightChange()<< G4endl;
}
return &theParticleChange;
}
@@ -425,6 +434,12 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
PrintKTVector(&theFinalState,std::string(" FinalState uncorrected"));
#endif
//
CorrectFinalPandE();
#ifdef debug_G4BinaryCascade
@@ -436,41 +451,34 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
G4double ExcitationEnergy=GetExcitationEnergy();
// G4cerr <<"mon - all pushed to limit 2"<<G4endl;
//#ifdef HKM_DEBUG
// G4cout << " Excitation Energy final, Ekinout, #collisions: "
// << ExcitationEnergy << " "
// << Ekinout << " "
// << collisionCount <<G4endl;
// G4cout << " Out from casc: " << theFinalState.size() << G4endl;
//#endif
#ifdef debug_G4BinaryCascade
G4cout << " Excitation Energy final, #collisions:, out, captured "
<< ExcitationEnergy << " "
<< collisionCount << " "
<< theFinalState.size() << " "
<< theCapturedList.size()<<G4endl;
#endif
if ( ExcitationEnergy < 0. )
{
// if ( ExcitationEnergy < 0. )
{
#ifdef debug_G4BinaryCascade
G4cerr << "G4BinaryCascade-Warning: negative excitation energy ";
G4cerr <<ExcitationEnergy<<G4endl;
PrintKTVector(&theFinalState,std::string("FinalState"));
PrintKTVector(&theCapturedList,std::string("captured"));
G4cout << "negative ExE:Final 4Momentum .mag: " << GetFinal4Momentum()
<< " "<< GetFinal4Momentum().mag()<< G4endl
<< "negative ExE:FinalNucleusMom .mag: " << GetFinalNucleusMomentum()
<< " "<< GetFinalNucleusMomentum().mag()<< G4endl;
#endif
//#ifdef debug_G4BinaryCascade
// G4cerr << "G4BinaryCascade-Warning: negative excitation energy ";
// G4cerr <<ExcitationEnergy<<G4endl;
// PrintKTVector(&theFinalState,std::string("FinalState"));
// PrintKTVector(&theCapturedList,std::string("captured"));
// G4cout << "negative ExE:Final 4Momentum .mag: " << GetFinal4Momentum()
// << " "<< GetFinal4Momentum().mag()<< G4endl
// << "negative ExE:FinalNucleusMom .mag: " << GetFinalNucleusMomentum()
// << " "<< GetFinalNucleusMomentum().mag()<< G4endl;
//#endif
}
ClearAndDestroy(products);
return products; // return empty products
}
//#ifdef HKM_DEBUG
// G4cout << " Excitation Energy final, Ekinout, #collisions: "
// << ExcitationEnergy << " "
// << Ekinout << " "
// << collisionCount <<G4endl;
// G4cout << " Out from casc: " << theFinalState.size() << G4endl;
//#endif
// find a fragment and call the precompound model.
G4Fragment * fragment = 0;
@@ -808,7 +816,11 @@ void G4BinaryCascade::FindCollisions(G4KineticTrackVector * secondaries)
for(std::vector<G4KineticTrack *>::iterator i = secondaries->begin();
i != secondaries->end(); ++i)
{
for(std::vector<G4BCAction *>::iterator j = theImR.begin();
if ( (*i)->GetTrackingMomentum().mag2() < -1.*eV )
{
G4cout << "G4BinaryCascade::FindCollisions(): negative m2:" << (*i)->GetTrackingMomentum().mag2() << G4endl;
}
for(std::vector<G4BCAction *>::iterator j = theImR.begin();
j!=theImR.end(); j++)
{
const std::vector<G4CollisionInitialState *> & aCandList
@@ -1157,7 +1169,6 @@ void G4BinaryCascade::StepParticlesOut()
{
G4int counter=0;
G4int countreset=0;
G4double steplength=1.0 * fermi;
//G4cout << " nucl. Radius " << radius << G4endl;
// G4cerr <<"pre-while- theSecondaryList "<<G4endl;
while( theSecondaryList.size() > 0 )
@@ -1171,27 +1182,24 @@ void G4BinaryCascade::StepParticlesOut()
G4KineticTrack * kt = *i;
if( kt->GetState() == G4KineticTrack::inside )
{
if((kt->GetDefinition() == G4Proton::Proton()) || // @@@ GF why only for nucleons?
(kt->GetDefinition() == G4Neutron::Neutron()))
{
nsec++;
G4double tStep = steplength / ( kt->Get4Momentum().beta() * c_light );
G4double tStep(0), tdummy(0);
((G4RKPropagation*)thePropagator)->GetSphereIntersectionTimes(kt,tdummy,tStep);
#ifdef debug_G4BinaryCascade
G4cout << " minTimeStep, tStep Particle " <<minTimeStep << " " <<tStep
<< " " <<kt->GetDefinition()->GetParticleName() << " 4mom " << kt->GetTrackingMomentum()<<G4endl;
<< " " <<kt->GetDefinition()->GetParticleName()
<< " 4mom " << kt->GetTrackingMomentum()<<G4endl;
#endif
if(tStep<minTimeStep)
if(tStep<minTimeStep && tStep> 0 )
{
minTimeStep = tStep;
// G4cerr <<"Position "<<kt->GetPosition().mag()<<" "
// <<kt->GetTrackingMomentum().e()-kt->GetTrackingMomentum().mag()<<G4endl;
}
}
} else if ( kt->GetState() != G4KineticTrack::outside ){
PrintKTVector(&theSecondaryList, std::string(" state ERROR....."));
throw G4HadronicException(__FILE__, __LINE__, "G4BinaryCascade::StepParticlesOut() particle not in nucleus");
}
}
minTimeStep *= 1.2;
// G4cerr << "CaptureCount = "<<counter<<" "<<nsec<<" "<<minTimeStep<<" "<<1*ns<<G4endl;
G4double timeToCollision=DBL_MAX;
G4CollisionInitialState * nextCollision=0;
@@ -1281,11 +1289,22 @@ void G4BinaryCascade::StepParticlesOut()
void G4BinaryCascade::CorrectFinalPandE()
//----------------------------------------------------------------------------
{
if ( theFinalState.size() == 0 ) return;
#ifdef debug_G4BinaryCascade
G4cerr << " -CorrectFinalPandE 1" << G4endl;
#endif
if ( theFinalState.size() == 0 ) return;
#ifdef debug_G4BinaryCascade
G4cerr << " -CorrectFinalPandE 2" << G4endl;
#endif
G4KineticTrackVector::iterator i;
G4LorentzVector pNucleus=GetFinal4Momentum();
if ( pNucleus.e() == 0 ) return; // check against explicit 0 from GetNucleus4Momentum()
#ifdef debug_G4BinaryCascade
G4cerr << " -CorrectFinalPandE 3" << G4endl;
#endif
G4LorentzVector pFinals(0);
G4int nFinals(0);
for(i = theFinalState.begin(); i != theFinalState.end(); ++i)
@@ -1309,6 +1328,7 @@ void G4BinaryCascade::CorrectFinalPandE()
G4cout << "CorrectFinalPandE pCM, CMS pCM " << pCM << " " <<toCMS*pCM<< G4endl;
G4cout << "CorrectFinal CMS pN pF " <<toCMS*pNucleus << " "
<<pFinals << G4endl
<< " nucleus initial mass : " <<GetFinal4Momentum().mag()
<<" massInNucleus m(nucleus) m(finals) sqrt(s): " << massInNucleus << " " <<pNucleus.mag()<< " "
<< pFinals.mag() << " " << pCM.mag() << G4endl;
#endif
@@ -1316,12 +1336,23 @@ void G4BinaryCascade::CorrectFinalPandE()
G4LorentzRotation toLab = toCMS.inverse();
G4double s = pCM.mag2();
G4double m10 = massInNucleus; //pNucleus.mag();
// G4double m10 = massInNucleus; //pNucleus.mag();
G4double m10 = GetIonMass(currentZ,currentA);
G4double m20 = pFinals.mag();
if( s-(m10+m20)*(m10+m20) < 0 )
{
#ifdef debug_G4BinaryCascade
G4cout << "G4BinaryCascade::CorrectFinalPandE() : error! " << G4endl;
G4cout << "not enough mass to correct: mass, A,Z, mass(nucl), mass(finals) "
<< sqrt(-s+(m10+m20)*(m10+m20)) << " "
<< currentA << " " << currentZ << " "
<< m10 << " " << m20
<< G4endl;
G4cerr << " -CorrectFinalPandE 4" << G4endl;
PrintKTVector(&theFinalState," mass problem");
#endif
return;
}
@@ -1329,10 +1360,14 @@ void G4BinaryCascade::CorrectFinalPandE()
// Three momentum in cm system
G4double pInCM = sqrt((s-(m10+m20)*(m10+m20))*(s-(m10-m20)*(m10-m20))/(4.*s));
#ifdef debug_G4BinaryCascade
G4cout <<" CorrectFinalPandE pInCM current/new : " <<(pFinals).vect().mag() << " " <<pInCM << G4endl;
G4cout <<" CorrectFinalPandE pInCM new, CURRENT, ratio : " << pInCM
<< " " << (pFinals).vect().mag()<< " " << pInCM/(pFinals).vect().mag() << G4endl;
#endif
if ( pFinals.vect().mag() > pInCM )
{
#ifdef debug_G4BinaryCascade
G4cerr << " -CorrectFinalPandE 5" << G4endl;
#endif
G4ThreeVector p3finals=pInCM*pFinals.vect().unit();
// G4ThreeVector deltap=(p3finals - pFinals.vect() ) / nFinals;
@@ -1356,7 +1391,10 @@ void G4BinaryCascade::CorrectFinalPandE()
<< " CMS pFinals , mag, 3.mag : " << qFinals << " " << qFinals.mag() << " " << qFinals.vect().mag()<< G4endl;
#endif
}
#ifdef debug_G4BinaryCascade
else { G4cerr << " -CorrectFinalPandE 6" << G4endl; }
#endif
}
//----------------------------------------------------------------------------
@@ -1963,7 +2001,7 @@ G4LorentzVector G4BinaryCascade::GetFinalNucleusMomentum()
G4LorentzRotation nucleusBoost( -boost );
precompoundLorentzboost.set( boost );
#ifdef debug_G4BinaryCascade
G4cout << "it "<<NucleusMomentum<<" "<<CapturedMomentum<<" "<<G4endl;
G4cout << "GetFinalNucleusMomentum be4 boostNucleusMomentum, CapturedMomentum"<<NucleusMomentum<<" "<<CapturedMomentum<<" "<<G4endl;
#endif
NucleusMomentum *= nucleusBoost;
#ifdef debug_G4BinaryCascade
@@ -131,6 +131,7 @@
G4LorentzVector it;
G4FermiMomentum theFermi;
G4int tryCount(0);
while(!result)
{
projectile = new G4Fancy3DNucleus;
@@ -197,6 +198,28 @@
delete result; result=0;
delete fancyNucleus;
delete projectile;
if (++tryCount > 100)
{
// abort!!
G4cerr << "G4BinaryLightIonReaction no final state for: " << G4endl;
G4cerr << " Primary " << aTrack.GetDefinition()
<< ", (A,Z)=(" << aTrack.GetDefinition()->GetBaryonNumber()
<< "," << aTrack.GetDefinition()->GetPDGCharge() << ") "
<< ", kinetic energy " << aTrack.GetKineticEnergy()
<< G4endl;
G4cerr << " Target nucleus (A,Z)=(" << targetNucleus.GetN()
<< "," << targetNucleus.GetZ() << G4endl;
G4cerr << " if frequent, please submit above information as bug report"
<< G4endl << G4endl;
theResult.Clear();
theResult.SetStatusChange(isAlive);
theResult.SetEnergyChange(aTrack.GetKineticEnergy());
theResult.SetMomentumChange(aTrack.Get4Momentum().vect().unit());
return &theResult;
}
}
else
{
@@ -366,11 +389,27 @@
proFrag = theHandler.BreakItUp(aProRes);
if ( momentum.vect().mag() > momentum.e() )
{
G4cout << "mom check: " << momentum
G4cerr << "mom check: " << momentum
<< " 3.mag "<< momentum.vect().mag() << G4endl
<< " .. iState/fState/spectators " << iState <<" "
<< fState << " " << pspectators << G4endl
<< " .. A,Z " << resA <<" "<< resZ << G4endl;
G4cerr << "G4BinaryLightIonReaction no final state for: " << G4endl;
G4cerr << " Primary " << aTrack.GetDefinition()
<< ", (A,Z)=(" << aTrack.GetDefinition()->GetBaryonNumber()
<< "," << aTrack.GetDefinition()->GetPDGCharge() << ") "
<< ", kinetic energy " << aTrack.GetKineticEnergy()
<< G4endl;
G4cerr << " Target nucleus (A,Z)=(" << targetNucleus.GetN()
<< "," << targetNucleus.GetZ() << G4endl;
G4cerr << " if frequent, please submit above information as bug report"
<< G4endl << G4endl;
theResult.Clear();
theResult.SetStatusChange(isAlive);
theResult.SetEnergyChange(aTrack.GetKineticEnergy());
theResult.SetMomentumChange(aTrack.Get4Momentum().vect().unit());
return &theResult;
}
G4LorentzRotation boost_fragments_here(momentum.boostVector());
@@ -477,6 +516,7 @@
if(swapped)
{
tmp*=toBreit.inverse();
tmp.setVect(-tmp.vect());
}
tmp *= toLab;
aNew->Set4Momentum(tmp);
@@ -240,7 +240,7 @@ void G4RKPropagation::Init(G4V3DNucleus * nucleus)
}
//#define debug_1_RKPropagation 1
//----------------------------------------------------------------------------
void G4RKPropagation::Transport(G4KineticTrackVector & active,
//----------------------------------------------------------------------------
@@ -328,7 +328,7 @@ void G4RKPropagation::Transport(G4KineticTrackVector & active,
if(newE <= kt->GetActualMass()) // the particle cannot enter the nucleus
{
// FixMe: should be "pushed back?"
// for the moment take it past teh nucleus, so we'll not worry next time..
// for the moment take it past the nucleus, so we'll not worry next time..
FreeTransport(kt, 1.1*t_leave); // take past nucleus
kt->SetState(G4KineticTrack::miss_nucleus);
continue;
@@ -623,15 +623,15 @@ G4bool G4RKPropagation::GetSphereIntersectionTimes(const G4KineticTrack * kt,
G4double radius = theOuterRadius + 3*fermi; // "safety" of 3 fermi
G4ThreeVector speed = kt->GetTrackingMomentum().vect()/kt->GetTrackingMomentum().e(); // bost vector
G4double scalarProd = kt->GetPosition().dot(speed);
G4double speedMag = speed.mag();
G4double speedMag2 = speed.mag2();
G4double sqrtArg = scalarProd*scalarProd -
speedMag*speedMag*(kt->GetPosition().mag2()-radius*radius);
speedMag2*(kt->GetPosition().mag2()-radius*radius);
if(sqrtArg <= 0.) // particle will not intersect the sphere
{
return false;
}
t1 = (-scalarProd - sqrt(sqrtArg))/speedMag/speedMag/c_light;
t2 = (-scalarProd + sqrt(sqrtArg))/speedMag/speedMag/c_light;
t1 = (-scalarProd - sqrt(sqrtArg))/speedMag2/c_light;
t2 = (-scalarProd + sqrt(sqrtArg))/speedMag2/c_light;
return true;
}
@@ -122,6 +122,8 @@ G4HadFinalState* G4CascadeInterface::ApplyYourself(const G4HadProjectile& aTrack
// Set target
G4InuclNuclei* target = NULL;
G4InuclParticle* targetH = NULL;
// and outcoming particles
G4DynamicParticle* cascadeParticle = NULL;
std::vector<G4double> targetMomentum(4, 0.0);
@@ -252,8 +254,6 @@ G4HadFinalState* G4CascadeInterface::ApplyYourself(const G4HadProjectile& aTrack
sumEnergy -= ekin / GeV;
G4DynamicParticle* cascadeParticle = NULL;
switch(outgoingParticle) {
case proton:
@@ -320,7 +320,7 @@ G4HadFinalState* G4CascadeInterface::ApplyYourself(const G4HadProjectile& aTrack
}
// get nuclei fragments
G4DynamicParticle * aFragment = 0;
G4DynamicParticle * aFragment = NULL;
G4ParticleDefinition * aIonDef = 0;
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
@@ -377,5 +377,19 @@ G4HadFinalState* G4CascadeInterface::ApplyYourself(const G4HadProjectile& aTrack
}
}
delete bullet;
delete colep;
delete inc;
delete noneq;
delete fiss;
delete eqil;
delete bigb;
delete collider;
if(target != NULL) delete target;
if(targetH != NULL) delete targetH;
if(cascadeParticle != NULL) delete cascadeParticle;
if(aFragment != NULL) delete aFragment;
return &theResult;
}
@@ -0,0 +1,141 @@
//
// ********************************************************************
// * 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. *
// * 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: G4QCaptureAtRest.hh,v 1.2 2004/03/18 08:02:37 mkossov Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
// ---------------- G4QCaptureAtRest header ----------------
// by Mikhail Kossov, December 2003.
// Header of G4QCaptureAtRest class (mu-,pi-,K-) of the CHIPS Simulation Branch in GEANT4
// -------------------------------------------------------------------------------
// This is a unique CHIPS class for the Nuclear Capture At Rest Prosesses.
// -------------------------------------------------------------------------------
// At present (Dec.03) only pi-, K- and antiNucleon capture is implemented, which
// are the most crucial for the in matter simulation. The hyperon capture (Sigma-,
// Xi-, Omega-, antiSigma+) is implemented, but not tested and it is not clear how
// frequently this kind of interaction takes place in the simulation of the hadronic
// showers. The antiNeutron Capture At Rest is implemented by this G4QCaptureAtRest
// class, but it is not clear how the anti-neutrons are stopped in Geant4 tracking.
// It can be stopped only by interactions with electrons, as the annihilation
// cross section is huge and any interaction with nucleus results in annihilation.
// --> The mu-&tau- Capture At Rest (mu-,nu)&(mu-,nu) are weak processes, which must
// be simulated together with the reversed Betha decay (e-,nu). While mu- capture is
// similar to the pi- capture from the nuclear fragmentation point of view (the energy
// scale is shrinked mecause m_mu<m_pi and a part of energy is lost because of the
// neutrino radiation), the time scale of the mu- capture process is not clear,
// but it is clear, that it is well delayed. By this reason the mu- capture is not
// included in the G4QCaptureAtRest and must be implemented in the "LongLivingDecay"
// branch of simulation, which includes excited states of nuclei and short living
// isotopes. On the "Fast Simulation" Level all radioactiv isotopes, long living
// nuclear excitations, mu-atoms etc, which can be important for the background
// signals, must be collected in the continuous database and simulated separately.
// --> CHIPS is SU(3) event generator, so it does not include reactions with the
// heavy (c,b,t) quarks involved such as tau- or antiDs-, which can be simulated
// only by SU(6) QUIPS (QUark Invariant Phase Space) model.-December 2003.M.Kossov.-
// -------------------------------------------------------------------------------
// All algorithms are similar: the captured particle is absorbed by a nuclear cluster
// with the subsequent Quark Exchange nuclear fragmentation. The Anti-Proton (antiSigma+)
// Capture algorithm is more complicated: the anti-baryon annihilates with the quasyfree
// nucleons on the nuclear periphery. The peripheral interaction results in a number
// of mesons. A part of them misses the nucleus and comes directly to the output,
// while others create Multy Quasmon Excitation in the nucleus with the subsequent
// Quark Excange Fragmentation of the nucleus. At present the two step mechanism of
// the antiProton-Nucleus interaction is hardwired in the G4QEnvironment class, but
// with time the first step of the interaction can be moved to this G4QCaptureAtRest
// class, to make the G4QEnvirement class simpler and better defined. This is
// necessary because the G4QEnvironment class is going to loos the previlage of
// the CHIPS Head Class (as previously the G4Quasmon class lost it) and G4QCollision
// class is going to be the CHIPS Head Class, where a few Nuclear Environments can
// exist (e.g. the Nuclear Environment of the Projectile Nucleus and the Nuclear
// Environment of the Target Nucleus). By the way the antiProton-H1 interaction At
// Rest (CHIPSI) can be still simulated with only the G4Quasmon class, as this
// reaction does not have any nuclear environment.- December 2003.Mikhail Kossov.-
// --------------------------------------------------------------------------------
// ****************************************************************************************
// ********* This HEADER is temporary moved from the photolepton_hadron directory *********
// ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
// ****************************************************************************************
#ifndef G4QCaptureAtRest_hh
#define G4QCaptureAtRest_hh
// GEANT4 Headers
#include "globals.hh"
#include "G4ios.hh"
#include "G4VRestProcess.hh"
#include "G4ParticleTypes.hh"
#include "G4VParticleChange.hh"
#include "G4ParticleDefinition.hh"
#include "G4DynamicParticle.hh"
#include "G4NucleiPropertiesTable.hh"
#include "Randomize.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
// CHIPS Headers
#include "G4QEnvironment.hh"
#include "G4QIsotope.hh"
//<vector> is included in G4QIsotope.hh
//#include <vector>
class G4QCaptureAtRest : public G4VRestProcess
{
private:
// Hide assignment operator as private
G4QCaptureAtRest& operator=(const G4QCaptureAtRest &right);
// Copy constructor
G4QCaptureAtRest(const G4QCaptureAtRest& );
public:
// Constructor
G4QCaptureAtRest(const G4String& processName ="CHIPSNuclearAbsorptionAtRest");
// Destructor
~G4QCaptureAtRest();
G4bool IsApplicable(const G4ParticleDefinition& particle);
G4VParticleChange* AtRestDoIt(const G4Track& aTrack, const G4Step& aStep);
protected:
// zero mean lifetime
G4double GetMeanLifeTime(const G4Track& aTrack, G4ForceCondition* );
void MuCaptureEMCascade(G4int Z, G4int N, std::vector<G4double>* dV);
private:
G4bool RandomizeMuDecayOrCapture(G4int Z, G4int N); // true=MuCapture, false=MuDecay
void CalculateEnergyDepositionOfMuCapture(G4int Z); // (2p->1s, MeV) @@ Now N-independent
G4bool RandomizeTauDecayOrCapture(G4int Z, G4int N);// true=TauCapture, false=TauDecay
void CalculateEnergyDepositionOfTauCapture(G4int Z);// (2p->1s, MeV) @@N-independ,Improve
private:
G4double Time; // Time shift of the capture reaction
G4double EnergyDeposition; // Energy deposited in the reaction
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4QEnvironment.hh,v 1.21.2.1 2004/03/25 10:44:38 gunter Exp $
// GEANT4 tag $Name: geant4-06-01 $
// $Id: G4QEnvironment.hh,v 1.24 2004/06/18 09:19:26 gunter Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
// ---------------- G4QEnvironment ----------------
// by Mikhail Kossov, August 2000.
@@ -59,9 +59,6 @@ public:
// Static functions
static void SetParameters(G4double solAn=0.4,G4bool efFlag=false,G4double piThresh=141.4,
G4double mpisq=20000., G4double dinum=1880.);
// General purpose functions
G4ThreeVector RndmDir(); // Randomize 3D direction (@@subst by libFunc)
private:
G4QHadronVector* FSInteraction(); // Final State Interaction after Hadronization
G4QHadronVector HadronizeQEnvironment(); // Main HadronizationFunction used in Fragment
@@ -105,14 +102,13 @@ private:
G4int theTargetPDG; // PDG of the target nucleus in the interaction
};
//General function makes Random Unit 3D-Vector
G4ThreeVector RndmDir();
// Inline functions
inline G4bool G4QEnvironment::operator==(const G4QEnvironment &rhs) const
{return this == &rhs;}
inline G4bool G4QEnvironment::operator!=(const G4QEnvironment &rhs) const
{return this != &rhs;}
inline G4QNucleus G4QEnvironment::GetEnvironment() const {return theEnvironment;}
#endif
@@ -0,0 +1,134 @@
//
// ********************************************************************
// * 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. *
// * 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: G4QIsotope.hh,v 1.1 2004/03/17 13:01:39 mkossov Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// ---------------- G4QIsotope header ----------------
// by Mikhail Kossov, December 2003.
// Header of the G4QIsotope class of the CHIPS Simulation Branch in GEANT4
// ----------------------------------------------------------------------------
// It contains information about natural abundances of stable and long living
// isotopes and a NEW "Element" can be initialised for any isotope set.
// Randomization of isotopes of the Natural Elements is hardwired and fast
// Randomization of isotopes of the user defined Elements is a bit slower
// CrossSectionWeighted randomisation of isotopes is slow (same for Nat and New)
// -------------------------------------------------------------------------------
//
// 1 2 3 4 5 6 7 8 9
//34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
#ifndef G4QIsotope_hh
#define G4QIsotope_hh
#include "globals.hh"
#include "G4ios.hh"
#include "Randomize.hh"
#include <vector>
class G4QIsotope
{
protected:
G4QIsotope(); // ***Singletone*** All natural elements are initialized in the Constructor
public:
~G4QIsotope(); // It's public for compilation purposes on Windows, user must not call it!
// Create newElement with the Abundancy vector (User must delete elements of the vector)
// ===================================================================================
// Example of initialization of the new Element (not natural abanduncies of isotopes):
// ======= ---------------------------------------------------------------------------
//std::vector<std::pair<G4int,G4double> >*a= new std::vector<std::pair<G4int,G4double> >;
// a->push_back(std::make_pair(n1,abundancy1));
// a->push_back(std::make_pair(n2,abundancy2));
// a->push_back(std::make_pair(n3,1.-abundancy1-abundancy2));
////Sum of abundancies must be 1 otherwise worning appears & if less LastAbu is increased
// G4int Z=1;
// G4int ind=1;
//// ind>0, if =<0 then the InitElement member function returns the first free index !!!
//// For ind>0 if theIndex "ind" already exists, returns the first free index !!!
// G4QIsotope::Get()->InitElement(Z, ind, a); // G4QIsotope class is a Singletone
// std::for_each(a->begin(), a->end(), void operator()(std::pair<G4int,G4double> >* P)
// {delete P;});
//// OR just use the following, which is faser:
//// G4int nA=a->size();
//// if(nA) for(G4int i=0; i<nA; i++) {delete a->operator[](i);}
//
G4int InitElement(G4int Z, G4int index, std::vector<std::pair<G4int,G4double> >* abund);
// A#ofNeutrons in Element with Z & UseDefIndex. Universal for Nat(index=0) & UserDefElem
// ======================================================================================
G4int GetNeutrons(G4int Z, G4int index=0);//If theElement doesn't exist, returns negative
// #ofProtons in stable isotopes with fixed A=Z+N. Returns length and fils VectOfIsotopes
// ======================================================================================
// Example of printing of isotopes with A=152:
// ======= -----------------------------------
// G4int A=152; // A can not be more than 269
// std::vector<G4int> isV(4); // At present A with nIso>4 are not known
// G4int nIso= G4QIsotope::Get()->GetProtons(A, isV); // isV is cleaned up before filling
// if(nIso)for(G4int i,i<nIso,i++)G4cout<<"I#"<<i<<"Z="<<isV[i]<<",N="<<A-isV[i]<<G4endl;
G4int GetProtons(G4int A, std::vector<G4int>& isoV);
// Get a pointer to the vector of pairs(N,CrosS), where N is used to calculate CrosS
// =================================================================================
// Example of initialization of the Cross Section to randomize weighted isotopes:
// ======= ----------------------------------------------------------------------
// std::vector<std::pair<G4int,G4double>*>* cs= G4QIsotope::Get()->GetCSVector(Z, index);
// G4int nIs=cs->size; // A#Of Isotopes in the element
// if(nIs) for(G4int i; i<nIs; i++)
// {
// G4int N=cs->at(i)->first; // A#Of neuterons in the isotope
// cs->at(i)->second = CalculateCrossSection(particle,Z,N)// Calc particle+A(Z,N) CrosS
// }
std::vector<std::pair<G4int,G4double>*>* GetCSVector(G4int Z, G4int index = 0);
// Get the abundancy vector for calculation of mean cross sections
std::vector<std::pair<G4int,G4double>*>* GetAbuVector(G4int Z, G4int index = 0);
// Get the summed abundancy vector (e.g. for randomization by itself)
std::vector<std::pair<G4int,G4double>*>* GetSumAVector(G4int Z, G4int index = 0);
// Calculates the mean Cross Section for the initialized Element(ind=0 Nat,ind>0 UserDef)
G4double GetMeanCrossSection(G4int Z, G4int index = 0); // IsoCS's must init, IfNotRet<0
// Randomize A#OfNeutrons in the Isotope weighted by theAbubdancies and theCrossSections
G4int GetCSNeutrons(G4int Z, G4int index = 0); // IsoCrosSections must init, IfNotRet<0
static G4QIsotope* Get(); // Get a pointer to the Singletone G4QIsotope
private:
G4int RandomizeNeutrons(G4int Z); // Gives a#of neutrons in the Random Isotope for the Z
private:
// Initialized in the constructor
static std::vector<std::vector<std::pair<G4int,G4double>*>*> natElements; //NaturalElem's
static std::vector<std::vector<std::pair<G4int,G4double>*>*> natSumAbund; //NatElemSumA's
static std::vector<std::vector<std::pair<G4int,G4double>*>*> natIsoCrosS; //CSOfNatElem's
// It is initialized by user, but it is cleaned up in the destructor
static std::vector<std::pair<G4int,std::vector<std::pair<G4int,G4double>*>*>*> newElems;
static std::vector<std::pair<G4int,std::vector<std::pair<G4int,G4double>*>*>*> newSumAb;
static std::vector<std::pair<G4int,std::vector<std::pair<G4int,G4double>*>*>*> newIsoCS;
};
#endif
@@ -0,0 +1,661 @@
//
// ********************************************************************
// * 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. *
// * 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: G4QCaptureAtRest.cc,v 1.4 2004/05/27 15:51:31 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
// ---------------- G4QCaptureAtRest class -----------------
// by Mikhail Kossov, December 2003.
// G4QCaptureAtRest class of the CHIPS Simulation Branch in GEANT4
// ---------------------------------------------------------------
// ****************************************************************************************
// ********** This CLASS is temporary moved from the photolepton_hadron directory *********
// ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
// ****************************************************************************************
//#define debug
//#define pdebug
#include "G4QCaptureAtRest.hh"
G4QCaptureAtRest::G4QCaptureAtRest(const G4String& processName)
: G4VRestProcess(processName), Time(0.), EnergyDeposition(0.)
{
#ifdef debug
G4cout<<"G4QCaptureAtRest::Constructor is called"<<G4endl;
#endif
if (verboseLevel>0)
{ G4cout << GetProcessName() << " is created "<< G4endl; }
G4QCHIPSWorld::Get()->GetParticles(234); // Create CHIPS World of 234 particles
G4QNucleus::SetParameters(0.,0.,1.,1.); // Nuclear clusterization parameters
G4Quasmon::SetParameters(180.,.09,.3); // Temperature, s-antis, eta suppress
G4QEnvironment::SetParameters(.5); // SolAngle (pbar-A secondary capture)
}
// Destructor
G4QCaptureAtRest::~G4QCaptureAtRest()
{}
G4bool G4QCaptureAtRest::IsApplicable(const G4ParticleDefinition& particle)
{
if (particle == *( G4PionMinus::PionMinus() )) return true;
else if (particle == *( G4KaonMinus::KaonMinus() )) return true;
else if (particle == *( G4AntiProton::AntiProton() )) return true;
else if (particle == *( G4MuonMinus::MuonMinus() )) return true;
else if (particle == *( G4TauMinus::TauMinus() )) return true;
else if (particle == *( G4SigmaMinus::SigmaMinus() )) return true;
else if (particle == *( G4XiMinus::XiMinus() )) return true;
else if (particle == *( G4OmegaMinus::OmegaMinus() )) return true;
else if (particle == *( G4Neutron::Neutron() )) return true;
else if (particle == *( G4AntiNeutron::AntiNeutron() )) return true;
else if (particle == *(G4AntiSigmaPlus::AntiSigmaPlus())) return true;
#ifdef debug
G4cout<<"***G4QCaptureAtRest::IsApplicable: PDG="<<particle.GetPDGEncoding()<<G4endl;
#endif
return false;
}
G4VParticleChange* G4QCaptureAtRest::AtRestDoIt(const G4Track& track, const G4Step& step)
{
static const G4double mNeut= G4QPDGCode(2112).GetMass();
static const G4double mProt= G4QPDGCode(2212).GetMass();
static const G4double mPi0 = G4QPDGCode(111).GetMass();
static const G4double mDeut= G4QPDGCode(2112).GetNuclMass(1,1,0);
//static const G4double mPi = G4QPDGCode(211).GetMass();
//static const G4double mMu = G4QPDGCode(13).GetMass();
//static const G4double mTau = G4QPDGCode(15).GetMass();
static const G4double mEl = G4QPDGCode(11).GetMass();
const G4DynamicParticle* stoppedHadron = track.GetDynamicParticle();
const G4ParticleDefinition* particle=stoppedHadron->GetDefinition();
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt is called"<<G4endl;
#endif
if (! IsApplicable(*particle)) // Check applicability
{
G4cerr<<"G4QCaptureAtRest::AtRestDoIt: Only mu-,pi-,K-,S-,X-,O-,aP,aN,aS+."<< G4endl;
return 0;
}
const G4Material* material = track.GetMaterial(); // Get the current material
G4int Z=0;
const G4ElementVector* theElementVector = material->GetElementVector();
G4int i=0;
G4double sum=0.;
G4int nE=material->GetNumberOfElements();
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: "<<nE<<" elements in the material."<<G4endl;
#endif
G4int projPDG=0; // PDG Code prototype for the captured hadron
if (particle == G4MuonMinus::MuonMinus() ) projPDG= 13;
else if (particle == G4TauMinus::TauMinus() ) projPDG= 15; // @@AtomicRad?
else if (particle == G4PionMinus::PionMinus() ) projPDG= -211; // @@AtomicRad?
else if (particle == G4KaonMinus::KaonMinus() ) projPDG= -321;
else if (particle == G4AntiProton::AntiProton() ) projPDG=-2212;
else if (particle == G4SigmaMinus::SigmaMinus() ) projPDG= 3112;
else if (particle == G4XiMinus::XiMinus() ) projPDG= 3312;
else if (particle == G4OmegaMinus::OmegaMinus() ) projPDG= 3334;
else if (particle == G4Neutron::Neutron() ) projPDG= 2112;
else if (particle == G4AntiNeutron::AntiNeutron() ) projPDG=-2112;
else if (particle == G4AntiSigmaPlus::AntiSigmaPlus()) projPDG=-3222;
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: projPDG="<<projPDG<<G4endl;
#endif
if(!projPDG)
{
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: Undefined captured hadron"<<G4endl;
return 0;
}
std::vector<G4double> sumfra;
for(i=0; i<nE; ++i)
{
G4double frac=material->GetFractionVector()[i];
G4int cZ=static_cast<G4int>((*theElementVector)[i]->GetZ());
if(projPDG==13||projPDG==15)
{
frac*=cZ;
if(cZ==9||cZ==35||cZ==53||cZ==85) frac*=.66;
else if (cZ== 3) frac*=.50;
else if (cZ==24||cZ==28) frac*=.90;
else if (cZ== 5||cZ==17) frac*=.70;
else if (cZ== 8) frac*=.56;
}
sum+=frac;
sumfra.push_back(sum); // remember the summation steps
}
G4double rnd = sum*G4UniformRand();
for(i=0; i<nE; ++i)
{
G4int cZ=static_cast<G4int>((*theElementVector)[i]->GetZ());
sum=sumfra[i];
if (rnd<sum)
{
Z = cZ;
break;
}
}
if(Z<=0)
{
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt:Element with Z="<<Z<< G4endl;
if(Z<0) return 0;
}
G4int N = G4QIsotope::Get()->GetNeutrons(Z);
if(Z+N>20) G4QNucleus::SetParameters(.18,.06,6.,1.); // HeavyNuclei NuclearClusterization
else G4QNucleus::SetParameters(0.0,0.0,1.,1.); // LightNuclei NuclearClusterization
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: N="<<N<<" for element with Z="<<Z<<G4endl;
#endif
if(N<0)
{
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt:Element with N="<<N<< G4endl;
return 0;
}
G4bool lepChan=true;
if(projPDG==13)
{
CalculateEnergyDepositionOfMuCapture(Z);// Fills the "EnergyDeposition" value
lepChan=RandomizeMuDecayOrCapture(Z, N);// Fills the "Time" value
}
else if(projPDG==15)
{
CalculateEnergyDepositionOfTauCapture(Z);// Fills the "EnergyDeposition" value
lepChan=RandomizeTauDecayOrCapture(Z,N);// Fills the "Time" value
}
G4double mp=G4QPDGCode(projPDG).GetMass(); // Mass of the captured hadron
G4int targPDG=90000000+Z*1000+N; // PDG Code of the target nucleus
G4QHadronVector* output=new G4QHadronVector; // Prototype of the output G4QHadronVector
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: projPDG="<<projPDG<<", targPDG="<<targPDG<<G4endl;
#endif
G4int nuPDG=14; // Prototype for weak decay
if(projPDG==15) nuPDG=16;
if(projPDG==-211 && targPDG==90001000) // Use Panofsky ratio for (p+pi-) system decay
{ // (p+pi-=>n+pi0)/p+pi-=>n+gamma) = 3/2
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: Panofsky targPDG="<<targPDG<<G4endl;
#endif
G4LorentzVector totLV(0.,0.,0.,mp+mProt);// 4-momentum of the compound system
G4int pigamPDG=111; // Prototype is for pi0
G4double pigamM=mPi0;
if(G4UniformRand()>0.6)
{
pigamPDG=22;
pigamM=0.;
}
G4LorentzVector g4Mom(0.,0.,0.,pigamM); // mass of the photon/Pi0
G4LorentzVector n4Mom(0.,0.,0.,mNeut); // mass of the secondary neutron
if(!G4QHadron(totLV).DecayIn2(g4Mom,n4Mom))
{
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: H1+(pi-)=>n+"<<pigamPDG<<G4endl;
return 0;
}
G4QHadron* pigamma = new G4QHadron(pigamPDG,g4Mom); // Creation Hadron for Pi0/Gamma
output->push_back(pigamma); // Fill pi0 or Gamma in the output
G4QHadron* neutron = new G4QHadron(2112,n4Mom); // Create Hadron for the Neutron
output->push_back(neutron); // Fill the neutron to the output
}
// @@ For pi-,d reactions one can use just nn dedcay (see above) ?
// @@ For K- Capture the quasifree n+Lambda+(A-n-p) reaction can be applyed as well...
else if(projPDG==-211 && G4UniformRand()>1.&& Z>0&&N>0) // @@Quasi-Free PiCapture => tune
{
G4double mt=G4QPDGCode(targPDG).GetMass();// Mass of the target Nucleus
G4LorentzVector totLV(0.,0.,0.,mp+mt); // 4-momentum of the (A+pi-) compound system
if(Z==1 && N==1) // Quasi-Free process on Deutron
{
G4LorentzVector f4Mom(0.,0.,0.,mNeut); // First neutron
G4LorentzVector s4Mom(0.,0.,0.,mNeut); // Second neutron
if(!G4QHadron(totLV).DecayIn2(f4Mom,s4Mom))
{
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: H2+(pi-)=>n+n"<<G4endl;
return 0;
}
G4QHadron* neutr1 = new G4QHadron(2112,f4Mom); // Create Hadron for the 1st Neutron
output->push_back(neutr1); // Fill pi0 or Gamma in the output
G4QHadron* neutr2 = new G4QHadron(2112,s4Mom); // Create Hadron for the 2nd Neutron
output->push_back(neutr2); // Fill the neutron to the output
}
else
{
G4int rPDG=targPDG-1001;
G4double mr=G4QPDGCode(rPDG).GetMass();// Mass of the residual Nucleus
G4LorentzVector f4Mom(0.,0.,0.,mNeut); // First neutron
G4LorentzVector s4Mom(0.,0.,0.,mNeut); // Second neutron
G4LorentzVector r4Mom(0.,0.,0.,mr); // Residual nucleus
if(!G4QHadron(totLV).DecayIn3(f4Mom,s4Mom,r4Mom))
{
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: A+(pi-)=>n+n+(A-n-p)"<<G4endl;
return 0;
}
G4QHadron* neutr1 = new G4QHadron(2112,f4Mom); // Create Hadron for the 1st Neutron
output->push_back(neutr1); // Fill the first neutron in the output
G4QHadron* neutr2 = new G4QHadron(2112,s4Mom); // Create Hadron for the 2nd Neutron
output->push_back(neutr2); // Fill the second neutron to the output
G4QHadron* resnuc = new G4QHadron(rPDG,r4Mom); // Create Hadron for the ResidualNucl
output->push_back(resnuc); // Fill the Residual Nucleus to the output
}
}
else if((projPDG==13||projPDG==15) && !lepChan)//Normal BoundLepton->e+nu+anti_nu_e decay
{
G4LorentzVector totLV(0.,0.,0.,mp-EnergyDeposition);// 4-momentum of the bounded muon
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: e+nu+nu decay 4M="<<totLV<<totLV.m()<<G4endl;
#endif
// @@ Should be developed for tau-lepton
G4LorentzVector e4Mom(0.,0.,0.,mEl); // mass of the electron
G4LorentzVector n4Mom(0.,0.,0.,0.); // muon neutrino
G4LorentzVector a4Mom(0.,0.,0.,0.); // electron anti-nutrino
if(!G4QHadron(totLV).DecayIn3(e4Mom,n4Mom,a4Mom))
{
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: Mu_b=>E+Nu_mu+anti_Nu_e"<<G4endl;
return 0;
}
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: Decay is successful"<<G4endl;
#endif
G4QHadron* elect = new G4QHadron(11,e4Mom); // Creation Hadron for the Electron
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: electron 4M="<<e4Mom<<e4Mom.m()<<G4endl;
#endif
output->push_back(elect); // Fill the Electron in the output
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: electron is filled nu4M="<<n4Mom<<nuPDG<<G4endl;
#endif
G4QHadron* numu = new G4QHadron(nuPDG,n4Mom); // Create Hadron for the LeptonicNeutrino
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: nu 4M="<<n4Mom<<n4Mom.m()<<G4endl;
#endif
output->push_back(numu); // Fill the Muonic Neutrino to the output
G4QHadron* anue = new G4QHadron(-12,a4Mom); // Create Hadron for the AntiE Neutrino
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: antiNu 4M="<<a4Mom<<a4Mom.m()<<G4endl;
#endif
output->push_back(anue); // Fill the AntiE Neutrino to the output
}
else if((projPDG==13||projPDG==15)&&lepChan&&targPDG==90001000)// LeptonCapture on Proton
{
G4LorentzVector totLV(0.,0.,0.,mp+mProt-EnergyDeposition);// 4-mom of theCompoundSystem
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt:CapOnProton decay 4M="<<totLV<<totLV.m()<<G4endl;
#endif
G4LorentzVector g4Mom(0.,0.,0.,0.); // mass of the muon neutrino
G4LorentzVector n4Mom(0.,0.,0.,mNeut); // mass of the secondary neutron
if(!G4QHadron(totLV).DecayIn2(g4Mom,n4Mom))
{
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: H1+(mu-)=>n+nu_mu"<<G4endl;
return 0;
}
G4QHadron* neutrino = new G4QHadron(nuPDG,g4Mom); // Creation Hadron for neutrino
output->push_back(neutrino); // Fill pi0 or Gamma in the output
G4QHadron* neutron = new G4QHadron(2112,n4Mom); // Create Hadron for the Neutron
output->push_back(neutron); // Fill the neutron to the output
}
else if((projPDG==13||projPDG==15)&&lepChan&&targPDG==90001001)//LeptonCapture on Deutron
{
G4LorentzVector totLV(0.,0.,0.,mp+mDeut-EnergyDeposition);// 4-mom of theCompoundSystem
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: CapOnDeutr decay 4M="<<totLV<<totLV.m()<<G4endl;
#endif
G4LorentzVector g4Mom(0.,0.,0.,0.); // mass of the muon neutrino
G4LorentzVector n4Mom(0.,0.,0.,mNeut); // mass of the first neutron
G4LorentzVector s4Mom(0.,0.,0.,mNeut); // mass of the second neutron
if(!G4QHadron(totLV).DecayIn3(g4Mom,n4Mom,s4Mom))
{
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: D+(mu-)=>n+n+nu_mu"<<G4endl;
return 0;
}
G4QHadron* neutrino = new G4QHadron(nuPDG,g4Mom); // Creation Hadron for the Neutrino
output->push_back(neutrino); // Fill pi0 or Gamma in the output
G4QHadron* neut1 = new G4QHadron(2112,n4Mom); // Create Hadron for the FirstNeutron
output->push_back(neut1); // Fill the neutron to the output
G4QHadron* neut2 = new G4QHadron(2112,s4Mom); // Create Hadron for the SecondNeutron
output->push_back(neut2); // Fill the neutron to the output
}
else if((projPDG==13||projPDG==15)&&lepChan&&G4UniformRand()>1&&Z>0&&N>0)//@@QuasiFreeCap
{
G4double mt=G4QPDGCode(targPDG).GetMass();// Mass of the target Nucleus
G4LorentzVector totLV(0.,0.,0.,mp+mt-EnergyDeposition);// 4-mom of the(A+mu-) compound
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: Quasi-Free decay 4M="<<totLV<<totLV.m()<<G4endl;
#endif
G4int rPDG=targPDG-1000; // Subtract one proton from the nucleus
G4double mr=G4QPDGCode(rPDG).GetMass(); // Mass of the residual Nucleus
G4LorentzVector f4Mom(0.,0.,0.,0.); // Muon neutrino
G4LorentzVector s4Mom(0.,0.,0.,mNeut); // Second neutron
G4LorentzVector r4Mom(0.,0.,0.,mr); // Residual nucleus
if(!G4QHadron(totLV).DecayIn3(f4Mom,s4Mom,r4Mom))
{
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: A+(mu-)=>nu_mu+n+(A-p)"<<G4endl;
return 0;
}
G4QHadron* neutrino = new G4QHadron(nuPDG,f4Mom); // Create Hadron for the 1st Neutron
output->push_back(neutrino); // Fill nutrino_mu in the output
G4QHadron* neutron = new G4QHadron(2112,s4Mom);// Create Hadron for the 2nd Neutron
output->push_back(neutron); // Fill the neutron to the output
G4QHadron* resnuc = new G4QHadron(rPDG,r4Mom); // Create Hadron for the ResidualNucl
output->push_back(resnuc); // Fill the Residual Nucleus to the output
}
else
{
if(projPDG==13||projPDG==15) mp-=EnergyDeposition;//TheEnergyDeposit is only for LepCap
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: CHIPS decay muMB="<<mp<<G4endl;
#endif
G4QHadron* pH = new G4QHadron(projPDG,G4LorentzVector(0.,0.,0.,mp)); // --DELETED----+
G4QHadronVector projHV; // |
projHV.push_back(pH); // DESTROYED over 1 line --+ |
G4QEnvironment* pan= new G4QEnvironment(projHV,targPDG);// ---> DELETED ---------+ | |
std::for_each(projHV.begin(), projHV.end(), DeleteQHadron()); // ----------------+-+-+
projHV.clear(); // --------------------------------------------------------------+-+
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: pPDG="<<projPDG<<", m="<<mp<<G4endl; // |
#endif
try // |
{ // |
delete output; // |
output = pan->Fragment();// DESTROYED in the end of the LOOP work space |
} // |
catch (G4QException& error)// |
{ // |
//#ifdef pdebug
G4cerr<<"***G4QCaptureAtRest::AtRestDoIt: Exception is catched"<<G4endl; // |
//#endif
G4Exception("G4QCaptureAtRest::AtRestDoIt:","27",FatalException,"Gen.CHIPS Except.");
} // |
delete pan; // Delete the Nuclear Environment ------+
}
aParticleChange.Initialize(track);
G4double localtime = track.GetGlobalTime();
G4ThreeVector position = track.GetPosition();
// In future it can be a flag, now for tau it is energy deposition , for mu - EMCascade
G4int tNH = output->size(); // A#of hadrons in the output
if(projPDG==13)
{
std::vector<G4double>* cascE = new std::vector<G4double>;
MuCaptureEMCascade(Z, N, cascE);
G4int nsec=cascE->size();
aParticleChange.SetNumberOfSecondaries(nsec+tNH);
G4DynamicParticle* theSec = 0; // Prototype to fill particle in the G4ParticleChange
for(G4int is=0; is<nsec; is++)
{
G4double ener=cascE->operator[](is);
if(ener>0) theSec = new G4DynamicParticle(G4Electron::Electron(),RndmDir(),ener);
else theSec = new G4DynamicParticle(G4Gamma::Gamma(),RndmDir(),-ener);
G4Track* aNewTrack = new G4Track(theSec, localtime, position );
aParticleChange.AddSecondary( aNewTrack );
}
cascE->clear();
delete cascE;
}
else aParticleChange.SetNumberOfSecondaries(tNH);
// Now add nuclear fragments
localtime += Time;
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: "<<tNH<<" particles are generated"<<G4endl;
#endif
// Deal with ParticleChange final state interface to GEANT4 output of the process
for(i=0; i<tNH; i++)
{
// Note that one still has to take care of Hypernuclei (with Lambda or Sigma inside)
// Hypernucleus mass calculation and ion-table interface upgrade => work for Hisaya @@
// The decau process for hypernuclei must be developed in GEANT4 (change CHIPS body)
G4QHadron* hadr=output->operator[](i); // Pointer to the output hadron
if(hadr->GetNFragments()) // Intermediate hadron
{
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt: Intermediate particle is found i="<<i<<G4endl;
#endif
delete hadr;
continue;
}
G4DynamicParticle* theSec = new G4DynamicParticle;
G4int PDGCode = hadr->GetPDGCode();
#ifdef pdebug
G4cout<<"G4QCaptureAtRest::AtRestDoIt:#"<<i<<",PDG="<<PDGCode<<G4endl;
#endif
G4ParticleDefinition * theDefinition;
if (PDGCode==90000001) theDefinition = G4Neutron::Neutron();
else if(PDGCode==91000000) theDefinition = G4Lambda::Lambda();
else if(PDGCode==91000999) theDefinition = G4SigmaPlus::SigmaPlus();
else if(PDGCode==90999001) theDefinition = G4SigmaMinus::SigmaMinus();
else if(PDGCode==91999000) theDefinition = G4XiMinus::XiMinus();
else if(PDGCode==91999999) theDefinition = G4XiZero::XiZero();
else if(PDGCode==92998999) theDefinition = G4OmegaMinus::OmegaMinus();
else if(PDGCode >80000000) // Defines hypernuclei as normal nuclei (N=N+S Correction!)
{
G4int aZ = hadr->GetCharge();
G4int aA = hadr->GetBaryonNumber();
theDefinition = G4ParticleTable::GetParticleTable()->FindIon(aZ,aA,0,aZ);
}
else theDefinition = G4ParticleTable::GetParticleTable()->FindParticle(PDGCode);
if(!theDefinition)
{
G4cout<<"---Worning---G4QCaptureAtRest::AtRestDoIt: drop PDG="<<PDGCode<<G4endl;
delete hadr;
continue;
}
theSec->SetDefinition(theDefinition);
G4LorentzVector h4M=hadr->Get4Momentum();
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt:#"<<i<<",PDG="<<PDGCode<<",4M="<<h4M<<G4endl;
#endif
theSec->Set4Momentum(h4M);
delete hadr;
#ifdef debug
G4ThreeVector curD=theSec->GetMomentumDirection();
G4double curM=theSec->GetMass();
G4double curE=theSec->GetKineticEnergy()+curM;
G4cout<<"G4QCapAtRest::AtRDoIt:p="<<curD<<curD.mag()<<",e="<<curE<<",m="<<curM<<G4endl;
#endif
G4Track* aNewTrack = new G4Track(theSec, localtime, position );
aParticleChange.AddSecondary( aNewTrack );
#ifdef debug
G4cout<<"G4QCaptureAtRest::AtRestDoIt:#"<<i<<" is done."<<G4endl;
#endif
}
delete output;
if(projPDG==13) aParticleChange.SetLocalEnergyDeposit(0.); // Fill EnDepMuon(EMCascade)
else aParticleChange.SetLocalEnergyDeposit(EnergyDeposition);// Fill EnergyDepos for Tau
aParticleChange.SetStatusChange(fStopAndKill); // Kill the absorbed particle
//return &aParticleChange; // This is not enough (ClearILL)
return G4VRestProcess::AtRestDoIt(track, step);
}
// The MeanLifeTime (before NucCapture) exists only for MuonCapture, which is a WeakProcess
G4double G4QCaptureAtRest::GetMeanLifeTime(const G4Track& aTrack, G4ForceCondition*)
{
const G4DynamicParticle* stoppedHadron = aTrack.GetDynamicParticle();
#ifdef debug
G4cout<<"G4QCaptureAtRest::GetMeanLifeTime is called"<<G4endl;
#endif
if (*(stoppedHadron->GetDefinition())==*(G4MuonMinus::MuonMinus()) ||
*(stoppedHadron->GetDefinition())==*(G4TauMinus::TauMinus()) ) return Time;
else return 0.;
}
// Muon can decay or to be captured by the nucleus (Z,N): true=MuCapture, false=MuDecay
G4bool G4QCaptureAtRest::RandomizeMuDecayOrCapture(G4int Z, G4int N)
{
#ifdef debug
G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture is called"<<G4endl;
#endif
G4double Z27 =0.002727*Z;
G4double Z227=Z27*Z27;
G4double Z427=Z227*Z227;
G4double Zeff=(Z-0.13782)*(1.2162-(0.09118-Z427)*sqrt((G4double)Z)); // Eff. Nuclear Charge
G4double Ze2=Zeff*Zeff; // Squared effective charge of the Nucleus
G4double pD=.00045516*(1.-Ze2*.00014658);// 1./MeanLifeTime of muon in atoms (in ns^-1)
G4double pC=.00001637*Ze2*Ze2/(33.563+N);// 1./MeanLifeTime of muon NuclCapture(in ns^-1)
if(Z==1&&N==0) pC=.0000007;
if(Z==1&&N==1) pC=.000000012;
G4double DLifeT=-log(G4UniformRand())/pD; // Time of the muon decay inside the atom
G4double CLifeT=-log(G4UniformRand())/pC; // Time of the muon capture by nucleus
if(DLifeT<CLifeT)
{
Time=DLifeT;
#ifdef debug
G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture: DecayLifeTime="<<Time<<G4endl;
#endif
return false;
}
else
{
Time=CLifeT;
#ifdef debug
G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture: CaptureLifeTime="<<Time<<G4endl;
#endif
return true;
}
}
// Calculate the TotalEnergyDeposition for the AtomicCascadeDecay of MuMesoAtom to K-shell
void G4QCaptureAtRest::CalculateEnergyDepositionOfMuCapture(G4int Z) // (2p->1s) in MeV
{
EnergyDeposition = .0029035*Z*Z*(1.-.0056817*Z)-.0006343; // MeV
#ifdef debug
G4cout<<"G4QCaptureAtR::CalculateEnergyDepositionOfMuCapture="<<EnergyDeposition<<G4endl;
#endif
}
// Calculate gamma cascade from high (14th level) to the K(1s)-shell (follows V.Ivanchenko)
void G4QCaptureAtRest::MuCaptureEMCascade(G4int Z, G4int N, std::vector<G4double>* dV)
{
static const G4double mEl = G4Electron::Electron()->GetPDGMass(); // GEANT4 style
static const G4double mMu = G4MuonMinus::MuonMinus()->GetPDGMass();
//static const G4double mEl = G4QPDGCode(11).GetMass(); // CHIPS style
//static const G4double mMu = G4QPDGCode(13).GetMass();
static const G4double vEl = .0000136/mEl;
//static const G4double dElM = mEl+mEl;
// Inicialization - cascade start from 14th level (N.C.Mukhopadhyay Phy.Rep. 30 (1977) 1)
G4double EnergyLevel[14];
G4double dZ=Z;
G4double nucM=G4NucleiProperties::GetNuclearMass(dZ+N,dZ);
if(nucM<900.) nucM=G4QPDGCode(2112).GetNuclMass(Z,N,0); // CHIPS style
G4double mass = mMu*nucM/(mMu+nucM); //equivalemtMassOfMuon in C.M. muA-system
G4double Z2=Z*Z;
G4double KEnergy = vEl*Z2*mass; // Finaite nuclear size (?)
EnergyLevel[0] = EnergyDeposition;
#ifdef debug
G4cout<<"G4QCapAtR::MuCapEMCascade:E="<<EnergyDeposition<<",e="<<mEl<<",m="<<mMu<<G4endl;
#endif
for(G4int i=2; i<15; i++) EnergyLevel[i-1]=KEnergy/i/i; // To simple to be right (? M.K.)
G4int nAuger = 1;
G4int nGamma = 0;
G4int nLevel = 13;
G4double DeltaE=0.;
G4double pGamma = Z2*Z2;
// Capture on 14-th level
G4double energy=EnergyLevel[13];
//G4double ptot = sqrt(energy*(energy + dElM));
//G4ThreeVector moment = ptot * RndmDir();
#ifdef debug
G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: first electron E="<<energy<<G4endl;
#endif
dV->push_back(energy);
#ifdef debug
G4cout<<"G4QCaptureAtR::MuCaptureEMCascade:before while nl="<<nLevel<<G4endl;
#endif
// Algorithm of Vladimir Ivanchenko
while(nLevel>0) // Radiative transitions and Auger electron emission
{
#ifdef debug
G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: in while nLevel="<<nLevel<<G4endl;
#endif
// case of Auger electrons
if((nAuger < Z) && ((pGamma + 10000.0) * G4UniformRand() < 10000.0) ) // 10000 (? M.K.)
{
nAuger++; // Radiate one more Auger electron
DeltaE = EnergyLevel[nLevel-1] - EnergyLevel[nLevel];
nLevel--;
#ifdef debug
G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: Auger_e E="<<DeltaE<<G4endl;
#endif
dV->push_back(DeltaE);
}
else // Rad transitions from C.S.Wu and L.Wilets, Ann. Rev. Nuclear Sci. 19 (1969) 527.
{
G4int iLevel = nLevel - 1 ;
G4double var = 10.0 + iLevel * G4UniformRand(); // 10.0 (? M.K.)
if(var > 10.0) iLevel -= G4int(var-10.0) + 1;
if( iLevel < 0 ) iLevel = 0;
DeltaE = EnergyLevel[iLevel] - EnergyLevel[nLevel];
nLevel = iLevel;
#ifdef debug
G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: photon E="<<DeltaE<<G4endl;
#endif
dV->push_back(-DeltaE);
nGamma++;
}
}
#ifdef debug
G4cout<<"G4QCaptureAtR::MuCaptureEMCascade: nElect="<<nAuger<<", nGamm="<<nGamma<<G4endl;
#endif
}
// Muon can decay or to be captured by the nucleus (Z,N): true=TauCapture, false=TauDecay
G4bool G4QCaptureAtRest::RandomizeTauDecayOrCapture(G4int Z, G4int N)
{
#ifdef debug
G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture is called"<<G4endl;
#endif
G4double Z27 =0.002727*Z;
G4double Z227=Z27*Z27;
G4double Z427=Z227*Z227;
G4double Zeff=(Z-0.13782)*(1.2162-(0.09118-Z427)*sqrt((G4double)Z)); // Eff. Nuclear Charge
G4double Ze2=Zeff*Zeff; // Squared effective charge of the Nucleus
G4double pD=3436.*(1.-Ze2*.00014658); //@@ 1./MeanLifeTime of Tau in atoms (in ns^-1)
G4double pC=227.*Ze2*Ze2/(33.563+N); //@@1./MeanLifeTime of TauNuclCapture(in ns^-1)
if(Z==1&&N==0) pC=10.; // @@
if(Z==1&&N==1) pC=.2; // @@
G4double DLifeT=-log(G4UniformRand())/pD; // Time of the muon decay inside the atom
G4double CLifeT=-log(G4UniformRand())/pC; // Time of the muon capture by nucleus
if(DLifeT<CLifeT)
{
Time=DLifeT;
#ifdef debug
G4cout<<"G4QCaptureAtRest::RandomizeTauDecayOrCapture: DecayLifeTime="<<Time<<G4endl;
#endif
return false;
}
else
{
Time=CLifeT;
#ifdef debug
G4cout<<"G4QCaptureAtRest::RandomizeTauDecayOrCapture: CaptureLifeTime="<<Time<<G4endl;
#endif
return true;
}
}
// Calculate the TotalEnergyDeposition for the AtomicCascadeDecay of TauMesoAtom to K-shell
void G4QCaptureAtRest::CalculateEnergyDepositionOfTauCapture(G4int Z) // (2p->1s) in MeV
{
EnergyDeposition = .05*Z*Z*(1.-.0056817*Z)-.01; // MeV (@@ Must be improved)
#ifdef debug
G4cout<<"G4QCapAtRest::CalculateEnergyDepositionOfTauCapture="<<EnergyDeposition<<G4endl;
#endif
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,125 @@
//
// ********************************************************************
// * 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. *
// * 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 G4DiffElasticHadrNucleus_h
#define G4DiffElasticHadrNucleus_h 1
#include "G4Nucleus.hh"
#include "G4DynamicParticle.hh"
#include "G4HadronValues.hh"
#include "G4IntegrHadrNucleus.hh"
class G4DiffElasticHadrNucleus: public //G4HadronValues
G4IntegrHadrNucleus
{
public:
G4DiffElasticHadrNucleus() : // G4HadronValues(),
G4IntegrHadrNucleus() {Factors();}
~G4DiffElasticHadrNucleus() {;}
G4double HadrNuclDifferCrSec(
const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus,
G4double Q2);
void GetNucleusParameters(G4Nucleus * aNucleus);
private:
// ++++++++++++++++++++++++++++++++++++++++++++++++++
G4double binom(G4int N, G4int M)
{
G4double Fact1 = 1;
if ((N>1) & (N>=M))
{
Fact1 = Factorials[N]/Factorials[M]/
Factorials[N-M];
}
return Fact1;
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++
G4double Factorial(G4int N)
{
G4double Res;
Res = 1;
if(N == 0) return Res;
if(N < 100) for(G4int M = 1; M<=N; M++) Res = Res*M;
if(N >= 100) Res = 2.50662827*exp(-N-1.0)*pow(N+1.0,N+0.5)*
(1+1/12/(N+1)+1/288/(N+1)/(N+1)-
139/51840/(N+1)/(N+1)/(N+1)-
571/2488320/(N+1)/(N+1)/(N+1)/(N+1));
return Res;
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++
void Factors()
{
G4int ii, ll, mm;
G4double Sum1, Fac1, Fac3, Sum3;
Factorials[0] = 1;
for( ii = 1; ii<250; ii++)
{
if(ii >= 100) Mnoj[ii] = 3.03; // there is the saturation
else
{
Sum1 = 0;
Fac1 = 1;
Factorials[ii] = Factorial(ii);
for( ll = 0; ll<=ii; ll++)
{
Fac1 = binom(ii,ll);
Fac3 = 1;
Sum3 = 1;
for( mm = 1; mm<=ii-ll; mm++)
{
Fac3 = binom(ii-ll,mm);
Sum3 = Sum3 + 1/Fac3;
} // mm
Sum1 = Sum1 + Sum3/Fac1;
} // ll
Mnoj[ii] = Sum1;
} // else
} // ii
Mnoj[0] = 1;
} // Factors
// --------------------------------------------------------
G4double Mnoj[250], Factorials[250];
public:
G4double R1, R2, Pnucl, Aeff, AIm, ARe, DIm;
};
#endif
@@ -0,0 +1,181 @@
//
// ********************************************************************
// * 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. *
// * 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. *
// ********************************************************************
//
// G4ElasticHadrNucleusHe.hh
#ifndef G4ElasticHadrNucleusHE_h
#define G4ElasticHadrNucleusHE_h 1
#include <vector>
#include "globals.hh"
#include "G4ParticleDefinition.hh"
#include "G4Ions.hh"
#include "G4ParticleTable.hh"
#include "G4NucleiProperties.hh"
#include "G4ParticleChange.hh"
#include "G4Track.hh"
#include "Randomize.hh"
#include "G4Nucleus.hh"
#include "G4IonTable.hh"
#include "G4DiffElasticHadrNucleus.hh"
#include "G4IntegrHadrNucleus.hh"
#include "G4HadronicInteraction.hh"
#define ONQ2 150 // The number of steps on Q2
#define ONE 5 // The number of steps on E
#define AreaNumb 6 // The number of order steps on E
#define ONQ2XE ONQ2*ONE // The dimension of a distr. func. array
#define MaxN 10 // The atomic number where the calculation
// on the formula is changed on the integral
// one
class ElasticData
{
public:
G4String hadrName;
G4int nuclAtomicNumber;
G4double TableE[ONE*AreaNumb];
G4double TableQ2[ONQ2];
G4double TableCrossSec[ONQ2XE*AreaNumb];
ElasticData() {;}
~ElasticData(){;}
ElasticData (const ElasticData &t)
{
G4int k;
hadrName = t.hadrName;
nuclAtomicNumber = t.nuclAtomicNumber;
for(k = 0; k<ONE*AreaNumb; k++)
TableE[k] = t.TableE[k];
for(k = 0; k<ONQ2; k++)
TableQ2[k] = t.TableQ2[k];
for(k = 0; k< ONQ2XE*AreaNumb; k++)
TableCrossSec[k] = t.TableCrossSec[k];
}
ElasticData & operator=(const ElasticData &t)
{
G4int k;
if(this!=&t)
{
hadrName = t.hadrName;
nuclAtomicNumber = t.nuclAtomicNumber;
for(k = 0; k<ONE*AreaNumb; k++)
TableE[k] = t.TableE[k];
for(k = 0; k<ONQ2; k++)
TableQ2[k] = t.TableQ2[k];
for(k = 0; k< ONQ2XE*AreaNumb; k++)
TableCrossSec[k] = t.TableCrossSec[k];
}
return *this;
}
};
class G4ElasticHadrNucleusHE : public G4DiffElasticHadrNucleus,
public G4HadronicInteraction
{
public:
G4ElasticHadrNucleusHE(const G4ParticleDefinition * aHadron,
G4Nucleus * aNucleus);
G4ElasticHadrNucleusHE();
~G4ElasticHadrNucleusHE() {;}
G4HadFinalState * ApplyYourself( const G4HadProjectile &aTrack,
G4Nucleus &aNucleus);
G4double RandomElastic0();
G4double RandomElastic1( const G4DynamicParticle * aHadron,
const ElasticData * aData);
private:
G4int ReadOfData(G4ParticleDefinition * aParticle,
G4Nucleus * aNucleus);
G4String GetHadronName(const G4DynamicParticle * aHadron);
G4double GetQ2limit(G4double R1);
void CreationArray(const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus);
void ArrayForHeavy(const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus);
void ArrayForLight(const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus);
G4double InterPol(G4double X1, G4double X2, G4double X3,
G4double Y1, G4double Y2, G4double Y3,
G4double X);
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
G4double Factorial1(G4int N)
{
G4double Res;
Res = 1;
if(N == 0) return Res;
if(N < 100) for(G4int M = 1; M<=N; M++) Res = Res*M;
else Res = 2.50662827*exp(-N-1.0)*pow(N+1.0,N+0.5)*
(1+1/12/(N+1)+1/288/(N+1)/(N+1)-
139/51840/(N+1)/(N+1)/(N+1)-
571/2488320/(N+1)/(N+1)/(N+1)/(N+1));
return Res;
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++
std::vector<ElasticData> SetOfElasticData;
G4IonTable MyIonTable;
G4DiffElasticHadrNucleus aDiffElHadNcls;
// G4HadFinalState FinState;
G4int Nstep, // The number of steps on Q2
iKindWork, //
iContr, //
iPoE; // The number of steps on E
G4int iTypeWork;
G4double aNucleon; //,
// * pTableCrSec, // The array of distr. func.
// // at all energies
// * pTableE; // The array of E values
G4double iQ2[ONQ2], // The array of Q2 values
pTableCrSec[ONQ2XE*AreaNumb],
pTableE[ONE*AreaNumb],
iIntgr[ONQ2], // The array of distr. func.
// at one energy
Factorials1[250]; // The array for factorials
G4double dEbeg1, dEend1, dQ2, maxQ2;
}; // The end of the class description
#endif
@@ -0,0 +1,78 @@
//
// ********************************************************************
// * 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. *
// * 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. *
// ********************************************************************
//
// G4HadronValues.hh
#ifndef G4HadronValues_h
#define G4HadronValues_h 1
#include "globals.hh"
#include "G4DynamicParticle.hh"
#include "G4Neutron.hh"
#include "G4Proton.hh"
#include "G4Lambda.hh"
#include "G4SigmaPlus.hh"
#include "G4SigmaMinus.hh"
#include "G4SigmaZero.hh"
#include "G4XiMinus.hh"
#include "G4XiZero.hh"
#include "G4OmegaMinus.hh"
#include "G4AntiNeutron.hh"
#include "G4AntiProton.hh"
#include "G4AntiLambda.hh"
#include "G4AntiSigmaPlus.hh"
#include "G4AntiSigmaMinus.hh"
#include "G4AntiSigmaZero.hh"
#include "G4AntiXiMinus.hh"
#include "G4AntiXiZero.hh"
#include "G4AntiOmegaMinus.hh"
#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4KaonPlus.hh"
#include "G4KaonMinus.hh"
#define MyPi 3.141593
#define MbToGeV2 2.568
#define GeV2ToMb 0.38939
#define MbToFm2 25.68
class G4HadronValues
{
public:
G4HadronValues() {;}
~G4HadronValues() {;}
// protected:
void GetHadronValues(const G4DynamicParticle * aHadron);
G4double HadrTot, HadrSlope, HadrReIm, DDSect2, DDSect3,
MomentumCM;
};
#endif
@@ -0,0 +1,78 @@
//
// ********************************************************************
// * 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. *
// * 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. *
// ********************************************************************
//
// G4IntegrHadrNucleus.hh
#ifndef G4IntegrHadrNucleus_h
#define G4IntegrHadrNucleus_h 1
#include "globals.hh"
#include "G4DynamicParticle.hh"
#include "G4Nucleus.hh"
#include "G4HadronValues.hh"
class G4IntegrHadrNucleus : public G4HadronValues
{
public:
G4IntegrHadrNucleus() : G4HadronValues() {;}
~G4IntegrHadrNucleus() {;}
G4double GetElasticCrossSection(
const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus);
G4double GetTotalCrossSection(
const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus);
G4double GetProductionCrossSection(
const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus);
G4double GetInelasticCrossSection(
const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus);
G4double GetQuasyElasticCrossSection(
const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus);
private:
void GetIntegralCrSec(G4Nucleus * aNucleus);
G4double TotalCrSec, InelCrSec, ProdCrSec, ElasticCrSec,
QuasyElasticCrSec, HadrEnergy;
// protected:
public:
G4double Tot00, DTot00;
};
#endif
@@ -0,0 +1,334 @@
//
// ********************************************************************
// * 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. *
// * 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. *
// ********************************************************************
//
//G4DiffElasticHadrNucleus.cc
#include "globals.hh"
#include "G4DiffElasticHadrNucleus.hh"
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void G4DiffElasticHadrNucleus::
GetNucleusParameters(G4Nucleus * aNucleus)
{
G4int Nucleus = (int)aNucleus->GetN();
if(Nucleus == 208)
{ // R1 = 20.73; R2 = 15.74.
R1 = 4.1408*pow(static_cast<double>(Nucleus),0.3018);
R2 = 3.806*pow(Nucleus-10.068,0.2685);
Pnucl = 0.9;
Aeff = 1.1;
R1 = 19.5;
R2 = 15.74;
Pnucl = 0.4;
Aeff = 0.7;
}
else if(Nucleus == 90)
{
R1 = 16.50;
R2 = 11.62;
Pnucl = 0.4;
Aeff = 0.9;
R1 = 16.5;
R2 = 11.62;
Pnucl = 0.4;
Aeff = 0.7;
}
else if(Nucleus == 58)
{
R1 = 15.0;
R2 = 9.9;
Pnucl = 0.45;
Aeff = 0.85;
}
else if(Nucleus == 16)
{
R1 = 10.50;
R2 = 5.5;
Pnucl = 0.7;
Aeff = 0.98;
// R1 = 11.3;
// R2 = 2.5;
// Pnucl = 0.75;
// Aeff = 0.9;
}
else
{
R1 = 4.45*pow(Nucleus-1.0,0.309);
if(Nucleus == 28)
R1 = 4.25*pow(Nucleus-1.0,0.309);
R2 = 2.3*pow(static_cast<double>(Nucleus),0.36);
Pnucl = 0.176+0.00167*Nucleus+
8.69E-6*Nucleus*Nucleus;
Aeff = 0.9;
}
if(Nucleus == 9)
{
R1 = 9.0;
R2 = 7.0;
Pnucl = 0.190;
Aeff = 0.9;
}
/*
if(Nucleus == 12)
{
R1 = 9.336;
R2 = 5.63;
Pnucl = 0.197;
Aeff = 01.0;
}
*/
/*
if(Nucleus == 11)
{
R1 = 10.8;
R2 = 7.5;
Pnucl = 0.85;
Aeff = 1.2;
}
*/
if(Nucleus == 4)
{
R1 = 5.5;
R2 = 3.7;
Pnucl = 0.4;
Aeff = 0.87;
}
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
G4double G4DiffElasticHadrNucleus::HadrNuclDifferCrSec(
const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus,
G4double aQ2)
{
// ------ All external kinematical variables are in MeV -------
// ------ but internal in GeV !!!! ------
G4double HadrEnergy = aHadron->GetTotalEnergy()/1000; // GeV
G4int Nucleus = (int)aNucleus->GetN();
if(Nucleus<4)
{
G4Exception(" This nucleus is very light for this model !!!");
}
if(Nucleus>238)
{
G4Exception(" This nucleus is very heavy for this model !!!");
}
if(HadrEnergy < 1.4999)
{
G4cout<<HadrEnergy<<G4endl;
G4Exception(" The hadron energy is very low for this model: E= ");
}
G4HadronValues::GetHadronValues(aHadron);
GetTotalCrossSection(aHadron, aNucleus);
// G4cout<<" Tot00 "<<Tot00<<" DTot00 "<<DTot00<<endl;
GetNucleusParameters(aNucleus);
G4double Q2 = aQ2/1000/1000; // GeV
G4double MomentumCMN, S, MassH, MassN, EcmH;
MassH = aHadron->GetMass()/1000;
MassN = Nucleus*0.938;
S = 2*MassN*HadrEnergy+MassN*MassN+MassH*MassH;
EcmH = (S-MassN*MassN+MassH*MassH)/2/sqrt(S);
MomentumCMN = sqrt(EcmH*EcmH-MassH*MassH);
G4double MbToB = 2.568; // from mb to GeV^-2
G4double Pi1 = 3.1416;
G4double Stot = HadrTot*MbToB; //In GeV-2
G4double Bhad = HadrSlope; //In GeV-2
G4double Asq = 1+HadrReIm*HadrReIm;
G4double Rho2 = sqrt(Asq);
G4double Pnuclp = 0.001;
Pnuclp = Pnucl;
G4double R12 = R1*R1;
G4double R22 = R2*R2;
G4double R12B = R12+2*Bhad;
G4double R22B = R22+2*Bhad;
// G4double R12Bp = R12+20;
// G4double R22Bp = R22+20;
// G4double R13Bp = R12*R1/R12Bp;
// G4double R23Bp = R22*R2/R22Bp;
G4double R12Ap = R12+20;
G4double R22Ap = R22+20;
G4double R13Ap = R12*R1/R12Ap;
G4double R23Ap = R22*R2/R22Ap*Pnuclp;
// G4double R23App = R22*R2/R22Ap*Pnuclp;
G4double R23dR13 = R23Ap/R13Ap;
G4double R12Apd = 2/R12Ap;
G4double R22Apd = 2/R22Ap;
G4double R12ApdR22Ap = 0.5*(R12Apd+R22Apd);
G4double DDSec1p = (DDSect2+DDSect3*log(1.06*2*HadrEnergy/R1/4));
G4double DDSec2p = (DDSect2+DDSect3*log(1.06*2*HadrEnergy/
sqrt((R12+R22)/2)/4));
G4double DDSec3p = (DDSect2+DDSect3*log(1.06*2*HadrEnergy/R2/4));
G4double Norm = (R12*R1-Pnucl*R22*R2)*Aeff;
G4double Normp = (R12*R1-Pnuclp*R22*R2)*Aeff;
G4double R13 = R12*R1/R12B;
G4double R23 = Pnucl*R22*R2/R22B;
G4double Unucl = Stot/2/Pi1/Norm*R13;
G4double UnuclScr = Stot/2/Pi1/Normp*R13Ap;
G4double SinFi = HadrReIm/Rho2;
G4double FiH = asin(SinFi);
G4double N = -1;
G4double N2 = R23/R13;
G4double ImElasticAmpl0 = 0;
G4double ReElasticAmpl0 = 0;
G4double exp1;
G4double N4;
G4double Prod1, Tot1=0, medTot, DTot1, DmedTot;
G4int i;
for( i=1; i<=Nucleus; i++)
{
N = -N*Unucl*(Nucleus-i+1)/i*Rho2;
N4 = 1;
Prod1 = exp(-Q2/i*R12B/4)/i*R12B;
medTot = R12B/i;
for(G4int l=1; l<=i; l++)
{
exp1 = l/R22B+(i-l)/R12B;
N4 = -N4*(i-l+1)/l*N2;
Prod1 = Prod1+N4/exp1*exp(-Q2/exp1/4);
medTot = medTot+N4/exp1;
} // end l
ReElasticAmpl0 = ReElasticAmpl0+Prod1*N*sin(FiH*i);
ImElasticAmpl0 = ImElasticAmpl0+Prod1*N*cos(FiH*i);
Tot1 = Tot1+medTot*N*cos(FiH*i);
if(abs(Prod1*N/ImElasticAmpl0) < 0.000001) break;
} // i
ImElasticAmpl0 = ImElasticAmpl0*Pi1/2.568; // The amplitude in mB
ReElasticAmpl0 = ReElasticAmpl0*Pi1/2.568; // The amplitude in mB
Tot1 = Tot1*Pi1*2.0/2.568;
G4double N1p = 1;
G4double Din1 = 0.5*(R13Ap*R13Ap*exp(-Q2/8*R12Ap)/2*R12Ap/2*DDSec1p-
2*R23Ap*R13Ap/2/R12ApdR22Ap*exp(-Q2/4/R12ApdR22Ap)*DDSec2p+
R23Ap*R23Ap/2*R22Ap/2*exp(-Q2/8*R22Ap)*DDSec3p); // at i=0
DTot1 = 0.5*(R13Ap*R13Ap/2*R12Ap/2*DDSec1p-
2*R23Ap*R13Ap/2/R12ApdR22Ap*DDSec2p+
R23Ap*R23Ap/2*R22Ap/2*DDSec3p); // at i=0
// G4cout<<" DTot00 "<<DTot00<<" Din1 "<<Din1<<" DTot1 "<<DTot1<<endl;
///// if(Nucleus>95 && HadrEnergy>1000) {Din1=0; goto tam;}
G4double exp1p;
G4double exp2p;
G4double exp3p;
G4double N2p;
G4double Din2, BinCoeff;
BinCoeff = 1;
for( i = 1; i<= Nucleus-2; i++)
{
N1p = -N1p*UnuclScr*(Nucleus-i-1)/i*Rho2;
N2p = 1;
Din2 = 0;
DmedTot = 0;
for(G4int l = 0; l<=i; l++)
{
if(l == 0) BinCoeff = 1;
else if(l !=0 ) BinCoeff = BinCoeff*(i-l+1)/l;
exp1 = l/R22B+(i-l)/R12B;
exp1p = exp1+R12Apd;
exp2p = exp1+R12ApdR22Ap;
exp3p = exp1+R22Apd;
Din2 = Din2 + N2p*BinCoeff*
(R13Ap*R13Ap/2/exp1p*exp(-Q2/4/exp1p)*DDSec1p-
2*R13Ap*R23Ap/2/exp2p*exp(-Q2/4/exp2p)*DDSec2p+
R23Ap*R23Ap/2/exp3p*exp(-Q2/4/exp3p)*DDSec3p);
DmedTot = DmedTot + N2p*BinCoeff*
(R13Ap*R13Ap/2/exp1p*DDSec1p-
2*R13Ap*R23Ap/2/exp2p*DDSec2p+
R23Ap*R23Ap/2/exp3p*DDSec3p);
N2p = -N2p*R23dR13;
} // l
Din1 = Din1+Din2*N1p*Mnoj[i]/(i+2)/(i+1)*cos(FiH*i);
DTot1 = DTot1+DmedTot*N1p*Mnoj[i]/(i+2)/(i+1)*cos(FiH*i);
if(abs(Din2*N1p/Din1) < 0.000001) break;
} // i
Din1 = -1*Din1*Nucleus*(Nucleus-1)
/2/Pi1/Normp/2/Pi1/Normp*16*Pi1*Pi1;
DTot1 = 1*DTot1*Nucleus*(Nucleus-1)
/2/Pi1/Normp/2/Pi1/Normp*16*Pi1*Pi1;
/// Din1 *= 0;
// ---------------- dSigma/dOmegaCM, mb/Ster -----------------
// tam:
G4double Corr0=Tot00/Tot1/1.0; // Corr1=DTot00/DTot1/1.0;
ImElasticAmpl0 *= Corr0;
// Din1 *= Corr1;
G4double DiffCrSec2 = (ReElasticAmpl0*ReElasticAmpl0+
(ImElasticAmpl0+Din1)*
(ImElasticAmpl0+Din1))*
2.568/4/Pi1/Pi1
*MomentumCMN*MomentumCMN;
AIm = ImElasticAmpl0;
ARe = ReElasticAmpl0;
DIm = Din1;
// if(Q2<0.001)
{
// G4cout<<" DTot00 "<<DTot00<<" Din1 "<<Din1<<" DTot1 "<<DTot1
// <<" Tot00 "<<Tot00<<" Tot1 "<<Tot1
// <<" Ampl "<<ImElasticAmpl0<<" dSdT "<<CrSecT<<G4endl;
}
return DiffCrSec2; // dSig/dOmegaCM, mb/Ster
} // function
/* End of file */
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,211 @@
//
// ********************************************************************
// * 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. *
// * 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. *
// ********************************************************************
//
// G4HadronValues.cc
#include "globals.hh"
#include "G4HadronValues.hh"
void
G4HadronValues::GetHadronValues(const G4DynamicParticle* aHadron)
{
G4ParticleDefinition * dHadron = aHadron->GetDefinition();
G4int iHadron;
if(dHadron == G4Proton::Proton() ||
dHadron == G4Neutron::Neutron() ||
dHadron == G4Lambda::Lambda() ||
dHadron == G4SigmaPlus::SigmaPlus() ||
dHadron == G4SigmaMinus::SigmaMinus()||
dHadron == G4SigmaZero::SigmaZero() ||
dHadron == G4XiMinus::XiMinus() ||
dHadron == G4XiZero::XiZero() ||
dHadron == G4OmegaMinus::OmegaMinus()) iHadron=0;
else if(dHadron == G4AntiProton::AntiProton() ||
dHadron == G4AntiNeutron::AntiNeutron() ||
dHadron == G4AntiLambda::AntiLambda() ||
dHadron == G4AntiSigmaPlus::AntiSigmaPlus() ||
dHadron == G4AntiSigmaMinus::AntiSigmaMinus()||
dHadron == G4AntiSigmaZero::AntiSigmaZero() ||
dHadron == G4AntiXiMinus::AntiXiMinus() ||
dHadron == G4AntiXiZero::AntiXiZero() ||
dHadron == G4AntiOmegaMinus::AntiOmegaMinus()) iHadron=1;
else if(dHadron == G4PionPlus::PionPlus()) iHadron=2;
else if(dHadron == G4PionMinus::PionMinus()) iHadron=3;
else if(dHadron == G4KaonPlus::KaonPlus()) iHadron=4;
else if(dHadron == G4KaonMinus::KaonMinus()) iHadron=5;
else {
G4Exception(" There is not method for this hadron ");
}
G4double mHadr = aHadron->GetMass()/1000.; // In GeV
G4double HadrEnergy = aHadron->GetTotalEnergy()/1000.; // In GeV
G4double sHadr = 2*HadrEnergy*0.938+0.938*0.938+mHadr*mHadr;
G4double sqrS = sqrt(sHadr);
G4double Ecm = (sHadr-mHadr*mHadr+0.938*.938)/2/sqrS;
MomentumCM = sqrt(Ecm*Ecm-0.938*0.938);
if(HadrEnergy<1.0)
{
G4Exception(" The hadron Energy is very low for this method!");
}
switch (iHadron)
{
case 0: // proton
G4double Delta;
Delta=1;
if(HadrEnergy<40)
Delta = 0.916+0.0021*HadrEnergy;
HadrTot = 5.2+5.2*log(HadrEnergy)
+51*pow(HadrEnergy,-0.35); // mb
HadrSlope = 6.44+0.88*log(sHadr)-1; // GeV-2
HadrReIm = 0.13*log(sHadr/350)*pow(sHadr,-0.18);
DDSect2 = 11; //mb*GeV-2
DDSect3 = 3; //mb*GeV-2
// if(HadrEnergy>1000) HadrReIm=0.15;
if( dHadron == G4Lambda::Lambda() ||
dHadron == G4SigmaPlus::SigmaPlus() ||
dHadron == G4SigmaMinus::SigmaMinus()||
dHadron == G4SigmaZero::SigmaZero())
{
HadrTot *=0.80;
HadrSlope *=0.85;
}
if( dHadron == G4XiMinus::XiMinus() ||
dHadron == G4XiZero::XiZero())
{
HadrTot *=0.70;
HadrSlope *=0.75;
}
if( dHadron == G4OmegaMinus::OmegaMinus())
{
HadrTot *=0.60;
HadrSlope *=0.65;
}
break;
case 1: // antiproton
sqrS = sqrt(sHadr);
HadrTot = 5.2+5.2*log(HadrEnergy)
+123.2*pow(HadrEnergy,-0.5); // mb
HadrSlope = 8.32+0.57*log(sHadr); //GeV-2
if(HadrEnergy<1000)
HadrReIm =0.06*(sqrS-2.236)*(sqrS-14.14)*pow(sHadr,-0.8);
else
HadrReIm = 0.6*log(sHadr/350)*pow(sHadr,-0.25);
DDSect2 = 11; //mb*GeV-2
DDSect3 = 3; //mb*GeV-2
// if(HadrEnergy>1000) HadrReIm=0.15;
if( dHadron == G4AntiLambda::AntiLambda() ||
dHadron == G4AntiSigmaPlus::AntiSigmaPlus() ||
dHadron == G4AntiSigmaMinus::AntiSigmaMinus()||
dHadron == G4AntiSigmaZero::AntiSigmaZero())
{
HadrTot *=0.75;
HadrSlope *=0.85;
}
if( dHadron == G4AntiXiMinus::AntiXiMinus() ||
dHadron == G4AntiXiZero::AntiXiZero())
{
HadrTot *=0.65;
HadrSlope *=0.75;
}
if( dHadron == G4AntiOmegaMinus::AntiOmegaMinus())
{
HadrTot *=0.55;
HadrSlope *=0.65;
}
break;
case 2: // pi plus
HadrTot = 10.6+2.*log(HadrEnergy)+
25*pow(HadrEnergy,-0.43); // mb
HadrSlope = 7.28+0.245*log(sHadr); //GeV-2
HadrReIm = 0.2*log(sHadr/100)*pow(sHadr,-0.15);
DDSect2 = 4.6; //mb*GeV-2
DDSect3 = 1.33; //mb*GeV-2
break;
case 3: // pi minus
HadrTot = 10.6+2*log(HadrEnergy)+
30*pow(HadrEnergy,-0.43); // mb
HadrSlope = 7.28+0.245*log(sHadr); // GeV-2
HadrReIm = 0.2*log(sHadr/100)*pow(sHadr,-0.15);
DDSect2 = 4.6; //mb*GeV-2
DDSect3 = 1.33; //mb*GeV-2
break;
case 4: // K plus
HadrTot = 10.6+1.8*log(HadrEnergy)+
9.0*pow(HadrEnergy,-0.55); // mb
if(HadrEnergy>100) HadrSlope = 15.0;
else
HadrSlope = 5.28+1.76*log(sHadr)-
2.84*pow(sHadr,-0.5); // GeV-2
HadrReIm = 0.4*(sHadr-20)*(sHadr-150)*pow(sHadr+50,-2.1);
DDSect2 = 3.5; //mb*GeV-2
DDSect3 = 1.03; //mb*GeV-2
break;
case 5: // K minus
HadrTot = 10+1.8*log(HadrEnergy)
+25*pow(HadrEnergy,-0.5); // mb
HadrSlope = 6.98+0.127*log(sHadr); // GeV-2
// if(HadrEnergy<8) HadrReIm = 0.7;
// else
HadrReIm = 0.4*(sHadr-20)*(sHadr-20)*pow(sHadr+50,-2.1);
DDSect2 = 3.5; //mb*GeV-2
DDSect3 = 1.03; //mb*GeV-2
break;
}
}
/* end of file */
@@ -0,0 +1,223 @@
//
// ********************************************************************
// * 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. *
// * 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. *
// ********************************************************************
//
// IntegrHadrNucleus.cc
#include "globals.hh"
#include "G4IntegrHadrNucleus.hh"
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
void G4IntegrHadrNucleus::
GetIntegralCrSec(G4Nucleus * aNucleus)
{
G4int i, /*k,*/ l/*, m*/;
G4double N, N1, N2, N3, N4, Delta, Inel1/*, Inel3*/;
G4double Tot0, Inel0, /*Inel2,*/ Prod0, Prod1,
ak, Delt, Delt2, Delt3;
G4double Rnucl, R0, Stot, Bhad, Asq, MbToB, Pi1;
G4double Dtot, /*Dinel,*/ Dprod, Rnuc2, RB, R2B, bk, bd;
G4int Anucleus = static_cast<G4int>( aNucleus->GetN() );
if(Anucleus<4)
{
G4Exception(" This nucleus is very light for this model !!!");
}
if(Anucleus>238)
{
G4Exception(" This nucleus is very heavy for this model !!!");
}
MbToB = 2.568;
Pi1 = 3.1416;
Stot = HadrTot*MbToB; //{In GeV-2}
Bhad = HadrSlope; //{In GeV-2}
Asq = 1+HadrReIm*HadrReIm;
R0 = sqrt(0.99); //{ This is fermi}
if (Anucleus >10) R0 = sqrt(0.84);
if (Anucleus >20) R0 = sqrt((35.34+0.5*Anucleus)
/(40.97+Anucleus));
if (Anucleus == 16) R0 = sqrt(0.75);
if (Anucleus == 58) R0 = sqrt(0.6);
// R0 = sqrt(0.64);
Rnucl = R0*pow(static_cast<double>(Anucleus),0.3333); //{In Fermi }
if(Anucleus == 4) Rnucl = 1.2;
Rnuc2 = Rnucl*Rnucl*MbToB*10; //{ In GeV-2}
RB = Rnuc2+Bhad;
R2B = RB+Bhad;
Delta = Stot/R2B/2/Pi1;
Delt = Delta*Asq*0.5;
Delt2 = Delta*2;
Delt3 = Stot/RB/Bhad/16/Pi1*Asq*R2B;
Tot0 = 0;
Inel0 = 0;
Inel1=0;
N = N1 = -1/Delta;
N3 = -1/Delt2;
Prod0 = 0;
for (i=1; i<= Anucleus; i++)
{
N = -N*Delta*(Anucleus-i+1)/i;
N1 = -N1*Delta*(2*Anucleus-i+1)/i;
N3 = -N3*Delt2*(Anucleus-i+1)/i;
Tot0 = Tot0+N/i;
Inel0 = Inel0+N1/i;
N2 = 1;
N4 = 1;
Inel1 = 0;
Prod1 = 0;
for (l=0; l<= i; l++)
{
// Inel1 = Inel1+N2/(i+l);
Prod1 = Prod1+N4*RB/(i*RB+l*Bhad);
// N2 = -N2*Delt*(i-l)/(l+1);
N4 = -N4*Delt3*(i-l)/(l+1);
} // l
// Inel2 = Inel2+Inel1*N3;
Prod0 = Prod0+Prod1*N3;
if(abs(N1/i/Inel0) < 0.0001) break;
} // i
Tot0 = Tot0*HadrTot;
Inel0 = Inel0*HadrTot*0.5;
// Inel2 = Inel2*HadrTot;
Prod0 = Prod0*HadrTot;
Tot00 = Tot0;
ak = (Rnuc2*2*Pi1/Stot);
G4double DDSect1 = (DDSect2+DDSect3*log(1.06*2*HadrEnergy
/Rnucl/sqrt(25.68)/4));
Dtot = 8*Pi1*ak/HadrTot*(1-(1+Anucleus/ak)
*exp(-Anucleus/ak))*DDSect1/MbToB;
DTot00 = Dtot;
bk = (1-1/ak)/Stot/(1-1/ak/4);
bd = bk*bk*DDSect1*(1-(1+Anucleus/ak*(1-1/ak/4))*
exp(-Anucleus/ak*(1-1/4/ak)))*Rnuc2;
Dprod = bd*4*Pi1*Pi1*MbToB;
TotalCrSec = Tot0-Dtot;
InelCrSec = Inel0-Dprod;
// InelCrSec1 = Inel2;
ProdCrSec = Prod0-Dprod;
ElasticCrSec = TotalCrSec-InelCrSec;
QuasyElasticCrSec = InelCrSec-ProdCrSec;
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
G4double
G4IntegrHadrNucleus::GetElasticCrossSection(
const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus)
{
HadrEnergy = aHadron->GetTotalEnergy()/1000;
if(HadrEnergy < 1.5)
G4cout << " The hadron energy is very low for this model !!!"<<G4endl;
G4HadronValues::GetHadronValues(aHadron);
GetIntegralCrSec(aNucleus);
return(ElasticCrSec);
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
G4double
G4IntegrHadrNucleus::GetTotalCrossSection(
const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus)
{
HadrEnergy = aHadron->GetTotalEnergy()/1000;
if(HadrEnergy < 1.5)
G4cout <<" The hadron energy is very low for this model !!!"<<G4endl;
G4HadronValues::GetHadronValues(aHadron);
GetIntegralCrSec(aNucleus);
return(TotalCrSec);
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
G4double
G4IntegrHadrNucleus::GetInelasticCrossSection(
const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus)
{
HadrEnergy = aHadron->GetTotalEnergy()/1000;
if(HadrEnergy < 1.5)
G4cout <<" The hadron energy is very low for this model !!!"<<G4endl;
G4HadronValues::GetHadronValues(aHadron);
GetIntegralCrSec(aNucleus);
return(InelCrSec);
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
G4double
G4IntegrHadrNucleus::GetProductionCrossSection(
const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus)
{
HadrEnergy = aHadron->GetTotalEnergy()/1000;
if(HadrEnergy < 1.5)
G4cout <<" The hadron energy is very low for this model !!!"<<G4endl;
G4HadronValues::GetHadronValues(aHadron);
GetIntegralCrSec(aNucleus);
return(ProdCrSec);
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
G4double
G4IntegrHadrNucleus::GetQuasyElasticCrossSection(
const G4DynamicParticle * aHadron,
G4Nucleus * aNucleus)
{
HadrEnergy = aHadron->GetTotalEnergy()/1000;
if(HadrEnergy < 1.5)
G4cout <<" The hadron energy is very low for this model !!!"<<G4endl;
G4HadronValues::GetHadronValues(aHadron);
GetIntegralCrSec(aNucleus);
return(QuasyElasticCrSec);
}
/* end of file */
@@ -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
@@ -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;
}
////////////////////////////////////////////////////////////////////////////////
//
@@ -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;
}
};
};
@@ -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());
@@ -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;
@@ -0,0 +1,48 @@
# $Id: GNUmakefile,v 1.1 2004/05/27 11:44:58 flei Exp $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
name := G4hadronic_em_dissociation
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
@@ -0,0 +1,99 @@
//
// ********************************************************************
// * 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 G4EMDissociation_h
#define G4EMDissociation_h
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// MODULE: G4EMDissociation.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
// --------------
//
// 17 October 2003, P R Truscott, QinetiQ Ltd, UK
// Created.
//
// 15 March 2004, P R Truscott, QinetiQ Ltd, UK
// Beta release
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// Class Description
//
//
// Class Description - End
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
////////////////////////////////////////////////////////////////////////////////
//
#include "G4HadronicInteraction.hh"
#include "G4ExcitationHandler.hh"
#include "G4HadProjectile.hh"
#include "G4Nucleus.hh"
#include "G4EMDissociationCrossSection.hh"
#include "G4EMDissociationSpectrum.hh"
#include "globals.hh"
////////////////////////////////////////////////////////////////////////////////
//
class G4EMDissociation : public G4HadronicInteraction
{
public:
G4EMDissociation ();
G4EMDissociation (G4ExcitationHandler *);
~G4EMDissociation ();
const G4EMDissociation &operator=(G4EMDissociation &right);
virtual G4HadFinalState *ApplyYourself (const G4HadProjectile &,
G4Nucleus &);
private:
void PrintWelcomeMessage ();
private:
G4ExcitationHandler *theExcitationHandler;
G4bool handlerDefinedInternally;
G4EMDissociationCrossSection *dissociationCrossSection;
G4EMDissociationSpectrum *thePhotonSpectrum;
};
////////////////////////////////////////////////////////////////////////////////
//
#endif
@@ -0,0 +1,449 @@
//
// ********************************************************************
// * 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: G4EMDissociation.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
// --------------
//
// 17 October 2003, P R Truscott, QinetiQ Ltd, UK
// Created.
//
// 15 March 2004, P R Truscott, QinetiQ Ltd, UK
// Beta release
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
////////////////////////////////////////////////////////////////////////////////
//
#include "G4EMDissociation.hh"
#include "G4Evaporation.hh"
#include "G4FermiBreakUp.hh"
#include "G4StatMF.hh"
#include "G4ParticleDefinition.hh"
#include "G4LorentzVector.hh"
#include "G4PhysicsFreeVector.hh"
#include "G4EMDissociationCrossSection.hh"
#include "G4Proton.hh"
#include "G4Neutron.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
#include "G4GeneralPhaseSpaceDecay.hh"
#include "G4DecayProducts.hh"
#include "G4DynamicParticle.hh"
#include "G4Fragment.hh"
#include "G4ReactionProductVector.hh"
#include "Randomize.hh"
#include "globals.hh"
////////////////////////////////////////////////////////////////////////////////
//
G4EMDissociation::G4EMDissociation ()
{
//
//
// Send message to stdout to advise that the G4EMDissociation model is being
// used.
//
PrintWelcomeMessage();
//
//
// No de-excitation handler has been supplied - define the default handler.
//
theExcitationHandler = new G4ExcitationHandler;
G4Evaporation * theEvaporation = new G4Evaporation;
G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
G4StatMF * theMF = new G4StatMF;
theExcitationHandler->SetEvaporation(theEvaporation);
theExcitationHandler->SetFermiModel(theFermiBreakUp);
theExcitationHandler->SetMultiFragmentation(theMF);
theExcitationHandler->SetMaxAandZForFermiBreakUp(12, 6);
theExcitationHandler->SetMinEForMultiFrag(5.0*MeV);
handlerDefinedInternally = true;
//
//
// This EM dissociation model needs access to the cross-sections held in
// G4EMDissociationCrossSection.
//
dissociationCrossSection = new G4EMDissociationCrossSection;
thePhotonSpectrum = new G4EMDissociationSpectrum;
//
//
// Set the minimum and maximum range for the model (despite nomanclature, this
// is in energy per nucleon number).
//
SetMinEnergy(100.0*MeV);
SetMaxEnergy(500.0*GeV);
//
//
// Set the default verbose level to 0 - no output.
//
verboseLevel = 0;
}
////////////////////////////////////////////////////////////////////////////////
//
G4EMDissociation::G4EMDissociation (G4ExcitationHandler *aExcitationHandler)
{
//
//
// Send message to stdout to advise that the G4EMDissociation model is being
// used.
//
PrintWelcomeMessage();
theExcitationHandler = aExcitationHandler;
handlerDefinedInternally = false;
//
//
// This EM dissociation model needs access to the cross-sections held in
// G4EMDissociationCrossSection.
//
dissociationCrossSection = new G4EMDissociationCrossSection;
thePhotonSpectrum = new G4EMDissociationSpectrum;
//
//
// Set the minimum and maximum range for the model (despite nomanclature, this
// is in energy per nucleon number).
//
SetMinEnergy(100.0*MeV);
SetMaxEnergy(500.0*GeV);
//
//
// Set the default verbose level to 0 - no output.
//
verboseLevel = 0;
}
////////////////////////////////////////////////////////////////////////////////
//
G4EMDissociation::~G4EMDissociation ()
{
if (handlerDefinedInternally) delete theExcitationHandler;
delete dissociationCrossSection;
delete thePhotonSpectrum;
}
////////////////////////////////////////////////////////////////////////////////
//
G4HadFinalState *G4EMDissociation::ApplyYourself
(const G4HadProjectile &theTrack, G4Nucleus &theTarget)
{
//
//
// The secondaries will be returned in G4HadFinalState &theParticleChange -
// initialise this.
//
theParticleChange.Clear();
theParticleChange.SetStatusChange(stopAndKill);
//
//
// Get relevant information about the projectile and target (A, Z) and
// energy/nuc, momentum, velocity, Lorentz factor and rest-mass of the
// projectile.
//
const G4ParticleDefinition *definitionP = theTrack.GetDefinition();
const G4double AP = definitionP->GetBaryonNumber();
const G4double ZP = definitionP->GetPDGCharge();
G4LorentzVector pP = theTrack.Get4Momentum();
G4double E = theTrack.GetKineticEnergy()/AP;
G4double MP = theTrack.GetTotalEnergy() - E*AP;
G4double b = pP.beta();
G4double AT = theTarget.GetN();
G4double ZT = theTarget.GetZ();
G4double MT = G4NucleiProperties::GetNuclearMass(AT,ZT);
//
//
// Depending upon the verbosity level, output the initial information on the
// projectile and target.
//
if (verboseLevel >= 2)
{
G4cout.precision(6);
G4cout <<"########################################"
<<"########################################"
<<G4endl;
G4cout <<"IN G4EMDissociation" <<G4endl;
G4cout <<"Initial projectile A=" <<AP
<<", Z=" <<ZP
<<G4endl;
G4cout <<"Initial target A=" <<AT
<<", Z=" <<ZT
<<G4endl;
G4cout <<"Projectile momentum and Energy/nuc = " <<pP <<" ," <<E <<G4endl;
}
//
//
// Initialise the variables which will be used with the phase-space decay and
// to boost the secondaries from the interaction.
//
G4ParticleDefinition *typeNucleon = NULL;
G4ParticleDefinition *typeDaughter = NULL;
G4double Eg = 0.0;
G4double mass = 0.0;
G4ThreeVector boost = G4ThreeVector(0.0, 0.0, 0.0);
//
//
// Determine the cross-sections at the giant dipole and giant quadrupole
// resonance energies for the projectile and then target. The information is
// initially provided in the G4PhysicsFreeVector individually for the E1
// and E2 fields. These are then summed.
//
G4double bmin = thePhotonSpectrum->GetClosestApproach(AP, ZP, AT, ZT, b);
G4PhysicsFreeVector *crossSectionP = dissociationCrossSection->
GetCrossSectionForProjectile(AP, ZP, AT, ZT, b, bmin);
G4PhysicsFreeVector *crossSectionT = dissociationCrossSection->
GetCrossSectionForTarget(AP, ZP, AT, ZT, b, bmin);
G4double totCrossSectionP = (*crossSectionP)[0]+(*crossSectionP)[1];
G4double totCrossSectionT = (*crossSectionT)[0]+(*crossSectionT)[1];
//
//
// Now sample whether the interaction involved EM dissociation of the projectile
// or the target.
//
if (G4UniformRand() <
totCrossSectionP / (totCrossSectionP + totCrossSectionT))
{
//
//
// It was the projectile which underwent EM dissociation. Define the Lorentz
// boost to be applied to the secondaries, and sample whether a proton or a
// neutron was ejected. Then determine the energy of the virtual gamma ray
// which passed from the target nucleus ... this will be used to define the
// excitation of the projectile.
//
mass = MP;
if (G4UniformRand() < dissociationCrossSection->
GetWilsonProbabilityForProtonDissociation (AP, ZP))
{
if (verboseLevel >= 2)
G4cout <<"Projectile underwent EM dissociation producing a proton"
<<G4endl;
typeNucleon = G4Proton::ProtonDefinition();
typeDaughter = G4ParticleTable::GetParticleTable()->
GetIon((G4int) ZP-1, (G4int) AP-1, 0.0);
}
else
{
if (verboseLevel >= 2)
G4cout <<"Projectile underwent EM dissociation producing a neutron"
<<G4endl;
typeNucleon = G4Neutron::NeutronDefinition();
typeDaughter = G4ParticleTable::GetParticleTable()->
GetIon((G4int) ZP, (G4int) AP-1, 0.0);
}
if (G4UniformRand() < (*crossSectionP)[0]/totCrossSectionP)
{
Eg = crossSectionP->GetLowEdgeEnergy(0);
if (verboseLevel >= 2)
G4cout <<"Transition type was E1" <<G4endl;
}
else
{
Eg = crossSectionP->GetLowEdgeEnergy(1);
if (verboseLevel >= 2)
G4cout <<"Transition type was E2" <<G4endl;
}
//
//
// We need to define a Lorentz vector with the original momentum, but total
// energy includes the projectile and virtual gamma. This is then used
// to calculate the boost required for the secondaries.
//
pP.setE(pP.e()+Eg);
boost = pP.findBoostToCM();
}
else
{
//
//
// It was the target which underwent EM dissociation. Sample whether a
// proton or a neutron was ejected. Then determine the energy of the virtual
// gamma ray which passed from the projectile nucleus ... this will be used to
// define the excitation of the target.
//
mass = MT;
if (G4UniformRand() < dissociationCrossSection->
GetWilsonProbabilityForProtonDissociation (AT, ZT))
{
if (verboseLevel >= 2)
G4cout <<"Target underwent EM dissociation producing a proton"
<<G4endl;
typeNucleon = G4Proton::ProtonDefinition();
typeDaughter = G4ParticleTable::GetParticleTable()->
GetIon((G4int) ZT-1, (G4int) AT-1, 0.0);
}
else
{
if (verboseLevel >= 2)
G4cout <<"Target underwent EM dissociation producing a neutron"
<<G4endl;
typeNucleon = G4Neutron::NeutronDefinition();
typeDaughter = G4ParticleTable::GetParticleTable()->
GetIon((G4int) ZT, (G4int) AT-1, 0.0);
}
if (G4UniformRand() < (*crossSectionT)[0]/totCrossSectionT)
{
Eg = crossSectionT->GetLowEdgeEnergy(0);
if (verboseLevel >= 2)
G4cout <<"Transition type was E1" <<G4endl;
}
else
{
Eg = crossSectionT->GetLowEdgeEnergy(1);
if (verboseLevel >= 2)
G4cout <<"Transition type was E2" <<G4endl;
}
//
//
// Add the projectile to theParticleChange, less the energy of the
// not-so-virtual gamma-ray. Not that at the moment, no lateral momentum
// is transferred between the projectile and target nuclei.
//
G4ThreeVector v = pP.vect();
v.setMag(1.0);
G4DynamicParticle *changedP = new G4DynamicParticle
(const_cast<G4ParticleDefinition*>(definitionP), v, E*AP-Eg);
theParticleChange.AddSecondary (changedP);
if (verboseLevel >= 2)
{
G4cout <<"Projectile change:" <<G4endl;
changedP->DumpInfo();
}
}
//
//
// Perform a two-body decay based on the restmass energy of the parent and
// gamma-ray, and the masses of the daughters. In the frame of reference of
// the nucles, the angular distribution is sampled isotropically, but the
// the nucleon and secondary nucleus are boosted if they've come from the
// projectile.
//
G4double e = mass + Eg;
G4double m1 = typeNucleon->GetPDGMass();
G4double m2 = typeDaughter->GetPDGMass();
G4double pp = (e+m1+m2)*(e+m1-m2)*(e-m1+m2)*(e-m1-m2)/(4.0*e*e);
if (pp < 0.0)
{
pp = 1.0*eV;
// if (verboseLevel >`= 1)
// {
// G4cout <<"IN G4EMDissociation::ApplyYoursef" <<G4endl;
// G4cout <<"Error in mass of secondaries compared with primary:" <<G4endl;
// G4cout <<"Rest mass of primary = " <<mass <<" MeV" <<G4endl;
// G4cout <<"Virtual gamma energy = " <<Eg <<" MeV" <<G4endl;
// G4cout <<"Rest mass of secondary #1 = " <<m1 <<" MeV" <<G4endl;
// G4cout <<"Rest mass of secondary #2 = " <<m2 <<" MeV" <<G4endl;
// }
}
else
pp = sqrt(pp);
G4double costheta = 2.*G4UniformRand()-1.0;
G4double sintheta = sqrt((1.0 - costheta)*(1.0 + costheta));
G4double phi = 2.0*pi*G4UniformRand()*rad;
G4ThreeVector direction(sintheta*cos(phi),sintheta*sin(phi),costheta);
G4DynamicParticle *dynamicNucleon =
new G4DynamicParticle(typeNucleon, direction*pp);
dynamicNucleon->Set4Momentum(dynamicNucleon->Get4Momentum().boost(-boost));
G4DynamicParticle *dynamicDaughter =
new G4DynamicParticle(typeDaughter, -direction*pp);
dynamicDaughter->Set4Momentum(dynamicDaughter->Get4Momentum().boost(-boost));
//
//
// The "decay" products have to be transferred to the G4HadFinalState object.
// Furthermore, the residual nucleus should be de-excited.
//
theParticleChange.AddSecondary (dynamicNucleon);
if (verboseLevel >= 2)
{
G4cout <<"Nucleon from the EMD process:" <<G4endl;
dynamicNucleon->DumpInfo();
}
G4Fragment *theFragment = new
G4Fragment((G4int) typeDaughter->GetBaryonNumber(),
(G4int) typeDaughter->GetPDGCharge(), dynamicDaughter->Get4Momentum());
if (verboseLevel >= 2)
{
G4cout <<"Dynamic properties of the prefragment:" <<G4endl;
G4cout.precision(6);
dynamicDaughter->DumpInfo();
G4cout <<"Nuclear properties of the prefragment:" <<G4endl;
G4cout <<theFragment <<G4endl;
}
G4ReactionProductVector *products =
theExcitationHandler->BreakItUp(*theFragment);
delete theFragment;
theFragment = NULL;
G4ReactionProductVector::iterator iter;
for (iter = products->begin(); iter != products->end(); ++iter)
{
G4DynamicParticle *secondary =
new G4DynamicParticle((*iter)->GetDefinition(),
(*iter)->GetTotalEnergy(), (*iter)->GetMomentum());
theParticleChange.AddSecondary (secondary);
}
if (verboseLevel >= 2)
G4cout <<"########################################"
<<"########################################"
<<G4endl;
return &theParticleChange;
}
////////////////////////////////////////////////////////////////////////////////
//
void G4EMDissociation::PrintWelcomeMessage ()
{
G4cout <<G4endl;
G4cout <<" ****************************************************************"
<<G4endl;
G4cout <<" EM dissociation model for nuclear-nuclear interactions activated"
<<G4endl;
G4cout <<" (Written by QinetiQ Ltd for the European Space Agency)"
<<G4endl;
G4cout <<" ****************************************************************"
<<G4endl;
G4cout << G4endl;
return;
}
////////////////////////////////////////////////////////////////////////////////
//
@@ -1,36 +0,0 @@
# $Id: GNUmakefile,v 1.1 2003/10/08 15:14:06 hpw Exp $
# -----------------------------------------------------------
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
# -----------------------------------------------------------
name := G4hadronic_gen_hp
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/solids/CSG/include \
-I$(G4BASE)/geometry/management/include \
-I$(G4BASE)/processes/management/include \
-I$(G4BASE)/processes/hadronic/management/include/ \
-I$(G4BASE)/processes/hadronic/models/general_finalstate/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/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)/materials/include
include $(G4INSTALL)/config/common.gmk
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEAntiKaonZeroInelastic.hh,v 1.10 2003/07/01 15:42:21 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEAntiKaonZeroInelastic.hh,v 1.11 2004/04/22 19:22:55 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEAntiKaonZeroInelastic_h
#define G4HEAntiKaonZeroInelastic_h 1
// Class description:
// High energy parameterized model for anti-K0 inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident anti-K0 energies above 20 GeV. There is
// currently no corresponding inelastic process to which this model can
// be assigned.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEAntiKaonZeroInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEAntiKaonZeroInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEAntiLambdaInelastic.hh,v 1.10 2003/07/01 15:42:21 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEAntiLambdaInelastic.hh,v 1.11 2004/04/22 18:29:41 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEAntiLambdaInelastic_h
#define G4HEAntiLambdaInelastic_h 1
// Class description:
// High energy parameterized model for anti-Lambda inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident anti-Lambda energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4AntiLambdaInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEAntiLambdaInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEAntiLambdaInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEAntiNeutronInelastic.hh,v 1.10 2003/07/01 15:42:21 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEAntiNeutronInelastic.hh,v 1.11 2004/04/22 18:42:54 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEAntiNeutronInelastic_h
#define G4HEAntiNeutronInelastic_h 1
// Class description:
// High energy parameterized model for anti-neutron inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident anti-neutron energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4AntiNeutronInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEAntiNeutronInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEAntiNeutronInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEAntiOmegaMinusInelastic.hh,v 1.10 2003/07/01 15:42:21 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEAntiOmegaMinusInelastic.hh,v 1.11 2004/04/22 18:48:31 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEAntiOmegaMinusInelastic_h
#define G4HEAntiOmegaMinusInelastic_h 1
// Class description:
// High energy parameterized model for anti-Omega- inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident anti-Omega- energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4AntiOmegaMinusInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEAntiOmegaMinusInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEAntiOmegaMinusInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEAntiProtonInelastic.hh,v 1.11 2003/07/01 15:42:21 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEAntiProtonInelastic.hh,v 1.12 2004/04/22 18:54:16 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEAntiProtonInelastic_h
#define G4HEAntiProtonInelastic_h 1
// Class description:
// High energy parameterized model for anti-proton inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident anti-proton energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4AntiProtonInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEAntiProtonInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEAntiProtonInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEAntiSigmaMinusInelastic.hh,v 1.10 2003/07/01 15:42:21 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEAntiSigmaMinusInelastic.hh,v 1.11 2004/04/22 18:59:57 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEAntiSigmaMinusInelastic_h
#define G4HEAntiSigmaMinusInelastic_h 1
// Class description:
// High energy parameterized model for anti-Sigma- inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident anti-Sigma- energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4AntiSigmaMinusInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEAntiSigmaMinusInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEAntiSigmaMinusInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEAntiSigmaPlusInelastic.hh,v 1.10 2003/07/01 15:42:21 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEAntiSigmaPlusInelastic.hh,v 1.11 2004/04/22 19:04:22 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEAntiSigmaPlusInelastic_h
#define G4HEAntiSigmaPlusInelastic_h 1
// Class description:
// High energy parameterized model for anti-Sigma+ inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident anti-Sigma+ energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4AntiSigmaPlusInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEAntiSigmaPlusInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEAntiSigmaPlusInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEAntiSigmaZeroInelastic.hh,v 1.10 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEAntiSigmaZeroInelastic.hh,v 1.11 2004/04/22 19:15:53 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEAntiSigmaZeroInelastic_h
#define G4HEAntiSigmaZeroInelastic_h 1
// Class description:
// High energy parameterized model for anti-Sigma0 inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident anti-Sigma0 energies above 20 GeV. There
// is currently no corresponding inelastic process to which this model can
// be assigned.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEAntiLambdaInelastic.hh"
class G4HEAntiSigmaZeroInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEAntiSigmaZeroInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEAntiXiMinusInelastic.hh,v 1.10 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEAntiXiMinusInelastic.hh,v 1.11 2004/04/22 19:28:12 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEAntiXiMinusInelastic_h
#define G4HEAntiXiMinusInelastic_h 1
// Class description:
// High energy parameterized model for anti-Xi- inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident anti-Xi- energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4AntiXiMinusInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEAntiXiMinusInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEAntiXiMinusInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEAntiXiZeroInelastic.hh,v 1.10 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEAntiXiZeroInelastic.hh,v 1.11 2004/04/22 19:31:52 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEAntiXiZeroInelastic_h
#define G4HEAntiXiZeroInelastic_h 1
// Class description:
// High energy parameterized model for anti-Xi0 inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident anti-Xi0 energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4AntiXiZeroInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEAntiXiZeroInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEAntiXiZeroInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEInelastic.hh,v 1.10 2002/12/12 19:17:58 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4HEInelastic.hh,v 1.11 2004/04/22 21:52:45 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy (GHE) model class -- header file
@@ -46,12 +46,23 @@
#ifndef G4HEInelastic_h
#define G4HEInelastic_h 1
// Class description:
// Each of the high energy parameterized models (e.g. G4HEProtonInelastic)
// derives from the G4HEInelastic class. This class contains the various
// algorithms needed to implement the interaction. These include
// lambda-fragmentation, meson and nucleon cluster formation and decay,
// nuclear cascade, and nuclear de-excitation.
//
// This class is derived from G4HadronicInteraction.
// Class Description - End
#include "G4HEVector.hh"
#include "G4HadronicInteraction.hh"
class G4HEInelastic : public G4HadronicInteraction
{
public:
public: // with description
G4HEInelastic()
{
SetParticles();
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEKaonMinusInelastic.hh,v 1.10 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEKaonMinusInelastic.hh,v 1.11 2004/04/22 19:56:26 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEKaonMinusInelastic_h
#define G4HEKaonMinusInelastic_h 1
// Class description:
// High energy parameterized model for K- inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident K- energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4KaonMinusInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEKaonMinusInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEKaonMinusInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEKaonPlusInelastic.hh,v 1.10 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEKaonPlusInelastic.hh,v 1.11 2004/04/22 20:01:17 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEKaonPlusInelastic_h
#define G4HEKaonPlusInelastic_h 1
// Class description:
// High energy parameterized model for K+ inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident K+ energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4KaonPlusInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEKaonPlusInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEKaonPlusInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEKaonZeroInelastic.hh,v 1.9 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEKaonZeroInelastic.hh,v 1.10 2004/04/22 20:08:22 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEKaonZeroInelastic_h
#define G4HEKaonZeroInelastic_h 1
// Class description:
// High energy parameterized model for K0 inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident K0 energies above 20 GeV. There is
// currently no corresponding inelastic process to which this model can
// be assigned.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEKaonZeroInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEKaonZeroInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEKaonZeroLongInelastic.hh,v 1.10 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEKaonZeroLongInelastic.hh,v 1.11 2004/04/22 20:12:41 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,12 +34,24 @@
#ifndef G4HEKaonZeroLongInelastic_h
#define G4HEKaonZeroLongInelastic_h 1
// Class description:
// High energy parameterized model for K0L inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident K0L energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4KaonZeroLInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEKaonZeroInelastic.hh"
#include "G4HEAntiKaonZeroInelastic.hh"
class G4HEKaonZeroLongInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEKaonZeroLongInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEKaonZeroShortInelastic.hh,v 1.10 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEKaonZeroShortInelastic.hh,v 1.11 2004/04/22 20:17:12 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,12 +34,24 @@
#ifndef G4HEKaonZeroShortInelastic_h
#define G4HEKaonZeroShortInelastic_h 1
// Class description:
// High energy parameterized model for K0S inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident K0S energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4KaonZeroSInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEKaonZeroInelastic.hh"
#include "G4HEAntiKaonZeroInelastic.hh"
class G4HEKaonZeroShortInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEKaonZeroShortInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HELambdaInelastic.hh,v 1.10 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HELambdaInelastic.hh,v 1.11 2004/04/22 20:26:00 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HELambdaInelastic_h
#define G4HELambdaInelastic_h 1
// Class description:
// High energy parameterized model for Lambda inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident Lambda energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4LambdaInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HELambdaInelastic : public G4HEInelastic
{
public:
public: // with description
G4HELambdaInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HENeutronInelastic.hh,v 1.11 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HENeutronInelastic.hh,v 1.12 2004/04/22 20:30:17 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HENeutronInelastic_h
#define G4HENeutronInelastic_h 1
// Class description:
// High energy parameterized model for neutron inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident neutron energies above 45 GeV. This
// physics may be invoked by registering an instance of the class with
// G4NeutronInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HENeutronInelastic : public G4HEInelastic
{
public:
public: // with description
G4HENeutronInelastic() : G4HEInelastic()
{
theMinEnergy = 45*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEOmegaMinusInelastic.hh,v 1.10 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEOmegaMinusInelastic.hh,v 1.11 2004/04/22 20:34:56 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEOmegaMinusInelastic_h
#define G4HEOmegaMinusInelastic_h 1
// Class description:
// High energy parameterized model for Omega- inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident Omega- energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4OmegaMinusInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEOmegaMinusInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEOmegaMinusInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEPionMinusInelastic.hh,v 1.11 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEPionMinusInelastic.hh,v 1.12 2004/04/22 20:40:43 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEPionMinusInelastic_h
#define G4HEPionMinusInelastic_h 1
// Class description:
// High energy parameterized model for pi- inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident pi- energies above 45 GeV. This
// physics may be invoked by registering an instance of the class with
// G4PionMinusInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEPionMinusInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEPionMinusInelastic() : G4HEInelastic()
{
theMinEnergy = 45*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEPionPlusInelastic.hh,v 1.11 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEPionPlusInelastic.hh,v 1.12 2004/04/22 20:43:43 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEPionPlusInelastic_h
#define G4HEPionPlusInelastic_h 1
// Class description:
// High energy parameterized model for pi+ inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident pi+ energies above 45 GeV. This
// physics may be invoked by registering an instance of the class with
// G4PionPlusInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEPionPlusInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEPionPlusInelastic() : G4HEInelastic()
{
theMinEnergy = 45*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEProtonInelastic.hh,v 1.11 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEProtonInelastic.hh,v 1.12 2004/04/22 20:47:03 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEProtonInelastic_h
#define G4HEProtonInelastic_h 1
// Class description:
// High energy parameterized model for proton inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident proton energies above 45 GeV. This
// physics may be invoked by registering an instance of the class with
// G4ProtonInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEProtonInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEProtonInelastic() : G4HEInelastic()
{
theMinEnergy = 45*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HESigmaMinusInelastic.hh,v 1.10 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HESigmaMinusInelastic.hh,v 1.11 2004/04/22 20:50:20 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HESigmaMinusInelastic_h
#define G4HESigmaMinusInelastic_h 1
// Class description:
// High energy parameterized model for Sigma- inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident Sigma- energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4SigmaMinusInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HESigmaMinusInelastic : public G4HEInelastic
{
public:
public: // with description
G4HESigmaMinusInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HESigmaPlusInelastic.hh,v 1.10 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HESigmaPlusInelastic.hh,v 1.11 2004/04/22 20:53:38 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HESigmaPlusInelastic_h
#define G4HESigmaPlusInelastic_h 1
// Class description:
// High energy parameterized model for Sigma+ inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident Sigma+ energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4SigmaPlusInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HESigmaPlusInelastic : public G4HEInelastic
{
public:
public: // with description
G4HESigmaPlusInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HESigmaZeroInelastic.hh,v 1.10 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HESigmaZeroInelastic.hh,v 1.11 2004/04/22 20:57:53 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HESigmaZeroInelastic_h
#define G4HESigmaZeroInelastic_h 1
// Class description:
// High energy parameterized model for Sigma0 inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident Sigma0 energies above 20 GeV. There is
// currently no corresponding inelastic process to which this model can
// be assigned.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HELambdaInelastic.hh"
class G4HESigmaZeroInelastic : public G4HEInelastic
{
public:
public: // with description
G4HESigmaZeroInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEVector.hh,v 1.9 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEVector.hh,v 1.10 2004/04/22 21:24:31 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha friend class G4KinematicParticle -- header file
@@ -32,6 +32,14 @@
#ifndef G4HEVector_hh
#define G4HEVector_hh 1
// Class description:
// Instances of this class are used by the high energy parameterized models
// to store particle type, charge, mass, energy and momentum, among other
// things. Many operations are available with G4HEVectors, including
// addition, subtraction, and Lorentz boosting.
// Class Description - End
#include "G4ParticleMomentum.hh"
#include "Randomize.hh"
#include "G4HadProjectile.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEXiMinusInelastic.hh,v 1.10 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEXiMinusInelastic.hh,v 1.11 2004/04/22 21:04:04 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEXiMinusInelastic_h
#define G4HEXiMinusInelastic_h 1
// Class description:
// High energy parameterized model for Xi- inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident Xi- energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4XiMinusInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEXiMinusInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEXiMinusInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HEXiZeroInelastic.hh,v 1.10 2003/07/01 15:42:22 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HEXiZeroInelastic.hh,v 1.11 2004/04/22 21:08:07 dwright Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// G4 Gheisha High Energy model class -- header file
@@ -34,11 +34,23 @@
#ifndef G4HEXiZeroInelastic_h
#define G4HEXiZeroInelastic_h 1
// Class description:
// High energy parameterized model for Xi0 inelastic scattering. This
// class is responsible for producing the final state of the interaction and
// is typically valid for incident Xi0 energies above 20 GeV. This
// physics may be invoked by registering an instance of the class with
// G4XiZeroInelasticProcess in the user's physics list.
//
// This class is derived from G4HEInelastic which in turn is derived from
// G4HadronicInteraction.
// Class Description - End
#include "G4HEInelastic.hh"
class G4HEXiZeroInelastic : public G4HEInelastic
{
public:
public: // with description
G4HEXiZeroInelastic() : G4HEInelastic()
{
theMinEnergy = 20*GeV;
@@ -20,7 +20,7 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4Scatterer.cc,v 1.13.2.1 2004/03/24 13:18:45 hpw Exp $ //
// $Id: G4Scatterer.cc,v 1.13.2.2 2004/05/07 15:09:21 gunter Exp $ //
//
#include "globals.hh"
@@ -58,36 +58,49 @@ G4Scatterer::~G4Scatterer()
collisions.clear();
}
G4double G4Scatterer::GetTimeToInteraction(const G4KineticTrack& trk1,
const G4KineticTrack& trk2)
{
G4double time = DBL_MAX;
G4double distance_fast;
G4LorentzVector mom1 = trk1.GetTrackingMomentum();
// G4cout << "zcomp=" << abs(mom1.vect().unit().z() -1 ) << G4endl;
G4double collisionTime;
G4double sqrtS = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag();
// Check whether there is enough energy for elastic scattering
// (to put the particles on to mass shell
if ( abs(mom1.vect().unit().z() -1 ) < 1e-6 )
{
G4ThreeVector position = trk2.GetPosition() - trk1.GetPosition();
G4double deltaz=position.z();
G4double velocity = mom1.z()/mom1.e() * c_light;
collisionTime=deltaz/velocity;
distance_fast=position.x()*position.x() + position.y()*position.y();
} else {
// if (trk1.GetDefinition()->GetPDGMass() + trk2.GetDefinition()->GetPDGMass() < sqrtS)
if (trk1.GetActualMass() + trk2.GetActualMass() < sqrtS)
{
G4LorentzVector mom1 = trk1.GetTrackingMomentum();
// The nucleons of the nucleus are FROZEN, ie. do not move..
G4ThreeVector position = trk1.GetPosition() - trk2.GetPosition();
// The nucleons of the nucleus are FROZEN, ie. do not move..
// G4ThreeVector velocity = (mom1.boostVector() - mom2.boostVector()) * c_light;
if ( mom1.mag2() < -1.*eV )
{
G4cout << "G4Scatterer::GetTimeToInteraction(): negative m2:" << mom1.mag2() << G4endl;
}
G4ThreeVector velocity = mom1.vect()/mom1.e() * c_light;
G4double collisionTime = - (position * velocity) / (velocity * velocity); // can't divide by /c_light;
G4ThreeVector position = trk2.GetPosition() - trk1.GetPosition();
G4ThreeVector velocity = mom1.vect()/mom1.e() * c_light; // mom1.boostVector() will exit on slightly negative mass
collisionTime = (position * velocity) / velocity.mag2(); // can't divide by /c_light;
position -= velocity * collisionTime;
distance_fast=position.mag2();
// if ( collisionTime>0 ) G4cout << " dis1/2 square" << dis1 <<" "<< dis2 << G4endl;
// collisionTime = GetTimeToClosestApproach(trk1,trk2);
}
if (collisionTime > 0)
{
static const G4double maxCrossSection = 500*millibarn;
if(0.7*pi*distance_fast>maxCrossSection) return time;
G4LorentzVector mom2(0,0,0,trk2.Get4Momentum().mag());
// G4ThreeVector momLab = mom1.vect();// frozen Nucleus - mom2.vect();
// G4ThreeVector posLab = trk1.GetPosition() - trk2.GetPosition();
// G4double disLab=posLab * posLab - (posLab*momLab) * (posLab*momLab) /(momLab.mag2());
G4LorentzRotation toCMSFrame((-1)*(mom1 + mom2).boostVector());
mom1 = toCMSFrame * mom1;
mom2 = toCMSFrame * mom2;
@@ -101,9 +114,16 @@ G4double G4Scatterer::GetTimeToInteraction(const G4KineticTrack& trk1,
// Calculate the impact parameter
G4double distance = pos * pos - (pos*mom) * (pos*mom) / (mom*mom);
G4double distance = pos * pos - (pos*mom) * (pos*mom) / (mom.mag2());
// G4cout << " disDiff " << distance-disLab << " " << disLab
// << " " << abs(distance-disLab)/distance << G4endl
// << " mom/Lab " << mom << " " << momLab << G4endl
// << " pos/Lab " << pos << " " << posLab
// << G4endl;
// global optimization
static const G4double maxCrossSection = 500*millibarn;
// static const G4double maxCrossSection = 500*millibarn;
if(pi*distance>maxCrossSection) return time;
// charged particles special
@@ -112,6 +132,7 @@ G4double G4Scatterer::GetTimeToInteraction(const G4KineticTrack& trk1,
abs(trk2.GetDefinition()->GetPDGCharge())>0.1 &&
pi*distance>maxChargedCrossSection) return time;
G4double sqrtS = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag();
// neutrons special
if(( trk1.GetDefinition() == G4Neutron::Neutron() ||
trk1.GetDefinition() == G4Neutron::Neutron() ) &&
@@ -149,6 +170,9 @@ G4double G4Scatterer::GetTimeToInteraction(const G4KineticTrack& trk1,
* if(1)
* return time;
*/
if ((trk1.GetActualMass()+trk2.GetActualMass()) > sqrtS) return time;
G4VCollision* collision = FindCollision(trk1,trk2);
@@ -229,20 +253,6 @@ G4double G4Scatterer::GetTimeToInteraction(const G4KineticTrack& trk1,
// End of debugging
*/
}
}
else
{
/*
// For debugging
G4cout << "G4Scatterer - Infinite time to interaction"
<< ": sqrtS " << sqrtS
<< ", mass1 = " << trk1.GetDefinition()->GetPDGMass()
<< ", mass2 = " << trk2.GetDefinition()->GetPDGMass()
<< G4endl;
throw G4HadronicException(__FILE__, __LINE__, "G4Scatterer TimeToInteraction is INF");
// End of debugging
*/
}
return time;
}
@@ -260,8 +260,16 @@ G4LElastic::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& targetNucleu
}
else
{
theParticleChange.SetMomentumChange(pxnew, pynew, pznew);
theParticleChange.SetEnergyChange(sqrt(m1*m1+it0.mag2())-m1);
try
{
theParticleChange.SetMomentumChange(pxnew, pynew, pznew);
theParticleChange.SetEnergyChange(sqrt(m1*m1+it0.mag2())-m1);
}
catch(G4HadronicException)
{
std::cerr << "GHADException originating from components of G4LElastic"<<std::cout;
throw;
}
G4ParticleDefinition * theDef = G4ParticleTable::GetParticleTable()->FindIon(Z,A,0,Z);
G4ThreeVector it(pxre*GeV, pyre*GeV, pzre*GeV);
G4DynamicParticle * aSec =
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4HadronicInteraction.hh,v 1.3 2003/11/03 17:54:18 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4HadronicInteraction.hh,v 1.5 2004/05/26 09:56:52 hpw Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
// Hadronic Interaction abstract base class
// This class is the base class for the model classes.
@@ -98,32 +98,28 @@
inline G4double GetMinEnergy() const
{ return theMinEnergy; }
G4double GetMinEnergy( const G4Material *aMaterial,
const G4Element *anElement ) const;
virtual G4double GetMinEnergy( const G4Material *aMaterial,
const G4Element *anElement ) const;
inline void SetMinEnergy( const G4double anEnergy )
{ theMinEnergy = anEnergy; }
void SetMinEnergy( G4double anEnergy,
G4Element *anElement );
virtual void SetMinEnergy( G4double anEnergy, G4Element *anElement );
void SetMinEnergy( G4double anEnergy,
G4Material *aMaterial );
virtual void SetMinEnergy( G4double anEnergy, G4Material *aMaterial );
inline G4double GetMaxEnergy() const
{ return theMaxEnergy; }
G4double GetMaxEnergy( const G4Material *aMaterial,
const G4Element *anElement ) const;
virtual G4double GetMaxEnergy( const G4Material *aMaterial,
const G4Element *anElement ) const;
inline void SetMaxEnergy( const G4double anEnergy )
{ theMaxEnergy = anEnergy; }
void SetMaxEnergy( G4double anEnergy,
G4Element *anElement );
virtual void SetMaxEnergy( G4double anEnergy, G4Element *anElement );
void SetMaxEnergy( G4double anEnergy,
G4Material *aMaterial );
virtual void SetMaxEnergy( G4double anEnergy, G4Material *aMaterial );
inline const G4HadronicInteraction *GetMyPointer() const
{ return this; }
@@ -139,29 +135,32 @@ public: // With description
virtual G4HadFinalState *ApplyYourself(
const G4HadProjectile &aTrack, G4Nucleus & targetNucleus ) = 0;
public: // Without description
void DeActivateFor( G4Material *aMaterial );
virtual void DeActivateFor( G4Material *aMaterial );
void ActivateFor( G4Material *aMaterial )
virtual void ActivateFor( G4Material *aMaterial )
{
Block();
SetMaxEnergy(GetMaxEnergy(), aMaterial);
SetMinEnergy(GetMinEnergy(), aMaterial);
}
void DeActivateFor( G4Element *anElement );
void ActivateFor( G4Element *anElement )
virtual void DeActivateFor( G4Element *anElement );
virtual void ActivateFor( G4Element *anElement )
{
Block();
SetMaxEnergy(GetMaxEnergy(), anElement);
SetMinEnergy(GetMinEnergy(), anElement);
}
G4bool IsBlocked( const G4Material *aMaterial ) const;
virtual G4bool IsBlocked( const G4Material *aMaterial ) const;
G4bool IsBlocked( const G4Element *anElement) const;
virtual G4bool IsBlocked( const G4Element *anElement) const;
virtual G4bool IsApplicable(const G4HadProjectile &/*aTrack*/,
G4Nucleus & /*targetNucleus*/){ return true;}
protected:
G4HadFinalState theParticleChange;
@@ -402,9 +402,11 @@
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.SetMomentumChange( 1.0, 0.0, 0.0 );
theParticleChange.SetEnergyChange( currentParticle.GetKineticEnergy() );
G4double aE = currentParticle.GetKineticEnergy();
if (fabs(aE)<.1*eV) aE=.1*eV;
theParticleChange.SetEnergyChange( aE );
}
if( targetParticle.GetMass() > 0.0 ) // targetParticle can be eliminated in TwoBody
{
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NeutronHPData.hh,v 1.6 2002/12/12 19:18:10 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4NeutronHPData.hh,v 1.7 2004/05/24 10:32:59 hpw Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
// Hadronic Process: Very Low Energy Neutron X-Sections
// original by H.P. Wellisch, TRIUMF, 14-Feb-97
@@ -67,19 +67,13 @@ public:
G4PhysicsVector * DoPhysicsVector(G4NeutronHPVector * theVector);
static G4NeutronHPData * Instance()
{
if(theCrossSectionData==NULL) theCrossSectionData = new G4NeutronHPData;
return theCrossSectionData;
}
static G4NeutronHPData * Instance();
private:
G4NeutronHPElementData * theData;
G4int numEle;
static G4NeutronHPData * theCrossSectionData;
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NeutronHPFission.hh,v 1.7 2003/07/01 15:58:36 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4NeutronHPFission.hh,v 1.8 2004/05/24 10:32:59 hpw Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
// Hadronic Process: High Precision low E neutron tracking
// original by H.P. Wellisch, TRIUMF, 14-Feb-97
@@ -68,7 +68,7 @@ class G4NeutronHPFission : public G4HadronicInteraction
G4NeutronHPChannel * theFission;
G4String dirName;
G4int numEle;
static G4String theNames[3];
// static G4String theNames[3];
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NeutronHPGamma.hh,v 1.10 2003/06/16 17:10:44 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4NeutronHPGamma.hh,v 1.11 2004/05/24 10:32:59 hpw Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
#ifndef G4NeutronHPGamma_h
#define G4NeutronHPGamma_h 1
@@ -39,12 +39,8 @@ class G4NeutronHPGamma
{
public:
G4NeutronHPGamma()
{
next = NULL;
instancecount ++;
}
~G4NeutronHPGamma() {instancecount--;}
G4NeutronHPGamma();
~G4NeutronHPGamma();
G4bool Init(std::ifstream & aDataFile);
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NeutronHPNames.hh,v 1.11 2003/06/16 17:10:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4NeutronHPNames.hh,v 1.12 2004/05/24 10:32:59 hpw Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
#ifndef G4NeutronHPNames_h
#define G4NeutronHPNames_h 1
@@ -43,7 +43,7 @@ class G4NeutronHPNames
~G4NeutronHPNames(){}
G4NeutronHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool & active);
G4String GetName(G4int i) { return theString[i]; }
G4String GetName(G4int i);
void SetMaxOffSet(G4int anOffset) { theMaxOffSet = anOffset; }
public:
@@ -27,8 +27,6 @@
#include "G4NeutronHPData.hh"
#include "G4LPhysicsFreeVector.hh"
G4NeutronHPData * G4NeutronHPData::theCrossSectionData = NULL;
G4NeutronHPData::G4NeutronHPData()
{
numEle = G4Element::GetNumberOfElements();
@@ -45,6 +43,12 @@
delete [] theData;
}
G4NeutronHPData * G4NeutronHPData::Instance()
{
static G4NeutronHPData theCrossSectionData;
return &theCrossSectionData;
}
G4PhysicsVector * G4NeutronHPData::DoPhysicsVector(G4NeutronHPVector * theVector)
{
// G4cout << "Entered G4NeutronHPData::DoPhysicsVector."<<G4endl;
@@ -28,185 +28,183 @@
#include "G4Nucleus.hh"
#include "G4DynamicParticleVector.hh"
#include "G4NeutronHPFissionERelease.hh"
void G4NeutronHPFissionFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType)
{
theFS.Init(A, Z, dirName, aFSType);
theFC.Init(A, Z, dirName, aFSType);
theSC.Init(A, Z, dirName, aFSType);
theTC.Init(A, Z, dirName, aFSType);
theLC.Init(A, Z, dirName, aFSType);
}
G4HadFinalState * G4NeutronHPFissionFS::ApplyYourself(const G4HadProjectile & theTrack)
{
void G4NeutronHPFissionFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType)
{
theFS.Init(A, Z, dirName, aFSType);
theFC.Init(A, Z, dirName, aFSType);
theSC.Init(A, Z, dirName, aFSType);
theTC.Init(A, Z, dirName, aFSType);
theLC.Init(A, Z, dirName, aFSType);
}
G4HadFinalState * G4NeutronHPFissionFS::ApplyYourself(const G4HadProjectile & theTrack)
{
// prepare neutron
theResult.Clear();
G4double eKinetic = theTrack.GetKineticEnergy();
const G4HadProjectile *incidentParticle = &theTrack;
G4ReactionProduct theNeutron( const_cast<G4ParticleDefinition *>(incidentParticle->GetDefinition()) );
theNeutron.SetMomentum( incidentParticle->Get4Momentum().vect() );
theNeutron.SetKineticEnergy( eKinetic );
theResult.Clear();
G4double eKinetic = theTrack.GetKineticEnergy();
const G4HadProjectile *incidentParticle = &theTrack;
G4ReactionProduct theNeutron( const_cast<G4ParticleDefinition *>(incidentParticle->GetDefinition()) );
theNeutron.SetMomentum( incidentParticle->Get4Momentum().vect() );
theNeutron.SetKineticEnergy( eKinetic );
// prepare target
G4Nucleus aNucleus;
G4ReactionProduct theTarget;
G4double targetMass = theFS.GetMass();
G4ThreeVector neuVelo = (1./incidentParticle->GetDefinition()->GetPDGMass())*theNeutron.GetMomentum();
theTarget = aNucleus.GetBiasedThermalNucleus( targetMass, neuVelo, theTrack.GetMaterial()->GetTemperature());
G4Nucleus aNucleus;
G4ReactionProduct theTarget;
G4double targetMass = theFS.GetMass();
G4ThreeVector neuVelo = (1./incidentParticle->GetDefinition()->GetPDGMass())*theNeutron.GetMomentum();
theTarget = aNucleus.GetBiasedThermalNucleus( targetMass, neuVelo, theTrack.GetMaterial()->GetTemperature());
// set neutron and target in the FS classes
theFS.SetNeutron(theNeutron);
theFS.SetTarget(theTarget);
theFC.SetNeutron(theNeutron);
theFC.SetTarget(theTarget);
theSC.SetNeutron(theNeutron);
theSC.SetTarget(theTarget);
theTC.SetNeutron(theNeutron);
theTC.SetTarget(theTarget);
theLC.SetNeutron(theNeutron);
theLC.SetTarget(theTarget);
theFS.SetNeutron(theNeutron);
theFS.SetTarget(theTarget);
theFC.SetNeutron(theNeutron);
theFC.SetTarget(theTarget);
theSC.SetNeutron(theNeutron);
theSC.SetTarget(theTarget);
theTC.SetNeutron(theNeutron);
theTC.SetTarget(theTarget);
theLC.SetNeutron(theNeutron);
theLC.SetTarget(theTarget);
// boost to target rest system and decide on channel.
theNeutron.Lorentz(theNeutron, -1*theTarget);
theNeutron.Lorentz(theNeutron, -1*theTarget);
// dice the photons
G4DynamicParticleVector * thePhotons;
thePhotons = theFS.GetPhotons();
G4DynamicParticleVector * thePhotons;
thePhotons = theFS.GetPhotons();
// select the FS in charge
eKinetic = theNeutron.GetKineticEnergy();
G4double xSec[4];
xSec[0] = theFC.GetXsec(eKinetic);
xSec[1] = xSec[0]+theSC.GetXsec(eKinetic);
xSec[2] = xSec[1]+theTC.GetXsec(eKinetic);
xSec[3] = xSec[2]+theLC.GetXsec(eKinetic);
G4int it;
unsigned int i=0;
G4double random = G4UniformRand();
if(xSec[3]==0)
{
it=-1;
}
else
{
for(i=0; i<4; i++)
{
it =i;
if(random<xSec[i]/xSec[3]) break;
}
}
eKinetic = theNeutron.GetKineticEnergy();
G4double xSec[4];
xSec[0] = theFC.GetXsec(eKinetic);
xSec[1] = xSec[0]+theSC.GetXsec(eKinetic);
xSec[2] = xSec[1]+theTC.GetXsec(eKinetic);
xSec[3] = xSec[2]+theLC.GetXsec(eKinetic);
G4int it;
unsigned int i=0;
G4double random = G4UniformRand();
if(xSec[3]==0)
{
it=-1;
}
else
{
for(i=0; i<4; i++)
{
it =i;
if(random<xSec[i]/xSec[3]) break;
}
}
// dice neutron multiplicities, energies and momenta in Lab. @@
// no energy conservation on an event-to-event basis. we rely on the data to be ok. @@
// also for mean, we rely on the consistancy of the data. @@
G4int Prompt=0, delayed=0, all=0;
G4DynamicParticleVector * theNeutrons = NULL;
switch(it) // check logic, and ask, if partials can be assumed to correspond to individual particles @@@
{
case 0:
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 0);
if(Prompt==0&&delayed==0) Prompt=all;
theNeutrons = theFC.ApplyYourself(Prompt); // delayed always in FS
// take 'U' into account explicitely (see 5.4) in the sampling of energy @@@@
break;
case 1:
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 1);
if(Prompt==0&&delayed==0) Prompt=all;
theNeutrons = theSC.ApplyYourself(Prompt); // delayed always in FS, off done in FSFissionFS
break;
case 2:
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 2);
if(Prompt==0&&delayed==0) Prompt=all;
theNeutrons = theTC.ApplyYourself(Prompt); // delayed always in FS
break;
case 3:
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 3);
if(Prompt==0&&delayed==0) Prompt=all;
theNeutrons = theLC.ApplyYourself(Prompt); // delayed always in FS
break;
default:
break;
}
G4int Prompt=0, delayed=0, all=0;
G4DynamicParticleVector * theNeutrons = NULL;
switch(it) // check logic, and ask, if partials can be assumed to correspond to individual particles @@@
{
case 0:
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 0);
if(Prompt==0&&delayed==0) Prompt=all;
theNeutrons = theFC.ApplyYourself(Prompt); // delayed always in FS
// take 'U' into account explicitely (see 5.4) in the sampling of energy @@@@
break;
case 1:
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 1);
if(Prompt==0&&delayed==0) Prompt=all;
theNeutrons = theSC.ApplyYourself(Prompt); // delayed always in FS, off done in FSFissionFS
break;
case 2:
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 2);
if(Prompt==0&&delayed==0) Prompt=all;
theNeutrons = theTC.ApplyYourself(Prompt); // delayed always in FS
break;
case 3:
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 3);
if(Prompt==0&&delayed==0) Prompt=all;
theNeutrons = theLC.ApplyYourself(Prompt); // delayed always in FS
break;
default:
break;
}
// dice delayed neutrons and photons, and fallback
// for Prompt in case channel had no FS data; add all paricles to FS.
G4double * theDecayConstants;
if(theNeutrons != NULL)
{
theDecayConstants = new G4double[delayed];
G4int nPhotons = 0;
if(thePhotons!=NULL) nPhotons = thePhotons->size();
for(i=0; i<theNeutrons->size(); i++)
{
theResult.AddSecondary(theNeutrons->operator[](i));
}
delete theNeutrons;
G4DynamicParticleVector * theDelayed = NULL;
theDelayed = theFS.ApplyYourself(0, delayed, theDecayConstants);
for(i=0; i<theDelayed->size(); i++)
{
G4double time = -log(G4UniformRand())/theDecayConstants[i];
time += theTrack.GetGlobalTime();
G4HadSecondary * track = new G4HadSecondary(theDelayed->operator[](i));
track->SetTime(time);
theResult.AddSecondary(track);
}
delete theDelayed;
}
else
{
// cout << " all = "<<all<<G4endl;
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 0);
theDecayConstants = new G4double[delayed];
if(Prompt==0&&delayed==0) Prompt=all;
theNeutrons = theFS.ApplyYourself(Prompt, delayed, theDecayConstants);
G4int nPhotons = 0;
if(thePhotons!=NULL) nPhotons = thePhotons->size();
G4int i0;
for(i0=0; i0<Prompt; i0++)
{
theResult.AddSecondary(theNeutrons->operator[](i0));
}
for(i0=Prompt; i0<Prompt+delayed; i0++)
{
G4double time = -log(G4UniformRand())/theDecayConstants[i0-Prompt];
time += theTrack.GetGlobalTime();
G4HadSecondary * track = new G4HadSecondary(theNeutrons->operator[](i));
track->SetTime(time);
theResult.AddSecondary(track);
}
delete theNeutrons;
}
delete [] theDecayConstants;
// cout << "all delayed "<<delayed<<G4endl;
G4int nPhotons = 0;
if(thePhotons!=NULL)
{
nPhotons = thePhotons->size();
for(i=0; i<thePhotons->size(); i++)
{
theResult.AddSecondary(thePhotons->operator[](i));
}
delete thePhotons;
}
G4double * theDecayConstants;
if(theNeutrons != NULL)
{
theDecayConstants = new G4double[delayed];
G4int nPhotons = 0;
if(thePhotons!=NULL) nPhotons = thePhotons->size();
for(i=0; i<theNeutrons->size(); i++)
{
theResult.AddSecondary(theNeutrons->operator[](i));
}
delete theNeutrons;
G4DynamicParticleVector * theDelayed = NULL;
theDelayed = theFS.ApplyYourself(0, delayed, theDecayConstants);
for(i=0; i<theDelayed->size(); i++)
{
G4double time = -log(G4UniformRand())/theDecayConstants[i];
time += theTrack.GetGlobalTime();
G4HadSecondary * track = new G4HadSecondary(theDelayed->operator[](i));
track->SetTime(time);
theResult.AddSecondary(track);
}
delete theDelayed;
}
else
{
// cout << " all = "<<all<<G4endl;
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 0);
theDecayConstants = new G4double[delayed];
if(Prompt==0&&delayed==0) Prompt=all;
theNeutrons = theFS.ApplyYourself(Prompt, delayed, theDecayConstants);
G4int nPhotons = 0;
if(thePhotons!=NULL) nPhotons = thePhotons->size();
G4int i0;
for(i0=0; i0<Prompt; i0++)
{
theResult.AddSecondary(theNeutrons->operator[](i0));
}
for(i0=Prompt; i0<Prompt+delayed; i0++)
{
G4double time = -log(G4UniformRand())/theDecayConstants[i0-Prompt];
time += theTrack.GetGlobalTime();
G4HadSecondary * track = new G4HadSecondary(theNeutrons->operator[](i));
track->SetTime(time);
theResult.AddSecondary(track);
}
delete theNeutrons;
}
delete [] theDecayConstants;
// cout << "all delayed "<<delayed<<G4endl;
unsigned int nPhotons = 0;
if(thePhotons!=NULL)
{
nPhotons = thePhotons->size();
for(i=0; i<nPhotons; i++)
{
theResult.AddSecondary(thePhotons->operator[](i));
}
delete thePhotons;
}
// do some rotating, if that helps to conserve momentum @@@@
// finally deal with local energy depositions.
// G4cout <<"Number of secondaries = "<<theResult.GetNumberOfSecondaries()<< G4endl;
// G4cout <<"Number of photons = "<<nPhotons<<G4endl;
// G4cout <<"Number of Prompt = "<<Prompt<<G4endl;
// G4cout <<"Number of delayed = "<<delayed<<G4endl;
// G4cout <<"Number of photons = "<<nPhotons<<G4endl;
G4NeutronHPFissionERelease * theERelease;
theERelease = theFS.GetEnergyRelease();
G4double eDepByFragments = theERelease->GetFragmentKinetic();
theResult.SetLocalEnergyDeposit(eDepByFragments);
G4NeutronHPFissionERelease * theERelease = theFS.GetEnergyRelease();
G4double eDepByFragments = theERelease->GetFragmentKinetic();
theResult.SetLocalEnergyDeposit(eDepByFragments);
// cout << "local energy deposit" << eDepByFragments<<G4endl;
// clean up the primary neutron
theResult.SetStatusChange(stopAndKill);
return &theResult;
}
theResult.SetStatusChange(stopAndKill);
return &theResult;
}
@@ -26,6 +26,15 @@
//
#include "G4NeutronHPGamma.hh"
int G4NeutronHPGamma::instancecount = 0;
G4NeutronHPGamma::G4NeutronHPGamma()
{
next = NULL;
instancecount ++;
}
G4NeutronHPGamma::~G4NeutronHPGamma() {instancecount--;}
G4bool G4NeutronHPGamma::Init(std::ifstream & aDataFile)
{
G4bool theResult = true;
@@ -48,6 +48,8 @@
"Einsteinium"};
G4String G4NeutronHPNames::GetName(G4int i) { return theString[i]; }
G4NeutronHPDataUsed G4NeutronHPNames::GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool & aFlag)
{
G4NeutronHPDataUsed result;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PreCompoundTransitions.cc,v 1.4 2003/11/04 11:36:26 lara Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4PreCompoundTransitions.cc,v 1.5 2004/05/09 16:58:01 lara Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
// by V. Lara
@@ -168,6 +168,7 @@ G4Fragment G4PreCompoundTransitions::PerformTransition(const G4Fragment & aFragm
G4Fragment result(aFragment);
G4double ChosenTransition = G4UniformRand()*(TransitionProb1 + TransitionProb2 + TransitionProb3);
G4int deltaN = 0;
G4int Nexcitons = result.GetNumberOfExcitons();
if (ChosenTransition <= TransitionProb1)
{
// Number of excitons is increased on \Delta n = +2
@@ -183,15 +184,17 @@ G4Fragment G4PreCompoundTransitions::PerformTransition(const G4Fragment & aFragm
// With weight Z/A, number of charged particles is decreased on +1
if ((deltaN > 0 || result.GetNumberOfCharged() > 0) &&
(G4UniformRand() <= static_cast<G4double>(result.GetZ())/static_cast<G4double>(result.GetA())))
(G4UniformRand() <= static_cast<G4double>(result.GetZ()-result.GetNumberOfCharged())/
static_cast<G4double>(result.GetA()-Nexcitons)))
{
result.SetNumberOfCharged(result.GetNumberOfCharged()+deltaN/2);
}
// Number of charged can not be greater that number of particles
if ( result.GetNumberOfParticles() < result.GetNumberOfCharged() ) {
result.SetNumberOfCharged(result.GetNumberOfParticles());
}
if ( result.GetNumberOfParticles() < result.GetNumberOfCharged() )
{
result.SetNumberOfCharged(result.GetNumberOfParticles());
}
return result;
}
@@ -37,6 +37,7 @@
#include "G4ios.hh"
#include "globals.hh"
#include "G4VDecayChannel.hh"
#include "G4HadronicException.hh"
class G4GeneralPhaseSpaceDecay : public G4VDecayChannel
{
@@ -59,6 +60,15 @@ class G4GeneralPhaseSpaceDecay : public G4VDecayChannel
const G4String& theDaughterName2 = "",
const G4String& theDaughterName3 = "");
G4GeneralPhaseSpaceDecay(const G4String& theParentName,
G4double theParentMass,
G4double theBR,
G4int theNumberOfDaughters,
const G4String& theDaughterName1,
const G4String& theDaughterName2 ,
const G4String& theDaughterName3 ,
const G4double * masses);
// Destructor
virtual ~G4GeneralPhaseSpaceDecay();
@@ -76,6 +86,7 @@ class G4GeneralPhaseSpaceDecay : public G4VDecayChannel
private:
G4double parentmass;
const G4double * theDaughterMasses;
};
@@ -97,6 +108,10 @@ inline
G4double G4GeneralPhaseSpaceDecay::Pmx(G4double e, G4double p1, G4double p2)
{
// calculate momentum of daughter particles in two-body decay
if (e-p1-p2 < 0 )
{
G4HadronicException(__FILE__, __LINE__, "G4GeneralPhaseSpaceDecay::Pmx energy in cms > mass1+mass2");
}
G4double ppp = (e+p1+p2)*(e+p1-p2)*(e-p1+p2)*(e-p1-p2)/(4.0*e*e);
if (ppp>0) return sqrt(ppp);
else return -1.;
@@ -0,0 +1,91 @@
//
// ********************************************************************
// * 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 G4WilsonRadius_h
#define G4WilsonRadius_h 1
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// MODULE: G4WilsonRadus.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
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// Class Description
// Provides functions to calculate the nuclear radius as used in the
// abrasion-ablation model (see Wilson, Tripathi, Cucinotta et al, NASA
// Technical Paper 3533, October 1995), and to determine total nuclear-nuclear
// cross-sections. The Algorithm comes from Tripathi, Cucinnota and Wilson,
// Nucl Instrum Meth Phys Res B, 152, pp425-431, 1999.
//
// Class Description - End
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
////////////////////////////////////////////////////////////////////////////////
//
#include "globals.hh"
////////////////////////////////////////////////////////////////////////////////
//
class G4WilsonRadius
{
public:
G4WilsonRadius ();
~G4WilsonRadius ();
G4double GetWilsonRMSRadius (G4double A);
G4double GetWilsonRadius (G4double A);
private:
G4double r0sq;
G4double factor;
G4double third;
};
////////////////////////////////////////////////////////////////////////////////
//
#endif
@@ -271,45 +271,67 @@ void G4Fancy3DNucleus::ChooseNucleons()
void G4Fancy3DNucleus::ChoosePositions()
{
G4int i=0;
G4ThreeVector aPos,center;
G4ThreeVector aPos, delta;
std::vector<G4ThreeVector> places;
places.reserve(myA);
G4bool freeplace;
static G4double nd2 = sqr(nucleondistance);
G4double maxR=GetNuclearRadius(0.01); // there are no nucleons at a
// relative Density of 0.01
G4int jr=0;
G4int jx,jy;
G4double arand[600];
G4double *prand=arand;
// G4int Attempt=0;
while ( i < myA )
{
do
{ aPos=G4ThreeVector( (2*G4UniformRand()-1.),
(2*G4UniformRand()-1.),
(2*G4UniformRand()-1.));
{
// ++Attempt;
if ( jr < 3 )
{
jr=std::min(600,9*(myA - i));
HepRandom::getTheEngine()->flatArray(jr, prand );
}
jx=--jr;
jy=--jr;
aPos=G4ThreeVector( (2*arand[jx]-1.),
(2*arand[jy]-1.),
(2*arand[--jr]-1.));
} while (aPos.mag2() > 1. );
aPos *=maxR;
G4double density=theDensity->GetRelativeDensity(aPos);
if (G4UniformRand() < density)
{
freeplace= true;
G4double pFermi=theFermi.GetFermiMomentum(theDensity->GetDensity(aPos));
// protons must at least have binding energy of CoulombBarrier, so
// assuming the Fermi energy corresponds to a potential, we must place these such
// that the Fermi Energy > CoulombBarrier
if (theNucleons[i].GetDefinition() == G4Proton::Proton())
{
G4double eFermi= sqrt( sqr(pFermi) + sqr(theNucleons[i].GetDefinition()->GetPDGMass()) )
- theNucleons[i].GetDefinition()->GetPDGMass();
if (eFermi <= CoulombBarrier() ) freeplace=false;
}
for( int j=0; j<i && freeplace; j++)
{
freeplace= freeplace &&
(theNucleons[j].GetPosition()-aPos).mag() > nucleondistance;
delta = places[j] - aPos;
freeplace= delta.mag2() > nd2;
}
if ( freeplace )
{
G4double pFermi=theFermi.GetFermiMomentum(theDensity->GetDensity(aPos));
// protons must at least have binding energy of CoulombBarrier, so
// assuming the Fermi energy corresponds to a potential, we must place these such
// that the Fermi Energy > CoulombBarrier
if (theNucleons[i].GetDefinition() == G4Proton::Proton())
{
G4double eFermi= sqrt( sqr(pFermi) + sqr(theNucleons[i].GetDefinition()->GetPDGMass()) )
- theNucleons[i].GetDefinition()->GetPDGMass();
if (eFermi <= CoulombBarrier() ) freeplace=false;
}
}
if ( freeplace )
{
theNucleons[i].SetPosition(aPos);
places[i]=aPos;
++i;
}
}
}
// G4cout << "Att " << myA << " " << Attempt << G4endl;
}
@@ -43,7 +43,8 @@
G4GeneralPhaseSpaceDecay::G4GeneralPhaseSpaceDecay(G4int Verbose) :
G4VDecayChannel("Phase Space", Verbose)
G4VDecayChannel("Phase Space", Verbose),
theDaughterMasses(0)
{
if (GetVerboseLevel()>1) G4cout << "G4GeneralPhaseSpaceDecay:: constructor " << G4endl;
}
@@ -59,7 +60,8 @@ G4GeneralPhaseSpaceDecay::G4GeneralPhaseSpaceDecay(const G4String& theParentName
theNumberOfDaughters,
theDaughterName1,
theDaughterName2,
theDaughterName3)
theDaughterName3),
theDaughterMasses(0)
{
if (GetVerboseLevel()>1) G4cout << "G4GeneralPhaseSpaceDecay:: constructor " << G4endl;
@@ -83,7 +85,28 @@ G4GeneralPhaseSpaceDecay::G4GeneralPhaseSpaceDecay(const G4String& theParentName
theDaughterName1,
theDaughterName2,
theDaughterName3),
parentmass(theParentMass)
parentmass(theParentMass),
theDaughterMasses(0)
{
if (GetVerboseLevel()>1) G4cout << "G4GeneralPhaseSpaceDecay:: constructor " << G4endl;
}
G4GeneralPhaseSpaceDecay::G4GeneralPhaseSpaceDecay(const G4String& theParentName,
G4double theParentMass,
G4double theBR,
G4int theNumberOfDaughters,
const G4String& theDaughterName1,
const G4String& theDaughterName2,
const G4String& theDaughterName3,
const G4double *masses) :
G4VDecayChannel("Phase Space",
theParentName,theBR,
theNumberOfDaughters,
theDaughterName1,
theDaughterName2,
theDaughterName3),
parentmass(theParentMass),
theDaughterMasses(masses)
{
if (GetVerboseLevel()>1) G4cout << "G4GeneralPhaseSpaceDecay:: constructor " << G4endl;
}
@@ -162,15 +185,22 @@ G4DecayProducts *G4GeneralPhaseSpaceDecay::TwoBodyDecayIt()
//daughters'mass
G4double daughtermass[2];
G4double daughtermomentum;
daughtermass[0] = daughters[0]->GetPDGMass();
daughtermass[1] = daughters[1]->GetPDGMass();
if ( theDaughterMasses )
{
daughtermass[0]= *(theDaughterMasses);
daughtermass[1] = *(theDaughterMasses+1);
} else {
daughtermass[0] = daughters[0]->GetPDGMass();
daughtermass[1] = daughters[1]->GetPDGMass();
}
// G4double sumofdaughtermass = daughtermass[0] + daughtermass[1];
//create parent G4DynamicParticle at rest
G4ParticleMomentum dummy;
G4DynamicParticle * parentparticle = new G4DynamicParticle( parent, dummy, 0.0);
//create G4Decayproducts
//create G4Decayproducts @@GF why dummy parentparticle?
G4DecayProducts *products = new G4DecayProducts(*parentparticle);
delete parentparticle;
@@ -181,10 +211,12 @@ G4DecayProducts *G4GeneralPhaseSpaceDecay::TwoBodyDecayIt()
G4double phi = 2.0*M_PI*G4UniformRand()*rad;
G4ParticleMomentum direction(sintheta*cos(phi),sintheta*sin(phi),costheta);
//create daughter G4DynamicParticle
G4DynamicParticle * daughterparticle = new G4DynamicParticle( daughters[0], direction*daughtermomentum);
//create daughter G4DynamicParticle
G4double Etotal= sqrt(daughtermass[0]*daughtermass[0] + daughtermomentum*daughtermomentum);
G4DynamicParticle * daughterparticle = new G4DynamicParticle( daughters[0],Etotal, direction*daughtermomentum);
products->PushProducts(daughterparticle);
daughterparticle = new G4DynamicParticle( daughters[1], direction*(-1.0*daughtermomentum));
Etotal= sqrt(daughtermass[1]*daughtermass[1] + daughtermomentum*daughtermomentum);
daughterparticle = new G4DynamicParticle( daughters[1],Etotal, direction*(-1.0*daughtermomentum));
products->PushProducts(daughterparticle);
if (GetVerboseLevel()>1)
@@ -206,7 +238,12 @@ G4DecayProducts *G4GeneralPhaseSpaceDecay::ThreeBodyDecayIt()
G4double sumofdaughtermass = 0.0;
for (G4int index=0; index<3; index++)
{
daughtermass[index] = daughters[index]->GetPDGMass();
if ( theDaughterMasses )
{
daughtermass[index]= *(theDaughterMasses+index);
} else {
daughtermass[index] = daughters[index]->GetPDGMass();
}
sumofdaughtermass += daughtermass[index];
}
@@ -274,8 +311,9 @@ G4DecayProducts *G4GeneralPhaseSpaceDecay::ThreeBodyDecayIt()
sinphi = sin(phi);
cosphi = cos(phi);
G4ParticleMomentum direction0(sintheta*cosphi,sintheta*sinphi,costheta);
G4double Etotal=sqrt( daughtermass[0]*daughtermass[0] + daughtermomentum[0]*daughtermomentum[0]);
G4DynamicParticle * daughterparticle
= new G4DynamicParticle( daughters[0], direction0*daughtermomentum[0]);
= new G4DynamicParticle( daughters[0], Etotal, direction0*daughtermomentum[0]);
products->PushProducts(daughterparticle);
costhetan = (daughtermomentum[1]*daughtermomentum[1]-daughtermomentum[2]*daughtermomentum[2]-daughtermomentum[0]*daughtermomentum[0])/(2.0*daughtermomentum[2]*daughtermomentum[0]);
@@ -287,14 +325,13 @@ G4DecayProducts *G4GeneralPhaseSpaceDecay::ThreeBodyDecayIt()
direction2.setX( sinthetan*cosphin*costheta*cosphi - sinthetan*sinphin*sinphi + costhetan*sintheta*cosphi);
direction2.setY( sinthetan*cosphin*costheta*sinphi + sinthetan*sinphin*cosphi + costhetan*sintheta*sinphi);
direction2.setZ( -sinthetan*cosphin*sintheta + costhetan*costheta);
daughterparticle = new G4DynamicParticle( daughters[2], direction2*(daughtermomentum[2]/direction2.mag()));
Etotal=sqrt( daughtermass[2]*daughtermass[2] + daughtermomentum[2]*daughtermomentum[2]/direction2.mag2());
daughterparticle = new G4DynamicParticle( daughters[2],Etotal, direction2*(daughtermomentum[2]/direction2.mag()));
products->PushProducts(daughterparticle);
G4ThreeVector mom=(direction0*daughtermomentum[0] + direction2*(daughtermomentum[2]/direction2.mag()))*(-1.0);
Etotal= sqrt( daughtermass[1]*daughtermass[1] + mom.mag2() );
daughterparticle =
new G4DynamicParticle(
daughters[1],
(direction0*daughtermomentum[0] + direction2*(daughtermomentum[2]/direction2.mag()))*(-1.0)
);
new G4DynamicParticle(daughters[1], Etotal, mom);
products->PushProducts(daughterparticle);
if (GetVerboseLevel()>1) {
@@ -491,6 +491,7 @@ G4KineticTrackVector* G4KineticTrack::Decay()
G4int chargeBalance = G4lrint(theDefinition->GetPDGCharge() );
G4int baryonBalance = G4lrint(theDefinition->GetBaryonNumber() );
G4LorentzVector energyMomentumBalance(Get4Momentum());
G4double theTotalActualWidth = this->EvaluateTotalActualWidth();
if (theTotalActualWidth !=0)
{
@@ -545,11 +546,28 @@ G4KineticTrackVector* G4KineticTrack::Decay()
G4double theParentMass = this->GetActualMass();
G4double theBR = theActualWidth[index];
// cout << "**BR*** DECAYNEW " << theBR << G4endl;
// cout << "**PMass*** DECAYNEW " << theParentMass << G4endl;
G4int theNumberOfDaughters = theDecayChannel->GetNumberOfDaughters();
G4String theDaughtersName1 = "";
G4String theDaughtersName2 = "";
G4String theDaughtersName3 = "";
G4String theDaughtersName3 = "";
G4double masses[3]={0.,0.,0.};
G4int shortlivedDaughters[3];
G4int numberOfShortliveds(0);
G4double SumLongLivedMass(0);
for (G4int aD=0; aD < theNumberOfDaughters ; aD++)
{
G4ParticleDefinition* aDaughter = theDecayChannel->GetDaughter(aD);
masses[aD] = aDaughter->GetPDGMass();
if ( aDaughter->IsShortLived() )
{
shortlivedDaughters[numberOfShortliveds]=aD;
numberOfShortliveds++;
} else {
SumLongLivedMass += aDaughter->GetPDGMass();
}
}
switch (theNumberOfDaughters)
{
case 0:
@@ -560,14 +578,37 @@ G4KineticTrackVector* G4KineticTrack::Decay()
theDaughtersName3 = "";
break;
case 2:
theDaughtersName1 = theDecayChannel->GetDaughterName(0);
theDaughtersName1 = theDecayChannel->GetDaughterName(0);
theDaughtersName2 = theDecayChannel->GetDaughterName(1);
theDaughtersName3 = "";
if ( numberOfShortliveds == 1)
{ G4SampleResonance aSampler;
G4double massmax=theParentMass - SumLongLivedMass;
G4ParticleDefinition * aDaughter=theDecayChannel->GetDaughter(shortlivedDaughters[0]);
masses[shortlivedDaughters[0]]= aSampler.SampleMass(aDaughter,massmax);
} else if ( numberOfShortliveds == 2) {
// choose masses one after the other, start with randomly choosen
G4int zero= (G4UniformRand() > 0.5) ? 0 : 1;
G4int one = 1-zero;
G4SampleResonance aSampler;
G4double massmax=theParentMass - aSampler.GetMinimumMass(theDecayChannel->GetDaughter(shortlivedDaughters[one]));
G4ParticleDefinition * aDaughter=theDecayChannel->GetDaughter(shortlivedDaughters[zero]);
masses[shortlivedDaughters[zero]]=aSampler.SampleMass(aDaughter,massmax);
massmax=theParentMass - masses[shortlivedDaughters[zero]];
aDaughter=theDecayChannel->GetDaughter(shortlivedDaughters[one]);
masses[shortlivedDaughters[one]]=aSampler.SampleMass(aDaughter,massmax);
}
break;
default:
theDaughtersName1 = theDecayChannel->GetDaughterName(0);
theDaughtersName2 = theDecayChannel->GetDaughterName(1);
theDaughtersName3 = theDecayChannel->GetDaughterName(2);
if ( numberOfShortliveds == 1)
{ G4SampleResonance aSampler;
G4double massmax=theParentMass - SumLongLivedMass;
G4ParticleDefinition * aDaughter=theDecayChannel->GetDaughter(shortlivedDaughters[0]);
masses[shortlivedDaughters[0]]= aSampler.SampleMass(aDaughter,massmax);
}
break;
}
@@ -581,7 +622,8 @@ G4KineticTrackVector* G4KineticTrack::Decay()
theNumberOfDaughters,
theDaughtersName1,
theDaughtersName2,
theDaughtersName3);
theDaughtersName3,
masses);
G4DecayProducts* theDecayProducts = thePhaseSpaceDecayChannel.DecayIt();
if(!theDecayProducts)
{
@@ -602,6 +644,7 @@ G4KineticTrackVector* G4KineticTrack::Decay()
G4double theFormationTime = 0.0;
G4ThreeVector thePosition = this->GetPosition();
G4LorentzVector momentum;
G4LorentzVector momentumBalanceCMS(0);
G4KineticTrackVector* theDecayProductList = new G4KineticTrackVector;
G4int dEntries = theDecayProducts->entries();
G4ParticleDefinition * aProduct = 0;
@@ -611,7 +654,9 @@ G4KineticTrackVector* G4KineticTrack::Decay()
aProduct = theDynamicParticle->GetDefinition();
chargeBalance -= G4lrint(aProduct->GetPDGCharge() );
baryonBalance -= G4lrint(aProduct->GetBaryonNumber() );
momentumBalanceCMS += theDynamicParticle->Get4Momentum();
momentum = toMoving*theDynamicParticle->Get4Momentum();
energyMomentumBalance -= momentum;
theDecayProductList->push_back(new G4KineticTrack (aProduct,
theFormationTime,
thePosition,
@@ -621,7 +666,9 @@ G4KineticTrackVector* G4KineticTrack::Decay()
delete theDecayProducts;
delete [] theCumActualWidth;
if(getenv("DecayEnergyBalanceCheck"))
std::cout << "DEBUGGING energy balance D: "
std::cout << "DEBUGGING energy balance in cms and lab, charge baryon balance : "
<< momentumBalanceCMS << " "
<<energyMomentumBalance << " "
<<chargeBalance<<" "
<<baryonBalance<<" "
<<G4endl;
@@ -0,0 +1,101 @@
//
// ********************************************************************
// * 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: G4WilsonRadius.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 "G4WilsonRadius.hh"
////////////////////////////////////////////////////////////////////////////////
//
G4WilsonRadius::G4WilsonRadius ()
{
G4double r0 = 0.84*fermi;
r0sq = r0 * r0;
factor = sqrt(5.0/3.0) * fermi;
third = 1.0 / 3.0;
}
////////////////////////////////////////////////////////////////////////////////
//
G4WilsonRadius::~G4WilsonRadius ()
{;}
////////////////////////////////////////////////////////////////////////////////
//
G4double G4WilsonRadius::GetWilsonRMSRadius (G4double A)
{
G4double radius;
if (A > 26.0)
radius = factor * (0.84*pow(A,third) + 0.55);
else
{
G4double r[27] = {0.0, 0.85, 2.095, 1.976, 1.671, 1.986,
2.57, 2.41, 2.23, 2.519, 2.45,
2.42, 2.471, 2.440, 2.58, 2.611,
2.730, 2.662, 2.727, 2.9, 3.040,
2.867, 2.969, 2.94, 3.075, 3.11,
3.06};
radius = factor * r[(G4int) (A+0.4)];
}
return radius;
}
////////////////////////////////////////////////////////////////////////////////
//
G4double G4WilsonRadius::GetWilsonRadius (G4double A)
{
G4double r = GetWilsonRMSRadius(A);
return 1.29*sqrt(r*r-r0sq);
}
////////////////////////////////////////////////////////////////////////////////
//