Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.9 2002/06/13 18:01:48 jwellisc Exp $
|
||||
# $Id: GNUmakefile,v 1.12 2002/12/13 12:57:24 gcosmo Exp $
|
||||
# ----------------------------------------------------------------
|
||||
# GNUmakefile for hadronic processes library. G.Folger 10-Dec-97.
|
||||
# ----------------------------------------------------------------
|
||||
@@ -18,10 +18,11 @@ SUBDIRS += models/radiative_decay
|
||||
SUBDIRS += models/generator/de_excitation
|
||||
SUBDIRS += models/generator/diffractive_string
|
||||
SUBDIRS += models/generator/high_energy
|
||||
SUBDIRS += models/generator/kinetic_model
|
||||
SUBDIRS += models/generator/kinetic_model
|
||||
SUBDIRS += models/generator/management
|
||||
SUBDIRS += models/generator/pre_equilibrium
|
||||
SUBDIRS += models/generator/quark_gluon_string
|
||||
SUBDIRS += models/generator/scattering
|
||||
SUBDIRS += models/generator/string_common
|
||||
SUBDIRS += models/generator/string_fragmentation
|
||||
SUBDIRS += models/generator/util
|
||||
@@ -30,20 +31,36 @@ SUBDIRS += models/chiral_inv_phase_space/interface
|
||||
SUBDIRS += models/coherent_elastic
|
||||
SUBDIRS += models/cascade/evaporation
|
||||
SUBDIRS += models/cascade/utils
|
||||
SUBDIRS += models/cascade/cascade
|
||||
SUBDIRS += models/leading_particle
|
||||
|
||||
SUBLIBS = G4hadronic_mgt G4hadronic_util G4hadronic_proc
|
||||
SUBLIBS += G4hadronic_xsect G4hadronic_stop
|
||||
SUBLIBS += G4hadronic_neu G4hadronic_iso G4hadronic_HE G4hadronic_LE
|
||||
SUBLIBS += G4hadronic_deex G4hadronic_diffstring G4hadronic_HE_gen G4hadronic_kinetic
|
||||
SUBLIBS += G4hadronic_man_gen G4hadronic_preequ G4hadronic_radioactivedecay
|
||||
SUBLIBS += G4hadronic_qgstring G4hadronic_string_common
|
||||
SUBLIBS += G4hadronic_stringfrag G4hadronic_util_gen
|
||||
SUBLIBS = G4hadronic_mgt
|
||||
SUBLIBS += G4hadronic_util
|
||||
SUBLIBS += G4hadronic_proc
|
||||
SUBLIBS += G4hadronic_xsect
|
||||
SUBLIBS += G4hadronic_stop
|
||||
SUBLIBS += G4hadronic_neu
|
||||
SUBLIBS += G4hadronic_iso
|
||||
SUBLIBS += G4hadronic_HE
|
||||
SUBLIBS += G4hadronic_LE
|
||||
SUBLIBS += G4hadronic_deex
|
||||
SUBLIBS += G4hadronic_diffstring
|
||||
SUBLIBS += G4hadronic_HE_gen
|
||||
SUBLIBS += G4hadronic_kinetic
|
||||
SUBLIBS += G4hadronic_man_gen
|
||||
SUBLIBS += G4hadronic_preequ
|
||||
SUBLIBS += G4hadronic_radioactivedecay
|
||||
SUBLIBS += G4hadronic_qgstring
|
||||
SUBLIBS += G4hadronic_scattering
|
||||
SUBLIBS += G4hadronic_string_common
|
||||
SUBLIBS += G4hadronic_stringfrag
|
||||
SUBLIBS += G4hadronic_util_gen
|
||||
SUBLIBS += G4hadronic_body_ci
|
||||
SUBLIBS += G4hadronic_interface_ci
|
||||
SUBLIBS += G4hadronic_coherent_elastic
|
||||
SUBLIBS += G4hadronic_hetcpp_evaporation
|
||||
SUBLIBS += G4hadronic_hetcpp_utils
|
||||
SUBLIBS += G4hadronic_bert_cascade
|
||||
SUBLIBS += G4hadronic_leading_particle
|
||||
|
||||
ifndef G4INSTALL
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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: G4ElectroNuclearCrossSection.hh,v 1.7 2002/05/22 11:48:44 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4ElectroNuclearCrossSection.hh,v 1.8 2002/12/12 19:16:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4ElectroNuclearCrossSection -- header file
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronCrossSections.hh,v 1.7 2001/10/04 20:00:18 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4HadronCrossSections.hh,v 1.8 2002/12/12 19:16:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Hadron physics class -- header file
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
@@ -41,12 +41,13 @@ class G4NeutronInelasticCrossSection : public G4VCrossSectionDataSet
|
||||
public:
|
||||
|
||||
virtual
|
||||
G4bool IsApplicable(const G4DynamicParticle* aPart, const G4Element*)
|
||||
G4bool IsApplicable(const G4DynamicParticle* aPart, const G4Element* aEle)
|
||||
{
|
||||
G4bool result = false;
|
||||
if(( aPart->GetDefinition()==G4Neutron::Neutron()) &&
|
||||
( aPart->GetKineticEnergy()<20*GeV) &&
|
||||
aPart->GetKineticEnergy()>19.9*MeV) result = true;
|
||||
if(aEle->GetZ()<2) result = false;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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: G4PhotoNuclearCrossSection.hh,v 1.6 2002/05/22 11:48:45 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4PhotoNuclearCrossSection.hh,v 1.7 2002/12/12 19:16:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4PhotoNuclearCrossSection -- header file
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// by J.P Wellisch, Sun Sep 15 2002.
|
||||
|
||||
#ifndef G4PiData_h
|
||||
#define G4PiData_h
|
||||
|
||||
#include "g4std/vector"
|
||||
#include "g4std/algorithm"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4PiData : public G4std::vector<G4std::pair<G4double, G4std::pair<G4double, G4double > > >
|
||||
{
|
||||
public:
|
||||
G4PiData(const G4double * aTotal, const G4double * aInelastic, const G4double * anEnergy, G4int nPoints);
|
||||
struct Delete{void operator()(G4PiData * aP){delete aP;} };
|
||||
G4bool AppliesTo(G4double kineticEnergy);
|
||||
G4double ReactionXSection(G4double kineticEnergy);
|
||||
G4double ElasticXSection(G4double kineticEnergy);
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,135 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4PiNuclearCrossSection_h
|
||||
#define G4PiNuclearCrossSection_h
|
||||
|
||||
#include "G4VCrossSectionDataSet.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PiData.hh"
|
||||
|
||||
class G4PiNuclearCrossSection : public G4VCrossSectionDataSet
|
||||
{
|
||||
public:
|
||||
|
||||
G4PiNuclearCrossSection();
|
||||
virtual ~G4PiNuclearCrossSection();
|
||||
G4bool IsApplicable(const G4DynamicParticle* aParticle, const G4Element* anElement)
|
||||
{
|
||||
G4bool result = false;
|
||||
if(aParticle->GetDefinition() == G4PionMinus::PionMinus()) result=true;
|
||||
if(aParticle->GetDefinition() == G4PionPlus::PionPlus()) result=true;
|
||||
if(anElement->GetZ() == 1) result = false;
|
||||
return result;
|
||||
}
|
||||
G4double GetCrossSection(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement,
|
||||
G4double T=0.);
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&) {}
|
||||
void DumpPhysicsTable(const G4ParticleDefinition&) {}
|
||||
|
||||
private:
|
||||
G4double Interpolate(G4int Z1, G4int Z2, G4int Z, G4double x1, G4double x2);
|
||||
|
||||
// add Hydrogen from PDG group.
|
||||
|
||||
static const G4double e1[38];
|
||||
static const G4double he_t[38];
|
||||
static const G4double he_in[38];
|
||||
static const G4double be_m_t[38];
|
||||
static const G4double be_m_in[38];
|
||||
static const G4double be_p_t[24];
|
||||
static const G4double be_p_in[24];
|
||||
static const G4double e2[39];
|
||||
static const G4double c_m_t[39];
|
||||
static const G4double c_m_in[39];
|
||||
static const G4double c_p_t[24];
|
||||
static const G4double c_p_in[24];
|
||||
static const G4double n_m_t[39];
|
||||
static const G4double n_m_in[39];
|
||||
static const G4double n_p_t[27];
|
||||
static const G4double n_p_in[27];
|
||||
static const G4double e3[31];
|
||||
static const G4double o_m_t[31];
|
||||
static const G4double o_m_in[31];
|
||||
static const G4double o_p_t[20];
|
||||
static const G4double o_p_in[20];
|
||||
static const G4double na_m_t[31];
|
||||
static const G4double na_m_in[31];
|
||||
static const G4double na_p_t[22];
|
||||
static const G4double na_p_in[22];
|
||||
static const G4double e3_1[31];
|
||||
static const G4double al_m_t[31];
|
||||
static const G4double al_m_in[31];
|
||||
static const G4double al_p_t[21];
|
||||
static const G4double al_p_in[21];
|
||||
static const G4double ca_m_t[31];
|
||||
static const G4double ca_m_in[31];
|
||||
static const G4double ca_p_t[23];
|
||||
static const G4double ca_p_in[23];
|
||||
|
||||
static const G4double e4[32];
|
||||
static const G4double fe_m_t[32];
|
||||
static const G4double fe_m_in[32];
|
||||
static const G4double fe_p_t[25];
|
||||
static const G4double fe_p_in[25];
|
||||
static const G4double cu_m_t[32];
|
||||
static const G4double cu_m_in[32];
|
||||
static const G4double cu_p_t[25];
|
||||
static const G4double cu_p_in[25];
|
||||
static const G4double e5[34];
|
||||
static const G4double mo_m_t[34];
|
||||
static const G4double mo_m_in[34];
|
||||
static const G4double mo_p_t[27];
|
||||
static const G4double mo_p_in[27];
|
||||
static const G4double cd_m_t[34];
|
||||
static const G4double cd_m_in[34];
|
||||
static const G4double cd_p_t[28];
|
||||
static const G4double cd_p_in[28];
|
||||
static const G4double e6[35];
|
||||
static const G4double sn_m_t[35];
|
||||
static const G4double sn_m_in[35];
|
||||
static const G4double sn_p_t[29];
|
||||
static const G4double sn_p_in[29];
|
||||
static const G4double w_m_t[35];
|
||||
static const G4double w_m_in[35];
|
||||
static const G4double w_p_t[30];
|
||||
static const G4double w_p_in[30];
|
||||
static const G4double e7[35];
|
||||
static const G4double pb_m_t[35];
|
||||
static const G4double pb_m_in[35];
|
||||
static const G4double pb_p_t[30];
|
||||
static const G4double pb_p_in[30];
|
||||
static const G4double u_m_t[35];
|
||||
static const G4double u_m_in[35];
|
||||
static const G4double u_p_t[30];
|
||||
static const G4double u_p_in[30];
|
||||
|
||||
G4std::vector<G4int> theZ;
|
||||
G4std::vector<G4PiData *> thePipData;
|
||||
G4std::vector<G4PiData *> thePimData;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
@@ -41,11 +41,12 @@ class G4ProtonInelasticCrossSection : public G4VCrossSectionDataSet
|
||||
public:
|
||||
|
||||
virtual
|
||||
G4bool IsApplicable(const G4DynamicParticle* aPart, const G4Element*)
|
||||
G4bool IsApplicable(const G4DynamicParticle* aPart, const G4Element* aEle)
|
||||
{
|
||||
G4bool result = false;
|
||||
if(( aPart->GetDefinition()==G4Proton::Proton()) &&
|
||||
( aPart->GetKineticEnergy()<20*GeV) ) result = true;
|
||||
if(aEle->GetZ()<3) result = false;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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: G4ElectroNuclearCrossSection.cc,v 1.9 2002/05/28 13:37:03 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4ElectroNuclearCrossSection.cc,v 1.15 2002/12/12 19:16:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4ElectroNuclearCrossSection for gamma+A cross sections
|
||||
@@ -41,9 +41,9 @@
|
||||
#include "G4ElectroNuclearCrossSection.hh"
|
||||
|
||||
// Initialization of the
|
||||
G4double G4ElectroNuclearCrossSection::lastE=0; // Last used in the cross section TheEnergy
|
||||
G4double G4ElectroNuclearCrossSection::lastE=0.; // Last used in the cross section TheEnergy
|
||||
G4int G4ElectroNuclearCrossSection::lastF=0; // Last used in the cross section TheFirstBin
|
||||
G4double G4ElectroNuclearCrossSection::lastG=0; // Last used in the cross section TheGamma
|
||||
G4double G4ElectroNuclearCrossSection::lastG=0.; // Last used in the cross section TheGamma
|
||||
G4double G4ElectroNuclearCrossSection::lastH=0.; // Last value of the High Energy A-dependence
|
||||
G4double* G4ElectroNuclearCrossSection::lastJ1=0; // Pointer to the last array of the J1 function
|
||||
G4double* G4ElectroNuclearCrossSection::lastJ2=0; // Pointer to the last array of the J2 function
|
||||
@@ -118,7 +118,7 @@ G4double G4ElectroNuclearCrossSection::GetCrossSection(const G4DynamicParticle*
|
||||
#endif
|
||||
colN.push_back(targN);
|
||||
colZ.push_back(targZ);
|
||||
colF.push_back(targN);
|
||||
colF.push_back(lastF);
|
||||
J1.push_back(lastJ1);
|
||||
J2.push_back(lastJ2);
|
||||
J3.push_back(lastJ3);
|
||||
@@ -2321,8 +2321,12 @@ G4double G4ElectroNuclearCrossSection::GetEquivalentPhotonEnergy()
|
||||
G4double dlg1=lastG+lastG-1.;
|
||||
G4double lgoe=lastG/lastE;
|
||||
for(G4int i=lastF;i<=lastL;i++) Y[i]=dlg1*lastJ1[i]-lgoe*(lastJ2[i]+lastJ2[i]-lastJ3[i]/lastE);
|
||||
if(lastSig>Y[lastL]&&lastL<mL)
|
||||
G4cerr<<"***G4EleNucCrS::GetEquPhotE:S="<<lastSig<<">"<<Y[lastL]<<",l="<<lastL<<"<"<<mL<<G4endl;
|
||||
// @@ Tempory IF of H.P.: delete it if the *HP* err message does not show up M.K.@@
|
||||
if(lastSig>0.99*Y[lastL] && lastL<mL && Y[lastL]<1.E-30)
|
||||
{
|
||||
G4cerr<<"*HP*G4ElNucCS::GetEqPhotE:S="<<lastSig<<">"<<Y[lastL]<<",l="<<lastL<<">"<<mL<<G4endl;
|
||||
return 3.0*MeV; // quick and dirty workaround @@@ HP. (now can be not necessary M.K.)
|
||||
}
|
||||
G4double ris=lastSig*G4UniformRand(); // Sig can be > Y[lastL=mL], then it is in the func. region
|
||||
#ifdef debug
|
||||
G4cout<<"G4ElectroNuclearCrossSection::GetEquivalentPhotonEnergy: "<<ris<<",Y="<<Y[lastL]<<G4endl;
|
||||
@@ -2376,7 +2380,7 @@ G4double G4ElectroNuclearCrossSection::SolveTheEquation(G4double f)
|
||||
static const G4double eps=0.001; // Accuracy which satisfies the search
|
||||
G4double x=z+f/p/(lastG+lmel-z); // First guess
|
||||
#ifdef pdebug
|
||||
G4cout<<"SolveTheEq: e="<<eps<<",f="<<f<<",z="<<z<<",p="<<p<<",lastE="<<lastLE<<",x="<<x<<G4endl;
|
||||
G4cout<<"SolveTheEq: e="<<eps<<",f="<<f<<",z="<<z<<",p="<<p<<",lastG="<<lastG<<",x="<<x<<G4endl;
|
||||
#endif
|
||||
for(G4int i=0; i<imax; i++)
|
||||
{
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronCaptureDataSet.cc,v 1.4 2001/08/01 17:03:14 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4HadronCaptureDataSet.cc,v 1.5 2002/12/12 19:16:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: HadronCaptureDataSet for cross sections
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronCrossSections.cc,v 1.9 2002/06/18 10:07:16 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4HadronCrossSections.cc,v 1.10 2002/12/12 19:16:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// G4 Hadron Physics class G4HadronCrossSections
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronElasticDataSet.cc,v 1.4 2001/08/01 17:03:16 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4HadronElasticDataSet.cc,v 1.5 2002/12/12 19:16:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: HadronElasticDataSet for cross sections
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronFissionDataSet.cc,v 1.4 2001/08/01 17:03:16 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4HadronFissionDataSet.cc,v 1.5 2002/12/12 19:16:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: HadronFissionDataSet for cross sections
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronInelasticDataSet.cc,v 1.4 2001/08/01 17:03:17 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4HadronInelasticDataSet.cc,v 1.5 2002/12/12 19:16:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: HadronInelasticDataSet for cross sections
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,16 +14,16 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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: G4PhotoNuclearCrossSection.cc,v 1.7 2002/05/29 07:16:39 mkossov Exp $
|
||||
// $Id: G4PhotoNuclearCrossSection.cc,v 1.9 2002/12/12 19:16:52 gunter Exp $
|
||||
// The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4PhotoNuclearCrossSection for gamma+A cross sections
|
||||
@@ -131,6 +131,8 @@ G4double G4PhotoNuclearCrossSection::GetCrossSection(const G4DynamicParticle* aP
|
||||
#endif
|
||||
colN.push_back(targN);
|
||||
colZ.push_back(targZ);
|
||||
GDR.push_back(lastGDR); // added GDR, found by AH 10/7/02
|
||||
HEN.push_back(lastHEN); // added HEN, found by AH 10/7/02
|
||||
eTH.push_back(lastTH); // Threshold Energy
|
||||
spA.push_back(lastSP); // Pomeron Shadowing
|
||||
} // End of creation of the new set of parameters
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PiData.cc,v 1.5 2002/12/13 09:12:23 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// by J.P Wellisch, Sun Sep 15 2002.
|
||||
|
||||
#include "G4PiData.hh"
|
||||
|
||||
G4PiData::
|
||||
G4PiData(const G4double * aT, const G4double * aIn, const G4double * anE, G4int nP)
|
||||
{
|
||||
G4int i=0;
|
||||
for(i=0; i<nP; i++)
|
||||
{
|
||||
G4std::pair<G4double, G4double> x;
|
||||
x.first=aT[i]*millibarn;
|
||||
x.second=aIn[i]*millibarn;
|
||||
G4std::pair<G4double, G4std::pair<G4double, G4double > > aP;
|
||||
aP.first=anE[i]*GeV;
|
||||
aP.second=x;
|
||||
push_back(aP);
|
||||
}
|
||||
}
|
||||
|
||||
G4bool G4PiData::
|
||||
AppliesTo(G4double kineticEnergy)
|
||||
{
|
||||
G4bool result = true;
|
||||
if(kineticEnergy>back().first) result = false;
|
||||
return result;
|
||||
}
|
||||
|
||||
G4double G4PiData::
|
||||
ReactionXSection(G4double kineticEnergy)
|
||||
{
|
||||
G4double result = 0;
|
||||
G4PiData::iterator it=begin();
|
||||
while(it!=end()&&kineticEnergy>(*it).first) {it++;}
|
||||
if(it==end()) G4Exception("G4PiData used outside validity range");
|
||||
if(it==begin()) it++;
|
||||
G4double x1,x2,e1,e2;
|
||||
e1=(*(it-1)).first;
|
||||
x1=(*(it-1)).second.second;
|
||||
e2=(*(it)).first;
|
||||
x2=(*(it)).second.second;
|
||||
result = G4std::max(0., x1 + (kineticEnergy-e1)*(x2-x1)/(e2-e1));
|
||||
return result;
|
||||
}
|
||||
|
||||
G4double G4PiData::
|
||||
ElasticXSection(G4double kineticEnergy)
|
||||
{
|
||||
G4double result = 0;
|
||||
G4PiData::iterator it=begin();
|
||||
while(it!=end()&&kineticEnergy>(*it).first) {it++;}
|
||||
if(it==end()) G4Exception("G4PiData used outside validity range");
|
||||
if(it==begin()) it++;
|
||||
G4double x1,x2,e1,e2;
|
||||
e1=(*(it-1)).first;
|
||||
x1=(*(it-1)).second.first - (*(it-1)).second.second;
|
||||
e2=(*(it)).first;
|
||||
x2=(*(it)).second.first - (*(it)).second.second;
|
||||
result = G4std::max(0., x1 + (kineticEnergy-e1)*(x2-x1)/(e2-e1));
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,244 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
#include "G4PiNuclearCrossSection.hh"
|
||||
|
||||
// by J.P Wellisch, Sun Sep 15 2002.
|
||||
// Implements P2-90-158;
|
||||
|
||||
const G4double G4PiNuclearCrossSection::e1[38] = {0.02, 0.04, 0.06, 0.08, 0.1, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.22, 0.24, 0.26, 0.28, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.7, 0.8, 0.9, 1, 2, 3, 5, 10, 20, 50, 100, 500, 1000};
|
||||
const G4double G4PiNuclearCrossSection::he_t[38] = {40, 70, 108, 152, 208, 276, 300, 320, 329, 333, 332, 328, 322, 310, 288, 260, 240, 216, 196, 144, 125, 112, 108.5, 109, 110.5, 117, 123, 128.5, 135, 110, 96, 87, 85, 83.5, 83.5, 83.5, 83.5, 83.5};
|
||||
const G4double G4PiNuclearCrossSection::he_in[38] = {18, 38, 62, 98, 136, 176, 190, 200, 209, 212, 212, 208, 204, 196, 176, 164, 150, 134, 124, 97.5, 90, 85, 82.5, 83.5, 86.5, 93, 97.5, 100, 102, 83, 77, 75, 74, 72.5, 72.5, 72.5, 72.5, 72.5};
|
||||
const G4double G4PiNuclearCrossSection::be_m_t[38] = {150, 210, 294, 396, 520, 600, 623, 635, 642, 640, 630, 615, 600, 576, 540, 504, 470, 435, 400, 340, 294, 258, 236, 230, 233, 244, 257, 270, 276, 250, 230, 215, 205, 194, 188, 186, 186, 186};
|
||||
const G4double G4PiNuclearCrossSection::be_m_in[38] = {90, 126, 177, 240, 320, 380, 400, 410, 414, 410, 400, 387, 371, 360, 333, 312, 285, 260, 237, 216, 198, 187, 182, 180, 182, 187, 193, 203, 207, 179, 172, 165, 159, 155, 144, 144, 144, 144};
|
||||
const G4double G4PiNuclearCrossSection::be_p_t[24] = {96, 150, 222, 320, 430, 514, 545, 565, 574, 574, 564, 552, 535, 522, 490, 462, 432, 398, 367, 314, 276, 248, 232, 230};
|
||||
const G4double G4PiNuclearCrossSection::be_p_in[24] = {60, 95, 142, 194, 262, 319, 345, 361, 364, 364, 354, 350, 330, 319, 298, 280, 258, 237, 216, 200, 189, 183, 182, 180};
|
||||
const G4double G4PiNuclearCrossSection::e2[39] = {0.02, 0.04, 0.06, 0.08, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.2, 0.22, 0.24, 0.26, 0.28, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.575, 0.6, 0.7, 0.8, 0.9, 1, 2, 3, 5, 10, 20, 50, 100, 500, 1000};
|
||||
const G4double G4PiNuclearCrossSection::c_m_t[39] = {204, 260, 366, 517, 630, 673, 694, 704, 710, 711, 706, 694, 676, 648, 616, 584, 548, 518, 489, 426, 376, 342, 323, 310, 312, 313, 319, 333, 342, 348, 310, 290, 268, 250, 245, 237, 234, 234, 234};
|
||||
const G4double G4PiNuclearCrossSection::c_m_in[39] = {128, 160, 224, 315, 388, 416, 430, 438, 444, 445, 440, 432, 416, 400, 380, 354, 320, 304, 288, 264, 246, 240, 233, 232, 233, 234, 238, 246, 252, 256, 220, 210, 198, 187, 183, 176, 174, 174, 174};
|
||||
const G4double G4PiNuclearCrossSection::c_p_t[24] = {140, 192, 294, 428, 594, 642, 662, 687, 685, 688, 684, 672, 656, 630, 598, 567, 533, 504, 474, 416, 369, 336, 319, 310};
|
||||
const G4double G4PiNuclearCrossSection::c_p_in[24] = {94, 132, 184, 260, 370, 398, 408, 420, 426, 428, 424, 416, 400, 386, 366, 340, 308, 294, 280, 257, 241, 236, 231, 232};
|
||||
const G4double G4PiNuclearCrossSection::n_m_t[39] = {246, 308, 424, 590, 729, 776, 800, 821, 822, 817, 800, 778, 768, 728, 690, 654, 615, 584, 556, 480, 430, 393, 373, 367, 368, 370, 375, 388, 390, 397, 364, 337, 310, 291, 275, 268, 268, 268, 268};
|
||||
const G4double G4PiNuclearCrossSection::n_m_in[39] = {155, 188, 256, 360, 456, 492, 512, 526, 526, 520, 504, 491, 475, 450, 425, 396, 376, 360, 340, 300, 282, 270, 265, 265, 266, 268, 273, 280, 288, 288, 256, 237, 226, 218, 208, 202, 202, 202, 202};
|
||||
const G4double G4PiNuclearCrossSection::n_p_t[27] = {150, 212, 328, 500, 680, 735, 762, 781, 782, 779, 770, 748, 740, 706, 672, 633, 600, 569, 541, 467, 419, 385, 368, 364, 366, 368, 375};
|
||||
const G4double G4PiNuclearCrossSection::n_p_in[27] = {90, 140, 208, 300, 426, 467, 490, 504, 504, 500, 484, 474, 460, 437, 413, 381, 365, 350, 330, 292, 276, 267, 263, 264, 265, 267, 273};
|
||||
const G4double G4PiNuclearCrossSection::e3[31] = {0.02, 0.04, 0.06, 0.08, 0.1, 0.12, 0.14, 0.16, 0.18, 0.2, 0.22, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 2, 3, 5, 10, 20, 50, 100, 500, 1000};
|
||||
const G4double G4PiNuclearCrossSection::o_m_t[31] = {280, 360, 500, 685, 812, 861, 870, 865, 835, 800, 755, 700, 600, 537, 493, 468, 441, 436, 443, 449, 460, 463, 432, 385, 350, 325, 312, 307, 303, 303, 303};
|
||||
const G4double G4PiNuclearCrossSection::o_m_in[31] = {190, 207, 300, 420, 500, 540, 550, 542, 520, 490, 460, 423, 360, 339, 321, 314, 312, 314, 319, 324, 328, 330, 300, 275, 250, 240, 229, 225, 222, 222, 222};
|
||||
const G4double G4PiNuclearCrossSection::o_p_t[20] = {170, 240, 390, 570, 740, 818, 830, 822, 800, 765, 725, 675, 585, 525, 483, 458, 444, 447, 453, 449};
|
||||
const G4double G4PiNuclearCrossSection::o_p_in[20] = {100, 145, 240, 340, 470, 518, 530, 522, 505, 477, 448, 412, 350, 330, 316, 310, 308, 311, 317, 324};
|
||||
const G4double G4PiNuclearCrossSection::na_m_t[31] = {450, 545, 705, 910, 1020, 1075, 1087, 1080, 1042, 987, 943, 885, 790, 700, 650, 610, 585, 575, 585, 595, 600, 610, 556, 524, 494, 458, 445, 429, 427, 427, 427};
|
||||
const G4double G4PiNuclearCrossSection::na_m_in[31] = {275, 315, 413, 545, 620, 660, 670, 662, 630, 593, 570, 520, 465, 420, 410, 395, 390, 400, 410, 418, 420, 422, 372, 348, 330, 320, 310, 294, 292, 292, 292};
|
||||
const G4double G4PiNuclearCrossSection::na_p_t[22] = {210, 320, 530, 795, 960, 1035, 1050, 1040, 1007, 957, 918, 865, 773, 685, 636, 598, 575, 565, 578, 590, 598, 610};
|
||||
const G4double G4PiNuclearCrossSection::na_p_in[22] = {115, 210, 340, 495, 585, 630, 645, 637, 605, 572, 550, 505, 455, 410, 401, 388, 383, 393, 405, 414, 418, 422};
|
||||
|
||||
const G4double G4PiNuclearCrossSection::e3_1[31] = {.02, .04, .06, .08, .1, .12, .14, .16, .18, .2, .22, .25, .3, .35, .4, .45, .5, .6, .7, .8, .9, 1., 2., 3., 5., 10., 20., 50., 100., 500., 1000.};
|
||||
const G4double G4PiNuclearCrossSection::al_m_t[31] = {532, 637, 832, 1057, 1207, 1230, 1210, 1174, 1133, 1095, 1038, 970, 890, 807, 750, 710, 675, 665, 670, 673, 678, 682, 618, 574, 546, 520, 507, 495, 488, 488, 488};
|
||||
const G4double G4PiNuclearCrossSection::al_m_in[31] = {300, 360, 495, 665, 750, 765, 750, 730, 700, 660, 615, 570, 520, 490, 470, 450, 448, 450, 450, 452, 456, 460, 408, 392, 376, 356, 347, 338, 332, 332, 332};
|
||||
const G4double G4PiNuclearCrossSection::al_p_t[21] = {225, 350, 616, 945, 1122, 1175, 1157, 1128, 1088, 1045, 988, 935, 870, 787, 730, 690, 660, 652, 660, 668, 678};
|
||||
const G4double G4PiNuclearCrossSection::al_p_in[21] = {120, 238, 390, 610, 712, 735, 720, 703, 655, 635, 590, 550, 505, 475, 455, 438, 440, 445, 445, 450, 456};
|
||||
const G4double G4PiNuclearCrossSection::ca_m_t[31] = {800, 980, 1240, 1460, 1570, 1600, 1580, 1535, 1475, 1425, 1375, 1295, 1200, 1083, 1000, 948, 915, 895, 900, 908, 915, 922, 856, 795, 740, 705, 682, 660, 660, 660, 660};
|
||||
const G4double G4PiNuclearCrossSection::ca_m_in[31] = {470, 550, 620, 860, 955, 960, 920, 860, 820, 780, 740, 665, 637, 615, 600, 590, 600, 608, 610, 615, 550, 525, 510, 488, 470, 450, 450, 450, 450};
|
||||
const G4double G4PiNuclearCrossSection::ca_p_t[23] = {275, 445, 790, 1195, 1440, 1485, 1475, 1435, 1385, 1335, 1295, 1245, 1160, 1050, 970, 923, 895, 877, 887, 897, 904, 913, 855};
|
||||
const G4double G4PiNuclearCrossSection::ca_p_in[23] = {160, 315, 500, 745, 870, 905, 900, 860, 810, 770, 740, 710, 640, 617, 595, 585, 575, 575, 590, 600, 602, 608, 550};
|
||||
|
||||
const G4double G4PiNuclearCrossSection::e4[32] = {0.02, 0.04, 0.06, 0.08, 0.1, 0.12, 0.14, 0.16, 0.18, 0.2, 0.22, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.7, 0.8, 0.9, 1, 2, 3, 5, 10, 20, 50, 100, 500, 1000};
|
||||
const G4double G4PiNuclearCrossSection::fe_m_t[32] = {1175, 1363, 1670, 1950, 2050, 2040, 1975, 1886, 1834, 1773, 1720, 1635, 1474, 1380, 1269, 1225, 1182, 1162, 1159, 1162, 1178, 1190, 1197, 1102, 1035, 975, 945, 925, 905, 905, 905, 905};
|
||||
const G4double G4PiNuclearCrossSection::fe_m_in[32] = {625, 725, 910, 1180, 1275, 1250, 1200, 1150, 1100, 1040, 995, 925, 825, 810, 780, 760, 745, 740, 740, 740, 750, 760, 765, 690, 660, 635, 615, 600, 585, 585, 585, 585};
|
||||
const G4double G4PiNuclearCrossSection::fe_p_t[25] = {330, 575, 1010, 1500, 1837, 1875, 1820, 1751, 1691, 1636, 1690, 1450, 1396, 1305, 1219, 1190, 1148, 1138, 1134, 1144, 1163, 1175, 1183, 1198, 1135};
|
||||
const G4double G4PiNuclearCrossSection::fe_p_in[25] = {210, 410, 707, 1010, 1125, 1150, 1100, 1070, 1010, 960, 920, 776, 780, 760, 750, 740, 720, 725, 725, 730, 740, 750, 755, 690, 660};
|
||||
const G4double G4PiNuclearCrossSection::cu_m_t[32] = {1400, 1600, 1875, 2088, 2200, 2220, 2175, 2125, 2075, 2012, 1950, 1855, 1670, 1530, 1430, 1370, 1315, 1315, 1315, 1330, 1345, 1360, 1365, 1250, 1185, 1128, 1070, 1035, 1010, 1010, 1010, 1010};
|
||||
const G4double G4PiNuclearCrossSection::cu_m_in[32] = {725, 840, 1020, 1200, 1295, 1300, 1267, 1240, 1213, 1175, 1125, 1042, 950, 900, 860, 840, 830, 832, 835, 840, 850, 860, 865, 785, 735, 705, 680, 650, 630, 630, 630, 630};
|
||||
const G4double G4PiNuclearCrossSection::cu_p_t[25] = {355, 605, 1120, 1630, 1940, 2010, 2010, 1980, 1925, 1895, 1830, 1730, 1585, 1490, 1400, 1340, 1290, 1290, 1290, 1310, 1330, 1345, 1350, 1240, 1185};
|
||||
const G4double G4PiNuclearCrossSection::cu_p_in[25] = {230, 425, 780, 1025, 1155, 1190, 1190, 1180, 1125, 1100, 1050, 1000, 900, 870, 835, 815, 810, 812, 815, 825, 840, 850, 855, 780, 735};
|
||||
const G4double G4PiNuclearCrossSection::e5[34] = {0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.12, 0.14, 0.16, 0.18, 0.2, 0.22, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 2, 3, 5, 10, 20, 50, 100, 500, 1000};
|
||||
const G4double G4PiNuclearCrossSection::mo_m_t[34] = {2430, 2610, 2710, 2790, 2880, 2940, 2965, 2970, 2970, 2920, 2840, 2720, 2570, 2500, 2365, 2200, 2050, 1926, 1825, 1768, 1749, 1750, 1778, 1789, 1808, 1690, 1645, 1530, 1492, 1450, 1425, 1425, 1425, 1425};
|
||||
const G4double G4PiNuclearCrossSection::mo_m_in[34] = {925, 1125, 1250, 1375, 1500, 1600, 1680, 1750, 1770, 1730, 1660, 1580, 1500, 1450, 1330, 1250, 1190, 1140, 1100, 1075, 1075, 1070, 1088, 1095, 1110, 1035, 1005, 940, 917, 880, 860, 860, 860, 860};
|
||||
const G4double G4PiNuclearCrossSection::mo_p_t[27] = {410, 730, 1110, 1530, 1920, 2200, 2385, 2520, 2600, 2630, 2575, 2470, 2320, 2285, 2185, 2053, 1945, 1852, 1776, 1719, 1710, 1716, 1746, 1759, 1778, 1675, 1645};
|
||||
const G4double G4PiNuclearCrossSection::mo_p_in[27] = {270, 540, 825, 975, 1140, 1285, 1400, 1480, 1555, 1580, 1525, 1470, 1360, 1340, 1255, 1160, 1120, 1085, 1060, 1045, 1045, 1045, 1065, 1075, 1090, 1025, 1005};
|
||||
const G4double G4PiNuclearCrossSection::cd_m_t[34] = {3060, 3125, 3170, 3220, 3255, 3280, 3290, 3260, 3270, 3200, 3120, 3080, 3090, 2920, 2810, 2640, 2362, 2230, 2115, 2050, 2020, 2025, 2040, 2070, 2100, 1900, 1795, 1740, 1675, 1645, 1625, 1620, 1620, 1620};
|
||||
const G4double G4PiNuclearCrossSection::cd_m_in[34] = {1025, 1275, 1440, 1625, 1740, 1800, 1880, 1920, 1980, 1920, 1850, 1810, 1720, 1650, 1560, 1450, 1330, 1290, 1245, 1210, 1200, 1200, 1205, 1205, 1230, 1130, 1085, 1060, 1000, 985, 975, 970, 970, 970};
|
||||
const G4double G4PiNuclearCrossSection::cd_p_t[28] = {455, 780, 1170, 1700, 2120, 2400, 2600, 2720, 2820, 2840, 2800, 2760, 2720, 2640, 2560, 2450, 2252, 2130, 2035, 1985, 1970, 1975, 2005, 2035, 2070, 1880, 1785, 1740};
|
||||
const G4double G4PiNuclearCrossSection::cd_p_in[28] = {310, 580, 880, 1060, 1270, 1400, 1530, 1610, 1660, 1680, 1640, 1600, 1560, 1500, 1430, 1330, 1280, 1230, 1200, 1180, 1170, 1175, 1180, 1180, 1210, 1120, 1080, 1060};
|
||||
const G4double G4PiNuclearCrossSection::e6[35] = {0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.12, 0.14, 0.16, 0.8, 0.2, 0.22, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.7, 0.8, 0.9, 1, 2, 3, 5, 10, 20, 50, 100, 500, 1000};
|
||||
const G4double G4PiNuclearCrossSection::sn_m_t[35] = {3000, 3180, 3250, 3300, 3300, 3410, 3470, 3450, 3410, 3350, 3280, 3200, 3120, 3050, 2900, 2630, 2500, 2325, 2190, 2100, 2060, 2055, 2055, 2055, 2067, 2085, 2000, 1900, 1835, 1770, 1720, 1700, 1695, 1695, 1695};
|
||||
const G4double G4PiNuclearCrossSection::sn_m_in[35] = {1050, 1350, 1520, 1650, 1800, 1980, 2070, 2120, 2090, 2050, 1980, 1920, 1830, 1770, 1670, 1500, 1435, 1350, 1300, 1230, 1220, 1235, 1235, 1235, 1237, 1240, 1160, 1120, 1090, 1065, 1040, 1020, 1015, 1015, 1015};
|
||||
const G4double G4PiNuclearCrossSection::sn_p_t[29] = {465, 800, 1200, 1760, 2170, 2480, 2730, 2885, 2970, 2980, 2970, 2890, 2840, 2790, 2620, 2450, 2335, 2205, 2080, 2020, 2010, 1990, 1990, 2015, 2030, 2045, 1980, 1890, 1835};
|
||||
const G4double G4PiNuclearCrossSection::sn_p_in[29] = {315, 590, 880, 1220, 1460, 1580, 1700, 1770, 1810, 1810, 1800, 1730, 1680, 1630, 1530, 1400, 1335, 1270, 1210, 1180, 1190, 1190, 1190, 1205, 1210, 1210, 1150, 1115, 1090};
|
||||
const G4double G4PiNuclearCrossSection::w_m_t[35] = {5200, 5115, 5025, 4975, 4900, 4850, 4780, 4725, 4600, 4490, 4355, 4255, 4125, 4040, 3830, 3580, 3330, 3110, 2955, 2860, 2852, 2845, 2885, 2900, 2915, 2940, 2800, 2660, 2580, 2490, 2460, 2425, 2420, 2420, 2420};
|
||||
const G4double G4PiNuclearCrossSection::w_m_in[35] = {1450, 1850, 2100, 2350, 2550, 2700, 2825, 2900, 2850, 2750, 2630, 2525, 2400, 2300, 2200, 2070, 1880, 1770, 1715, 1680, 1680, 1680, 1685, 1690, 1700, 1720, 1635, 1560, 1530, 1460, 1440, 1410, 1410, 1410, 1410};
|
||||
const G4double G4PiNuclearCrossSection::w_p_t[30] = {480, 900, 1500, 2350, 3020, 3420, 3650, 3775, 3875, 3830, 3750, 3700, 3630, 3550, 3550, 3290, 3070, 2890, 2840, 2730, 2725, 2720, 2770, 2805, 2828, 2865, 2770, 2640, 2570, 2490};
|
||||
const G4double G4PiNuclearCrossSection::w_p_in[30] = {325, 680, 990, 1500, 1850, 2150, 2250, 2300, 2350, 233, 2280, 2230, 2200, 2120, 2130, 900, 1780, 1670, 1635, 1600, 1602, 1605, 1610, 1615, 1630, 1660, 1620, 1550, 1525, 1460};
|
||||
const G4double G4PiNuclearCrossSection::e7[35] = {0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.12, 0.14, 0.16, 0.18, 0.2, 0.22, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.7, 0.8, 0.9, 1, 2, 3, 5, 10, 20, 50, 100, 500, 1000};
|
||||
const G4double G4PiNuclearCrossSection::pb_m_t[35] = {5890, 5700, 5610, 5580, 5550, 5480, 5400, 5300, 5100, 4930, 4750, 4600, 4400, 4280, 4170, 3915, 3650, 3470, 3260, 3150, 3120, 3070, 3085, 3100, 3120, 3160, 3070, 2930, 2820, 2750, 2710, 2655, 2640, 2640, 2640};
|
||||
const G4double G4PiNuclearCrossSection::pb_m_in[35] = {1575, 2025, 2300, 2575, 2850, 3000, 3115, 3180, 3080, 2940, 2800, 2670, 2550, 2450, 2370, 2220, 2110, 2000, 1920, 1880, 1850, 1800, 1805, 1810, 1820, 1840, 1800, 1720, 1640, 1620, 1570, 1530, 1530, 1530, 1530};
|
||||
const G4double G4PiNuclearCrossSection::pb_p_t[30] = {515, 940, 1500, 2400, 3270, 3750, 4050, 4140, 4260, 4200, 4080, 3990, 3990, 3810, 3730, 3520, 3370, 3186, 3110, 3010, 2990, 2985, 3005, 3020, 3040, 3080, 3020, 2905, 2790, 2790};
|
||||
const G4double G4PiNuclearCrossSection::pb_p_in[30] = {348, 707, 1040, 1650, 2100, 2400, 2580, 2640, 2650, 2520, 2410, 230, 2250, 2190, 2130, 2000, 1930, 1870, 1830, 1790, 1770, 1765, 1775, 1780, 1790, 1800, 1775, 1710, 1620, 1620};
|
||||
const G4double G4PiNuclearCrossSection::u_m_t[35] = {7080, 6830, 6650, 6530, 6400, 6280, 6100, 5840, 5660, 5520, 5330, 5160, 4990, 4810, 4630, 4323, 4130, 3870, 3700, 3550, 3490, 3465, 3467, 3475, 3495, 3515, 3440, 3360, 3150, 3040, 2985, 2955, 2940, 2940, 2940};
|
||||
const G4double G4PiNuclearCrossSection::u_m_in[35] = {1740, 2220, 2500, 2820, 3080, 3300, 3420, 3500, 3420, 3330, 3200, 3060, 2940, 2850, 2710, 2470, 2380, 2250, 2160, 2080, 2040, 2045, 2047, 2050, 2055, 2060, 2010, 1980, 1830, 1780, 1735, 1710, 1700, 1700, 1700};
|
||||
const G4double G4PiNuclearCrossSection::u_p_t[30] = {485, 960, 1580, 2700, 3550, 4050, 4320, 4420, 4620, 4660, 4580, 4470, 4350, 4295, 4187, 3938, 3755, 3573, 3450, 3342, 3310, 3295, 3310, 3330, 3375, 3405, 3350, 3338, 3135, 3040};
|
||||
const G4double G4PiNuclearCrossSection::u_p_in[30] = {334, 720, 1020, 1560, 2100, 2300, 2550, 2700, 2880, 2880, 2760, 2660, 2550, 2510, 2430, 2270, 2130, 2060, 2000, 1970, 1950, 1950, 1960, 1960, 1970, 1980, 1950, 1978, 1830, 1780};
|
||||
|
||||
G4PiNuclearCrossSection::
|
||||
G4PiNuclearCrossSection()
|
||||
{
|
||||
thePimData.push_back(new G4PiData(he_t, he_in, e1, 38));
|
||||
thePipData.push_back(new G4PiData(he_t, he_in, e1, 38));
|
||||
thePimData.push_back(new G4PiData(be_m_t, be_m_in, e1, 38));
|
||||
thePipData.push_back(new G4PiData(be_p_t, be_p_in, e1, 24));
|
||||
thePimData.push_back(new G4PiData(c_m_t, c_m_in, e2, 39));
|
||||
thePipData.push_back(new G4PiData(c_p_t, c_p_in, e2, 24));
|
||||
thePimData.push_back(new G4PiData(n_m_t, n_m_in, e2, 39));
|
||||
thePipData.push_back(new G4PiData(n_p_t, n_p_in, e2, 27));
|
||||
thePimData.push_back(new G4PiData(o_m_t, o_m_in, e3, 31));
|
||||
thePipData.push_back(new G4PiData(o_p_t, o_p_in, e3, 20));
|
||||
thePimData.push_back(new G4PiData(na_m_t, na_m_in, e3, 31));
|
||||
thePipData.push_back(new G4PiData(na_p_t, na_p_in, e3, 22));
|
||||
thePimData.push_back(new G4PiData(al_m_t, al_m_in, e3_1, 31));
|
||||
thePipData.push_back(new G4PiData(al_p_t, al_p_in, e3_1, 21));
|
||||
thePimData.push_back(new G4PiData(ca_m_t, ca_m_in, e3_1, 31));
|
||||
thePipData.push_back(new G4PiData(ca_p_t, ca_p_in, e3_1, 23));
|
||||
thePimData.push_back(new G4PiData(fe_m_t, fe_m_in, e4, 32));
|
||||
thePipData.push_back(new G4PiData(fe_p_t, fe_p_in, e4, 25));
|
||||
thePimData.push_back(new G4PiData(cu_m_t, cu_m_in, e4, 32));
|
||||
thePipData.push_back(new G4PiData(cu_p_t, cu_p_in, e4, 25));
|
||||
thePimData.push_back(new G4PiData(mo_m_t, mo_m_in, e5, 34));
|
||||
thePipData.push_back(new G4PiData(mo_p_t, mo_p_in, e5, 27));
|
||||
thePimData.push_back(new G4PiData(cd_m_t, cd_m_in, e5, 34));
|
||||
thePipData.push_back(new G4PiData(cd_p_t, cd_p_in, e5, 28));
|
||||
thePimData.push_back(new G4PiData(sn_m_t, sn_m_in, e6, 35));
|
||||
thePipData.push_back(new G4PiData(sn_p_t, sn_p_in, e6, 29));
|
||||
thePimData.push_back(new G4PiData(w_m_t, w_m_in, e6, 35));
|
||||
thePipData.push_back(new G4PiData(w_p_t, w_p_in, e6, 30));
|
||||
thePimData.push_back(new G4PiData(pb_m_t, pb_m_in, e7, 35));
|
||||
thePipData.push_back(new G4PiData(pb_p_t, pb_p_in, e7, 30));
|
||||
thePimData.push_back(new G4PiData(u_m_t, u_m_in, e7, 35));
|
||||
thePipData.push_back(new G4PiData(u_p_t, u_p_in, e7, 30));
|
||||
|
||||
theZ.push_back(2); // He
|
||||
theZ.push_back(4); // Be
|
||||
theZ.push_back(6); // C
|
||||
theZ.push_back(7); // N
|
||||
theZ.push_back(8); // O
|
||||
theZ.push_back(11); // Na
|
||||
theZ.push_back(13); // Al
|
||||
theZ.push_back(20); // Ca
|
||||
theZ.push_back(26); // Fe
|
||||
theZ.push_back(29); // Cu
|
||||
theZ.push_back(42); // Mo
|
||||
theZ.push_back(48); // Cd
|
||||
theZ.push_back(50); // Sn
|
||||
theZ.push_back(74); // W
|
||||
theZ.push_back(82); // Pb
|
||||
theZ.push_back(92); // U
|
||||
|
||||
}
|
||||
|
||||
G4PiNuclearCrossSection::
|
||||
~G4PiNuclearCrossSection()
|
||||
{
|
||||
G4std::for_each(thePimData.begin(), thePimData.end(), G4PiData::Delete());
|
||||
G4std::for_each(thePipData.begin(), thePipData.end(), G4PiData::Delete());
|
||||
}
|
||||
|
||||
G4double G4PiNuclearCrossSection::
|
||||
GetCrossSection(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement,
|
||||
G4double T)
|
||||
{
|
||||
// precondition
|
||||
G4bool ok = false;
|
||||
if(aParticle->GetDefinition() == G4PionMinus::PionMinus()) ok=true;
|
||||
if(aParticle->GetDefinition() == G4PionPlus::PionPlus()) ok=true;
|
||||
if(!ok) G4Exception("Call to G4PiNuclearCrossSection failed.");
|
||||
G4double charge = aParticle->GetDefinition()->GetPDGCharge();
|
||||
G4double kineticEnergy = aParticle->GetKineticEnergy();
|
||||
|
||||
// body
|
||||
G4double result = 0;
|
||||
G4int Z=static_cast<G4int>(anElement->GetZ()+.001);
|
||||
size_t it=0;
|
||||
while(it<theZ.size() && Z>theZ[it]) it++;
|
||||
if(Z > theZ[it])
|
||||
{
|
||||
G4Exception("Error: Calling G4PiNuclearCrossSection outside parametrization");
|
||||
}
|
||||
G4int Z1, Z2;
|
||||
G4double x1, x2;
|
||||
if(charge<0)
|
||||
{
|
||||
if(theZ[it]==Z)
|
||||
{
|
||||
result = thePimData[it]->ReactionXSection(kineticEnergy);
|
||||
}
|
||||
else
|
||||
{
|
||||
x1 = thePimData[it-1]->ReactionXSection(kineticEnergy);
|
||||
Z1 = theZ[it-1];
|
||||
x2 = thePimData[it]->ReactionXSection(kineticEnergy);
|
||||
Z2 = theZ[it];
|
||||
result = Interpolate(Z1, Z2, Z, x1, x2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(theZ[it]==Z)
|
||||
{
|
||||
G4std::vector<G4PiData *> * theData = &thePimData;
|
||||
if(thePipData[it]->AppliesTo(kineticEnergy))
|
||||
{
|
||||
theData = &thePipData;
|
||||
}
|
||||
result = theData->operator[](it)->ReactionXSection(kineticEnergy);
|
||||
}
|
||||
else
|
||||
{
|
||||
G4std::vector<G4PiData *> * theLData = &thePimData;
|
||||
if(thePipData[it-1]->AppliesTo(kineticEnergy))
|
||||
{
|
||||
theLData = &thePipData;
|
||||
}
|
||||
G4std::vector<G4PiData *> * theHData = &thePimData;
|
||||
if(thePipData[it]->AppliesTo(kineticEnergy))
|
||||
{
|
||||
theHData = &thePipData;
|
||||
}
|
||||
x1 = theLData->operator[](it-1)->ReactionXSection(kineticEnergy);
|
||||
Z1 = theZ[it-1];
|
||||
x2 = theHData->operator[](it)->ReactionXSection(kineticEnergy);
|
||||
Z2 = theZ[it];
|
||||
result = Interpolate(Z1, Z2, Z, x1, x2);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
G4double G4PiNuclearCrossSection::
|
||||
Interpolate(G4int Z1, G4int Z2, G4int Z, G4double x1, G4double x2)
|
||||
{
|
||||
G4double result = 0;
|
||||
G4double r1 = x1/pow(Z1, 2./3.)*pow(Z, 2./3.);
|
||||
G4double r2 = x2/pow(Z2, 2./3.)*pow(Z, 2./3.);
|
||||
result = (r1+r2)/2.;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VCrossSectionDataSet.cc,v 1.4 2001/08/01 17:03:18 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4VCrossSectionDataSet.cc,v 1.5 2002/12/12 19:16:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics abstract class: G4VCrossSectionDataSet
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4EnergyRangeManager.hh,v 1.4 2001/08/01 17:03:23 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4EnergyRangeManager.hh,v 1.5 2002/12/12 19:16:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// Hadronic Process: Energy Range Manager
|
||||
// original by H.P. Wellisch
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4HadLeadBias.hh,v 1.3 2002/12/13 09:06:26 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4HadLeadBias_h
|
||||
#define G4HadLeadBias_h
|
||||
|
||||
#include "G4VLeadingParticleBiasing.hh"
|
||||
#include "g4std/vector"
|
||||
#include "G4VParticleChange.hh"
|
||||
|
||||
class G4HadLeadBias : public G4VLeadingParticleBiasing
|
||||
{
|
||||
public:
|
||||
virtual G4VParticleChange * Bias(G4VParticleChange * result);
|
||||
virtual ~G4HadLeadBias() {};
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
@@ -82,7 +82,7 @@
|
||||
G4VParticleChange *PostStepDoIt(
|
||||
const G4Track &aTrack, const G4Step &aStep )
|
||||
{
|
||||
if(0==theLastCrossSection)
|
||||
if(0==theLastCrossSection&&!getenv("DebugNeutronHP"))
|
||||
{
|
||||
G4cerr << "G4HadronInelasticProcess: called for final state, while cross-section was zero"<<G4endl;
|
||||
G4cerr << " Returning empty particle change...."<<G4endl;
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronicInteraction.hh,v 1.8 2001/11/26 16:28:18 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4HadronicInteraction.hh,v 1.10 2002/12/12 19:16:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// Hadronic Interaction abstract base class
|
||||
// This class is the base class for the model classes.
|
||||
@@ -67,7 +67,9 @@
|
||||
}
|
||||
|
||||
virtual ~G4HadronicInteraction()
|
||||
{ }
|
||||
{
|
||||
G4HadronicInteractionRegistry::RemoveMe(this);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
@@ -34,7 +34,7 @@ class G4HadronicInteractionRegistry
|
||||
~G4HadronicInteractionRegistry();
|
||||
|
||||
static void RegisterMe(G4HadronicInteraction * aModel);
|
||||
static void RemoveMe(G4HadronicInteraction * aModel){};
|
||||
static void RemoveMe(G4HadronicInteraction * aModel);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "g4std/vector"
|
||||
#include "G4VIsotopeProduction.hh"
|
||||
#include "G4IsoParticleChange.hh"
|
||||
#include "G4HadLeadBias.hh"
|
||||
|
||||
class G4HadronicProcess : public G4VDiscreteProcess
|
||||
{
|
||||
@@ -58,10 +59,16 @@
|
||||
|
||||
G4HadronicProcess( const G4String &processName = "Hadronic" ) :
|
||||
G4VDiscreteProcess( processName )
|
||||
{ isoIsOnAnyway = 0; }
|
||||
{
|
||||
isoIsOnAnyway = 0;
|
||||
theBias = new G4HadLeadBias();
|
||||
}
|
||||
|
||||
virtual ~G4HadronicProcess()
|
||||
{ unsigned int i; for(i=0; i<theProductionModels.size(); i++) delete theProductionModels[i]; }
|
||||
{
|
||||
unsigned int i; for(i=0; i<theProductionModels.size(); i++) delete theProductionModels[i];
|
||||
delete theBias;
|
||||
}
|
||||
|
||||
inline void RegisterMe( G4HadronicInteraction *a )
|
||||
{ GetManagerPointer()->RegisterMe( a ); }
|
||||
@@ -155,6 +162,8 @@
|
||||
|
||||
G4IsoParticleChange theIsoPC;
|
||||
G4std::vector<G4VIsotopeProduction *> theProductionModels;
|
||||
|
||||
G4VLeadingParticleBiasing * theBias;
|
||||
|
||||
static G4IsoParticleChange * theIsoResult;
|
||||
static G4IsoParticleChange * theOldIsoResult;
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4InelasticInteraction.hh,v 1.6 2001/12/07 11:18:38 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4InelasticInteraction.hh,v 1.7 2002/12/12 19:16:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// Hadronic Process: Inelastic Interaction
|
||||
// This class is an abstract base class, since the pure virtual
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VLeadingParticleBiasing.hh,v 1.3 2002/12/13 09:06:26 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VLeadingParticleBiasing_h
|
||||
#define G4VLeadingParticleBiasing_h
|
||||
|
||||
class G4VParticleChange;
|
||||
|
||||
class G4VLeadingParticleBiasing
|
||||
{
|
||||
public:
|
||||
|
||||
virtual G4VParticleChange * Bias(G4VParticleChange * result) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -14,15 +14,15 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4EnergyRangeManager.cc,v 1.6 2002/06/07 15:30:53 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4EnergyRangeManager.cc,v 1.7 2002/12/12 19:16:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// Hadronic Process: Energy Range Manager
|
||||
// original by H.P. Wellisch
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
#include "G4HadLeadBias.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4PionZero.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4ParticleChange.hh"
|
||||
|
||||
G4VParticleChange * G4HadLeadBias::Bias(G4VParticleChange * result)
|
||||
{
|
||||
G4cerr << "bias enter"<<G4endl;
|
||||
G4int nMeson(0), nBaryon(0), npi0(0), ngamma(0), nLepton(0);
|
||||
G4int i(0);
|
||||
G4int maxE = -1;
|
||||
G4double emax = 0;
|
||||
G4ParticleChange * temp;
|
||||
if(result->GetStatusChange()==fAlive)
|
||||
{
|
||||
temp = dynamic_cast<G4ParticleChange *>(result);
|
||||
if(temp) emax = temp->GetEnergyChange();
|
||||
}
|
||||
G4cout << "max energy "<<G4endl;
|
||||
for(i=0;i<result->GetNumberOfSecondaries();i++)
|
||||
{
|
||||
if(result->GetSecondary(i)->GetKineticEnergy()>emax)
|
||||
{
|
||||
maxE = i;
|
||||
emax = result->GetSecondary(i)->GetKineticEnergy();
|
||||
}
|
||||
}
|
||||
G4cout <<"loop1"<<G4endl;
|
||||
for(i=0; i<result->GetNumberOfSecondaries(); i++)
|
||||
{
|
||||
G4Track* aSecTrack = result->GetSecondary(i);
|
||||
if(i==maxE)
|
||||
{
|
||||
}
|
||||
else if(aSecTrack->GetDefinition()->GetBaryonNumber()!=0)
|
||||
{
|
||||
nBaryon++;
|
||||
}
|
||||
else if(aSecTrack->GetDefinition()->GetLeptonNumber()!=0)
|
||||
{
|
||||
nLepton++;
|
||||
}
|
||||
else if(aSecTrack->GetDefinition()==G4Gamma::Gamma())
|
||||
{
|
||||
ngamma++;
|
||||
}
|
||||
else if(aSecTrack->GetDefinition()==G4PionZero::PionZero())
|
||||
{
|
||||
npi0++;
|
||||
}
|
||||
else
|
||||
{
|
||||
nMeson++;
|
||||
}
|
||||
}
|
||||
G4cout << "BiasDebug 1 = "<<result->GetNumberOfSecondaries()<<" "
|
||||
<<nMeson<<" "<< nBaryon<<" "<< npi0<<" "<< ngamma<<" "<< nLepton<<G4endl;
|
||||
G4double mesonWeight = nMeson;
|
||||
G4double baryonWeight = nBaryon;
|
||||
G4double gammaWeight = ngamma;
|
||||
G4double npi0Weight = npi0;
|
||||
G4double leptonWeight = nLepton;
|
||||
G4int randomMeson = static_cast<G4int>((nMeson+1)*G4UniformRand());
|
||||
G4int randomBaryon = static_cast<G4int>((nBaryon+1)*G4UniformRand());
|
||||
G4int randomGamma = static_cast<G4int>((ngamma+1)*G4UniformRand());
|
||||
G4int randomPi0 = static_cast<G4int>((npi0+1)*G4UniformRand());
|
||||
G4int randomLepton = static_cast<G4int>((nLepton+1)*G4UniformRand());
|
||||
|
||||
G4std::vector<G4Track*> buffer;
|
||||
G4int cMeson(0), cBaryon(0), cpi0(0), cgamma(0), cLepton(0);
|
||||
for(i=0; i<result->GetNumberOfSecondaries(); i++)
|
||||
{
|
||||
G4bool aCatch = false;
|
||||
G4double weight = 1;
|
||||
G4Track* aSecTrack = result->GetSecondary(i);
|
||||
if(i==maxE)
|
||||
{
|
||||
aCatch = true;
|
||||
weight = 1;
|
||||
}
|
||||
else if(aSecTrack->GetDefinition()->GetBaryonNumber()!=0)
|
||||
{
|
||||
if(++cBaryon==randomBaryon)
|
||||
{
|
||||
aCatch = true;
|
||||
weight = baryonWeight;
|
||||
}
|
||||
}
|
||||
else if(aSecTrack->GetDefinition()->GetLeptonNumber()!=0)
|
||||
{
|
||||
if(++cLepton==randomLepton)
|
||||
{
|
||||
aCatch = true;
|
||||
weight = leptonWeight;
|
||||
}
|
||||
}
|
||||
else if(aSecTrack->GetDefinition()==G4Gamma::Gamma())
|
||||
{
|
||||
if(++cgamma==randomGamma)
|
||||
{
|
||||
aCatch = true;
|
||||
weight = gammaWeight;
|
||||
}
|
||||
}
|
||||
else if(aSecTrack->GetDefinition()==G4PionZero::PionZero())
|
||||
{
|
||||
if(++cpi0==randomPi0)
|
||||
{
|
||||
aCatch = true;
|
||||
weight = npi0Weight;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(++cMeson==randomMeson)
|
||||
{
|
||||
aCatch = true;
|
||||
weight = mesonWeight;
|
||||
}
|
||||
}
|
||||
if(aCatch)
|
||||
{
|
||||
buffer.push_back(aSecTrack);
|
||||
aSecTrack->SetWeight(aSecTrack->GetWeight()*weight);
|
||||
}
|
||||
else
|
||||
{
|
||||
delete aSecTrack;
|
||||
}
|
||||
}
|
||||
result->Clear();
|
||||
result->SetNumberOfSecondaries(buffer.size());
|
||||
// G4cerr << "pre"<<G4endl;
|
||||
for(i=0;i<static_cast<G4int>(buffer.size());i++)
|
||||
{
|
||||
result->AddSecondary(buffer[i]);
|
||||
}
|
||||
G4cerr << "bias exit"<<G4endl;
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
@@ -32,11 +32,18 @@ RegisterMe(G4HadronicInteraction * aModel)
|
||||
theRegistry.AddModel(aModel);
|
||||
}
|
||||
|
||||
void G4HadronicInteractionRegistry::
|
||||
RemoveMe(G4HadronicInteraction * aModel)
|
||||
{
|
||||
theRegistry.allModels.erase(G4std::find(theRegistry.allModels.begin(), theRegistry.allModels.end(), aModel));
|
||||
theRegistry.nModels = theRegistry.allModels.size();
|
||||
}
|
||||
|
||||
G4HadronicInteractionRegistry::~G4HadronicInteractionRegistry()
|
||||
{
|
||||
for(G4int i=0; i<nModels; i++)
|
||||
while(allModels.size()!=0)
|
||||
{
|
||||
delete allModels[i];
|
||||
delete allModels.front();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
@@ -125,6 +125,7 @@
|
||||
result = DoIsotopeCounting(result, aTrack, targetNucleus);
|
||||
}
|
||||
}
|
||||
if(getenv("LeadingParticleBiasingActivated")) result = theBias->Bias(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * 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. *
|
||||
@@ -207,30 +207,37 @@
|
||||
// original was an anti-particle and annihilation has taken place
|
||||
annihilation = true;
|
||||
G4double ekcor = 1.0;
|
||||
G4double ek = originalIncident->GetKineticEnergy()/GeV;
|
||||
const G4double tarmas = originalTarget->GetDefinition()->GetPDGMass()/GeV;
|
||||
if( ek > 1.0 )ekcor = 1./ek;
|
||||
G4double ek = originalIncident->GetKineticEnergy();
|
||||
G4double ekOrg = ek;
|
||||
|
||||
const G4double tarmas = originalTarget->GetDefinition()->GetPDGMass();
|
||||
if( ek > 1.0*GeV )ekcor = 1./(ek/GeV);
|
||||
const G4double atomicWeight = targetNucleus.GetN();
|
||||
// ek = 2*tarmas + ek*(1.+ekcor/atomicWeight);
|
||||
modifiedOriginal.SetKineticEnergy( ek*GeV );
|
||||
ek = 2*tarmas + ek*(1.+ekcor/atomicWeight);
|
||||
|
||||
G4double tkin = targetNucleus.Cinema( ek );
|
||||
ek += tkin;
|
||||
ekOrg += tkin;
|
||||
modifiedOriginal.SetKineticEnergy( ekOrg );
|
||||
|
||||
//
|
||||
// evaporation -- re-calculate black track energies
|
||||
// this was Done already just before the cascade
|
||||
//
|
||||
G4double tkin = targetNucleus.EvaporationEffects( ek*GeV )/GeV;
|
||||
ek -= tkin;
|
||||
ek = G4std::max( 0.0001, ek );
|
||||
modifiedOriginal.SetKineticEnergy( ek*GeV );
|
||||
G4double amas = originalIncident->GetDefinition()->GetPDGMass()/GeV;
|
||||
G4double et = ek + amas;
|
||||
tkin = targetNucleus.EvaporationEffects( ek );
|
||||
ekOrg -= tkin;
|
||||
ekOrg = G4std::max( 0.0001*GeV, ekOrg );
|
||||
modifiedOriginal.SetKineticEnergy( ekOrg );
|
||||
G4double amas = originalIncident->GetDefinition()->GetPDGMass();
|
||||
G4double et = ekOrg + amas;
|
||||
G4double p = sqrt( abs(et*et-amas*amas) );
|
||||
G4double pp = modifiedOriginal.GetMomentum().mag()/GeV;
|
||||
G4double pp = modifiedOriginal.GetMomentum().mag();
|
||||
if( pp > 0.0 )
|
||||
{
|
||||
G4ThreeVector momentum = modifiedOriginal.GetMomentum();
|
||||
modifiedOriginal.SetMomentum( momentum * (p/pp) );
|
||||
}
|
||||
if( ek <= 0.0001 )
|
||||
if( ekOrg <= 0.0001 )
|
||||
{
|
||||
modifiedOriginal.SetKineticEnergy( 0.0 );
|
||||
modifiedOriginal.SetMomentum( 0.0, 0.0, 0.0 );
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.9 2002/06/13 18:02:03 jwellisc Exp $
|
||||
# $Id: GNUmakefile,v 1.10 2002/11/16 17:07:21 hpw Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for hadronic models library. G.Folger 10-Dec-97
|
||||
# --------------------------------------------------------------
|
||||
@@ -16,6 +16,7 @@ SUBDIRS += generator/kinetic_model
|
||||
SUBDIRS += generator/management
|
||||
SUBDIRS += generator/pre_equilibrium
|
||||
SUBDIRS += generator/quark_gluon_string
|
||||
SUBDIRS += generator/scattering
|
||||
SUBDIRS += generator/string_common
|
||||
SUBDIRS += generator/string_fragmentation
|
||||
SUBDIRS += generator/util
|
||||
@@ -25,18 +26,31 @@ SUBDIRS += chiral_inv_phase_space/interface
|
||||
SUBDIRS += coherent_elastic
|
||||
SUBDIRS += cascade/evaporation
|
||||
SUBDIRS += cascade/utils
|
||||
SUBDIRS += cascade/cascade
|
||||
SUBDIRS += leading_particle
|
||||
|
||||
SUBLIBS = G4hadronic_HE G4hadronic_LE G4hadronic_neu G4hadronic_iso
|
||||
SUBLIBS += G4hadronic_deex G4hadronic_diffstring G4hadronic_HE_gen G4hadronic_kinetic
|
||||
SUBLIBS += G4hadronic_man_gen G4hadronic_preequ G4hadronic_radioactivedecay
|
||||
SUBLIBS += G4hadronic_qgstring G4hadronic_string_common
|
||||
SUBLIBS += G4hadronic_stringfrag G4hadronic_util_gen
|
||||
SUBLIBS = G4hadronic_HE
|
||||
SUBLIBS += G4hadronic_LE
|
||||
SUBLIBS += G4hadronic_neu
|
||||
SUBLIBS += G4hadronic_iso
|
||||
SUBLIBS += G4hadronic_deex
|
||||
SUBLIBS += G4hadronic_diffstring
|
||||
SUBLIBS += G4hadronic_HE_gen
|
||||
SUBLIBS += G4hadronic_kinetic
|
||||
SUBLIBS += G4hadronic_man_gen
|
||||
SUBLIBS += G4hadronic_preequ
|
||||
SUBLIBS += G4hadronic_radioactivedecay
|
||||
SUBLIBS += G4hadronic_qgstring
|
||||
SUBLIBS += G4hadronic_scattering
|
||||
SUBLIBS += G4hadronic_string_common
|
||||
SUBLIBS += G4hadronic_stringfrag
|
||||
SUBLIBS += G4hadronic_util_gen
|
||||
SUBLIBS += G4hadronic_body_ci
|
||||
SUBLIBS += G4hadronic_interface_ci
|
||||
SUBLIBS += G4hadronic_coherent_elastic
|
||||
SUBLIBS += G4hadronic_hetcpp_evaporation
|
||||
SUBLIBS += G4hadronic_hetcpp_utils
|
||||
SUBLIBS += G4hadronic_bert_cascade
|
||||
SUBLIBS += G4hadronic_leading_particle
|
||||
|
||||
ifndef G4INSTALL
|
||||
|
||||
@@ -6,9 +6,11 @@ name := G4hadronic_hetcpp
|
||||
|
||||
SUBDIRS = evaporation
|
||||
SUBDIRS += utils
|
||||
SUBDIRS += cascade
|
||||
|
||||
SUBLIBS = G4hadronic_hetcpp_evaporation
|
||||
SUBLIBS += G4hadronic_hetcpp_utils
|
||||
SUBLIBS += G4hadronic_bert_cascade
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../../../..
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
The code below will be a prototype for a high energy transport code (HETC++).
|
||||
For more detailed documentation see doc-directory and the HETC home page at
|
||||
http://cmsdoc.cern.ch/~miheikki/hetc/.
|
||||
|
||||
If you have any questions please simply send mail to
|
||||
Aatos.Heikkinen@cern.ch.
|
||||
@@ -0,0 +1,43 @@
|
||||
# $Id: GNUmakefile,v 1.7 2002/12/03 11:33:52 gcosmo Exp $
|
||||
# -----------------------------------------------------------
|
||||
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
|
||||
# -----------------------------------------------------------
|
||||
|
||||
name := G4hadronic_bert_cascade
|
||||
|
||||
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/management/include \
|
||||
-I$(G4BASE)/processes/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/management/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/processes/include \
|
||||
-I$(G4BASE)/processes/hadronic/cross_sections/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/de_excitation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/pre_equilibrium/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/diffractive_string/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/cascade/cascade/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/cascade/utils/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,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. *
|
||||
// ********************************************************************
|
||||
#ifndef G4ANALYSER_HH
|
||||
#define G4ANALYSER_HH
|
||||
|
||||
#define WITH_NUCLEI
|
||||
|
||||
#include "G4CollisionOutput.hh"
|
||||
//#include "G4InuclParticle.hh"
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
#include "G4InuclNuclei.hh"
|
||||
#include "G4NuclWatcher.hh"
|
||||
//#include "G4ExitonConfiguration.hh"
|
||||
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4Analyser {
|
||||
|
||||
public:
|
||||
|
||||
G4Analyser();
|
||||
void setInelCsec(G4double csec,
|
||||
G4bool withn);
|
||||
void setWatchers(const G4std::vector<G4NuclWatcher>& watchers);
|
||||
void try_watchers(G4double a,
|
||||
G4double z,
|
||||
G4bool if_nucl);
|
||||
void analyse(const G4CollisionOutput& output);
|
||||
void printResults();
|
||||
void printResultsSimple();
|
||||
void handleWatcherStatistics();
|
||||
void printResultsNtuple();
|
||||
|
||||
private:
|
||||
|
||||
G4int verboseLevel;
|
||||
G4double eventNumber;
|
||||
G4double averageMultiplicity;
|
||||
G4double averageProtonNumber;
|
||||
G4double averageNeutronNumber;
|
||||
G4double averagePionNumber;
|
||||
G4double averageNucleonKinEnergy;
|
||||
G4double averageProtonKinEnergy;
|
||||
G4double averageNeutronKinEnergy;
|
||||
G4double averagePionKinEnergy;
|
||||
G4double averageExitationEnergy;
|
||||
G4double averageNucleiFragments;
|
||||
G4double fissy_prob;
|
||||
G4double averagePionPl;
|
||||
G4double averagePionMin;
|
||||
G4double averagePion0;
|
||||
G4double averageA;
|
||||
G4double averageZ;
|
||||
G4std::vector<G4NuclWatcher> ana_watchers;
|
||||
G4double inel_csec;
|
||||
G4bool withNuclei;
|
||||
};
|
||||
|
||||
#endif // G4ANALYSER_HH
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4BertiniData_h
|
||||
#define G4BertiniData_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
class G4BertiniData //: public G4VIntraNuclearTransportModel
|
||||
{
|
||||
public:
|
||||
G4BertiniData(){
|
||||
G4cout << " G4BertiniData constructor" << G4endl;
|
||||
}
|
||||
~G4BertiniData(){
|
||||
G4cout << " G4BertiniData destructor" << G4endl;
|
||||
}
|
||||
|
||||
static G4BertiniData* Instance()
|
||||
{
|
||||
if (!theInstance) theInstance = new G4BertiniData();
|
||||
else G4cout << "singleton instance already created" << G4endl;
|
||||
return theInstance;
|
||||
}
|
||||
|
||||
private:
|
||||
static G4BertiniData* theInstance;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4BertiniElasticCollision_h
|
||||
#define G4BertiniElasticCollision_h 1
|
||||
|
||||
#include "G4BertiniModel.hh"
|
||||
|
||||
class G4BertiniElasticCollision : public G4BertiniModel {
|
||||
public:
|
||||
G4BertiniElasticCollision();
|
||||
~G4BertiniElasticCollision();
|
||||
void interpolateElasticNeutronData(G4int medium, G4int kdd, G4double e);
|
||||
void geti(G4double es, G4int npts, G4double e, G4int i);
|
||||
void scatteringWithHydrogen();
|
||||
private:
|
||||
G4double pt[16];
|
||||
G4double col[23];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4BertiniHydrogenCollision_h
|
||||
#define G4BertiniHydrogenCollision_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4BertiniModel.hh"
|
||||
|
||||
class G4BertiniHydrogenCollision : public G4BertiniModel {
|
||||
public:
|
||||
G4BertiniHydrogenCollision();
|
||||
~G4BertiniHydrogenCollision();
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,230 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4BERTININUCLEI_MODEL_HH
|
||||
#define G4BERTININUCLEI_MODEL_HH
|
||||
|
||||
#ifndef G4INUCL_ELEMENTARY_PARTICLE_HH
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
#endif
|
||||
#include "G4CascadParticle.hh"
|
||||
#include "G4InuclSpecialFunctions.hh"
|
||||
#include "G4CascadSpecialFunctions.hh"
|
||||
#include "G4ElementaryParticleCollider.hh"
|
||||
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4InuclNuclei;
|
||||
|
||||
using namespace G4InuclSpecialFunctions;
|
||||
using namespace G4CascadSpecialFunctions;
|
||||
|
||||
typedef G4std::pair<G4InuclElementaryParticle, G4double> partner;
|
||||
typedef G4std::vector<partner> partners;
|
||||
|
||||
class G4BertiniNucleiModel {
|
||||
|
||||
/// 7 MeV potential
|
||||
|
||||
/// Testing Doxygen properties (http://www.stack.nl/~dimitri/doxygen/)
|
||||
|
||||
/// The distance between \f$(x_1,y_1)\f$ and \f$(x_2,y_2)\f$ is \f$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\f$.
|
||||
|
||||
/*! \class G4BertiniNucleiModel
|
||||
* \brief Implements HETC nuclei model
|
||||
* \author Aatos Heikkinen
|
||||
* \author Original HETC authors
|
||||
* \version 0.0
|
||||
* \date 16.11.2002
|
||||
* \bug None know
|
||||
* \warning Wery preliminary
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
G4BertiniNucleiModel(); /// Initialize
|
||||
|
||||
/**
|
||||
* a normal member taking two arguments and returning an integer value.
|
||||
* @param a an integer argument.
|
||||
* @param s a constant character pointer.
|
||||
* @see Test()
|
||||
* @see ~Test()
|
||||
* @see testMeToo()
|
||||
* @see publicVar()
|
||||
* @return The test results
|
||||
*/
|
||||
|
||||
|
||||
/// a normal member taking two arguments and returning an integer value.
|
||||
/// @param a an integer argument.
|
||||
/// @param s a constant character pointer.
|
||||
/// @see Test()
|
||||
/// @see ~Test()
|
||||
/// @see testMeToo()
|
||||
/// @see publicVar()
|
||||
/// @return The test results
|
||||
|
||||
|
||||
G4BertiniNucleiModel(G4InuclNuclei* nuclei) {
|
||||
|
||||
generateModel(nuclei->getA(), nuclei->getZ());
|
||||
};
|
||||
|
||||
void generateModel(G4double a,
|
||||
G4double z); //!< a member function.
|
||||
|
||||
void reset() {
|
||||
|
||||
neutronNumberCurrent = neutronNumber;
|
||||
protonNumberCurrent = protonNumber;
|
||||
};
|
||||
|
||||
void printModel() const; /// a member function.
|
||||
|
||||
G4double getDensity(G4int ip,
|
||||
G4int izone) const {
|
||||
|
||||
return nucleon_densities[ip - 1][izone];
|
||||
};
|
||||
|
||||
G4double getFermiMomentum(G4int ip,
|
||||
G4int izone) const {
|
||||
|
||||
return fermi_momenta[ip - 1][izone];
|
||||
};
|
||||
|
||||
G4double getFermiKinetic(G4int ip,
|
||||
G4int izone) const {
|
||||
|
||||
G4double ekin = 0.0;
|
||||
|
||||
if(ip < 3 && izone < number_of_zones) {
|
||||
G4double pf = fermi_momenta[ip - 1][izone];
|
||||
G4double mass = ip == 1 ? 0.93827 : 0.93957;
|
||||
|
||||
ekin = sqrt(pf * pf + mass * mass) - mass;
|
||||
};
|
||||
|
||||
return ekin;
|
||||
};
|
||||
|
||||
G4double getPotential(G4int ip,
|
||||
G4int izone) const {
|
||||
|
||||
G4int ip0 = ip < 3 ? ip - 1 : 2;
|
||||
|
||||
return izone < number_of_zones ? zone_potentials[ip0][izone] : 0.0;
|
||||
};
|
||||
|
||||
G4std::vector<G4CascadParticle>
|
||||
generateParticleFate(G4CascadParticle& cparticle,
|
||||
G4ElementaryParticleCollider* theElementaryParticleCollider);
|
||||
|
||||
G4double getNumberOfNeutrons() const {
|
||||
|
||||
return neutronNumberCurrent;
|
||||
};
|
||||
|
||||
G4double getNumberOfProtons() const {
|
||||
|
||||
return protonNumberCurrent;
|
||||
};
|
||||
|
||||
G4bool empty() const {
|
||||
|
||||
return neutronNumberCurrent < 1.0 && protonNumberCurrent < 1.0;
|
||||
};
|
||||
|
||||
G4bool stillInside(const G4CascadParticle& cparticle) {
|
||||
|
||||
return cparticle.getCurrentZone() < number_of_zones;
|
||||
};
|
||||
|
||||
G4CascadParticle initializeCascad(G4InuclElementaryParticle* particle);
|
||||
|
||||
G4std::pair<G4std::vector<G4CascadParticle>, G4std::vector<G4InuclElementaryParticle> > initializeCascad(G4InuclNuclei* bullet, G4InuclNuclei* target);
|
||||
|
||||
G4std::pair<G4int, G4int> getTypesOfNucleonsInvolved() const {
|
||||
return G4std::pair<G4int, G4int>(current_nucl1, current_nucl2);
|
||||
};
|
||||
G4bool worthToPropagate(const G4CascadParticle& cparticle) const;
|
||||
|
||||
private:
|
||||
G4int verboseLevel; /*!< Each class has a verbosity level of its own. */
|
||||
G4bool passFermi(const G4std::vector<G4InuclElementaryParticle>& particles,
|
||||
G4int zone);
|
||||
|
||||
void boundaryTransition(G4CascadParticle& cparticle);
|
||||
|
||||
G4InuclElementaryParticle generateNucleon(G4int type,
|
||||
G4int zone) const;
|
||||
|
||||
G4InuclElementaryParticle generateQuasiDeutron(G4int type1,
|
||||
G4int type2,
|
||||
G4int zone) const;
|
||||
|
||||
partners generateInteractionPartners(G4CascadParticle& cparticle) const;
|
||||
|
||||
G4double volNumInt(G4double r1,
|
||||
G4double r2,
|
||||
G4double cu,
|
||||
G4double d1) const;
|
||||
|
||||
G4double volNumInt1(G4double r1,
|
||||
G4double r2,
|
||||
G4double cu2) const;
|
||||
|
||||
G4double getRatio(G4int ip) const;
|
||||
|
||||
G4std::vector<G4std::vector<G4double> > nucleon_densities;
|
||||
|
||||
G4std::vector<G4std::vector<G4double> > zone_potentials;
|
||||
|
||||
G4std::vector<G4std::vector<G4double> > fermi_momenta;
|
||||
|
||||
G4std::vector<G4double> zone_radii;
|
||||
|
||||
G4std::vector<G4double> binding_energies;
|
||||
|
||||
G4double nuclei_radius;
|
||||
|
||||
G4int number_of_zones;
|
||||
|
||||
G4double A;
|
||||
|
||||
G4double Z;
|
||||
|
||||
G4double neutronNumber;
|
||||
|
||||
G4double protonNumber;
|
||||
|
||||
G4double neutronNumberCurrent;
|
||||
|
||||
G4double protonNumberCurrent;
|
||||
|
||||
G4int current_nucl1;
|
||||
|
||||
G4int current_nucl2;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4NUCLEI_MODEL_HH
|
||||
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4BERTINIREGIONMODEL
|
||||
#define G4BERTINIREGIONMODEL
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "g4std/vector"
|
||||
#include <math.h>
|
||||
#include "globals.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
|
||||
|
||||
typedef G4std::vector<G4double>::const_iterator iterator;
|
||||
|
||||
class G4BertiniRegionModel /// :public G4VRegionModel
|
||||
{
|
||||
public:
|
||||
G4BertiniRegionModel(const G4int numberOfLayers, const G4int A, const G4int Z);
|
||||
~G4BertiniRegionModel();
|
||||
|
||||
/// instead of A and Z outer radius of the nucleus?
|
||||
/// void Init(const G4int numberOfLayers, const G4int A, const G4int Z);
|
||||
G4double GetDensity(G4double radius);
|
||||
G4double GetPotentialEnergy(G4double r, G4int particle);
|
||||
G4double GetMaximumNucleonMomentum(G4double radius, G4int nucleon);
|
||||
/// G4double NumberOfRegions();
|
||||
|
||||
private:
|
||||
|
||||
G4int massNumber;
|
||||
G4int protonNumber;
|
||||
G4std::vector<G4double> radius; /// contains the outer radiuses of the shells
|
||||
G4std::vector<G4double> density;
|
||||
G4std::vector<G4double> protonFermiEnergy;
|
||||
G4std::vector<G4double> neutronFermiEnergy;
|
||||
G4std::vector<G4double> protonFermiMomentum;
|
||||
G4std::vector<G4double> neutronFermiMomentum;
|
||||
|
||||
G4std::vector<G4double> protonPotentialEnergy;
|
||||
G4std::vector<G4double> neutronPotentialEnergy;
|
||||
|
||||
static const G4double radius0;
|
||||
static const G4double BE;
|
||||
/// static const G4double pi = 3.141592;
|
||||
|
||||
G4double GetFermiMomentum(G4double density, G4double mass);
|
||||
G4double GetFermiEnergy(G4double density, G4double mass);
|
||||
};
|
||||
#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. *
|
||||
// ********************************************************************
|
||||
#ifndef G4BIG_BANGER_HH
|
||||
#define G4BIG_BANGER_HH
|
||||
|
||||
#include "G4Collider.hh"
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
#include "G4InuclSpecialFunctions.hh"
|
||||
|
||||
|
||||
using namespace G4InuclSpecialFunctions;
|
||||
|
||||
class G4BigBanger : public G4Collider {
|
||||
|
||||
public:
|
||||
|
||||
G4BigBanger();
|
||||
|
||||
virtual G4CollisionOutput collide(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target);
|
||||
|
||||
private:
|
||||
|
||||
G4int verboseLevel;
|
||||
G4std::vector<G4InuclElementaryParticle> generateBangInSCM(G4double etot,
|
||||
G4double a,
|
||||
G4double z,
|
||||
G4double mp,
|
||||
G4double mn) const;
|
||||
|
||||
G4std::vector<G4double> generateMomentumModules(G4double etot,
|
||||
G4double a,
|
||||
G4double z,
|
||||
G4double mp,
|
||||
G4double mn) const;
|
||||
|
||||
G4double xProbability(G4double x,
|
||||
G4int ia) const;
|
||||
|
||||
G4double maxProbability(G4double a) const;
|
||||
|
||||
G4double generateX(G4int ia,
|
||||
G4double a,
|
||||
G4double promax) const;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4BIG_BANGER_HH
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4CASCAD_PARTICLE_HH
|
||||
#define G4CASCAD_PARTICLE_HH
|
||||
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
|
||||
class G4CascadParticle {
|
||||
|
||||
public:
|
||||
|
||||
G4CascadParticle();
|
||||
|
||||
G4CascadParticle(const G4InuclElementaryParticle& particle,
|
||||
const G4std::vector<G4double>& pos,
|
||||
G4int izone,
|
||||
G4double cpath)
|
||||
|
||||
: theParticle(particle),
|
||||
position(pos),
|
||||
current_zone(izone),
|
||||
current_path(cpath) {
|
||||
current_path = cpath;
|
||||
movingIn = true;
|
||||
reflectionCounter = 0;
|
||||
};
|
||||
|
||||
void updateParticleMomentum(const G4std::vector<G4double>& mom) {
|
||||
theParticle.setMomentum(mom);
|
||||
};
|
||||
|
||||
void updatePosition(const G4std::vector<G4double>& pos) {
|
||||
position = pos;
|
||||
};
|
||||
|
||||
void incrementReflectionCounter() {
|
||||
reflectionCounter++;
|
||||
reflected = true;
|
||||
};
|
||||
|
||||
void resetReflection() {
|
||||
reflected = false;
|
||||
};
|
||||
|
||||
void incrementCurrentPath(G4double npath) {
|
||||
current_path += npath;
|
||||
};
|
||||
|
||||
void updateZone(G4int izone) {
|
||||
current_zone = izone;
|
||||
};
|
||||
|
||||
G4bool movingInsideNuclei() const {
|
||||
return movingIn;
|
||||
};
|
||||
|
||||
G4double getPathToTheNextZone(G4double rz_in,
|
||||
G4double rz_out);
|
||||
|
||||
G4std::vector<G4double> getMomentum() const {
|
||||
return theParticle.getMomentum();
|
||||
};
|
||||
|
||||
G4InuclElementaryParticle getParticle() const {
|
||||
return theParticle;
|
||||
};
|
||||
|
||||
G4std::vector<G4double> getPosition() const {
|
||||
return position;
|
||||
};
|
||||
|
||||
G4int getCurrentZone() const {
|
||||
return current_zone;
|
||||
};
|
||||
|
||||
G4int getNumberOfReflections() const {
|
||||
return reflectionCounter;
|
||||
};
|
||||
|
||||
G4bool young(G4double young_path_cut,
|
||||
G4double cpath) const {
|
||||
|
||||
if(current_path < 1000.0) {
|
||||
return cpath < young_path_cut;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
};
|
||||
// return current_path + cpath < young_path_cut;
|
||||
};
|
||||
|
||||
G4bool reflectedNow() const {
|
||||
return reflected;
|
||||
};
|
||||
|
||||
void propagateAlongThePath(G4double path);
|
||||
|
||||
void print() const {
|
||||
theParticle.printParticle();
|
||||
G4cout << " zone " << current_zone << " current_path " << current_path
|
||||
<< " reflectionCounter " << reflectionCounter << G4endl
|
||||
<< " x " << position[0] << " y " << position[1]
|
||||
<< " z " << position[2] << G4endl;
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
G4int verboseLevel;
|
||||
G4InuclElementaryParticle theParticle;
|
||||
G4std::vector<G4double> position;
|
||||
G4int current_zone;
|
||||
G4double current_path;
|
||||
G4bool movingIn;
|
||||
G4int reflectionCounter;
|
||||
G4bool reflected;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4CASCAD_PARTICLE_HH
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4CASCAD_SPECIAL_FUNC_HH
|
||||
#define G4CASCAD_SPECIAL_FUNC_HH
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include <math.h>
|
||||
#include "g4std/algorithm"
|
||||
#include "g4std/vector"
|
||||
|
||||
namespace G4CascadSpecialFunctions {
|
||||
|
||||
G4std::pair<G4int, G4double> getPositionInEnergyScale2(G4double e);
|
||||
|
||||
G4std::pair<G4int, G4double> getPositionInEnergyScale1(G4double e);
|
||||
|
||||
G4double absorptionCrosSection(G4double e,
|
||||
G4int type);
|
||||
|
||||
G4double crossSection(G4double e,
|
||||
G4int is);
|
||||
|
||||
G4std::pair<G4int, G4double> getPositionInEnergyScaleEMS(G4double e);
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,70 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// CLASS DESCRIPTION
|
||||
// G4CascadeInterface defines an interface to HETC and INUCL
|
||||
// models of an medium energy (~ 0.5 - 5 GeV) intra-nuclear transport.
|
||||
// If you have any questions, please contact
|
||||
// package writer aatos.heikkinen@cern.ch.
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4CASCADEINTERFACE_H
|
||||
#define G4CASCADEINTERFACE_H 1
|
||||
|
||||
#include "G4Nucleon.hh"
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4VIntraNuclearTransportModel.hh"
|
||||
#include "G4KineticTrackVector.hh"
|
||||
#include "G4FragmentVector.hh"
|
||||
#include "G4ParticleChange.hh"
|
||||
#include "G4ReactionProductVector.hh"
|
||||
#include "G4ReactionProduct.hh"
|
||||
|
||||
class G4CascadeInterface : public G4VIntraNuclearTransportModel {
|
||||
|
||||
public:
|
||||
|
||||
G4CascadeInterface();
|
||||
|
||||
~G4CascadeInterface(){
|
||||
}
|
||||
|
||||
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus);
|
||||
|
||||
G4VParticleChange* ApplyYourself(const G4Track& aTrack,
|
||||
G4Nucleus& theNucleus);
|
||||
|
||||
private:
|
||||
|
||||
G4int operator==(G4CascadeInterface& right) {
|
||||
return (this == &right);
|
||||
}
|
||||
|
||||
G4int operator!=(G4CascadeInterface& right) {
|
||||
return (this != &right);
|
||||
}
|
||||
|
||||
G4int verboseLevel;
|
||||
private:
|
||||
G4ParticleChange theResult;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4CASCADEINTERFACE_H
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4COLLIDER_HH
|
||||
#define G4COLLIDER_HH
|
||||
|
||||
//#ifndef G4INUCL_PARTICLE_HH
|
||||
#include "G4InuclParticle.hh"
|
||||
//#endif
|
||||
|
||||
#include "G4CollisionOutput.hh"
|
||||
|
||||
class G4Collider {
|
||||
|
||||
public:
|
||||
|
||||
G4Collider() {};
|
||||
|
||||
virtual G4CollisionOutput collide(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target) = 0;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4COLLIDER_HH
|
||||
@@ -0,0 +1,158 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4COLLISION_OUTPUT_HH
|
||||
#define G4COLLISION_OUTPUT_HH
|
||||
|
||||
#include "g4std/iostream"
|
||||
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
#include "G4InuclNuclei.hh"
|
||||
|
||||
#include "g4std/algorithm"
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4CollisionOutput {
|
||||
|
||||
public:
|
||||
|
||||
G4CollisionOutput();
|
||||
|
||||
void reset() {
|
||||
nucleiFragments.resize(0);
|
||||
outgoingParticles.resize(0);
|
||||
|
||||
};
|
||||
|
||||
void addOutgoingParticle(const G4InuclElementaryParticle& particle) {
|
||||
outgoingParticles.push_back(particle);
|
||||
};
|
||||
|
||||
void addOutgoingParticles(const G4std::vector<G4InuclElementaryParticle>& particles) {
|
||||
for(G4int i = 0; i < G4int(particles.size()); i++)
|
||||
outgoingParticles.push_back(particles[i]);
|
||||
};
|
||||
|
||||
void addTargetFragment(const G4InuclNuclei& nuclei) {
|
||||
nucleiFragments.push_back(nuclei);
|
||||
};
|
||||
|
||||
void addTargetFragments(const G4std::vector<G4InuclNuclei>& nuclea) {
|
||||
for(G4int i = 0; i < G4int(nuclea.size()); i++)
|
||||
nucleiFragments.push_back(nuclea[i]);
|
||||
};
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> getOutgoingParticles() const {
|
||||
return outgoingParticles;
|
||||
};
|
||||
|
||||
G4int numberOfNucleiFragments() const {
|
||||
return nucleiFragments.size();
|
||||
};
|
||||
|
||||
G4std::vector<G4InuclNuclei> getNucleiFragments() const {
|
||||
return nucleiFragments;
|
||||
};
|
||||
|
||||
G4std::vector<G4double> getTotalOutputMomentum() const {
|
||||
G4std::vector<G4double> tot_mom(4, 0.0);
|
||||
double eex_r = 0.0;
|
||||
G4int i(0);
|
||||
for(i = 0; i < G4int(outgoingParticles.size()); i++) {
|
||||
G4std::vector<G4double> mom = outgoingParticles[i].getMomentum();
|
||||
for(G4int j = 0; j < 4; j++) tot_mom[j] += mom[j];
|
||||
};
|
||||
for(i = 0; i < G4int(nucleiFragments.size()); i++) {
|
||||
G4std::vector<G4double> mom = nucleiFragments[i].getMomentum();
|
||||
for(G4int j = 0; j < 4; j++) tot_mom[j] += mom[j];
|
||||
eex_r += 0.001 * nucleiFragments[i].getExitationEnergy();
|
||||
};
|
||||
tot_mom[0] += eex_r;
|
||||
return tot_mom;
|
||||
};
|
||||
|
||||
void printCollisionOutput() const {
|
||||
G4cout << " Output: " << G4endl
|
||||
<< " Outgoing Particles: " << outgoingParticles.size() << G4endl;
|
||||
G4int i(0);
|
||||
for(i = 0; i < G4int(outgoingParticles.size()); i++) {
|
||||
outgoingParticles[i].printParticle();
|
||||
};
|
||||
G4cout << " Nuclei fragments: " << nucleiFragments.size() << G4endl;
|
||||
for(i = 0; i < G4int(nucleiFragments.size()); i++) {
|
||||
nucleiFragments[i].printParticle();
|
||||
};
|
||||
};
|
||||
|
||||
void trivialise(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target) {
|
||||
if(G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target)) {
|
||||
nucleiFragments.push_back(*nuclei_target);
|
||||
}
|
||||
else {
|
||||
G4InuclElementaryParticle* particle =
|
||||
dynamic_cast<G4InuclElementaryParticle*>(target);
|
||||
outgoingParticles.push_back(*particle);
|
||||
};
|
||||
if(G4InuclNuclei* nuclei_bullet = dynamic_cast<G4InuclNuclei*>(bullet)) {
|
||||
nucleiFragments.push_back(*nuclei_bullet);
|
||||
}
|
||||
else {
|
||||
G4InuclElementaryParticle* particle =
|
||||
dynamic_cast<G4InuclElementaryParticle*>(bullet);
|
||||
outgoingParticles.push_back(*particle);
|
||||
};
|
||||
};
|
||||
|
||||
void setOnShell(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target);
|
||||
|
||||
void setRemainingExitationEnergy() {
|
||||
eex_rest = 0.0;
|
||||
for(G4int i = 0; i < G4int(nucleiFragments.size()); i++)
|
||||
eex_rest += 0.001 * nucleiFragments[i].getExitationEnergy();
|
||||
};
|
||||
|
||||
double getRemainingExitationEnergy() const {
|
||||
return eex_rest;
|
||||
};
|
||||
|
||||
G4bool acceptable() const {
|
||||
return on_shell;
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
G4int verboseLevel;
|
||||
G4std::vector<G4InuclElementaryParticle> outgoingParticles;
|
||||
|
||||
G4std::vector<G4InuclNuclei> nucleiFragments;
|
||||
|
||||
G4double eex_rest;
|
||||
|
||||
G4std::pair<G4std::pair<G4int, G4int>, G4int> selectPairToTune(G4double de) const;
|
||||
|
||||
G4bool on_shell;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4COLLISION_OUTPUT_HH
|
||||
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4ELEMENTARY_PARTICLE_COLLIDER_HH
|
||||
#define G4ELEMENTARY_PARTICLE_COLLIDER_HH
|
||||
|
||||
#include "G4Collider.hh"
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
#include "G4InuclSpecialFunctions.hh"
|
||||
#include "G4CascadSpecialFunctions.hh"
|
||||
#include "G4LorentzConvertor.hh"
|
||||
|
||||
using namespace G4InuclSpecialFunctions;
|
||||
using namespace G4CascadSpecialFunctions;
|
||||
|
||||
class G4ElementaryParticleCollider : public G4Collider {
|
||||
|
||||
public:
|
||||
|
||||
G4ElementaryParticleCollider();
|
||||
|
||||
virtual G4CollisionOutput collide(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target);
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
G4int generateMultiplicity(G4int is,
|
||||
G4double ekin) const;
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> generateSCMfinalState(G4double ekin,
|
||||
G4double etot_scm, G4double pscm,
|
||||
G4InuclElementaryParticle* particle1,
|
||||
G4InuclElementaryParticle* particle2,
|
||||
G4LorentzConvertor* toSCM) const;
|
||||
|
||||
G4std::vector<G4double> generateMomModules(const G4std::vector<G4int>& kinds,
|
||||
G4int mult,
|
||||
G4int is,
|
||||
G4double ekin,
|
||||
G4double etot_cm) const;
|
||||
|
||||
G4bool reChargering(G4double ekin,
|
||||
G4int is) const;
|
||||
|
||||
G4std::vector<G4double> particleSCMmomentumFor2to2(G4int is,
|
||||
G4int kw,
|
||||
G4double ekin,
|
||||
G4double pscm) const;
|
||||
|
||||
G4int getElasticCase(G4int is,
|
||||
G4int kw,
|
||||
G4double ekin) const;
|
||||
|
||||
G4std::vector<G4int> generateOutgoingKindsFor2toMany(G4int is,
|
||||
G4int mult,
|
||||
G4double ekin) const;
|
||||
|
||||
G4double getMomModuleFor2toMany(G4int is,
|
||||
G4int mult,
|
||||
G4int knd,
|
||||
G4double ekin) const;
|
||||
|
||||
G4bool satisfyTriangle(const G4std::vector<G4double>& modules) const;
|
||||
|
||||
G4std::vector<G4double> particleSCMmomentumFor2to3(G4int is,
|
||||
G4int knd,
|
||||
G4double ekin,
|
||||
G4double pmod) const;
|
||||
|
||||
G4int getIL(G4int is,
|
||||
G4int mult) const;
|
||||
|
||||
G4std::pair<G4double, G4double> adjustIntervalForElastic(G4double ekin,
|
||||
G4double ak,
|
||||
G4double ae,
|
||||
G4int k,
|
||||
G4int l,
|
||||
const G4std::vector<G4double>& ssv,
|
||||
G4double st) const;
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle>
|
||||
generateSCMpionAbsorption(G4double etot_scm,
|
||||
G4InuclElementaryParticle* particle1,
|
||||
G4InuclElementaryParticle* particle2) const;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4ELEMENTARY_PARTICLE_COLLIDER_HH
|
||||
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4EQUILIBRIUM_EVAPORATOR_HH
|
||||
#define G4EQUILIBRIUM_EVAPORATOR_HH
|
||||
|
||||
#include "G4Collider.hh"
|
||||
#include "G4Fissioner.hh"
|
||||
#include "G4BigBanger.hh"
|
||||
#include "G4InuclSpecialFunctions.hh"
|
||||
|
||||
using namespace G4InuclSpecialFunctions;
|
||||
|
||||
class G4EquilibriumEvaporator : public G4Collider {
|
||||
|
||||
public:
|
||||
|
||||
G4EquilibriumEvaporator();
|
||||
|
||||
void setFissioner(G4Fissioner* fissioner) {
|
||||
theFissioner = fissioner;
|
||||
};
|
||||
|
||||
void setBigBanger(G4BigBanger* banger) {
|
||||
theBigBanger = banger;
|
||||
};
|
||||
|
||||
virtual G4CollisionOutput collide(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target);
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
G4double getE0(G4double A) const;
|
||||
|
||||
G4double getPARLEVDEN(G4double A,
|
||||
G4double Z) const;
|
||||
|
||||
G4bool timeToBigBang(G4double a,
|
||||
G4double z,
|
||||
G4double e) const;
|
||||
|
||||
G4bool goodRemnant(G4double a,
|
||||
G4double z) const;
|
||||
|
||||
G4double getQF(G4double x,
|
||||
G4double x2,
|
||||
G4double a,
|
||||
G4double z,
|
||||
G4double e) const;
|
||||
|
||||
G4double getAF(G4double x,
|
||||
G4double a,
|
||||
G4double z,
|
||||
G4double e) const;
|
||||
|
||||
G4Fissioner* theFissioner;
|
||||
G4BigBanger* theBigBanger;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4EQUILIBRIUM_EVAPORATOR_HH
|
||||
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4EXITON_CONFIGURATION_HH
|
||||
#define G4EXITON_CONFIGURATION_HH
|
||||
|
||||
class G4ExitonConfiguration {
|
||||
|
||||
public:
|
||||
|
||||
G4ExitonConfiguration() {
|
||||
protonQuasiParticles = 0.0;
|
||||
neutronQuasiParticles = 0.0;
|
||||
protonHoles = 0.0;
|
||||
neutronHoles = 0.0;
|
||||
};
|
||||
|
||||
G4ExitonConfiguration(G4double qpp,
|
||||
G4double qnp,
|
||||
G4double qph,
|
||||
G4double qnh)
|
||||
: protonQuasiParticles(qpp),
|
||||
neutronQuasiParticles(qnp),
|
||||
protonHoles(qph),
|
||||
neutronHoles(qnh) {
|
||||
};
|
||||
|
||||
void incrementQP(G4int ip) {
|
||||
if(ip < 3) {
|
||||
if(ip == 1) {
|
||||
protonQuasiParticles += 1.0;
|
||||
}
|
||||
else if(ip == 2) {
|
||||
neutronQuasiParticles += 1.0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
void incrementHoles(G4int ip) {
|
||||
if(ip < 3) {
|
||||
if(ip == 1) {
|
||||
protonHoles += 1.0;
|
||||
}
|
||||
else if(ip == 2) {
|
||||
neutronHoles += 1.0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
void print() const {
|
||||
G4cout << " Exiton configuration " << G4endl
|
||||
<< " proton particles " << protonQuasiParticles << " holes "
|
||||
<< protonHoles << G4endl
|
||||
<< " neutron particles " << neutronQuasiParticles << " holes "
|
||||
<< neutronHoles << G4endl;
|
||||
};
|
||||
|
||||
G4double protonQuasiParticles;
|
||||
G4double neutronQuasiParticles;
|
||||
G4double protonHoles;
|
||||
G4double neutronHoles;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4EXITON_CONFIGURATION_HH
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4FISSION_CONFIGURATION_HH
|
||||
#define G4FISSION_CONFIGURATION_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/iostream"
|
||||
|
||||
class G4FissionConfiguration {
|
||||
|
||||
public:
|
||||
|
||||
G4FissionConfiguration() {
|
||||
};
|
||||
|
||||
G4FissionConfiguration(G4double a,
|
||||
G4double z,
|
||||
G4double ez,
|
||||
G4double ek,
|
||||
G4double ep)
|
||||
: afirst(a),
|
||||
zfirst(z),
|
||||
ezet(ez),
|
||||
ekin(ek),
|
||||
epot(ep) {
|
||||
};
|
||||
|
||||
void print() {
|
||||
G4cout << " new configuration " << G4endl
|
||||
<< " a1 " << afirst << " z1 " << zfirst << " ez " << ezet <<
|
||||
" ekin " << ekin << " epot " << epot << G4endl;
|
||||
};
|
||||
|
||||
G4double afirst;
|
||||
G4double zfirst;
|
||||
G4double ezet;
|
||||
G4double ekin;
|
||||
G4double epot;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4FISSION_CONFIGURATION_HH
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4FISSION_STORE_HH
|
||||
#define G4FISSION_STORE_HH
|
||||
|
||||
#include "G4FissionConfiguration.hh"
|
||||
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4FissionStore {
|
||||
|
||||
public:
|
||||
|
||||
G4FissionStore();
|
||||
|
||||
void addConfig(G4double a,
|
||||
G4double z,
|
||||
G4double ez,
|
||||
G4double ek,
|
||||
G4double ev) {
|
||||
G4FissionConfiguration config(a, z, ez, ek, ev);
|
||||
configurations.push_back(config);
|
||||
// config.print();
|
||||
};
|
||||
|
||||
G4int size() const {
|
||||
return configurations.size();
|
||||
};
|
||||
|
||||
G4FissionConfiguration generateConfiguration(G4double amax,
|
||||
G4double rand) const;
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
|
||||
G4std::vector<G4FissionConfiguration> configurations;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4FISSION_STORE_HH
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4FISSIONER_HH
|
||||
#define G4FISSIONER_HH
|
||||
|
||||
#include "G4Collider.hh"
|
||||
#include "G4InuclSpecialFunctions.hh"
|
||||
|
||||
using namespace G4InuclSpecialFunctions;
|
||||
|
||||
class G4Fissioner : public G4Collider {
|
||||
|
||||
public:
|
||||
|
||||
G4Fissioner();
|
||||
|
||||
virtual G4CollisionOutput collide(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target);
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
G4double getC2(G4double A1,
|
||||
G4double A2,
|
||||
G4double X3,
|
||||
G4double X4,
|
||||
G4double R12) const;
|
||||
|
||||
G4double getZopt(G4double A1,
|
||||
G4double A2,
|
||||
G4double ZT,
|
||||
G4double X3,
|
||||
G4double X4,
|
||||
G4double R12) const;
|
||||
|
||||
void potentialMinimization(G4double& VP,
|
||||
G4std::vector<G4double>& ED,
|
||||
G4double& VC,
|
||||
G4double AF,
|
||||
G4double AS,
|
||||
G4double ZF,
|
||||
G4double ZS,
|
||||
G4std::vector<G4double>& AL1,
|
||||
G4std::vector<G4double>& BET1,
|
||||
G4double& R12) const;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4FISSIONER_HH
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
#ifndef G4INTERACTION_CASE_HH
|
||||
#define G4INTERACTION_CASE_HH
|
||||
|
||||
//#ifndef G4INUCL_PARTICLE_HH
|
||||
#include "G4InuclParticle.hh"
|
||||
//#endif
|
||||
|
||||
#include "g4std/algorithm"
|
||||
|
||||
class G4InteractionCase {
|
||||
|
||||
public:
|
||||
|
||||
G4InteractionCase() {
|
||||
bultag = G4std::pair<G4InuclParticle*, G4InuclParticle*>(0, 0);
|
||||
inter_case = 0;
|
||||
};
|
||||
|
||||
G4InteractionCase(G4InuclParticle* part1,
|
||||
G4InuclParticle* part2,
|
||||
G4int ic) {
|
||||
setBulletTarget(part1, part2);
|
||||
setInterCase(ic);
|
||||
};
|
||||
|
||||
void setBulletTarget(G4InuclParticle* part1,
|
||||
G4InuclParticle* part2) {
|
||||
bultag = G4std::pair<G4InuclParticle*, G4InuclParticle*>(part1, part2);
|
||||
};
|
||||
|
||||
void setInterCase(G4int ic) {
|
||||
inter_case = ic;
|
||||
};
|
||||
|
||||
G4InuclParticle* getBullet() const {
|
||||
return bultag.first;
|
||||
};
|
||||
|
||||
G4InuclParticle* getTarget() const {
|
||||
return bultag.second;
|
||||
};
|
||||
|
||||
G4int getInterCase() const {
|
||||
return inter_case;
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
G4std::pair<G4InuclParticle*, G4InuclParticle*> bultag;
|
||||
|
||||
G4int inter_case;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4INTERACTION_CASE_HH
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4INTRA_NUCLEI_CASCADER_HH
|
||||
#define G4INTRA_NUCLEI_CASCADER_HH
|
||||
|
||||
#include "G4Collider.hh"
|
||||
#include "G4ElementaryParticleCollider.hh"
|
||||
#include "G4InuclSpecialFunctions.hh"
|
||||
#include "G4CascadSpecialFunctions.hh"
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
|
||||
using namespace G4InuclSpecialFunctions;
|
||||
using namespace G4CascadSpecialFunctions;
|
||||
|
||||
class G4IntraNucleiCascader : public G4Collider {
|
||||
|
||||
public:
|
||||
|
||||
G4IntraNucleiCascader();
|
||||
|
||||
void setElementaryParticleCollider(G4ElementaryParticleCollider* ecollider) {
|
||||
theElementaryParticleCollider = ecollider;
|
||||
};
|
||||
|
||||
virtual G4CollisionOutput collide(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target);
|
||||
|
||||
void setInteractionCase(G4int intcase) {
|
||||
inter_case = intcase;
|
||||
};
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
G4ElementaryParticleCollider* theElementaryParticleCollider;
|
||||
|
||||
G4int inter_case;
|
||||
|
||||
G4bool goodCase(G4double a, G4double z, G4double eexs, G4double ein) const;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4INTRA_NUCLEI_CASCADER_HH
|
||||
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4INUCL_COLLIDER_HH
|
||||
#define G4INUCL_COLLIDER_HH
|
||||
|
||||
#include "G4Collider.hh"
|
||||
#include "G4IntraNucleiCascader.hh"
|
||||
#include "G4NonEquilibriumEvaporator.hh"
|
||||
#include "G4EquilibriumEvaporator.hh"
|
||||
#include "G4Fissioner.hh"
|
||||
#include "G4BigBanger.hh"
|
||||
#include "G4ElementaryParticleCollider.hh"
|
||||
#include "G4InteractionCase.hh"
|
||||
#include "G4InuclNuclei.hh"
|
||||
#include "G4InuclSpecialFunctions.hh"
|
||||
#include "G4Analyser.hh"
|
||||
|
||||
using namespace G4InuclSpecialFunctions;
|
||||
|
||||
class G4InuclCollider : public G4Collider {
|
||||
|
||||
public:
|
||||
|
||||
G4InuclCollider();
|
||||
|
||||
G4InuclCollider(G4ElementaryParticleCollider* ecollider,
|
||||
G4IntraNucleiCascader* incascader,
|
||||
G4NonEquilibriumEvaporator* noeqevaporator,
|
||||
G4EquilibriumEvaporator* eqevaporator,
|
||||
G4Fissioner* fissioner,
|
||||
G4BigBanger* bigbanger) {
|
||||
|
||||
setElementaryParticleCollider(ecollider);
|
||||
setIntraNucleiCascader(incascader,ecollider);
|
||||
setNonEquilibriumEvaporator(noeqevaporator);
|
||||
setEquilibriumEvaporator(eqevaporator, fissioner, bigbanger);
|
||||
setBigBanger(bigbanger);
|
||||
|
||||
};
|
||||
|
||||
void setElementaryParticleCollider(G4ElementaryParticleCollider* ecollider) {
|
||||
|
||||
theElementaryParticleCollider = ecollider;
|
||||
};
|
||||
|
||||
void setIntraNucleiCascader(G4IntraNucleiCascader* incascader,
|
||||
G4ElementaryParticleCollider* ecollider) {
|
||||
|
||||
theIntraNucleiCascader = incascader;
|
||||
theIntraNucleiCascader->setElementaryParticleCollider(ecollider);
|
||||
};
|
||||
|
||||
void setNonEquilibriumEvaporator(G4NonEquilibriumEvaporator* noeqevaporator) {
|
||||
|
||||
theNonEquilibriumEvaporator = noeqevaporator;
|
||||
};
|
||||
|
||||
void setEquilibriumEvaporator(G4EquilibriumEvaporator* eqevaporator,
|
||||
G4Fissioner* fissioner,
|
||||
G4BigBanger* bigbanger) {
|
||||
|
||||
theEquilibriumEvaporator = eqevaporator;
|
||||
theEquilibriumEvaporator->setFissioner(fissioner);
|
||||
theEquilibriumEvaporator->setBigBanger(bigbanger);
|
||||
};
|
||||
|
||||
void setBigBanger(G4BigBanger* bigbanger) {
|
||||
|
||||
theBigBanger = bigbanger;
|
||||
};
|
||||
|
||||
virtual G4CollisionOutput collide(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target);
|
||||
|
||||
private:
|
||||
|
||||
G4int verboseLevel;
|
||||
|
||||
G4bool inelasticInteractionPossible(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target,
|
||||
G4double ekin) const;
|
||||
|
||||
G4InteractionCase bulletTargetSetter(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target) const;
|
||||
|
||||
G4bool explosion(G4InuclNuclei* target) const;
|
||||
|
||||
G4ElementaryParticleCollider* theElementaryParticleCollider;
|
||||
G4IntraNucleiCascader* theIntraNucleiCascader;
|
||||
G4NonEquilibriumEvaporator* theNonEquilibriumEvaporator;
|
||||
G4EquilibriumEvaporator* theEquilibriumEvaporator;
|
||||
G4BigBanger* theBigBanger;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4INUCL_COLLIDER_HH
|
||||
|
||||
|
||||
+278
@@ -0,0 +1,278 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4INUCL_ELEMENTARY_PARTICLE_HH
|
||||
#define G4INUCL_ELEMENTARY_PARTICLE_HH
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#ifndef G4INUCL_PARTICLE_HH
|
||||
#include "G4InuclParticle.hh"
|
||||
#endif
|
||||
|
||||
class G4InuclElementaryParticle : public G4InuclParticle {
|
||||
|
||||
// known particle types:
|
||||
// 1 - proton
|
||||
// 2 - neutron
|
||||
// 3 - pi+
|
||||
// 5 - pi-
|
||||
// 7 - pi 0
|
||||
// 10 - photon
|
||||
// 111 - quasideutron PP
|
||||
// 112 - quasideutron PN
|
||||
// 122 - quasideutron NN
|
||||
|
||||
public:
|
||||
|
||||
G4InuclElementaryParticle() {
|
||||
|
||||
valid_particle = false;
|
||||
};
|
||||
|
||||
G4InuclElementaryParticle(G4int type)
|
||||
: particleType(type) {
|
||||
|
||||
particleMass = getParticleMass(type);
|
||||
valid_particle = false;
|
||||
};
|
||||
|
||||
G4InuclElementaryParticle(const G4std::vector<G4double>& mom,
|
||||
G4int type)
|
||||
: G4InuclParticle(mom),
|
||||
particleType(type) {
|
||||
|
||||
particleMass = getParticleMass(type);
|
||||
momentum[0] = sqrt(momentum[1] * momentum[1] + momentum[2] * momentum[2] +
|
||||
momentum[3] * momentum[3] + particleMass * particleMass);
|
||||
valid_particle = true;
|
||||
};
|
||||
|
||||
G4InuclElementaryParticle(G4double ekin,
|
||||
G4int type)
|
||||
: particleType(type) {
|
||||
|
||||
particleMass = getParticleMass(type);
|
||||
momentum.resize(4);
|
||||
momentum[0] = ekin + particleMass;
|
||||
momentum[3] = sqrt(momentum[0] * momentum[0] - particleMass * particleMass);
|
||||
momentum[1] = momentum[2] = 0.0;
|
||||
valid_particle = true;
|
||||
};
|
||||
|
||||
void setType(G4int ityp) {
|
||||
|
||||
particleType = ityp;
|
||||
particleMass = getParticleMass(ityp);
|
||||
};
|
||||
|
||||
void setMomentum(const G4std::vector<G4double>& mom) {
|
||||
|
||||
momentum = mom;
|
||||
momentum[0] = sqrt(momentum[1] * momentum[1] + momentum[2] * momentum[2] +
|
||||
momentum[3] * momentum[3] + particleMass * particleMass);
|
||||
valid_particle = true;
|
||||
};
|
||||
|
||||
G4int type() const {
|
||||
|
||||
return particleType;
|
||||
};
|
||||
|
||||
G4bool photon() const {
|
||||
|
||||
return particleType == 10;
|
||||
};
|
||||
|
||||
G4bool nucleon() const {
|
||||
|
||||
return particleType <= 2;
|
||||
};
|
||||
|
||||
G4bool pion() const {
|
||||
|
||||
return particleType == 3 || particleType == 5 || particleType == 7;
|
||||
};
|
||||
|
||||
G4bool quasi_deutron() const {
|
||||
|
||||
return particleType > 100;
|
||||
};
|
||||
|
||||
G4double getMass() const {
|
||||
|
||||
return particleMass;
|
||||
};
|
||||
|
||||
G4double getParticleMass() const {
|
||||
|
||||
G4double mass;
|
||||
|
||||
switch(particleType) {
|
||||
case 1: // proton
|
||||
mass = 0.93827;
|
||||
break;
|
||||
case 2: // neutron
|
||||
mass = 0.93957;
|
||||
break;
|
||||
case 3: // pi+
|
||||
mass = 0.13957;
|
||||
break;
|
||||
case 5: // pi-
|
||||
mass = 0.13957;
|
||||
break;
|
||||
case 7: // pi0
|
||||
mass = 0.13498;
|
||||
break;
|
||||
case 10: // photon
|
||||
mass = 0.0;
|
||||
break;
|
||||
case 111: // PP
|
||||
mass = 0.93827 + 0.93827;
|
||||
break;
|
||||
case 112: // PN
|
||||
mass = 0.93827 + 0.93957;
|
||||
break;
|
||||
case 122: // NN
|
||||
mass = 0.93957 + 0.93957;
|
||||
break;
|
||||
default:
|
||||
G4cout << " uups, unknown particle type " << particleType << G4endl;
|
||||
mass = 0.;
|
||||
};
|
||||
|
||||
return mass;
|
||||
};
|
||||
|
||||
G4double getCharge() const {
|
||||
|
||||
G4double charge;
|
||||
|
||||
switch(particleType) {
|
||||
case 1: // proton
|
||||
charge = 1.0;
|
||||
break;
|
||||
case 2: // neutron
|
||||
charge = 0.0;
|
||||
break;
|
||||
case 3: // pi+
|
||||
charge = 1.0;
|
||||
break;
|
||||
case 5: // pi-
|
||||
charge = -1.0;
|
||||
break;
|
||||
case 7: // pi0
|
||||
charge = 0.0;
|
||||
break;
|
||||
case 10: // photon
|
||||
charge = 0.0;
|
||||
break;
|
||||
case 111: // PP
|
||||
charge = 2.0;
|
||||
break;
|
||||
case 112: // PN
|
||||
charge = 1.0;
|
||||
break;
|
||||
case 122: // NN
|
||||
charge = 0.0;
|
||||
break;
|
||||
default:
|
||||
G4cout << " uups, unknown particle type " << particleType << G4endl;
|
||||
charge = 0.0;
|
||||
};
|
||||
|
||||
return charge;
|
||||
};
|
||||
|
||||
G4double getParticleMass(G4int type) const {
|
||||
|
||||
G4double mass;
|
||||
|
||||
switch(type) {
|
||||
case 1: // proton
|
||||
mass = 0.93827;
|
||||
break;
|
||||
case 2: // neutron
|
||||
mass = 0.93957;
|
||||
break;
|
||||
case 3: // pi+
|
||||
mass = 0.13957;
|
||||
break;
|
||||
case 5: // pi-
|
||||
mass = 0.13957;
|
||||
break;
|
||||
case 7: // pi0
|
||||
mass = 0.13498;
|
||||
break;
|
||||
case 10: // photon
|
||||
mass = 0.0;
|
||||
break;
|
||||
case 111: // PP
|
||||
mass = 0.93827 + 0.93827;
|
||||
break;
|
||||
case 112: // PN
|
||||
mass = 0.93827 + 0.93957;
|
||||
break;
|
||||
case 122: // NN
|
||||
mass = 0.93957 + 0.93957;
|
||||
break;
|
||||
default:
|
||||
G4cout << " uups, unknown particle type " << type << G4endl;
|
||||
mass = 0.0;
|
||||
};
|
||||
|
||||
return mass;
|
||||
};
|
||||
|
||||
G4double getKineticEnergy() const {
|
||||
|
||||
return momentum[0] - particleMass;
|
||||
};
|
||||
|
||||
G4double getEnergy() const {
|
||||
|
||||
return momentum[0];
|
||||
};
|
||||
|
||||
G4bool valid() const {
|
||||
|
||||
return valid_particle;
|
||||
};
|
||||
|
||||
virtual void printParticle() const {
|
||||
|
||||
G4InuclParticle::printParticle();
|
||||
|
||||
G4cout << " Particle: type " << particleType << " mass " << particleMass <<
|
||||
" ekin " << getKineticEnergy() << G4endl;
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
G4int particleType;
|
||||
|
||||
G4double particleMass;
|
||||
|
||||
G4bool valid_particle;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4INUCL_ELEMENTARY_PARTICLE_HH
|
||||
@@ -0,0 +1,171 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4INUCL_NUCLEI_HH
|
||||
#define G4INUCL_NUCLEI_HH
|
||||
|
||||
#ifndef G4INUCL_PARTICLE_HH
|
||||
#include "G4InuclParticle.hh"
|
||||
#endif
|
||||
#include "G4ExitonConfiguration.hh"
|
||||
#include "G4InuclSpecialFunctions.hh"
|
||||
|
||||
using namespace G4InuclSpecialFunctions;
|
||||
|
||||
class G4InuclNuclei : public G4InuclParticle {
|
||||
|
||||
public:
|
||||
|
||||
G4InuclNuclei() {};
|
||||
|
||||
G4InuclNuclei(G4double a,
|
||||
G4double z)
|
||||
: A(a),
|
||||
Z(z) {
|
||||
|
||||
setNucleiMass();
|
||||
exitationEnergy = 0.0;
|
||||
};
|
||||
|
||||
G4InuclNuclei(const G4std::vector<G4double>& mom,
|
||||
G4double a,
|
||||
G4double z)
|
||||
: G4InuclParticle(mom),
|
||||
A(a),
|
||||
Z(z) {
|
||||
|
||||
setNucleiMass();
|
||||
exitationEnergy = 0.0;
|
||||
};
|
||||
|
||||
G4InuclNuclei(G4double ekin,
|
||||
G4double a,
|
||||
G4double z)
|
||||
: A(a),
|
||||
Z(z) {
|
||||
|
||||
setNucleiMass();
|
||||
G4std::vector<G4double> mom(4, 0.0);
|
||||
mom[0] = ekin + nucleiMass;
|
||||
mom[3] = sqrt(mom[0] * mom[0] - nucleiMass * nucleiMass);
|
||||
G4InuclParticle::setMomentum(mom);
|
||||
exitationEnergy = 0.0;
|
||||
};
|
||||
|
||||
void setA(G4double a) {
|
||||
|
||||
A = a;
|
||||
};
|
||||
|
||||
void setZ(G4double z) {
|
||||
|
||||
Z = z;
|
||||
};
|
||||
|
||||
void setExitationEnergy(G4double e) {
|
||||
|
||||
exitationEnergy = e;
|
||||
};
|
||||
|
||||
void setEnergy() {
|
||||
|
||||
momentum[0] = sqrt(momentum[1] * momentum[1] + momentum[2] * momentum[2] +
|
||||
momentum[3] * momentum[3] + nucleiMass * nucleiMass);
|
||||
};
|
||||
|
||||
void setNucleiMass() {
|
||||
|
||||
nucleiMass = 0.93827 * Z + 0.93957 * (A - Z) - 0.001 * bindingEnergy(A, Z);
|
||||
};
|
||||
|
||||
void setExitonConfiguration(const G4ExitonConfiguration& config) {
|
||||
|
||||
theExitonConfiguration = config;
|
||||
};
|
||||
|
||||
G4double getA() const {
|
||||
|
||||
return A;
|
||||
};
|
||||
|
||||
G4double getZ() const {
|
||||
|
||||
return Z;
|
||||
};
|
||||
|
||||
G4double getExitationEnergy() const {
|
||||
|
||||
return exitationEnergy;
|
||||
};
|
||||
|
||||
G4double getExitationEnergyInGeV() const {
|
||||
|
||||
return 0.001 * exitationEnergy;
|
||||
};
|
||||
|
||||
G4ExitonConfiguration getExitonConfiguration() const {
|
||||
|
||||
return theExitonConfiguration;
|
||||
};
|
||||
|
||||
G4double getMass() const {
|
||||
|
||||
return nucleiMass;
|
||||
};
|
||||
|
||||
G4double getKineticEnergy() const {
|
||||
|
||||
return momentum[0] - nucleiMass;
|
||||
};
|
||||
|
||||
G4double getNucleiMass(G4double a,
|
||||
G4double z) const {
|
||||
|
||||
return 0.93827 * z + 0.93957 * (a - z) - 0.001 * bindingEnergy(a, z);
|
||||
};
|
||||
|
||||
virtual void printParticle() const {
|
||||
|
||||
G4cout << " A " << A << " Z " << Z << " mass " << nucleiMass <<
|
||||
" Eex (MeV) " << exitationEnergy << G4endl;
|
||||
|
||||
if(momentum.size() == 4)
|
||||
G4cout << " Px " << momentum[1] << " Py " << momentum[2] << " Pz " <<
|
||||
momentum[3] << " E " << momentum[0] << G4endl;
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
G4double A;
|
||||
G4double Z;
|
||||
G4double exitationEnergy;
|
||||
G4double nucleiMass;
|
||||
G4ExitonConfiguration theExitonConfiguration;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4INUCL_NUCLEI_HH
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4INUCL_PARTICLE_HH
|
||||
#define G4INUCL_PARTICLE_HH
|
||||
|
||||
#ifndef GLOB
|
||||
#include "globals.hh"
|
||||
#endif
|
||||
|
||||
#include "g4std/iostream"
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4InuclParticle {
|
||||
|
||||
public:
|
||||
|
||||
G4InuclParticle() {};
|
||||
|
||||
virtual ~G4InuclParticle() { };
|
||||
|
||||
G4InuclParticle(const G4std::vector<G4double>& mom) {
|
||||
|
||||
setMomentum(mom);
|
||||
};
|
||||
|
||||
void setMomentum(const G4std::vector<G4double>& mom) {
|
||||
|
||||
momentum = mom;
|
||||
};
|
||||
|
||||
G4std::vector<G4double> getMomentum() const {
|
||||
|
||||
return momentum;
|
||||
};
|
||||
|
||||
G4double getMomModule() const {
|
||||
|
||||
return sqrt(momentum[1] * momentum[1] +
|
||||
momentum[2] * momentum[2] +
|
||||
momentum[3] * momentum[3]);
|
||||
};
|
||||
|
||||
virtual void printParticle() const {
|
||||
|
||||
G4cout << " px " << momentum[1] << " py " << momentum[2] <<
|
||||
" pz " << momentum[3] <<
|
||||
" pmod " << sqrt(momentum[1] * momentum[1] +
|
||||
momentum[2] * momentum[2] +
|
||||
momentum[3] * momentum[3])
|
||||
<< " E " << momentum[0] << G4endl;
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
G4std::vector<G4double> momentum;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4INUCL_PARTICLE_HH
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4INUCL_SPECIAL_FUNC_HH
|
||||
#define G4INUCL_SPECIAL_FUNC_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include <math.h>
|
||||
#include "g4std/algorithm"
|
||||
#include "g4std/vector"
|
||||
|
||||
|
||||
namespace G4InuclSpecialFunctions {
|
||||
|
||||
G4double bindingEnergyExact(G4double A,
|
||||
G4double Z);
|
||||
|
||||
G4double bindingEnergyKummel(G4double A,
|
||||
G4double Z);
|
||||
|
||||
G4double bindingEnergy(G4double A,
|
||||
G4double Z);
|
||||
|
||||
G4double bindingEnergyAsymptotic(G4double A,
|
||||
G4double Z);
|
||||
|
||||
G4double FermiEnergy(G4double A,
|
||||
G4double Z,
|
||||
G4int ntype);
|
||||
|
||||
G4std::pair<G4std::vector<G4double>, G4std::vector<G4double> > paraMaker(G4double Z);
|
||||
|
||||
G4std::pair<G4double, G4double> paraMakerTruncated(G4double Z);
|
||||
|
||||
G4double getAL(G4double A);
|
||||
|
||||
G4double csNN(G4double e);
|
||||
|
||||
G4double csPN(G4double e);
|
||||
|
||||
G4double inuclRndm();
|
||||
|
||||
G4double randomGauss(G4double sigma);
|
||||
|
||||
G4double randomPHI();
|
||||
|
||||
G4std::pair<G4double, G4double> randomCOS_SIN();
|
||||
|
||||
G4double nucleiLevelDensity(G4double a);
|
||||
|
||||
G4std::vector<G4double> generateWithFixedTheta(G4double ct,
|
||||
G4double p);
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4LORENTZ_CONVERTOR_HH
|
||||
#define G4LORENTZ_CONVERTOR_HH
|
||||
|
||||
#ifndef GLOB
|
||||
#include "globals.hh"
|
||||
#endif
|
||||
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4LorentzConvertor {
|
||||
|
||||
public:
|
||||
|
||||
G4LorentzConvertor();
|
||||
|
||||
G4LorentzConvertor(const G4std::vector<G4double>& bmom,
|
||||
G4double bmass,
|
||||
const G4std::vector<G4double>& tmom,
|
||||
G4double tmass) {
|
||||
|
||||
setBullet(bmom, bmass);
|
||||
setTarget(tmom, tmass);
|
||||
degenerated = false;
|
||||
};
|
||||
|
||||
void setBullet(const G4std::vector<G4double>& bmom,
|
||||
G4double bmass) {
|
||||
|
||||
bullet_mom = bmom;
|
||||
bullet_mass = bmass;
|
||||
// G4cout << " bullet: e " << bmom[0] << " mass " << bmass << G4endl;
|
||||
};
|
||||
|
||||
void setTarget(const G4std::vector<G4double>& tmom,
|
||||
G4double tmass) {
|
||||
|
||||
target_mom = tmom;
|
||||
target_mass = tmass;
|
||||
// G4cout << " target: e " << tmom[0] << " mass " << tmass << G4endl;
|
||||
};
|
||||
|
||||
void toTheCenterOfMass();
|
||||
|
||||
void toTheTargetRestFrame();
|
||||
|
||||
G4std::vector<G4double> backToTheLab(const G4std::vector<G4double>& mom) const;
|
||||
|
||||
G4double getKinEnergyInTheTRS() const {
|
||||
|
||||
G4double pv = bullet_mom[1] * target_mom[1] +
|
||||
bullet_mom[2] * target_mom[2] +
|
||||
bullet_mom[3] * target_mom[3];
|
||||
G4double ekin_trf = (target_mom[0] *
|
||||
bullet_mom[0] - pv) / target_mass - bullet_mass;
|
||||
return ekin_trf;
|
||||
};
|
||||
|
||||
G4double getTotalSCMEnergy() const {
|
||||
|
||||
return ecm_tot;
|
||||
};
|
||||
|
||||
G4double getSCMMomentum() const {
|
||||
|
||||
return pscm;
|
||||
};
|
||||
|
||||
G4double getTRSMomentum() const {
|
||||
|
||||
return plab;
|
||||
};
|
||||
|
||||
G4std::vector<G4double> rotate(const G4std::vector<G4double> mom) const;
|
||||
|
||||
G4std::vector<G4double> rotate(const G4std::vector<G4double> mom1,
|
||||
const G4std::vector<G4double> mom) const;
|
||||
|
||||
G4bool reflectionNeeded() const;
|
||||
|
||||
G4bool trivial() const {
|
||||
return degenerated;
|
||||
};
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
G4std::vector<G4double> bullet_mom;
|
||||
G4double bullet_mass;
|
||||
|
||||
G4std::vector<G4double> target_mom;
|
||||
G4double target_mass;
|
||||
|
||||
G4std::vector<G4double> velocity;
|
||||
|
||||
G4std::vector<G4double> scm_momentum;
|
||||
|
||||
G4double ecm_tot;
|
||||
|
||||
G4double pscm;
|
||||
|
||||
G4double plab;
|
||||
|
||||
G4double gamma;
|
||||
|
||||
G4double v2;
|
||||
|
||||
G4double ga;
|
||||
|
||||
G4double gb;
|
||||
|
||||
G4double gbpp;
|
||||
|
||||
G4double gapp;
|
||||
|
||||
G4bool degenerated;
|
||||
};
|
||||
|
||||
#endif // G4LORENTZ_CONVERTOR_HH
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4NON_EQUILIBRIUM_EVAPORATOR_HH
|
||||
#define G4NON_EQUILIBRIUM_EVAPORATOR_HH
|
||||
|
||||
#include "G4Collider.hh"
|
||||
#include "G4InuclSpecialFunctions.hh"
|
||||
|
||||
using namespace G4InuclSpecialFunctions;
|
||||
|
||||
class G4NonEquilibriumEvaporator : public G4Collider {
|
||||
|
||||
public:
|
||||
|
||||
G4NonEquilibriumEvaporator();
|
||||
|
||||
virtual G4CollisionOutput collide(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target);
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
G4double getMatrixElement(G4double A) const;
|
||||
|
||||
G4double getE0(G4double A) const;
|
||||
|
||||
G4double getParLev(G4double A, G4double Z) const;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4NON_EQUILIBRIUM_EVAPORATOR_HH
|
||||
@@ -0,0 +1,277 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4NUCL_WATCHER_HH
|
||||
#define G4NUCL_WATCHER_HH
|
||||
|
||||
#ifndef GLOB
|
||||
#include "globals.hh"
|
||||
#endif
|
||||
|
||||
#include "g4std/algorithm"
|
||||
#include "g4std/vector"
|
||||
#include <math.h>
|
||||
|
||||
class G4NuclWatcher {
|
||||
|
||||
public:
|
||||
|
||||
G4NuclWatcher(G4double z,
|
||||
G4std::vector<G4double> expa,
|
||||
G4std::vector<G4double> expcs,
|
||||
G4std::vector<G4double> experr,
|
||||
G4bool check,
|
||||
G4bool nucl)
|
||||
: nuclz(z),
|
||||
checkable(check),
|
||||
nucleable(nucl) {
|
||||
|
||||
exper_as = expa;
|
||||
exper_cs = expcs;
|
||||
exper_err = experr;
|
||||
};
|
||||
|
||||
void watch(G4double a,
|
||||
G4double z) {
|
||||
|
||||
const G4double small = 0.001;
|
||||
|
||||
if(fabs(z - nuclz) < small) {
|
||||
G4bool here = false;
|
||||
G4int simulatedAsSize = simulated_as.size();
|
||||
for(G4int i = 0; i < simulatedAsSize; i++) {
|
||||
|
||||
if(fabs(simulated_as[i] - a) < small) {
|
||||
simulated_cs[i] += 1.0;
|
||||
here = true;
|
||||
break;
|
||||
};
|
||||
};
|
||||
if(!here) {
|
||||
simulated_as.push_back(a);
|
||||
simulated_cs.push_back(1.0);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
void setInuclCs(G4double csec,
|
||||
G4int nev) {
|
||||
G4int simulatedAsSize = simulated_as.size();
|
||||
for(G4int i = 0; i < simulatedAsSize ; i++) {
|
||||
double err = sqrt(simulated_cs[i]) / simulated_cs[i];
|
||||
|
||||
simulated_prob.push_back(simulated_cs[i] / nev);
|
||||
simulated_cs[i] *= csec / nev;
|
||||
simulated_errors.push_back(simulated_cs[i] * err);
|
||||
};
|
||||
};
|
||||
|
||||
G4double getChsq() const {
|
||||
|
||||
return izotop_chsq;
|
||||
};
|
||||
|
||||
G4std::pair<G4double, G4double> getAverageRatio() const {
|
||||
|
||||
return G4std::pair<G4double, G4double>(average_ratio, aver_rat_err);
|
||||
};
|
||||
|
||||
G4std::pair<G4double, G4double> getExpCs() const {
|
||||
|
||||
G4double cs = 0.0;
|
||||
G4double err = 0.0;
|
||||
|
||||
G4int experAsSize = exper_as.size();
|
||||
for(G4int iz = 0; iz < experAsSize; iz++) {
|
||||
cs += exper_cs[iz];
|
||||
err += exper_err[iz];
|
||||
};
|
||||
|
||||
return G4std::pair<G4double, G4double>(cs, err);
|
||||
};
|
||||
|
||||
G4bool to_check() const {
|
||||
|
||||
return checkable;
|
||||
};
|
||||
|
||||
G4bool look_forNuclei() const {
|
||||
|
||||
return nucleable;
|
||||
};
|
||||
|
||||
G4std::pair<G4double, G4double> getInuclCs() const {
|
||||
|
||||
G4double cs = 0.0;
|
||||
G4double err = 0.0;
|
||||
G4int simulatedAsSize = simulated_as.size();
|
||||
for(G4int iz = 0; iz < simulatedAsSize; iz++) {
|
||||
cs += simulated_cs[iz];
|
||||
err += simulated_errors[iz];
|
||||
};
|
||||
|
||||
return G4std::pair<G4double, G4double>(cs, err);
|
||||
};
|
||||
|
||||
void print() {
|
||||
|
||||
const G4double small = 0.001;
|
||||
|
||||
G4cout << G4endl << " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "
|
||||
<< G4endl;
|
||||
G4cout << " **** izotop Z **** " << nuclz << G4endl;
|
||||
|
||||
izotop_chsq = 0.0;
|
||||
average_ratio = 0.0;
|
||||
aver_rat_err = 0.0;
|
||||
G4double exp_cs = 0.0;
|
||||
G4double exp_cs_err = 0.0;
|
||||
G4double inucl_cs = 0.0;
|
||||
G4double inucl_cs_err = 0.0;
|
||||
G4std::vector<G4bool> not_used(simulated_cs.size(), true);
|
||||
G4int nmatched = exper_as.size();
|
||||
G4int nused = simulated_cs.size();
|
||||
G4double lhood = 0.0;
|
||||
G4int experAsSize = exper_as.size();
|
||||
for(G4int iz = 0; iz < experAsSize; iz++) {
|
||||
G4double a = exper_as[iz];
|
||||
|
||||
exp_cs += exper_cs[iz];
|
||||
exp_cs_err += exper_err[iz];
|
||||
|
||||
G4bool found = false;
|
||||
G4int simulatedAsSize = simulated_as.size();
|
||||
for(G4int i = 0; i < simulatedAsSize; i++) {
|
||||
|
||||
if(fabs(simulated_as[i] - a) < small) {
|
||||
G4double rat = simulated_cs[i] / exper_cs[iz];
|
||||
|
||||
lhood += log10(rat) * log10(rat);
|
||||
|
||||
G4double rat_err = sqrt(simulated_errors[i] * simulated_errors[i] +
|
||||
exper_err[iz] * exper_err[iz] * rat * rat) / exper_cs[iz];
|
||||
average_ratio += rat;
|
||||
aver_rat_err += rat_err;
|
||||
|
||||
G4cout << " A " << a << " exp.cs " << exper_cs[iz] << " err " <<
|
||||
exper_err[iz] << G4endl <<
|
||||
" sim. cs " << simulated_cs[i] << " err " << simulated_errors[i] << G4endl
|
||||
<< " ratio " << rat << " err " << rat_err << G4endl;
|
||||
G4cout << " simulated production rate " << simulated_prob[i] << G4endl;
|
||||
|
||||
not_used[i] = false;
|
||||
izotop_chsq += (rat - 1.0) * (rat - 1.0) / rat_err / rat_err;
|
||||
found = true;
|
||||
nused--;
|
||||
break;
|
||||
};
|
||||
};
|
||||
if(!found) {
|
||||
G4cout << " not found exper.: A " << a << " exp.cs " << exper_cs[iz]
|
||||
<< " err " << exper_err[iz] << G4endl;
|
||||
}
|
||||
else {
|
||||
nmatched--;
|
||||
};
|
||||
};
|
||||
|
||||
G4cout << " not found in simulations " << nmatched << G4endl;
|
||||
G4cout << " not found in exper: " << nused << G4endl;
|
||||
G4int simulatedAsSize = simulated_as.size();
|
||||
for(G4int i = 0; i < simulatedAsSize; i++) {
|
||||
inucl_cs += simulated_cs[i];
|
||||
inucl_cs_err += simulated_errors[i];
|
||||
|
||||
if(not_used[i])
|
||||
G4cout << " extra simul.: A " << simulated_as[i] <<
|
||||
" sim. cs " << simulated_cs[i] << " err " << simulated_errors[i] << G4endl;
|
||||
G4cout << " simulated production rate " << simulated_prob[i] << G4endl;
|
||||
};
|
||||
G4int matched = exper_as.size() - nmatched;
|
||||
|
||||
if(matched > 0) {
|
||||
aver_lhood = lhood;
|
||||
aver_matched = matched;
|
||||
lhood = pow(10.0, sqrt(lhood / matched));
|
||||
|
||||
G4cout << " matched " << matched << " CHSQ " << sqrt(izotop_chsq) / matched
|
||||
<< G4endl
|
||||
<< " raw chsq " << izotop_chsq << G4endl
|
||||
<< " average ratio " << average_ratio / matched
|
||||
<< " err " << aver_rat_err / matched << G4endl
|
||||
<< " lhood " << lhood << G4endl;
|
||||
}
|
||||
else {
|
||||
izotop_chsq = 0.0;
|
||||
aver_lhood = 0.0;
|
||||
};
|
||||
|
||||
G4cout << " exper. cs " << exp_cs << " err " << exp_cs_err << G4endl
|
||||
<< " inucl. cs " << inucl_cs << " err " << inucl_cs_err << G4endl;
|
||||
G4cout << " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ " << G4endl;
|
||||
};
|
||||
|
||||
G4double getLhood() const {
|
||||
|
||||
return aver_lhood;
|
||||
};
|
||||
|
||||
G4double getNmatched() const {
|
||||
|
||||
return aver_matched;
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
G4double nuclz;
|
||||
|
||||
G4double izotop_chsq;
|
||||
|
||||
G4double average_ratio;
|
||||
|
||||
G4double aver_rat_err;
|
||||
|
||||
G4double aver_lhood;
|
||||
|
||||
G4double aver_matched;
|
||||
|
||||
G4std::vector<G4double> exper_as;
|
||||
|
||||
G4std::vector<G4double> exper_cs;
|
||||
|
||||
G4std::vector<G4double> exper_err;
|
||||
|
||||
G4std::vector<G4double> simulated_as;
|
||||
|
||||
G4std::vector<G4double> simulated_cs;
|
||||
|
||||
G4std::vector<G4double> simulated_errors;
|
||||
|
||||
G4std::vector<G4double> simulated_prob;
|
||||
|
||||
G4bool checkable;
|
||||
|
||||
G4bool nucleable;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4NUCL_WATCHER_HH
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4NUCLEI_MODEL_HH
|
||||
#define G4NUCLEI_MODEL_HH
|
||||
|
||||
//#include "G4InuclNuclei.hh"
|
||||
|
||||
#ifndef G4INUCL_ELEMENTARY_PARTICLE_HH
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
#endif
|
||||
#include "G4CascadParticle.hh"
|
||||
#include "G4InuclSpecialFunctions.hh"
|
||||
#include "G4CascadSpecialFunctions.hh"
|
||||
#include "G4ElementaryParticleCollider.hh"
|
||||
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4InuclNuclei;
|
||||
|
||||
using namespace G4InuclSpecialFunctions;
|
||||
using namespace G4CascadSpecialFunctions;
|
||||
|
||||
typedef G4std::pair<G4InuclElementaryParticle, G4double> partner;
|
||||
typedef G4std::vector<partner> partners;
|
||||
|
||||
class G4NucleiModel {
|
||||
|
||||
public:
|
||||
|
||||
G4NucleiModel();
|
||||
|
||||
G4NucleiModel(G4InuclNuclei* nuclei) {
|
||||
|
||||
generateModel(nuclei->getA(), nuclei->getZ());
|
||||
};
|
||||
|
||||
void generateModel(G4double a,
|
||||
G4double z);
|
||||
|
||||
void reset() {
|
||||
|
||||
neutronNumberCurrent = neutronNumber;
|
||||
protonNumberCurrent = protonNumber;
|
||||
};
|
||||
|
||||
void printModel() const;
|
||||
|
||||
G4double getDensity(G4int ip,
|
||||
G4int izone) const {
|
||||
|
||||
return nucleon_densities[ip - 1][izone];
|
||||
};
|
||||
|
||||
G4double getFermiMomentum(G4int ip,
|
||||
G4int izone) const {
|
||||
|
||||
return fermi_momenta[ip - 1][izone];
|
||||
};
|
||||
|
||||
G4double getFermiKinetic(G4int ip,
|
||||
G4int izone) const {
|
||||
|
||||
G4double ekin = 0.0;
|
||||
|
||||
if(ip < 3 && izone < number_of_zones) {
|
||||
G4double pf = fermi_momenta[ip - 1][izone];
|
||||
G4double mass = ip == 1 ? 0.93827 : 0.93957;
|
||||
|
||||
ekin = sqrt(pf * pf + mass * mass) - mass;
|
||||
};
|
||||
|
||||
return ekin;
|
||||
};
|
||||
|
||||
G4double getPotential(G4int ip,
|
||||
G4int izone) const {
|
||||
|
||||
G4int ip0 = ip < 3 ? ip - 1 : 2;
|
||||
|
||||
return izone < number_of_zones ? zone_potentials[ip0][izone] : 0.0;
|
||||
};
|
||||
|
||||
G4std::vector<G4CascadParticle>
|
||||
generateParticleFate(G4CascadParticle& cparticle,
|
||||
G4ElementaryParticleCollider* theElementaryParticleCollider);
|
||||
|
||||
G4double getNumberOfNeutrons() const {
|
||||
|
||||
return neutronNumberCurrent;
|
||||
};
|
||||
|
||||
G4double getNumberOfProtons() const {
|
||||
|
||||
return protonNumberCurrent;
|
||||
};
|
||||
|
||||
G4bool empty() const {
|
||||
|
||||
return neutronNumberCurrent < 1.0 && protonNumberCurrent < 1.0;
|
||||
};
|
||||
|
||||
G4bool stillInside(const G4CascadParticle& cparticle) {
|
||||
|
||||
return cparticle.getCurrentZone() < number_of_zones;
|
||||
};
|
||||
|
||||
G4CascadParticle initializeCascad(G4InuclElementaryParticle* particle);
|
||||
|
||||
G4std::pair<G4std::vector<G4CascadParticle>, G4std::vector<G4InuclElementaryParticle> > initializeCascad(G4InuclNuclei* bullet, G4InuclNuclei* target);
|
||||
|
||||
G4std::pair<G4int, G4int> getTypesOfNucleonsInvolved() const {
|
||||
return G4std::pair<G4int, G4int>(current_nucl1, current_nucl2);
|
||||
};
|
||||
G4bool worthToPropagate(const G4CascadParticle& cparticle) const;
|
||||
|
||||
G4InuclElementaryParticle generateNucleon(G4int type,
|
||||
G4int zone) const;
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
G4bool passFermi(const G4std::vector<G4InuclElementaryParticle>& particles,
|
||||
G4int zone);
|
||||
|
||||
void boundaryTransition(G4CascadParticle& cparticle);
|
||||
|
||||
G4InuclElementaryParticle generateQuasiDeutron(G4int type1,
|
||||
G4int type2,
|
||||
G4int zone) const;
|
||||
|
||||
partners generateInteractionPartners(G4CascadParticle& cparticle) const;
|
||||
|
||||
G4double volNumInt(G4double r1,
|
||||
G4double r2,
|
||||
G4double cu,
|
||||
G4double d1) const;
|
||||
|
||||
G4double volNumInt1(G4double r1,
|
||||
G4double r2,
|
||||
G4double cu2) const;
|
||||
|
||||
G4double getRatio(G4int ip) const;
|
||||
|
||||
G4std::vector<G4std::vector<G4double> > nucleon_densities;
|
||||
|
||||
G4std::vector<G4std::vector<G4double> > zone_potentials;
|
||||
|
||||
G4std::vector<G4std::vector<G4double> > fermi_momenta;
|
||||
|
||||
G4std::vector<G4double> zone_radii;
|
||||
|
||||
G4std::vector<G4double> binding_energies;
|
||||
|
||||
G4double nuclei_radius;
|
||||
|
||||
G4int number_of_zones;
|
||||
|
||||
G4double A;
|
||||
|
||||
G4double Z;
|
||||
|
||||
G4double neutronNumber;
|
||||
|
||||
G4double protonNumber;
|
||||
|
||||
G4double neutronNumberCurrent;
|
||||
|
||||
G4double protonNumberCurrent;
|
||||
|
||||
G4int current_nucl1;
|
||||
|
||||
G4int current_nucl2;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4NUCLEI_MODEL_HH
|
||||
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4PARTICLE_LARGER_EKIN_HH
|
||||
#define G4PARTICLE_LARGER_EKIN_HH
|
||||
|
||||
#ifndef G4INUCL_ELEMENTARY_PARTICLE_HH
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
#endif
|
||||
|
||||
class G4ParticleLargerEkin {
|
||||
|
||||
public:
|
||||
|
||||
G4bool operator() (const G4InuclElementaryParticle& part1,
|
||||
const G4InuclElementaryParticle& part2) {
|
||||
|
||||
return part1.getKineticEnergy() >= part2.getKineticEnergy();
|
||||
// return part1.getEnergy() >= part2.getEnergy();
|
||||
// return part1.getMomModule() >= part2.getMomModule();
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif // G4PARTICLE_LARGER_EKIN_HH
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
#ifndef G4REGIONMODEL
|
||||
#define G4REGIONMODEL
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "g4std/vector"
|
||||
#include <math.h>
|
||||
#include "globals.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
//#include "G4NucleusModel.hh"
|
||||
|
||||
|
||||
typedef G4std::vector<G4double>::const_iterator iterator;
|
||||
|
||||
class G4RegionModel //:public G4VRegionModel
|
||||
{
|
||||
public:
|
||||
G4RegionModel(const G4int numberOfLayers, const G4int A, const G4int Z);
|
||||
~G4RegionModel();
|
||||
|
||||
//instead of A and Z outer radius of the nucleus?
|
||||
//void Init(const G4int numberOfLayers, const G4int A, const G4int Z);
|
||||
G4double GetDensity(G4double radius);
|
||||
G4double GetPotentialEnergy(G4double r, G4int particle);
|
||||
G4double GetMaximumNucleonMomentum(G4double radius, G4int nucleon);
|
||||
// G4double NumberOfRegions();
|
||||
|
||||
private:
|
||||
|
||||
G4int massNumber;
|
||||
G4int protonNumber;
|
||||
G4std::vector<G4double> radius; //contains the outer radiuses of the shells
|
||||
G4std::vector<G4double> density;
|
||||
G4std::vector<G4double> protonFermiEnergy;
|
||||
G4std::vector<G4double> neutronFermiEnergy;
|
||||
G4std::vector<G4double> protonFermiMomentum;
|
||||
G4std::vector<G4double> neutronFermiMomentum;
|
||||
|
||||
G4std::vector<G4double> protonPotentialEnergy;
|
||||
G4std::vector<G4double> neutronPotentialEnergy;
|
||||
|
||||
static const G4double radius0;
|
||||
static const G4double BE;
|
||||
//static const G4double pi = 3.141592;
|
||||
|
||||
G4double GetFermiMomentum(G4double density, G4double mass);
|
||||
G4double GetFermiEnergy(G4double density, G4double mass);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 G4WATCHER_GUN_HH
|
||||
#define G4WATCHER_GUN_HH
|
||||
|
||||
#include "G4NuclWatcher.hh"
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4WatcherGun {
|
||||
|
||||
public:
|
||||
|
||||
G4WatcherGun();
|
||||
void setWatchers();
|
||||
|
||||
G4std::vector<G4NuclWatcher> getWatchers() const {
|
||||
return watchers;
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
G4int verboseLevel;
|
||||
G4std::vector<G4NuclWatcher> watchers;
|
||||
|
||||
};
|
||||
|
||||
#endif // G4WATCHER_GUN_HH
|
||||
@@ -0,0 +1,351 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
#include "G4Analyser.hh"
|
||||
#include <math.h>
|
||||
|
||||
G4Analyser::G4Analyser()
|
||||
:verboseLevel(1) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Analyser::G4Analyser" << G4endl;
|
||||
}
|
||||
|
||||
eventNumber = 0.0;
|
||||
averageMultiplicity = 0.0;
|
||||
averageNucleonKinEnergy = 0.0;
|
||||
averageProtonKinEnergy = 0.0;
|
||||
averageNeutronKinEnergy = 0.0;
|
||||
averagePionKinEnergy = 0.0;
|
||||
averageProtonNumber = 0.0;
|
||||
averageNeutronNumber = 0.0;
|
||||
averagePionNumber = 0.0;
|
||||
averageExitationEnergy = 0.0;
|
||||
averageNucleiFragments = 0.0;
|
||||
averagePionPl = 0.0;
|
||||
averagePionMin = 0.0;
|
||||
averagePion0 = 0.0;
|
||||
averageA = 0.0;
|
||||
averageZ = 0.0;
|
||||
|
||||
withNuclei = false;
|
||||
fissy_prob = 0.0;
|
||||
};
|
||||
|
||||
void G4Analyser::setInelCsec(G4double csec,
|
||||
G4bool withn) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Analyser::setInelCsec" << G4endl;
|
||||
}
|
||||
|
||||
inel_csec = csec; // mb
|
||||
withNuclei = withn;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " total inelastic " << inel_csec << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
void G4Analyser::setWatchers(const G4std::vector<G4NuclWatcher>& watchers) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Analyser::setWatchers" << G4endl;
|
||||
}
|
||||
|
||||
ana_watchers = watchers;
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " watchers set " << watchers.size() << G4endl;
|
||||
}
|
||||
};
|
||||
|
||||
void G4Analyser::try_watchers(G4double a,
|
||||
G4double z,
|
||||
G4bool if_nucl) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Analyser::try_watchers" << G4endl;
|
||||
}
|
||||
|
||||
for (G4int iw = 0; iw < G4int(ana_watchers.size()); iw++) {
|
||||
|
||||
if (if_nucl) {
|
||||
|
||||
if (ana_watchers[iw].look_forNuclei()) ana_watchers[iw].watch(a, z);
|
||||
|
||||
} else {
|
||||
|
||||
if (!ana_watchers[iw].look_forNuclei()) ana_watchers[iw].watch(a, z);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
void G4Analyser::analyse(const G4CollisionOutput& output) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Analyser::analyse" << G4endl;
|
||||
}
|
||||
|
||||
if (withNuclei) {
|
||||
G4std::vector<G4InuclNuclei> nucleus = output.getNucleiFragments();
|
||||
|
||||
if (nucleus.size() >= 0) {
|
||||
G4int nbig = 0;
|
||||
averageNucleiFragments += nucleus.size();
|
||||
|
||||
for (G4int in = 0; in < G4int(nucleus.size()); in++) {
|
||||
averageExitationEnergy += nucleus[in].getExitationEnergy();
|
||||
|
||||
G4double a = nucleus[in].getA();
|
||||
G4double z = nucleus[in].getZ();
|
||||
|
||||
if (in == 0) {
|
||||
averageA += a;
|
||||
averageZ += z;
|
||||
};
|
||||
|
||||
if (a > 10.0) nbig++;
|
||||
try_watchers(a, z, true);
|
||||
};
|
||||
|
||||
if (nbig > 1) fissy_prob += 1.0;
|
||||
eventNumber += 1.0;
|
||||
G4std::vector<G4InuclElementaryParticle> particles = output.getOutgoingParticles();
|
||||
averageMultiplicity += particles.size();
|
||||
|
||||
for (G4int i = 0; i < G4int(particles.size()); i++) {
|
||||
G4double ap = 0.0;
|
||||
G4double zp = 0.0;
|
||||
|
||||
if (particles[i].nucleon()) {
|
||||
averageNucleonKinEnergy += particles[i].getKineticEnergy();
|
||||
|
||||
if (particles[i].type() == 1) {
|
||||
zp = 1.0;
|
||||
ap = 1.0;
|
||||
averageProtonNumber += 1.0;
|
||||
averageProtonKinEnergy += particles[i].getKineticEnergy();
|
||||
|
||||
} else {
|
||||
ap = 1.0;
|
||||
zp = 0.0;
|
||||
averageNeutronNumber += 1.0;
|
||||
averageNeutronKinEnergy += particles[i].getKineticEnergy();
|
||||
};
|
||||
|
||||
} else if (particles[i].pion()) {
|
||||
averagePionKinEnergy += particles[i].getKineticEnergy();
|
||||
averagePionNumber += 1.0;
|
||||
ap = 0.0;
|
||||
|
||||
if (particles[i].type() == 3) {
|
||||
zp = 1.0;
|
||||
averagePionPl += 1.0;
|
||||
|
||||
} else if (particles[i].type() == 5) {
|
||||
zp = -1.0;
|
||||
averagePionMin += 1.0;
|
||||
|
||||
} else if (particles[i].type() == 7) {
|
||||
zp = 0.0;
|
||||
averagePion0 += 1.0;
|
||||
};
|
||||
};
|
||||
try_watchers(ap, zp, false);
|
||||
};
|
||||
};
|
||||
|
||||
} else {
|
||||
eventNumber += 1.0;
|
||||
G4std::vector<G4InuclElementaryParticle> particles = output.getOutgoingParticles();
|
||||
averageMultiplicity += particles.size();
|
||||
|
||||
for (G4int i = 0; i < G4int(particles.size()); i++) {
|
||||
|
||||
if (particles[i].nucleon()) {
|
||||
averageNucleonKinEnergy += particles[i].getKineticEnergy();
|
||||
|
||||
if (particles[i].type() == 1) {
|
||||
averageProtonNumber += 1.0;
|
||||
averageProtonKinEnergy += particles[i].getKineticEnergy();
|
||||
|
||||
} else {
|
||||
averageNeutronNumber += 1.0;
|
||||
averageNeutronKinEnergy += particles[i].getKineticEnergy();
|
||||
};
|
||||
|
||||
} else if (particles[i].pion()) {
|
||||
averagePionKinEnergy += particles[i].getKineticEnergy();
|
||||
averagePionNumber += 1.0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
void G4Analyser::printResultsSimple() {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Analyser::printResultsSimple" << G4endl;
|
||||
}
|
||||
|
||||
G4cout << " Number of events " << int(eventNumber + 0.1) << G4endl
|
||||
<< " average multiplicity " << averageMultiplicity / eventNumber << G4endl
|
||||
<< " average proton number " << averageProtonNumber / eventNumber << G4endl
|
||||
<< " average neutron number " << averageNeutronNumber / eventNumber << G4endl
|
||||
<< " average nucleon Ekin " << averageNucleonKinEnergy /
|
||||
(averageProtonNumber + averageNeutronNumber) << G4endl
|
||||
<< " average proton Ekin " << averageProtonKinEnergy / (averageProtonNumber +
|
||||
1.0e-10) << G4endl
|
||||
<< " average neutron Ekin " << averageNeutronKinEnergy / (averageNeutronNumber +
|
||||
1.0e-10) << G4endl
|
||||
<< " average pion number " << averagePionNumber / eventNumber << G4endl
|
||||
<< " average pion Ekin " << averagePionKinEnergy / (averagePionNumber +
|
||||
1.0e-10) << G4endl;
|
||||
if (withNuclei) {
|
||||
G4cout
|
||||
<< " average Exitation Energy " <<
|
||||
averageExitationEnergy / averageNucleiFragments << G4endl
|
||||
<< " average num of fragments " << averageNucleiFragments / eventNumber << G4endl;
|
||||
G4cout << " fission prob. " << fissy_prob / eventNumber << " c.sec " <<
|
||||
inel_csec * fissy_prob / eventNumber << G4endl;
|
||||
};
|
||||
};
|
||||
|
||||
void G4Analyser::printResults() {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Analyser::printResults" << G4endl;
|
||||
}
|
||||
|
||||
G4cout << " Number of events " << int(eventNumber + 0.1) << G4endl
|
||||
<< " average multiplicity " << averageMultiplicity / eventNumber << G4endl
|
||||
<< " average proton number " << averageProtonNumber / eventNumber << G4endl
|
||||
<< " average neutron number " << averageNeutronNumber / eventNumber << G4endl
|
||||
<< " average nucleon Ekin " << averageNucleonKinEnergy /
|
||||
(averageProtonNumber + averageNeutronNumber) << G4endl
|
||||
<< " average proton Ekin " << averageProtonKinEnergy / (averageProtonNumber +
|
||||
1.0e-10) << G4endl
|
||||
<< " average neutron Ekin " << averageNeutronKinEnergy / (averageNeutronNumber +
|
||||
1.0e-10) << G4endl
|
||||
<< " average pion number " << averagePionNumber / eventNumber << G4endl
|
||||
<< " average pion Ekin " << averagePionKinEnergy / (averagePionNumber +
|
||||
1.0e-10) << G4endl
|
||||
<< " average pi+ " << averagePionPl / eventNumber << G4endl
|
||||
<< " average pi- " << averagePionMin / eventNumber << G4endl
|
||||
<< " average pi0 " << averagePion0 / eventNumber << G4endl;
|
||||
|
||||
if (withNuclei) {
|
||||
|
||||
G4cout
|
||||
<< " average A " << averageA / eventNumber << G4endl
|
||||
<< " average Z " << averageZ / eventNumber << G4endl
|
||||
<< " average Exitation Energy " <<
|
||||
averageExitationEnergy / averageNucleiFragments << G4endl
|
||||
<< " average num of fragments " << averageNucleiFragments / eventNumber << G4endl;
|
||||
G4cout << " fission prob. " << fissy_prob / eventNumber << " c.sec " <<
|
||||
inel_csec * fissy_prob / eventNumber << G4endl;
|
||||
handleWatcherStatistics();
|
||||
};
|
||||
};
|
||||
|
||||
void G4Analyser::handleWatcherStatistics() {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Analyser::handleWatcherStatistics" << G4endl;
|
||||
}
|
||||
|
||||
// const G4double small = 1.0e-10;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>>Izotop analysis:" << G4endl;
|
||||
};
|
||||
|
||||
G4double fgr = 0.0;
|
||||
G4double averat = 0.0;
|
||||
G4double ave_err = 0.0;
|
||||
G4double gl_chsq = 0.0;
|
||||
G4double tot_exper = 0.0;
|
||||
G4double tot_exper_err = 0.0;
|
||||
G4double tot_inucl = 0.0;
|
||||
G4double tot_inucl_err = 0.0;
|
||||
G4double checked = 0.0;
|
||||
|
||||
for (G4int iw = 0; iw < G4int(ana_watchers.size()); iw++) {
|
||||
ana_watchers[iw].setInuclCs(inel_csec, eventNumber);
|
||||
ana_watchers[iw].print();
|
||||
|
||||
if (ana_watchers[iw].to_check()) {
|
||||
G4std::pair<G4double, G4double> rat_err = ana_watchers[iw].getAverageRatio();
|
||||
averat += rat_err.first;
|
||||
ave_err += rat_err.second;
|
||||
gl_chsq += ana_watchers[iw].getChsq();
|
||||
G4std::pair<G4double, G4double> cs_err = ana_watchers[iw].getExpCs();
|
||||
tot_exper += cs_err.first;
|
||||
tot_exper_err += cs_err.second;
|
||||
G4std::pair<G4double, G4double> inucl_cs_err = ana_watchers[iw].getInuclCs();
|
||||
tot_inucl += inucl_cs_err.first;
|
||||
tot_inucl_err += inucl_cs_err.second;
|
||||
G4double iz_checked = ana_watchers[iw].getNmatched();
|
||||
|
||||
if (iz_checked > 0.0) {
|
||||
fgr += ana_watchers[iw].getLhood();
|
||||
checked += iz_checked;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (checked > 0.0) {
|
||||
gl_chsq = sqrt(gl_chsq) / checked;
|
||||
averat /= checked;
|
||||
ave_err /= checked;
|
||||
fgr = pow(10.0, sqrt(fgr / checked));
|
||||
};
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " total exper c.s. " << tot_exper << " err " << tot_exper_err <<
|
||||
" tot inucl c.s. " << tot_inucl << " err " << tot_inucl_err << G4endl;
|
||||
G4cout << " checked total " << checked << " lhood " << fgr << G4endl
|
||||
<< " average ratio " << averat << " err " << ave_err << G4endl
|
||||
<< " global chsq " << gl_chsq << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
void G4Analyser::printResultsNtuple() {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Analyser::printResultsNtuple" << G4endl;
|
||||
}
|
||||
|
||||
// Create one line of ACII data.
|
||||
// Several runs should create ntuple for data-analysis
|
||||
G4cout << int(eventNumber + 0.1) << " " <<
|
||||
averageMultiplicity / eventNumber << " " <<
|
||||
averageProtonNumber / eventNumber << " " <<
|
||||
averageNeutronNumber / eventNumber << " " <<
|
||||
averageNucleonKinEnergy / (averageProtonNumber + averageNeutronNumber) << " " <<
|
||||
averageProtonKinEnergy / (averageProtonNumber + 1.0e-10) << " " <<
|
||||
averageNeutronKinEnergy / (averageNeutronNumber + 1.0e-10) << " " <<
|
||||
averagePionNumber / eventNumber << " " <<
|
||||
averagePionKinEnergy / (averagePionNumber + 1.0e-10) << G4endl;
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
#include "globals.hh"
|
||||
#include "G4BertiniData.hh"
|
||||
|
||||
//#include "G4Cascade.hh"
|
||||
|
||||
// Initialize static pointer for singleton instance
|
||||
G4BertiniData* G4BertiniData::theInstance = 0;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,189 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
#include "G4BertiniRegionModel.hh"
|
||||
|
||||
const G4double G4BertiniRegionModel::radius0 = 1.0E-15;
|
||||
const G4double G4BertiniRegionModel::BE = 7;
|
||||
|
||||
G4BertiniRegionModel::G4BertiniRegionModel(const G4int numberOfLayers, const G4int A, const G4int Z)
|
||||
{
|
||||
//count the radiuses, densities and fermi momenta with A and Z
|
||||
G4double r = radius0*pow(A, 1/3);
|
||||
|
||||
if(numberOfLayers==1){
|
||||
radius.push_back(r);
|
||||
|
||||
G4double rho = A / (4/3*pi*pow(r,3));
|
||||
density.push_back(rho);
|
||||
|
||||
G4double protonMass = G4Proton::Proton()->GetPDGMass();
|
||||
G4double neutronMass = G4Neutron::Neutron()->GetPDGMass();
|
||||
G4double protonDensity = Z / (4/3*pi*pow(r,3));
|
||||
G4double neutronDensity = (A-Z) / (4/3*pi*pow(r,3));
|
||||
|
||||
protonFermiEnergy.push_back(GetFermiEnergy(protonDensity, protonMass));
|
||||
neutronFermiEnergy.push_back(GetFermiEnergy(neutronDensity, neutronMass));
|
||||
|
||||
protonFermiMomentum.push_back(GetFermiMomentum(protonDensity, protonMass));
|
||||
neutronFermiMomentum.push_back(GetFermiMomentum(neutronDensity, neutronMass));
|
||||
|
||||
G4double fermiEP = *protonFermiEnergy.begin();
|
||||
G4double fermiEN = *neutronFermiEnergy.begin();
|
||||
protonPotentialEnergy.push_back(-(fermiEP + BE));
|
||||
neutronPotentialEnergy.push_back(-(fermiEN + BE));
|
||||
}
|
||||
else{
|
||||
if(numberOfLayers==3){
|
||||
radius.push_back(0.1*r);
|
||||
radius.push_back(0.2*r);
|
||||
radius.push_back(0.9*r);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
G4BertiniRegionModel::~G4BertiniRegionModel(){}
|
||||
|
||||
/*
|
||||
void G4BertiniRegionModel::Init(const G4int numberOfLayers, const G4int A, const G4int Z){
|
||||
//count the radiuses, densities and fermi momenta with A and Z
|
||||
G4double r = radius0*pow(A, 1/3);
|
||||
|
||||
if(numberOfLayers==1){
|
||||
radius.push_back(r);
|
||||
|
||||
G4double rho = A / (4/3*pi*pow(r,3));
|
||||
density.push_back(rho);
|
||||
|
||||
G4double protonMass = G4Proton::Proton()->GetPDGMass()/MeV;
|
||||
G4double neutronMass = G4Neutron::Neutron()->GetPDGMass()/MeV ;
|
||||
G4double protonDensity = Z / (4/3*pi*pow(r,3));
|
||||
G4double neutronDensity = (A-Z) / (4/3*pi*pow(r,3));
|
||||
|
||||
protonFermiEnergy.push_back(GetFermiEnergy(protonDensity, protonMass));
|
||||
neutronFermiEnergy.push_back(GetFermiEnergy(neutronDensity, neutronMass));
|
||||
|
||||
protonFermiMomentum.push_back(GetFermiMomentum(protonDensity, protonMass));
|
||||
neutronFermiMomentum.push_back(GetFermiMomentum(neutronDensity, neutronMass));
|
||||
|
||||
G4double fermiEP = *protonFermiEnergy.begin();
|
||||
G4double fermiEN = *neutronFermiEnergy.begin();
|
||||
protonPotentialEnergy.push_back(-(fermiEP + BE));
|
||||
neutronPotentialEnergy.push_back(-(fermiEN + BE));
|
||||
}
|
||||
else{
|
||||
if(numberOfLayers==3){
|
||||
radius.push_back(0.1*r);
|
||||
radius.push_back(0.2*r);
|
||||
radius.push_back(0.9*r);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
G4double G4BertiniRegionModel::GetDensity(G4double r){
|
||||
iterator j=density.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4double G4BertiniRegionModel::GetPotentialEnergy(G4double r, G4int particle){
|
||||
if(particle == 0){ //proton
|
||||
iterator j=protonPotentialEnergy.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(particle == 1){ //neutron
|
||||
iterator j=neutronPotentialEnergy.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4double G4BertiniRegionModel::GetMaximumNucleonMomentum(G4double r,
|
||||
G4int nucleon){
|
||||
|
||||
if(nucleon == 0){
|
||||
iterator j=protonFermiMomentum.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
if(nucleon==1){
|
||||
iterator j=neutronFermiMomentum.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
G4Exception("G4BertiniRegionModel::GetMaximumNucleonMomentum - return value undefined");
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
G4double G4BertiniRegionModel::GetFermiMomentum(G4double aDensity,
|
||||
G4double aMass){
|
||||
|
||||
return sqrt(2*aMass*GetFermiEnergy(aDensity, aMass));
|
||||
|
||||
|
||||
}
|
||||
|
||||
G4double G4BertiniRegionModel::GetFermiEnergy(G4double aDensity,
|
||||
G4double aMass){
|
||||
|
||||
//G4double hbar = 1.0E-6;
|
||||
return (pow(hbar_Planck,2)/(2*aMass)*pow((3*pi2*aDensity),2/3));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,358 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
#include "G4BigBanger.hh"
|
||||
#include "G4InuclNuclei.hh"
|
||||
#include "G4ParticleLargerEkin.hh"
|
||||
#include "G4LorentzConvertor.hh"
|
||||
#include "g4std/algorithm"
|
||||
|
||||
typedef G4std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
|
||||
G4BigBanger::G4BigBanger()
|
||||
: verboseLevel(1) {
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4BigBanger::G4BigBanger" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
G4CollisionOutput G4BigBanger::collide(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4BigBanger::collide" << G4endl;
|
||||
}
|
||||
|
||||
// primitive explosion model A -> nucleons to prevent too exotic evaporation
|
||||
|
||||
const G4double small_ekin = 1.0e-6;
|
||||
|
||||
G4CollisionOutput output;
|
||||
G4std::vector<G4double> totscm;
|
||||
G4std::vector<G4double> totlab;
|
||||
|
||||
if(G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target)) {
|
||||
|
||||
G4double A = nuclei_target->getA();
|
||||
G4double Z = nuclei_target->getZ();
|
||||
G4std::vector<G4double> PEX = nuclei_target->getMomentum();
|
||||
G4double EEXS = nuclei_target->getExitationEnergy();
|
||||
G4InuclElementaryParticle dummy(small_ekin, 1);
|
||||
G4LorentzConvertor toTheNucleiSystemRestFrame;
|
||||
|
||||
toTheNucleiSystemRestFrame.setBullet(dummy.getMomentum(), dummy.getMass());
|
||||
toTheNucleiSystemRestFrame.setTarget(PEX, nuclei_target->getMass());
|
||||
toTheNucleiSystemRestFrame.toTheTargetRestFrame();
|
||||
|
||||
G4double etot = 0.001 * (EEXS - bindingEnergy(A, Z));
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " BigBanger: target " << G4endl;
|
||||
nuclei_target->printParticle();
|
||||
G4cout << " BigBanger: a " << A << " z " << Z << " eexs " << EEXS << " etot " <<
|
||||
etot << " nm " << nuclei_target->getMass() << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> particles =
|
||||
generateBangInSCM(etot, A, Z, dummy.getParticleMass(1), dummy.getParticleMass(2));
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " particles " << particles.size() << G4endl;
|
||||
for(G4int i = 0; i < G4int(particles.size()); i++)
|
||||
particles[i].printParticle();
|
||||
}
|
||||
if(!particles.empty()) { // convert back to Lab
|
||||
if (verboseLevel > 2) {
|
||||
G4std::vector<G4double> totscm(4, 0.0);
|
||||
G4std::vector<G4double> totlab(4, 0.0);
|
||||
}
|
||||
particleIterator ipart;
|
||||
|
||||
for(ipart = particles.begin(); ipart != particles.end(); ipart++) {
|
||||
if (verboseLevel > 2) {
|
||||
G4std::vector<G4double> mom_scm = ipart->getMomentum();
|
||||
|
||||
for(G4int i = 0; i < 4; i++) totscm[i] += mom_scm[i];
|
||||
}
|
||||
G4std::vector<G4double> mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(ipart->getMomentum());
|
||||
ipart->setMomentum(mom);
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
mom = ipart->getMomentum();
|
||||
for(G4int i = 0; i < 4; i++) totlab[i] += mom[i];
|
||||
}
|
||||
};
|
||||
G4std::sort(particles.begin(), particles.end(), G4ParticleLargerEkin());
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " In SCM: total outgoing momentum " << G4endl
|
||||
<< " E " << totscm[0] << " px " << totscm[1]
|
||||
<< " py " << totscm[2] << " pz " << totscm[3] << G4endl;
|
||||
G4cout << " In Lab: mom cons " << G4endl
|
||||
<< " E " << PEX[0] + 0.001 * EEXS - totlab[0]
|
||||
<< " px " << PEX[1] - totlab[1]
|
||||
<< " py " << PEX[2] - totlab[2]
|
||||
<< " pz " << PEX[3] - totlab[3] << G4endl;
|
||||
}
|
||||
};
|
||||
output.addOutgoingParticles(particles);
|
||||
}
|
||||
else {
|
||||
G4cout << " BigBanger -> try to bang not nuclei " << G4endl;
|
||||
};
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle>
|
||||
G4BigBanger::generateBangInSCM(G4double etot,
|
||||
G4double a,
|
||||
G4double z,
|
||||
G4double mp,
|
||||
G4double mn) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4BigBanger::generateBangInSCM" << G4endl;
|
||||
}
|
||||
|
||||
const G4double ang_cut = 0.9999;
|
||||
const G4int itry_max = 1000;
|
||||
|
||||
G4int ia = int(a + 0.1);
|
||||
G4int iz = int(z + 0.1);
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " ia " << ia << " iz " << iz << G4endl;
|
||||
}
|
||||
G4std::vector<G4InuclElementaryParticle> particles;
|
||||
|
||||
if(ia == 1) {
|
||||
// abnormal situation
|
||||
G4double m = iz > 0 ? mp : mn;
|
||||
G4double pmod = sqrt((etot + 2.0 * m) * etot);
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double Pt = pmod * COS_SIN.second;
|
||||
|
||||
mom[1] = Pt * cos(FI);
|
||||
mom[2] = Pt * sin(FI);
|
||||
mom[3] = Pt * COS_SIN.first;
|
||||
|
||||
G4int knd = iz > 0 ? 1 : 2;
|
||||
|
||||
particles.push_back(G4InuclElementaryParticle(mom, knd));
|
||||
|
||||
return particles;
|
||||
};
|
||||
|
||||
G4std::vector<G4double> pmod = generateMomentumModules(etot, a, z, mp, mn);
|
||||
G4bool bad = true;
|
||||
G4int itry = 0;
|
||||
|
||||
while(bad && itry < itry_max) {
|
||||
itry++;
|
||||
G4std::vector<G4std::vector<G4double> > scm_momentums;
|
||||
G4std::vector<G4double> tot_mom(4);
|
||||
|
||||
if(ia == 2) {
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
double FI = randomPHI();
|
||||
double Pt = pmod[0] * COS_SIN.second;
|
||||
|
||||
mom[1] = Pt * cos(FI);
|
||||
mom[2] = Pt * sin(FI);
|
||||
mom[3] = Pt * COS_SIN.first;
|
||||
|
||||
for(G4int j = 1; j < 4; j++) tot_mom[j] += mom[j];
|
||||
|
||||
scm_momentums.push_back(mom);
|
||||
|
||||
G4std::vector<G4double> mom1(4);
|
||||
|
||||
for(G4int i = 1; i < 4; i++) mom1[i] = - mom[i];
|
||||
|
||||
scm_momentums.push_back(mom1);
|
||||
bad = false;
|
||||
}
|
||||
else {
|
||||
for(G4int i = 0; i < ia - 2; i++) {
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double Pt = pmod[i] * COS_SIN.second;
|
||||
|
||||
mom[1] = Pt * cos(FI);
|
||||
mom[2] = Pt * sin(FI);
|
||||
mom[3] = Pt * COS_SIN.first;
|
||||
|
||||
for(G4int j = 1; j < 4; j++) tot_mom[j] += mom[j];
|
||||
|
||||
scm_momentums.push_back(mom);
|
||||
};
|
||||
|
||||
// handle last two
|
||||
G4double tot_mod = sqrt(tot_mom[1] * tot_mom[1] +
|
||||
tot_mom[2] * tot_mom[2] +
|
||||
tot_mom[3] * tot_mom[3]);
|
||||
G4double ct = -0.5 * (tot_mod * tot_mod + pmod[ia - 2] * pmod[ia - 2] -
|
||||
pmod[ia - 1] * pmod[ia - 1]) / tot_mod / pmod[ia - 2];
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " ct last " << ct << G4endl;
|
||||
}
|
||||
|
||||
if(fabs(ct) < ang_cut) {
|
||||
G4std::vector<G4double> mom2 = generateWithFixedTheta(ct, pmod[ia - 2]);
|
||||
// rotate to the normal system
|
||||
G4std::vector<G4double> apr = tot_mom;
|
||||
G4int i;
|
||||
for(i = 1; i < 4; i++) apr[i] /= tot_mod;
|
||||
G4double a_tr = sqrt(apr[1] * apr[1] + apr[2] * apr[2]);
|
||||
G4std::vector<G4double> mom(4);
|
||||
mom[1] = mom2[3] * apr[1] + ( mom2[1] * apr[2] + mom2[2] * apr[3] * apr[1]) / a_tr; // ::: replace with clhep tools?
|
||||
mom[2] = mom2[3] * apr[2] + (-mom2[1] * apr[1] + mom2[2] * apr[3] * apr[2]) / a_tr;
|
||||
mom[3] = mom2[3] * apr[3] - mom2[2] * a_tr;
|
||||
scm_momentums.push_back(mom);
|
||||
// and the last one
|
||||
G4std::vector<G4double> mom1(4);
|
||||
for(i = 1; i < 4; i++) mom1[i] = - mom[i] - tot_mom[i];
|
||||
scm_momentums.push_back(mom1);
|
||||
bad = false;
|
||||
};
|
||||
};
|
||||
if(!bad) {
|
||||
for(G4int i = 0; i < ia; i++) {
|
||||
G4int knd = i < iz ? 1 : 2;
|
||||
|
||||
particles.push_back(G4InuclElementaryParticle(scm_momentums[i], knd));
|
||||
};
|
||||
};
|
||||
};
|
||||
if (verboseLevel > 2) {
|
||||
if(itry == itry_max) G4cout << " BigBanger -> can not generate bang " << G4endl;
|
||||
}
|
||||
|
||||
return particles;
|
||||
|
||||
}
|
||||
|
||||
G4std::vector<G4double> G4BigBanger::generateMomentumModules(G4double etot,
|
||||
G4double a,
|
||||
G4double z,
|
||||
G4double mp,
|
||||
G4double mn) const {
|
||||
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4BigBanger::generateMomentumModules" << G4endl;
|
||||
}
|
||||
|
||||
G4int ia = int(a + 0.1);
|
||||
G4int iz = int(z + 0.1);
|
||||
G4std::vector<G4double> pmod;
|
||||
G4double xtot = 0.0;
|
||||
G4double promax = maxProbability(a);
|
||||
|
||||
G4int i;
|
||||
for(i = 0; i < ia; i++) {
|
||||
G4double x = generateX(ia, a, promax);
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " i " << i << " x " << x << G4endl;
|
||||
}
|
||||
pmod.push_back(x);
|
||||
xtot += x;
|
||||
};
|
||||
for(i = 0; i < ia; i++) {
|
||||
G4double m = i < iz ? mp : mn;
|
||||
|
||||
pmod[i] = pmod[i] * etot / xtot;
|
||||
pmod[i] = sqrt(pmod[i] * (pmod[i] + 2.0 * m));
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " i " << i << " pmod " << pmod[i] << G4endl;
|
||||
}
|
||||
};
|
||||
|
||||
return pmod;
|
||||
}
|
||||
|
||||
G4double G4BigBanger::xProbability(G4double x,
|
||||
G4int ia) const {
|
||||
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4BigBanger::xProbability" << G4endl;
|
||||
}
|
||||
|
||||
G4int ihalf = ia / 2;
|
||||
G4double ekpr = 0.0;
|
||||
|
||||
if(x < 1.0 || x > 0.0) {
|
||||
ekpr = x * x;
|
||||
|
||||
if(2 * ihalf == ia) { // even A
|
||||
ekpr *= sqrt(1.0 - x) * pow((1.0 - x), int((3 * ia - 6) / 2));
|
||||
}
|
||||
else {
|
||||
ekpr *= pow((1.0 - x), int((3 * ia - 5) / 2));
|
||||
};
|
||||
};
|
||||
|
||||
return ekpr;
|
||||
}
|
||||
|
||||
G4double G4BigBanger::maxProbability(G4double a) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4BigBanger::maxProbability" << G4endl;
|
||||
}
|
||||
|
||||
return xProbability(1.0 / (a - 1.0) / 1.5, int(a + 0.1));
|
||||
}
|
||||
|
||||
G4double G4BigBanger::generateX(G4int ia,
|
||||
G4double a,
|
||||
G4double promax) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4BigBanger::generateX" << G4endl;
|
||||
}
|
||||
|
||||
const G4int itry_max = 1000;
|
||||
G4int itry = 0;
|
||||
G4double x;
|
||||
|
||||
while(itry < itry_max) {
|
||||
itry++;
|
||||
x = inuclRndm();
|
||||
|
||||
if(xProbability(x, ia) >= promax * inuclRndm()) return x;
|
||||
};
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " BigBanger -> can not generate x " << G4endl;
|
||||
}
|
||||
|
||||
return maxProbability(a);
|
||||
}
|
||||
@@ -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. *
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
#include "G4CascadParticle.hh"
|
||||
|
||||
G4CascadParticle::G4CascadParticle()
|
||||
: verboseLevel(2) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CascadParticle::G4CascadParticle" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
G4double G4CascadParticle::getPathToTheNextZone(G4double rz_in,
|
||||
G4double rz_out) {
|
||||
verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CascadParticle::getPathToTheNextZone" << G4endl;
|
||||
}
|
||||
|
||||
G4double path = -1.0;
|
||||
G4double rp = 0.0;
|
||||
G4double rr = 0.0;
|
||||
G4double pp = 0.0;
|
||||
G4std::vector<G4double> mom = theParticle.getMomentum();
|
||||
|
||||
for (G4int i = 1; i < 4; i++) {
|
||||
rp += mom[i] * position[i - 1];
|
||||
rr += position[i - 1] * position[i - 1];
|
||||
pp += mom[i] * mom[i];
|
||||
};
|
||||
|
||||
G4double ra = rr - rp * rp / pp;
|
||||
pp = sqrt(pp);
|
||||
G4double ds;
|
||||
G4double d2;
|
||||
|
||||
if (current_zone == 0 || rp > 0.0) {
|
||||
d2 = rz_out * rz_out - ra;
|
||||
ds = 1.0;
|
||||
movingIn = false;
|
||||
|
||||
} else {
|
||||
|
||||
d2 = rz_in * rz_in - ra;
|
||||
|
||||
if (d2 > 0.0) {
|
||||
ds = -1.0;
|
||||
movingIn = true;
|
||||
|
||||
} else {
|
||||
|
||||
d2 = rz_out * rz_out - ra;
|
||||
ds = 1.0;
|
||||
movingIn = false;
|
||||
};
|
||||
};
|
||||
|
||||
path = ds * sqrt(d2) - rp / pp;
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
void G4CascadParticle::propagateAlongThePath(G4double path) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CascadParticle::propagateAlongThePath" << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> mom = theParticle.getMomentum();
|
||||
G4double pmod = theParticle.getMomModule();
|
||||
|
||||
for(G4int i = 0; i < 3; i++) position[i] += mom[i + 1] * path / pmod;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,382 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
#include "G4CascadSpecialFunctions.hh"
|
||||
|
||||
G4std::pair<G4int, G4double> G4CascadSpecialFunctions::getPositionInEnergyScale2(G4double e) {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CascadSpecialFunctions::getPositionInEnergyScale2" << G4endl;
|
||||
}
|
||||
|
||||
const G4double EMT2[31] = {
|
||||
0.0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45,
|
||||
0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0,
|
||||
5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, 10.0, 15.0
|
||||
};
|
||||
|
||||
G4int ik = 30;
|
||||
G4double sk = 1.0;
|
||||
|
||||
for (G4int i = 1; i < 31; i++) {
|
||||
|
||||
if (e <= EMT2[i]) {
|
||||
ik = i;
|
||||
sk = (e - EMT2[ik - 1]) / (EMT2[ik] - EMT2[ik - 1]);
|
||||
|
||||
break;
|
||||
};
|
||||
};
|
||||
|
||||
return G4std::pair<G4int, G4double>(ik, sk);
|
||||
}
|
||||
|
||||
G4std::pair<G4int, G4double> G4CascadSpecialFunctions::getPositionInEnergyScale1(G4double e) {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CascadSpecialFunctions::getPositionInEnergyScale1" << G4endl;
|
||||
}
|
||||
|
||||
const G4double EMT1[20] = {
|
||||
0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0,
|
||||
5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, 10.0
|
||||
};
|
||||
|
||||
G4int ik;
|
||||
G4double sk;
|
||||
|
||||
if (e < EMT1[0]) {
|
||||
ik = 1;
|
||||
sk = 0.0;
|
||||
|
||||
} else if (e <= EMT1[19]) {
|
||||
|
||||
for (G4int i = 1; i < 20; i++) {
|
||||
|
||||
if (e <= EMT1[i]) {
|
||||
ik = i;
|
||||
sk = (e - EMT1[ik - 1]) / (EMT1[ik] - EMT1[ik - 1]);
|
||||
|
||||
break;
|
||||
};
|
||||
};
|
||||
|
||||
} else {
|
||||
|
||||
ik = 19;
|
||||
sk = 1.0;
|
||||
};
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " e " << e << " ik " << ik << " sk " << sk << G4endl;
|
||||
}
|
||||
|
||||
return G4std::pair<G4int, G4double>(ik, sk);
|
||||
}
|
||||
|
||||
G4double G4CascadSpecialFunctions::absorptionCrosSection(G4double e,
|
||||
G4int type) {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CascadSpecialFunctions::absorptionCrosSection" << G4endl;
|
||||
}
|
||||
|
||||
const G4double corr_fac = 0.2;
|
||||
G4double csec = 0.0;
|
||||
|
||||
if (e < 0.3) {
|
||||
csec = 0.1106 / sqrt(e) - 0.8 + 0.08 / ((e - 0.123) * (e - 0.123) + 0.0056);
|
||||
|
||||
} else if (e < 1.0) {
|
||||
csec = 3.6735 * (1.0 - e) * (1.0 - e);
|
||||
};
|
||||
|
||||
if (csec < 0.0) csec = 0.0;
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " ekin " << e << " abs. csec " << corr_fac * csec << G4endl;
|
||||
}
|
||||
|
||||
return corr_fac * csec;
|
||||
}
|
||||
|
||||
G4std::pair<G4int, G4double> G4CascadSpecialFunctions::getPositionInEnergyScaleEMS(G4double e) {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CascadSpecialFunctions::getPositionInEnergyScaleEMS" << G4endl;
|
||||
}
|
||||
|
||||
const G4double EMS[46] = {
|
||||
0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.11, 0.12, 0.13, 0.14,
|
||||
0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.24,
|
||||
0.25, 0.26, 0.27, 0.28, 0.29, 0.30, 0.31, 0.32, 0.33, 0.34,
|
||||
0.35, 0.36, 0.37, 0.38, 0.39, 0.40, 0.41, 0.42, 0.43, 0.44,
|
||||
0.45, 0.46, 0.47, 0.48, 0.49, 0.50
|
||||
};
|
||||
|
||||
G4int ik;
|
||||
G4double sk;
|
||||
|
||||
if (e < EMS[0]) {
|
||||
ik = 1;
|
||||
sk = 0.0;
|
||||
|
||||
} else if (e <= EMS[45]) {
|
||||
|
||||
for (G4int i = 1; i < 46; i++) {
|
||||
|
||||
if (e <= EMS[i]) {
|
||||
ik = i;
|
||||
sk = (e - EMS[ik - 1]) / (EMS[ik] - EMS[ik - 1]);
|
||||
|
||||
break;
|
||||
};
|
||||
};
|
||||
|
||||
} else {
|
||||
|
||||
ik = 45;
|
||||
sk = 1.0;
|
||||
};
|
||||
|
||||
return G4std::pair<G4int, G4double>(ik, sk);
|
||||
}
|
||||
|
||||
G4double G4CascadSpecialFunctions::crossSection(G4double e,
|
||||
G4int is) {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CascadSpecialFunctions::crossSection" << G4endl;
|
||||
}
|
||||
|
||||
const G4double dsig[46][2] = {
|
||||
{13.7, 15.0}, {15.8, 17.6}, {19.0, 15.0}, {46.0, 15.8}, {52.0, 21.0},
|
||||
{55.0, 21.9}, {77.0, 31.0}, {101.0, 38.4}, {124.0, 42.7}, {148.0, 55.4},
|
||||
{165.0, 55.3}, {172.0, 67.9}, {205.0, 66.2}, {189.0, 67.2}, {190.0, 67.8},
|
||||
{178.0, 63.8}, {148.0, 64.0}, {141.0, 52.1}, {135.0, 58.0}, {127.0, 48.3},
|
||||
{107.0, 40.0}, {111.0, 37.8}, {81.3, 37.5}, {78.0, 31.7}, {75.0, 30.0},
|
||||
{64.3, 30.0}, {60.3, 27.7}, {58.9, 26.0}, {55.0, 27.0}, {48.0, 26.0},
|
||||
{45.2, 26.7}, {40.8, 26.0}, {39.3, 27.0}, {40.7, 27.1}, {31.2, 26.5},
|
||||
{34.6, 26.9}, {31.4, 27.6}, {27.1, 28.4}, {26.2, 27.5}, {24.4, 27.2},
|
||||
{25.7, 28.8}, {23.8, 29.3}, {21.5, 27.0}, {22.2, 29.5}, {21.5, 31.2},
|
||||
{19.0, 30.7}
|
||||
};
|
||||
|
||||
const G4double asig[4][6][31] = {
|
||||
{{1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 24.3, 24.1, 24.0, 26.3,
|
||||
28.6, 24.8, 19.9, 19.2, 17.4, 15.3, 13.5, 12.3, 11.9, 10.4,
|
||||
11.8, 11.4, 11.0, 10.8, 10.9, 11.7, 11.4, 10.2, 11.0, 11.0, 9.0},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 1.45, 2.90, 4.10,
|
||||
5.30, 22.0, 21.2, 19.9, 14.9, 12.6, 12.3, 11.3, 10.8, 9.50,
|
||||
8.27, 7.20, 6.70, 6.25, 6.04, 5.89, 5.70, 5.60, 5.05, 4.17, 4.00},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
0. , 2.27, 4.28, 7.81, 8.03, 8.11, 7.90, 7.82, 7.61, 7.47,
|
||||
7.07, 7.66, 7.05, 6.71, 6.38, 6.36, 6.37, 6.57, 6.01, 5.48, 6.80},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
0. , 0. , 1.20, 2.85, 3.70, 4.81, 5.33, 7.74, 6.91, 6.94,
|
||||
7.57, 7.21, 7.11, 7.10, 6.93, 6.79, 6.71, 6.55, 6.55, 6.15, 8.50},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
0. , 0. , 0. , .005, 0.54, 0.74, 0.86, 0.91, 1.10, 1.16,
|
||||
1.36, 1.40, 1.43, 1.47, 1.47, 1.43, 1.38, 1.38, 1.63, 1.36, 2.80},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
34.0, 46.2, 46.9, 45.2, 47.1, 42.3, 41.8, 41.2, 41.6, 41.6,
|
||||
41.0, 43.0, 42.4, 40.0, 39.9, 39.8, 42.0, 40.0, 39.8, 39.6, 38.7}},
|
||||
|
||||
{{1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 33.0, 31.3, 29.5, 27.8,
|
||||
14.6, 16.0, 17.5, 18.3, 19.4, 18.7, 15.6, 14.8, 13.6, 12.5,
|
||||
12.2, 11.9, 11.4, 11.2, 10.1, 9.62, 8.41, 7.14, 7.09, 5.04, 10.2},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 2.00, 4.00, 6.50,
|
||||
19.5, 20.8, 19.8, 18.6, 17.7, 14.4, 13.5, 10.4, 10.1, 12.0,
|
||||
8.87, 8.51, 8.49, 9.20, 8.29, 7.43, 8.20, 4.69, 4.57, 4.06, 4.10},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
0.68, 2.76, 3.85, 8.35, 12.7, 12.3, 10.8, 12.0, 10.9, 10.2,
|
||||
10.6, 12.2, 11.8, 11.0, 10.4, 10.5, 11.0, 10.6, 11.8, 12.5, 13.2},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
0.22, 0.52, 0.64, 1.19, 1.52, 1.75, 1.51, 2.04, 1.85, 1.70,
|
||||
1.92, 1.66, 1.74, 1.50, 1.39, 1.35, 1.41, 1.48, 1.43, 1.35, 3.20},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
0. , 0. , 0.14, 0.24, 0.30, 0.46, 0.85, 1.40, 1.54, 1.52,
|
||||
1.47, 1.48, 1.49, 1.42, 1.39, 1.37, 1.22, 1.19, 0.93, 0. , 2.10},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
35.0, 40.0, 42.4, 42.3, 41.0, 40.9, 40.4, 39.8, 35.0, 33.6,
|
||||
41.2, 41.0, 41.1, 41.2, 41.2, 39.6, 36.0, 36.0, 36.2, 0. ,40.2}},
|
||||
|
||||
{{1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 60.0, 38.0, 30.6, 24.0,
|
||||
18.5, 12.8, 13.6, 9.15, 8.20, 7.80, 7.10, 6.40, 5.81, 5.85,
|
||||
5.50, 5.33, 5.40, 5.50, 4.90, 5.02, 5.00, 4.98, 4.96, 4.96, 4.50},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.38, 0.75, 1.28,
|
||||
2.26, 11.8, 11.1, 7.56, 6.04, 5.68, 4.15, 3.21, 2.12, 1.66,
|
||||
1.54, 1.53, 1.47, 1.33, 1.39, 1.35, 1.29, 1.23, 1.13, 1.06, 0.70},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
0.05, 2.19, 6.02, 7.36, 6.97, 5.83, 6.53, 5.09, 4.24, 3.24,
|
||||
3.31, 3.11, 2.91, 2.78, 2.72, 2.68, 2.48, 2.27, 2.02, 1.77, 4.40},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
0.06, 0.35, 0.55, 0.77, 0.89, 0.80, 0.86, 0.97, 0.90, 0.86,
|
||||
0.84, 0.84, 0.83, 0.81, 0.79, 0.82, 0.76, 0.88, 0.89, 0.89, 3.00},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
0. , 0.02, 0.07, 0.33, 0.92, 1.39, 2.11, 1.81, 2.39, 2.60,
|
||||
2.19, 1.70, 1.60, 0.68, 1.43, 1.46, 1.46, 1.37, 1.16, 1.09, 2.60},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
18.9, 27.2, 34.9, 29.1, 30.8, 29.6, 28.2, 27.5, 26.9, 26.3,
|
||||
25.9, 25.6, 25.2, 26.1, 25.5, 25.4, 25.3, 25.1, 24.9, 24.8, 24.1}},
|
||||
|
||||
{{5.90, 9.40, 24.5, 62.6, 65.3, 41.3, 29.3, 24.3, 22.7, 22.9,
|
||||
23.2, 28.4, 11.7, 10.1, 8.30, 7.16, 6.49, 6.36, 6.60, 5.84,
|
||||
5.30, 4.50, 3.90, 4.40, 4.74, .794, .824, .714, 0.59, 0. ,4.60},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0.10, 0.40, 2.70, 3.50, 5.30, 6.60,
|
||||
9.10, 17.6, 12.2, 9.78, 7.51, 6.91, 6.86, 6.46, 6.19, 5.13,
|
||||
3.90, 2.82, 3.10, 3.12, 2.52, 2.22, 2.02, 2.01, 1.98, 2.14, 1.20},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
0.76, 2.63, 3.72, 6.53, 7.47, 7.94, 7.12, 6.85, 6.09, 5.35,
|
||||
4.12, 3.85, 3.68, 4.09, 3.58, 3.29, 3.08, 2.93, 2.80, 2.65, 3.30},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
0.59, 0.74, 1.47, 4.10, 4.78, 4.90, 5.07, 5.50, 5.48, 5.03,
|
||||
4.65, 4.39, 4.06, 3.53, 3.08, 3.05, 2.91, 3.42, 3.93, 3.93, 4.10},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
0.01, .007, 0.03, .099, .251, .376, .419, .582, .755, .777,
|
||||
1.13, 1.08, 1.13, 1.08, .962, .866, .738, .674, .645, .613, 1.30},
|
||||
|
||||
{0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
|
||||
31.3, 46.0, 30.0, 35.7, 33.4, 31.6, 30.4, 29.6, 28.9, 28.5,
|
||||
28.1, 27.5, 31.0, 27.7, 27.8, 26.1, 25.2, 6.92, 6.70, 0. , 25.7}}
|
||||
};
|
||||
|
||||
const G4double EMT2_10 = 0.5;
|
||||
G4double csec = 0.0;
|
||||
G4int l = is;
|
||||
|
||||
if (l == 4) {
|
||||
l = 1;
|
||||
|
||||
} else if (l == 10) {
|
||||
l = 3;
|
||||
|
||||
} else if (l == 5 || l == 6) {
|
||||
l = 4;
|
||||
} else if (l == 7 || l == 14) {
|
||||
l = 5;
|
||||
};
|
||||
|
||||
if (e < EMT2_10) {
|
||||
|
||||
if (l == 1) { // pp or nn
|
||||
|
||||
if (e >= 0.4) {
|
||||
csec = 34.5;
|
||||
|
||||
} else if (e >= 0.04) {
|
||||
csec = 0.23938 / (e * e) + 1.802 / e + 27.147;
|
||||
|
||||
} else if (e >= 0.001) {
|
||||
csec = -0.0050574 / (e * e) + 9.0692 / e + 6.9466;
|
||||
|
||||
} else {
|
||||
csec = 4.0 / e;
|
||||
};
|
||||
|
||||
} else if (l == 2) { // np
|
||||
|
||||
if (e >= 0.4) {
|
||||
csec = 0.88737 / e + 53.37 * e + 3.5475;
|
||||
|
||||
} else if (e >= 0.04) {
|
||||
csec = 0.093074 / (e * e) - 0.011148 / e + 22.429;
|
||||
|
||||
} else if (e >= 0.001) {
|
||||
csec = -0.0011748 / (e * e) + 3.0885 / e + 5.3107;
|
||||
|
||||
} else {
|
||||
csec = 1.92 / e;
|
||||
};
|
||||
|
||||
} else { // pi + n, p
|
||||
|
||||
if (e <= 0.05) {
|
||||
|
||||
if (l == 3) {
|
||||
csec = 3.7 + 204.35 * e;
|
||||
|
||||
} else if (l == 4) {
|
||||
csec = 6.5 + 170.71 * e;
|
||||
|
||||
} else if (l == 5) {
|
||||
csec = 5.1 + 187.53 * e;
|
||||
};
|
||||
|
||||
} else {
|
||||
G4std::pair<G4int, G4double> iksk = getPositionInEnergyScaleEMS(e);
|
||||
G4int ik = iksk.first;
|
||||
G4double sk = iksk.second;
|
||||
|
||||
if (l < 5) {
|
||||
int j = l - 3;
|
||||
csec = dsig[ik - 1][j] + sk * (dsig[ik][j] - dsig[ik - 1][j]);
|
||||
|
||||
} else {
|
||||
csec = 0.5 * (dsig[ik - 1][0] + dsig[ik - 1][1] +
|
||||
sk * (dsig[ik][0] - dsig[ik - 1][0] + dsig[ik][1] - dsig[ik - 1][1]));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
} else {
|
||||
G4std::pair<G4int, G4double> iksk = getPositionInEnergyScale2(e);
|
||||
G4int ik = iksk.first;
|
||||
G4double sk = iksk.second;
|
||||
|
||||
if (l < 5) {
|
||||
csec = asig[l - 1][5][ik - 1] + sk * (asig[l - 1][5][ik] - asig[l - 1][5][ik - 1]);
|
||||
|
||||
} else {
|
||||
csec = 0.5 * (asig[2][5][ik - 1] + asig[3][5][ik - 1] +
|
||||
sk * (asig[2][5][ik] - asig[2][5][ik - 1] +
|
||||
asig[3][5][ik] - asig[3][5][ik - 1]));
|
||||
};
|
||||
};
|
||||
|
||||
return csec;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,359 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
#include "G4CascadeInterface.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4DynamicParticleVector.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4InuclCollider.hh"
|
||||
#include "G4IntraNucleiCascader.hh"
|
||||
#include "G4ElementaryParticleCollider.hh"
|
||||
#include "G4NonEquilibriumEvaporator.hh"
|
||||
#include "G4EquilibriumEvaporator.hh"
|
||||
#include "G4Fissioner.hh"
|
||||
#include "G4BigBanger.hh"
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
#include "G4InuclNuclei.hh"
|
||||
#include "G4InuclParticle.hh"
|
||||
#include "G4CollisionOutput.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4NucleiModel.hh"
|
||||
#include "G4LorentzRotation.hh"
|
||||
|
||||
|
||||
typedef G4std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
typedef G4std::vector<G4InuclNuclei>::iterator nucleiIterator;
|
||||
|
||||
G4CascadeInterface::G4CascadeInterface()
|
||||
:verboseLevel(0) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CascadeInterface::G4CascadeInterface" << G4endl;
|
||||
}
|
||||
};
|
||||
|
||||
G4ReactionProductVector* G4CascadeInterface::Propagate(G4KineticTrackVector* theSecondaries,
|
||||
G4V3DNucleus* theNucleus) {
|
||||
return NULL;
|
||||
};
|
||||
|
||||
// #define debug_G4CascadeInterface
|
||||
|
||||
G4VParticleChange* G4CascadeInterface::ApplyYourself(const G4Track& aTrack,
|
||||
G4Nucleus& theNucleus) {
|
||||
#ifdef debug_G4CascadeInterface
|
||||
static G4int counter(0);
|
||||
counter++;
|
||||
G4cerr << "Reaction number "<< counter << " "<<aTrack.GetDynamicParticle()->GetDefinition()->GetParticleName()<<" "<< aTrack.GetDynamicParticle()->GetKineticEnergy()<<G4endl;
|
||||
#endif
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CascadeInterface::ApplyYourself" << G4endl;
|
||||
};
|
||||
|
||||
theResult.Initialize(aTrack);
|
||||
|
||||
G4double eInit = 0.0;
|
||||
G4double eTot = 0.0;
|
||||
G4double sumBaryon = 0.0;
|
||||
G4double sumEnergy = 0.0;
|
||||
|
||||
// Make conversion between native Geant4 and Bertini cascade classes.
|
||||
// NOTE: Geant4 units are MeV = 1 and GeV = 1000. Cascade code by default use GeV = 1.
|
||||
|
||||
enum particleType { nuclei = 0, proton = 1, neutron = 2, pionPlus = 3, pionMinus = 5, pionZero = 7, photon = 10 };
|
||||
|
||||
G4int bulletType = 0;
|
||||
|
||||
// Coding particles
|
||||
if (aTrack.GetDefinition() == G4Proton::Proton() ) bulletType = proton;
|
||||
if (aTrack.GetDefinition() == G4Neutron::Neutron() ) bulletType = neutron;
|
||||
if (aTrack.GetDefinition() == G4PionPlus::PionPlus() ) bulletType = pionPlus;
|
||||
if (aTrack.GetDefinition() == G4PionMinus::PionMinus() ) bulletType = pionMinus;
|
||||
if (aTrack.GetDefinition() == G4PionZero::PionZero() ) bulletType = pionZero;
|
||||
if (aTrack.GetDefinition() == G4Gamma::Gamma() ) bulletType = photon;
|
||||
|
||||
// Code momentum and energy.
|
||||
G4double px,py,pz;
|
||||
px=aTrack.GetDynamicParticle()->Get4Momentum().px() / GeV;
|
||||
py=aTrack.GetDynamicParticle()->Get4Momentum().py() / GeV;
|
||||
pz=aTrack.GetDynamicParticle()->Get4Momentum().pz() / GeV;
|
||||
|
||||
G4LorentzVector projectileMomentum = aTrack.GetDynamicParticle()->Get4Momentum();
|
||||
G4LorentzRotation toZ;
|
||||
toZ.rotateZ(-projectileMomentum.phi());
|
||||
toZ.rotateY(-projectileMomentum.theta());
|
||||
G4LorentzRotation toLabFrame = toZ.inverse();
|
||||
|
||||
G4std::vector<G4double> momentumBullet(4);
|
||||
momentumBullet[0] =0.;
|
||||
momentumBullet[1] =0;
|
||||
momentumBullet[2] =0;
|
||||
momentumBullet[3] =sqrt(px*px+py*py+pz*pz);
|
||||
|
||||
G4InuclElementaryParticle * bullet = new G4InuclElementaryParticle(momentumBullet, bulletType);
|
||||
|
||||
sumEnergy = bullet->getKineticEnergy(); // In GeV
|
||||
if (bulletType == proton || bulletType == neutron) {
|
||||
sumBaryon += 1;
|
||||
}
|
||||
|
||||
// Set target
|
||||
G4InuclNuclei* target = NULL;
|
||||
G4InuclParticle* targetH = NULL;
|
||||
|
||||
G4std::vector<G4double> targetMomentum(4, 0.0);
|
||||
|
||||
G4double theNucleusA = theNucleus.GetN();
|
||||
|
||||
|
||||
|
||||
if ( !(G4int(theNucleusA) == 1) ) {
|
||||
target = new G4InuclNuclei(targetMomentum,
|
||||
theNucleusA,
|
||||
theNucleus.GetZ());
|
||||
target->setEnergy();
|
||||
|
||||
G4std::vector<G4double> bmom = bullet->getMomentum();
|
||||
eInit = sqrt(bmom[0] * bmom[0]);
|
||||
G4std::vector<G4double> tmom = target->getMomentum();
|
||||
eInit += sqrt(tmom[0] * tmom[0]);
|
||||
|
||||
sumBaryon += theNucleusA;
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << "Bullet: " << G4endl;
|
||||
bullet->printParticle();
|
||||
}
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << "Target: " << G4endl;
|
||||
target->printParticle();
|
||||
}
|
||||
}
|
||||
|
||||
G4CollisionOutput output;
|
||||
|
||||
// Colliders initialisation
|
||||
G4ElementaryParticleCollider* colep = new G4ElementaryParticleCollider;
|
||||
G4IntraNucleiCascader* inc = new G4IntraNucleiCascader; // the actual cascade
|
||||
inc->setInteractionCase(1); // Interaction type is particle with nuclei.
|
||||
|
||||
G4NonEquilibriumEvaporator* noneq = new G4NonEquilibriumEvaporator;
|
||||
G4EquilibriumEvaporator* eqil = new G4EquilibriumEvaporator;
|
||||
G4Fissioner* fiss = new G4Fissioner;
|
||||
G4BigBanger* bigb = new G4BigBanger;
|
||||
G4InuclCollider* collider = new G4InuclCollider(colep, inc, noneq, eqil, fiss, bigb);
|
||||
|
||||
if (G4int(theNucleusA) == 1)
|
||||
{
|
||||
do
|
||||
{
|
||||
targetH = new G4InuclElementaryParticle(targetMomentum, 1);
|
||||
|
||||
output = collider->collide(bullet, targetH);
|
||||
}
|
||||
while(output.getOutgoingParticles().size()+output.getNucleiFragments().size() < 2.5);
|
||||
|
||||
sumBaryon += 1;
|
||||
|
||||
G4std::vector<G4double> bmom = bullet->getMomentum();
|
||||
eInit = sqrt(bmom[0] * bmom[0]);
|
||||
G4std::vector<G4double> tmom = targetH->getMomentum();
|
||||
eInit += sqrt(tmom[0] * tmom[0]);
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << "Target: " << G4endl;
|
||||
targetH->printParticle();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
output = collider->collide(bullet, target );
|
||||
}
|
||||
while( output.getOutgoingParticles().size()+output.getNucleiFragments().size() < 2.5
|
||||
&& output.getOutgoingParticles().begin()->type()==bullet->type() );
|
||||
}
|
||||
|
||||
if (verboseLevel > 1)
|
||||
{
|
||||
G4cout << " Cascade output: " << G4endl;
|
||||
output.printCollisionOutput();
|
||||
}
|
||||
|
||||
// Convert cascade data to use hadronics interface
|
||||
|
||||
G4std::vector<G4InuclNuclei> nucleiFragments = output.getNucleiFragments();
|
||||
G4std::vector<G4InuclElementaryParticle> particles = output.getOutgoingParticles();
|
||||
|
||||
G4int numSecondaries = nucleiFragments.size()+particles.size();
|
||||
theResult.SetStatusChange(fStopAndKill);
|
||||
theResult.SetNumberOfSecondaries(numSecondaries);
|
||||
|
||||
if (!particles.empty()) {
|
||||
particleIterator ipart;
|
||||
G4int outgoingParticle;
|
||||
|
||||
for (ipart = particles.begin(); ipart != particles.end(); ipart++) {
|
||||
outgoingParticle = ipart->type();
|
||||
G4std::vector<G4double> mom = ipart->getMomentum();
|
||||
eTot += sqrt(mom[0] * mom[0]);
|
||||
|
||||
G4double ekin = ipart->getKineticEnergy() * GeV;
|
||||
G4ThreeVector aMom(mom[1], mom[2], mom[3]);
|
||||
aMom = aMom.unit();
|
||||
|
||||
if (outgoingParticle == proton || outgoingParticle == neutron) {
|
||||
sumBaryon -= 1;
|
||||
}
|
||||
|
||||
sumEnergy -= ekin / GeV;
|
||||
|
||||
G4DynamicParticle* cascadeParticle = NULL;
|
||||
|
||||
switch(outgoingParticle) {
|
||||
|
||||
case proton:
|
||||
#ifdef debug_G4CascadeInterface
|
||||
G4cerr << "proton " << counter << " " << aMom << " " << ekin << G4endl;
|
||||
#endif
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4Proton::ProtonDefinition(), aMom, ekin);
|
||||
break;
|
||||
|
||||
case neutron:
|
||||
#ifdef debug_G4CascadeInterface
|
||||
G4cerr << "neutron "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
|
||||
#endif
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4Neutron::NeutronDefinition(), aMom, ekin);
|
||||
break;
|
||||
|
||||
case pionPlus:
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4PionPlus::PionPlusDefinition(), aMom, ekin);
|
||||
#ifdef debug_G4CascadeInterface
|
||||
G4cerr << "pionPlus "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case pionMinus:
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4PionMinus::PionMinusDefinition(), aMom, ekin);
|
||||
#ifdef debug_G4CascadeInterface
|
||||
G4cerr << "pionMinus "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case pionZero:
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4PionZero::PionZeroDefinition(), aMom, ekin);
|
||||
#ifdef debug_G4CascadeInterface
|
||||
G4cerr << "pionZero "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case photon:
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4Gamma::Gamma(), aMom, ekin);
|
||||
#ifdef debug_G4CascadeInterface
|
||||
G4cerr << "photon "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
G4cout << " ERROR: G4CascadeInterface::Propagate undefined particle type"
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
cascadeParticle->Set4Momentum(cascadeParticle->Get4Momentum()*=toLabFrame);
|
||||
theResult.AddSecondary(cascadeParticle);
|
||||
}
|
||||
}
|
||||
|
||||
// Get nuclei fragments
|
||||
G4DynamicParticle * aFragment = 0;
|
||||
G4ParticleDefinition * aIonDef = 0;
|
||||
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
|
||||
|
||||
if (!nucleiFragments.empty()) {
|
||||
nucleiIterator ifrag;
|
||||
|
||||
for (ifrag = nucleiFragments.begin(); ifrag != nucleiFragments.end(); ifrag++)
|
||||
{
|
||||
G4double eKin = ifrag->getKineticEnergy() * GeV;
|
||||
G4std::vector<G4double> mom = ifrag->getMomentum();
|
||||
eTot += sqrt(mom[0] * mom[0]);
|
||||
|
||||
G4ThreeVector aMom(mom[1], mom[2], mom[3]);
|
||||
aMom = aMom.unit();
|
||||
|
||||
// hpw @@@ ==> Should be zero: G4double fragmentExitation = ifrag->getExitationEnergyInGeV();
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " Nuclei fragment: " << G4endl;
|
||||
ifrag->printParticle();
|
||||
}
|
||||
|
||||
G4int A = G4int(ifrag->getA());
|
||||
G4int Z = G4int(ifrag->getZ());
|
||||
aIonDef = theTableOfParticles->FindIon(Z,A,0,Z);
|
||||
|
||||
aFragment = new G4DynamicParticle(aIonDef, aMom, eKin);
|
||||
|
||||
sumBaryon -= A;
|
||||
sumEnergy -= eKin / GeV;
|
||||
|
||||
aFragment->Set4Momentum(aFragment->Get4Momentum()*=toLabFrame);
|
||||
theResult.AddSecondary(aFragment);
|
||||
}
|
||||
}
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
|
||||
if (sumBaryon != 0) {
|
||||
G4cout << "ERROR: no baryon number conservation, sum of baryons = "
|
||||
<< sumBaryon << G4endl;
|
||||
}
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
if (sumEnergy > 0.01 ) {
|
||||
G4cout << "Kinetic energy conservation violated by "
|
||||
<< sumEnergy << " GeV" << G4endl;
|
||||
}
|
||||
|
||||
G4cout << "Total energy conservation at level ~"
|
||||
<< (eInit - eTot) * GeV << " MeV" << G4endl;
|
||||
|
||||
}
|
||||
|
||||
if (sumEnergy < -5.0e-5 ) { // 0.05 MeV
|
||||
G4cout << "FATAL ERROR: energy created "
|
||||
<< sumEnergy * GeV << " MeV" << G4endl;
|
||||
}
|
||||
}
|
||||
return &theResult;
|
||||
}
|
||||
@@ -0,0 +1,312 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
#include "G4CollisionOutput.hh"
|
||||
#include "G4ParticleLargerEkin.hh"
|
||||
#include "g4std/algorithm"
|
||||
|
||||
typedef G4std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
|
||||
G4CollisionOutput::G4CollisionOutput()
|
||||
: verboseLevel(0) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CollisionOutput::G4CollisionOutput" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
void G4CollisionOutput::setOnShell(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CollisionOutput::setOnShell" << G4endl;
|
||||
}
|
||||
|
||||
const G4double accuracy = 0.00001; // momentum concerves at the level of 1 eV
|
||||
|
||||
on_shell = false;
|
||||
|
||||
G4std::vector<G4double> ini_mom = bullet->getMomentum();
|
||||
G4std::vector<G4double> momt = target->getMomentum();
|
||||
|
||||
G4int i;
|
||||
for(i = 0; i < 4; i++) ini_mom[i] += momt[i];
|
||||
|
||||
G4std::vector<G4double> out_mom = getTotalOutputMomentum();
|
||||
G4std::vector<G4double> mon_non_cons(4);
|
||||
if(verboseLevel > 2){
|
||||
G4cout << " bullet momentum = " << ini_mom[0]<<", "<< ini_mom[1]<<", "<< ini_mom[2]<<", "<< ini_mom[3]<<G4endl;
|
||||
G4cout << " target momentum = " << momt[0]<<", "<< momt[1]<<", "<< momt[2]<<", "<< momt[3]<<G4endl;
|
||||
G4cout << " Fstate momentum = " << out_mom[0]<<", "<< out_mom[1]<<", "<< out_mom[2]<<", "<< out_mom[3]<<G4endl;
|
||||
}
|
||||
|
||||
for(i = 0; i < 4; i++) mon_non_cons[i] = ini_mom[i] - out_mom[i];
|
||||
|
||||
G4double pnc = sqrt(mon_non_cons[1] * mon_non_cons[1] +
|
||||
mon_non_cons[2] * mon_non_cons[2] +
|
||||
mon_non_cons[3] * mon_non_cons[3]);
|
||||
|
||||
setRemainingExitationEnergy();
|
||||
|
||||
if(verboseLevel > 2){
|
||||
printCollisionOutput();
|
||||
G4cout << " momentum non conservation: " << G4endl
|
||||
<< " e " << mon_non_cons[0]
|
||||
<< " p " << pnc << G4endl;
|
||||
G4cout << " remaining exitation " << eex_rest << G4endl;
|
||||
}
|
||||
|
||||
if(fabs(mon_non_cons[0]) > accuracy || pnc > accuracy) { // renormalization
|
||||
G4int npart = outgoingParticles.size();
|
||||
|
||||
if(npart > 0) {
|
||||
|
||||
G4std::vector<G4double> last_mom = outgoingParticles[npart - 1].getMomentum();
|
||||
|
||||
for(G4int i = 1; i < 4; i++) last_mom[i] += mon_non_cons[i];
|
||||
outgoingParticles[npart - 1].setMomentum(last_mom);
|
||||
}
|
||||
else {
|
||||
|
||||
G4int nnuc = nucleiFragments.size();
|
||||
|
||||
if(nnuc > 0) {
|
||||
|
||||
G4std::vector<G4double> last_mom = nucleiFragments[nnuc - 1].getMomentum();
|
||||
|
||||
for(G4int i = 1; i < 4; i++) last_mom[i] += mon_non_cons[i];
|
||||
nucleiFragments[nnuc - 1].setMomentum(last_mom);
|
||||
nucleiFragments[nnuc - 1].setEnergy();
|
||||
};
|
||||
};
|
||||
out_mom = getTotalOutputMomentum();
|
||||
for(G4int i = 0; i < 4; i++) mon_non_cons[i] = ini_mom[i] - out_mom[i];
|
||||
pnc = sqrt(mon_non_cons[1] * mon_non_cons[1] +
|
||||
mon_non_cons[2] * mon_non_cons[2] +
|
||||
mon_non_cons[3] * mon_non_cons[3]);
|
||||
|
||||
if(verboseLevel > 2){
|
||||
printCollisionOutput();
|
||||
G4cout << " momentum non conservation after (1): " << G4endl
|
||||
<< " e " << mon_non_cons[0] << " p " << pnc << G4endl;
|
||||
}
|
||||
G4bool need_hard_tuning = true;
|
||||
|
||||
if(nucleiFragments.size() > 0) {
|
||||
for(G4int i = 0; i < G4int(nucleiFragments.size()); i++) {
|
||||
|
||||
G4double eex = nucleiFragments[i].getExitationEnergyInGeV();
|
||||
|
||||
if(eex > 0.0 && eex + mon_non_cons[0] >= 0.0) {
|
||||
nucleiFragments[i].setExitationEnergy(1000.0 * (eex + mon_non_cons[0]));
|
||||
need_hard_tuning = false;
|
||||
break;
|
||||
};
|
||||
};
|
||||
if(need_hard_tuning && mon_non_cons[0] > 0.) {
|
||||
nucleiFragments[0].setExitationEnergy(1000.0 * mon_non_cons[0]);
|
||||
need_hard_tuning = false;
|
||||
};
|
||||
};
|
||||
|
||||
if(need_hard_tuning) {
|
||||
|
||||
G4std::pair<G4std::pair<G4int, G4int>, G4int> tune_par = selectPairToTune(mon_non_cons[0]);
|
||||
G4std::pair<G4int, G4int> tune_particles = tune_par.first;
|
||||
G4int mom_ind = tune_par.second;
|
||||
|
||||
if(verboseLevel > 2) {
|
||||
G4cout << " p1 " << tune_particles.first << " p2 " << tune_particles.second
|
||||
<< " ind " << mom_ind << G4endl;
|
||||
}
|
||||
if(tune_particles.first >= 0 && tune_particles.second >= 0 &&
|
||||
mom_ind >= 1) { // tunning possible
|
||||
|
||||
G4std::vector<G4double> mom1 = outgoingParticles[tune_particles.first].getMomentum();
|
||||
G4std::vector<G4double> mom2 = outgoingParticles[tune_particles.second].getMomentum();
|
||||
G4double newE12 = mom1[0] + mom2[0] + mon_non_cons[0];
|
||||
G4double R = 0.5 * (newE12 * newE12 + mom2[0] * mom2[0] - mom1[0] * mom1[0]) / newE12;
|
||||
G4double Q = -(mom1[mom_ind] + mom2[mom_ind]) / newE12;
|
||||
G4double UDQ = 1.0 / (Q * Q - 1.0);
|
||||
G4double W = (R * Q + mom2[mom_ind]) * UDQ;
|
||||
G4double V = (mom2[0] * mom2[0] - R * R) * UDQ;
|
||||
G4double DET = W * W + V;
|
||||
|
||||
if(DET > 0.0) {
|
||||
|
||||
G4double x1 = -(W + sqrt(DET));
|
||||
G4double x2 = -(W - sqrt(DET));
|
||||
// choose the appropriate solution
|
||||
G4bool xset = false;
|
||||
G4double x = 0.0;
|
||||
|
||||
if(mon_non_cons[0] > 0.0) { // x has to be > 0.0
|
||||
if(x1 > 0.0) {
|
||||
if(R + Q * x1 >= 0.0) {
|
||||
x = x1;
|
||||
xset = true;
|
||||
};
|
||||
};
|
||||
if(!xset && x2 > 0.0) {
|
||||
if(R + Q * x2 >= 0.0) {
|
||||
x = x2;
|
||||
xset = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
else {
|
||||
if(x1 < 0.0) {
|
||||
if(R + Q * x1 >= 0.) {
|
||||
x = x1;
|
||||
xset = true;
|
||||
};
|
||||
};
|
||||
if(!xset && x2 < 0.0) {
|
||||
if(R + Q * x2 >= 0.0) {
|
||||
x = x2;
|
||||
xset = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
if(xset) { // retune momentums
|
||||
mom1[mom_ind] += x;
|
||||
mom2[mom_ind] -= x;
|
||||
outgoingParticles[tune_particles.first ].setMomentum(mom1);
|
||||
outgoingParticles[tune_particles.second].setMomentum(mom2);
|
||||
out_mom = getTotalOutputMomentum();
|
||||
G4std::sort(outgoingParticles.begin(), outgoingParticles.end(), G4ParticleLargerEkin());
|
||||
for(G4int i = 0; i < 4; i++) mon_non_cons[i] = ini_mom[i] - out_mom[i];
|
||||
pnc = sqrt(mon_non_cons[1] * mon_non_cons[1] +
|
||||
mon_non_cons[2] * mon_non_cons[2] +
|
||||
mon_non_cons[3] * mon_non_cons[3]);
|
||||
if(verboseLevel > 2){
|
||||
G4cout << " momentum non conservation tuning: " << G4endl
|
||||
<< " e " << mon_non_cons[0] << " p " << pnc << G4endl;
|
||||
}
|
||||
if(fabs(mon_non_cons[0]) < accuracy || pnc < accuracy) on_shell = true;
|
||||
}
|
||||
else {
|
||||
if(verboseLevel > 2){
|
||||
G4cout << " no appropriate solution found " << G4endl;
|
||||
}
|
||||
};
|
||||
}
|
||||
else {
|
||||
if(verboseLevel > 2){
|
||||
G4cout << " DET < 0 " << G4endl;
|
||||
}
|
||||
};
|
||||
}
|
||||
else {
|
||||
if(verboseLevel > 2){
|
||||
G4cout << " tuning impossible " << G4endl;
|
||||
}
|
||||
};
|
||||
}
|
||||
else {
|
||||
on_shell = true;
|
||||
};
|
||||
}
|
||||
else {
|
||||
on_shell = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
G4std::pair<G4std::pair<G4int, G4int>, G4int> G4CollisionOutput::selectPairToTune(G4double de) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CollisionOutput::selectPairToTune" << G4endl;
|
||||
}
|
||||
|
||||
G4std::pair<G4int, G4int> tup(-1, -1);
|
||||
G4int i3 = -1;
|
||||
G4std::pair<G4std::pair<G4int, G4int>, G4int> badp(tup, i3);
|
||||
|
||||
if(outgoingParticles.size() < 2) {
|
||||
|
||||
return badp;
|
||||
}
|
||||
else {
|
||||
|
||||
G4int ibest1 = -1;
|
||||
G4int ibest2 = -1;
|
||||
G4double pbest = 0.0;
|
||||
G4double pcut = 0.3 * sqrt(1.88 * fabs(de));
|
||||
G4double p1 = 0.0;
|
||||
G4double p2;
|
||||
|
||||
for(G4int i = 0; i < G4int(outgoingParticles.size()) - 1; i++) {
|
||||
|
||||
G4std::vector<G4double> mom1 = outgoingParticles[i].getMomentum();
|
||||
|
||||
for(G4int j = i+1; j < G4int(outgoingParticles.size()); j++) {
|
||||
|
||||
G4std::vector<G4double> mom2 = outgoingParticles[j].getMomentum();
|
||||
|
||||
for(G4int l = 1; l < 4; l++) {
|
||||
if(mom1[l] * mom2[l] < 0.0) {
|
||||
if(fabs(mom1[l]) > pcut && fabs(mom2[l]) > pcut) {
|
||||
|
||||
G4double psum = fabs(mom1[l]) + fabs(mom2[l]);
|
||||
|
||||
if(psum > pbest) {
|
||||
ibest1 = i;
|
||||
ibest2 = j;
|
||||
i3 = l;
|
||||
p1 = mom1[l];
|
||||
p2 = mom2[l];
|
||||
pbest = psum;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
if(i3 > 0) {
|
||||
if(de > 0.0) {
|
||||
if(p1 > 0.0) {
|
||||
tup.first = ibest1;
|
||||
tup.second = ibest2;
|
||||
}
|
||||
else {
|
||||
tup.first = ibest2;
|
||||
tup.second = ibest1;
|
||||
};
|
||||
}
|
||||
else {
|
||||
if(p1 < 0.0) {
|
||||
tup.first = ibest2;
|
||||
tup.second = ibest1;
|
||||
}
|
||||
else {
|
||||
tup.first = ibest1;
|
||||
tup.second = ibest2;
|
||||
};
|
||||
};
|
||||
|
||||
return G4std::pair<G4std::pair<G4int, G4int>, G4int>(tup, i3);
|
||||
};
|
||||
};
|
||||
|
||||
return badp;
|
||||
}
|
||||
+1968
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,724 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
#define RUN
|
||||
|
||||
#include "G4EquilibriumEvaporator.hh"
|
||||
#include "G4InuclNuclei.hh"
|
||||
#include "G4LorentzConvertor.hh"
|
||||
|
||||
G4EquilibriumEvaporator::G4EquilibriumEvaporator()
|
||||
: verboseLevel(1) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4EquilibriumEvaporator::G4EquilibriumEvaporator" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4EquilibriumEvaporator::collide" << G4endl;
|
||||
}
|
||||
|
||||
// simple implementation of the equilibium evaporation a la Dostrowski
|
||||
const G4double huge_num = 50.0;
|
||||
const G4double small = -50.0;
|
||||
const G4double one_third = 1.0 / 3.0;
|
||||
const G4double two_thirds = 2.0 / 3.0;
|
||||
const G4double prob_cut_off = 1.0e-15;
|
||||
const G4double Q1[6] = { 0.0, 0.0, 2.23, 8.49, 7.72, 28.3 };
|
||||
const G4double AN[6] = { 1.0, 1.0, 2.0, 3.0, 3.0, 4.0 };
|
||||
const G4double Q[6] = { 0.0, 1.0, 1.0, 1.0, 2.0, 2.0 };
|
||||
const G4double G[6] = { 2.0, 2.0, 6.0, 6.0, 6.0, 4.0 };
|
||||
const G4double BE = 0.0063;
|
||||
const G4double fisssion_cut = 1000.0;
|
||||
|
||||
#ifdef RUN
|
||||
const G4double cut_off_energy = 0.1;
|
||||
#else
|
||||
const G4double cut_off_energy = 100000.0;
|
||||
#endif
|
||||
|
||||
const G4double BF = 0.0242;
|
||||
const G4int itry_max = 1000;
|
||||
const G4int itry_global_max = 1000;
|
||||
const G4double small_ekin = 1.0e-6;
|
||||
const G4int itry_gam_max = 100;
|
||||
|
||||
G4std::vector<G4double> W(8);
|
||||
G4std::vector<G4double> A1(6);
|
||||
G4std::vector<G4double> Z1(6);
|
||||
G4std::vector<G4double> u(6);
|
||||
G4std::vector<G4double> V(6);
|
||||
G4std::vector<G4double> TM(6);
|
||||
|
||||
G4double coul_coeff;
|
||||
G4CollisionOutput output;
|
||||
|
||||
if (G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target)) {
|
||||
G4double A = nuclei_target->getA();
|
||||
G4double Z = nuclei_target->getZ();
|
||||
G4std::vector<G4double> PEX = nuclei_target->getMomentum();
|
||||
G4double EEXS = nuclei_target->getExitationEnergy();
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
if (EEXS < 0.0) G4cout << " after noeq: eexs " << EEXS << G4endl;
|
||||
}
|
||||
|
||||
G4InuclElementaryParticle dummy(small_ekin, 1);
|
||||
G4LorentzConvertor toTheNucleiSystemRestFrame;
|
||||
toTheNucleiSystemRestFrame.setBullet(dummy.getMomentum(), dummy.getMass());
|
||||
G4std::vector<G4double> ppout(4, 0.0);
|
||||
|
||||
if (timeToBigBang(A, Z, EEXS)) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " big bang in eql start " << G4endl;
|
||||
}
|
||||
|
||||
return theBigBanger->collide(0, target);
|
||||
|
||||
} else {
|
||||
|
||||
if (A >= 100.0) {
|
||||
coul_coeff = 1.4;
|
||||
|
||||
} else {
|
||||
coul_coeff = 1.2;
|
||||
};
|
||||
|
||||
G4InuclNuclei dummy_nuc;
|
||||
G4double EEXS_new;
|
||||
G4std::vector<G4double> pin = PEX;
|
||||
pin[0] += 0.001 * EEXS;
|
||||
G4bool try_again = true;
|
||||
G4bool fission_open = true;
|
||||
G4double nuc_mass;
|
||||
G4int itry_global = 0;
|
||||
|
||||
while (try_again && itry_global < itry_global_max) {
|
||||
itry_global++;
|
||||
|
||||
if (verboseLevel > 2){
|
||||
G4cout << " A " << A << " Z " << Z << " EEXS " << EEXS << G4endl;
|
||||
}
|
||||
|
||||
nuc_mass = dummy_nuc.getNucleiMass(A, Z);
|
||||
PEX[0] = sqrt(PEX[1] * PEX[1] +
|
||||
PEX[2] * PEX[2] +
|
||||
PEX[3] * PEX[3] +
|
||||
nuc_mass * nuc_mass);
|
||||
toTheNucleiSystemRestFrame.setTarget(PEX, nuc_mass);
|
||||
toTheNucleiSystemRestFrame.toTheTargetRestFrame();
|
||||
|
||||
if (timeToBigBang(A, Z, EEXS)) { // big bang
|
||||
|
||||
if (verboseLevel > 2){
|
||||
G4cout << " big bang in eql step " << G4endl;
|
||||
}
|
||||
|
||||
G4InuclNuclei nuclei(PEX, A, Z);
|
||||
|
||||
nuclei.setExitationEnergy(EEXS);
|
||||
|
||||
G4CollisionOutput explosion = theBigBanger->collide(0, &nuclei);
|
||||
|
||||
output.addOutgoingParticles(explosion.getOutgoingParticles());
|
||||
|
||||
return output;
|
||||
|
||||
} else { // normal chain
|
||||
|
||||
if (EEXS > cut_off_energy) {
|
||||
|
||||
G4double E0 = getE0(A);
|
||||
G4double parlev = getPARLEVDEN(A, Z);
|
||||
G4double u1 = parlev * A;
|
||||
G4std::pair<G4std::vector<G4double>, G4std::vector<G4double> > parms = paraMaker(Z);
|
||||
G4std::vector<G4double> AK = parms.first;
|
||||
G4std::vector<G4double> CPA = parms.second;
|
||||
G4double DM0 = bindingEnergy(A, Z);
|
||||
G4int i(0);
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
A1[i] = A - AN[i];
|
||||
Z1[i] = Z - Q[i];
|
||||
u[i] = parlev * A1[i];
|
||||
TM[i] = -0.1;
|
||||
|
||||
if (goodRemnant(A1[i], Z1[i])) {
|
||||
G4double QB = DM0 - bindingEnergy(A1[i], Z1[i]) - Q1[i];
|
||||
V[i] = coul_coeff * Z * Q[i] * AK[i] / (1.0 + EEXS / E0) /
|
||||
(pow(A1[i], one_third) + pow(AN[i], one_third));
|
||||
TM[i] = EEXS - QB - V[i] * A / A1[i];
|
||||
};
|
||||
};
|
||||
|
||||
G4double ue = 2.0 * sqrt(u1 * EEXS);
|
||||
G4double prob_sum = 0.0;
|
||||
|
||||
if (TM[0] > cut_off_energy) {
|
||||
G4double AL = getAL(A);
|
||||
W[0] = BE * pow(A1[0], two_thirds) * G[0] * AL;
|
||||
G4double TM1 = 2.0 * sqrt(u[0] * TM[0]) - ue;
|
||||
|
||||
if (TM1 > huge_num) {
|
||||
TM1 = huge_num;
|
||||
|
||||
} else if (TM1 < small) {
|
||||
TM1 = small;
|
||||
};
|
||||
W[0] = W[0] * exp(TM1);
|
||||
prob_sum += W[0];
|
||||
|
||||
} else {
|
||||
W[0] = 0.0;
|
||||
};
|
||||
|
||||
for (i = 1; i < 6; i++) {
|
||||
|
||||
if (TM[i] > cut_off_energy) {
|
||||
W[i] = BE * pow(A1[i], two_thirds) * G[i] * (1.0 + CPA[i]);
|
||||
G4double TM1 = 2.0 * sqrt(u[i] * TM[i]) - ue;
|
||||
|
||||
if (TM1 > huge_num) {
|
||||
TM1 = huge_num;
|
||||
|
||||
} else if (TM1 < small) {
|
||||
TM1 = small;
|
||||
};
|
||||
W[i] = W[i] * exp(TM1);
|
||||
prob_sum += W[i];
|
||||
|
||||
} else {
|
||||
W[i] = 0.0;
|
||||
};
|
||||
};
|
||||
// fisson part
|
||||
W[6] = 0.0;
|
||||
|
||||
if (A >= 100.0 && fission_open) {
|
||||
G4double X2 = Z * Z / A;
|
||||
G4double X1 = 1.0 - 2.0 * Z / A;
|
||||
G4double X = 0.019316 * X2 / (1.0 - 1.79 * X1 * X1);
|
||||
G4double EF = EEXS - getQF(X, X2, A, Z, EEXS);
|
||||
|
||||
if (EF > 0.0) {
|
||||
G4double AF = u1 * getAF(X, A, Z, EEXS);
|
||||
G4double TM1 = 2.0 * sqrt(AF * EF) - ue;
|
||||
|
||||
if (TM1 > huge_num) {
|
||||
TM1 = huge_num;
|
||||
|
||||
} else if (TM1 < small) {
|
||||
TM1 = small;
|
||||
};
|
||||
W[6] = BF * exp(TM1);
|
||||
|
||||
if (W[6] > fisssion_cut * W[0]) W[6] = fisssion_cut * W[0];
|
||||
prob_sum += W[6];
|
||||
};
|
||||
};
|
||||
// again time to decide what next
|
||||
|
||||
if (verboseLevel > 2){
|
||||
G4cout << " wn " << W[0] << " wp " << W[1] << " wd " << W[2] << G4endl
|
||||
<< " wh3 " << W[3] << " wt " << W[4] << " whe4 " << W[5] << G4endl
|
||||
<< " wfi " << W[6] << G4endl;
|
||||
}
|
||||
|
||||
G4int icase = -1;
|
||||
|
||||
if (prob_sum < prob_cut_off) { // photon emission chain
|
||||
G4double UCR0 = 2.5 + 150.0 / A;
|
||||
G4double T00 = 1.0 / (sqrt(u1 / UCR0) - 1.25 / UCR0);
|
||||
G4int itry_gam = 0;
|
||||
|
||||
while (EEXS > cut_off_energy && try_again) {
|
||||
itry_gam++;
|
||||
G4int itry = 0;
|
||||
G4double T04 = 4.0 * T00;
|
||||
G4double FMAX;
|
||||
|
||||
if (T04 < EEXS) {
|
||||
FMAX = pow(T04, 4) * exp((EEXS - T04) / T00);
|
||||
|
||||
} else {
|
||||
FMAX = pow(EEXS, 4);
|
||||
};
|
||||
|
||||
G4double S;
|
||||
|
||||
while (itry < itry_max) {
|
||||
itry++;
|
||||
S = EEXS * inuclRndm();
|
||||
G4double X1 = pow(S, 4) * exp((EEXS - S) / T00);
|
||||
|
||||
if (X1 > FMAX * inuclRndm()) break;
|
||||
};
|
||||
|
||||
if (itry < itry_max) {
|
||||
// new photon escape
|
||||
G4InuclElementaryParticle particle(10);
|
||||
G4double pmod = 0.001 * S;
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = pmod * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
mom[2] = P1 * sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
mom[0] = pmod;
|
||||
G4std::vector<G4double> mom_at_rest(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) mom_at_rest[i] = -mom[i];
|
||||
mom_at_rest[0] = sqrt(mom_at_rest[1] * mom_at_rest[1] +
|
||||
mom_at_rest[2] * mom_at_rest[2] +
|
||||
mom_at_rest[3] * mom_at_rest[3] +
|
||||
nuc_mass * nuc_mass);
|
||||
|
||||
G4std::vector<G4double> part_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom);
|
||||
|
||||
part_mom[0] = sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[2] * part_mom[2] +
|
||||
part_mom[3] * part_mom[3]);
|
||||
|
||||
G4std::vector<G4double> ex_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom_at_rest);
|
||||
|
||||
ex_mom[0] = sqrt(ex_mom[1] * ex_mom[1] +
|
||||
ex_mom[2] * ex_mom[2]
|
||||
+ ex_mom[3] * ex_mom[3] +
|
||||
nuc_mass * nuc_mass);
|
||||
EEXS_new = 1000.0 * (PEX[0] + 0.001 * EEXS -
|
||||
part_mom[0] - ex_mom[0]);
|
||||
|
||||
if (EEXS_new > 0.0) { // everything ok
|
||||
PEX = ex_mom;
|
||||
EEXS = EEXS_new;
|
||||
particle.setMomentum(part_mom);
|
||||
output.addOutgoingParticle(particle);
|
||||
|
||||
for (G4int i = 0; i < 4; i++) ppout[i] += part_mom[i];
|
||||
|
||||
} else {
|
||||
|
||||
if (itry_gam == itry_gam_max) try_again = false;
|
||||
};
|
||||
|
||||
} else {
|
||||
try_again = false;
|
||||
};
|
||||
};
|
||||
try_again = false;
|
||||
|
||||
} else {
|
||||
G4double SL = prob_sum * inuclRndm();
|
||||
G4double S1 = 0.0;
|
||||
|
||||
for (G4int i = 0; i < 7; i++) {
|
||||
S1 += W[i];
|
||||
|
||||
if (SL <= S1) {
|
||||
icase = i;
|
||||
|
||||
break;
|
||||
};
|
||||
};
|
||||
|
||||
if (icase < 6) { // particle or light nuclei escape
|
||||
G4double uc = 2.0 * sqrt(u[icase] * TM[icase]);
|
||||
G4double ur = (uc > huge_num ? exp(huge_num) : exp(uc));
|
||||
G4double d1 = 1.0 / ur;
|
||||
G4double d2 = 1.0 / (ur - 1.0);
|
||||
G4int itry1 = 0;
|
||||
G4bool bad = true;
|
||||
|
||||
while (itry1 < itry_max && bad) {
|
||||
itry1++;
|
||||
G4int itry = 0;
|
||||
G4double EPR = -1.0;
|
||||
G4double S = 0.0;
|
||||
|
||||
while (itry < itry_max && EPR < 0.0) {
|
||||
itry++;
|
||||
G4double uu = uc + log((1.0 - d1) * inuclRndm() + d2);
|
||||
S = 0.5 * (uc * uc - uu * uu) / u[icase];
|
||||
EPR = TM[icase] - S * A / (A - 1.0) + V[icase];
|
||||
};
|
||||
|
||||
if (EPR > 0.0 && S > 0.0) { // real escape
|
||||
S = 0.001 * S;
|
||||
|
||||
if (icase < 2) { // particle escape
|
||||
G4int ptype = 2 - icase;
|
||||
G4InuclElementaryParticle particle(ptype);
|
||||
G4double mass = particle.getMass();
|
||||
// generate particle momentum
|
||||
G4double pmod = sqrt((2.0 * mass + S) * S);
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = pmod * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
mom[2] = P1 * sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
G4std::vector<G4double> mom_at_rest(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) mom_at_rest[i] = -mom[i];
|
||||
G4double new_nuc_mass = dummy_nuc.getNucleiMass(A1[icase],
|
||||
Z1[icase]);
|
||||
mom_at_rest[0] = sqrt(mom_at_rest[1] * mom_at_rest[1] +
|
||||
mom_at_rest[2] * mom_at_rest[2] +
|
||||
mom_at_rest[3] * mom_at_rest[3] +
|
||||
new_nuc_mass * new_nuc_mass);
|
||||
mom[0] = sqrt(mom[1] * mom[1] + mom[2] * mom[2] +
|
||||
mom[3] * mom[3] + mass * mass);
|
||||
|
||||
G4std::vector<G4double> part_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom);
|
||||
part_mom[0] = sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[2] * part_mom[2] +
|
||||
part_mom[3] * part_mom[3] +
|
||||
mass * mass);
|
||||
G4std::vector<G4double> ex_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom_at_rest);
|
||||
ex_mom[0] = sqrt(ex_mom[1] * ex_mom[1] +
|
||||
ex_mom[2] * ex_mom[2] +
|
||||
ex_mom[3] * ex_mom[3] +
|
||||
new_nuc_mass * new_nuc_mass);
|
||||
EEXS_new = 1000.0 * (PEX[0] + 0.001 * EEXS -
|
||||
part_mom[0] - ex_mom[0]);
|
||||
|
||||
if (EEXS_new > 0.0) { // everything ok
|
||||
PEX = ex_mom;
|
||||
EEXS = EEXS_new;
|
||||
A = A1[icase];
|
||||
Z = Z1[icase];
|
||||
particle.setMomentum(part_mom);
|
||||
output.addOutgoingParticle(particle);
|
||||
|
||||
for (G4int i = 0; i < 4; i++) ppout[i] += part_mom[i];
|
||||
bad = false;
|
||||
};
|
||||
|
||||
} else {
|
||||
G4InuclNuclei nuclei(AN[icase], Q[icase]);
|
||||
G4double mass = nuclei.getMass();
|
||||
// generate particle momentum
|
||||
G4double pmod = sqrt((2.0 * mass + S) * S);
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = pmod * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
mom[2] = P1 * sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
G4std::vector<G4double> mom_at_rest(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) mom_at_rest[i] = -mom[i];
|
||||
G4double new_nuc_mass = dummy_nuc.getNucleiMass(A1[icase],
|
||||
Z1[icase]);
|
||||
mom_at_rest[0] = sqrt(mom_at_rest[1] * mom_at_rest[1] +
|
||||
mom_at_rest[2] * mom_at_rest[2] +
|
||||
mom_at_rest[3] * mom_at_rest[3] +
|
||||
new_nuc_mass * new_nuc_mass);
|
||||
mom[0] = sqrt(mom[1] * mom[1] +
|
||||
mom[2] * mom[2] +
|
||||
mom[3] * mom[3] +
|
||||
mass * mass);
|
||||
G4std::vector<G4double> part_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom);
|
||||
part_mom[0] = sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[2] * part_mom[2] +
|
||||
part_mom[3] * part_mom[3] +
|
||||
mass * mass);
|
||||
G4std::vector<G4double> ex_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom_at_rest);
|
||||
ex_mom[0] = sqrt(ex_mom[1] * ex_mom[1] +
|
||||
ex_mom[2] * ex_mom[2] +
|
||||
ex_mom[3] * ex_mom[3] +
|
||||
new_nuc_mass * new_nuc_mass);
|
||||
EEXS_new = 1000.0 * (PEX[0] + 0.001 * EEXS -
|
||||
part_mom[0] - ex_mom[0]);
|
||||
|
||||
if (EEXS_new > 0.0) { // everything ok
|
||||
PEX = ex_mom;
|
||||
EEXS = EEXS_new;
|
||||
A = A1[icase];
|
||||
Z = Z1[icase];
|
||||
|
||||
for (G4int i = 0; i < 4; i++) ppout[i] += part_mom[i];
|
||||
nuclei.setMomentum(part_mom);
|
||||
nuclei.setExitationEnergy(0.0);
|
||||
nuclei.setEnergy();
|
||||
output.addTargetFragment(nuclei);
|
||||
bad = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (itry1 == itry_max || bad) try_again = false;
|
||||
|
||||
} else { // fission
|
||||
G4InuclNuclei nuclei(A, Z);
|
||||
nuclei.setExitationEnergy(EEXS);
|
||||
|
||||
if (verboseLevel > 2){
|
||||
G4cout << " fission: A " << A << " Z " << Z << " eexs " << EEXS <<
|
||||
" Wn " << W[0] << " Wf " << W[6] << G4endl;
|
||||
}
|
||||
|
||||
G4CollisionOutput foutput = theFissioner->collide(0, &nuclei);
|
||||
G4std::vector<G4InuclNuclei> nuclea = foutput.getNucleiFragments();
|
||||
|
||||
if (nuclea.size() == 2) { // fission o'k
|
||||
// convert back to the lab
|
||||
|
||||
for(G4int i = 0; i < 2; i++) {
|
||||
G4std::vector<G4double> mom = nuclea[i].getMomentum();
|
||||
mom = toTheNucleiSystemRestFrame.backToTheLab(mom);
|
||||
nuclea[i].setMomentum(mom);
|
||||
nuclea[i].setEnergy();
|
||||
};
|
||||
|
||||
G4CollisionOutput output1 = this->collide(0, &nuclea[0]);
|
||||
|
||||
output.addOutgoingParticles(output1.getOutgoingParticles());
|
||||
output.addTargetFragments(output1.getNucleiFragments());
|
||||
|
||||
output1 = this->collide(0, &nuclea[1]);
|
||||
|
||||
output.addOutgoingParticles(output1.getOutgoingParticles());
|
||||
output.addTargetFragments(output1.getNucleiFragments());
|
||||
|
||||
return output;
|
||||
|
||||
} else { // fission forbidden now
|
||||
fission_open = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
} else {
|
||||
try_again = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
// this time it's final nuclei
|
||||
|
||||
if (itry_global == itry_global_max) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " ! itry_global " << itry_global_max << G4endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
G4std::vector<G4double> pnuc(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) pnuc[i] = pin[i] - ppout[i];
|
||||
|
||||
G4InuclNuclei nuclei(pnuc, A, Z);
|
||||
nuclei.setEnergy();
|
||||
pnuc = nuclei.getMomentum();
|
||||
G4double eout = pnuc[0] + ppout[0];
|
||||
G4double eex_real = 1000.0 * (pin[0] - eout);
|
||||
|
||||
nuclei.setExitationEnergy(eex_real);
|
||||
|
||||
output.addTargetFragment(nuclei);
|
||||
};
|
||||
|
||||
} else {
|
||||
G4cout << " EquilibriumEvaporator -> target is not nuclei " << G4endl;
|
||||
};
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
G4bool G4EquilibriumEvaporator::timeToBigBang(G4double a,
|
||||
G4double z,
|
||||
G4double e) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4EquilibriumEvaporator::timeToBigBang" << G4endl;
|
||||
}
|
||||
|
||||
const G4double be_cut = 3.0;
|
||||
G4bool bigb = true;
|
||||
|
||||
if (a >= 12 && z >= 6.0 && z < 3.0 * (a - z)) {
|
||||
bigb = false;
|
||||
|
||||
} else {
|
||||
|
||||
if (e < be_cut * bindingEnergy(a, z)) bigb = false;
|
||||
};
|
||||
|
||||
return bigb;
|
||||
}
|
||||
|
||||
G4bool G4EquilibriumEvaporator::goodRemnant(G4double a,
|
||||
G4double z) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4EquilibriumEvaporator::goodRemnant" << G4endl;
|
||||
}
|
||||
|
||||
return a > 1.0 && z > 0.0 && a > z;
|
||||
}
|
||||
|
||||
G4double G4EquilibriumEvaporator::getQF(G4double x,
|
||||
G4double x2,
|
||||
G4double a,
|
||||
G4double z,
|
||||
G4double e) const {
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4EquilibriumEvaporator::getQF" << G4endl;
|
||||
}
|
||||
|
||||
const G4double QFREP[72] = {
|
||||
// TL201 * * * *
|
||||
// 1 2 3 4 5
|
||||
22.5, 22.0, 21.0, 21.0, 20.0,
|
||||
// BI209 BI207 PO210 AT213 * TH234
|
||||
// 6 7 8 9 10 11
|
||||
20.6, 20.6, 18.6, 15.8, 13.5, 6.5,
|
||||
// TH233 TH232 TH231 TH230 TX229 PA233 PA232 PA231 PA230 U240
|
||||
// 12 13 14 15 16 17 18 19 20 21
|
||||
6.65, 6.22, 6.27, 6.5, 6.7, 6.2, 6.25, 5.9, 6.1, 5.75,
|
||||
// U239 U238 U237 U236 U235 U234 U233 U232 U231
|
||||
// 22 23 24 25 26 27 28 29 30
|
||||
6.46, 5.7, 6.28, 5.8, 6.15, 5.6, 5.8, 5.2, 5.8,
|
||||
// NP238 NP237 NP236 NP235 PU245 NP234 PU244 NP233
|
||||
// 31 32 33 34 35 36 37 38
|
||||
6.2 , 5.9 , 5.9, 6.0, 5.8, 5.7, 5.4, 5.4,
|
||||
// PU242 PU241 PU240 PU239 PU238 AM247 PU236 AM245 AM244 AM243
|
||||
// 39 40 41 42 43 44 45 46 47 48
|
||||
5.6, 6.1, 5.57, 6.3, 5.5, 5.8, 4.7, 6.2, 6.4, 6.2,
|
||||
// AM242 AM241 AM240 CM250 AM239 CM249 CM248 CM247 CM246
|
||||
// 49 50 51 52 53 54 55 56 57
|
||||
6.5, 6.2, 6.5, 5.3, 6.4, 5.7, 5.7, 6.2, 5.7,
|
||||
// CM245 CM244 CM243 CM242 CM241 BK250 CM240
|
||||
// 58 59 60 61 62 63 64
|
||||
6.3, 5.8, 6.7, 5.8, 6.6, 6.1, 4.3,
|
||||
// BK249 CF252 CF250 CF248 CF246 ES254 ES253 FM254
|
||||
// 65 66 67 68 69 70 71 72
|
||||
6.2, 3.8, 5.6, 4.0, 4.0, 4.2, 4.2, 3.5 };
|
||||
|
||||
const G4double XREP[72] = {
|
||||
// 1 2 3 4 5
|
||||
0.6761, 0.677, 0.6788, 0.6803, 0.685,
|
||||
// 6 7 8 9 10 11
|
||||
0.6889, 0.6914, 0.6991, 0.7068, 0.725, 0.7391,
|
||||
// 12 13 14 15 16 17 18 19 20 21
|
||||
0.74, 0.741, 0.742, 0.743, 0.744, 0.7509, 0.752, 0.7531, 0.7543, 0.7548,
|
||||
// 22 23 24
|
||||
0.7557, 0.7566, 0.7576,
|
||||
// 25 26 27 28 29 30 31 32 33 34
|
||||
0.7587, 0.7597, 0.7608, 0.762, 0.7632, 0.7644, 0.7675, 0.7686, 0.7697, 0.7709,
|
||||
// 35 36 37 38 39 40 41
|
||||
0.7714, 0.7721, 0.7723, 0.7733, 0.7743, 0.7753, 0.7764,
|
||||
// 42 43 44 45 46 47 48 49
|
||||
0.7775, 0.7786, 0.7801, 0.781, 0.7821, 0.7831, 0.7842, 0.7852,
|
||||
// 50 51 52 53 54 55 56 57 58
|
||||
0.7864, 0.7875, 0.7880, 0.7887, 0.7889, 0.7899, 0.7909, 0.7919, 0.7930,
|
||||
// 59 60 61 62 63 64
|
||||
0.7941, 0.7953, 0.7965, 0.7977, 0.7987, 0.7989,
|
||||
// 65 66 67 68 69 70 71 72
|
||||
0.7997, 0.8075, 0.8097, 0.8119, 0.8143, 0.8164, 0.8174, 0.8274 };
|
||||
|
||||
const G4double G0 = 20.4;
|
||||
const G4double XMIN = 0.6761;
|
||||
const G4double XMAX = 0.8274;
|
||||
|
||||
G4double QFF = 0.0;
|
||||
|
||||
if (x < XMIN || x > XMAX) {
|
||||
|
||||
G4double X1 = 1.0 - 0.02 * x2;
|
||||
G4double FX = (0.73 + (3.33 * X1 - 0.66) * X1) * pow(X1, 3);
|
||||
|
||||
QFF = G0 * FX * pow(a, 2.0 / 3.0);
|
||||
|
||||
} else {
|
||||
|
||||
for (G4int i = 1; i < 72; i++) {
|
||||
|
||||
if (x <= XREP[i]) {
|
||||
QFF = QFREP[i - 1] + (QFREP[i] - QFREP[i - 1]) * (x - XREP[i - 1])/
|
||||
(XREP[i] - XREP[i - 1]);
|
||||
|
||||
break;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (QFF < 0.0) QFF = 0.0;
|
||||
|
||||
return QFF;
|
||||
}
|
||||
|
||||
G4double G4EquilibriumEvaporator::getAF(G4double x,
|
||||
G4double a,
|
||||
G4double z,
|
||||
G4double e) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4EquilibriumEvaporator::getAF" << G4endl;
|
||||
}
|
||||
|
||||
// ugly parameterisation to fit the experimental fission cs for Hg - Bi nuclei
|
||||
G4double AF = 1.285 * (1.0 - e / 1100.0);
|
||||
|
||||
if(AF < 1.06) AF = 1.06;
|
||||
// if(AF < 1.08) AF = 1.08;
|
||||
|
||||
return AF;
|
||||
}
|
||||
|
||||
G4double G4EquilibriumEvaporator::getPARLEVDEN(G4double A,
|
||||
G4double Z) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4EquilibriumEvaporator::getPARLEVDEN" << G4endl;
|
||||
}
|
||||
|
||||
const G4double par = 0.125;
|
||||
|
||||
return par;
|
||||
}
|
||||
|
||||
G4double G4EquilibriumEvaporator::getE0(G4double A) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4EquilibriumEvaporator::getE0" << G4endl;
|
||||
}
|
||||
|
||||
const G4double e0 = 200.0;
|
||||
|
||||
return e0;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
#include "G4FissionStore.hh"
|
||||
#include <math.h>
|
||||
|
||||
G4FissionStore::G4FissionStore()
|
||||
: verboseLevel(2){
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4FissionStore::G4FissionStore" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
G4FissionConfiguration G4FissionStore::generateConfiguration(G4double amax,
|
||||
G4double rand) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4FissionStore::generateConfiguration" << G4endl;
|
||||
}
|
||||
|
||||
const G4double small = -30.0;
|
||||
|
||||
G4double totProb = 0.0;
|
||||
G4std::vector<G4double> probs(configurations.size());
|
||||
|
||||
// G4cout << " amax " << amax << " ic " << configurations.size() << G4endl;
|
||||
|
||||
for (G4int i = 0; i < G4int(configurations.size()); i++) {
|
||||
G4double ez = configurations[i].ezet;
|
||||
G4double pr = ez - amax;
|
||||
|
||||
if (pr < small) pr = small;
|
||||
pr = exp(pr);
|
||||
// configurations[i].print();
|
||||
// G4cout << " probability " << pr << G4endl;
|
||||
totProb += pr;
|
||||
probs[i] = totProb;
|
||||
};
|
||||
|
||||
G4double st = totProb * rand;
|
||||
G4int igen = 0;
|
||||
|
||||
while (probs[igen] <= st && igen < G4int(configurations.size())) igen++;
|
||||
|
||||
// G4cout << " igen " << igen << G4endl;
|
||||
|
||||
return configurations[igen];
|
||||
}
|
||||
@@ -0,0 +1,396 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
#include "G4Fissioner.hh"
|
||||
#include "G4InuclNuclei.hh"
|
||||
#include "G4FissionStore.hh"
|
||||
#include "G4FissionConfiguration.hh"
|
||||
|
||||
G4Fissioner::G4Fissioner()
|
||||
: verboseLevel(1) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Fissioner::G4Fissioner" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
G4CollisionOutput G4Fissioner::collide(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Fissioner::collide" << G4endl;
|
||||
}
|
||||
|
||||
const G4double one_third = 1.0 / 3.0;
|
||||
const G4double two_thirds = 2.0 / 3.0;
|
||||
// const G4int itry_max = 1000;
|
||||
G4CollisionOutput output;
|
||||
|
||||
if (G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target)) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " Fissioner input " << G4endl;
|
||||
|
||||
nuclei_target->printParticle();
|
||||
}
|
||||
|
||||
G4double A = nuclei_target->getA();
|
||||
G4double Z = nuclei_target->getZ();
|
||||
G4double EEXS = nuclei_target->getExitationEnergy();
|
||||
G4double mass_in = nuclei_target->getMass();
|
||||
G4double e_in = mass_in + 0.001 * EEXS;
|
||||
G4double PARA = 0.055 * pow(A, two_thirds) * (pow(A - Z, one_third) + pow(Z, one_third));
|
||||
G4double TEM = sqrt(EEXS / PARA);
|
||||
G4double TETA = 0.494 * pow(A, one_third) * TEM;
|
||||
|
||||
TETA = TETA / sinh(TETA);
|
||||
|
||||
if (A < 246.0) PARA += (nucleiLevelDensity(A) - PARA) * TETA;
|
||||
|
||||
G4double A1 = G4int(A / 2.0 + 1.1);
|
||||
G4double Z1;
|
||||
G4double A2 = A - A1;
|
||||
G4double ALMA = -1000.0;
|
||||
G4double DM1 = bindingEnergy(A, Z);
|
||||
G4double EVV = EEXS - DM1;
|
||||
G4double DM2 = bindingEnergyAsymptotic(A, Z);
|
||||
G4double DTEM = (A < 220.0 ? 0.5 : 1.15);
|
||||
|
||||
TEM += DTEM;
|
||||
|
||||
G4std::vector<G4double> AL1(2, -0.15);
|
||||
G4std::vector<G4double> BET1(2, 0.05);
|
||||
G4FissionStore fissionStore;
|
||||
G4double R12 = pow(A1, one_third) + pow(A2, one_third);
|
||||
|
||||
for (G4int i = 0; i < 50 && A1 > 30.0; i++) {
|
||||
A1 -= 1.0;
|
||||
A2 = A - A1;
|
||||
G4double X3 = 1.0 / pow(A1, one_third);
|
||||
G4double X4 = 1.0 / pow(A2, one_third);
|
||||
Z1 = G4int(getZopt(A1, A2, Z, X3, X4, R12)) - 1.0;
|
||||
G4std::vector<G4double> EDEF1(2);
|
||||
G4double Z2 = Z - Z1;
|
||||
G4double VPOT, VCOUL;
|
||||
|
||||
potentialMinimization(VPOT, EDEF1, VCOUL, A1, A2, Z1, Z2, AL1, BET1, R12);
|
||||
|
||||
G4double DM3 = bindingEnergy(A1, Z1);
|
||||
G4double DM4 = bindingEnergyAsymptotic(A1, Z1);
|
||||
G4double DM5 = bindingEnergy(A2, Z2);
|
||||
G4double DM6 = bindingEnergyAsymptotic(A2, Z2);
|
||||
G4double DMT1 = DM4 + DM6 - DM2;
|
||||
G4double DMT = DM3 + DM5 - DM1;
|
||||
G4double EZL = EEXS + DMT - VPOT;
|
||||
|
||||
if(EZL > 0.0) { // generate fluctuations
|
||||
// faster, using randomGauss
|
||||
G4double C1 = sqrt(getC2(A1, A2, X3, X4, R12) / TEM);
|
||||
G4double DZ = randomGauss(C1);
|
||||
|
||||
DZ = DZ > 0.0 ? G4int(DZ + 0.5) : -G4int(fabs(DZ - 0.5));
|
||||
Z1 += DZ;
|
||||
Z2 -= DZ;
|
||||
|
||||
G4double DEfin = randomGauss(TEM);
|
||||
G4double EZ = (DMT1 + (DMT - DMT1) * TETA - VPOT + DEfin) / TEM;
|
||||
|
||||
if (EZ >= ALMA) ALMA = EZ;
|
||||
G4double EK = VCOUL + DEfin + 0.5 * TEM;
|
||||
G4double EV = EVV + bindingEnergy(A1, Z1) + bindingEnergy(A2, Z2) - EK;
|
||||
|
||||
if (EV > 0.0) fissionStore.addConfig(A1, Z1, EZ, EK, EV);
|
||||
};
|
||||
};
|
||||
|
||||
G4int store_size = fissionStore.size();
|
||||
|
||||
if (store_size > 0) {
|
||||
|
||||
G4FissionConfiguration config =
|
||||
fissionStore.generateConfiguration(ALMA, inuclRndm());
|
||||
|
||||
A1 = config.afirst;
|
||||
A2 = A - A1;
|
||||
Z1 = config.zfirst;
|
||||
|
||||
G4double Z2 = Z - Z1;
|
||||
G4InuclNuclei nuclei1(A1, Z1);
|
||||
G4InuclNuclei nuclei2(A2, Z2);
|
||||
G4double mass1 = nuclei1.getMass();
|
||||
G4double mass2 = nuclei2.getMass();
|
||||
G4double EK = config.ekin;
|
||||
G4double pmod = sqrt(0.001 * EK * mass1 * mass2 / mass_in);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double Fi = randomPHI();
|
||||
G4double P1 = pmod * COS_SIN.second;
|
||||
G4std::vector<G4double> mom1(4);
|
||||
G4std::vector<G4double> mom2(4);
|
||||
|
||||
mom1[1] = P1 * cos(Fi);
|
||||
mom1[2] = P1 * sin(Fi);
|
||||
mom1[3] = pmod * COS_SIN.first;
|
||||
|
||||
for (G4int i = 1; i < 4; i++) mom2[i] = -mom1[i];
|
||||
|
||||
G4double e_out = sqrt(pmod * pmod + mass1 * mass1) +
|
||||
sqrt(pmod * pmod + mass2 * mass2);
|
||||
G4double EV = 1000.0 * (e_in - e_out) / A;
|
||||
|
||||
if (EV > 0.0) {
|
||||
G4double EEXS1 = EV*A1;
|
||||
G4double EEXS2 = EV*A2;
|
||||
G4InuclNuclei nuclei1(mom1, A1, Z1);
|
||||
|
||||
nuclei1.setExitationEnergy(EEXS1);
|
||||
nuclei1.setEnergy();
|
||||
output.addTargetFragment(nuclei1);
|
||||
|
||||
G4InuclNuclei nuclei2(mom2, A2, Z2);
|
||||
|
||||
nuclei2.setExitationEnergy(EEXS2);
|
||||
nuclei2.setEnergy();
|
||||
output.addTargetFragment(nuclei2);
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
nuclei1.printParticle();
|
||||
nuclei2.printParticle();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
} else {
|
||||
G4cout << " Fissioner -> target is not nuclei " << G4endl;
|
||||
};
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
G4double G4Fissioner::getC2(G4double A1,
|
||||
G4double A2,
|
||||
G4double X3,
|
||||
G4double X4,
|
||||
G4double R12) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Fissioner::getC2" << G4endl;
|
||||
}
|
||||
|
||||
G4double C2 = 124.57 * (1.0 / A1 + 1.0 / A2) + 0.78 * (X3 + X4) - 176.9 *
|
||||
(pow(X3, 4) + pow(X4, 4)) + 219.36 * (1.0 / (A1 * A1) + 1.0 / (A2 * A2)) - 1.108 / R12;
|
||||
|
||||
return C2;
|
||||
}
|
||||
|
||||
G4double G4Fissioner::getZopt(G4double A1,
|
||||
G4double A2,
|
||||
G4double ZT,
|
||||
G4double X3,
|
||||
G4double X4,
|
||||
G4double R12) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Fissioner::getZopt" << G4endl;
|
||||
}
|
||||
|
||||
G4double Zopt = (87.7 * (X4 - X3) * (1.0 - 1.25 * (X4 + X3)) +
|
||||
ZT * ((124.57 / A2 + 0.78 * X4 - 176.9 * pow(X4, 4) + 219.36 / (A2 * A2)) - 0.554 / R12)) /
|
||||
getC2(A1, A2, X3, X4, R12);
|
||||
|
||||
return Zopt;
|
||||
}
|
||||
|
||||
void G4Fissioner::potentialMinimization(G4double& VP,
|
||||
G4std::vector<G4double> & ED,
|
||||
G4double& VC,
|
||||
G4double AF,
|
||||
G4double AS,
|
||||
G4double ZF,
|
||||
G4double ZS,
|
||||
G4std::vector<G4double>& AL1,
|
||||
G4std::vector<G4double>& BET1,
|
||||
G4double& R12) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Fissioner::potentialMinimization" << G4endl;
|
||||
}
|
||||
|
||||
const G4double huge_num = 2.0e35;
|
||||
const G4double one_third = 1.0 / 3.0;
|
||||
// const G4double two_thirds = 2.0 / 3.0;
|
||||
const G4int itry_max = 2000;
|
||||
const G4double DSOL1 = 1.0e-6;
|
||||
const G4double DS1 = 0.3;
|
||||
const G4double DS2 = 1.0 / DS1 / DS1;
|
||||
G4double A1[2];
|
||||
A1[0] = AF;
|
||||
A1[1] = AS;
|
||||
G4double Z1[2];
|
||||
Z1[0] = ZF;
|
||||
Z1[1] = ZS;
|
||||
G4double D = 1.01844 * ZF * ZS;
|
||||
G4double D0 = 1.0e-3 * D;
|
||||
G4double R[2];
|
||||
R12 = 0.0;
|
||||
G4double C[2];
|
||||
G4double F[2];
|
||||
G4double Y1;
|
||||
G4double Y2;
|
||||
G4int i;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
R[i] = pow(A1[i], one_third);
|
||||
Y1 = R[i] * R[i];
|
||||
Y2 = Z1[i] * Z1[i] / R[i];
|
||||
C[i] = 6.8 * Y1 - 0.142 * Y2;
|
||||
F[i] = 12.138 * Y1 - 0.145 * Y2;
|
||||
};
|
||||
|
||||
G4double SAL[2];
|
||||
G4double SBE[2];
|
||||
G4double X[2];
|
||||
G4double X1[2];
|
||||
G4double X2[2];
|
||||
G4double RAL[2];
|
||||
G4double RBE[2];
|
||||
G4double A[4][4];
|
||||
G4double B[4];
|
||||
G4int itry = 0;
|
||||
|
||||
while (itry < itry_max) {
|
||||
itry++;
|
||||
G4double S = 0.0;
|
||||
|
||||
for (G4int i = 0; i < 2; i++) {
|
||||
S += R[i] * (1.0 + AL1[i] + BET1[i] - 0.257 * AL1[i] * BET1[i]);
|
||||
};
|
||||
R12 = 0.0;
|
||||
Y1 = 0.0;
|
||||
Y2 = 0.0;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
SAL[i] = R[i] * (1.0-0.257 * BET1[i]);
|
||||
SBE[i] = R[i] * (1.0-0.257 * AL1[i]);
|
||||
X[i] = R[i] / S;
|
||||
X1[i] = X[i] * X[i];
|
||||
X2[i] = X[i] * X1[i];
|
||||
Y1 += AL1[i] * X1[i];
|
||||
Y2 += BET1[i] * X2[i];
|
||||
R12 += R[i] * (1.0 - AL1[i] * (1.0 - 0.6 * X[i]) + BET1[i] * (1.0 - 0.429 * X1[i]));
|
||||
};
|
||||
|
||||
G4double Y3 = -0.6 * Y1 + 0.857 * Y2;
|
||||
G4double Y4 = (1.2 * Y1 - 2.571 * Y2) / S;
|
||||
G4double R2 = D0 / (R12 * R12);
|
||||
G4double R3 = 2.0 * R2 / R12;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
RAL[i] = -R[i] * (1.0 - 0.6 * X[i]) + SAL[i] * Y3;
|
||||
RBE[i] = R[i] * (1.0 - 0.429 * X1[i]) + SBE[i] * Y3;
|
||||
};
|
||||
|
||||
G4double DX1;
|
||||
G4double DX2;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
|
||||
for (G4int j = 0; j < 2; j++) {
|
||||
G4double DEL1 = i == j ? 1.0 : 0.0;
|
||||
DX1 = 0.0;
|
||||
DX2 = 0.0;
|
||||
|
||||
if (fabs(AL1[i]) >= DS1) {
|
||||
G4double XXX = AL1[i] * AL1[i] * DS2;
|
||||
G4double DEX = XXX > 100.0 ? huge_num : exp(XXX);
|
||||
DX1 = 2.0 * (1.0 + 2.0 * AL1[i] * AL1[i] * DS2) * DEX * DS2;
|
||||
};
|
||||
|
||||
if (fabs(BET1[i]) >= DS1) {
|
||||
G4double XXX = BET1[i] * BET1[i] * DS2;
|
||||
G4double DEX = XXX > 100.0 ? huge_num : exp(XXX);
|
||||
DX2 = 2.0 * (1.+2.0 * BET1[i] * BET1[i] * DS2) * DEX * DS2;
|
||||
};
|
||||
|
||||
G4double DEL = 2.0e-3 * DEL1;
|
||||
A[i][j] = R3 * RBE[i] * RBE[j] -
|
||||
R2 * (-0.6 *
|
||||
(X1[i] * SAL[j] +
|
||||
X1[j] * SAL[i]) + SAL[i] * SAL[j] * Y4) +
|
||||
DEL * C[i] + DEL1 * DX1;
|
||||
G4int i1 = i + 2;
|
||||
G4int j1 = j + 2;
|
||||
A[i1][j1] = R3 * RBE[i] * RBE[j]
|
||||
- R2 * (0.857 *
|
||||
(X2[i] * SBE[j] +
|
||||
X2[j] * SBE[i]) + SBE[i] * SBE[j] * Y4) +
|
||||
DEL * F[i] + DEL1 * DX2;
|
||||
A[i][j1] = R3 * RAL[i] * RBE[j] -
|
||||
R2 * (0.857 *
|
||||
(X2[j] * SAL[i] -
|
||||
0.6 * X1[i] * SBE[j]) + SBE[j] * SAL[i] * Y4 -
|
||||
0.257 * R[i] * Y3 * DEL1);
|
||||
A[j1][i] = A[i][j1];
|
||||
};
|
||||
};
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
DX1 = 0.0;
|
||||
DX2 = 0.0;
|
||||
|
||||
if (fabs(AL1[i]) >= DS1) DX1 = 2.0 * AL1[i] * DS2 * exp(AL1[i] * AL1[i] * DS2);
|
||||
|
||||
if (fabs(BET1[i]) >= DS1) DX2 = 2.0 * BET1[i] * DS2 * exp(BET1[i] * BET1[i] * DS2);
|
||||
B[i] = R2 * RAL[i] - 2.0e-3 * C[i] * AL1[i] + DX1;
|
||||
B[i + 2] = R2 * RBE[i] - 2.0e-3 * F[i] * BET1[i] + DX2;
|
||||
};
|
||||
|
||||
G4double ST = 0.0;
|
||||
G4double ST1 = 0.0;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
ST += B[i] * B[i];
|
||||
|
||||
for (G4int j = 0; j < 4; j++) ST1 += A[i][j] * B[i] * B[j];
|
||||
};
|
||||
|
||||
G4double STEP = ST / ST1;
|
||||
G4double DSOL = 0.0;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
AL1[i] += B[i] * STEP;
|
||||
BET1[i] += B[i + 2] * STEP;
|
||||
DSOL += B[i] * B[i] + B[i + 2] * B[i + 2];
|
||||
};
|
||||
DSOL = sqrt(DSOL);
|
||||
|
||||
if (DSOL < DSOL1) break;
|
||||
};
|
||||
|
||||
if (itry == itry_max)
|
||||
G4cout << " maximal number of iterations in potentialMinimization " << G4endl
|
||||
<< " A1 " << AF << " Z1 " << ZF << G4endl;
|
||||
|
||||
for (i = 0; i < 2; i++) ED[i] = F[i] * BET1[i] * BET1[i] + C[i] * AL1[i] * AL1[i];
|
||||
|
||||
VC = D / R12;
|
||||
VP = VC + ED[0] + ED[1];
|
||||
}
|
||||
@@ -0,0 +1,363 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
#define RUN
|
||||
|
||||
#include "G4IntraNucleiCascader.hh"
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
#include "G4InuclNuclei.hh"
|
||||
#include "G4LorentzConvertor.hh"
|
||||
#include "G4ParticleLargerEkin.hh"
|
||||
#include "G4NucleiModel.hh"
|
||||
#include "G4CascadParticle.hh"
|
||||
#include "g4std/algorithm"
|
||||
|
||||
typedef G4std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
|
||||
G4IntraNucleiCascader::G4IntraNucleiCascader()
|
||||
: verboseLevel(1) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4IntraNucleiCascader::G4IntraNucleiCascader" << G4endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
G4CollisionOutput G4IntraNucleiCascader::collide(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4IntraNucleiCascader::collide" << G4endl;
|
||||
}
|
||||
|
||||
const G4int itry_max = 1000;
|
||||
const G4int reflection_cut = 500;
|
||||
// const G4double eexs_cut = 0.0001;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
bullet->printParticle();
|
||||
target->printParticle();
|
||||
}
|
||||
|
||||
G4CollisionOutput output;
|
||||
|
||||
#ifdef RUN
|
||||
G4InuclNuclei* tnuclei = dynamic_cast<G4InuclNuclei*>(target);
|
||||
G4InuclNuclei* bnuclei = dynamic_cast<G4InuclNuclei*>(bullet);
|
||||
G4InuclElementaryParticle* bparticle = dynamic_cast<G4InuclElementaryParticle*>(bullet);
|
||||
G4NucleiModel model(tnuclei);
|
||||
G4std::vector<G4double> momentum_in = bullet->getMomentum();
|
||||
|
||||
momentum_in[0] += tnuclei->getMass();
|
||||
|
||||
G4double ekin_in;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
model.printModel();
|
||||
G4cout << " intitial momentum E " << momentum_in[0] << " Px " << momentum_in[1]
|
||||
<< " Py " << momentum_in[2] << " Pz " << momentum_in[3] << G4endl;
|
||||
}
|
||||
|
||||
G4int itry = 0;
|
||||
|
||||
while (itry < itry_max) {
|
||||
itry++;
|
||||
model.reset();
|
||||
|
||||
G4std::vector<G4CascadParticle> cascad_particles;
|
||||
G4ExitonConfiguration theExitonConfiguration;
|
||||
G4std::vector<G4InuclElementaryParticle> output_particles;
|
||||
G4double afin = tnuclei->getA();
|
||||
G4double zfin = tnuclei->getZ();
|
||||
|
||||
if (inter_case == 1) { // particle with nuclei
|
||||
ekin_in = bparticle->getKineticEnergy();
|
||||
zfin += bparticle->getCharge();
|
||||
if (bparticle->nucleon()) afin += 1.0;
|
||||
cascad_particles.push_back(model.initializeCascad(bparticle));
|
||||
|
||||
} else { // nuclei with nuclei
|
||||
|
||||
ekin_in = bnuclei->getKineticEnergy();
|
||||
|
||||
G4double ab = bnuclei->getA();
|
||||
G4double zb = bnuclei->getZ();
|
||||
|
||||
afin += ab;
|
||||
zfin += zb;
|
||||
|
||||
G4std::pair<G4std::vector<G4CascadParticle>, G4std::vector<G4InuclElementaryParticle> >
|
||||
all_particles = model.initializeCascad(bnuclei, tnuclei);
|
||||
|
||||
cascad_particles = all_particles.first;
|
||||
|
||||
for (G4int ip = 0; ip < G4int(all_particles.second.size()); ip++)
|
||||
output_particles.push_back(all_particles.second[ip]);
|
||||
|
||||
if (cascad_particles.size() == 0) { // compound nuclei
|
||||
G4int ia = int(ab + 0.5);
|
||||
G4int iz = int(zb + 0.5);
|
||||
G4int i;
|
||||
|
||||
for (i = 0; i < ia; i++) {
|
||||
G4int knd = i < iz ? 1 : 2;
|
||||
theExitonConfiguration.incrementQP(knd);
|
||||
};
|
||||
|
||||
G4int ihn = int(2.0 * (ab - zb) * inuclRndm() + 0.5);
|
||||
G4int ihz = int(2.0 * zb * inuclRndm() + 0.5);
|
||||
|
||||
for (i = 0; i < ihn; i++) theExitonConfiguration.incrementHoles(2);
|
||||
|
||||
for (i = 0; i < ihz; i++) theExitonConfiguration.incrementHoles(1);
|
||||
};
|
||||
};
|
||||
|
||||
G4std::vector<G4CascadParticle> new_cascad_particles;
|
||||
G4int iloop = 0;
|
||||
|
||||
while (!cascad_particles.empty() && !model.empty()) {
|
||||
iloop++;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " Number of cparticles " << cascad_particles.size() << G4endl;
|
||||
cascad_particles.back().print();
|
||||
}
|
||||
|
||||
new_cascad_particles = model.generateParticleFate(cascad_particles.back(),
|
||||
theElementaryParticleCollider);
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " ew particles " << new_cascad_particles.size() << G4endl;
|
||||
}
|
||||
|
||||
// handle the result of a new step
|
||||
|
||||
if (new_cascad_particles.size() == 1) { // last particle goes without interaction
|
||||
cascad_particles.pop_back();
|
||||
|
||||
if (model.stillInside(new_cascad_particles[0])) { // particle survives
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " still inside " << G4endl;
|
||||
}
|
||||
|
||||
if (new_cascad_particles[0].getNumberOfReflections() < reflection_cut &&
|
||||
model.worthToPropagate(new_cascad_particles[0])) { // it's ok
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " survives " << G4endl;
|
||||
}
|
||||
|
||||
cascad_particles.push_back(new_cascad_particles[0]);
|
||||
|
||||
} else { // it becomes an exiton
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " becomes an exiton " << G4endl;
|
||||
}
|
||||
|
||||
theExitonConfiguration.incrementQP(new_cascad_particles[0].getParticle().type());
|
||||
};
|
||||
|
||||
} else { // goes out
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " Goes out " << G4endl;
|
||||
new_cascad_particles[0].print();
|
||||
}
|
||||
|
||||
output_particles.push_back(new_cascad_particles[0].getParticle());
|
||||
};
|
||||
|
||||
} else { // interaction
|
||||
|
||||
cascad_particles.pop_back();
|
||||
|
||||
for (G4int i = 0; i < G4int(new_cascad_particles.size()); i++)
|
||||
cascad_particles.push_back(new_cascad_particles[i]);
|
||||
|
||||
G4std::pair<G4int, G4int> holes = model.getTypesOfNucleonsInvolved();
|
||||
|
||||
theExitonConfiguration.incrementHoles(holes.first);
|
||||
|
||||
if (holes.second > 0) theExitonConfiguration.incrementHoles(holes.second);
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
// cascad is finished -> check, whether it's o'k
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " Cascade finished " << G4endl
|
||||
<< " output_particles " << output_particles.size() << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> momentum_out(4, 0.0);
|
||||
particleIterator ipart;
|
||||
|
||||
for (ipart = output_particles.begin(); ipart != output_particles.end(); ipart++) {
|
||||
|
||||
G4std::vector<G4double> mom = ipart->getMomentum();
|
||||
|
||||
for (G4int j = 0; j < 4; j++) momentum_out[j] += mom[j];
|
||||
|
||||
zfin -= ipart->getCharge();
|
||||
|
||||
if (ipart->nucleon()) afin -= 1.0;
|
||||
|
||||
};
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " afin " << afin << " zfin " << zfin << G4endl;
|
||||
}
|
||||
|
||||
if (afin > 1.0) {
|
||||
|
||||
G4InuclNuclei outgoing_nuclei(afin, zfin);
|
||||
G4double mass = outgoing_nuclei.getMass();
|
||||
momentum_out[0] += mass;
|
||||
|
||||
for (int j = 0; j < 4; j++) momentum_out[j] = momentum_in[j] - momentum_out[j];
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " Eex + Ekin " << momentum_out[0] << G4endl;
|
||||
}
|
||||
|
||||
if (momentum_out[0] > 0.0) { // Eex + Ekin > 0.0
|
||||
G4double pnuc = momentum_out[1] * momentum_out[1] +
|
||||
momentum_out[2] * momentum_out[2] +
|
||||
momentum_out[3] * momentum_out[3];
|
||||
G4double ekin = sqrt(mass * mass + pnuc) - mass;
|
||||
G4double Eex = 1000.0 * (momentum_out[0] - ekin);
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " Eex " << Eex << G4endl;
|
||||
}
|
||||
|
||||
if (goodCase(afin, zfin, Eex, ekin_in)) { // ok, exitation energy > cut
|
||||
G4std::sort(output_particles.begin(), output_particles.end(), G4ParticleLargerEkin());
|
||||
output.addOutgoingParticles(output_particles);
|
||||
outgoing_nuclei.setMomentum(momentum_out);
|
||||
outgoing_nuclei.setEnergy();
|
||||
outgoing_nuclei.setExitationEnergy(Eex);
|
||||
outgoing_nuclei.setExitonConfiguration(theExitonConfiguration);
|
||||
output.addTargetFragment(outgoing_nuclei);
|
||||
|
||||
return output;
|
||||
};
|
||||
};
|
||||
|
||||
} else { // special case, when one has no nuclei after the cascad
|
||||
|
||||
if (afin == 1.0) { // recoiling nucleon
|
||||
|
||||
for (int j = 0; j < 4; j++) momentum_out[j] = momentum_in[j] - momentum_out[j];
|
||||
|
||||
G4InuclElementaryParticle last_particle;
|
||||
|
||||
if (zfin == 1.0) { // recoiling proton
|
||||
last_particle.setType(1);
|
||||
|
||||
} else { // neutron
|
||||
|
||||
last_particle.setType(2);
|
||||
};
|
||||
|
||||
last_particle.setMomentum(momentum_out);
|
||||
output_particles.push_back(last_particle);
|
||||
};
|
||||
|
||||
G4std::sort(output_particles.begin(), output_particles.end(), G4ParticleLargerEkin());
|
||||
output.addOutgoingParticles(output_particles);
|
||||
|
||||
return output;
|
||||
};
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
// special branch to avoid the cascad generation but to get the input for evaporation etc
|
||||
|
||||
G4std::vector<G4double> momentum_out(4, 0.0);
|
||||
G4InuclNuclei outgoing_nuclei(169, 69);
|
||||
|
||||
outgoing_nuclei.setMomentum(momentum_out);
|
||||
outgoing_nuclei.setEnergy();
|
||||
outgoing_nuclei.setExitationEnergy(150.0);
|
||||
|
||||
G4ExitonConfiguration theExitonConfiguration(3.0, 3.0, 5.0, 6.0);
|
||||
|
||||
outgoing_nuclei.setExitonConfiguration(theExitonConfiguration);
|
||||
output.addTargetFragment(outgoing_nuclei);
|
||||
|
||||
return output;
|
||||
|
||||
/*
|
||||
G4InuclElementaryParticle* bparticle = dynamic_cast<G4InuclElementaryParticle*>
|
||||
(bullet);
|
||||
G4InuclNuclei* tnuclei = dynamic_cast<G4InuclNuclei*>(target);
|
||||
output.addOutgoingParticle(*bparticle);
|
||||
output.addTargetFragment(*tnuclei);
|
||||
return output;
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " IntraNucleiCascader-> no inelastic interaction after " << itry_max << " attempts "
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
output.trivialise(bullet, target);
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
G4bool G4IntraNucleiCascader::goodCase(G4double a,
|
||||
G4double z,
|
||||
G4double eexs,
|
||||
G4double ein) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4IntraNucleiCascader::goodCase" << G4endl;
|
||||
}
|
||||
|
||||
const G4double eexs_cut = 0.0001;
|
||||
const G4double reason_cut = 7.0;
|
||||
const G4double ediv_cut = 5.0;
|
||||
|
||||
G4bool good = false;
|
||||
|
||||
if (eexs > eexs_cut) {
|
||||
G4double eexs_max0z = 1000.0 * ein / ediv_cut;
|
||||
G4double dm = bindingEnergy(a, z);
|
||||
G4double eexs_max = eexs_max0z > reason_cut*dm ? eexs_max0z : reason_cut * dm;
|
||||
|
||||
if(eexs < eexs_max) good = true;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " eexs " << eexs << " max " << eexs_max << " dm " << dm << G4endl;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
return good;
|
||||
}
|
||||
@@ -0,0 +1,406 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
#include "G4InuclCollider.hh"
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
#include "G4LorentzConvertor.hh"
|
||||
#include "G4ParticleLargerEkin.hh"
|
||||
#include "g4std/algorithm"
|
||||
|
||||
typedef G4std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
typedef G4std::vector<G4InuclNuclei>::iterator nucleiIterator;
|
||||
|
||||
G4InuclCollider::G4InuclCollider()
|
||||
: verboseLevel(2) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4InuclCollider::G4InuclCollider" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
G4CollisionOutput G4InuclCollider::collide(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target) {
|
||||
|
||||
verboseLevel = 2;
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4InuclCollider::collide" << G4endl;
|
||||
}
|
||||
|
||||
const G4int itry_max = 1000;
|
||||
|
||||
G4CollisionOutput globalOutput;
|
||||
G4InuclElementaryParticle* particle1 =
|
||||
dynamic_cast<G4InuclElementaryParticle*>(bullet);
|
||||
G4InuclElementaryParticle* particle2 =
|
||||
dynamic_cast<G4InuclElementaryParticle*>(target);
|
||||
|
||||
if(particle1 && particle2) { // particle + particle
|
||||
if (verboseLevel > 2) {
|
||||
particle1->printParticle();
|
||||
particle2->printParticle();
|
||||
}
|
||||
globalOutput = theElementaryParticleCollider->collide(bullet, target);
|
||||
}
|
||||
else { // needs to call all machinery
|
||||
|
||||
G4LorentzConvertor convertToTargetRestFrame;
|
||||
G4InteractionCase interCase = bulletTargetSetter(bullet, target);
|
||||
G4int intcase = interCase.getInterCase();
|
||||
|
||||
if(intcase > 0) { // ok
|
||||
|
||||
G4InuclNuclei* ntarget =
|
||||
dynamic_cast<G4InuclNuclei*>(interCase.getTarget());
|
||||
|
||||
convertToTargetRestFrame.setTarget(ntarget->getMomentum(),
|
||||
ntarget->getMass());
|
||||
|
||||
G4int btype = 0;
|
||||
G4double ab = 0.0;
|
||||
G4double zb = 0.0;
|
||||
G4double at = ntarget->getA();
|
||||
G4double zt = ntarget->getZ();
|
||||
|
||||
if(intcase == 1) { // particle with nuclei
|
||||
|
||||
G4InuclElementaryParticle* pbullet =
|
||||
dynamic_cast<G4InuclElementaryParticle*>(interCase.getBullet());
|
||||
|
||||
if(pbullet->photon()) {
|
||||
|
||||
G4cout << " InuclCollider -> can not collide with photon " << G4endl;
|
||||
|
||||
globalOutput.trivialise(bullet, target);
|
||||
|
||||
return globalOutput;
|
||||
} else {
|
||||
convertToTargetRestFrame.setBullet(pbullet->getMomentum(),
|
||||
pbullet->getMass());
|
||||
btype = pbullet->type();
|
||||
};
|
||||
}
|
||||
else { // nuclei with nuclei
|
||||
|
||||
G4InuclNuclei* nbullet =
|
||||
dynamic_cast<G4InuclNuclei*>(interCase.getBullet());
|
||||
|
||||
convertToTargetRestFrame.setBullet(nbullet->getMomentum(),
|
||||
nbullet->getMass());
|
||||
ab = nbullet->getA();
|
||||
zb = nbullet->getZ();
|
||||
};
|
||||
|
||||
G4double ekin = convertToTargetRestFrame.getKinEnergyInTheTRS();
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " ekin in trs " << ekin << G4endl;
|
||||
}
|
||||
|
||||
if(inelasticInteractionPossible(bullet, target, ekin)) {
|
||||
convertToTargetRestFrame.toTheTargetRestFrame();
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " degenerated? " << convertToTargetRestFrame.trivial() << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> bmom(4, 0.0);
|
||||
|
||||
bmom[3] = convertToTargetRestFrame.getTRSMomentum();
|
||||
|
||||
G4InuclNuclei ntarget(at, zt);
|
||||
G4std::vector<G4double> tmom(4, 0.0);
|
||||
|
||||
ntarget.setMomentum(tmom);
|
||||
ntarget.setEnergy();
|
||||
theIntraNucleiCascader->setInteractionCase(intcase);
|
||||
|
||||
G4bool bad = true;
|
||||
G4int itry = 0;
|
||||
|
||||
while (bad && itry < itry_max) {
|
||||
|
||||
G4CollisionOutput TRFoutput;
|
||||
G4CollisionOutput output;
|
||||
|
||||
itry++;
|
||||
if(intcase == 1) {
|
||||
|
||||
G4InuclElementaryParticle pbullet(bmom, btype);
|
||||
|
||||
output = theIntraNucleiCascader->collide(&pbullet, &ntarget);
|
||||
}
|
||||
else {
|
||||
|
||||
G4InuclNuclei nbullet(ab, zb);
|
||||
|
||||
nbullet.setMomentum(bmom);
|
||||
nbullet.setEnergy();
|
||||
output = theIntraNucleiCascader->collide(&nbullet, &ntarget);
|
||||
};
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " After Cascade " << G4endl;
|
||||
|
||||
output.printCollisionOutput();
|
||||
}
|
||||
|
||||
// the rest, if any
|
||||
TRFoutput.addOutgoingParticles(output.getOutgoingParticles());
|
||||
|
||||
if(output.numberOfNucleiFragments() == 1) { // there is smth. after
|
||||
|
||||
G4InuclNuclei cascad_rec_nuclei = output.getNucleiFragments()[0];
|
||||
|
||||
if(explosion(&cascad_rec_nuclei)) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " big bang after cascade " << G4endl;
|
||||
};
|
||||
|
||||
output = theBigBanger->collide(0,&cascad_rec_nuclei);
|
||||
TRFoutput.addOutgoingParticles(output.getOutgoingParticles());
|
||||
}
|
||||
else {
|
||||
output = theNonEquilibriumEvaporator->collide(0, &cascad_rec_nuclei);
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " After NonEquilibriumEvaporator " << G4endl;
|
||||
|
||||
output.printCollisionOutput();
|
||||
};
|
||||
|
||||
TRFoutput.addOutgoingParticles(output.getOutgoingParticles());
|
||||
|
||||
G4InuclNuclei exiton_rec_nuclei = output.getNucleiFragments()[0];
|
||||
|
||||
output = theEquilibriumEvaporator->collide(0, &exiton_rec_nuclei);
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " After EquilibriumEvaporator " << G4endl;
|
||||
|
||||
output.printCollisionOutput();
|
||||
};
|
||||
|
||||
TRFoutput.addOutgoingParticles(output.getOutgoingParticles());
|
||||
TRFoutput.addTargetFragments(output.getNucleiFragments());
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// convert to the LAB
|
||||
G4bool withReflection = convertToTargetRestFrame.reflectionNeeded();
|
||||
G4std::vector<G4InuclElementaryParticle> particles =
|
||||
TRFoutput.getOutgoingParticles();
|
||||
|
||||
if(!particles.empty()) {
|
||||
particleIterator ipart;
|
||||
for(ipart = particles.begin(); ipart != particles.end(); ipart++) {
|
||||
|
||||
G4std::vector<G4double> mom = ipart->getMomentum();
|
||||
|
||||
if(withReflection) mom[3] = -mom[3];
|
||||
mom = convertToTargetRestFrame.rotate(mom);
|
||||
ipart->setMomentum(mom);
|
||||
mom = convertToTargetRestFrame.backToTheLab(ipart->getMomentum());
|
||||
ipart->setMomentum(mom);
|
||||
};
|
||||
G4std::sort(particles.begin(), particles.end(), G4ParticleLargerEkin());
|
||||
};
|
||||
|
||||
G4std::vector<G4InuclNuclei> nucleus = TRFoutput.getNucleiFragments();
|
||||
|
||||
if(!nucleus.empty()) {
|
||||
nucleiIterator inuc;
|
||||
for(inuc = nucleus.begin(); inuc != nucleus.end(); inuc++) {
|
||||
G4std::vector<G4double> mom = inuc->getMomentum();
|
||||
if(withReflection) mom[3] = -mom[3];
|
||||
mom = convertToTargetRestFrame.rotate(mom);
|
||||
inuc->setMomentum(mom);
|
||||
inuc->setEnergy();
|
||||
mom = convertToTargetRestFrame.backToTheLab(inuc->getMomentum());
|
||||
inuc->setMomentum(mom);
|
||||
inuc->setEnergy();
|
||||
};
|
||||
};
|
||||
globalOutput.addOutgoingParticles(particles);
|
||||
globalOutput.addTargetFragments(nucleus);
|
||||
globalOutput.setOnShell(bullet, target);
|
||||
if(globalOutput.acceptable()) {
|
||||
|
||||
return globalOutput;
|
||||
}
|
||||
else {
|
||||
globalOutput.reset();
|
||||
};
|
||||
};
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " InuclCollider -> can not generate acceptable inter. after "
|
||||
<< itry_max << " attempts " << G4endl;
|
||||
}
|
||||
|
||||
globalOutput.trivialise(bullet, target);
|
||||
|
||||
return globalOutput;
|
||||
}
|
||||
else {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " InuclCollider -> inelastic interaction is impossible " << G4endl
|
||||
<< " due to the coulomb barirer " << G4endl;
|
||||
}
|
||||
|
||||
globalOutput.trivialise(bullet, target);
|
||||
|
||||
return globalOutput;
|
||||
};
|
||||
}
|
||||
else {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " InuclCollider -> inter case " << intcase << G4endl;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
return globalOutput;
|
||||
}
|
||||
|
||||
G4bool G4InuclCollider::inelasticInteractionPossible(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target,
|
||||
G4double ekin) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4InuclCollider::inelasticInteractionPossible" << G4endl;
|
||||
}
|
||||
|
||||
const G4double coeff = 0.001 * 1.2;
|
||||
const G4double one_third = 1.0 / 3.0;
|
||||
|
||||
G4bool possible = true;
|
||||
G4double at;
|
||||
G4double zt;
|
||||
G4double ab;
|
||||
G4double zb;
|
||||
|
||||
if(G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target)) {
|
||||
at = nuclei_target->getA();
|
||||
zt = nuclei_target->getZ();
|
||||
if(G4InuclNuclei* nuclei_bullet = dynamic_cast<G4InuclNuclei*>(bullet)) {
|
||||
ab = nuclei_bullet->getA();
|
||||
zb = nuclei_bullet->getZ();
|
||||
}
|
||||
else {
|
||||
|
||||
G4InuclElementaryParticle* particle =
|
||||
dynamic_cast<G4InuclElementaryParticle*>(bullet);
|
||||
|
||||
ab = 1;
|
||||
zb = particle->getCharge();
|
||||
};
|
||||
}
|
||||
else {
|
||||
if(G4InuclNuclei* nuclei_bullet = dynamic_cast<G4InuclNuclei*>(bullet)) {
|
||||
ab = nuclei_bullet->getA();
|
||||
zb = nuclei_bullet->getZ();
|
||||
|
||||
G4InuclElementaryParticle* particle =
|
||||
dynamic_cast<G4InuclElementaryParticle*>(target);
|
||||
|
||||
at = 1;
|
||||
zt = particle->getCharge();
|
||||
}
|
||||
else {
|
||||
|
||||
return possible;
|
||||
};
|
||||
};
|
||||
|
||||
G4double VCOL = coeff * zt * zb / (pow(at, one_third) + pow(ab, one_third));
|
||||
|
||||
possible = VCOL < ekin;
|
||||
|
||||
return possible;
|
||||
|
||||
}
|
||||
|
||||
G4InteractionCase G4InuclCollider::bulletTargetSetter(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4InuclCollider::bulletTargetSetter" << G4endl;
|
||||
}
|
||||
|
||||
G4InteractionCase interCase;
|
||||
|
||||
if(G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target)) {
|
||||
if(G4InuclNuclei* nuclei_bullet = dynamic_cast<G4InuclNuclei*>(bullet)) { // A + A
|
||||
interCase.setInterCase(2);
|
||||
if(nuclei_target->getA() >= nuclei_bullet->getA()) {
|
||||
interCase.setBulletTarget(bullet, target);
|
||||
}
|
||||
else {
|
||||
interCase.setBulletTarget(target, bullet);
|
||||
};
|
||||
}
|
||||
else {
|
||||
interCase.setInterCase(1);
|
||||
interCase.setBulletTarget(bullet, target);
|
||||
};
|
||||
}
|
||||
else {
|
||||
if(G4InuclNuclei* nuclei_bullet = dynamic_cast<G4InuclNuclei*>(bullet)) {
|
||||
if(G4InuclElementaryParticle* part =
|
||||
dynamic_cast<G4InuclElementaryParticle*>(target)) {
|
||||
interCase.setInterCase(1);
|
||||
interCase.setBulletTarget(target, bullet);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
return interCase;
|
||||
}
|
||||
|
||||
G4bool G4InuclCollider::explosion(G4InuclNuclei* target) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4InuclCollider::explosion" << G4endl;
|
||||
}
|
||||
|
||||
const G4double a_cut = 20.0;
|
||||
const G4double be_cut = 3.0;
|
||||
|
||||
G4double a = target->getA();
|
||||
G4double z = target->getZ();
|
||||
G4double eexs = target->getExitationEnergy();
|
||||
G4bool explo = true;
|
||||
|
||||
if(a > a_cut) {
|
||||
explo = false;
|
||||
}
|
||||
else {
|
||||
if(eexs < be_cut * bindingEnergy(a, z)) explo = false;
|
||||
};
|
||||
|
||||
return explo;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
#include "G4InuclSpecialFunctions.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
G4double G4InuclSpecialFunctions::getAL(G4double A) {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4InuclSpecialFunctions::getAL" << G4endl;
|
||||
}
|
||||
|
||||
return 0.76 + 2.2 / pow(A, 0.333333);
|
||||
}
|
||||
|
||||
G4double G4InuclSpecialFunctions::csNN(G4double e) {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4InuclSpecialFunctions::csNN" << G4endl;
|
||||
}
|
||||
|
||||
G4double snn;
|
||||
|
||||
if (e < 40.0) {
|
||||
snn = -1174.8 / (e * e) + 3088.5 / e + 5.3107;
|
||||
|
||||
} else {
|
||||
snn = 93074.0 / (e * e) - 11.148 / e + 22.429;
|
||||
};
|
||||
|
||||
return snn;
|
||||
}
|
||||
|
||||
G4double G4InuclSpecialFunctions::csPN(G4double e) {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4InuclSpecialFunctions::csPN" << G4endl;
|
||||
}
|
||||
|
||||
G4double spn;
|
||||
|
||||
if (e < 40.0) {
|
||||
spn = -5057.4 / (e * e) + 9069.2 / e + 6.9466;
|
||||
|
||||
} else {
|
||||
spn = 239380.0 / (e * e) + 1802.0 / e + 27.147;
|
||||
};
|
||||
|
||||
return spn;
|
||||
}
|
||||
|
||||
G4double G4InuclSpecialFunctions::FermiEnergy(G4double A, G4double Z, G4int ntype) {
|
||||
// calculates the nuclei Fermi energy for 0 - neutron and 1 - proton
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4InuclSpecialFunctions::FermiEnergy" << G4endl;
|
||||
}
|
||||
|
||||
const G4double C = 55.4;
|
||||
G4double Ef;
|
||||
|
||||
if (ntype == 0) {
|
||||
Ef = C * pow((A - Z) / A, 0.666667);
|
||||
|
||||
} else {
|
||||
Ef = C * pow(Z / A, 0.666667);
|
||||
};
|
||||
|
||||
return Ef;
|
||||
}
|
||||
|
||||
G4double G4InuclSpecialFunctions::inuclRndm() {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4InuclSpecialFunctions::inuclRndm" << G4endl;
|
||||
}
|
||||
|
||||
G4double rnd = G4UniformRand();
|
||||
|
||||
return rnd;
|
||||
}
|
||||
|
||||
G4double G4InuclSpecialFunctions::randomGauss(G4double sigma) {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4InuclSpecialFunctions::randomGauss" << G4endl;
|
||||
}
|
||||
|
||||
const G4double eps = 1.0e-6;
|
||||
const G4double twopi = 6.2831854;
|
||||
G4double r1 = inuclRndm();
|
||||
r1 = r1 > eps ? r1 : eps;
|
||||
G4double r2 = inuclRndm();
|
||||
r2 = r2 > eps ? r2 : eps;
|
||||
r2 = r2 < 1.0 - eps ? r2 : 1.0 - eps;
|
||||
|
||||
return sigma * sin(twopi * r1) * sqrt(-2.0 * log(r2));
|
||||
}
|
||||
|
||||
G4double G4InuclSpecialFunctions::randomPHI() {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4InuclSpecialFunctions::randomPHI" << G4endl;
|
||||
}
|
||||
|
||||
const G4double twopi = 6.2831853;
|
||||
|
||||
return twopi * inuclRndm();
|
||||
}
|
||||
|
||||
G4std::pair<G4double, G4double> G4InuclSpecialFunctions::randomCOS_SIN() {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4InuclSpecialFunctions::randomCOS_SIN" << G4endl;
|
||||
}
|
||||
|
||||
G4double CT = 1.0 - 2.0 * inuclRndm();
|
||||
|
||||
return G4std::pair<G4double, G4double>(CT, sqrt(1.0 - CT * CT));
|
||||
}
|
||||
|
||||
G4std::vector<G4double> G4InuclSpecialFunctions::generateWithFixedTheta(G4double ct,
|
||||
G4double p) {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4InuclSpecialFunctions::generateWithFixedTheta" << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> momr(4);
|
||||
G4double phi = randomPHI();
|
||||
G4double pt = p * sqrt(fabs(1.0 - ct * ct));
|
||||
G4std::vector<G4double> mom1(4);
|
||||
momr[1] = pt * cos(phi);
|
||||
momr[2] = pt * sin(phi);
|
||||
momr[3] = p * ct;
|
||||
|
||||
return momr;
|
||||
}
|
||||
@@ -0,0 +1,301 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
#include "G4LorentzConvertor.hh"
|
||||
|
||||
G4LorentzConvertor::G4LorentzConvertor()
|
||||
: verboseLevel(2), degenerated(false) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4LorentzConvertor::G4LorentzConvertor" << G4endl;
|
||||
}
|
||||
};
|
||||
|
||||
void G4LorentzConvertor::toTheCenterOfMass() {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4LorentzConvertor::toTheCenterOfMass" << G4endl;
|
||||
}
|
||||
|
||||
const G4double small = 1.0e-10;
|
||||
|
||||
v2 = 0.0;
|
||||
|
||||
G4double pv = 0.0;
|
||||
|
||||
G4double e_sum = target_mom[0] + bullet_mom[0];
|
||||
|
||||
velocity.resize(4);
|
||||
G4int i(0);
|
||||
for(i = 1; i < 4; i++) {
|
||||
velocity[i] = (target_mom[i] + bullet_mom[i]) / e_sum;
|
||||
v2 += velocity[i] * velocity[i];
|
||||
pv += target_mom[i] * velocity[i];
|
||||
};
|
||||
|
||||
gamma = 1.0 / sqrt(fabs(1.0 - v2));
|
||||
ecm_tot = e_sum / gamma;
|
||||
|
||||
G4double pa = 0.0;
|
||||
|
||||
G4double pb = 0.0;
|
||||
|
||||
scm_momentum.resize(4);
|
||||
|
||||
G4double xx = pv * (gamma - 1.0) / v2 - target_mom[0] * gamma;
|
||||
|
||||
for(i = 1; i < 4; i++) {
|
||||
scm_momentum[i] = -target_mom[i] - velocity[i] * xx;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " i " << i << " pscm(i) " << scm_momentum[i] << G4endl;
|
||||
}
|
||||
|
||||
pa += scm_momentum[i] * scm_momentum[i];
|
||||
pb += scm_momentum[i] * velocity[i];
|
||||
};
|
||||
ga = v2 - pb * pb / pa;
|
||||
if(ga < small) {
|
||||
ga = small;
|
||||
degenerated = true;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " degenerated case " << G4endl;
|
||||
}
|
||||
|
||||
} else {
|
||||
ga = sqrt(ga);
|
||||
};
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " ga " << ga << " v2 " << v2 << " pb " << pb <<
|
||||
" pb * pb / pa " << pb * pb / pa << " pv " << pv << G4endl;
|
||||
}
|
||||
|
||||
pscm = sqrt(pa);
|
||||
gb = pb / pscm;
|
||||
gbpp = gb / pscm;
|
||||
gapp = ga * pscm;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> G4LorentzConvertor::rotate(const G4std::vector<G4double> mom) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4LorentzConvertor::rotate(G4std::vector<G4double>)" << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> mom_rot(4);
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " ga " << ga << " gbpp " << gbpp << " gapp " << gapp << G4endl;
|
||||
G4cout << " gegenerated " << degenerated << G4endl;
|
||||
G4cout << " before rotation: px " << mom[1] << " py " << mom[2] <<
|
||||
" pz " << mom[3] << G4endl;
|
||||
}
|
||||
|
||||
if(degenerated) {
|
||||
mom_rot = mom;
|
||||
} else {
|
||||
mom_rot[1] = mom[1] * (velocity[1] - gbpp * scm_momentum[1]) / ga +
|
||||
mom[2] * (scm_momentum[2] * velocity[3] - scm_momentum[3] * velocity[2]) / gapp +
|
||||
mom[3] * scm_momentum[1] / pscm;
|
||||
mom_rot[2] = mom[1] * (velocity[2] - gbpp * scm_momentum[2]) / ga +
|
||||
mom[2] * (scm_momentum[3] * velocity[1] - scm_momentum[1] * velocity[3]) / gapp +
|
||||
mom[3] * scm_momentum[2] / pscm;
|
||||
mom_rot[3] = mom[1] * (velocity[3] - gbpp * scm_momentum[3]) / ga +
|
||||
mom[2] * (scm_momentum[1] * velocity[2] - scm_momentum[2] * velocity[1]) / gapp +
|
||||
mom[3] * scm_momentum[3] / pscm;
|
||||
};
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " after rotation: px " << mom_rot[1] << " py " << mom_rot[2] <<
|
||||
" pz " << mom_rot[3] << G4endl;
|
||||
}
|
||||
|
||||
return mom_rot;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> G4LorentzConvertor::rotate(const G4std::vector<G4double> mom1,
|
||||
const G4std::vector<G4double> mom) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4LorentzConvertor::rotate(G4std::vector<G4double>,G4std::vector<G4double>)" << G4endl;
|
||||
}
|
||||
|
||||
const G4double small = 1.0e-10;
|
||||
|
||||
G4std::vector<G4double> mom_rot(4);
|
||||
|
||||
G4double pp = 0.0;
|
||||
|
||||
G4double pv = 0.0;
|
||||
|
||||
for(G4int i = 0; i < 4; i++) {
|
||||
pp += mom1[i] * mom1[i];
|
||||
pv += mom1[i] * velocity[i];
|
||||
};
|
||||
|
||||
G4double ga1 = v2 - pv * pv / pp;
|
||||
|
||||
if(ga1 < small) {
|
||||
mom_rot = mom;
|
||||
} else {
|
||||
ga1 = sqrt(ga1);
|
||||
|
||||
G4double gb1 = pv / pp;
|
||||
|
||||
pp = sqrt(pp);
|
||||
|
||||
G4double ga1pp = ga1 * pp;
|
||||
|
||||
mom_rot[1] = mom[1] * (velocity[1] - gb1 * mom1[1]) / ga1 +
|
||||
mom[2] * (mom1[2] * velocity[3] - mom1[3] * velocity[2]) / ga1pp +
|
||||
mom[3] * mom1[1] / pp;
|
||||
mom_rot[2] = mom[1] * (velocity[2] - gb1 * mom1[2]) / ga1 +
|
||||
mom[2] * (mom1[3] * velocity[1] - mom1[1] * velocity[3]) / ga1pp +
|
||||
mom[3] * mom1[2] / pp;
|
||||
mom_rot[3] = mom[1] * (velocity[3] - gb1 * mom1[3]) / ga1 +
|
||||
mom[2] * (mom1[1] * velocity[2] - mom1[2] * velocity[1]) / ga1pp +
|
||||
mom[3] * mom1[3] / pp;
|
||||
};
|
||||
|
||||
return mom_rot;
|
||||
}
|
||||
|
||||
void G4LorentzConvertor::toTheTargetRestFrame() {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4LorentzConvertor::toTheTargetRestFrame" << G4endl;
|
||||
}
|
||||
|
||||
const G4double small = 1.0e-10;
|
||||
|
||||
gamma = target_mom[0] / target_mass;
|
||||
v2 = 0.0;
|
||||
|
||||
G4double pv = 0.0;
|
||||
|
||||
// G4double e_sum = target_mom[0] + bullet_mom[0];
|
||||
|
||||
velocity.resize(4);
|
||||
G4int i(0);
|
||||
for(i = 1; i < 4; i++) {
|
||||
velocity[i] = target_mom[i] / target_mom[0];
|
||||
v2 += velocity[i] * velocity[i];
|
||||
pv += bullet_mom[i] * velocity[i];
|
||||
};
|
||||
|
||||
G4double pa = 0.0;
|
||||
|
||||
G4double pb = 0.0;
|
||||
|
||||
scm_momentum.resize(4);
|
||||
|
||||
G4double xx = 0.0;
|
||||
|
||||
if(v2 > small) xx = pv * (gamma - 1.0) / v2 - bullet_mom[0] * gamma;
|
||||
for(i = 1; i < 4; i++) {
|
||||
scm_momentum[i] = bullet_mom[i] + velocity[i] * xx;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " rf: i " << i << " pscm(i) " << scm_momentum[i] << G4endl;
|
||||
}
|
||||
pa += scm_momentum[i] * scm_momentum[i];
|
||||
pb += scm_momentum[i] * velocity[i];
|
||||
};
|
||||
|
||||
ga = v2 - pb * pb / pa;
|
||||
if(ga < small) {
|
||||
ga = small;
|
||||
degenerated = true;
|
||||
} else {
|
||||
ga = sqrt(ga);
|
||||
};
|
||||
pscm = sqrt(pa);
|
||||
plab = pscm;
|
||||
gb = pb / pscm;
|
||||
gbpp = gb / pscm;
|
||||
gapp = ga * pscm;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> G4LorentzConvertor::backToTheLab(const G4std::vector<G4double>& mom) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4LorentzConvertor::backToTheLab" << G4endl;
|
||||
}
|
||||
|
||||
const G4double small = 1.0e-10;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " at rest: px " << mom[1] << " py " << mom[2] << " pz " << mom[3] <<
|
||||
" e " << mom[0] << G4endl;
|
||||
G4cout << " v2 " << v2 << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> mom1(4);
|
||||
|
||||
if(v2 < small) {
|
||||
mom1 = mom;
|
||||
} else {
|
||||
G4double pv = 0.0;
|
||||
|
||||
G4int i(0);
|
||||
for(i = 1; i < 4; i++) pv += mom[i] * velocity[i];
|
||||
|
||||
G4double xx = pv * (gamma - 1.0) / v2 + mom[0] * gamma;
|
||||
|
||||
for(i = 1; i < 4; i++) mom1[i] = mom[i] + velocity[i] * xx;
|
||||
};
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " at lab: px " << mom1[1] << " py " << mom1[2] << " pz " << mom1[3] << G4endl;
|
||||
}
|
||||
|
||||
return mom1;
|
||||
}
|
||||
|
||||
G4bool G4LorentzConvertor::reflectionNeeded() const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4LorentzConvertor::reflectionNeeded" << G4endl;
|
||||
}
|
||||
|
||||
const G4double small = 1.0e-10;
|
||||
|
||||
if(v2 < small) {
|
||||
return false;
|
||||
} else {
|
||||
if(degenerated) return (scm_momentum[3] < 0.0);
|
||||
else
|
||||
{
|
||||
G4Exception("G4LorentzConvertor::reflectionNeeded - return value undefined");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user