Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm5/src/DetectorConstruction.cc
|
||||
/// \brief Implementation of the DetectorConstruction class
|
||||
//
|
||||
// $Id: DetectorConstruction.cc 103050 2017-03-10 15:50:39Z gcosmo $
|
||||
// $Id: DetectorConstruction.cc 109000 2018-03-21 09:25:56Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -58,22 +58,22 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
DetectorConstruction::DetectorConstruction()
|
||||
:G4VUserDetectorConstruction(),
|
||||
fAbsorberMaterial(0),fWorldMaterial(0),fDefaultWorld(true),
|
||||
fSolidWorld(0),fLogicWorld(0),fPhysiWorld(0),
|
||||
fSolidAbsorber(0),fLogicAbsorber(0),fPhysiAbsorber(0),
|
||||
fDetectorMessenger(0)
|
||||
: G4VUserDetectorConstruction(),
|
||||
fAbsorberMaterial(nullptr),fWorldMaterial(nullptr),fDefaultWorld(true),
|
||||
fSolidWorld(nullptr),fLogicWorld(nullptr),fPhysiWorld(nullptr),
|
||||
fSolidAbsorber(nullptr),fLogicAbsorber(nullptr),fPhysiAbsorber(nullptr),
|
||||
fDetectorMessenger(nullptr)
|
||||
{
|
||||
// default parameter values of the calorimeter
|
||||
fAbsorberThickness = 1.*cm;
|
||||
fAbsorberSizeYZ = 2.*cm;
|
||||
fXposAbs = 0.*cm;
|
||||
ComputeCalorParameters();
|
||||
ComputeGeomParameters();
|
||||
|
||||
// materials
|
||||
DefineMaterials();
|
||||
SetWorldMaterial ("Galactic");
|
||||
SetAbsorberMaterial("Silicon");
|
||||
SetWorldMaterial ("G4_Galactic");
|
||||
SetAbsorberMaterial("G4_Si");
|
||||
|
||||
// create commands for interactive definition of the calorimeter
|
||||
fDetectorMessenger = new DetectorMessenger(this);
|
||||
@@ -88,13 +88,6 @@ DetectorConstruction::~DetectorConstruction()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4VPhysicalVolume* DetectorConstruction::Construct()
|
||||
{
|
||||
return ConstructCalorimeter();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void DetectorConstruction::DefineMaterials()
|
||||
{
|
||||
//This function illustrates the possible ways to define materials
|
||||
@@ -254,7 +247,7 @@ void DetectorConstruction::DefineMaterials()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void DetectorConstruction::ComputeCalorParameters()
|
||||
void DetectorConstruction::ComputeGeomParameters()
|
||||
{
|
||||
// Compute derived parameters of the calorimeter
|
||||
fXstartAbs = fXposAbs-0.5*fAbsorberThickness;
|
||||
@@ -273,8 +266,9 @@ void DetectorConstruction::ComputeCalorParameters()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4VPhysicalVolume* DetectorConstruction::ConstructCalorimeter()
|
||||
G4VPhysicalVolume* DetectorConstruction::Construct()
|
||||
{
|
||||
if(fPhysiWorld) { return fPhysiWorld; }
|
||||
// World
|
||||
//
|
||||
fSolidWorld = new G4Box("World", //its name
|
||||
@@ -309,7 +303,7 @@ G4VPhysicalVolume* DetectorConstruction::ConstructCalorimeter()
|
||||
false, //no boulean operat
|
||||
0); //copy number
|
||||
|
||||
PrintCalorParameters();
|
||||
PrintGeomParameters();
|
||||
|
||||
//always return the physical World
|
||||
//
|
||||
@@ -318,7 +312,7 @@ G4VPhysicalVolume* DetectorConstruction::ConstructCalorimeter()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void DetectorConstruction::PrintCalorParameters()
|
||||
void DetectorConstruction::PrintGeomParameters()
|
||||
{
|
||||
G4cout << "\n" << fWorldMaterial << G4endl;
|
||||
G4cout << "\n" << fAbsorberMaterial << G4endl;
|
||||
@@ -339,7 +333,7 @@ void DetectorConstruction::PrintCalorParameters()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void DetectorConstruction::SetAbsorberMaterial(G4String materialChoice)
|
||||
void DetectorConstruction::SetAbsorberMaterial(const G4String& materialChoice)
|
||||
{
|
||||
// search the material by its name
|
||||
G4Material* pttoMaterial =
|
||||
@@ -354,7 +348,7 @@ void DetectorConstruction::SetAbsorberMaterial(G4String materialChoice)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void DetectorConstruction::SetWorldMaterial(G4String materialChoice)
|
||||
void DetectorConstruction::SetWorldMaterial(const G4String& materialChoice)
|
||||
{
|
||||
// search the material by its name
|
||||
G4Material* pttoMaterial =
|
||||
@@ -372,7 +366,7 @@ void DetectorConstruction::SetWorldMaterial(G4String materialChoice)
|
||||
void DetectorConstruction::SetAbsorberThickness(G4double val)
|
||||
{
|
||||
fAbsorberThickness = val;
|
||||
ComputeCalorParameters();
|
||||
ComputeGeomParameters();
|
||||
if(fPhysiWorld) { ChangeGeometry(); }
|
||||
}
|
||||
|
||||
@@ -381,7 +375,7 @@ void DetectorConstruction::SetAbsorberThickness(G4double val)
|
||||
void DetectorConstruction::SetAbsorberSizeYZ(G4double val)
|
||||
{
|
||||
fAbsorberSizeYZ = val;
|
||||
ComputeCalorParameters();
|
||||
ComputeGeomParameters();
|
||||
if(fPhysiWorld) { ChangeGeometry(); }
|
||||
}
|
||||
|
||||
@@ -391,7 +385,7 @@ void DetectorConstruction::SetWorldSizeX(G4double val)
|
||||
{
|
||||
fWorldSizeX = val;
|
||||
fDefaultWorld = false;
|
||||
ComputeCalorParameters();
|
||||
ComputeGeomParameters();
|
||||
if(fPhysiWorld) { ChangeGeometry(); }
|
||||
}
|
||||
|
||||
@@ -401,7 +395,7 @@ void DetectorConstruction::SetWorldSizeYZ(G4double val)
|
||||
{
|
||||
fWorldSizeYZ = val;
|
||||
fDefaultWorld = false;
|
||||
ComputeCalorParameters();
|
||||
ComputeGeomParameters();
|
||||
if(fPhysiWorld) { ChangeGeometry(); }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,357 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: PhysListEm19DStandard
|
||||
//
|
||||
// Author: Jose Luis Rodriguez 18.04.2018
|
||||
//
|
||||
// Modified:
|
||||
// 18.04.2018 Created from PhysListEm5DStandard
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#include "PhysListEm19DStandard.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4EmParameters.hh"
|
||||
#include "G4LossTableManager.hh"
|
||||
|
||||
#include "G4ComptonScattering.hh"
|
||||
#include "G4GammaConversion.hh"
|
||||
#include "G4PhotoElectricEffect.hh"
|
||||
#include "G4RayleighScattering.hh"
|
||||
#include "G4BetheHeitler5DModel.hh"
|
||||
|
||||
#include "G4eMultipleScattering.hh"
|
||||
#include "G4MuMultipleScattering.hh"
|
||||
#include "G4hMultipleScattering.hh"
|
||||
#include "G4CoulombScattering.hh"
|
||||
#include "G4eCoulombScatteringModel.hh"
|
||||
#include "G4WentzelVIModel.hh"
|
||||
#include "G4UrbanMscModel.hh"
|
||||
#include "G4BraggIonModel.hh"
|
||||
|
||||
#include "G4MuBremsstrahlungModel.hh"
|
||||
#include "G4MuPairProductionModel.hh"
|
||||
#include "G4hBremsstrahlungModel.hh"
|
||||
#include "G4hPairProductionModel.hh"
|
||||
|
||||
#include "G4eIonisation.hh"
|
||||
#include "G4eBremsstrahlung.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
#include "G4UAtomicDeexcitation.hh"
|
||||
|
||||
#include "G4MuIonisation.hh"
|
||||
#include "G4MuBremsstrahlung.hh"
|
||||
#include "G4MuPairProduction.hh"
|
||||
#include "G4hBremsstrahlung.hh"
|
||||
#include "G4hPairProduction.hh"
|
||||
|
||||
#include "G4hIonisation.hh"
|
||||
#include "G4ionIonisation.hh"
|
||||
#include "G4alphaIonisation.hh"
|
||||
#include "G4AtimaEnergyLossModel.hh"
|
||||
#include "G4AtimaFluctuations.hh"
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4KaonPlus.hh"
|
||||
#include "G4KaonMinus.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4Triton.hh"
|
||||
#include "G4He3.hh"
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
|
||||
#include "G4PhysicsListHelper.hh"
|
||||
#include "G4BuilderType.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListEm19DStandard::PhysListEm19DStandard(G4int ver, const G4String&)
|
||||
: G4VPhysicsConstructor("G4EmStandard_ATIMA"), verbose(ver)
|
||||
{
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
param->SetDefaults();
|
||||
param->SetVerbose(verbose);
|
||||
param->SetNumberOfBinsPerDecade(10);
|
||||
param->SetMscStepLimitType(fUseSafetyPlus);
|
||||
param->SetLateralDisplacementAlg96(false);
|
||||
param->SetFluo(true);
|
||||
SetPhysicsType(bElectromagnetic);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListEm19DStandard::~PhysListEm19DStandard()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysListEm19DStandard::ConstructParticle()
|
||||
{
|
||||
// gamma
|
||||
G4Gamma::Gamma();
|
||||
|
||||
// leptons
|
||||
G4Electron::Electron();
|
||||
G4Positron::Positron();
|
||||
G4MuonPlus::MuonPlus();
|
||||
G4MuonMinus::MuonMinus();
|
||||
|
||||
// mesons
|
||||
G4PionPlus::PionPlusDefinition();
|
||||
G4PionMinus::PionMinusDefinition();
|
||||
G4KaonPlus::KaonPlusDefinition();
|
||||
G4KaonMinus::KaonMinusDefinition();
|
||||
|
||||
// barions
|
||||
G4Proton::Proton();
|
||||
G4AntiProton::AntiProton();
|
||||
|
||||
// ions
|
||||
G4Deuteron::Deuteron();
|
||||
G4Triton::Triton();
|
||||
G4He3::He3();
|
||||
G4Alpha::Alpha();
|
||||
G4GenericIon::GenericIonDefinition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysListEm19DStandard::ConstructProcess()
|
||||
{
|
||||
if(verbose > 1) {
|
||||
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
|
||||
}
|
||||
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
|
||||
|
||||
// muon & hadron bremsstrahlung and pair production
|
||||
G4MuBremsstrahlung* mub = new G4MuBremsstrahlung();
|
||||
G4MuPairProduction* mup = new G4MuPairProduction();
|
||||
G4hBremsstrahlung* pib = new G4hBremsstrahlung();
|
||||
G4hPairProduction* pip = new G4hPairProduction();
|
||||
G4hBremsstrahlung* kb = new G4hBremsstrahlung();
|
||||
G4hPairProduction* kp = new G4hPairProduction();
|
||||
G4hBremsstrahlung* pb = new G4hBremsstrahlung();
|
||||
G4hPairProduction* pp = new G4hPairProduction();
|
||||
|
||||
// muon & hadron multiple scattering
|
||||
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
|
||||
mumsc->AddEmModel(0, new G4WentzelVIModel());
|
||||
G4CoulombScattering* muss = new G4CoulombScattering();
|
||||
|
||||
G4MuMultipleScattering* pimsc = new G4MuMultipleScattering();
|
||||
pimsc->AddEmModel(0, new G4WentzelVIModel());
|
||||
G4CoulombScattering* piss = new G4CoulombScattering();
|
||||
|
||||
G4MuMultipleScattering* kmsc = new G4MuMultipleScattering();
|
||||
kmsc->AddEmModel(0, new G4WentzelVIModel());
|
||||
G4CoulombScattering* kss = new G4CoulombScattering();
|
||||
|
||||
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
|
||||
|
||||
// high energy limit for e+- scattering models
|
||||
G4double highEnergyLimit = 100*MeV;
|
||||
|
||||
// Add standard EM Processes
|
||||
auto myParticleIterator=GetParticleIterator();
|
||||
myParticleIterator->reset();
|
||||
while( (*myParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = myParticleIterator->value();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
if (particleName == "gamma") {
|
||||
|
||||
// photo-effect and Compton
|
||||
ph->RegisterProcess(new G4PhotoElectricEffect(), particle);
|
||||
ph->RegisterProcess(new G4ComptonScattering(), particle);
|
||||
|
||||
// Gamma conversion
|
||||
G4GammaConversion* gc = new G4GammaConversion();
|
||||
G4VEmModel* theGC5DModel = new G4BetheHeitler5DModel();
|
||||
gc->SetEmModel(theGC5DModel);
|
||||
ph->RegisterProcess(gc, particle);
|
||||
|
||||
// Rayleigh scattering
|
||||
ph->RegisterProcess(new G4RayleighScattering(), particle);
|
||||
|
||||
} else if (particleName == "e-") {
|
||||
|
||||
G4eMultipleScattering* msc = new G4eMultipleScattering;
|
||||
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
|
||||
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
|
||||
msc1->SetHighEnergyLimit(highEnergyLimit);
|
||||
msc2->SetLowEnergyLimit(highEnergyLimit);
|
||||
msc->AddEmModel(0, msc1);
|
||||
msc->AddEmModel(0, msc2);
|
||||
|
||||
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
|
||||
G4CoulombScattering* ss = new G4CoulombScattering();
|
||||
ss->SetEmModel(ssm, 1);
|
||||
ss->SetMinKinEnergy(highEnergyLimit);
|
||||
ssm->SetLowEnergyLimit(highEnergyLimit);
|
||||
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
|
||||
|
||||
ph->RegisterProcess(msc, particle);
|
||||
ph->RegisterProcess(new G4eIonisation(), particle);
|
||||
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
|
||||
ph->RegisterProcess(ss, particle);
|
||||
|
||||
} else if (particleName == "e+") {
|
||||
|
||||
G4eMultipleScattering* msc = new G4eMultipleScattering;
|
||||
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
|
||||
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
|
||||
msc1->SetHighEnergyLimit(highEnergyLimit);
|
||||
msc2->SetLowEnergyLimit(highEnergyLimit);
|
||||
msc->AddEmModel(0, msc1);
|
||||
msc->AddEmModel(0, msc2);
|
||||
|
||||
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
|
||||
G4CoulombScattering* ss = new G4CoulombScattering();
|
||||
ss->SetEmModel(ssm, 1);
|
||||
ss->SetMinKinEnergy(highEnergyLimit);
|
||||
ssm->SetLowEnergyLimit(highEnergyLimit);
|
||||
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
|
||||
|
||||
ph->RegisterProcess(msc, particle);
|
||||
ph->RegisterProcess(new G4eIonisation(), particle);
|
||||
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
|
||||
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
|
||||
ph->RegisterProcess(ss, particle);
|
||||
|
||||
} else if (particleName == "mu+" ||
|
||||
particleName == "mu-" ) {
|
||||
|
||||
ph->RegisterProcess(mumsc, particle);
|
||||
ph->RegisterProcess(new G4MuIonisation(), particle);
|
||||
ph->RegisterProcess(mub, particle);
|
||||
ph->RegisterProcess(mup, particle);
|
||||
ph->RegisterProcess(muss, particle);
|
||||
|
||||
} else if (particleName == "alpha" ||
|
||||
particleName == "He3") {
|
||||
|
||||
ph->RegisterProcess(new G4hMultipleScattering(), particle);
|
||||
ph->RegisterProcess(new G4ionIonisation(), particle);
|
||||
|
||||
} else if (particleName == "GenericIon") {
|
||||
|
||||
G4ionIonisation* ionIoni = new G4ionIonisation();
|
||||
ionIoni->SetEmModel(new G4BraggIonModel(),0);
|
||||
ionIoni->SetEmModel(new G4AtimaEnergyLossModel(),1);
|
||||
ionIoni->SetFluctModel(new G4AtimaFluctuations());
|
||||
|
||||
ph->RegisterProcess(hmsc, particle);
|
||||
ph->RegisterProcess(ionIoni, particle);
|
||||
|
||||
} else if (particleName == "pi+" ||
|
||||
particleName == "pi-" ) {
|
||||
|
||||
ph->RegisterProcess(pimsc, particle);
|
||||
ph->RegisterProcess(new G4hIonisation(), particle);
|
||||
ph->RegisterProcess(pib, particle);
|
||||
ph->RegisterProcess(pip, particle);
|
||||
ph->RegisterProcess(piss, particle);
|
||||
|
||||
} else if (particleName == "kaon+" ||
|
||||
particleName == "kaon-" ) {
|
||||
|
||||
ph->RegisterProcess(kmsc, particle);
|
||||
ph->RegisterProcess(new G4hIonisation(), particle);
|
||||
ph->RegisterProcess(kb, particle);
|
||||
ph->RegisterProcess(kp, particle);
|
||||
ph->RegisterProcess(kss, particle);
|
||||
|
||||
} else if (particleName == "proton" ||
|
||||
particleName == "anti_proton") {
|
||||
|
||||
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
|
||||
pmsc->SetEmModel(new G4WentzelVIModel());
|
||||
G4hIonisation* hIoni = new G4hIonisation();
|
||||
hIoni->SetStepFunction(0.1, 10*um);
|
||||
|
||||
ph->RegisterProcess(pmsc, particle);
|
||||
ph->RegisterProcess(hIoni, particle);
|
||||
ph->RegisterProcess(pb, particle);
|
||||
ph->RegisterProcess(pp, particle);
|
||||
ph->RegisterProcess(new G4CoulombScattering(), particle);
|
||||
|
||||
} else if (particleName == "B+" ||
|
||||
particleName == "B-" ||
|
||||
particleName == "D+" ||
|
||||
particleName == "D-" ||
|
||||
particleName == "Ds+" ||
|
||||
particleName == "Ds-" ||
|
||||
particleName == "anti_He3" ||
|
||||
particleName == "anti_alpha" ||
|
||||
particleName == "anti_deuteron" ||
|
||||
particleName == "anti_lambda_c+" ||
|
||||
particleName == "anti_omega-" ||
|
||||
particleName == "anti_sigma_c+" ||
|
||||
particleName == "anti_sigma_c++" ||
|
||||
particleName == "anti_sigma+" ||
|
||||
particleName == "anti_sigma-" ||
|
||||
particleName == "anti_triton" ||
|
||||
particleName == "anti_xi_c+" ||
|
||||
particleName == "anti_xi-" ||
|
||||
particleName == "deuteron" ||
|
||||
particleName == "lambda_c+" ||
|
||||
particleName == "omega-" ||
|
||||
particleName == "sigma_c+" ||
|
||||
particleName == "sigma_c++" ||
|
||||
particleName == "sigma+" ||
|
||||
particleName == "sigma-" ||
|
||||
particleName == "tau+" ||
|
||||
particleName == "tau-" ||
|
||||
particleName == "triton" ||
|
||||
particleName == "xi_c+" ||
|
||||
particleName == "xi-" ) {
|
||||
|
||||
ph->RegisterProcess(hmsc, particle);
|
||||
ph->RegisterProcess(new G4hIonisation(), particle);
|
||||
}
|
||||
}
|
||||
|
||||
// Deexcitation
|
||||
//
|
||||
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
|
||||
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -0,0 +1,349 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: PhysListEm5DStandard
|
||||
//
|
||||
// Author: IgS 07.11.2017
|
||||
//
|
||||
// Modified:
|
||||
// 17.11.2017 Created using PhysListEm5DStandard from V.Ivanchenko
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#include "PhysListEm5DStandard.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4EmParameters.hh"
|
||||
#include "G4LossTableManager.hh"
|
||||
|
||||
#include "G4ComptonScattering.hh"
|
||||
#include "G4GammaConversion.hh"
|
||||
#include "G4PhotoElectricEffect.hh"
|
||||
#include "G4RayleighScattering.hh"
|
||||
#include "G4BetheHeitler5DModel.hh"
|
||||
|
||||
#include "G4eMultipleScattering.hh"
|
||||
#include "G4MuMultipleScattering.hh"
|
||||
#include "G4hMultipleScattering.hh"
|
||||
#include "G4CoulombScattering.hh"
|
||||
#include "G4eCoulombScatteringModel.hh"
|
||||
#include "G4WentzelVIModel.hh"
|
||||
#include "G4UrbanMscModel.hh"
|
||||
|
||||
#include "G4MuBremsstrahlungModel.hh"
|
||||
#include "G4MuPairProductionModel.hh"
|
||||
#include "G4hBremsstrahlungModel.hh"
|
||||
#include "G4hPairProductionModel.hh"
|
||||
|
||||
#include "G4eIonisation.hh"
|
||||
#include "G4eBremsstrahlung.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
#include "G4UAtomicDeexcitation.hh"
|
||||
|
||||
#include "G4MuIonisation.hh"
|
||||
#include "G4MuBremsstrahlung.hh"
|
||||
#include "G4MuPairProduction.hh"
|
||||
#include "G4hBremsstrahlung.hh"
|
||||
#include "G4hPairProduction.hh"
|
||||
|
||||
#include "G4hIonisation.hh"
|
||||
#include "G4ionIonisation.hh"
|
||||
#include "G4alphaIonisation.hh"
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4KaonPlus.hh"
|
||||
#include "G4KaonMinus.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4Triton.hh"
|
||||
#include "G4He3.hh"
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
|
||||
#include "G4PhysicsListHelper.hh"
|
||||
#include "G4BuilderType.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListEm5DStandard::PhysListEm5DStandard(G4int ver, const G4String&)
|
||||
: G4VPhysicsConstructor("G4EmStandard_5D"), verbose(ver)
|
||||
{
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
param->SetDefaults();
|
||||
param->SetVerbose(verbose);
|
||||
param->SetNumberOfBinsPerDecade(10);
|
||||
param->SetMscStepLimitType(fUseSafetyPlus);
|
||||
param->SetLateralDisplacementAlg96(false);
|
||||
param->SetFluo(true);
|
||||
SetPhysicsType(bElectromagnetic);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListEm5DStandard::~PhysListEm5DStandard()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysListEm5DStandard::ConstructParticle()
|
||||
{
|
||||
// gamma
|
||||
G4Gamma::Gamma();
|
||||
|
||||
// leptons
|
||||
G4Electron::Electron();
|
||||
G4Positron::Positron();
|
||||
G4MuonPlus::MuonPlus();
|
||||
G4MuonMinus::MuonMinus();
|
||||
|
||||
// mesons
|
||||
G4PionPlus::PionPlusDefinition();
|
||||
G4PionMinus::PionMinusDefinition();
|
||||
G4KaonPlus::KaonPlusDefinition();
|
||||
G4KaonMinus::KaonMinusDefinition();
|
||||
|
||||
// barions
|
||||
G4Proton::Proton();
|
||||
G4AntiProton::AntiProton();
|
||||
|
||||
// ions
|
||||
G4Deuteron::Deuteron();
|
||||
G4Triton::Triton();
|
||||
G4He3::He3();
|
||||
G4Alpha::Alpha();
|
||||
G4GenericIon::GenericIonDefinition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysListEm5DStandard::ConstructProcess()
|
||||
{
|
||||
if(verbose > 1) {
|
||||
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
|
||||
}
|
||||
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
|
||||
|
||||
// muon & hadron bremsstrahlung and pair production
|
||||
G4MuBremsstrahlung* mub = new G4MuBremsstrahlung();
|
||||
G4MuPairProduction* mup = new G4MuPairProduction();
|
||||
G4hBremsstrahlung* pib = new G4hBremsstrahlung();
|
||||
G4hPairProduction* pip = new G4hPairProduction();
|
||||
G4hBremsstrahlung* kb = new G4hBremsstrahlung();
|
||||
G4hPairProduction* kp = new G4hPairProduction();
|
||||
G4hBremsstrahlung* pb = new G4hBremsstrahlung();
|
||||
G4hPairProduction* pp = new G4hPairProduction();
|
||||
|
||||
// muon & hadron multiple scattering
|
||||
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
|
||||
mumsc->AddEmModel(0, new G4WentzelVIModel());
|
||||
G4CoulombScattering* muss = new G4CoulombScattering();
|
||||
|
||||
G4MuMultipleScattering* pimsc = new G4MuMultipleScattering();
|
||||
pimsc->AddEmModel(0, new G4WentzelVIModel());
|
||||
G4CoulombScattering* piss = new G4CoulombScattering();
|
||||
|
||||
G4MuMultipleScattering* kmsc = new G4MuMultipleScattering();
|
||||
kmsc->AddEmModel(0, new G4WentzelVIModel());
|
||||
G4CoulombScattering* kss = new G4CoulombScattering();
|
||||
|
||||
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
|
||||
|
||||
// high energy limit for e+- scattering models
|
||||
G4double highEnergyLimit = 100*MeV;
|
||||
|
||||
// Add standard EM Processes
|
||||
auto myParticleIterator=GetParticleIterator();
|
||||
myParticleIterator->reset();
|
||||
while( (*myParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = myParticleIterator->value();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
if (particleName == "gamma") {
|
||||
|
||||
// photo-effect and Compton
|
||||
ph->RegisterProcess(new G4PhotoElectricEffect(), particle);
|
||||
ph->RegisterProcess(new G4ComptonScattering(), particle);
|
||||
|
||||
// Gamma conversion
|
||||
G4GammaConversion* gc = new G4GammaConversion();
|
||||
G4VEmModel* theGC5DModel = new G4BetheHeitler5DModel();
|
||||
gc->SetEmModel(theGC5DModel);
|
||||
ph->RegisterProcess(gc, particle);
|
||||
|
||||
// Rayleigh scattering
|
||||
ph->RegisterProcess(new G4RayleighScattering(), particle);
|
||||
|
||||
} else if (particleName == "e-") {
|
||||
|
||||
G4eMultipleScattering* msc = new G4eMultipleScattering;
|
||||
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
|
||||
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
|
||||
msc1->SetHighEnergyLimit(highEnergyLimit);
|
||||
msc2->SetLowEnergyLimit(highEnergyLimit);
|
||||
msc->AddEmModel(0, msc1);
|
||||
msc->AddEmModel(0, msc2);
|
||||
|
||||
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
|
||||
G4CoulombScattering* ss = new G4CoulombScattering();
|
||||
ss->SetEmModel(ssm, 1);
|
||||
ss->SetMinKinEnergy(highEnergyLimit);
|
||||
ssm->SetLowEnergyLimit(highEnergyLimit);
|
||||
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
|
||||
|
||||
ph->RegisterProcess(msc, particle);
|
||||
ph->RegisterProcess(new G4eIonisation(), particle);
|
||||
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
|
||||
ph->RegisterProcess(ss, particle);
|
||||
|
||||
} else if (particleName == "e+") {
|
||||
|
||||
G4eMultipleScattering* msc = new G4eMultipleScattering;
|
||||
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
|
||||
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
|
||||
msc1->SetHighEnergyLimit(highEnergyLimit);
|
||||
msc2->SetLowEnergyLimit(highEnergyLimit);
|
||||
msc->AddEmModel(0, msc1);
|
||||
msc->AddEmModel(0, msc2);
|
||||
|
||||
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
|
||||
G4CoulombScattering* ss = new G4CoulombScattering();
|
||||
ss->SetEmModel(ssm, 1);
|
||||
ss->SetMinKinEnergy(highEnergyLimit);
|
||||
ssm->SetLowEnergyLimit(highEnergyLimit);
|
||||
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
|
||||
|
||||
ph->RegisterProcess(msc, particle);
|
||||
ph->RegisterProcess(new G4eIonisation(), particle);
|
||||
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
|
||||
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
|
||||
ph->RegisterProcess(ss, particle);
|
||||
|
||||
} else if (particleName == "mu+" ||
|
||||
particleName == "mu-" ) {
|
||||
|
||||
ph->RegisterProcess(mumsc, particle);
|
||||
ph->RegisterProcess(new G4MuIonisation(), particle);
|
||||
ph->RegisterProcess(mub, particle);
|
||||
ph->RegisterProcess(mup, particle);
|
||||
ph->RegisterProcess(muss, particle);
|
||||
|
||||
} else if (particleName == "alpha" ||
|
||||
particleName == "He3") {
|
||||
|
||||
ph->RegisterProcess(new G4hMultipleScattering(), particle);
|
||||
ph->RegisterProcess(new G4ionIonisation(), particle);
|
||||
|
||||
} else if (particleName == "GenericIon") {
|
||||
|
||||
ph->RegisterProcess(hmsc, particle);
|
||||
ph->RegisterProcess(new G4ionIonisation(), particle);
|
||||
|
||||
} else if (particleName == "pi+" ||
|
||||
particleName == "pi-" ) {
|
||||
|
||||
ph->RegisterProcess(pimsc, particle);
|
||||
ph->RegisterProcess(new G4hIonisation(), particle);
|
||||
ph->RegisterProcess(pib, particle);
|
||||
ph->RegisterProcess(pip, particle);
|
||||
ph->RegisterProcess(piss, particle);
|
||||
|
||||
} else if (particleName == "kaon+" ||
|
||||
particleName == "kaon-" ) {
|
||||
|
||||
ph->RegisterProcess(kmsc, particle);
|
||||
ph->RegisterProcess(new G4hIonisation(), particle);
|
||||
ph->RegisterProcess(kb, particle);
|
||||
ph->RegisterProcess(kp, particle);
|
||||
ph->RegisterProcess(kss, particle);
|
||||
|
||||
} else if (particleName == "proton" ||
|
||||
particleName == "anti_proton") {
|
||||
|
||||
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
|
||||
pmsc->SetEmModel(new G4WentzelVIModel());
|
||||
G4hIonisation* hIoni = new G4hIonisation();
|
||||
hIoni->SetStepFunction(0.1, 10*um);
|
||||
|
||||
ph->RegisterProcess(pmsc, particle);
|
||||
ph->RegisterProcess(hIoni, particle);
|
||||
ph->RegisterProcess(pb, particle);
|
||||
ph->RegisterProcess(pp, particle);
|
||||
ph->RegisterProcess(new G4CoulombScattering(), particle);
|
||||
|
||||
} else if (particleName == "B+" ||
|
||||
particleName == "B-" ||
|
||||
particleName == "D+" ||
|
||||
particleName == "D-" ||
|
||||
particleName == "Ds+" ||
|
||||
particleName == "Ds-" ||
|
||||
particleName == "anti_He3" ||
|
||||
particleName == "anti_alpha" ||
|
||||
particleName == "anti_deuteron" ||
|
||||
particleName == "anti_lambda_c+" ||
|
||||
particleName == "anti_omega-" ||
|
||||
particleName == "anti_sigma_c+" ||
|
||||
particleName == "anti_sigma_c++" ||
|
||||
particleName == "anti_sigma+" ||
|
||||
particleName == "anti_sigma-" ||
|
||||
particleName == "anti_triton" ||
|
||||
particleName == "anti_xi_c+" ||
|
||||
particleName == "anti_xi-" ||
|
||||
particleName == "deuteron" ||
|
||||
particleName == "lambda_c+" ||
|
||||
particleName == "omega-" ||
|
||||
particleName == "sigma_c+" ||
|
||||
particleName == "sigma_c++" ||
|
||||
particleName == "sigma+" ||
|
||||
particleName == "sigma-" ||
|
||||
particleName == "tau+" ||
|
||||
particleName == "tau-" ||
|
||||
particleName == "triton" ||
|
||||
particleName == "xi_c+" ||
|
||||
particleName == "xi-" ) {
|
||||
|
||||
ph->RegisterProcess(hmsc, particle);
|
||||
ph->RegisterProcess(new G4hIonisation(), particle);
|
||||
}
|
||||
}
|
||||
|
||||
// Deexcitation
|
||||
//
|
||||
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
|
||||
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysListEmStandard.cc 100286 2016-10-17 08:43:45Z gcosmo $
|
||||
// $Id: PhysListEmStandard.cc 110387 2018-05-22 07:52:43Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -62,6 +62,8 @@
|
||||
|
||||
#include "G4LossTableManager.hh"
|
||||
#include "G4UAtomicDeexcitation.hh"
|
||||
#include "G4LindhardSorensenIonModel.hh"
|
||||
#include "G4BraggIonModel.hh"
|
||||
|
||||
#include "G4BuilderType.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
@@ -77,6 +79,7 @@ PhysListEmStandard::PhysListEmStandard(const G4String& name)
|
||||
param->SetMaxEnergy(10*TeV);
|
||||
param->SetNumberOfBinsPerDecade(10);
|
||||
param->SetMscStepLimitType(fUseSafetyPlus);
|
||||
param->SetFluo(true);
|
||||
SetPhysicsType(bElectromagnetic);
|
||||
}
|
||||
|
||||
@@ -101,12 +104,12 @@ void PhysListEmStandard::ConstructProcess()
|
||||
|
||||
if (particleName == "gamma") {
|
||||
|
||||
////ph->RegisterProcess(new G4RayleighScattering, particle);
|
||||
ph->RegisterProcess(new G4PhotoElectricEffect, particle);
|
||||
G4ComptonScattering* cs = new G4ComptonScattering;
|
||||
G4ComptonScattering* cs = new G4ComptonScattering;
|
||||
cs->SetEmModel(new G4KleinNishinaModel());
|
||||
ph->RegisterProcess(cs, particle);
|
||||
ph->RegisterProcess(new G4GammaConversion, particle);
|
||||
ph->RegisterProcess(new G4RayleighScattering, particle);
|
||||
|
||||
} else if (particleName == "e-") {
|
||||
|
||||
@@ -178,14 +181,10 @@ void PhysListEmStandard::ConstructProcess()
|
||||
ph->RegisterProcess(new G4hIonisation(), particle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Deexcitation
|
||||
//
|
||||
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
|
||||
de->SetFluo(true);
|
||||
de->SetAuger(false);
|
||||
de->SetPIXE(false);
|
||||
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file electromagnetic/TestEm5/src/PhysListEmStandardSSM.cc
|
||||
/// \brief Implementation of the PhysListEmStandardSSM class
|
||||
//
|
||||
// $Id: PhysListEmStandardSSM.cc 100286 2016-10-17 08:43:45Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "PhysListEmStandardSSM.hh"
|
||||
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
#include "G4ComptonScattering.hh"
|
||||
#include "G4GammaConversion.hh"
|
||||
#include "G4PhotoElectricEffect.hh"
|
||||
|
||||
#include "G4CoulombScattering.hh"
|
||||
#include "G4eCoulombScatteringModel.hh"
|
||||
#include "G4hCoulombScatteringModel.hh"
|
||||
#include "G4eSingleCoulombScatteringModel.hh"
|
||||
#include "G4IonCoulombScatteringModel.hh"
|
||||
|
||||
#include "G4eIonisation.hh"
|
||||
#include "G4eBremsstrahlung.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
|
||||
#include "G4MuIonisation.hh"
|
||||
#include "G4MuBremsstrahlung.hh"
|
||||
#include "G4MuPairProduction.hh"
|
||||
|
||||
#include "G4hIonisation.hh"
|
||||
#include "G4ionIonisation.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListEmStandardSSM::PhysListEmStandardSSM(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListEmStandardSSM::~PhysListEmStandardSSM()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysListEmStandardSSM::ConstructProcess()
|
||||
{
|
||||
// Add standard EM Processes
|
||||
|
||||
auto particleIterator=GetParticleIterator();
|
||||
particleIterator->reset();
|
||||
while( (*particleIterator)() ){
|
||||
G4ParticleDefinition* particle = particleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
if (particleName == "gamma") {
|
||||
// gamma
|
||||
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
|
||||
pmanager->AddDiscreteProcess(new G4ComptonScattering);
|
||||
pmanager->AddDiscreteProcess(new G4GammaConversion);
|
||||
|
||||
} else if (particleName == "e-") {
|
||||
//electron
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung, -1, 2, 2);
|
||||
|
||||
G4CoulombScattering* cs = new G4CoulombScattering();
|
||||
G4eSingleCoulombScatteringModel* model =
|
||||
new G4eSingleCoulombScatteringModel();
|
||||
//model->SetLowEnergyThreshold(10*eV);
|
||||
model->SetPolarAngleLimit(0.0);
|
||||
cs->AddEmModel(0, model);
|
||||
pmanager->AddDiscreteProcess(cs);
|
||||
|
||||
} else if (particleName == "e+") {
|
||||
//positron
|
||||
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung, -1, 2, 2);
|
||||
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 3);
|
||||
|
||||
G4CoulombScattering* cs = new G4CoulombScattering();
|
||||
G4eSingleCoulombScatteringModel* model =
|
||||
new G4eSingleCoulombScatteringModel();
|
||||
model->SetPolarAngleLimit(0.0);
|
||||
cs->AddEmModel(0, model);
|
||||
pmanager->AddDiscreteProcess(cs);
|
||||
|
||||
} else if (particleName == "mu+" ||
|
||||
particleName == "mu-" ) {
|
||||
//muon
|
||||
pmanager->AddProcess(new G4MuIonisation, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4MuBremsstrahlung, -1, 2, 2);
|
||||
pmanager->AddProcess(new G4MuPairProduction, -1, 3, 3);
|
||||
G4CoulombScattering* cs = new G4CoulombScattering();
|
||||
G4hCoulombScatteringModel* model = new G4hCoulombScatteringModel();
|
||||
model->SetPolarAngleLimit(0.0);
|
||||
cs->AddEmModel(0, model);
|
||||
pmanager->AddDiscreteProcess(cs);
|
||||
|
||||
|
||||
} else if (particleName == "alpha" || particleName == "He3") {
|
||||
pmanager->AddProcess(new G4ionIonisation, -1, 1, 1);
|
||||
G4CoulombScattering* cs = new G4CoulombScattering();
|
||||
cs->AddEmModel(0, new G4IonCoulombScatteringModel());
|
||||
cs->SetBuildTableFlag(false);
|
||||
pmanager->AddDiscreteProcess(cs);
|
||||
|
||||
} else if (particleName == "GenericIon" ) {
|
||||
pmanager->AddProcess(new G4ionIonisation, -1, 1, 1);
|
||||
G4CoulombScattering* cs = new G4CoulombScattering();
|
||||
cs->AddEmModel(0, new G4IonCoulombScatteringModel());
|
||||
cs->SetBuildTableFlag(false);
|
||||
pmanager->AddDiscreteProcess(cs);
|
||||
|
||||
} else if ((!particle->IsShortLived()) &&
|
||||
(particle->GetPDGCharge() != 0.0) &&
|
||||
(particle->GetParticleName() != "chargedgeantino")) {
|
||||
//all others charged particles except geantino
|
||||
pmanager->AddProcess(new G4hIonisation, -1, 1, 1);
|
||||
pmanager->AddDiscreteProcess(new G4CoulombScattering);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm5/src/PhysicsList.cc
|
||||
/// \brief Implementation of the PhysicsList class
|
||||
//
|
||||
// $Id: PhysicsList.cc 104417 2017-05-30 08:30:48Z gcosmo $
|
||||
// $Id: PhysicsList.cc 110387 2018-05-22 07:52:43Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -35,7 +35,8 @@
|
||||
#include "PhysicsListMessenger.hh"
|
||||
|
||||
#include "PhysListEmStandard.hh"
|
||||
#include "PhysListEmStandardSSM.hh"
|
||||
#include "PhysListEm5DStandard.hh"
|
||||
#include "PhysListEm19DStandard.hh"
|
||||
|
||||
#include "G4EmStandardPhysics.hh"
|
||||
#include "G4EmStandardPhysics_option1.hh"
|
||||
@@ -57,11 +58,9 @@
|
||||
|
||||
#include "G4HadronElasticPhysics.hh"
|
||||
|
||||
#include "G4Decay.hh"
|
||||
#include "G4DecayPhysics.hh"
|
||||
#include "StepMax.hh"
|
||||
|
||||
#include "G4LossTableManager.hh"
|
||||
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
@@ -88,10 +87,12 @@ PhysicsList::PhysicsList() : G4VModularPhysicsList(),
|
||||
SetVerboseLevel(1);
|
||||
|
||||
// EM physics
|
||||
fEmName = G4String("local");
|
||||
fEmPhysicsList = new PhysListEmStandard(fEmName);
|
||||
fEmName = G4String("emstandard_opt4");
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option4();
|
||||
|
||||
// Decay physics
|
||||
fDecayPhysics = new G4DecayPhysics(1);
|
||||
|
||||
G4LossTableManager::Instance();
|
||||
SetDefaultCutValue(1*mm);
|
||||
}
|
||||
|
||||
@@ -141,43 +142,17 @@ void PhysicsList::ConstructProcess()
|
||||
{
|
||||
AddTransportation();
|
||||
fEmPhysicsList->ConstructProcess();
|
||||
fDecayPhysics->ConstructProcess();
|
||||
if(fHadPhysicsList) { fHadPhysicsList->ConstructProcess(); }
|
||||
AddDecay();
|
||||
AddStepMax();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::AddDecay()
|
||||
{
|
||||
// Add Decay Process
|
||||
|
||||
G4Decay* fDecayProcess = new G4Decay();
|
||||
|
||||
auto particleIterator=GetParticleIterator();
|
||||
particleIterator->reset();
|
||||
while( (*particleIterator)() ){
|
||||
G4ParticleDefinition* particle = particleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
|
||||
if (fDecayProcess->IsApplicable(*particle) && !particle->IsShortLived()) {
|
||||
|
||||
pmanager ->AddProcess(fDecayProcess);
|
||||
|
||||
// set ordering for PostStepDoIt and AtRestDoIt
|
||||
pmanager ->SetProcessOrdering(fDecayProcess, idxPostStep);
|
||||
pmanager ->SetProcessOrdering(fDecayProcess, idxAtRest);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::AddStepMax()
|
||||
{
|
||||
// Step limitation seen as a process
|
||||
StepMax* stepMaxProcess = new StepMax();
|
||||
StepMax* stepMaxProcess = new StepMax(fMessenger);
|
||||
|
||||
auto particleIterator=GetParticleIterator();
|
||||
particleIterator->reset();
|
||||
@@ -185,7 +160,7 @@ void PhysicsList::AddStepMax()
|
||||
G4ParticleDefinition* particle = particleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
|
||||
if (stepMaxProcess->IsApplicable(*particle) && !particle->IsShortLived())
|
||||
if (stepMaxProcess->IsApplicable(*particle))
|
||||
{
|
||||
pmanager ->AddDiscreteProcess(stepMaxProcess);
|
||||
}
|
||||
@@ -237,6 +212,12 @@ void PhysicsList::AddPhysicsList(const G4String& name)
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option4();
|
||||
|
||||
} else if (name == "emstandardATIMA") {
|
||||
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new PhysListEm19DStandard();
|
||||
|
||||
} else if (name == "emstandardSS") {
|
||||
|
||||
@@ -244,11 +225,11 @@ void PhysicsList::AddPhysicsList(const G4String& name)
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysicsSS();
|
||||
|
||||
} else if (name == "emstandardSSM") {
|
||||
} else if (name == "emstandard5D") {
|
||||
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new PhysListEmStandardSSM();
|
||||
fEmPhysicsList = new PhysListEm5DStandard();
|
||||
|
||||
} else if (name == "emstandardWVI") {
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm5/src/PhysicsListMessenger.cc
|
||||
/// \brief Implementation of the PhysicsListMessenger class
|
||||
//
|
||||
// $Id: PhysicsListMessenger.cc 81528 2014-06-02 16:21:24Z vnivanch $
|
||||
// $Id: PhysicsListMessenger.cc 109000 2018-03-21 09:25:56Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -41,7 +41,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsListMessenger::PhysicsListMessenger(PhysicsList* pPhys)
|
||||
:G4UImessenger(),fPhysicsList(pPhys)
|
||||
:G4UImessenger(),fPhysicsList(pPhys),fMaxChargedStep(DBL_MAX)
|
||||
{
|
||||
fPhysDir = new G4UIdirectory("/testem/phys/");
|
||||
fPhysDir->SetGuidance("physics list commands");
|
||||
@@ -51,6 +51,13 @@ PhysicsListMessenger::PhysicsListMessenger(PhysicsList* pPhys)
|
||||
fListCmd->SetParameterName("PList",false);
|
||||
fListCmd->AvailableForStates(G4State_PreInit);
|
||||
fListCmd->SetToBeBroadcasted(false);
|
||||
|
||||
fStepMaxCmd = new G4UIcmdWithADoubleAndUnit("/testem/stepMax",this);
|
||||
fStepMaxCmd->SetGuidance("Set max allowed step length");
|
||||
fStepMaxCmd->SetParameterName("mxStep",false);
|
||||
fStepMaxCmd->SetRange("mxStep>0.");
|
||||
fStepMaxCmd->SetUnitCategory("Length");
|
||||
fStepMaxCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -59,6 +66,7 @@ PhysicsListMessenger::~PhysicsListMessenger()
|
||||
{
|
||||
delete fListCmd;
|
||||
delete fPhysDir;
|
||||
delete fStepMaxCmd;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -66,7 +74,9 @@ PhysicsListMessenger::~PhysicsListMessenger()
|
||||
void PhysicsListMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
{
|
||||
if( command == fListCmd )
|
||||
{ fPhysicsList->AddPhysicsList(newValue);}
|
||||
{ fPhysicsList->AddPhysicsList(newValue); }
|
||||
if (command == fStepMaxCmd)
|
||||
{ fMaxChargedStep = fStepMaxCmd->GetNewDoubleValue(newValue); }
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -201,7 +201,7 @@ void Run::EndOfRun()
|
||||
|
||||
//Stopping Power from input Table.
|
||||
//
|
||||
G4Material* material = fDetector->GetAbsorberMaterial();
|
||||
const G4Material* material = fDetector->GetAbsorberMaterial();
|
||||
G4double length = fDetector->GetAbsorberThickness();
|
||||
G4double density = material->GetDensity();
|
||||
G4String partName = fParticle->GetParticleName();
|
||||
|
||||
@@ -23,66 +23,84 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file electromagnetic/TestEm5/src/StepMax.cc
|
||||
/// \brief Implementation of the StepMax class
|
||||
//
|
||||
// $Id: StepMax.cc 98752 2016-08-09 13:44:40Z gcosmo $
|
||||
// $Id: StepMax.cc 109000 2018-03-21 09:25:56Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "StepMax.hh"
|
||||
#include "StepMaxMessenger.hh"
|
||||
#include "PhysicsListMessenger.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4TransportationProcessType.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
StepMax::StepMax(const G4String& processName)
|
||||
: G4VDiscreteProcess(processName),fMaxChargedStep(DBL_MAX),fMess(0)
|
||||
StepMax::StepMax(PhysicsListMessenger* mess)
|
||||
: G4VEmProcess("UserMaxStep", fGeneral),fMessenger(mess),
|
||||
fMaxChargedStep(DBL_MAX),isInitialised(false)
|
||||
{
|
||||
fMess = new StepMaxMessenger(this);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
StepMax::~StepMax() { delete fMess; }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4bool StepMax::IsApplicable(const G4ParticleDefinition& particle)
|
||||
{
|
||||
return (particle.GetPDGCharge() != 0.);
|
||||
SetProcessSubType(static_cast<G4int>(STEP_LIMITER));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void StepMax::SetMaxStep(G4double step) { fMaxChargedStep = step;}
|
||||
|
||||
StepMax::~StepMax()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4double StepMax::PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
|
||||
G4double,
|
||||
G4ForceCondition* condition )
|
||||
G4bool StepMax::IsApplicable(const G4ParticleDefinition& part)
|
||||
{
|
||||
return (part.GetPDGCharge() != 0. && !part.IsShortLived());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void StepMax::PreparePhysicsTable(const G4ParticleDefinition&)
|
||||
{
|
||||
if(isInitialised) {
|
||||
isInitialised = false;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void StepMax::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
{
|
||||
if(!isInitialised) {
|
||||
fMaxChargedStep = fMessenger->GetMaxChargedStep();
|
||||
isInitialised = true;
|
||||
if(fMaxChargedStep < DBL_MAX) {
|
||||
G4cout << GetProcessName() << ": SubType= " << GetProcessSubType()
|
||||
<< " Step limit(mm)= " << fMaxChargedStep << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void StepMax::InitialiseProcess(const G4ParticleDefinition*)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4double
|
||||
StepMax::PostStepGetPhysicalInteractionLength(const G4Track&,
|
||||
G4double,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
|
||||
G4double ProposedStep = DBL_MAX;
|
||||
|
||||
if((fMaxChargedStep > 0.) &&
|
||||
(aTrack.GetVolume() != 0) &&
|
||||
(aTrack.GetVolume()->GetName() == "Absorber"))
|
||||
ProposedStep = fMaxChargedStep;
|
||||
|
||||
return ProposedStep;
|
||||
return fMaxChargedStep;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4VParticleChange* StepMax::PostStepDoIt(const G4Track& aTrack, const G4Step&)
|
||||
{
|
||||
// do nothing
|
||||
aParticleChange.Initialize(aTrack);
|
||||
return &aParticleChange;
|
||||
// do nothing
|
||||
aParticleChange.Initialize(aTrack);
|
||||
return &aParticleChange;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file electromagnetic/TestEm5/src/StepMaxMessenger.cc
|
||||
/// \brief Implementation of the StepMaxMessenger class
|
||||
//
|
||||
// $Id: StepMaxMessenger.cc 67268 2013-02-13 11:38:40Z ihrivnac $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "StepMaxMessenger.hh"
|
||||
|
||||
#include "StepMax.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
StepMaxMessenger::StepMaxMessenger(StepMax* stepM)
|
||||
:G4UImessenger(),fStepMax(stepM),fStepMaxCmd(0)
|
||||
{
|
||||
fStepMaxCmd = new G4UIcmdWithADoubleAndUnit("/testem/stepMax",this);
|
||||
fStepMaxCmd->SetGuidance("Set max allowed step length");
|
||||
fStepMaxCmd->SetParameterName("mxStep",false);
|
||||
fStepMaxCmd->SetRange("mxStep>0.");
|
||||
fStepMaxCmd->SetUnitCategory("Length");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
StepMaxMessenger::~StepMaxMessenger()
|
||||
{
|
||||
delete fStepMaxCmd;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void StepMaxMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
{
|
||||
if (command == fStepMaxCmd)
|
||||
{ fStepMax->SetMaxStep(fStepMaxCmd->GetNewDoubleValue(newValue));}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
Reference in New Issue
Block a user