Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -0,0 +1,184 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4IonBinaryCascadePhysics.cc 71042 2013-06-10 09:28:44Z gcosmo $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4IonBinaryCascadePhysics
|
||||
//
|
||||
// Author: V.Ivanchenko 09.11.2005
|
||||
//
|
||||
// Modified:
|
||||
// 21.03.13 A.Ribon : replace LHEP with FTFP.
|
||||
// 23.06.06 V.Ivanchenko set emaxLHEP=1 TeV
|
||||
// 24.06.06 V.Ivanchenko fix typo
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#include "G4IonBinaryCascadePhysics.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4Triton.hh"
|
||||
#include "G4He3.hh"
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
#include "G4IonConstructor.hh"
|
||||
|
||||
#include "G4HadronInelasticProcess.hh"
|
||||
#include "G4BinaryLightIonReaction.hh"
|
||||
#include "G4ComponentGGNuclNuclXsc.hh"
|
||||
#include "G4CrossSectionInelastic.hh"
|
||||
|
||||
#include "G4PreCompoundModel.hh"
|
||||
#include "G4ExcitationHandler.hh"
|
||||
#include "G4FTFBuilder.hh"
|
||||
#include "G4HadronicInteraction.hh"
|
||||
#include "G4BuilderType.hh"
|
||||
|
||||
// factory
|
||||
#include "G4PhysicsConstructorFactory.hh"
|
||||
//
|
||||
G4_DECLARE_PHYSCONSTR_FACTORY(G4IonBinaryCascadePhysics);
|
||||
|
||||
G4ThreadLocal G4bool G4IonBinaryCascadePhysics::wasActivated = false;
|
||||
G4ThreadLocal std::vector<G4HadronInelasticProcess*>* G4IonBinaryCascadePhysics::G4MT_p_list = 0;
|
||||
G4ThreadLocal std::vector<G4HadronicInteraction*>* G4IonBinaryCascadePhysics::G4MT_model_list = 0;
|
||||
|
||||
G4ThreadLocal G4VCrossSectionDataSet* G4IonBinaryCascadePhysics::theNuclNuclData = 0;
|
||||
G4ThreadLocal G4VComponentCrossSection* G4IonBinaryCascadePhysics::theGGNuclNuclXS = 0;
|
||||
G4ThreadLocal G4BinaryLightIonReaction* G4IonBinaryCascadePhysics::theIonBC = 0;
|
||||
G4ThreadLocal G4HadronicInteraction* G4IonBinaryCascadePhysics::theFTFP = 0;
|
||||
G4ThreadLocal G4FTFBuilder* G4IonBinaryCascadePhysics::theBuilder = 0;
|
||||
|
||||
G4IonBinaryCascadePhysics::G4IonBinaryCascadePhysics(G4int ver)
|
||||
: G4VPhysicsConstructor("IonBinaryCascade"), verbose(ver)
|
||||
{
|
||||
theNuclNuclData = 0;
|
||||
theGGNuclNuclXS = 0;
|
||||
theIonBC = 0;
|
||||
theFTFP = 0;
|
||||
theBuilder = 0;
|
||||
SetPhysicsType(bIons);
|
||||
if(verbose > 1) G4cout << "### G4IonBinaryCascadePhysics" << G4endl;
|
||||
}
|
||||
|
||||
|
||||
G4IonBinaryCascadePhysics::G4IonBinaryCascadePhysics(const G4String& name,
|
||||
G4int ver)
|
||||
: G4VPhysicsConstructor(name), verbose(ver)
|
||||
{
|
||||
theNuclNuclData = 0;
|
||||
theGGNuclNuclXS = 0;
|
||||
theIonBC = 0;
|
||||
theFTFP = 0;
|
||||
theBuilder = 0;
|
||||
SetPhysicsType(bIons);
|
||||
if(verbose > 1) G4cout << "### G4IonBinaryCascadePhysics" << G4endl;
|
||||
}
|
||||
|
||||
|
||||
G4IonBinaryCascadePhysics::~G4IonBinaryCascadePhysics()
|
||||
{
|
||||
//Explicitly setting pointers TLS to 0 is
|
||||
//needed, in case I create a new thread
|
||||
//this variable is static!
|
||||
if(wasActivated) {
|
||||
delete theBuilder; theBuilder = 0;
|
||||
delete theGGNuclNuclXS; theGGNuclNuclXS = 0;
|
||||
delete theNuclNuclData; theNuclNuclData = 0;
|
||||
G4int i;
|
||||
if ( G4MT_p_list ) {
|
||||
G4int n = G4MT_p_list->size();
|
||||
for(i=0; i<n; i++) {delete (*G4MT_p_list)[i];}
|
||||
delete G4MT_p_list;
|
||||
G4MT_p_list = 0;
|
||||
}
|
||||
if ( G4MT_model_list ) {
|
||||
G4int n = G4MT_model_list->size();
|
||||
for(i=0; i<n; i++) {delete (*G4MT_model_list)[i];}
|
||||
delete G4MT_model_list;
|
||||
G4MT_model_list = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4IonBinaryCascadePhysics::ConstructProcess()
|
||||
{
|
||||
if(wasActivated) { return; }
|
||||
wasActivated = true;
|
||||
|
||||
G4ExcitationHandler* handler = new G4ExcitationHandler();
|
||||
G4PreCompoundModel* thePreCompound = new G4PreCompoundModel(handler);
|
||||
|
||||
theIonBC = new G4BinaryLightIonReaction(thePreCompound);
|
||||
theIonBC->SetMinEnergy(0.0);
|
||||
theIonBC->SetMaxEnergy(4.0*GeV);
|
||||
if ( G4MT_model_list == 0 ) G4MT_model_list = new std::vector<G4HadronicInteraction*>;
|
||||
G4MT_model_list->push_back(theIonBC);
|
||||
|
||||
theBuilder = new G4FTFBuilder("FTFP",thePreCompound);
|
||||
theFTFP = theBuilder->GetModel();
|
||||
theFTFP->SetMinEnergy(2.0*GeV);
|
||||
theFTFP->SetMaxEnergy(100.0*TeV);
|
||||
G4MT_model_list->push_back(theFTFP);
|
||||
|
||||
theNuclNuclData = new G4CrossSectionInelastic( theGGNuclNuclXS = new G4ComponentGGNuclNuclXsc() );
|
||||
|
||||
AddProcess("dInelastic", G4Deuteron::Deuteron());
|
||||
AddProcess("tInelastic", G4Triton::Triton());
|
||||
AddProcess("He3Inelastic", G4He3::He3());
|
||||
AddProcess("alphaInelastic", G4Alpha::Alpha());
|
||||
AddProcess("ionInelastic", G4GenericIon::GenericIon());
|
||||
}
|
||||
|
||||
|
||||
void G4IonBinaryCascadePhysics::AddProcess(const G4String& name,
|
||||
G4ParticleDefinition* part)
|
||||
{
|
||||
if ( G4MT_p_list == 0 ) G4MT_p_list = new std::vector<G4HadronInelasticProcess*>;
|
||||
G4HadronInelasticProcess* hadi = new G4HadronInelasticProcess(name, part);
|
||||
G4MT_p_list->push_back(hadi);
|
||||
G4ProcessManager* pManager = part->GetProcessManager();
|
||||
pManager->AddDiscreteProcess(hadi);
|
||||
|
||||
hadi->AddDataSet(theNuclNuclData);
|
||||
|
||||
hadi->RegisterMe(theIonBC);
|
||||
hadi->RegisterMe(theFTFP);
|
||||
}
|
||||
|
||||
|
||||
void G4IonBinaryCascadePhysics::ConstructParticle()
|
||||
{
|
||||
// Construct light ions
|
||||
G4IonConstructor pConstructor;
|
||||
pConstructor.ConstructParticle();
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4IonINCLXXPhysics.cc 71042 2013-06-10 09:28:44Z gcosmo $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4IonINCLXXPhysics
|
||||
//
|
||||
// Author: D. Mancusi
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#include "G4IonINCLXXPhysics.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4Triton.hh"
|
||||
#include "G4He3.hh"
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
#include "G4IonConstructor.hh"
|
||||
|
||||
#include "G4HadronInelasticProcess.hh"
|
||||
#include "G4ComponentGGNuclNuclXsc.hh"
|
||||
#include "G4CrossSectionInelastic.hh"
|
||||
|
||||
#include "G4INCLXXInterface.hh"
|
||||
#include "G4PreCompoundModel.hh"
|
||||
#include "G4ExcitationHandler.hh"
|
||||
#include "G4FTFBuilder.hh"
|
||||
#include "G4HadronicInteraction.hh"
|
||||
#include "G4BuilderType.hh"
|
||||
|
||||
// factory
|
||||
#include "G4PhysicsConstructorFactory.hh"
|
||||
//
|
||||
G4_DECLARE_PHYSCONSTR_FACTORY(G4IonINCLXXPhysics);
|
||||
|
||||
G4ThreadLocal std::vector<G4HadronInelasticProcess*>* G4IonINCLXXPhysics::p_list = 0;
|
||||
G4ThreadLocal std::vector<G4HadronicInteraction*>* G4IonINCLXXPhysics::model_list = 0;
|
||||
G4ThreadLocal G4VCrossSectionDataSet* G4IonINCLXXPhysics::theNuclNuclData = 0;
|
||||
G4ThreadLocal G4VComponentCrossSection* G4IonINCLXXPhysics::theGGNuclNuclXS = 0;
|
||||
G4ThreadLocal G4INCLXXInterface* G4IonINCLXXPhysics::theINCLXXIons = 0;
|
||||
G4ThreadLocal G4HadronicInteraction* G4IonINCLXXPhysics::theFTFP = 0;
|
||||
G4ThreadLocal G4FTFBuilder* G4IonINCLXXPhysics::theBuilder = 0;
|
||||
G4ThreadLocal G4bool G4IonINCLXXPhysics::wasActivated = false;
|
||||
|
||||
G4IonINCLXXPhysics::G4IonINCLXXPhysics(G4int ver) :
|
||||
G4VPhysicsConstructor("IonINCLXX"),
|
||||
verbose(ver)
|
||||
{
|
||||
// INCLXX light ion maximum energy is 3.0 GeV/nucleon
|
||||
emax_d = 2 * 3.0 * GeV;
|
||||
emax_t = 3 * 3.0 * GeV;
|
||||
emax_he3 = 3 * 3.0 * GeV;
|
||||
emax_alpha = 4 * 3.0 * GeV;
|
||||
emax = 16 * 3.0 * GeV;
|
||||
emaxFTFP = 1.*TeV;
|
||||
emin = 0.*MeV;
|
||||
SetPhysicsType(bIons);
|
||||
if(verbose > 1) G4cout << "### G4IonINCLXXPhysics" << G4endl;
|
||||
}
|
||||
|
||||
G4IonINCLXXPhysics::G4IonINCLXXPhysics(const G4String& name,
|
||||
G4int ver)
|
||||
: G4VPhysicsConstructor(name),
|
||||
verbose(ver)
|
||||
{
|
||||
// INCLXX light ion maximum energy is 3.0 GeV/nucleon
|
||||
emax_d = 2 * 3.0 * GeV;
|
||||
emax_t = 3 * 3.0 * GeV;
|
||||
emax_he3 = 3 * 3.0 * GeV;
|
||||
emax_alpha = 4 * 3.0 * GeV;
|
||||
emax = 16 * 3.0 * GeV;
|
||||
emaxFTFP = 1.*TeV;
|
||||
emin = 0.*MeV;
|
||||
SetPhysicsType(bIons);
|
||||
if(verbose > 1) G4cout << "### G4IonINCLXXPhysics" << G4endl;
|
||||
}
|
||||
|
||||
G4IonINCLXXPhysics::~G4IonINCLXXPhysics()
|
||||
{
|
||||
//For MT need to explicitly set back pointers to zero:
|
||||
//variables are static and if new threads are created we can have problems
|
||||
//since variable is still pointing old value
|
||||
if(wasActivated) {
|
||||
delete theBuilder; theBuilder=0;
|
||||
delete theGGNuclNuclXS; theGGNuclNuclXS=0;
|
||||
delete theNuclNuclData; theGGNuclNuclXS=0;
|
||||
G4int i;
|
||||
if ( p_list ) {
|
||||
G4int n = p_list->size();
|
||||
for(i=0; i<n; i++) {delete (*p_list)[i];}
|
||||
delete p_list; p_list = 0;
|
||||
}
|
||||
if ( model_list) {
|
||||
G4int n = model_list->size();
|
||||
for(i=0; i<n; i++) { delete (*model_list)[i];}
|
||||
delete model_list; model_list = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void G4IonINCLXXPhysics::ConstructProcess()
|
||||
{
|
||||
if(wasActivated) return;
|
||||
wasActivated = true;
|
||||
|
||||
theINCLXXIons= new G4INCLXXInterface();
|
||||
if ( model_list == 0 ) model_list = new std::vector<G4HadronicInteraction*>;
|
||||
model_list->push_back(theINCLXXIons);
|
||||
|
||||
G4ExcitationHandler* handler = new G4ExcitationHandler();
|
||||
G4PreCompoundModel* thePreCompound = new G4PreCompoundModel(handler);
|
||||
|
||||
theBuilder = new G4FTFBuilder("FTFP",thePreCompound);
|
||||
theFTFP = theBuilder->GetModel();
|
||||
model_list->push_back(theFTFP);
|
||||
|
||||
theNuclNuclData = new G4CrossSectionInelastic( theGGNuclNuclXS = new G4ComponentGGNuclNuclXsc() );
|
||||
|
||||
AddProcess("dInelastic", G4Deuteron::Deuteron(), theINCLXXIons, theFTFP, emax_d);
|
||||
AddProcess("tInelastic", G4Triton::Triton(), theINCLXXIons, theFTFP, emax_t);
|
||||
AddProcess("He3Inelastic", G4He3::He3(), theINCLXXIons, theFTFP, emax_he3);
|
||||
AddProcess("alphaInelastic", G4Alpha::Alpha(), theINCLXXIons, theFTFP, emax_alpha);
|
||||
AddProcess("ionInelastic", G4GenericIon::GenericIon(), theINCLXXIons, theFTFP, emax);
|
||||
}
|
||||
|
||||
void G4IonINCLXXPhysics::AddProcess(const G4String& name,
|
||||
G4ParticleDefinition* p,
|
||||
G4HadronicInteraction* hmodel,
|
||||
G4HadronicInteraction* lmodel,
|
||||
const G4double inclxxEnergyUpperLimit = 3.0 * GeV)
|
||||
{
|
||||
G4HadronInelasticProcess* hadi = new G4HadronInelasticProcess(name, p);
|
||||
if ( p_list == 0 ) p_list = new std::vector<G4HadronInelasticProcess*>;
|
||||
p_list->push_back(hadi);
|
||||
G4ProcessManager* pManager = p->GetProcessManager();
|
||||
pManager->AddDiscreteProcess(hadi);
|
||||
hadi->AddDataSet(theNuclNuclData);
|
||||
hmodel->SetMinEnergy(emin);
|
||||
hmodel->SetMaxEnergy(inclxxEnergyUpperLimit);
|
||||
hadi->RegisterMe(hmodel);
|
||||
if(lmodel) {
|
||||
lmodel->SetMinEnergy(inclxxEnergyUpperLimit - MeV);
|
||||
lmodel->SetMaxEnergy(emaxFTFP);
|
||||
hadi->RegisterMe(lmodel);
|
||||
}
|
||||
if(verbose > 1) {
|
||||
G4cout << "Register " << hadi->GetProcessName()
|
||||
<< " for " << p->GetParticleName()
|
||||
<< " INCLXX/G4DeexcitationHandler for E(MeV)= " << emin << " - " << inclxxEnergyUpperLimit;
|
||||
if(lmodel) {
|
||||
G4cout << " FTFP for E(MeV)= " << inclxxEnergyUpperLimit-MeV << " - " << emaxFTFP;
|
||||
}
|
||||
G4cout << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
void G4IonINCLXXPhysics::ConstructParticle()
|
||||
{
|
||||
// Construct light ions
|
||||
G4IonConstructor pConstructor;
|
||||
pConstructor.ConstructParticle();
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4IonPhysics.cc 71042 2013-06-10 09:28:44Z gcosmo $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Class: G4IonPhysics
|
||||
//
|
||||
// Author: A.Ivanchenko 02.03.2011
|
||||
//
|
||||
// Modified:
|
||||
// 16.10.2012 A.Ribon: renamed G4IonFTFPBinaryCascadePhysics as G4IonPhysics
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#include "G4IonPhysics.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4Triton.hh"
|
||||
#include "G4He3.hh"
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
#include "G4IonConstructor.hh"
|
||||
|
||||
#include "G4HadronInelasticProcess.hh"
|
||||
#include "G4BinaryLightIonReaction.hh"
|
||||
#include "G4ComponentGGNuclNuclXsc.hh"
|
||||
#include "G4CrossSectionInelastic.hh"
|
||||
|
||||
#include "G4PreCompoundModel.hh"
|
||||
#include "G4ExcitationHandler.hh"
|
||||
#include "G4FTFBuilder.hh"
|
||||
#include "G4HadronicInteraction.hh"
|
||||
#include "G4BuilderType.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
// factory
|
||||
#include "G4PhysicsConstructorFactory.hh"
|
||||
//
|
||||
G4_DECLARE_PHYSCONSTR_FACTORY(G4IonPhysics);
|
||||
|
||||
G4ThreadLocal G4bool G4IonPhysics::wasActivated = false;
|
||||
G4ThreadLocal G4BinaryLightIonReaction* G4IonPhysics::theIonBC = 0;
|
||||
G4ThreadLocal G4HadronicInteraction* G4IonPhysics::theFTFP = 0;
|
||||
G4ThreadLocal G4VCrossSectionDataSet* G4IonPhysics::theNuclNuclData = 0;
|
||||
G4ThreadLocal G4VComponentCrossSection* G4IonPhysics::theGGNuclNuclXS = 0;
|
||||
G4ThreadLocal G4FTFBuilder* G4IonPhysics::theBuilder;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4IonPhysics::G4IonPhysics(G4int ver)
|
||||
: G4VPhysicsConstructor("ionInelasticFTFP_BIC"),verbose(ver)
|
||||
{
|
||||
SetPhysicsType(bIons);
|
||||
if(verbose > 1) { G4cout << "### G4IonPhysics" << G4endl; }
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4IonPhysics::G4IonPhysics(const G4String& nname)
|
||||
: G4VPhysicsConstructor(nname),verbose(1)
|
||||
{
|
||||
SetPhysicsType(bIons);
|
||||
if(verbose > 1) { G4cout << "### G4IonPhysics" << G4endl; }
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4IonPhysics::~G4IonPhysics()
|
||||
{
|
||||
//Explictly setting pointers to zero is actually needed.
|
||||
//These are static variables, in case we restart threads we need to re-create objects
|
||||
delete theBuilder; theBuilder = 0;
|
||||
delete theGGNuclNuclXS; theGGNuclNuclXS = 0;
|
||||
delete theNuclNuclData; theNuclNuclData = 0;
|
||||
delete theIonBC; theIonBC = 0;
|
||||
delete theFTFP; theFTFP = 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4IonPhysics::ConstructParticle()
|
||||
{
|
||||
// Construct ions
|
||||
G4IonConstructor pConstructor;
|
||||
pConstructor.ConstructParticle();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4IonPhysics::ConstructProcess()
|
||||
{
|
||||
if(wasActivated) { return; }
|
||||
wasActivated = true;
|
||||
|
||||
G4double emax = 100.*TeV;
|
||||
|
||||
G4ExcitationHandler* handler = new G4ExcitationHandler();
|
||||
G4PreCompoundModel* thePreCompound = new G4PreCompoundModel(handler);
|
||||
|
||||
// Binary Cascade
|
||||
theIonBC = new G4BinaryLightIonReaction(thePreCompound);
|
||||
theIonBC->SetMinEnergy(0.0);
|
||||
theIonBC->SetMaxEnergy(4*GeV);
|
||||
|
||||
// FTFP
|
||||
theBuilder = new G4FTFBuilder("FTFP",thePreCompound);
|
||||
theFTFP = theBuilder->GetModel();
|
||||
theFTFP->SetMinEnergy(2*GeV);
|
||||
theFTFP->SetMaxEnergy(emax);
|
||||
|
||||
theNuclNuclData = new G4CrossSectionInelastic( theGGNuclNuclXS = new G4ComponentGGNuclNuclXsc() );
|
||||
|
||||
AddProcess("dInelastic", G4Deuteron::Deuteron(),false);
|
||||
AddProcess("tInelastic",G4Triton::Triton(),false);
|
||||
AddProcess("He3Inelastic",G4He3::He3(),true);
|
||||
AddProcess("alphaInelastic", G4Alpha::Alpha(),true);
|
||||
AddProcess("ionInelastic",G4GenericIon::GenericIon(),true);
|
||||
|
||||
if(verbose > 1) {
|
||||
G4cout << "G4IonPhysics::ConstructProcess done! "
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4IonPhysics::AddProcess(const G4String& name,
|
||||
G4ParticleDefinition* part,
|
||||
G4bool )//isIon)
|
||||
{
|
||||
G4HadronInelasticProcess* hadi = new G4HadronInelasticProcess(name, part);
|
||||
G4ProcessManager* pManager = part->GetProcessManager();
|
||||
pManager->AddDiscreteProcess(hadi);
|
||||
|
||||
hadi->AddDataSet(theNuclNuclData);
|
||||
|
||||
hadi->RegisterMe(theIonBC);
|
||||
hadi->RegisterMe(theFTFP);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -0,0 +1,214 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4IonQMDPhysics.cc 71042 2013-06-10 09:28:44Z gcosmo $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4IonQMDPhysics
|
||||
// Created from G4IonBinaryCascadePhysics
|
||||
//
|
||||
// Author: G.Folger
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#include "G4IonQMDPhysics.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4Triton.hh"
|
||||
#include "G4He3.hh"
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
#include "G4IonConstructor.hh"
|
||||
|
||||
#include "G4HadronInelasticProcess.hh"
|
||||
#include "G4BinaryLightIonReaction.hh"
|
||||
#include "G4QMDReaction.hh"
|
||||
|
||||
#include "G4PreCompoundModel.hh"
|
||||
#include "G4ExcitationHandler.hh"
|
||||
#include "G4FTFBuilder.hh"
|
||||
#include "G4HadronicInteraction.hh"
|
||||
#include "G4BuilderType.hh"
|
||||
|
||||
#include "G4ComponentGGNuclNuclXsc.hh"
|
||||
#include "G4CrossSectionInelastic.hh"
|
||||
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
// Nuclei
|
||||
#include "G4IonConstructor.hh"
|
||||
#include "G4BuilderType.hh"
|
||||
|
||||
// factory
|
||||
#include "G4PhysicsConstructorFactory.hh"
|
||||
//
|
||||
G4_DECLARE_PHYSCONSTR_FACTORY(G4IonQMDPhysics);
|
||||
|
||||
G4ThreadLocal std::vector<G4HadronInelasticProcess*>* G4IonQMDPhysics::p_list = 0;
|
||||
G4ThreadLocal std::vector<G4HadronicInteraction*>* G4IonQMDPhysics::model_list = 0;
|
||||
|
||||
G4ThreadLocal G4VCrossSectionDataSet* G4IonQMDPhysics::theNuclNuclData = 0;
|
||||
G4ThreadLocal G4VComponentCrossSection* G4IonQMDPhysics::theGGNuclNuclXS = 0;
|
||||
|
||||
G4ThreadLocal G4BinaryLightIonReaction* G4IonQMDPhysics::theIonBC = 0;
|
||||
G4ThreadLocal G4HadronicInteraction* G4IonQMDPhysics::theFTFP = 0;
|
||||
G4ThreadLocal G4FTFBuilder* G4IonQMDPhysics::theBuilder = 0;
|
||||
G4ThreadLocal G4QMDReaction* G4IonQMDPhysics::theQMD = 0;
|
||||
G4ThreadLocal G4bool G4IonQMDPhysics::wasActivated = false;
|
||||
|
||||
G4IonQMDPhysics::G4IonQMDPhysics(G4int ver)
|
||||
: G4VPhysicsConstructor("IonQMD"), verbose(ver)
|
||||
{
|
||||
eminBIC = 0.*MeV;
|
||||
eminQMD = 100.*MeV;
|
||||
emaxQMD = 10.*GeV;
|
||||
emaxFTFP = 1.*TeV;
|
||||
overlap = 10*MeV;
|
||||
SetPhysicsType(bIons);
|
||||
if(verbose > 1) G4cout << "### G4IonQMDPhysics" << G4endl;
|
||||
}
|
||||
|
||||
G4IonQMDPhysics::G4IonQMDPhysics(const G4String& name,
|
||||
G4int ver)
|
||||
: G4VPhysicsConstructor(name), verbose(ver)
|
||||
{
|
||||
eminBIC = 0.*MeV;
|
||||
eminQMD = 100.*MeV;
|
||||
emaxQMD = 10.*GeV;
|
||||
emaxFTFP = 1.*TeV;
|
||||
overlap = 10*MeV;
|
||||
SetPhysicsType(bIons);
|
||||
if(verbose > 1) G4cout << "### G4IonQMDPhysics" << G4endl;
|
||||
}
|
||||
|
||||
G4IonQMDPhysics::~G4IonQMDPhysics()
|
||||
{
|
||||
if(wasActivated) {
|
||||
delete theBuilder; theBuilder = 0;
|
||||
delete theGGNuclNuclXS; theGGNuclNuclXS = 0;
|
||||
delete theNuclNuclData; theNuclNuclData = 0;
|
||||
G4int i;
|
||||
if ( p_list ) {
|
||||
G4int n = p_list->size();
|
||||
for(i=0; i<n; i++) {delete (*p_list)[i];}
|
||||
delete p_list; p_list = 0;
|
||||
}
|
||||
if ( model_list ) {
|
||||
G4int n = model_list->size();
|
||||
for(i=0; i<n; i++) {delete (*model_list)[i];}
|
||||
delete model_list; model_list = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void G4IonQMDPhysics::ConstructProcess()
|
||||
{
|
||||
if(wasActivated) return;
|
||||
wasActivated = true;
|
||||
|
||||
G4ExcitationHandler* handler = new G4ExcitationHandler();
|
||||
G4PreCompoundModel* thePreCompound = new G4PreCompoundModel(handler);
|
||||
|
||||
theIonBC = new G4BinaryLightIonReaction(thePreCompound);
|
||||
if ( model_list == 0 ) model_list = new std::vector<G4HadronicInteraction*>;
|
||||
model_list->push_back(theIonBC);
|
||||
|
||||
theBuilder = new G4FTFBuilder("FTFP",thePreCompound);
|
||||
theFTFP = theBuilder->GetModel();
|
||||
model_list->push_back(theFTFP);
|
||||
|
||||
theQMD= new G4QMDReaction();
|
||||
model_list->push_back(theQMD);
|
||||
|
||||
theNuclNuclData = new G4CrossSectionInelastic( theGGNuclNuclXS = new G4ComponentGGNuclNuclXsc() );
|
||||
|
||||
AddProcess("dInelastic", G4Deuteron::Deuteron(), theIonBC, theQMD, theFTFP);
|
||||
AddProcess("tInelastic", G4Triton::Triton(), theIonBC, theQMD, theFTFP);
|
||||
AddProcess("He3Inelastic", G4He3::He3(), theIonBC, theQMD, theFTFP);
|
||||
AddProcess("alphaInelastic", G4Alpha::Alpha(), theIonBC, theQMD, theFTFP);
|
||||
AddProcess("ionInelastic", G4GenericIon::GenericIon(), theIonBC, theQMD, theFTFP);
|
||||
|
||||
}
|
||||
|
||||
void G4IonQMDPhysics::AddProcess(const G4String& name,
|
||||
G4ParticleDefinition* p,
|
||||
G4BinaryLightIonReaction* BIC,
|
||||
G4QMDReaction* QMD,
|
||||
G4HadronicInteraction* FTFP)
|
||||
{
|
||||
G4HadronInelasticProcess* hadi = new G4HadronInelasticProcess(name, p);
|
||||
if ( p_list == 0 ) p_list = new std::vector<G4HadronInelasticProcess*>;
|
||||
p_list->push_back(hadi);
|
||||
G4ProcessManager* pManager = p->GetProcessManager();
|
||||
pManager->AddDiscreteProcess(hadi);
|
||||
|
||||
hadi->AddDataSet(theNuclNuclData);
|
||||
|
||||
BIC->SetMinEnergy(eminBIC);
|
||||
BIC->SetMaxEnergy(emaxQMD); //reset when QMD is present
|
||||
hadi->RegisterMe(BIC);
|
||||
|
||||
if(QMD) {
|
||||
QMD->SetMinEnergy(eminQMD);
|
||||
BIC->SetMaxEnergy(eminQMD+overlap);
|
||||
QMD->SetMaxEnergy(emaxQMD);
|
||||
hadi->RegisterMe(QMD);
|
||||
}
|
||||
|
||||
if(FTFP) {
|
||||
FTFP->SetMinEnergy(emaxQMD - overlap);
|
||||
FTFP->SetMaxEnergy(emaxFTFP);
|
||||
hadi->RegisterMe(FTFP);
|
||||
}
|
||||
|
||||
if(verbose > 1) {
|
||||
G4cout << "Register " << hadi->GetProcessName()
|
||||
<< " for " << p->GetParticleName() << G4endl
|
||||
<< " Binary Cascade for E(MeV)= " << eminBIC << " - "
|
||||
<< (QMD==0 ? emaxQMD : (eminQMD-overlap)) ;
|
||||
if(QMD) {
|
||||
G4cout << G4endl <<" QMD for E(MeV)= " << eminQMD << " - " << emaxQMD;
|
||||
}
|
||||
if(FTFP) {
|
||||
G4cout << G4endl<< " FTFP for E(MeV)= " << emaxQMD-overlap << " - " << emaxFTFP;
|
||||
}
|
||||
G4cout << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
void G4IonQMDPhysics::ConstructParticle()
|
||||
{
|
||||
// Construct light ions
|
||||
G4IonConstructor pConstructor;
|
||||
pConstructor.ConstructParticle();
|
||||
}
|
||||
Reference in New Issue
Block a user