892 lines
32 KiB
Plaintext
892 lines
32 KiB
Plaintext
//
|
|
// ********************************************************************
|
|
// * 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. *
|
|
// ********************************************************************
|
|
//
|
|
//
|
|
// --------------------------------------------------------------
|
|
//
|
|
// For information related to this code contact: Alex Howard
|
|
// e-mail: alexander.howard@cern.ch
|
|
// --------------------------------------------------------------
|
|
// Comments
|
|
//
|
|
// Underground Advanced
|
|
//
|
|
// This physics list is taken from the underground_physics example with small
|
|
// modifications. It is an example of a "flat" physics list with no dependence
|
|
// on builders. The physics covered would be suitable for a low background
|
|
// experiment including the neutron_hp package
|
|
//
|
|
//
|
|
//
|
|
// PhysicsList program
|
|
//
|
|
// Modified:
|
|
//
|
|
// 14-02-03 Fix bugs in msc and hIon instanciation + cut per region
|
|
// 16-08-10 Remove inclusion of obsolete class of G4ParticleWithCuts
|
|
// 20-10-10 Migrate LowEnergy process to Livermore models, LP
|
|
// --------------------------------------------------------------
|
|
|
|
#include <iomanip>
|
|
|
|
#include "globals.hh"
|
|
#include "G4ios.hh"
|
|
#include "G4ProcessManager.hh"
|
|
#include "G4ProcessVector.hh"
|
|
|
|
#include "G4ParticleTypes.hh"
|
|
#include "G4ParticleTable.hh"
|
|
#include "G4ProductionCutsTable.hh"
|
|
|
|
#include "G4UserLimits.hh"
|
|
#include "G4DataQuestionaire.hh"
|
|
#include "G4WarnPLStatus.hh"
|
|
|
|
|
|
// Constructor /////////////////////////////////////////////////////////////
|
|
template<class T> TLBE<T>::TLBE() : G4VUserPhysicsList()
|
|
{
|
|
|
|
G4DataQuestionaire it(photon, lowenergy, neutron, radioactive);
|
|
G4cout << "You are using the simulation engine: LBE 5.3"<<G4endl;
|
|
G4cout <<G4endl<<G4endl;
|
|
this->defaultCutValue = 1.0*CLHEP::micrometer; //
|
|
cutForGamma = this->defaultCutValue;
|
|
cutForElectron = 1.0*CLHEP::nanometer;
|
|
cutForPositron = this->defaultCutValue;
|
|
cutForProton = this->defaultCutValue;
|
|
cutForAlpha = 1.0*CLHEP::nanometer;
|
|
cutForGenericIon = 1.0*CLHEP::nanometer;
|
|
|
|
VerboseLevel = 1;
|
|
OpVerbLevel = 0;
|
|
|
|
this->SetVerboseLevel(VerboseLevel);
|
|
}
|
|
|
|
|
|
// Destructor //////////////////////////////////////////////////////////////
|
|
template<class T> TLBE<T>::~TLBE()
|
|
{;}
|
|
|
|
|
|
// Construct Particles /////////////////////////////////////////////////////
|
|
template<class T> void TLBE<T>::ConstructParticle()
|
|
{
|
|
|
|
// In this method, static member functions should be called
|
|
// for all particles which you want to use.
|
|
// This ensures that objects of these particle types will be
|
|
// created in the program.
|
|
|
|
ConstructMyBosons();
|
|
ConstructMyLeptons();
|
|
ConstructMyMesons();
|
|
ConstructMyBaryons();
|
|
ConstructMyIons();
|
|
ConstructMyShortLiveds();
|
|
|
|
}
|
|
|
|
|
|
// construct Bosons://///////////////////////////////////////////////////
|
|
template<class T> void TLBE<T>::ConstructMyBosons()
|
|
{
|
|
// pseudo-particles
|
|
G4Geantino::GeantinoDefinition();
|
|
G4ChargedGeantino::ChargedGeantinoDefinition();
|
|
|
|
// gamma
|
|
G4Gamma::GammaDefinition();
|
|
|
|
//OpticalPhotons
|
|
G4OpticalPhoton::OpticalPhotonDefinition();
|
|
|
|
}
|
|
|
|
|
|
// construct Leptons://///////////////////////////////////////////////////
|
|
template<class T> void TLBE<T>::ConstructMyLeptons()
|
|
{
|
|
// leptons
|
|
G4Electron::ElectronDefinition();
|
|
G4Positron::PositronDefinition();
|
|
G4MuonPlus::MuonPlusDefinition();
|
|
G4MuonMinus::MuonMinusDefinition();
|
|
|
|
G4NeutrinoE::NeutrinoEDefinition();
|
|
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
|
|
G4NeutrinoMu::NeutrinoMuDefinition();
|
|
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
|
|
}
|
|
|
|
#include "G4MesonConstructor.hh"
|
|
#include "G4BaryonConstructor.hh"
|
|
#include "G4IonConstructor.hh"
|
|
|
|
|
|
// construct Mesons://///////////////////////////////////////////////////
|
|
template<class T> void TLBE<T>::ConstructMyMesons()
|
|
{
|
|
// mesons
|
|
G4MesonConstructor mConstructor;
|
|
mConstructor.ConstructParticle();
|
|
|
|
}
|
|
|
|
|
|
// construct Baryons://///////////////////////////////////////////////////
|
|
template<class T> void TLBE<T>::ConstructMyBaryons()
|
|
{
|
|
// baryons
|
|
G4BaryonConstructor bConstructor;
|
|
bConstructor.ConstructParticle();
|
|
|
|
}
|
|
|
|
|
|
// construct Ions://///////////////////////////////////////////////////
|
|
template<class T> void TLBE<T>::ConstructMyIons()
|
|
{
|
|
// ions
|
|
G4IonConstructor iConstructor;
|
|
iConstructor.ConstructParticle();
|
|
|
|
}
|
|
|
|
// construct Shortliveds://///////////////////////////////////////////////////
|
|
template<class T> void TLBE<T>::ConstructMyShortLiveds()
|
|
{
|
|
// ShortLiveds
|
|
;
|
|
}
|
|
|
|
|
|
|
|
|
|
// Construct Processes //////////////////////////////////////////////////////
|
|
template<class T> void TLBE<T>::ConstructProcess()
|
|
{
|
|
|
|
AddTransportation();
|
|
|
|
ConstructEM();
|
|
|
|
ConstructOp();
|
|
|
|
ConstructHad();
|
|
|
|
ConstructGeneral();
|
|
|
|
}
|
|
|
|
|
|
// Transportation ///////////////////////////////////////////////////////////
|
|
#include "MaxTimeCuts.hh"
|
|
#include "MinEkineCuts.hh"
|
|
|
|
template<class T> void TLBE<T>::AddTransportation() {
|
|
|
|
G4VUserPhysicsList::AddTransportation();
|
|
|
|
this->theParticleIterator->reset();
|
|
while( (*(this->theParticleIterator))() ){
|
|
G4ParticleDefinition* particle = this->theParticleIterator->value();
|
|
G4ProcessManager* pmanager = particle->GetProcessManager();
|
|
G4String particleName = particle->GetParticleName();
|
|
// time cuts for ONLY neutrons:
|
|
if(particleName == "neutron")
|
|
pmanager->AddDiscreteProcess(new MaxTimeCuts());
|
|
// Energy cuts to kill charged (embedded in method) particles:
|
|
pmanager->AddDiscreteProcess(new MinEkineCuts());
|
|
}
|
|
}
|
|
|
|
|
|
// Electromagnetic Processes ////////////////////////////////////////////////
|
|
// all charged particles
|
|
|
|
#include "G4eMultipleScattering.hh"
|
|
#include "G4MuMultipleScattering.hh"
|
|
#include "G4hMultipleScattering.hh"
|
|
|
|
// gamma. Use Livermore models
|
|
#include "G4PhotoElectricEffect.hh"
|
|
#include "G4LivermorePhotoElectricModel.hh"
|
|
#include "G4ComptonScattering.hh"
|
|
#include "G4LivermoreComptonModel.hh"
|
|
#include "G4GammaConversion.hh"
|
|
#include "G4LivermoreGammaConversionModel.hh"
|
|
#include "G4RayleighScattering.hh"
|
|
#include "G4LivermoreRayleighModel.hh"
|
|
|
|
|
|
// e-
|
|
#include "G4eMultipleScattering.hh"
|
|
#include "G4UniversalFluctuation.hh"
|
|
#include "G4UrbanMscModel93.hh"
|
|
|
|
#include "G4eIonisation.hh"
|
|
#include "G4LivermoreIonisationModel.hh"
|
|
|
|
#include "G4eBremsstrahlung.hh"
|
|
#include "G4LivermoreBremsstrahlungModel.hh"
|
|
|
|
// e+
|
|
#include "G4eplusAnnihilation.hh"
|
|
|
|
|
|
// alpha and GenericIon and deuterons, triton, He3:
|
|
#include "G4ionIonisation.hh"
|
|
#include "G4hIonisation.hh"
|
|
#include "G4hBremsstrahlung.hh"
|
|
//
|
|
#include "G4IonParametrisedLossModel.hh"
|
|
#include "G4NuclearStopping.hh"
|
|
#include "G4EnergyLossTables.hh"
|
|
|
|
|
|
// msc models
|
|
#include "G4UrbanMscModel93.hh"
|
|
|
|
|
|
//muon:
|
|
#include "G4MuIonisation.hh"
|
|
#include "G4MuBremsstrahlung.hh"
|
|
#include "G4MuPairProduction.hh"
|
|
#include "G4MuonMinusCaptureAtRest.hh"
|
|
|
|
//OTHERS:
|
|
//#include "G4hIonisation.hh" // standard hadron ionisation
|
|
|
|
template<class T> void TLBE<T>::ConstructEM() {
|
|
|
|
// models & processes:
|
|
// Use Livermore models up to 20 MeV, and standard
|
|
// models for higher energy
|
|
G4double LivermoreHighEnergyLimit = 20*CLHEP::MeV;
|
|
//
|
|
this->theParticleIterator->reset();
|
|
while( (*(this->theParticleIterator))() ){
|
|
G4ParticleDefinition* particle = this->theParticleIterator->value();
|
|
G4ProcessManager* pmanager = particle->GetProcessManager();
|
|
G4String particleName = particle->GetParticleName();
|
|
G4String particleType = particle->GetParticleType();
|
|
G4double charge = particle->GetPDGCharge();
|
|
|
|
if (particleName == "gamma")
|
|
{
|
|
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
|
|
G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
|
|
new G4LivermorePhotoElectricModel();
|
|
theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
|
|
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
|
|
pmanager->AddDiscreteProcess(thePhotoElectricEffect);
|
|
|
|
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
|
|
G4LivermoreComptonModel* theLivermoreComptonModel =
|
|
new G4LivermoreComptonModel();
|
|
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
|
|
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
|
|
pmanager->AddDiscreteProcess(theComptonScattering);
|
|
|
|
G4GammaConversion* theGammaConversion = new G4GammaConversion();
|
|
G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
|
|
new G4LivermoreGammaConversionModel();
|
|
theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
|
|
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
|
|
pmanager->AddDiscreteProcess(theGammaConversion);
|
|
|
|
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
|
|
G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
|
|
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
|
|
theRayleigh->AddEmModel(0, theRayleighModel);
|
|
pmanager->AddDiscreteProcess(theRayleigh);
|
|
|
|
}
|
|
else if (particleName == "e-")
|
|
{
|
|
//electron
|
|
// process ordering: AddProcess(name, at rest, along step, post step)
|
|
// -1 = not implemented, then ordering
|
|
G4eMultipleScattering* msc = new G4eMultipleScattering();
|
|
msc->AddEmModel(0, new G4UrbanMscModel93());
|
|
msc->SetStepLimitType(fUseDistanceToBoundary);
|
|
pmanager->AddProcess(msc, -1, 1, 1);
|
|
|
|
// Ionisation
|
|
G4eIonisation* eIoni = new G4eIonisation();
|
|
G4LivermoreIonisationModel* theIoniLivermore = new
|
|
G4LivermoreIonisationModel();
|
|
theIoniLivermore->SetHighEnergyLimit(1*CLHEP::MeV);
|
|
eIoni->AddEmModel(0, theIoniLivermore, new G4UniversalFluctuation() );
|
|
eIoni->SetStepFunction(0.2, 100*CLHEP::um); //
|
|
pmanager->AddProcess(eIoni, -1, 2, 2);
|
|
|
|
// Bremsstrahlung
|
|
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
|
|
G4LivermoreBremsstrahlungModel* theBremLivermore = new
|
|
G4LivermoreBremsstrahlungModel();
|
|
theBremLivermore->SetHighEnergyLimit(LivermoreHighEnergyLimit);
|
|
eBrem->AddEmModel(0, theBremLivermore);
|
|
pmanager->AddProcess(eBrem, -1,-3, 3);
|
|
}
|
|
else if (particleName == "e+")
|
|
{
|
|
//positron
|
|
G4eMultipleScattering* msc = new G4eMultipleScattering();
|
|
msc->AddEmModel(0, new G4UrbanMscModel93());
|
|
msc->SetStepLimitType(fUseDistanceToBoundary);
|
|
pmanager->AddProcess(msc, -1, 1, 1);
|
|
G4eIonisation* eIoni = new G4eIonisation();
|
|
eIoni->SetStepFunction(0.2, 100*CLHEP::um);
|
|
pmanager->AddProcess(eIoni, -1, 2, 2);
|
|
pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3);
|
|
pmanager->AddProcess(new G4eplusAnnihilation,0,-1, 4);
|
|
}
|
|
else if( particleName == "mu+" ||
|
|
particleName == "mu-" )
|
|
{
|
|
//muon
|
|
G4MuMultipleScattering* aMultipleScattering = new G4MuMultipleScattering();
|
|
pmanager->AddProcess(aMultipleScattering, -1, 1, 1);
|
|
pmanager->AddProcess(new G4MuIonisation(), -1, 2, 2);
|
|
pmanager->AddProcess(new G4MuBremsstrahlung(), -1,-1, 3);
|
|
pmanager->AddProcess(new G4MuPairProduction(), -1,-1, 4);
|
|
if( particleName == "mu-" )
|
|
pmanager->AddProcess(new G4MuonMinusCaptureAtRest(), 0,-1,-1);
|
|
}
|
|
else if (particleName == "GenericIon")
|
|
{
|
|
pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
|
|
G4ionIonisation* ionIoni = new G4ionIonisation();
|
|
ionIoni->SetEmModel(new G4IonParametrisedLossModel());
|
|
ionIoni->SetStepFunction(0.1, 10*CLHEP::um);
|
|
pmanager->AddProcess(ionIoni, -1, 2, 2);
|
|
pmanager->AddProcess(new G4NuclearStopping(), -1, 3,-1);
|
|
}
|
|
else if (particleName == "alpha" || particleName == "He3")
|
|
{
|
|
//MSC, ion-Ionisation, Nuclear Stopping
|
|
pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
|
|
|
|
G4ionIonisation* ionIoni = new G4ionIonisation();
|
|
ionIoni->SetStepFunction(0.1, 20*CLHEP::um);
|
|
pmanager->AddProcess(ionIoni, -1, 2, 2);
|
|
pmanager->AddProcess(new G4NuclearStopping(), -1, 3,-1);
|
|
}
|
|
else if (particleName == "proton" ||
|
|
particleName == "deuteron" ||
|
|
particleName == "triton" ||
|
|
particleName == "pi+" ||
|
|
particleName == "pi-" ||
|
|
particleName == "kaon+" ||
|
|
particleName == "kaon-")
|
|
{
|
|
//MSC, h-ionisation, bremsstrahlung
|
|
pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
|
|
G4hIonisation* hIoni = new G4hIonisation();
|
|
hIoni->SetStepFunction(0.2, 50*CLHEP::um);
|
|
pmanager->AddProcess(hIoni, -1, 2, 2);
|
|
pmanager->AddProcess(new G4hBremsstrahlung, -1,-3, 3);
|
|
}
|
|
else if ((!particle->IsShortLived()) &&
|
|
(charge != 0.0) &&
|
|
(particle->GetParticleName() != "chargedgeantino"))
|
|
{
|
|
//all others charged particles except geantino
|
|
pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
|
|
pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
|
|
// Optical Processes ////////////////////////////////////////////////////////
|
|
#include "G4Scintillation.hh"
|
|
#include "G4OpAbsorption.hh"
|
|
//#include "G4OpRayleigh.hh"
|
|
#include "G4OpBoundaryProcess.hh"
|
|
|
|
template<class T> void TLBE<T>::ConstructOp()
|
|
{
|
|
// default scintillation process
|
|
//Coverity report: check that the process is actually used, if not must delete
|
|
G4bool theScintProcessDefNeverUsed = true;
|
|
G4Scintillation* theScintProcessDef = new G4Scintillation("Scintillation");
|
|
// theScintProcessDef->DumpPhysicsTable();
|
|
theScintProcessDef->SetTrackSecondariesFirst(true);
|
|
theScintProcessDef->SetScintillationYieldFactor(1.0); //
|
|
theScintProcessDef->SetScintillationExcitationRatio(0.0); //
|
|
theScintProcessDef->SetVerboseLevel(OpVerbLevel);
|
|
|
|
// scintillation process for alpha:
|
|
G4bool theScintProcessAlphaNeverUsed = true;
|
|
G4Scintillation* theScintProcessAlpha = new G4Scintillation("Scintillation");
|
|
// theScintProcessNuc->DumpPhysicsTable();
|
|
theScintProcessAlpha->SetTrackSecondariesFirst(true);
|
|
theScintProcessAlpha->SetScintillationYieldFactor(1.1);
|
|
theScintProcessAlpha->SetScintillationExcitationRatio(1.0);
|
|
theScintProcessAlpha->SetVerboseLevel(OpVerbLevel);
|
|
|
|
// scintillation process for heavy nuclei
|
|
G4bool theScintProcessNucNeverUsed = true;
|
|
G4Scintillation* theScintProcessNuc = new G4Scintillation("Scintillation");
|
|
// theScintProcessNuc->DumpPhysicsTable();
|
|
theScintProcessNuc->SetTrackSecondariesFirst(true);
|
|
theScintProcessNuc->SetScintillationYieldFactor(0.2);
|
|
theScintProcessNuc->SetScintillationExcitationRatio(1.0);
|
|
theScintProcessNuc->SetVerboseLevel(OpVerbLevel);
|
|
|
|
// optical processes
|
|
G4bool theAbsorptionProcessNeverUsed = true;
|
|
G4OpAbsorption* theAbsorptionProcess = new G4OpAbsorption();
|
|
// G4OpRayleigh* theRayleighScatteringProcess = new G4OpRayleigh();
|
|
G4bool theBoundaryProcessNeverUsed = true;
|
|
G4OpBoundaryProcess* theBoundaryProcess = new G4OpBoundaryProcess();
|
|
// theAbsorptionProcess->DumpPhysicsTable();
|
|
// theRayleighScatteringProcess->DumpPhysicsTable();
|
|
theAbsorptionProcess->SetVerboseLevel(OpVerbLevel);
|
|
// theRayleighScatteringProcess->SetVerboseLevel(OpVerbLevel);
|
|
theBoundaryProcess->SetVerboseLevel(OpVerbLevel);
|
|
|
|
this->theParticleIterator->reset();
|
|
while( (*(this->theParticleIterator))() )
|
|
{
|
|
G4ParticleDefinition* particle = this->theParticleIterator->value();
|
|
G4ProcessManager* pmanager = particle->GetProcessManager();
|
|
G4String particleName = particle->GetParticleName();
|
|
if (theScintProcessDef->IsApplicable(*particle)) {
|
|
// if(particle->GetPDGMass() > 5.0*CLHEP::GeV)
|
|
if(particle->GetParticleName() == "GenericIon") {
|
|
pmanager->AddProcess(theScintProcessNuc); // AtRestDiscrete
|
|
pmanager->SetProcessOrderingToLast(theScintProcessNuc,idxAtRest);
|
|
pmanager->SetProcessOrderingToLast(theScintProcessNuc,idxPostStep);
|
|
theScintProcessNucNeverUsed = false;
|
|
}
|
|
else if(particle->GetParticleName() == "alpha") {
|
|
pmanager->AddProcess(theScintProcessAlpha);
|
|
pmanager->SetProcessOrderingToLast(theScintProcessAlpha,idxAtRest);
|
|
pmanager->SetProcessOrderingToLast(theScintProcessAlpha,idxPostStep);
|
|
theScintProcessAlphaNeverUsed = false;
|
|
}
|
|
else {
|
|
pmanager->AddProcess(theScintProcessDef);
|
|
pmanager->SetProcessOrderingToLast(theScintProcessDef,idxAtRest);
|
|
pmanager->SetProcessOrderingToLast(theScintProcessDef,idxPostStep);
|
|
theScintProcessDefNeverUsed = false;
|
|
}
|
|
}
|
|
|
|
if (particleName == "opticalphoton") {
|
|
pmanager->AddDiscreteProcess(theAbsorptionProcess);
|
|
theAbsorptionProcessNeverUsed = false;
|
|
// pmanager->AddDiscreteProcess(theRayleighScatteringProcess);
|
|
theBoundaryProcessNeverUsed = false;
|
|
pmanager->AddDiscreteProcess(theBoundaryProcess);
|
|
}
|
|
}
|
|
if ( theScintProcessDefNeverUsed ) delete theScintProcessDef;
|
|
if ( theScintProcessAlphaNeverUsed ) delete theScintProcessAlpha;
|
|
if ( theScintProcessNucNeverUsed ) delete theScintProcessNuc;
|
|
if ( theBoundaryProcessNeverUsed ) delete theBoundaryProcess;
|
|
if ( theAbsorptionProcessNeverUsed ) delete theAbsorptionProcess;
|
|
if ( theBoundaryProcessNeverUsed ) delete theBoundaryProcess;
|
|
}
|
|
|
|
|
|
// Hadronic processes ////////////////////////////////////////////////////////
|
|
|
|
// Elastic processes:
|
|
#include "G4HadronElasticProcess.hh"
|
|
|
|
// Inelastic processes:
|
|
#include "G4PionPlusInelasticProcess.hh"
|
|
#include "G4PionMinusInelasticProcess.hh"
|
|
#include "G4KaonPlusInelasticProcess.hh"
|
|
#include "G4KaonZeroSInelasticProcess.hh"
|
|
#include "G4KaonZeroLInelasticProcess.hh"
|
|
#include "G4KaonMinusInelasticProcess.hh"
|
|
#include "G4ProtonInelasticProcess.hh"
|
|
#include "G4AntiProtonInelasticProcess.hh"
|
|
#include "G4NeutronInelasticProcess.hh"
|
|
#include "G4AntiNeutronInelasticProcess.hh"
|
|
#include "G4DeuteronInelasticProcess.hh"
|
|
#include "G4TritonInelasticProcess.hh"
|
|
#include "G4AlphaInelasticProcess.hh"
|
|
|
|
// Low-energy Models: < 20GeV
|
|
#include "G4LElastic.hh"
|
|
#include "G4LEPionPlusInelastic.hh"
|
|
#include "G4LEPionMinusInelastic.hh"
|
|
#include "G4LEKaonPlusInelastic.hh"
|
|
#include "G4LEKaonZeroSInelastic.hh"
|
|
#include "G4LEKaonZeroLInelastic.hh"
|
|
#include "G4LEKaonMinusInelastic.hh"
|
|
#include "G4LEProtonInelastic.hh"
|
|
#include "G4LEAntiProtonInelastic.hh"
|
|
#include "G4LENeutronInelastic.hh"
|
|
#include "G4LEAntiNeutronInelastic.hh"
|
|
#include "G4LEDeuteronInelastic.hh"
|
|
#include "G4LETritonInelastic.hh"
|
|
#include "G4LEAlphaInelastic.hh"
|
|
|
|
// High-energy Models: >20 GeV
|
|
#include "G4HEPionPlusInelastic.hh"
|
|
#include "G4HEPionMinusInelastic.hh"
|
|
#include "G4HEKaonPlusInelastic.hh"
|
|
#include "G4HEKaonZeroInelastic.hh"
|
|
#include "G4HEKaonZeroInelastic.hh"
|
|
#include "G4HEKaonMinusInelastic.hh"
|
|
#include "G4HEProtonInelastic.hh"
|
|
#include "G4HEAntiProtonInelastic.hh"
|
|
#include "G4HENeutronInelastic.hh"
|
|
#include "G4HEAntiNeutronInelastic.hh"
|
|
|
|
// Neutron high-precision models: <20 MeV
|
|
#include "G4NeutronHPElastic.hh"
|
|
#include "G4NeutronHPElasticData.hh"
|
|
#include "G4NeutronHPCapture.hh"
|
|
#include "G4NeutronHPCaptureData.hh"
|
|
#include "G4NeutronHPInelastic.hh"
|
|
#include "G4NeutronHPInelasticData.hh"
|
|
#include "G4LCapture.hh"
|
|
|
|
// Stopping processes
|
|
#include "G4PiMinusAbsorptionAtRest.hh"
|
|
#include "G4KaonMinusAbsorptionAtRest.hh"
|
|
#include "G4AntiProtonAnnihilationAtRest.hh"
|
|
#include "G4AntiNeutronAnnihilationAtRest.hh"
|
|
|
|
|
|
// ConstructHad()
|
|
// Makes discrete physics processes for the hadrons, at present limited
|
|
// to those particles with GHEISHA interactions (INTRC > 0).
|
|
// The processes are: Elastic scattering and Inelastic scattering.
|
|
// F.W.Jones 09-JUL-1998
|
|
template<class T> void TLBE<T>::ConstructHad()
|
|
{
|
|
G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
|
|
G4LElastic* theElasticModel = new G4LElastic;
|
|
theElasticProcess->RegisterMe(theElasticModel);
|
|
|
|
this->theParticleIterator->reset();
|
|
while ((*(this->theParticleIterator))())
|
|
{
|
|
G4ParticleDefinition* particle = this->theParticleIterator->value();
|
|
G4ProcessManager* pmanager = particle->GetProcessManager();
|
|
G4String particleName = particle->GetParticleName();
|
|
|
|
if (particleName == "pi+")
|
|
{
|
|
pmanager->AddDiscreteProcess(theElasticProcess);
|
|
G4PionPlusInelasticProcess* theInelasticProcess =
|
|
new G4PionPlusInelasticProcess("inelastic");
|
|
G4LEPionPlusInelastic* theLEInelasticModel =
|
|
new G4LEPionPlusInelastic;
|
|
theInelasticProcess->RegisterMe(theLEInelasticModel);
|
|
G4HEPionPlusInelastic* theHEInelasticModel =
|
|
new G4HEPionPlusInelastic;
|
|
theInelasticProcess->RegisterMe(theHEInelasticModel);
|
|
pmanager->AddDiscreteProcess(theInelasticProcess);
|
|
}
|
|
|
|
else if (particleName == "pi-")
|
|
{
|
|
pmanager->AddDiscreteProcess(theElasticProcess);
|
|
G4PionMinusInelasticProcess* theInelasticProcess =
|
|
new G4PionMinusInelasticProcess("inelastic");
|
|
G4LEPionMinusInelastic* theLEInelasticModel =
|
|
new G4LEPionMinusInelastic;
|
|
theInelasticProcess->RegisterMe(theLEInelasticModel);
|
|
G4HEPionMinusInelastic* theHEInelasticModel =
|
|
new G4HEPionMinusInelastic;
|
|
theInelasticProcess->RegisterMe(theHEInelasticModel);
|
|
pmanager->AddDiscreteProcess(theInelasticProcess);
|
|
G4String prcNam;
|
|
pmanager->AddRestProcess(new G4PiMinusAbsorptionAtRest, ordDefault);
|
|
}
|
|
|
|
else if (particleName == "kaon+")
|
|
{
|
|
pmanager->AddDiscreteProcess(theElasticProcess);
|
|
G4KaonPlusInelasticProcess* theInelasticProcess =
|
|
new G4KaonPlusInelasticProcess("inelastic");
|
|
G4LEKaonPlusInelastic* theLEInelasticModel =
|
|
new G4LEKaonPlusInelastic;
|
|
theInelasticProcess->RegisterMe(theLEInelasticModel);
|
|
G4HEKaonPlusInelastic* theHEInelasticModel =
|
|
new G4HEKaonPlusInelastic;
|
|
theInelasticProcess->RegisterMe(theHEInelasticModel);
|
|
pmanager->AddDiscreteProcess(theInelasticProcess);
|
|
}
|
|
|
|
else if (particleName == "kaon0S")
|
|
{
|
|
pmanager->AddDiscreteProcess(theElasticProcess);
|
|
G4KaonZeroSInelasticProcess* theInelasticProcess =
|
|
new G4KaonZeroSInelasticProcess("inelastic");
|
|
G4LEKaonZeroSInelastic* theLEInelasticModel =
|
|
new G4LEKaonZeroSInelastic;
|
|
theInelasticProcess->RegisterMe(theLEInelasticModel);
|
|
G4HEKaonZeroInelastic* theHEInelasticModel =
|
|
new G4HEKaonZeroInelastic;
|
|
theInelasticProcess->RegisterMe(theHEInelasticModel);
|
|
pmanager->AddDiscreteProcess(theInelasticProcess);
|
|
}
|
|
|
|
else if (particleName == "kaon0L")
|
|
{
|
|
pmanager->AddDiscreteProcess(theElasticProcess);
|
|
G4KaonZeroLInelasticProcess* theInelasticProcess =
|
|
new G4KaonZeroLInelasticProcess("inelastic");
|
|
G4LEKaonZeroLInelastic* theLEInelasticModel =
|
|
new G4LEKaonZeroLInelastic;
|
|
theInelasticProcess->RegisterMe(theLEInelasticModel);
|
|
G4HEKaonZeroInelastic* theHEInelasticModel =
|
|
new G4HEKaonZeroInelastic;
|
|
theInelasticProcess->RegisterMe(theHEInelasticModel);
|
|
pmanager->AddDiscreteProcess(theInelasticProcess);
|
|
}
|
|
|
|
else if (particleName == "kaon-")
|
|
{
|
|
pmanager->AddDiscreteProcess(theElasticProcess);
|
|
G4KaonMinusInelasticProcess* theInelasticProcess =
|
|
new G4KaonMinusInelasticProcess("inelastic");
|
|
G4LEKaonMinusInelastic* theLEInelasticModel =
|
|
new G4LEKaonMinusInelastic;
|
|
theInelasticProcess->RegisterMe(theLEInelasticModel);
|
|
G4HEKaonMinusInelastic* theHEInelasticModel =
|
|
new G4HEKaonMinusInelastic;
|
|
theInelasticProcess->RegisterMe(theHEInelasticModel);
|
|
pmanager->AddDiscreteProcess(theInelasticProcess);
|
|
pmanager->AddRestProcess(new G4KaonMinusAbsorptionAtRest, ordDefault);
|
|
}
|
|
|
|
else if (particleName == "proton")
|
|
{
|
|
pmanager->AddDiscreteProcess(theElasticProcess);
|
|
G4ProtonInelasticProcess* theInelasticProcess =
|
|
new G4ProtonInelasticProcess("inelastic");
|
|
G4LEProtonInelastic* theLEInelasticModel = new G4LEProtonInelastic;
|
|
theInelasticProcess->RegisterMe(theLEInelasticModel);
|
|
G4HEProtonInelastic* theHEInelasticModel = new G4HEProtonInelastic;
|
|
theInelasticProcess->RegisterMe(theHEInelasticModel);
|
|
pmanager->AddDiscreteProcess(theInelasticProcess);
|
|
}
|
|
|
|
else if (particleName == "anti_proton")
|
|
{
|
|
pmanager->AddDiscreteProcess(theElasticProcess);
|
|
G4AntiProtonInelasticProcess* theInelasticProcess =
|
|
new G4AntiProtonInelasticProcess("inelastic");
|
|
G4LEAntiProtonInelastic* theLEInelasticModel =
|
|
new G4LEAntiProtonInelastic;
|
|
theInelasticProcess->RegisterMe(theLEInelasticModel);
|
|
G4HEAntiProtonInelastic* theHEInelasticModel =
|
|
new G4HEAntiProtonInelastic;
|
|
theInelasticProcess->RegisterMe(theHEInelasticModel);
|
|
pmanager->AddDiscreteProcess(theInelasticProcess);
|
|
}
|
|
|
|
else if (particleName == "neutron") {
|
|
// elastic scattering
|
|
G4HadronElasticProcess* theNeutronElasticProcess =
|
|
new G4HadronElasticProcess;
|
|
G4LElastic* theElasticModel1 = new G4LElastic;
|
|
G4NeutronHPElastic * theElasticNeutron = new G4NeutronHPElastic;
|
|
theNeutronElasticProcess->RegisterMe(theElasticModel1);
|
|
theElasticModel1->SetMinEnergy(19*CLHEP::MeV);
|
|
theNeutronElasticProcess->RegisterMe(theElasticNeutron);
|
|
G4NeutronHPElasticData * theNeutronData = new G4NeutronHPElasticData;
|
|
theNeutronElasticProcess->AddDataSet(theNeutronData);
|
|
pmanager->AddDiscreteProcess(theNeutronElasticProcess);
|
|
// inelastic scattering
|
|
G4NeutronInelasticProcess* theInelasticProcess =
|
|
new G4NeutronInelasticProcess("inelastic");
|
|
G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic;
|
|
theInelasticModel->SetMinEnergy(19*CLHEP::MeV);
|
|
theInelasticProcess->RegisterMe(theInelasticModel);
|
|
G4NeutronHPInelastic * theLENeutronInelasticModel =
|
|
new G4NeutronHPInelastic;
|
|
theInelasticProcess->RegisterMe(theLENeutronInelasticModel);
|
|
G4NeutronHPInelasticData * theNeutronData1 =
|
|
new G4NeutronHPInelasticData;
|
|
theInelasticProcess->AddDataSet(theNeutronData1);
|
|
pmanager->AddDiscreteProcess(theInelasticProcess);
|
|
// capture
|
|
G4HadronCaptureProcess* theCaptureProcess =
|
|
new G4HadronCaptureProcess;
|
|
G4LCapture* theCaptureModel = new G4LCapture;
|
|
theCaptureModel->SetMinEnergy(19*CLHEP::MeV);
|
|
theCaptureProcess->RegisterMe(theCaptureModel);
|
|
G4NeutronHPCapture * theLENeutronCaptureModel = new G4NeutronHPCapture;
|
|
theCaptureProcess->RegisterMe(theLENeutronCaptureModel);
|
|
G4NeutronHPCaptureData * theNeutronData3 = new G4NeutronHPCaptureData;
|
|
theCaptureProcess->AddDataSet(theNeutronData3);
|
|
pmanager->AddDiscreteProcess(theCaptureProcess);
|
|
// G4ProcessManager* pmanager = G4Neutron::Neutron->GetProcessManager();
|
|
// pmanager->AddProcess(new G4UserSpecialCuts(),-1,-1,1);
|
|
}
|
|
else if (particleName == "anti_neutron")
|
|
{
|
|
pmanager->AddDiscreteProcess(theElasticProcess);
|
|
G4AntiNeutronInelasticProcess* theInelasticProcess =
|
|
new G4AntiNeutronInelasticProcess("inelastic");
|
|
G4LEAntiNeutronInelastic* theLEInelasticModel =
|
|
new G4LEAntiNeutronInelastic;
|
|
theInelasticProcess->RegisterMe(theLEInelasticModel);
|
|
G4HEAntiNeutronInelastic* theHEInelasticModel =
|
|
new G4HEAntiNeutronInelastic;
|
|
theInelasticProcess->RegisterMe(theHEInelasticModel);
|
|
pmanager->AddDiscreteProcess(theInelasticProcess);
|
|
}
|
|
|
|
else if (particleName == "deuteron")
|
|
{
|
|
pmanager->AddDiscreteProcess(theElasticProcess);
|
|
G4DeuteronInelasticProcess* theInelasticProcess =
|
|
new G4DeuteronInelasticProcess("inelastic");
|
|
G4LEDeuteronInelastic* theLEInelasticModel =
|
|
new G4LEDeuteronInelastic;
|
|
theInelasticProcess->RegisterMe(theLEInelasticModel);
|
|
pmanager->AddDiscreteProcess(theInelasticProcess);
|
|
}
|
|
|
|
else if (particleName == "triton")
|
|
{
|
|
pmanager->AddDiscreteProcess(theElasticProcess);
|
|
G4TritonInelasticProcess* theInelasticProcess =
|
|
new G4TritonInelasticProcess("inelastic");
|
|
G4LETritonInelastic* theLEInelasticModel =
|
|
new G4LETritonInelastic;
|
|
theInelasticProcess->RegisterMe(theLEInelasticModel);
|
|
pmanager->AddDiscreteProcess(theInelasticProcess);
|
|
}
|
|
|
|
else if (particleName == "alpha")
|
|
{
|
|
pmanager->AddDiscreteProcess(theElasticProcess);
|
|
G4AlphaInelasticProcess* theInelasticProcess =
|
|
new G4AlphaInelasticProcess("inelastic");
|
|
G4LEAlphaInelastic* theLEInelasticModel =
|
|
new G4LEAlphaInelastic;
|
|
theInelasticProcess->RegisterMe(theLEInelasticModel);
|
|
pmanager->AddDiscreteProcess(theInelasticProcess);
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
|
|
// Decays ///////////////////////////////////////////////////////////////////
|
|
#include "G4Decay.hh"
|
|
#include "G4RadioactiveDecay.hh"
|
|
#include "G4IonTable.hh"
|
|
#include "G4Ions.hh"
|
|
|
|
template<class T> void TLBE<T>::ConstructGeneral() {
|
|
|
|
// Add Decay Process
|
|
G4Decay* theDecayProcess = new G4Decay();
|
|
G4bool theDecayProcessNeverUsed = true; //Check if theDecayProcess will be used
|
|
this->theParticleIterator->reset();
|
|
while( (*(this->theParticleIterator))() )
|
|
{
|
|
G4ParticleDefinition* particle = this->theParticleIterator->value();
|
|
G4ProcessManager* pmanager = particle->GetProcessManager();
|
|
|
|
if (theDecayProcess->IsApplicable(*particle) && !particle->IsShortLived())
|
|
{
|
|
theDecayProcessNeverUsed = false;
|
|
pmanager ->AddProcess(theDecayProcess);
|
|
// set ordering for PostStepDoIt and AtRestDoIt
|
|
pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
|
|
pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
|
|
}
|
|
}
|
|
|
|
// Declare radioactive decay to the GenericIon in the IonTable.
|
|
const G4IonTable *theIonTable =
|
|
G4ParticleTable::GetParticleTable()->GetIonTable();
|
|
G4RadioactiveDecay *theRadioactiveDecay = new G4RadioactiveDecay();
|
|
|
|
for (G4int i=0; i<theIonTable->Entries(); i++)
|
|
{
|
|
G4String particleName = theIonTable->GetParticle(i)->GetParticleName();
|
|
G4String particleType = theIonTable->GetParticle(i)->GetParticleType();
|
|
|
|
if (particleName == "GenericIon")
|
|
{
|
|
G4ProcessManager* pmanager =
|
|
theIonTable->GetParticle(i)->GetProcessManager();
|
|
pmanager->SetVerboseLevel(VerboseLevel);
|
|
pmanager ->AddProcess(theRadioactiveDecay);
|
|
pmanager ->SetProcessOrdering(theRadioactiveDecay, idxPostStep);
|
|
pmanager ->SetProcessOrdering(theRadioactiveDecay, idxAtRest);
|
|
}
|
|
}
|
|
//If we actually never used the process, delete it
|
|
//From Coverity report
|
|
if ( theDecayProcessNeverUsed ) delete theDecayProcess;
|
|
}
|
|
|
|
// Cuts /////////////////////////////////////////////////////////////////////
|
|
template<class T> void TLBE<T>::SetCuts()
|
|
{
|
|
|
|
if (this->verboseLevel >1)
|
|
G4cout << "LBE::SetCuts:";
|
|
|
|
if (this->verboseLevel>0){
|
|
G4cout << "LBE::SetCuts:";
|
|
G4cout << "CutLength : "
|
|
<< G4BestUnit(this->defaultCutValue,"Length") << G4endl;
|
|
}
|
|
|
|
//special for low energy physics
|
|
G4double lowlimit=250*CLHEP::eV;
|
|
G4ProductionCutsTable * aPCTable = G4ProductionCutsTable::GetProductionCutsTable();
|
|
aPCTable->SetEnergyRange(lowlimit,100*CLHEP::GeV);
|
|
|
|
// set cut values for gamma at first and for e- second and next for e+,
|
|
// because some processes for e+/e- need cut values for gamma
|
|
this->SetCutValue(cutForGamma, "gamma");
|
|
this->SetCutValue(cutForElectron, "e-");
|
|
this->SetCutValue(cutForPositron, "e+");
|
|
|
|
// this->SetCutValue(cutForProton, "proton");
|
|
// this->SetCutValue(cutForProton, "anti_proton");
|
|
// this->SetCutValue(cutForAlpha, "alpha");
|
|
// this->SetCutValue(cutForGenericIon, "GenericIon");
|
|
|
|
// this->SetCutValueForOthers(this->defaultCutValue);
|
|
|
|
if (this->verboseLevel>0) this->DumpCutValuesTable();
|
|
}
|
|
|