Import Geant4 11.0.0.beta source tree
This commit is contained in:
@@ -36,24 +36,10 @@ G4HadronicEPTestMessenger::G4HadronicEPTestMessenger(G4HadronicProcessStore* the
|
||||
:theProcessStore(theStore)
|
||||
{
|
||||
// Main directory for control of the e/p test
|
||||
old_heptstDirectory = new G4UIdirectory("/heptst/"); // To be removed in G4 11.0
|
||||
old_heptstDirectory->SetGuidance("Controls for the hadronic energy/momentum test");
|
||||
|
||||
heptstDirectory = new G4UIdirectory("/process/had/heptst/");
|
||||
heptstDirectory->SetGuidance("Controls for the hadronic energy/momentum test");
|
||||
|
||||
// Command to set level of detail reported upon e/p non-conservation
|
||||
old_reportLvlCmd = new G4UIcmdWithAnInteger("/heptst/reportLevel",this); // To be removed in G4 11.0
|
||||
old_reportLvlCmd->SetGuidance("Set level of detail reported upon E/p non-conservation");
|
||||
old_reportLvlCmd->SetGuidance(" 0 - (default) no reporting ");
|
||||
old_reportLvlCmd->SetGuidance(" 1 - report only when E/p not conserved ");
|
||||
old_reportLvlCmd->SetGuidance(" 2 - report regardless of E/p conservation ");
|
||||
old_reportLvlCmd->SetGuidance(" 3 - report only when E/p not conserved, with names, limits ");
|
||||
old_reportLvlCmd->SetGuidance(" 4 - report regardless of E/p conservation, with names, limits ");
|
||||
old_reportLvlCmd->SetParameterName("OldReportLevel",true);
|
||||
old_reportLvlCmd->SetDefaultValue(0);
|
||||
old_reportLvlCmd->SetRange("OldReportLevel >= 0 && OldReportLevel < 5");
|
||||
|
||||
reportLvlCmd = new G4UIcmdWithAnInteger("/process/had/heptst/reportLevel",this);
|
||||
reportLvlCmd->SetGuidance("Set level of detail reported upon E/p non-conservation");
|
||||
reportLvlCmd->SetGuidance(" 0 - (default) no reporting ");
|
||||
@@ -66,23 +52,12 @@ G4HadronicEPTestMessenger::G4HadronicEPTestMessenger(G4HadronicProcessStore* the
|
||||
reportLvlCmd->SetRange("ReportLevel >= 0 && ReportLevel < 5");
|
||||
|
||||
// Set the relative energy non-conservation level for the process
|
||||
old_procRelLvlCmd = new G4UIcmdWithADouble("/heptst/processRelLevel",this); // To be removed in G4 11.0
|
||||
old_procRelLvlCmd->SetGuidance("Set relative level of allowed energy non-conservation");
|
||||
old_procRelLvlCmd->SetParameterName("OlProcessRelLevel",true);
|
||||
old_procRelLvlCmd->SetDefaultValue(-1.0);
|
||||
|
||||
procRelLvlCmd = new G4UIcmdWithADouble("/process/had/heptst/processRelLevel",this);
|
||||
procRelLvlCmd->SetGuidance("Set relative level of allowed energy non-conservation");
|
||||
procRelLvlCmd->SetParameterName("ProcessRelLevel",true);
|
||||
procRelLvlCmd->SetDefaultValue(-1.0);
|
||||
|
||||
// Set the absolute energy non-conservation level for the process
|
||||
old_procAbsLvlCmd = new G4UIcmdWithADoubleAndUnit("/heptst/processAbsLevel",this); // To be removed in G4 11.0
|
||||
old_procAbsLvlCmd->SetGuidance("Set absolute energy level (with unit) of allowed energy non-conservation");
|
||||
old_procAbsLvlCmd->SetParameterName("OldProcessAbsLevel",true);
|
||||
old_procAbsLvlCmd->SetDefaultValue(-1.0);
|
||||
old_procAbsLvlCmd->SetUnitCategory("Energy");
|
||||
|
||||
procAbsLvlCmd = new G4UIcmdWithADoubleAndUnit("/process/had/heptst/processAbsLevel",this);
|
||||
procAbsLvlCmd->SetGuidance("Set absolute energy level (with unit) of allowed energy non-conservation");
|
||||
procAbsLvlCmd->SetParameterName("ProcessAbsLevel",true);
|
||||
@@ -93,41 +68,15 @@ G4HadronicEPTestMessenger::G4HadronicEPTestMessenger(G4HadronicProcessStore* the
|
||||
|
||||
G4HadronicEPTestMessenger::~G4HadronicEPTestMessenger()
|
||||
{
|
||||
delete old_heptstDirectory; // To be removed in G4 11.0
|
||||
delete heptstDirectory;
|
||||
delete old_reportLvlCmd; // To be removed in G4 11.0
|
||||
delete reportLvlCmd;
|
||||
delete old_procRelLvlCmd; // To be removed in G4 11.0
|
||||
delete procRelLvlCmd;
|
||||
delete old_procAbsLvlCmd; // To be removed in G4 11.0
|
||||
delete procAbsLvlCmd;
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicEPTestMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
{
|
||||
// Old commands to be removed in G4 11.0
|
||||
if ( command == old_reportLvlCmd ) {
|
||||
theProcessStore->SetEpReportLevel( old_reportLvlCmd->GetNewIntValue( newValue ) );
|
||||
G4ExceptionDescription ed;
|
||||
ed << "This command is valid but deprecated and will be replaced with the command:\n"
|
||||
<< "/process/had/heptst/reportLevel in the next major release, Geant4 version 11.0";
|
||||
G4Exception( "G4HadronicEPTestMessenger", "hadEPTestMessenger001", JustWarning, ed );
|
||||
} else if ( command == old_procRelLvlCmd ) {
|
||||
theProcessStore->SetProcessRelLevel( old_procRelLvlCmd->GetNewDoubleValue( newValue ) );
|
||||
G4ExceptionDescription ed;
|
||||
ed << "This command is valid but deprecated and will be replaced with the command:\n"
|
||||
<< "/process/had/heptst/processRelLevel in the next major release, Geant4 version 11.0";
|
||||
G4Exception( "G4HadronicEPTestMessenger", "hadEPTestMessenger002", JustWarning, ed );
|
||||
} else if ( command == old_procAbsLvlCmd ) {
|
||||
theProcessStore->SetProcessAbsLevel( old_procAbsLvlCmd->GetNewDoubleValue( newValue ) );
|
||||
G4ExceptionDescription ed;
|
||||
ed << "This command is valid but deprecated and will be replaced with the command:\n"
|
||||
<< "/process/had/heptst/processAbsLevel in the next major release, Geant4 version 11.0";
|
||||
G4Exception( "G4HadronicEPTestMessenger", "hadEPTestMessenger003", JustWarning, ed );
|
||||
}
|
||||
|
||||
// New commands
|
||||
if ( command == reportLvlCmd ) {
|
||||
theProcessStore->SetEpReportLevel( reportLvlCmd->GetNewIntValue( newValue ) );
|
||||
} else if ( command == procRelLvlCmd ) {
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Hadronic Interaction base class
|
||||
// original by H.P. Wellisch
|
||||
// modified by J.L. Chuma, TRIUMF, 21-Mar-1997
|
||||
// Last modified: 04-Apr-1997
|
||||
// reimplemented 1.11.2003 JPW.
|
||||
// 23-Jan-2009 V.Ivanchenko move constructor and destructor to the body
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "G4HadronicInteraction.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4HadronicInteractionRegistry.hh"
|
||||
#include "G4HadronicParameters.hh"
|
||||
|
||||
G4HadronicInteraction::G4HadronicInteraction(const G4String& modelName) :
|
||||
verboseLevel(0), theMinEnergy(0.0),
|
||||
isBlocked(false), recoilEnergyThreshold(0.0), theModelName(modelName),
|
||||
epCheckLevels(DBL_MAX, DBL_MAX)
|
||||
{
|
||||
theMaxEnergy = G4HadronicParameters::Instance()->GetMaxEnergy();
|
||||
registry = G4HadronicInteractionRegistry::Instance();
|
||||
registry->RegisterMe(this);
|
||||
}
|
||||
|
||||
G4HadronicInteraction::~G4HadronicInteraction()
|
||||
{
|
||||
registry->RemoveMe(this);
|
||||
}
|
||||
|
||||
void G4HadronicInteraction::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
{}
|
||||
|
||||
void G4HadronicInteraction::InitialiseModel()
|
||||
{}
|
||||
|
||||
G4HadFinalState*
|
||||
G4HadronicInteraction::ApplyYourself(const G4HadProjectile&, G4Nucleus&)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
G4double
|
||||
G4HadronicInteraction::SampleInvariantT(const G4ParticleDefinition*,
|
||||
G4double, G4int, G4int)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
G4bool G4HadronicInteraction::IsApplicable(const G4HadProjectile&,
|
||||
G4Nucleus&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
G4double G4HadronicInteraction::GetMinEnergy(
|
||||
const G4Material *aMaterial, const G4Element *anElement ) const
|
||||
{
|
||||
if(!IsBlocked()) { return theMinEnergy; }
|
||||
if( IsBlocked(aMaterial) || IsBlocked(anElement) ) { return DBL_MAX; }
|
||||
if(!theMinEnergyListElements.empty()) {
|
||||
for(auto const& elmlist : theMinEnergyListElements) {
|
||||
if( anElement == elmlist.second )
|
||||
{ return elmlist.first; }
|
||||
}
|
||||
}
|
||||
if(!theMinEnergyList.empty()) {
|
||||
for(auto const & matlist : theMinEnergyList) {
|
||||
if( aMaterial == matlist.second )
|
||||
{ return matlist.first; }
|
||||
}
|
||||
}
|
||||
return theMinEnergy;
|
||||
}
|
||||
|
||||
void G4HadronicInteraction::SetMinEnergy(G4double anEnergy,
|
||||
const G4Element *anElement )
|
||||
{
|
||||
Block();
|
||||
if(!theMinEnergyListElements.empty()) {
|
||||
for(auto & elmlist : theMinEnergyListElements) {
|
||||
if( anElement == elmlist.second ) {
|
||||
elmlist.first = anEnergy;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
theMinEnergyListElements.push_back(std::pair<G4double, const G4Element *>(anEnergy, anElement));
|
||||
}
|
||||
|
||||
void G4HadronicInteraction::SetMinEnergy(G4double anEnergy,
|
||||
const G4Material *aMaterial )
|
||||
{
|
||||
Block();
|
||||
if(!theMinEnergyList.empty()) {
|
||||
for(auto & matlist : theMinEnergyList) {
|
||||
if( aMaterial == matlist.second ) {
|
||||
matlist.first = anEnergy;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
theMinEnergyList.push_back(std::pair<G4double, const G4Material *>(anEnergy, aMaterial));
|
||||
}
|
||||
|
||||
G4double G4HadronicInteraction::GetMaxEnergy(const G4Material *aMaterial,
|
||||
const G4Element *anElement ) const
|
||||
{
|
||||
if(!IsBlocked()) { return theMaxEnergy; }
|
||||
if( IsBlocked(aMaterial) || IsBlocked(anElement) ) { return 0.0; }
|
||||
if(!theMaxEnergyListElements.empty()) {
|
||||
for(auto const& elmlist : theMaxEnergyListElements) {
|
||||
if( anElement == elmlist.second )
|
||||
{ return elmlist.first; }
|
||||
}
|
||||
}
|
||||
if(!theMaxEnergyList.empty()) {
|
||||
for(auto const& matlist : theMaxEnergyList) {
|
||||
if( aMaterial == matlist.second )
|
||||
{ return matlist.first; }
|
||||
}
|
||||
}
|
||||
return theMaxEnergy;
|
||||
}
|
||||
|
||||
void G4HadronicInteraction::SetMaxEnergy(G4double anEnergy,
|
||||
const G4Element *anElement )
|
||||
{
|
||||
Block();
|
||||
if(!theMaxEnergyListElements.empty()) {
|
||||
for(auto & elmlist : theMaxEnergyListElements) {
|
||||
if( anElement == elmlist.second ) {
|
||||
elmlist.first = anEnergy;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
theMaxEnergyListElements.push_back(std::pair<G4double, const G4Element *>(anEnergy, anElement));
|
||||
}
|
||||
|
||||
void G4HadronicInteraction::SetMaxEnergy(G4double anEnergy, const G4Material *aMaterial )
|
||||
{
|
||||
Block();
|
||||
if(!theMaxEnergyList.empty()) {
|
||||
for(auto & matlist: theMaxEnergyList) {
|
||||
if( aMaterial == matlist.second ) {
|
||||
matlist.first = anEnergy;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
theMaxEnergyList.push_back(std::pair<G4double, const G4Material *>(anEnergy, aMaterial));
|
||||
}
|
||||
|
||||
void G4HadronicInteraction::DeActivateFor( const G4Material *aMaterial )
|
||||
{
|
||||
Block();
|
||||
theBlockedList.push_back(aMaterial);
|
||||
}
|
||||
|
||||
void G4HadronicInteraction::DeActivateFor( const G4Element *anElement )
|
||||
{
|
||||
Block();
|
||||
theBlockedListElements.push_back(anElement);
|
||||
}
|
||||
|
||||
|
||||
G4bool G4HadronicInteraction::IsBlocked(const G4Material* aMaterial) const
|
||||
{
|
||||
for (auto const& mat : theBlockedList) {
|
||||
if (aMaterial == mat) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
G4bool G4HadronicInteraction::IsBlocked(const G4Element* anElement) const
|
||||
{
|
||||
for (auto const& elm : theBlockedListElements) {
|
||||
if (anElement == elm) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::pair<G4double, G4double> G4HadronicInteraction::GetFatalEnergyCheckLevels() const
|
||||
{
|
||||
// default level of Check
|
||||
return std::pair<G4double, G4double>(2.*perCent, 1. * GeV);
|
||||
}
|
||||
|
||||
std::pair<G4double, G4double>
|
||||
G4HadronicInteraction::GetEnergyMomentumCheckLevels() const
|
||||
{
|
||||
return epCheckLevels;
|
||||
}
|
||||
|
||||
void G4HadronicInteraction::ModelDescription(std::ostream& outFile) const
|
||||
{
|
||||
outFile << "The description for this model has not been written yet.\n";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// 23-Jan-2009 V.Ivanchenko make the class to be a singleton
|
||||
// 17-Aug-2012 V.Ivanchenko added methods
|
||||
|
||||
#include "G4HadronicInteractionRegistry.hh"
|
||||
#include "G4HadronicInteraction.hh"
|
||||
|
||||
G4ThreadLocal G4HadronicInteractionRegistry*
|
||||
G4HadronicInteractionRegistry::instance = nullptr;
|
||||
|
||||
G4HadronicInteractionRegistry* G4HadronicInteractionRegistry::Instance()
|
||||
{
|
||||
if(nullptr == instance) {
|
||||
static G4ThreadLocalSingleton<G4HadronicInteractionRegistry> inst;
|
||||
instance = inst.Instance();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
G4HadronicInteractionRegistry::G4HadronicInteractionRegistry()
|
||||
{}
|
||||
|
||||
G4HadronicInteractionRegistry::~G4HadronicInteractionRegistry()
|
||||
{
|
||||
Clean();
|
||||
}
|
||||
|
||||
void G4HadronicInteractionRegistry::Clean()
|
||||
{
|
||||
size_t nModels = allModels.size();
|
||||
//G4cout << "G4HadronicInteractionRegistry::Clean() start " << nModels
|
||||
// << " " << this << G4endl;
|
||||
for (size_t i=0; i<nModels; ++i) {
|
||||
if( allModels[i] ) {
|
||||
//const char* xxx = (allModels[i]->GetModelName()).c_str();
|
||||
//G4int len = (allModels[i]->GetModelName()).length();
|
||||
//len = std::min(len, 9);
|
||||
//const G4String mname = G4String(xxx, len);
|
||||
//G4cout << "G4HadronicInteractionRegistry: delete " << i << " "
|
||||
// << allModels[i] << " " << mname
|
||||
// << " " << this << G4endl;
|
||||
//if(mname != "NeutronHP" && mname != "ParticleH")
|
||||
delete allModels[i];
|
||||
// G4cout << "done " << this << G4endl;
|
||||
}
|
||||
}
|
||||
allModels.clear();
|
||||
//G4cout <<"G4HadronicInteractionRegistry::Clean() is done "<<G4endl;
|
||||
}
|
||||
|
||||
void G4HadronicInteractionRegistry::InitialiseModels()
|
||||
{
|
||||
for (auto & mod : allModels) {
|
||||
if( mod ) { mod->InitialiseModel(); }
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
G4HadronicInteractionRegistry::RegisterMe(G4HadronicInteraction * aModel)
|
||||
{
|
||||
if(!aModel) { return; }
|
||||
for (auto & mod : allModels) {
|
||||
if( aModel == mod ) { return; }
|
||||
}
|
||||
//G4cout << "Register model <" << aModel->GetModelName()
|
||||
// << "> " << nModels+1 << " " << aModel << G4endl;
|
||||
allModels.push_back(aModel);
|
||||
}
|
||||
|
||||
void
|
||||
G4HadronicInteractionRegistry::RemoveMe(G4HadronicInteraction * aModel)
|
||||
{
|
||||
if(!aModel) { return; }
|
||||
for (size_t i=0; i<allModels.size(); ++i) {
|
||||
if( aModel == allModels[i] ) {
|
||||
//G4cout << "DeRegister model <" << aModel
|
||||
// << "> " << i << G4endl;
|
||||
allModels[i] = nullptr;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G4HadronicInteraction*
|
||||
G4HadronicInteractionRegistry::FindModel(const G4String& name)
|
||||
{
|
||||
G4HadronicInteraction* model = nullptr;
|
||||
for (auto & mod : allModels) {
|
||||
if(mod && mod->GetModelName() == name) {
|
||||
model = mod;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
std::vector<G4HadronicInteraction*>
|
||||
G4HadronicInteractionRegistry::FindAllModels(const G4String& name)
|
||||
{
|
||||
std::vector<G4HadronicInteraction*> models;
|
||||
for (auto & mod : allModels) {
|
||||
if(mod && mod->GetModelName() == name) {
|
||||
models.push_back(mod);
|
||||
}
|
||||
}
|
||||
return models;
|
||||
}
|
||||
@@ -65,15 +65,10 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
G4ThreadLocal G4HadronicProcessStore* G4HadronicProcessStore::instance = nullptr;
|
||||
|
||||
G4HadronicProcessStore* G4HadronicProcessStore::Instance()
|
||||
{
|
||||
if(!instance) {
|
||||
static G4ThreadLocalSingleton<G4HadronicProcessStore> inst;
|
||||
instance = inst.Instance();
|
||||
}
|
||||
return instance;
|
||||
static thread_local auto* _instance = new G4HadronicProcessStore{};
|
||||
return _instance;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
@@ -88,19 +83,14 @@ G4HadronicProcessStore::~G4HadronicProcessStore()
|
||||
|
||||
void G4HadronicProcessStore::Clean()
|
||||
{
|
||||
G4int i;
|
||||
for (i=0; i<n_proc; ++i) {
|
||||
if( process[i] ) {
|
||||
delete process[i];
|
||||
process[i] = nullptr;
|
||||
}
|
||||
}
|
||||
for(i=0; i<n_extra; ++i) {
|
||||
if(extraProcess[i]) {
|
||||
delete extraProcess[i];
|
||||
extraProcess[i] = nullptr;
|
||||
}
|
||||
}
|
||||
for(auto& itr : process)
|
||||
delete itr;
|
||||
process.clear();
|
||||
|
||||
for(auto& itr : extraProcess)
|
||||
delete itr;
|
||||
extraProcess.clear();
|
||||
|
||||
n_extra = 0;
|
||||
n_proc = 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// V. Uzhinsky Nov. 2012
|
||||
// Added method GetProjectileNucleus for simulation of nucleus-nucleus inter.
|
||||
//
|
||||
// G4VHighEnergyGenerator
|
||||
#include "G4VHighEnergyGenerator.hh"
|
||||
|
||||
G4VHighEnergyGenerator::G4VHighEnergyGenerator(const G4String& modelName)
|
||||
: G4HadronicInteraction(modelName)
|
||||
{}
|
||||
|
||||
G4VHighEnergyGenerator::~G4VHighEnergyGenerator()
|
||||
{}
|
||||
|
||||
void G4VHighEnergyGenerator::ModelDescription(std::ostream& outFile) const
|
||||
{
|
||||
outFile << " Parton-string models description not written yet \n";
|
||||
}
|
||||
|
||||
G4V3DNucleus * G4VHighEnergyGenerator::GetProjectileNucleus() const
|
||||
{
|
||||
G4ExceptionDescription ed;
|
||||
ed << "The used HighEnergyGenerator "<<GetModelName()
|
||||
<<" cannot manage with a residual projectile nucleus";
|
||||
G4Exception("G4VHighEnergyGenerator::GetProjectileNucleus ", "G4had_mod_man",
|
||||
FatalException, ed);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -----------------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// History: first implementation, A. Feliciello, 30th June 1998
|
||||
// Removed delete of DeExcitation model, deleted elsewhere.
|
||||
// F.W.Jones, 06-JUL-99
|
||||
// V.Ivanchenko 03.01.2012
|
||||
// Added G4VPreCompoundModel pointer to the constructor and cleanup
|
||||
// V. Uzhinsky Nov. 2012
|
||||
// Added method PropagateNuclNucl for simulation of nucleus-nucleus inter.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#include "G4VIntraNuclearTransportModel.hh"
|
||||
|
||||
G4VIntraNuclearTransportModel::G4VIntraNuclearTransportModel(
|
||||
const G4String& modName, G4VPreCompoundModel* ptr)
|
||||
: G4HadronicInteraction(modName),theTransportModelName(modName),
|
||||
the3DNucleus(nullptr),theDeExcitation(ptr),thePrimaryProjectile(nullptr)
|
||||
{}
|
||||
|
||||
G4VIntraNuclearTransportModel::~G4VIntraNuclearTransportModel()
|
||||
{}
|
||||
|
||||
void G4VIntraNuclearTransportModel::ModelDescription(std::ostream& outFile) const
|
||||
{
|
||||
outFile << "G4VIntraNuclearTransportModel is abstract class.\n";
|
||||
G4Exception("G4VIntraNuclearTransportModel::ModelDescription()","G4VINT01",
|
||||
FatalException,
|
||||
"G4VIntraNuclearTransportModel is abstract class, no description available");
|
||||
}
|
||||
|
||||
void G4VIntraNuclearTransportModel::PropagateModelDescription(std::ostream& outFile) const
|
||||
{
|
||||
outFile << "G4VIntraNuclearTransportModel is abstract class, missing description.\n";
|
||||
}
|
||||
|
||||
G4ReactionProductVector*
|
||||
G4VIntraNuclearTransportModel::PropagateNuclNucl(G4KineticTrackVector* ,
|
||||
G4V3DNucleus* , G4V3DNucleus* )
|
||||
{
|
||||
G4Exception("G4VIntraNuclearTransportModel::Propagate()","G4VINT02",
|
||||
FatalException,
|
||||
"Propagate method for nucleus-nucleus interactions not implemented");
|
||||
return nullptr;
|
||||
}
|
||||
+20
-25
@@ -23,34 +23,29 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Hadronic Inelastic Process Class
|
||||
// J.L. Chuma, TRIUMF, 24-Mar-1997
|
||||
// Last modified: 27-Mar-1997
|
||||
// J.P. Wellisch: Bug hunting, 23-Apr-97
|
||||
// Modified by J.L.Chuma 8-Jul-97 to eliminate possible division by zero for sigma
|
||||
//
|
||||
// 14-APR-98 F.W.Jones: variant G4HadronInelastic process for
|
||||
// G4CrossSectionDataSet/DataStore class design.
|
||||
//
|
||||
// 17-JUN-98 F.W.Jones: removed extraneous code causing core dump.
|
||||
// 01-SEP-2008 V.Ivanchenko: use methods from the base class
|
||||
// 14-Sep-12 M.Kelsey -- Pass subType code to base ctor
|
||||
// -----------------------------------------------------------------------------
|
||||
// GEANT 4 class file
|
||||
//
|
||||
// History: first implementation 1998
|
||||
//
|
||||
// V.Ivanchenko 03.01.2012
|
||||
// Added G4ExcitationHandler pointer to the constructor and cleanup
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#include "G4VPreCompoundModel.hh"
|
||||
|
||||
G4VPreCompoundModel::G4VPreCompoundModel(G4ExcitationHandler* ptr,
|
||||
const G4String& modelName):
|
||||
G4HadronicInteraction(modelName), theExcitationHandler(ptr)
|
||||
{}
|
||||
|
||||
G4VPreCompoundModel::~G4VPreCompoundModel()
|
||||
{}
|
||||
|
||||
#include "G4HadronInelasticProcess.hh"
|
||||
#include "G4HadronInelasticDataSet.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
G4HadronInelasticProcess::G4HadronInelasticProcess(const G4String& processName,
|
||||
const G4ParticleDefinition*):
|
||||
G4HadronicProcess(processName,fHadronInelastic)
|
||||
{}
|
||||
|
||||
G4HadronInelasticProcess::~G4HadronInelasticProcess()
|
||||
{}
|
||||
|
||||
G4bool G4HadronInelasticProcess::IsApplicable(const G4ParticleDefinition&)
|
||||
void G4VPreCompoundModel::DeExciteModelDescription(std::ostream& outFile) const
|
||||
{
|
||||
return true;
|
||||
outFile << "description of DeExcite() for model derived from G4VPrecompoundModel missing.\n";
|
||||
}
|
||||
Reference in New Issue
Block a user