Import Geant4 10.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-12-09 12:35:28 +01:00
parent 4ec577e5c4
commit a3452e42ac
3514 changed files with 210500 additions and 89628 deletions
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm11/src/DetectorConstruction.cc
/// \file DetectorConstruction.cc
/// \brief Implementation of the DetectorConstruction class
//
// $Id: DetectorConstruction.cc 77288 2013-11-22 10:52:58Z gcosmo $
@@ -220,7 +220,6 @@ G4VPhysicalVolume* DetectorConstruction::ConstructVolumes()
k); //copy number
}
PrintParameters();
//always return the physical World
@@ -249,9 +248,9 @@ void DetectorConstruction::SetNbOfAbsor(G4int ival)
{
// set the number of Absorbers
//
if (ival < 1 || ival > (MaxAbsor-1))
if (ival < 1 || ival > (kMaxAbsor-1))
{ G4cout << "\n ---> warning from SetfNbOfAbsor: "
<< ival << " must be at least 1 and and most " << MaxAbsor-1
<< ival << " must be at least 1 and and most " << kMaxAbsor-1
<< ". Command refused" << G4endl;
return;
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm11/src/DetectorMessenger.cc
/// \file DetectorMessenger.cc
/// \brief Implementation of the DetectorMessenger class
//
// $Id: DetectorMessenger.cc 77288 2013-11-22 10:52:58Z gcosmo $
@@ -0,0 +1,160 @@
//
// ********************************************************************
// * 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: ElectromagneticPhysics.cc 71570 2013-06-18 10:14:44Z gcosmo $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "ElectromagneticPhysics.hh"
#include "G4BuilderType.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4PhysicsListHelper.hh"
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4RayleighScattering.hh"
#include "G4KleinNishinaModel.hh"
#include "G4eMultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuMultipleScattering.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hMultipleScattering.hh"
#include "G4hIonisation.hh"
#include "G4hBremsstrahlung.hh"
#include "G4hPairProduction.hh"
#include "G4ionIonisation.hh"
#include "G4IonParametrisedLossModel.hh"
#include "G4NuclearStopping.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ElectromagneticPhysics::ElectromagneticPhysics(const G4String& name)
: G4VPhysicsConstructor(name)
{
SetPhysicsType(bElectromagnetic);
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(0);
param->SetStepFunction(1., 1*mm); //default= 0.1, 100*um
param->SetStepFunctionMuHad(1., 1*mm);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ElectromagneticPhysics::~ElectromagneticPhysics()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ElectromagneticPhysics::ConstructProcess()
{
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
// Add standard EM Processes
//
auto particleIterator=GetParticleIterator();
particleIterator->reset();
while( (*particleIterator)() ){
G4ParticleDefinition* particle = particleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
ph->RegisterProcess(new G4PhotoElectricEffect, particle);
ph->RegisterProcess(new G4ComptonScattering, particle);
ph->RegisterProcess(new G4GammaConversion, particle);
} else if (particleName == "e-") {
ph->RegisterProcess(new G4eMultipleScattering(), particle);
ph->RegisterProcess(new G4eIonisation, particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
} else if (particleName == "e+") {
ph->RegisterProcess(new G4eMultipleScattering(), particle);
ph->RegisterProcess(new G4eIonisation, particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
} else if (particleName == "mu+" ||
particleName == "mu-" ) {
ph->RegisterProcess(new G4MuMultipleScattering(), particle);
ph->RegisterProcess(new G4MuIonisation, particle);
ph->RegisterProcess(new G4MuBremsstrahlung(), particle);
ph->RegisterProcess(new G4MuPairProduction(), particle);
} else if( particleName == "proton" ||
particleName == "pi-" ||
particleName == "pi+" ) {
ph->RegisterProcess(new G4hMultipleScattering(), particle);
ph->RegisterProcess(new G4hIonisation, particle);
} else if( particleName == "alpha" ||
particleName == "He3" ) {
ph->RegisterProcess(new G4hMultipleScattering(), particle);
ph->RegisterProcess(new G4ionIonisation, particle);
ph->RegisterProcess(new G4NuclearStopping(), particle);
} else if( particleName == "GenericIon" ) {
ph->RegisterProcess(new G4hMultipleScattering(), particle);
G4ionIonisation* ionIoni = new G4ionIonisation();
ionIoni->SetEmModel(new G4IonParametrisedLossModel());
ph->RegisterProcess(ionIoni, particle);
ph->RegisterProcess(new G4NuclearStopping(), particle);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
//all others charged particles except geantino
ph->RegisterProcess(new G4hMultipleScattering(), particle);
ph->RegisterProcess(new G4hIonisation(), particle);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm11/src/EventAction.cc
/// \file EventAction.cc
/// \brief Implementation of the EventAction class
//
// $Id: EventAction.cc 95740 2016-02-23 09:34:37Z gcosmo $
@@ -56,7 +56,7 @@ EventAction::~EventAction()
void EventAction::BeginOfEventAction(const G4Event*)
{
//energy deposited per event
for (G4int k=0; k<MaxAbsor; k++) { fEdepAbsor[k] = 0.0; }
for (G4int k=0; k<kMaxAbsor; k++) { fEdepAbsor[k] = 0.0; }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -85,4 +85,3 @@ void EventAction::EndOfEventAction(const G4Event*)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,72 @@
//
// ********************************************************************
// * 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 hadronic/Hadr03/src/GammaNuclearPhysics.cc
/// \brief Implementation of the GammaNuclearPhysics class
//
// $Id: GammaNuclearPhysics.cc 66587 2012-12-21 11:06:44Z ihrivnac $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "GammaNuclearPhysics.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
// Processes
#include "G4PhotoNuclearProcess.hh"
#include "G4CascadeInterface.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
GammaNuclearPhysics::GammaNuclearPhysics(const G4String& name)
: G4VPhysicsConstructor(name)
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
GammaNuclearPhysics::~GammaNuclearPhysics()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void GammaNuclearPhysics::ConstructProcess()
{
G4ProcessManager* pManager = G4Gamma::Gamma()->GetProcessManager();
//
G4PhotoNuclearProcess* process = new G4PhotoNuclearProcess();
//
G4CascadeInterface* bertini = new G4CascadeInterface();
bertini->SetMaxEnergy(10*GeV);
process->RegisterMe(bertini);
//
pManager->AddDiscreteProcess(process);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file hadronic/Hadr06/include/HadronElasticPhysicsHP.hh
/// \file hadronic/Hadr07/include/HadronElasticPhysicsHP.hh
/// \brief Definition of the HadronElasticPhysicsHP class
//
// $Id:HadronElasticPhysicsHP.cc 71037 2013-06-10 09:20:54Z gcosmo $
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm5/src/HistoManager.cc
/// \file HistoManager.cc
/// \brief Implementation of the HistoManager class
//
//
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm12/src/NeutronHPMessenger.cc
/// \file NeutronHPMessenger.cc
/// \brief Implementation of the NeutronHPMessenger class
//
// $Id: NeutronHPMessenger.cc 67268 2013-02-13 11:38:40Z ihrivnac $
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file hadronic/Hadr03/src/PhysicsList.cc
/// \file PhysicsList.cc
/// \brief Implementation of the PhysicsList class
//
// $Id: PhysicsList.cc 70268 2013-05-28 14:17:50Z maire $
@@ -43,9 +43,10 @@
#include "G4IonPhysics.hh"
#include "G4IonINCLXXPhysics.hh"
#include "G4StoppingPhysics.hh"
#include "GammaPhysics.hh"
#include "GammaNuclearPhysics.hh"
#include "EmStandardPhysics.hh"
#include "ElectromagneticPhysics.hh"
#include "G4EmStandardPhysics.hh"
#include "G4EmStandardPhysics_option3.hh"
#include "G4DecayPhysics.hh"
#include "G4RadioactiveDecayPhysics.hh"
@@ -82,11 +83,12 @@ PhysicsList::PhysicsList()
////RegisterPhysics( new G4StoppingPhysics(verb));
// Gamma-Nuclear Physics
RegisterPhysics( new GammaPhysics("gamma"));
RegisterPhysics( new GammaNuclearPhysics("gamma"));
// EM physics
RegisterPhysics(new EmStandardPhysics());
////egisterPhysics(new G4EmStandardPhysics_option3());
RegisterPhysics(new ElectromagneticPhysics());
////RegisterPhysics(new G4EmStandardPhysics());
////RegisterPhysics(new G4EmStandardPhysics_option3());
// Decay
RegisterPhysics(new G4DecayPhysics());
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm11/src/PrimaryGeneratorAction.cc
/// \file PrimaryGeneratorAction.cc
/// \brief Implementation of the PrimaryGeneratorAction class
//
// $Id: PrimaryGeneratorAction.cc 95740 2016-02-23 09:34:37Z gcosmo $
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm11/src/PrimaryGeneratorMessenger.cc
/// \file PrimaryGeneratorMessenger.cc
/// \brief Implementation of the PrimaryGeneratorMessenger class
//
// $Id: PrimaryGeneratorMessenger.cc 96158 2016-03-21 11:08:26Z maire $
+2 -2
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm11/src/Run.cc
/// \file Run.cc
/// \brief Implementation of the Run class
//
// $Id: Run.cc 71376 2013-06-14 07:44:50Z maire $
@@ -53,7 +53,7 @@ Run::Run(DetectorConstruction* detector)
{
for (G4int i=0; i<3; ++i) { fStatus[i] = 0; fTotEdep[i] = 0.; }
fTotEdep[1] = joule;
for (G4int i=0; i<MaxAbsor; ++i) {
for (G4int i=0; i<kMaxAbsor; ++i) {
fEdeposit[i] = 0.; fEmin[i] = joule; fEmax[i] = 0.;
}
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm11/src/RunAction.cc
/// \file RunAction.cc
/// \brief Implementation of the RunAction class
//
// $Id: RunAction.cc 93562 2015-10-26 14:44:24Z gcosmo $
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file hadronic/Hadr03/src/StepMaxBuilder.cc
/// \file StepMaxBuilder.cc
/// \brief Implementation of the StepMaxBuilder class
//
// $Id: StepMaxBuilder.cc 66587 2012-12-21 11:06:44Z ihrivnac $
@@ -58,9 +58,10 @@ void StepMaxBuilder::ConstructProcess()
// Step limitation seen as a process
StepMaxProcess* process = new StepMaxProcess();
aParticleIterator->reset();
while ((*aParticleIterator)()){
G4ParticleDefinition* particle = aParticleIterator->value();
auto particleIterator=GetParticleIterator();
particleIterator->reset();
while ((*particleIterator)()){
G4ParticleDefinition* particle = particleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (process->IsApplicable(*particle)) pmanager->AddDiscreteProcess(process);
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm11/src/StepMaxMessenger.cc
/// \file StepMaxMessenger.cc
/// \brief Implementation of the StepMaxMessenger class
//
// $Id: StepMaxMessenger.cc 67268 2013-02-13 11:38:40Z ihrivnac $
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm11/src/StepMaxProcess.cc
/// \file StepMaxProcess.cc
/// \brief Implementation of the StepMaxProcess class
//
// $Id: StepMaxProcess.cc 67268 2013-02-13 11:38:40Z ihrivnac $
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm11/src/SteppingAction.cc
/// \file SteppingAction.cc
/// \brief Implementation of the SteppingAction class
//
// $Id: SteppingAction.cc 95740 2016-02-23 09:34:37Z gcosmo $
@@ -89,4 +89,3 @@ void SteppingAction::UserSteppingAction(const G4Step* step)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file radioactivedecay/rdecay01/src/SteppingVerbose.cc
/// \file SteppingVerbose.cc
/// \brief Implementation of the SteppingVerbose class
//
//
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm11/src/TrackingAction.cc
/// \file TrackingAction.cc
/// \brief Implementation of the TrackingAction class
//
// $Id: TrackingAction.cc 74997 2013-10-25 10:52:13Z gcosmo $