Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
@@ -41,7 +41,6 @@
void G4AlphaBuilder::Build()
{
wasActivated = true;
std::vector<G4VAlphaBuilder *>::iterator i;
for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
{
@@ -51,8 +50,7 @@
theProcMan->AddDiscreteProcess(theAlphaInelastic);
}
G4AlphaBuilder::
G4AlphaBuilder(): wasActivated(false)
G4AlphaBuilder::G4AlphaBuilder()
{
theAlphaInelastic=new G4AlphaInelasticProcess;
}
@@ -40,8 +40,7 @@
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
G4AntiBarionBuilder::
G4AntiBarionBuilder(): wasActivated(false)
G4AntiBarionBuilder::G4AntiBarionBuilder()
{
theAntiProtonInelastic=new G4AntiProtonInelasticProcess;
theAntiNeutronInelastic=new G4AntiNeutronInelasticProcess;
@@ -51,12 +50,8 @@ G4AntiBarionBuilder(): wasActivated(false)
theAntiAlphaInelastic=new G4AntiAlphaInelasticProcess;
}
void G4AntiBarionBuilder::
Build()
void G4AntiBarionBuilder::Build()
{
wasActivated = true;
std::vector<G4VAntiBarionBuilder *>::iterator i;
for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
{
@@ -42,7 +42,6 @@
void G4DeuteronBuilder::Build()
{
wasActivated = true;
std::vector<G4VDeuteronBuilder *>::iterator i;
for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
{
@@ -52,8 +51,7 @@
theProcMan->AddDiscreteProcess(theDeuteronInelastic);
}
G4DeuteronBuilder::
G4DeuteronBuilder(): wasActivated(false)
G4DeuteronBuilder::G4DeuteronBuilder()
{
theDeuteronInelastic=new G4DeuteronInelasticProcess;
}
@@ -52,31 +52,23 @@ G4FTFBinaryKaonBuilder(G4bool quasiElastic)
theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
theModel = new G4TheoFSGenerator("FTFB");
theStringModel = new G4FTFModel;
theStringDecay = new G4ExcitedStringDecay(new G4LundStringFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
G4FTFModel* theStringModel = new G4FTFModel;
theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
theCascade = new G4BinaryCascade;
G4BinaryCascade* theCascade = new G4BinaryCascade;
theModel->SetTransport(theCascade);
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
theModel->SetTransport(theCascade);
theModel->SetMinEnergy(theMin);
theModel->SetMaxEnergy(theMax);
if (quasiElastic) {
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
G4FTFBinaryKaonBuilder:: ~G4FTFBinaryKaonBuilder()
{
delete theStringDecay;
delete theStringModel;
//delete theModel;
if ( theQuasiElastic ) delete theQuasiElastic;
}
void G4FTFBinaryKaonBuilder::
@@ -54,30 +54,24 @@ G4FTFBinaryNeutronBuilder(G4bool quasiElastic)
theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
theModel = new G4TheoFSGenerator("FTFB");
theStringModel = new G4FTFModel;
theStringDecay = new G4ExcitedStringDecay(new G4LundStringFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
G4FTFModel* theStringModel = new G4FTFModel;
theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
theCascade = new G4BinaryCascade;
G4BinaryCascade* theCascade = new G4BinaryCascade;
theModel->SetTransport(theCascade);
theModel->SetHighEnergyGenerator(theStringModel);
theModel->SetMinEnergy(theMin);
theModel->SetMaxEnergy(theMax);
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
if (quasiElastic) {
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
G4FTFBinaryNeutronBuilder::
~G4FTFBinaryNeutronBuilder()
{
delete theStringDecay;
delete theStringModel;
if ( theQuasiElastic ) delete theQuasiElastic;
}
void G4FTFBinaryNeutronBuilder::
@@ -53,29 +53,23 @@ G4FTFBinaryPiKBuilder(G4bool quasiElastic)
theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionFTF_Cascade();
theModel = new G4TheoFSGenerator("FTFB");
theStringModel = new G4FTFModel;
theStringDecay = new G4ExcitedStringDecay(new G4LundStringFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
G4FTFModel* theStringModel = new G4FTFModel;
theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
theCascade = new G4BinaryCascade;
G4BinaryCascade* theCascade = new G4BinaryCascade;
theModel->SetTransport(theCascade);
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
theModel->SetTransport(theCascade);
theModel->SetMinEnergy(theMin);
if (quasiElastic) {
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
theModel->SetMaxEnergy( G4HadronicParameters::Instance()->GetMaxEnergy() );
}
G4FTFBinaryPiKBuilder:: ~G4FTFBinaryPiKBuilder()
{
delete theStringDecay;
if ( theQuasiElastic ) delete theQuasiElastic;
}
void G4FTFBinaryPiKBuilder::
@@ -45,7 +45,6 @@
#include "G4BGGPionInelasticXS.hh"
#include "G4HadronicParameters.hh"
G4FTFBinaryPionBuilder::
G4FTFBinaryPionBuilder(G4bool quasiElastic)
{
@@ -53,31 +52,23 @@ G4FTFBinaryPionBuilder(G4bool quasiElastic)
theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
theModel = new G4TheoFSGenerator("FTFB");
theStringModel = new G4FTFModel;
theStringDecay = new G4ExcitedStringDecay(new G4LundStringFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
G4FTFModel* theStringModel = new G4FTFModel;
theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
theCascade = new G4BinaryCascade;
G4BinaryCascade* theCascade = new G4BinaryCascade;
theModel->SetTransport(theCascade);
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
theModel->SetTransport(theCascade);
theModel->SetMinEnergy(theMin);
theModel->SetMaxEnergy(theMax);
if (quasiElastic) {
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
G4FTFBinaryPionBuilder:: ~G4FTFBinaryPionBuilder()
{
delete theStringDecay;
delete theStringModel;
//delete theModel;
if ( theQuasiElastic ) delete theQuasiElastic;
}
void G4FTFBinaryPionBuilder::
@@ -53,24 +53,19 @@ G4FTFBinaryProtonBuilder(G4bool quasiElastic)
theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
theModel = new G4TheoFSGenerator("FTFB");
theStringModel = new G4FTFModel;
theStringDecay = new G4ExcitedStringDecay(new G4LundStringFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
G4FTFModel* theStringModel = new G4FTFModel;
theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
theCascade = new G4BinaryCascade;
G4BinaryCascade* theCascade = new G4BinaryCascade;
theModel->SetTransport(theCascade);
theModel->SetHighEnergyGenerator(theStringModel);
theModel->SetMinEnergy(theMin);
theModel->SetMaxEnergy(theMax);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
if (quasiElastic) {
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
void G4FTFBinaryProtonBuilder::
@@ -85,9 +80,5 @@ Build(G4ProtonInelasticProcess * aP)
G4FTFBinaryProtonBuilder::
~G4FTFBinaryProtonBuilder()
{
delete theStringDecay;
delete theStringModel;
//delete theModel;
if ( theQuasiElastic ) delete theQuasiElastic;
}
@@ -46,25 +46,17 @@
#include "G4ExcitationHandler.hh"
G4FTFBuilder::G4FTFBuilder(const G4String& aName, G4PreCompoundModel* p)
: G4VHadronModelBuilder(aName),
fStringModel(0), fStringDecay(0),
fPreCompound(p),fPrecoInterface(0),fLund(0)
: G4VHadronModelBuilder(aName), fPreCompound(p)
{}
G4FTFBuilder::~G4FTFBuilder()
{
delete fStringDecay;
delete fStringModel;
delete fLund;
}
{}
G4HadronicInteraction* G4FTFBuilder::BuildModel()
{
G4TheoFSGenerator* theFTFModel = new G4TheoFSGenerator(GetName());
fStringModel = new G4FTFModel();
fLund = new G4LundStringFragmentation();
fStringDecay = new G4ExcitedStringDecay(fLund);
fStringModel->SetFragmentationModel(fStringDecay);
G4FTFModel* fStringModel = new G4FTFModel();
fStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
theFTFModel->SetHighEnergyGenerator(fStringModel);
if(!fPreCompound) {
@@ -76,7 +68,8 @@ G4HadronicInteraction* G4FTFBuilder::BuildModel()
theFTFModel->SetTransport(bic);
} else {
fPrecoInterface = new G4GeneratorPrecompoundInterface(fPreCompound);
G4GeneratorPrecompoundInterface* fPrecoInterface =
new G4GeneratorPrecompoundInterface(fPreCompound);
theFTFModel->SetTransport(fPrecoInterface);
}
@@ -48,7 +48,8 @@ G4FTFPAntiBarionBuilder::
G4FTFPAntiBarionBuilder(G4bool quasiElastic)
{
G4CrossSectionDataSetRegistry* xsreg = G4CrossSectionDataSetRegistry::Instance();
theAntiNucleonXS = xsreg->GetComponentCrossSection("AntiAGlauber");
G4VComponentCrossSection* theAntiNucleonXS =
xsreg->GetComponentCrossSection("AntiAGlauber");
if(!theAntiNucleonXS) { theAntiNucleonXS = new G4ComponentAntiNuclNuclearXS(); }
theAntiNucleonData = new G4CrossSectionInelastic(theAntiNucleonXS);
@@ -56,19 +57,16 @@ G4FTFPAntiBarionBuilder(G4bool quasiElastic)
theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
theModel = new G4TheoFSGenerator("FTFP");
theStringModel = new G4FTFModel;
theStringDecay = new G4ExcitedStringDecay(theLund = new G4LundStringFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
G4FTFModel* theStringModel = new G4FTFModel();
theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
theCascade = new G4GeneratorPrecompoundInterface();
G4GeneratorPrecompoundInterface* theCascade =
new G4GeneratorPrecompoundInterface();
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
if (quasiElastic) {
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
theModel->SetTransport(theCascade);
theModel->SetMinEnergy(theMin);
@@ -77,11 +75,6 @@ G4FTFPAntiBarionBuilder(G4bool quasiElastic)
G4FTFPAntiBarionBuilder::~G4FTFPAntiBarionBuilder()
{
delete theStringDecay;
//delete theStringModel;
//delete theModel;
if ( theQuasiElastic ) delete theQuasiElastic;
delete theLund;
}
void G4FTFPAntiBarionBuilder::
@@ -46,19 +46,16 @@ G4FTFPKaonBuilder(G4bool quasiElastic)
theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
theModel = new G4TheoFSGenerator("FTFP");
theStringModel = new G4FTFModel;
theStringDecay = new G4ExcitedStringDecay(theLund = new G4LundStringFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
G4FTFModel* theStringModel = new G4FTFModel();
theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
theCascade = new G4GeneratorPrecompoundInterface();
G4GeneratorPrecompoundInterface* theCascade =
new G4GeneratorPrecompoundInterface();
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
if (quasiElastic) {
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
theModel->SetTransport(theCascade);
theModel->SetMinEnergy(theMin);
@@ -67,12 +64,6 @@ G4FTFPKaonBuilder(G4bool quasiElastic)
G4FTFPKaonBuilder::~G4FTFPKaonBuilder()
{
delete theStringDecay;
delete theStringModel;
//delete theModel;
if ( theQuasiElastic ) delete theQuasiElastic;
//delete theHandler;
delete theLund;
}
void G4FTFPKaonBuilder::
@@ -43,7 +43,7 @@
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
#include "G4BGGNucleonInelasticXS.hh"
#include "G4NeutronInelasticXS.hh"
#include "G4HadronicParameters.hh"
@@ -54,22 +54,18 @@ G4FTFPNeutronBuilder(G4bool quasiElastic)
theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
theModel = new G4TheoFSGenerator("FTFP");
theStringModel = new G4FTFModel;
theStringDecay = new G4ExcitedStringDecay(theLund = new G4LundStringFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
G4FTFModel* theStringModel = new G4FTFModel();
theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
theCascade = new G4GeneratorPrecompoundInterface();
theModel->SetTransport(theCascade);
G4GeneratorPrecompoundInterface* theCascade =
new G4GeneratorPrecompoundInterface();
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
if (quasiElastic) {
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
theModel->SetTransport(theCascade);
theModel->SetMinEnergy(theMin);
theModel->SetMaxEnergy(theMax);
}
@@ -77,10 +73,6 @@ G4FTFPNeutronBuilder(G4bool quasiElastic)
G4FTFPNeutronBuilder::
~G4FTFPNeutronBuilder()
{
delete theStringDecay;
delete theStringModel;
if ( theQuasiElastic ) delete theQuasiElastic;
delete theLund;
}
void G4FTFPNeutronBuilder::
@@ -89,7 +81,6 @@ Build(G4NeutronInelasticProcess * aP)
theModel->SetMinEnergy(theMin);
theModel->SetMaxEnergy(theMax);
aP->RegisterMe(theModel);
aP->AddDataSet(new G4BGGNucleonInelasticXS(G4Neutron::Neutron()));
aP->AddDataSet(new G4NeutronInelasticXS());
}
@@ -54,19 +54,16 @@ G4FTFPPiKBuilder(G4bool quasiElastic)
theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
theModel = new G4TheoFSGenerator("FTFP");
theStringModel = new G4FTFModel;
theStringDecay = new G4ExcitedStringDecay(theLund = new G4LundStringFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
G4FTFModel* theStringModel = new G4FTFModel();
theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
theCascade = new G4GeneratorPrecompoundInterface();
G4GeneratorPrecompoundInterface* theCascade =
new G4GeneratorPrecompoundInterface();
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
if (quasiElastic) {
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
theModel->SetTransport(theCascade);
theModel->SetMinEnergy(theMin);
@@ -75,10 +72,6 @@ G4FTFPPiKBuilder(G4bool quasiElastic)
G4FTFPPiKBuilder::~G4FTFPPiKBuilder()
{
delete theStringDecay;
delete theStringModel;
if ( theQuasiElastic ) delete theQuasiElastic;
delete theLund;
}
void G4FTFPPiKBuilder::
@@ -47,19 +47,16 @@ G4FTFPPionBuilder(G4bool quasiElastic)
theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
theModel = new G4TheoFSGenerator("FTFP");
theStringModel = new G4FTFModel;
theStringDecay = new G4ExcitedStringDecay(theLund = new G4LundStringFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
G4FTFModel* theStringModel = new G4FTFModel();
theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
theCascade = new G4GeneratorPrecompoundInterface();
G4GeneratorPrecompoundInterface* theCascade =
new G4GeneratorPrecompoundInterface();
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
if (quasiElastic) {
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
theModel->SetTransport(theCascade);
theModel->SetMinEnergy(theMin);
@@ -68,10 +65,6 @@ G4FTFPPionBuilder(G4bool quasiElastic)
G4FTFPPionBuilder::~G4FTFPPionBuilder()
{
delete theStringDecay;
delete theStringModel;
if ( theQuasiElastic ) delete theQuasiElastic;
delete theLund;
}
void G4FTFPPionBuilder::
@@ -53,19 +53,16 @@ G4FTFPProtonBuilder(G4bool quasiElastic)
theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
theModel = new G4TheoFSGenerator("FTFP");
theStringModel = new G4FTFModel;
theStringDecay = new G4ExcitedStringDecay(theLund = new G4LundStringFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
G4FTFModel* theStringModel = new G4FTFModel();
theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
theCascade = new G4GeneratorPrecompoundInterface();
G4GeneratorPrecompoundInterface* theCascade =
new G4GeneratorPrecompoundInterface();
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
if (quasiElastic) {
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
theModel->SetTransport(theCascade);
theModel->SetMinEnergy(theMin);
@@ -85,9 +82,5 @@ Build(G4ProtonInelasticProcess * aP)
G4FTFPProtonBuilder::
~G4FTFPProtonBuilder()
{
delete theStringDecay;
delete theStringModel;
if ( theQuasiElastic ) delete theQuasiElastic;
delete theLund;
}
@@ -0,0 +1,187 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// Geant4 class G4HadronicBuilder
//
// Author V.Ivanchenko 14.05.2020
//
#include "G4HadronicBuilder.hh"
#include "G4HadParticles.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4PhysicsListHelper.hh"
#include "G4HadronicParameters.hh"
#include "G4TheoFSGenerator.hh"
#include "G4FTFModel.hh"
#include "G4ExcitedStringDecay.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4QGSModel.hh"
#include "G4QGSParticipants.hh"
#include "G4QGSMFragmentation.hh"
#include "G4QuasiElasticChannel.hh"
#include "G4CascadeInterface.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4CrossSectionElastic.hh"
#include "G4HadronElastic.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4HadronElasticProcess.hh"
#include "G4HadronInelasticProcess.hh"
void G4HadronicBuilder::BuildFTFP_BERT(const std::vector<G4int>& partList) {
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
auto theModel = new G4TheoFSGenerator("FTFP");
auto theStringModel = new G4FTFModel();
theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
theModel->SetHighEnergyGenerator( theStringModel );
theModel->SetTransport( new G4GeneratorPrecompoundInterface() );
theModel->SetMinEnergy( param->GetMinEnergyTransitionFTF_Cascade() );
theModel->SetMaxEnergy( param->GetMaxEnergy() );
auto theCascade = new G4CascadeInterface();
theCascade->SetMaxEnergy( param->GetMaxEnergyTransitionFTF_Cascade() );
auto xsStore = G4CrossSectionDataSetRegistry::Instance();
auto xsComponent = xsStore->GetComponentCrossSection("Glauber-Gribov");
if(xsComponent == nullptr) xsComponent = new G4ComponentGGHadronNucleusXsc();
auto xsinel = new G4CrossSectionInelastic(xsComponent);
auto xsel = new G4CrossSectionElastic(xsComponent);
auto elModel = new G4HadronElastic();
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for( auto & pdg : partList ) {
auto part = table->FindParticle( pdg );
if ( part == nullptr ) { continue; }
auto hade = new G4HadronElasticProcess();
hade->AddDataSet( xsel );
hade->RegisterMe( elModel );
ph->RegisterProcess(hade, part);
auto hadi = new G4HadronInelasticProcess( part->GetParticleName()+"Inelastic", part );
hadi->AddDataSet( xsinel );
hadi->RegisterMe( theModel );
hadi->RegisterMe( theCascade );
ph->RegisterProcess(hadi, part);
}
}
void G4HadronicBuilder::BuildQGSP_FTFP_BERT(const std::vector<G4int>& partList, G4bool quasiElastic) {
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
auto theTransport = new G4GeneratorPrecompoundInterface();
auto theHEModel = new G4TheoFSGenerator("QGSP");
G4QGSModel< G4QGSParticipants >* theQGSModel = new G4QGSModel< G4QGSParticipants >;
theQGSModel->SetFragmentationModel( new G4ExcitedStringDecay( new G4QGSMFragmentation() ) );
theHEModel->SetTransport( theTransport );
theHEModel->SetHighEnergyGenerator( theQGSModel );
if (quasiElastic) {
theHEModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
theHEModel->SetMinEnergy( param->GetMinEnergyTransitionQGS_FTF() );
theHEModel->SetMaxEnergy( param->GetMaxEnergy() );
auto theLEModel = new G4TheoFSGenerator("FTFP");
auto theFTFModel = new G4FTFModel();
theFTFModel->SetFragmentationModel(new G4ExcitedStringDecay());
theLEModel->SetHighEnergyGenerator( theFTFModel );
theLEModel->SetTransport( theTransport );
theLEModel->SetMinEnergy( param->GetMinEnergyTransitionFTF_Cascade() );
theLEModel->SetMaxEnergy( param->GetMaxEnergyTransitionQGS_FTF() );
auto theCascade = new G4CascadeInterface();
theCascade->SetMaxEnergy( param->GetMaxEnergyTransitionFTF_Cascade() );
auto xsStore = G4CrossSectionDataSetRegistry::Instance();
auto xsComponent = xsStore->GetComponentCrossSection("Glauber-Gribov");
if(xsComponent == nullptr) xsComponent = new G4ComponentGGHadronNucleusXsc();
auto xsinel = new G4CrossSectionInelastic(xsComponent);
auto xsel = new G4CrossSectionElastic(xsComponent);
auto elModel = new G4HadronElastic();
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for( auto & pdg : partList ) {
auto part = table->FindParticle( pdg );
if ( part == nullptr ) { continue; }
auto hade = new G4HadronElasticProcess();
hade->AddDataSet( xsel );
hade->RegisterMe( elModel );
ph->RegisterProcess(hade, part);
auto hadi = new G4HadronInelasticProcess( part->GetParticleName()+"Inelastic", part );
hadi->AddDataSet( xsinel );
hadi->RegisterMe( theHEModel );
hadi->RegisterMe( theLEModel );
hadi->RegisterMe( theCascade );
ph->RegisterProcess(hadi, part);
}
}
void G4HadronicBuilder::BuildHyperonsFTFP_BERT() {
BuildFTFP_BERT(G4HadParticles::GetHyperons());
}
void G4HadronicBuilder::BuildHyperonsQGSP_FTFP_BERT(G4bool quasiElastic) {
BuildQGSP_FTFP_BERT(G4HadParticles::GetHyperons(), quasiElastic);
}
void G4HadronicBuilder::BuildKaonsFTFP_BERT() {
BuildFTFP_BERT(G4HadParticles::GetKaons());
}
void G4HadronicBuilder::BuildKaonsQGSP_FTFP_BERT(G4bool quasiElastic) {
BuildQGSP_FTFP_BERT(G4HadParticles::GetKaons(), quasiElastic);
}
void G4HadronicBuilder::BuildBCHadronsFTFP_BERT() {
if( G4HadronicParameters::Instance()->EnableBCParticles() ) {
BuildFTFP_BERT(G4HadParticles::GetBCHadrons());
}
}
void G4HadronicBuilder::BuildBCHadronsQGSP_FTFP_BERT(G4bool quasiElastic) {
if( G4HadronicParameters::Instance()->EnableBCParticles() ) {
BuildQGSP_FTFP_BERT(G4HadParticles::GetBCHadrons(), quasiElastic);
}
}
@@ -43,7 +43,6 @@
void G4He3Builder::Build()
{
wasActivated = true;
std::vector<G4VHe3Builder *>::iterator i;
for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
{
@@ -53,8 +52,7 @@
theProcMan->AddDiscreteProcess(theHe3Inelastic);
}
G4He3Builder::
G4He3Builder(): wasActivated(false)
G4He3Builder::G4He3Builder()
{
theHe3Inelastic=new G4He3InelasticProcess;
}
@@ -0,0 +1,115 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//---------------------------------------------------------------------------
// ClassName: G4HyperonBuilder
// Author: Alberto Ribon
// Date: May 2020
// Modified:
//---------------------------------------------------------------------------
#include "G4HyperonBuilder.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
#include "G4LambdaInelasticProcess.hh"
#include "G4AntiLambdaInelasticProcess.hh"
#include "G4SigmaMinusInelasticProcess.hh"
#include "G4AntiSigmaMinusInelasticProcess.hh"
#include "G4SigmaPlusInelasticProcess.hh"
#include "G4AntiSigmaPlusInelasticProcess.hh"
#include "G4XiMinusInelasticProcess.hh"
#include "G4AntiXiMinusInelasticProcess.hh"
#include "G4XiZeroInelasticProcess.hh"
#include "G4AntiXiZeroInelasticProcess.hh"
#include "G4OmegaMinusInelasticProcess.hh"
#include "G4AntiOmegaMinusInelasticProcess.hh"
G4HyperonBuilder::G4HyperonBuilder() {
theLambdaInelastic = new G4LambdaInelasticProcess;
theAntiLambdaInelastic = new G4AntiLambdaInelasticProcess;
theSigmaMinusInelastic = new G4SigmaMinusInelasticProcess;
theAntiSigmaMinusInelastic = new G4AntiSigmaMinusInelasticProcess;
theSigmaPlusInelastic = new G4SigmaPlusInelasticProcess;
theAntiSigmaPlusInelastic = new G4AntiSigmaPlusInelasticProcess;
theXiMinusInelastic = new G4XiMinusInelasticProcess;
theAntiXiMinusInelastic = new G4AntiXiMinusInelasticProcess;
theXiZeroInelastic = new G4XiZeroInelasticProcess;
theAntiXiZeroInelastic = new G4AntiXiZeroInelasticProcess;
theOmegaMinusInelastic = new G4OmegaMinusInelasticProcess;
theAntiOmegaMinusInelastic = new G4AntiOmegaMinusInelasticProcess;
}
void G4HyperonBuilder::RegisterMe( G4PhysicsBuilderInterface* aB ) {
auto bld = dynamic_cast< G4VHyperonBuilder* >( aB );
if ( bld != nullptr ) theModelCollections.push_back( bld );
else G4PhysicsBuilderInterface::RegisterMe( aB );
}
void G4HyperonBuilder::Build() {
for ( std::vector< G4VHyperonBuilder* >::iterator i = theModelCollections.begin();
i != theModelCollections.end(); ++i ) {
(*i)->Build( theLambdaInelastic );
(*i)->Build( theAntiLambdaInelastic );
(*i)->Build( theSigmaMinusInelastic );
(*i)->Build( theAntiSigmaMinusInelastic );
(*i)->Build( theSigmaPlusInelastic );
(*i)->Build( theAntiSigmaPlusInelastic );
(*i)->Build( theXiMinusInelastic );
(*i)->Build( theAntiXiMinusInelastic );
(*i)->Build( theXiZeroInelastic );
(*i)->Build( theAntiXiZeroInelastic );
(*i)->Build( theOmegaMinusInelastic );
(*i)->Build( theAntiOmegaMinusInelastic );
}
G4ProcessManager* aProcMan = nullptr;
aProcMan = G4Lambda::Lambda()->GetProcessManager();
aProcMan->AddDiscreteProcess( theLambdaInelastic );
aProcMan = G4AntiLambda::AntiLambda()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiLambdaInelastic );
aProcMan = G4SigmaMinus::SigmaMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theSigmaMinusInelastic );
aProcMan = G4AntiSigmaMinus::AntiSigmaMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiSigmaMinusInelastic );
aProcMan = G4SigmaPlus::SigmaPlus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theSigmaPlusInelastic );
aProcMan = G4AntiSigmaPlus::AntiSigmaPlus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiSigmaPlusInelastic );
aProcMan = G4XiMinus::XiMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theXiMinusInelastic );
aProcMan = G4AntiXiMinus::AntiXiMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiXiMinusInelastic );
aProcMan = G4XiZero::XiZero()->GetProcessManager();
aProcMan->AddDiscreteProcess( theXiZeroInelastic );
aProcMan = G4AntiXiZero::AntiXiZero()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiXiZeroInelastic );
aProcMan = G4OmegaMinus::OmegaMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theOmegaMinusInelastic );
aProcMan = G4AntiOmegaMinus::AntiOmegaMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess( theAntiOmegaMinusInelastic );
}
@@ -33,176 +33,157 @@
//
// Modified:
//----------------------------------------------------------------------------
//
#include "G4HyperonFTFPBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
#include "G4LambdaInelasticProcess.hh"
#include "G4AntiLambdaInelasticProcess.hh"
#include "G4SigmaMinusInelasticProcess.hh"
#include "G4AntiSigmaMinusInelasticProcess.hh"
#include "G4SigmaPlusInelasticProcess.hh"
#include "G4AntiSigmaPlusInelasticProcess.hh"
#include "G4XiMinusInelasticProcess.hh"
#include "G4AntiXiMinusInelasticProcess.hh"
#include "G4XiZeroInelasticProcess.hh"
#include "G4AntiXiZeroInelasticProcess.hh"
#include "G4OmegaMinusInelasticProcess.hh"
#include "G4AntiOmegaMinusInelasticProcess.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4HadronicParameters.hh"
G4HyperonFTFPBuilder::G4HyperonFTFPBuilder():
theLambdaInelastic(0),
theAntiLambdaInelastic(0),
theSigmaMinusInelastic(0),
theAntiSigmaMinusInelastic(0),
theSigmaPlusInelastic(0),
theAntiSigmaPlusInelastic(0),
theXiZeroInelastic(0),
theAntiXiZeroInelastic(0),
theXiMinusInelastic(0),
theAntiXiMinusInelastic(0),
theOmegaMinusInelastic(0),
theAntiOmegaMinusInelastic(0),
wasActivated(false)
{
#include "G4TheoFSGenerator.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4FTFModel.hh"
#include "G4LundStringFragmentation.hh"
#include "G4ExcitedStringDecay.hh"
#include "G4CascadeInterface.hh"
#include "G4QuasiElasticChannel.hh"
G4HyperonFTFPBuilder::G4HyperonFTFPBuilder( G4bool quasiElastic ) {
// The following energy limits refer to FTFP only and only for hyperons
// (for antihyperons, the min energy is assumed to be 0.0; the max is the same as for hyperons)
theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionFTF_Cascade();
theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
// Hyperon : Bertini at low energies, then FTFP
HyperonFTFP = new G4TheoFSGenerator("FTFP");
HyperonFTFP->SetMinEnergy( G4HadronicParameters::Instance()->GetMinEnergyTransitionFTF_Cascade() );
HyperonFTFP->SetMaxEnergy( G4HadronicParameters::Instance()->GetMaxEnergy() );
theStringModel = new G4FTFModel;
theStringDecay = new G4ExcitedStringDecay(theLund = new G4LundStringFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
theCascade = new G4GeneratorPrecompoundInterface;
HyperonFTFP->SetTransport(theCascade);
HyperonFTFP->SetHighEnergyGenerator(theStringModel);
theHyperonFTFP = new G4TheoFSGenerator( "FTFP" );
theHyperonFTFP->SetMinEnergy( theMin );
theHyperonFTFP->SetMaxEnergy( theMax );
G4FTFModel* theStringModel = new G4FTFModel;
theStringModel->SetFragmentationModel( new G4ExcitedStringDecay );
G4GeneratorPrecompoundInterface* theCascade = new G4GeneratorPrecompoundInterface;
theHyperonFTFP->SetTransport( theCascade );
theHyperonFTFP->SetHighEnergyGenerator( theStringModel );
if ( quasiElastic ) theHyperonFTFP->SetQuasiElasticChannel( new G4QuasiElasticChannel );
theBertini = new G4CascadeInterface;
theBertini->SetMinEnergy( 0.0 );
theBertini->SetMaxEnergy( G4HadronicParameters::Instance()->GetMaxEnergyTransitionFTF_Cascade() );
// AntiHyperons: Use FTFP for full energy range, starting at 0.
AntiHyperonFTFP = new G4TheoFSGenerator("FTFP");
AntiHyperonFTFP->SetMinEnergy( 0.0 );
AntiHyperonFTFP->SetMaxEnergy( G4HadronicParameters::Instance()->GetMaxEnergy() );
AntiHyperonFTFP->SetTransport(theCascade);
AntiHyperonFTFP->SetHighEnergyGenerator(theStringModel);
// AntiHyperons: Use FTFP for full energy range, starting at 0.
theAntiHyperonFTFP = new G4TheoFSGenerator( "FTFP" );
theAntiHyperonFTFP->SetMinEnergy( 0.0 );
theAntiHyperonFTFP->SetMaxEnergy( theMax );
theAntiHyperonFTFP->SetTransport( theCascade );
theAntiHyperonFTFP->SetHighEnergyGenerator( theStringModel );
if ( quasiElastic ) theAntiHyperonFTFP->SetQuasiElasticChannel( new G4QuasiElasticChannel );
// use Glauber-Gribov cross sections
theInelasticCrossSection = new G4CrossSectionInelastic( new G4ComponentGGHadronNucleusXsc );
}
G4HyperonFTFPBuilder::~G4HyperonFTFPBuilder()
{
delete theStringDecay;
delete theLund;
G4HyperonFTFPBuilder::~G4HyperonFTFPBuilder() {}
void G4HyperonFTFPBuilder::Build( G4LambdaInelasticProcess* aP ) {
theHyperonFTFP->SetMinEnergy( theMin );
theHyperonFTFP->SetMaxEnergy( theMax );
aP->RegisterMe( theBertini );
aP->RegisterMe( theHyperonFTFP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonFTFPBuilder::Build()
{
G4ProcessManager * aProcMan = 0;
wasActivated = true;
void G4HyperonFTFPBuilder::Build( G4AntiLambdaInelasticProcess* aP ) {
theAntiHyperonFTFP->SetMaxEnergy( theMax );
aP->RegisterMe( theAntiHyperonFTFP );
aP->AddDataSet( theInelasticCrossSection );
}
// Lambda
theLambdaInelastic = new G4LambdaInelasticProcess();
theLambdaInelastic->RegisterMe(theBertini);
theLambdaInelastic->RegisterMe(HyperonFTFP);
theLambdaInelastic->AddDataSet(theInelasticCrossSection);
aProcMan = G4Lambda::Lambda()->GetProcessManager();
aProcMan->AddDiscreteProcess(theLambdaInelastic);
// AntiLambda
theAntiLambdaInelastic = new G4AntiLambdaInelasticProcess();
theAntiLambdaInelastic->RegisterMe(AntiHyperonFTFP);
theAntiLambdaInelastic->AddDataSet(theInelasticCrossSection);
aProcMan = G4AntiLambda::AntiLambda()->GetProcessManager();
aProcMan->AddDiscreteProcess(theAntiLambdaInelastic);
// SigmaMinus
theSigmaMinusInelastic = new G4SigmaMinusInelasticProcess();
theSigmaMinusInelastic->RegisterMe(theBertini);
theSigmaMinusInelastic->RegisterMe(HyperonFTFP);
theSigmaMinusInelastic->AddDataSet(theInelasticCrossSection);
aProcMan = G4SigmaMinus::SigmaMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess(theSigmaMinusInelastic);
// anti-SigmaMinus
theAntiSigmaMinusInelastic = new G4AntiSigmaMinusInelasticProcess();
theAntiSigmaMinusInelastic->RegisterMe(AntiHyperonFTFP);
theAntiSigmaMinusInelastic->AddDataSet(theInelasticCrossSection);
aProcMan = G4AntiSigmaMinus::AntiSigmaMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess(theAntiSigmaMinusInelastic);
// SigmaPlus
theSigmaPlusInelastic = new G4SigmaPlusInelasticProcess();
theSigmaPlusInelastic->RegisterMe(theBertini);
theSigmaPlusInelastic->RegisterMe(HyperonFTFP);
theSigmaPlusInelastic->AddDataSet(theInelasticCrossSection);
aProcMan = G4SigmaPlus::SigmaPlus()->GetProcessManager();
aProcMan->AddDiscreteProcess(theSigmaPlusInelastic);
// anti-SigmaPlus
theAntiSigmaPlusInelastic = new G4AntiSigmaPlusInelasticProcess();
theAntiSigmaPlusInelastic->RegisterMe(AntiHyperonFTFP);
theAntiSigmaPlusInelastic->AddDataSet(theInelasticCrossSection);
aProcMan = G4AntiSigmaPlus::AntiSigmaPlus()->GetProcessManager();
aProcMan->AddDiscreteProcess(theAntiSigmaPlusInelastic);
// XiMinus
theXiMinusInelastic = new G4XiMinusInelasticProcess();
theXiMinusInelastic->RegisterMe(theBertini);
theXiMinusInelastic->RegisterMe(HyperonFTFP);
theXiMinusInelastic->AddDataSet(theInelasticCrossSection);
aProcMan = G4XiMinus::XiMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess(theXiMinusInelastic);
// anti-XiMinus
theAntiXiMinusInelastic = new G4AntiXiMinusInelasticProcess();
theAntiXiMinusInelastic->RegisterMe(AntiHyperonFTFP);
theAntiXiMinusInelastic->AddDataSet(theInelasticCrossSection);
aProcMan = G4AntiXiMinus::AntiXiMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess(theAntiXiMinusInelastic);
// XiZero
theXiZeroInelastic = new G4XiZeroInelasticProcess();
theXiZeroInelastic->RegisterMe(theBertini);
theXiZeroInelastic->RegisterMe(HyperonFTFP);
theXiZeroInelastic->AddDataSet(theInelasticCrossSection);
aProcMan = G4XiZero::XiZero()->GetProcessManager();
aProcMan->AddDiscreteProcess(theXiZeroInelastic);
// anti-XiZero
theAntiXiZeroInelastic = new G4AntiXiZeroInelasticProcess();
theAntiXiZeroInelastic->RegisterMe(AntiHyperonFTFP);
theAntiXiZeroInelastic->AddDataSet(theInelasticCrossSection);
aProcMan = G4AntiXiZero::AntiXiZero()->GetProcessManager();
aProcMan->AddDiscreteProcess(theAntiXiZeroInelastic);
// OmegaMinus
theOmegaMinusInelastic = new G4OmegaMinusInelasticProcess();
theOmegaMinusInelastic->RegisterMe(theBertini);
theOmegaMinusInelastic->RegisterMe(HyperonFTFP);
theOmegaMinusInelastic->AddDataSet(theInelasticCrossSection);
aProcMan = G4OmegaMinus::OmegaMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess(theOmegaMinusInelastic);
// anti-OmegaMinus
theAntiOmegaMinusInelastic = new G4AntiOmegaMinusInelasticProcess();
theAntiOmegaMinusInelastic->RegisterMe(AntiHyperonFTFP);
theAntiOmegaMinusInelastic->AddDataSet(theInelasticCrossSection);
aProcMan = G4AntiOmegaMinus::AntiOmegaMinus()->GetProcessManager();
aProcMan->AddDiscreteProcess(theAntiOmegaMinusInelastic);
void G4HyperonFTFPBuilder::Build( G4SigmaMinusInelasticProcess* aP ) {
theHyperonFTFP->SetMinEnergy( theMin );
theHyperonFTFP->SetMaxEnergy( theMax );
aP->RegisterMe( theBertini );
aP->RegisterMe( theHyperonFTFP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonFTFPBuilder::Build( G4AntiSigmaMinusInelasticProcess* aP ) {
theAntiHyperonFTFP->SetMaxEnergy( theMax );
aP->RegisterMe( theAntiHyperonFTFP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonFTFPBuilder::Build( G4SigmaPlusInelasticProcess* aP ) {
theHyperonFTFP->SetMinEnergy( theMin );
theHyperonFTFP->SetMaxEnergy( theMax );
aP->RegisterMe( theBertini );
aP->RegisterMe( theHyperonFTFP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonFTFPBuilder::Build( G4AntiSigmaPlusInelasticProcess* aP ) {
theAntiHyperonFTFP->SetMaxEnergy( theMax );
aP->RegisterMe( theAntiHyperonFTFP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonFTFPBuilder::Build( G4XiMinusInelasticProcess* aP ) {
theHyperonFTFP->SetMinEnergy( theMin );
theHyperonFTFP->SetMaxEnergy( theMax );
aP->RegisterMe( theBertini );
aP->RegisterMe( theHyperonFTFP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonFTFPBuilder::Build( G4AntiXiMinusInelasticProcess* aP ) {
theAntiHyperonFTFP->SetMaxEnergy( theMax );
aP->RegisterMe( theAntiHyperonFTFP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonFTFPBuilder::Build( G4XiZeroInelasticProcess* aP ) {
theHyperonFTFP->SetMinEnergy( theMin );
theHyperonFTFP->SetMaxEnergy( theMax );
aP->RegisterMe( theBertini );
aP->RegisterMe( theHyperonFTFP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonFTFPBuilder::Build( G4AntiXiZeroInelasticProcess* aP ) {
theAntiHyperonFTFP->SetMaxEnergy( theMax );
aP->RegisterMe( theAntiHyperonFTFP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonFTFPBuilder::Build( G4OmegaMinusInelasticProcess* aP ) {
theHyperonFTFP->SetMinEnergy( theMin );
theHyperonFTFP->SetMaxEnergy( theMax );
aP->RegisterMe( theBertini );
aP->RegisterMe( theHyperonFTFP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonFTFPBuilder::Build( G4AntiOmegaMinusInelasticProcess* aP ) {
theAntiHyperonFTFP->SetMaxEnergy( theMax );
aP->RegisterMe( theAntiHyperonFTFP );
aP->AddDataSet( theInelasticCrossSection );
}
@@ -0,0 +1,170 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//---------------------------------------------------------------------------
// ClassName: G4HyperonQGSPBuilder
// Author: Alberto Ribon
// Date: May 2020
// Modified:
//---------------------------------------------------------------------------
#include "G4HyperonQGSPBuilder.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
#include "G4LambdaInelasticProcess.hh"
#include "G4AntiLambdaInelasticProcess.hh"
#include "G4SigmaMinusInelasticProcess.hh"
#include "G4AntiSigmaMinusInelasticProcess.hh"
#include "G4SigmaPlusInelasticProcess.hh"
#include "G4AntiSigmaPlusInelasticProcess.hh"
#include "G4XiMinusInelasticProcess.hh"
#include "G4AntiXiMinusInelasticProcess.hh"
#include "G4XiZeroInelasticProcess.hh"
#include "G4AntiXiZeroInelasticProcess.hh"
#include "G4OmegaMinusInelasticProcess.hh"
#include "G4AntiOmegaMinusInelasticProcess.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4HadronicParameters.hh"
#include "G4TheoFSGenerator.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4QGSModel.hh"
#include "G4QGSParticipants.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"
#include "G4QuasiElasticChannel.hh"
G4HyperonQGSPBuilder::G4HyperonQGSPBuilder( G4bool quasiElastic ) {
theHyperonQGSP = new G4TheoFSGenerator( "QGSP" );
G4QGSModel< G4QGSParticipants >* theStringModel = new G4QGSModel< G4QGSParticipants >;
G4ExcitedStringDecay* theStringDecay = new G4ExcitedStringDecay( new G4QGSMFragmentation );
theStringModel->SetFragmentationModel( theStringDecay );
G4GeneratorPrecompoundInterface* theCascade = new G4GeneratorPrecompoundInterface;
theHyperonQGSP->SetTransport( theCascade );
theHyperonQGSP->SetHighEnergyGenerator( theStringModel );
if ( quasiElastic ) theHyperonQGSP->SetQuasiElasticChannel( new G4QuasiElasticChannel );
// It is recommended to use QGSP above >~ 12 GeV .
theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionQGS_FTF();
theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
theHyperonQGSP->SetMinEnergy( theMin );
theHyperonQGSP->SetMaxEnergy( theMax );
theInelasticCrossSection = new G4CrossSectionInelastic( new G4ComponentGGHadronNucleusXsc );
}
G4HyperonQGSPBuilder::~G4HyperonQGSPBuilder() {}
void G4HyperonQGSPBuilder::Build( G4LambdaInelasticProcess* aP ) {
theHyperonQGSP->SetMinEnergy( theMin );
theHyperonQGSP->SetMaxEnergy( theMax );
aP->RegisterMe( theHyperonQGSP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonQGSPBuilder::Build( G4AntiLambdaInelasticProcess* aP ) {
theHyperonQGSP->SetMinEnergy( theMin );
theHyperonQGSP->SetMaxEnergy( theMax );
aP->RegisterMe( theHyperonQGSP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonQGSPBuilder::Build( G4SigmaMinusInelasticProcess* aP ) {
theHyperonQGSP->SetMinEnergy( theMin );
theHyperonQGSP->SetMaxEnergy( theMax );
aP->RegisterMe( theHyperonQGSP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonQGSPBuilder::Build( G4AntiSigmaMinusInelasticProcess* aP ) {
theHyperonQGSP->SetMinEnergy( theMin );
theHyperonQGSP->SetMaxEnergy( theMax );
aP->RegisterMe( theHyperonQGSP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonQGSPBuilder::Build( G4SigmaPlusInelasticProcess* aP ) {
theHyperonQGSP->SetMinEnergy( theMin );
theHyperonQGSP->SetMaxEnergy( theMax );
aP->RegisterMe( theHyperonQGSP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonQGSPBuilder::Build( G4AntiSigmaPlusInelasticProcess* aP ) {
theHyperonQGSP->SetMinEnergy( theMin );
theHyperonQGSP->SetMaxEnergy( theMax );
aP->RegisterMe( theHyperonQGSP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonQGSPBuilder::Build( G4XiMinusInelasticProcess* aP ) {
theHyperonQGSP->SetMinEnergy( theMin );
theHyperonQGSP->SetMaxEnergy( theMax );
aP->RegisterMe( theHyperonQGSP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonQGSPBuilder::Build( G4AntiXiMinusInelasticProcess* aP ) {
theHyperonQGSP->SetMinEnergy( theMin );
theHyperonQGSP->SetMaxEnergy( theMax );
aP->RegisterMe( theHyperonQGSP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonQGSPBuilder::Build( G4XiZeroInelasticProcess* aP ) {
theHyperonQGSP->SetMinEnergy( theMin );
theHyperonQGSP->SetMaxEnergy( theMax );
aP->RegisterMe( theHyperonQGSP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonQGSPBuilder::Build( G4AntiXiZeroInelasticProcess* aP ) {
theHyperonQGSP->SetMinEnergy( theMin );
theHyperonQGSP->SetMaxEnergy( theMax );
aP->RegisterMe( theHyperonQGSP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonQGSPBuilder::Build( G4OmegaMinusInelasticProcess* aP ) {
theHyperonQGSP->SetMinEnergy( theMin );
theHyperonQGSP->SetMaxEnergy( theMax );
aP->RegisterMe( theHyperonQGSP );
aP->AddDataSet( theInelasticCrossSection );
}
void G4HyperonQGSPBuilder::Build( G4AntiOmegaMinusInelasticProcess* aP ) {
theHyperonQGSP->SetMinEnergy( theMin );
theHyperonQGSP->SetMaxEnergy( theMax );
aP->RegisterMe( theHyperonQGSP );
aP->AddDataSet( theInelasticCrossSection );
}
@@ -41,8 +41,7 @@
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
G4KaonBuilder::
G4KaonBuilder(): wasActivated(false)
G4KaonBuilder::G4KaonBuilder()
{
theKaonPlusInelastic=new G4KaonPlusInelasticProcess;
theKaonMinusInelastic=new G4KaonMinusInelasticProcess;
@@ -53,8 +52,6 @@ G4KaonBuilder(): wasActivated(false)
void G4KaonBuilder::
Build()
{
wasActivated = true;
std::vector<G4VKaonBuilder *>::iterator i;
for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
{
@@ -43,32 +43,31 @@
#include "G4ProcessManager.hh"
G4NeutronBuilder::
G4NeutronBuilder(G4bool fissionFlag): wasActivated(false), isFissionActivated(fissionFlag)
G4NeutronBuilder(G4bool fissionFlag)
{
theNeutronInelastic = new G4NeutronInelasticProcess;
theNeutronCapture = new G4HadronCaptureProcess;
if ( isFissionActivated ) {
if ( fissionFlag ) {
theNeutronFission = new G4HadronFissionProcess;
} else {
theNeutronFission = 0;
theNeutronFission = nullptr;
}
}
void G4NeutronBuilder::
Build()
{
wasActivated = true;
std::vector<G4VNeutronBuilder *>::iterator i;
for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
{
(*i)->Build(theNeutronInelastic);
(*i)->Build(theNeutronCapture);
if ( isFissionActivated ) (*i)->Build(theNeutronFission);
if ( theNeutronFission ) (*i)->Build(theNeutronFission);
}
G4ProcessManager * theProcMan = G4Neutron::Neutron()->GetProcessManager();
theProcMan->AddDiscreteProcess(theNeutronInelastic);
theProcMan->AddDiscreteProcess(theNeutronCapture);
if ( isFissionActivated ) theProcMan->AddDiscreteProcess(theNeutronFission);
if ( theNeutronFission ) theProcMan->AddDiscreteProcess(theNeutronFission);
}
void G4NeutronBuilder::RegisterMe(G4PhysicsBuilderInterface* aB) {
@@ -30,7 +30,7 @@
#include "G4ProcessManager.hh"
G4NeutronLENDBuilder::
G4NeutronLENDBuilder( G4String eva )
G4NeutronLENDBuilder(const G4String& eva )
{
theLENDElastic = 0;
theLENDElasticCrossSection = 0;
@@ -42,8 +42,7 @@
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
G4PiKBuilder::
G4PiKBuilder(): wasActivated(false)
G4PiKBuilder::G4PiKBuilder()
{
thePionPlusInelastic=new G4PionPlusInelasticProcess;
thePionMinusInelastic=new G4PionMinusInelasticProcess;
@@ -56,8 +55,6 @@ G4PiKBuilder(): wasActivated(false)
void G4PiKBuilder::
Build()
{
wasActivated = true;
std::vector<G4VPiKBuilder *>::iterator i;
for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
{
@@ -41,8 +41,7 @@
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
G4PionBuilder::
G4PionBuilder(): wasActivated(false)
G4PionBuilder::G4PionBuilder()
{
thePionPlusInelastic=new G4PionPlusInelasticProcess;
thePionMinusInelastic=new G4PionMinusInelasticProcess;
@@ -51,8 +50,6 @@ G4PionBuilder(): wasActivated(false)
void G4PionBuilder::
Build()
{
wasActivated = true;
std::vector<G4VPionBuilder *>::iterator i;
for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
{
@@ -45,7 +45,6 @@
void G4ProtonBuilder::Build()
{
wasActivated = true;
std::vector<G4VProtonBuilder *>::iterator i;
for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
{
@@ -55,8 +54,7 @@
theProcMan->AddDiscreteProcess(theProtonInelastic);
}
G4ProtonBuilder::
G4ProtonBuilder(): wasActivated(false)
G4ProtonBuilder::G4ProtonBuilder()
{
theProtonInelastic=new G4ProtonInelasticProcess;
}
@@ -35,7 +35,6 @@ G4ProtonPHPBuilder()
{
theMin = 0;
theMax=200.*MeV;
theParticlePHPModel = 0;
}
void G4ProtonPHPBuilder::
@@ -52,7 +51,8 @@ Build(G4ProtonInelasticProcess * aP)
theProtonHPInelasticData->SetMaxKinEnergy(theMax);
aP->AddDataSet(theProtonHPInelasticData);
theParticlePHPModel = new G4ParticleHPInelastic(G4Proton::Proton(),"ParticleHPInelastic");
G4ParticleHPInelastic* theParticlePHPModel =
new G4ParticleHPInelastic(G4Proton::Proton(),"ParticleHPInelastic");
theParticlePHPModel->SetMinEnergy(theMin);
theParticlePHPModel->SetMaxEnergy(theMax);
aP->RegisterMe(theParticlePHPModel);
@@ -46,28 +46,23 @@ G4QGSBinaryKaonBuilder(G4bool quasiElastic)
theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionQGS_FTF();
theModel = new G4TheoFSGenerator("QGSB");
theStringModel = new G4QGSModel< G4QGSParticipants >;
theStringDecay = new G4ExcitedStringDecay(new G4QGSMFragmentation);
G4QGSModel< G4QGSParticipants >* theStringModel =
new G4QGSModel< G4QGSParticipants >;
G4ExcitedStringDecay* theStringDecay =
new G4ExcitedStringDecay(new G4QGSMFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
theCascade = new G4BinaryCascade;
theModel->SetTransport(new G4BinaryCascade());
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
theModel->SetTransport(theCascade);
{
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
G4QGSBinaryKaonBuilder::
~G4QGSBinaryKaonBuilder()
{
if ( theQuasiElastic ) delete theQuasiElastic;
delete theStringDecay;
delete theStringModel;
}
void G4QGSBinaryKaonBuilder::
@@ -51,28 +51,23 @@ G4QGSBinaryNeutronBuilder(G4bool quasiElastic)
theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionQGS_FTF();
theModel = new G4TheoFSGenerator("QGSB");
theStringModel = new G4QGSModel< G4QGSParticipants >;
theStringDecay = new G4ExcitedStringDecay(new G4QGSMFragmentation);
G4QGSModel< G4QGSParticipants >* theStringModel =
new G4QGSModel< G4QGSParticipants >;
G4ExcitedStringDecay* theStringDecay =
new G4ExcitedStringDecay(new G4QGSMFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
theCascade = new G4BinaryCascade;
theModel->SetTransport(theCascade);
theModel->SetTransport(new G4BinaryCascade());
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
{
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
G4QGSBinaryNeutronBuilder::
~G4QGSBinaryNeutronBuilder()
{
delete theStringDecay;
delete theStringModel;
if ( theQuasiElastic ) delete theQuasiElastic;
}
void G4QGSBinaryNeutronBuilder::
@@ -51,28 +51,23 @@ G4QGSBinaryPiKBuilder(G4bool quasiElastic)
theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionQGS_FTF();
theModel = new G4TheoFSGenerator("QGSB");
theStringModel = new G4QGSModel< G4QGSParticipants >;
theStringDecay = new G4ExcitedStringDecay(new G4QGSMFragmentation);
G4QGSModel< G4QGSParticipants >* theStringModel =
new G4QGSModel< G4QGSParticipants >;
G4ExcitedStringDecay* theStringDecay =
new G4ExcitedStringDecay(new G4QGSMFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
theCascade = new G4BinaryCascade;
theModel->SetTransport(new G4BinaryCascade());
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
theModel->SetTransport(theCascade);
{
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
G4QGSBinaryPiKBuilder::
~G4QGSBinaryPiKBuilder()
{
if ( theQuasiElastic ) delete theQuasiElastic;
delete theStringDecay;
delete theStringModel;
}
void G4QGSBinaryPiKBuilder::
@@ -46,28 +46,23 @@ G4QGSBinaryPionBuilder(G4bool quasiElastic)
theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionQGS_FTF();
theModel = new G4TheoFSGenerator("QGSB");
theStringModel = new G4QGSModel< G4QGSParticipants >;
theStringDecay = new G4ExcitedStringDecay(new G4QGSMFragmentation);
G4QGSModel< G4QGSParticipants >* theStringModel =
new G4QGSModel< G4QGSParticipants >;
G4ExcitedStringDecay* theStringDecay =
new G4ExcitedStringDecay(new G4QGSMFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
theCascade = new G4BinaryCascade;
theModel->SetTransport(new G4BinaryCascade());
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
theModel->SetTransport(theCascade);
{
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
G4QGSBinaryPionBuilder::
~G4QGSBinaryPionBuilder()
{
if ( theQuasiElastic ) delete theQuasiElastic;
delete theStringDecay;
delete theStringModel;
}
void G4QGSBinaryPionBuilder::
@@ -87,4 +82,3 @@ Build(G4PionMinusInelasticProcess * aP)
aP->AddDataSet( new G4BGGPionInelasticXS( G4PionMinus::Definition() ) );
aP->RegisterMe(theModel);
}
@@ -43,33 +43,29 @@
#include "G4BGGNucleonInelasticXS.hh"
#include "G4HadronicParameters.hh"
G4QGSBinaryProtonBuilder::
G4QGSBinaryProtonBuilder(G4bool quasiElastic)
G4QGSBinaryProtonBuilder::G4QGSBinaryProtonBuilder(G4bool quasiElastic)
{
theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionQGS_FTF();
theModel = new G4TheoFSGenerator("QGSB");
theStringModel = new G4QGSModel< G4QGSParticipants >;
theStringDecay = new G4ExcitedStringDecay(new G4QGSMFragmentation);
G4QGSModel< G4QGSParticipants >* theStringModel =
new G4QGSModel< G4QGSParticipants >;
G4ExcitedStringDecay* theStringDecay =
new G4ExcitedStringDecay(new G4QGSMFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
theCascade = new G4BinaryCascade;
theModel->SetTransport(theCascade);
theModel->SetTransport(new G4BinaryCascade());
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
void G4QGSBinaryProtonBuilder::
Build(G4ProtonInelasticProcess * aP)
{
aP->AddDataSet(new G4BGGNucleonInelasticXS(G4Proton::Proton()));
aP->AddDataSet(new G4BGGNucleonInelasticXS(G4Proton::Proton()));
theModel->SetMinEnergy(theMin);
theModel->SetMaxEnergy( G4HadronicParameters::Instance()->GetMaxEnergy() );
aP->RegisterMe(theModel);
@@ -77,8 +73,4 @@ Build(G4ProtonInelasticProcess * aP)
G4QGSBinaryProtonBuilder::~G4QGSBinaryProtonBuilder()
{
if ( theQuasiElastic ) delete theQuasiElastic;
delete theStringDecay;
delete theStringModel;
}
@@ -45,53 +45,45 @@
#include "G4BinaryCascade.hh"
#include "G4PreCompoundModel.hh"
#include "G4ExcitationHandler.hh"
#include "G4HadronicParameters.hh"
#include "G4QGSModel.hh"
#include "G4QGSParticipants.hh"
G4QGSBuilder::G4QGSBuilder(const G4String& aName, G4PreCompoundModel* p,
G4QGSBuilder::G4QGSBuilder(const G4String& aName, G4PreCompoundModel*,
G4bool quasiel)
: G4VHadronModelBuilder(aName),
theQGStringModel(0), theQGStringDecay(0), theQuasiElastic(0),
thePreCompound(p),theQGSM(0),
quasielFlag(quasiel)
{}
G4QGSBuilder::~G4QGSBuilder()
{
delete theQuasiElastic;
delete theQGStringDecay;
delete theQGStringModel;
delete theQGSM;
}
{}
G4HadronicInteraction* G4QGSBuilder::BuildModel()
{
G4TheoFSGenerator* theQGSModel = new G4TheoFSGenerator(GetName());
theQGStringModel = new G4QGSModel< G4QGSParticipants >;
theQGSM = new G4QGSMFragmentation();
theQGStringDecay = new G4ExcitedStringDecay(theQGSM);
theQGStringModel->SetFragmentationModel(theQGStringDecay);
theQGSModel->SetHighEnergyGenerator(theQGStringModel);
G4double theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionQGS_FTF();
G4double theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
G4TheoFSGenerator* theModel = new G4TheoFSGenerator(GetName());
theModel->SetMinEnergy(theMin);
theModel->SetMaxEnergy(theMax);
if(quasielFlag) {
theQuasiElastic = new G4QuasiElasticChannel();
theQGSModel->SetQuasiElasticChannel(theQuasiElastic);
}
G4QGSModel< G4QGSParticipants >* theStringModel =
new G4QGSModel< G4QGSParticipants >;
G4ExcitedStringDecay* theStringDecay =
new G4ExcitedStringDecay(new G4QGSMFragmentation());
theStringModel->SetFragmentationModel(theStringDecay);
if(!thePreCompound) {
thePreCompound = new G4PreCompoundModel(new G4ExcitationHandler());
}
theModel->SetHighEnergyGenerator(theStringModel);
if (quasielFlag)
{
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
if(GetName() == "QGSB") {
G4BinaryCascade* bic = new G4BinaryCascade();
bic->SetDeExcitation(thePreCompound);
theQGSModel->SetTransport(bic);
theModel->SetTransport(new G4BinaryCascade());
} else {
G4GeneratorPrecompoundInterface* pint = new G4GeneratorPrecompoundInterface();
pint->SetDeExcitation(thePreCompound);
theQGSModel->SetTransport(pint);
theModel->SetTransport(new G4GeneratorPrecompoundInterface());
}
return theQGSModel;
return theModel;
}
@@ -0,0 +1,136 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//--------------------------------------------------------------------------
// ClassName: G4QGSPAntiBarionBuilder
// Author: Alberto Ribon
// Date: May 2020
//
// Modified:
//---------------------------------------------------------------------------
#include "G4QGSPAntiBarionBuilder.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
#include "G4ComponentAntiNuclNuclearXS.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4HadronicParameters.hh"
#include "G4TheoFSGenerator.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4QGSModel.hh"
#include "G4QGSParticipants.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"
#include "G4FTFModel.hh"
#include "G4LundStringFragmentation.hh"
#include "G4QuasiElasticChannel.hh"
G4QGSPAntiBarionBuilder::G4QGSPAntiBarionBuilder( G4bool quasiElastic ) {
G4CrossSectionDataSetRegistry* xsreg = G4CrossSectionDataSetRegistry::Instance();
G4VComponentCrossSection* theAntiNucleonXS = xsreg->GetComponentCrossSection( "AntiAGlauber" );
if ( ! theAntiNucleonXS ) theAntiNucleonXS = new G4ComponentAntiNuclNuclearXS;
theAntiNucleonData = new G4CrossSectionInelastic( theAntiNucleonXS );
theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionQGS_FTF(); // Safe choice
theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
// The main model, QGSP, applicable only for anti_proton and anti_neutron
theQGSmodel = new G4TheoFSGenerator( "QGSP" );
G4QGSModel< G4QGSParticipants >* theStringModel = new G4QGSModel< G4QGSParticipants >;
G4ExcitedStringDecay* theStringDecay = new G4ExcitedStringDecay( new G4QGSMFragmentation );
theStringModel->SetFragmentationModel( theStringDecay );
G4GeneratorPrecompoundInterface* theCascade = new G4GeneratorPrecompoundInterface();
theQGSmodel->SetTransport( theCascade );
theQGSmodel->SetHighEnergyGenerator( theStringModel );
if ( quasiElastic ) theQGSmodel->SetQuasiElasticChannel( new G4QuasiElasticChannel );
theQGSmodel->SetTransport(theCascade);
theQGSmodel->SetMinEnergy( theMin );
theQGSmodel->SetMaxEnergy( theMax );
// The auxilary model, FTFP, needed for anti_deuteron, anti_triton, anti_He3 and anti_alpha
theFTFmodel = new G4TheoFSGenerator( "FTFP" );
G4FTFModel* theStringModel2 = new G4FTFModel;
theStringModel2->SetFragmentationModel( new G4ExcitedStringDecay );
G4GeneratorPrecompoundInterface* theCascade2 = new G4GeneratorPrecompoundInterface;
theFTFmodel->SetHighEnergyGenerator( theStringModel2 );
G4double quasiElasticFTF = false; // Use built-in quasi-elastic (not add-on)
if ( quasiElasticFTF ) theFTFmodel->SetQuasiElasticChannel( new G4QuasiElasticChannel );
theFTFmodel->SetTransport( theCascade2 );
theFTFmodel->SetMinEnergy( theMin );
theFTFmodel->SetMaxEnergy( theMax );
}
void G4QGSPAntiBarionBuilder::Build( G4AntiProtonInelasticProcess* aP ) {
theQGSmodel->SetMinEnergy( theMin );
theQGSmodel->SetMaxEnergy( theMax );
aP->AddDataSet( theAntiNucleonData );
aP->RegisterMe( theQGSmodel );
}
void G4QGSPAntiBarionBuilder::Build( G4AntiNeutronInelasticProcess* aP ) {
theQGSmodel->SetMinEnergy( theMin );
theQGSmodel->SetMaxEnergy( theMax );
aP->AddDataSet( theAntiNucleonData );
aP->RegisterMe( theQGSmodel );
}
void G4QGSPAntiBarionBuilder::Build( G4AntiDeuteronInelasticProcess* aP ) {
// For the time being QGSP cannot handle anti_deuteron: use FTFP
theFTFmodel->SetMinEnergy( theMin );
theFTFmodel->SetMaxEnergy( theMax );
aP->AddDataSet( theAntiNucleonData );
aP->RegisterMe( theFTFmodel );
}
void G4QGSPAntiBarionBuilder::Build( G4AntiTritonInelasticProcess* aP ) {
// For the time being QGSP cannot handle anti_triton: use FTFP
theFTFmodel->SetMinEnergy( theMin );
theFTFmodel->SetMaxEnergy( theMax );
aP->AddDataSet( theAntiNucleonData );
aP->RegisterMe( theFTFmodel );
}
void G4QGSPAntiBarionBuilder::Build( G4AntiHe3InelasticProcess* aP ) {
// For the time being QGSP cannot handle anti_He3: use FTFP
theFTFmodel->SetMinEnergy( theMin );
theFTFmodel->SetMaxEnergy( theMax );
aP->AddDataSet( theAntiNucleonData );
aP->RegisterMe( theFTFmodel );
}
void G4QGSPAntiBarionBuilder::Build( G4AntiAlphaInelasticProcess* aP ) {
// For the time being QGSP cannot handle anti_alpha: use FTFP
theFTFmodel->SetMinEnergy( theMin );
theFTFmodel->SetMaxEnergy( theMax );
aP->AddDataSet( theAntiNucleonData );
aP->RegisterMe( theFTFmodel );
}
@@ -46,28 +46,26 @@ G4QGSPKaonBuilder(G4bool quasiElastic)
theMax = G4HadronicParameters::Instance()->GetMaxEnergy();
theModel = new G4TheoFSGenerator("QGSP");
theStringModel = new G4QGSModel< G4QGSParticipants >;
theStringDecay = new G4ExcitedStringDecay(new G4QGSMFragmentation);
G4QGSModel< G4QGSParticipants >* theStringModel =
new G4QGSModel< G4QGSParticipants >;
G4ExcitedStringDecay* theStringDecay =
new G4ExcitedStringDecay(new G4QGSMFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
theCascade = new G4GeneratorPrecompoundInterface;
G4GeneratorPrecompoundInterface* theCascade =
new G4GeneratorPrecompoundInterface();
theModel->SetTransport(theCascade);
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
theModel->SetTransport(theCascade);
{
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
G4QGSPKaonBuilder::
~G4QGSPKaonBuilder()
{
if ( theQuasiElastic ) delete theQuasiElastic;
delete theStringDecay;
delete theStringModel;
}
void G4QGSPKaonBuilder::
@@ -45,41 +45,34 @@
G4QGSPLundStrFragmProtonBuilder::
G4QGSPLundStrFragmProtonBuilder(G4bool quasiElastic)
{
theMin = 100*GeV;
theModel = new G4TheoFSGenerator("QGSP");
{
theMin = 100*GeV;
theModel = new G4TheoFSGenerator("QGSP");
theStringModel = new G4QGSModel< G4QGSParticipants >;
theStringDecay = new G4ExcitedStringDecay(theStrFragm = new G4LundStringFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
G4QGSModel< G4QGSParticipants >* theStringModel =
new G4QGSModel< G4QGSParticipants >;
theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
theCascade = new G4GeneratorPrecompoundInterface;
G4GeneratorPrecompoundInterface* theCascade =
new G4GeneratorPrecompoundInterface();
theModel->SetTransport(theCascade);
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
}
theModel->SetTransport(theCascade);
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
void G4QGSPLundStrFragmProtonBuilder::
Build(G4ProtonInelasticProcess * aP)
{
aP->AddDataSet(new G4BGGNucleonInelasticXS(G4Proton::Proton()));
theModel->SetMinEnergy(theMin);
theModel->SetMaxEnergy( G4HadronicParameters::Instance()->GetMaxEnergy() );
aP->RegisterMe(theModel);
}
{
aP->AddDataSet(new G4BGGNucleonInelasticXS(G4Proton::Proton()));
theModel->SetMinEnergy(theMin);
theModel->SetMaxEnergy( G4HadronicParameters::Instance()->GetMaxEnergy() );
aP->RegisterMe(theModel);
}
G4QGSPLundStrFragmProtonBuilder::~G4QGSPLundStrFragmProtonBuilder()
{
if ( theQuasiElastic ) delete theQuasiElastic;
delete theStringDecay;
delete theStringModel;
delete theStrFragm;
}
{}
@@ -53,27 +53,25 @@ G4QGSPNeutronBuilder(G4bool quasiElastic)
theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionQGS_FTF();
theModel = new G4TheoFSGenerator("QGSP");
theStringModel = new G4QGSModel< G4QGSParticipants >;
theStringDecay = new G4ExcitedStringDecay(theQGSM = new G4QGSMFragmentation);
G4QGSModel< G4QGSParticipants >* theStringModel =
new G4QGSModel< G4QGSParticipants >;
G4ExcitedStringDecay* theStringDecay =
new G4ExcitedStringDecay(new G4QGSMFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
theCascade = new G4GeneratorPrecompoundInterface();
G4GeneratorPrecompoundInterface* theCascade =
new G4GeneratorPrecompoundInterface();
theModel->SetTransport(theCascade);
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
{
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
G4QGSPNeutronBuilder::~G4QGSPNeutronBuilder()
{
delete theStringDecay;
if ( theQuasiElastic ) delete theQuasiElastic;
delete theQGSM;
}
void G4QGSPNeutronBuilder::
@@ -84,4 +82,3 @@ Build(G4NeutronInelasticProcess * aP)
aP->RegisterMe(theModel);
aP->AddDataSet(new G4BGGNucleonInelasticXS(G4Neutron::Neutron()));
}
@@ -52,30 +52,26 @@ G4QGSPPiKBuilder(G4bool quasiElastic)
theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionQGS_FTF();
theModel = new G4TheoFSGenerator("QGSP");
theStringModel = new G4QGSModel< G4QGSParticipants >;
theStringDecay = new G4ExcitedStringDecay(theQGSM = new G4QGSMFragmentation);
G4QGSModel< G4QGSParticipants >* theStringModel =
new G4QGSModel< G4QGSParticipants >;
G4ExcitedStringDecay* theStringDecay =
new G4ExcitedStringDecay(new G4QGSMFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
theCascade = new G4GeneratorPrecompoundInterface();
G4GeneratorPrecompoundInterface* theCascade =
new G4GeneratorPrecompoundInterface();
theModel->SetTransport(theCascade);
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
theModel->SetTransport(theCascade);
{
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
G4QGSPPiKBuilder::
~G4QGSPPiKBuilder()
{
if ( theQuasiElastic ) delete theQuasiElastic;
delete theStringDecay;
delete theStringModel;
delete theQGSM;
}
void G4QGSPPiKBuilder::
@@ -51,33 +51,29 @@
G4QGSPPionBuilder::
G4QGSPPionBuilder(G4bool quasiElastic)
{
theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionQGS_FTF();
theModel = new G4TheoFSGenerator("QGSP");
theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionQGS_FTF();
theModel = new G4TheoFSGenerator("QGSP");
theStringModel = new G4QGSModel< G4QGSParticipants >;
theStringDecay = new G4ExcitedStringDecay(theQGSM = new G4QGSMFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
theCascade = new G4GeneratorPrecompoundInterface();
G4QGSModel< G4QGSParticipants >* theStringModel =
new G4QGSModel< G4QGSParticipants >;
G4ExcitedStringDecay* theStringDecay =
new G4ExcitedStringDecay(new G4QGSMFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
theModel->SetTransport(theCascade);
G4GeneratorPrecompoundInterface* theCascade =
new G4GeneratorPrecompoundInterface();
theModel->SetTransport(theCascade);
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
G4QGSPPionBuilder::
~G4QGSPPionBuilder()
{
if ( theQuasiElastic ) delete theQuasiElastic;
delete theStringDecay;
delete theStringModel;
delete theQGSM;
}
void G4QGSPPionBuilder::
@@ -46,27 +46,27 @@
#include "G4BGGNucleonInelasticXS.hh"
#include "G4HadronicParameters.hh"
G4QGSPProtonBuilder::
G4QGSPProtonBuilder(G4bool quasiElastic)
{
theMin = G4HadronicParameters::Instance()->GetMinEnergyTransitionQGS_FTF();
theModel = new G4TheoFSGenerator("QGSP");
theStringModel = new G4QGSModel< G4QGSParticipants >;
theStringDecay = new G4ExcitedStringDecay(theQGSM = new G4QGSMFragmentation);
G4QGSModel< G4QGSParticipants >* theStringModel =
new G4QGSModel< G4QGSParticipants >;
G4ExcitedStringDecay* theStringDecay =
new G4ExcitedStringDecay(new G4QGSMFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
theCascade = new G4GeneratorPrecompoundInterface();
G4GeneratorPrecompoundInterface* theCascade =
new G4GeneratorPrecompoundInterface();
theModel->SetTransport(theCascade);
theModel->SetHighEnergyGenerator(theStringModel);
if (quasiElastic)
{
theQuasiElastic=new G4QuasiElasticChannel;
theModel->SetQuasiElasticChannel(theQuasiElastic);
} else
{ theQuasiElastic=0;}
theModel->SetQuasiElasticChannel(new G4QuasiElasticChannel());
}
}
void G4QGSPProtonBuilder::
@@ -80,9 +80,5 @@ Build(G4ProtonInelasticProcess * aP)
G4QGSPProtonBuilder::~G4QGSPProtonBuilder()
{
if ( theQuasiElastic ) delete theQuasiElastic;
delete theStringDecay;
delete theStringModel;
delete theQGSM;
}
@@ -43,7 +43,6 @@
void G4TritonBuilder::Build()
{
wasActivated = true;
std::vector<G4VTritonBuilder *>::iterator i;
for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
{
@@ -54,7 +53,7 @@
}
G4TritonBuilder::
G4TritonBuilder(): wasActivated(false)
G4TritonBuilder()
{
theTritonInelastic=new G4TritonInelasticProcess;
}
@@ -35,7 +35,6 @@ G4TritonPHPBuilder()
{
theMin = 0;
theMax=200.*MeV;
theParticlePHPModel = 0;
}
void G4TritonPHPBuilder::
@@ -52,7 +51,7 @@ Build(G4TritonInelasticProcess * aP)
theTritonHPInelasticData->SetMaxKinEnergy(theMax);
aP->AddDataSet(theTritonHPInelasticData);
theParticlePHPModel = new G4ParticleHPInelastic(G4Triton::Triton(),"ParticleHPInelastic");
G4ParticleHPInelastic* theParticlePHPModel = new G4ParticleHPInelastic(G4Triton::Triton(),"ParticleHPInelastic");
theParticlePHPModel->SetMinEnergy(theMin);
theParticlePHPModel->SetMaxEnergy(theMax);
aP->RegisterMe(theParticlePHPModel);