_Geant4 Version:_11.1
_Operating System:_Windows
_Compiler/Version:_Visual Studio 2023
_CMake Version:_3.28
Hello, I am noob about Geant4.
Always thanks to all of experts in Geant4 forum.
I am trying to simulate the 1. spontaneous decay of Cf-252 source and 2. track the interaction of neutrons / gamma that are generated from spontaneous decay with sensitive(logical) detector (Li-6 detecotor).
Thanks to other guys, I could find the example of Hadr04 and rdecay01 for my intention.
// Hadr04 PhysicsList.cc
#include "PhysicsList.hh"
#include "G4SystemOfUnits.hh"
#include "G4UnitsTable.hh"
#include "NeutronHPphysics.hh"
// particles
#include "G4BosonConstructor.hh"
#include "G4LeptonConstructor.hh"
#include "G4MesonConstructor.hh"
#include "G4BosonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsList::PhysicsList()
{
SetVerboseLevel(1);
//add new units
//
new G4UnitDefinition( "mm2/g", "mm2/g", "Surface/Mass", mm2/g);
new G4UnitDefinition( "um2/mg", "um2/mg","Surface/Mass", um*um/mg);
// Neutron Physics
RegisterPhysics( new NeutronHPphysics("neutronHP"));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::ConstructParticle()
{
G4BosonConstructor pBosonConstructor;
pBosonConstructor.ConstructParticle();
G4LeptonConstructor pLeptonConstructor;
pLeptonConstructor.ConstructParticle();
G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();
G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();
G4IonConstructor pIonConstructor;
pIonConstructor.ConstructParticle();
G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::SetCuts()
{
SetCutValue(0*mm, "proton");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// rdecay01 PhysicsList.cc
/// \brief Implementation of the PhysicsList class
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysicsList.hh"
#include "G4UnitsTable.hh"
#include "G4ParticleTypes.hh"
#include "G4IonConstructor.hh"
#include "G4PhysicsListHelper.hh"
#include "G4Radioactivation.hh"
#include "G4SystemOfUnits.hh"
#include "G4NuclideTable.hh"
#include "G4LossTableManager.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4NuclideTable.hh"
#include "G4NuclearLevelData.hh"
#include "G4DeexPrecoParameters.hh"
#include "G4PhysListUtil.hh"
#include "G4EmBuilder.hh"
#include "G4HadronInelasticQBBC.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsList::PhysicsList()
{
// instantiate Physics List infrastructure
//
G4PhysListUtil::InitialiseParameters();
// update G4NuclideTable time limit
//
const G4double meanLife = 1*picosecond;
G4NuclideTable::GetInstance()->SetMeanLifeThreshold(meanLife);
G4NuclideTable::GetInstance()->SetLevelTolerance(1.0*eV);
// define flags for the atomic de-excitation module
//
G4EmParameters::Instance()->SetDefaults();
G4EmParameters::Instance()->SetAugerCascade(true);
G4EmParameters::Instance()->SetDeexcitationIgnoreCut(true);
// define flags for nuclear gamma de-excitation model
//
G4DeexPrecoParameters* deex =
G4NuclearLevelData::GetInstance()->GetParameters();
deex->SetCorrelatedGamma(false);
deex->SetStoreAllLevels(true);
deex->SetInternalConversionFlag(true);
deex->SetIsomerProduction(true);
deex->SetMaxLifeTime(meanLife);
// set default cut in range value
//
/*G4HadronInelasticQBBC* hadronPhysics = new G4HadronInelasticQBBC();
hadronPhysics->ConstructProcess();*/
SetDefaultCutValue(1*mm);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::ConstructParticle()
{
// minimal set of particles for EM physics and radioactive decay
//
G4EmBuilder::ConstructMinimalEmSet();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::ConstructProcess()
{
AddTransportation();
G4Radioactivation* radioactiveDecay = new G4Radioactivation();
G4bool ARMflag = false;
radioactiveDecay->SetARM(ARMflag); //Atomic Rearangement
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
ph->RegisterProcess(radioactiveDecay, G4GenericIon::GenericIon());
// EM physics constructor is not used in this example, so
// it is needed to instantiate and to initialize atomic deexcitation
G4LossTableManager* man = G4LossTableManager::Instance();
G4VAtomDeexcitation* deex = man->AtomDeexcitation();
if (nullptr == deex) {
deex = new G4UAtomicDeexcitation();
man->SetAtomDeexcitation(deex);
}
deex->InitialiseAtomicDeexcitation();
SetDefaultCutValue(1 * mm);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
I want to combine this two different physics lists but I couldn’t find the exact way to do.
Is it possible to combine this two different physicslists? If I can, could you let me know the examples or other stuffs for reference?