Import Geant4 9.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:37:50 +02:00
parent a8e9364cea
commit 96c8bcd0af
6923 changed files with 198390 additions and 41849 deletions
@@ -1,4 +1,4 @@
$Id: History,v 1.13 2007/02/14 10:23:55 vnivanch Exp $
$Id: History,v 1.17 2007/11/15 16:10:09 vnivanch Exp $
-------------------------------------------------------------------
=========================================================
@@ -15,6 +15,20 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
November 15th, 2007 V.Ivanchenko (exrdm-V09-00-02)
--------------------------------------------------
- A minor fix of low-energy EM physics builder
November 14th, 2007 V.Ivanchenko (exrdm-V09-00-01)
--------------------------------------------------
- Use decay and radiactive decay builders from physics)lists library
- Added elastic, stopping, ion and extraEm physics
July 3th, 2007 V.Ivanchenko (exrdm-V09-00-00)
---------------------------------------------
- Remove obsolete hadronic builders and use only QGSP_BIC, QGSP_BIC_HP,
QGSP_BERT, QGSP_BERT_HP
February 14th, 2006 V.Ivanchenko (exrdm-V08-02-01)
-------------------------------
- Use standard EM builder from physics_list subdirectory
@@ -1,6 +1,6 @@
/control/saveHistory
#/exrdm/phys/SelectPhysics LHEP_BIC_HP
/exrdm/phys/SelectPhysics Hadron
/exrdm/phys/SelectPhysics QGSP_BIC_HP
#/exrdm/phys/SelectPhysics Hadron
#/geometry/material/add NaI Na-I 3.67
/exrdm/det/setDetectorThickness 30 mm
/exrdm/det/setTargetLength 3 cm
@@ -1,6 +1,6 @@
*************************************************************
Geant4 version $Name: geant4-09-00 $ (27-July-2004)
Geant4 version $Name: geant4-09-01 $ (27-July-2004)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
@@ -1,62 +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. *
// ********************************************************************
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef exrdmPhysListGeneral_h
#define exrdmPhysListGeneral_h 1
#include "G4VPhysicsConstructor.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class exrdmPhysListGeneral : public G4VPhysicsConstructor
{
public:
exrdmPhysListGeneral(const G4String& name = "general");
virtual ~exrdmPhysListGeneral();
public:
// This method is dummy for physics
virtual void ConstructParticle() {};
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -31,6 +31,7 @@
#include "G4VModularPhysicsList.hh"
#include "globals.hh"
#include <vector>
class G4VPhysicsConstructor;
class exrdmPhysicsListMessenger;
@@ -42,7 +43,7 @@ class exrdmPhysicsList: public G4VModularPhysicsList
{
public:
exrdmPhysicsList();
~exrdmPhysicsList();
virtual ~exrdmPhysicsList();
void ConstructParticle();
@@ -59,6 +60,8 @@ public:
private:
void AddExtraBuilders(G4bool flagHP);
// hide assignment operator
exrdmPhysicsList & operator=(const exrdmPhysicsList &right);
exrdmPhysicsList(const exrdmPhysicsList&);
@@ -68,11 +71,13 @@ private:
G4double cutForPositron;
G4VPhysicsConstructor* emPhysicsList;
G4VPhysicsConstructor* generalPhysicsList;
G4VPhysicsConstructor* raddecayList;
G4VPhysicsConstructor* particleList;
// std::vector<G4VPhysicsConstructor*> hadronPhys;
G4VPhysicsConstructor* hadPhysicsList;
std::vector<G4VPhysicsConstructor*> hadronPhys;
G4int nhadcomp;
exrdmPhysicsListMessenger* pMessenger;
G4ProductionCuts* DetectorCuts;
G4ProductionCuts* TargetCuts;
@@ -214,8 +214,8 @@ void exrdmAnalysisManager::AddEnergy(G4double edep, G4double weight, G4double ti
<< G4endl;
}
histo->fillTuple(2, 0, edep/MeV);
histo->fillTuple(2,1,weight);
histo->fillTuple(2,2,time/second);
histo->fillTuple(2,1,time/second);
histo->fillTuple(2,2,weight);
histo->addRow(2);
//
exrdmEnergyDeposition A(edep,time,weight);
@@ -232,8 +232,8 @@ void exrdmAnalysisManager::AddParticle(G4double pid, G4double energy, G4double w
}
histo->fillTuple(0,0, pid);
histo->fillTuple(0,1,energy/MeV);
histo->fillTuple(0,2,weight);
histo->fillTuple(0,3,time/second);
histo->fillTuple(0,2,time/second);
histo->fillTuple(0,3,weight);
histo->addRow(0);
// now fill th emission spectrum
if (energy>0.0) histo->fillHisto(6,energy/MeV,weight);
@@ -247,8 +247,8 @@ void exrdmAnalysisManager::AddIsotope(G4double pid,G4double weight, G4double tim
<< G4endl;
}
histo->fillTuple(1,0,pid);
histo->fillTuple(1,1,weight);
histo->fillTuple(1,2,time/second);
histo->fillTuple(1,1,time/second);
histo->fillTuple(1,2,weight);
histo->addRow(1);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -89,7 +89,7 @@ void exrdmPhysListEmLowEnergy::ConstructProcess()
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
pmanager->AddProcess(new G4LowEnergyIonisation, -1, 2,2);
pmanager->AddProcess(new G4LowEnergyBremsstrahlung, -1, 3,3);
pmanager->AddProcess(new G4LowEnergyBremsstrahlung, -1,-3,3);
} else if (particleName == "e+") {
@@ -1,80 +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. *
// ********************************************************************
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "exrdmPhysListGeneral.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4Decay.hh"
#include "G4RadioactiveDecay.hh"
#include "G4GenericIon.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
exrdmPhysListGeneral::exrdmPhysListGeneral(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
exrdmPhysListGeneral::~exrdmPhysListGeneral()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void exrdmPhysListGeneral::ConstructProcess()
{
// Add Decay Process
G4Decay* fDecayProcess = new G4Decay();
G4RadioactiveDecay* theRadioactiveDecay = new G4RadioactiveDecay();
G4GenericIon* ion = G4GenericIon::GenericIon();
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (particle == ion) {
pmanager->AddProcess(theRadioactiveDecay, 0, -1, 3);
} else if (fDecayProcess->IsApplicable(*particle)) {
pmanager ->AddProcess(fDecayProcess);
// set ordering for PostStepDoIt and AtRestDoIt
pmanager ->SetProcessOrdering(fDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(fDecayProcess, idxAtRest);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -64,6 +64,10 @@
#include "G4ProtonInelasticCrossSection.hh"
#include "G4NeutronInelasticCrossSection.hh"
// RadioactiveDecay
#include "G4RadioactiveDecay.hh"
#include "G4GenericIon.hh"
exrdmPhysListHadron::exrdmPhysListHadron(const G4String& name)
: G4VPhysicsConstructor(name)
{}
@@ -262,5 +266,11 @@ void exrdmPhysListHadron::ConstructProcess()
theIonInelasticProcess->RegisterMe(theIonBC);
theIonInelasticProcess->RegisterMe(theTheoModel);
pManager->AddDiscreteProcess(theIonInelasticProcess);
// Add RadioactiveDecay Process
G4RadioactiveDecay* theRadioactiveDecay = new G4RadioactiveDecay();
G4GenericIon* ion = G4GenericIon::GenericIon();
pManager->AddProcess(theRadioactiveDecay, 0, -1, 3);
}
@@ -29,7 +29,6 @@
#include "exrdmPhysicsListMessenger.hh"
#include "exrdmPhysListParticles.hh"
#include "exrdmPhysListGeneral.hh"
#include "G4EmStandardPhysics.hh"
#include "exrdmPhysListEmLowEnergy.hh"
#include "exrdmPhysListHadron.hh"
@@ -49,11 +48,16 @@
#include "HadronPhysicsQGSP_BERT.hh"
#include "HadronPhysicsQGSP_BIC.hh"
#include "HadronPhysicsQGSP_HP.hh"
#include "HadronPhysicsLHEP_BERT.hh"
#include "HadronPhysicsLHEP_BERT_HP.hh"
#include "HadronPhysicsLHEP_BIC.hh"
#include "HadronPhysicsLHEP_BIC_HP.hh"
#include "HadronPhysicsQGSP_BERT_HP.hh"
#include "HadronPhysicsQGSP_BIC_HP.hh"
#include "G4EmExtraPhysics.hh"
#include "G4HadronElasticPhysics.hh"
#include "G4QStoppingPhysics.hh"
#include "G4IonBinaryCascadePhysics.hh"
#include "G4RadioactiveDecayPhysics.hh"
#include "G4NeutronTrackingCut.hh"
#include "G4DecayPhysics.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -71,18 +75,19 @@ exrdmPhysicsList::exrdmPhysicsList() : G4VModularPhysicsList()
pMessenger = new exrdmPhysicsListMessenger(this);
SetVerboseLevel(2);
//default physics
// Particles
particleList = new exrdmPhysListParticles("particles");
particleList = new G4DecayPhysics();
//default physics
raddecayList = new G4RadioactiveDecayPhysics();
// EM physics
emPhysicsList = new G4EmStandardPhysics("em-standard");
emPhysicsList = new G4EmStandardPhysics();
// Had physics (no hadron as default)
hadPhysicsList = 0;
// General exrdmPhysics
generalPhysicsList = new exrdmPhysListGeneral("general");
// Had physics
hadPhysicsList = new exrdmPhysListHadron("hadron");
nhadcomp = 0;
}
@@ -91,9 +96,14 @@ exrdmPhysicsList::exrdmPhysicsList() : G4VModularPhysicsList()
exrdmPhysicsList::~exrdmPhysicsList()
{
delete pMessenger;
delete generalPhysicsList;
delete raddecayList;
delete emPhysicsList;
if (hadPhysicsList) delete hadPhysicsList;
if (nhadcomp > 0) {
for(G4int i=0; i<nhadcomp; i++) {
delete hadronPhys[i];
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -110,9 +120,15 @@ void exrdmPhysicsList::ConstructProcess()
AddTransportation();
// em
emPhysicsList->ConstructProcess();
//general
generalPhysicsList->ConstructProcess();
// decays
particleList->ConstructProcess();
raddecayList->ConstructProcess();
// had
if (nhadcomp > 0) {
for(G4int i=0; i<nhadcomp; i++) {
(hadronPhys[i])->ConstructProcess();
}
}
if (hadPhysicsList) hadPhysicsList->ConstructProcess();
}
@@ -124,44 +140,21 @@ void exrdmPhysicsList::SelectPhysicsList(const G4String& name)
G4cout << "exrdmPhysicsList::SelectPhysicsList: <" << name << ">" << G4endl;
}
// default Had physics
if (name == "Hadron") {
if (name == "Hadron" && nhadcomp == 0) {
if (hadPhysicsList) delete hadPhysicsList;
hadPhysicsList = new exrdmPhysListHadron("hadron");
} else if (name == "QGSP_BERT") {
if (emPhysicsList) delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics();
if (hadPhysicsList) delete hadPhysicsList;
AddExtraBuilders(false);
hadPhysicsList = new HadronPhysicsQGSP_BERT("std-hadron");
} else if (name == "QGSP_BIC") {
if (emPhysicsList) delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics();
if (hadPhysicsList) delete hadPhysicsList;
} else if (name == "QGSP_BIC" && nhadcomp == 0) {
AddExtraBuilders(false);
hadPhysicsList = new HadronPhysicsQGSP_BIC("std-hadron");
} else if (name == "QGSP_HP") {
if (emPhysicsList) delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics();
if (hadPhysicsList) delete hadPhysicsList;
hadPhysicsList = new HadronPhysicsQGSP_HP("std-hadron");
} else if (name == "LHEP_BERT") {
if (emPhysicsList) delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics();
if (hadPhysicsList) delete hadPhysicsList;
hadPhysicsList = new HadronPhysicsLHEP_BERT("std-hadron");
} else if (name == "LHEP_BERT_HP") {
if (emPhysicsList) delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics();
if (hadPhysicsList) delete hadPhysicsList;
hadPhysicsList = new HadronPhysicsLHEP_BERT_HP("std-hadron");
} else if (name == "LHEP_BIC") {
if (emPhysicsList) delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics();
if (hadPhysicsList) delete hadPhysicsList;
hadPhysicsList = new HadronPhysicsLHEP_BIC("std-hadron");
} else if (name == "LHEP_BIC_HP") {
if (emPhysicsList) delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics();
if (hadPhysicsList) delete hadPhysicsList;
hadPhysicsList = new HadronPhysicsLHEP_BIC_HP("std-hadron");
} else if (name == "QGSP_BERT_HP" && nhadcomp == 0) {
AddExtraBuilders(true);
hadPhysicsList = new HadronPhysicsQGSP_BERT_HP("std-hadron");
} else if (name == "QGSP_BIC_HP" && nhadcomp == 0) {
AddExtraBuilders(true);
hadPhysicsList = new HadronPhysicsQGSP_BIC_HP("std-hadron");
} else if (name == "LowEnergy_EM") {
if (!hadPhysicsList ||(hadPhysicsList->GetPhysicsName()=="hadron") ) {
if (emPhysicsList) delete emPhysicsList;
@@ -176,11 +169,36 @@ void exrdmPhysicsList::SelectPhysicsList(const G4String& name)
} else {
G4cout << "exrdmPhysicsList: using EM comes with Std-hadron" <<G4endl;
}
} else {
G4cout << "exrdmPhysicsList WARNING wrong or unkonwn <"
<< name << "> Physics " << G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void exrdmPhysicsList::AddExtraBuilders(G4bool flagHP)
{
if (emPhysicsList) delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics();
if (hadPhysicsList) {
delete hadPhysicsList;
hadPhysicsList = 0;
}
nhadcomp = 6;
hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
hadronPhys.push_back( new G4HadronElasticPhysics("elastic",verboseLevel,
flagHP));
hadronPhys.push_back( new G4QStoppingPhysics("stopping",verboseLevel));
hadronPhys.push_back( new G4IonBinaryCascadePhysics("ionBIC"));
hadronPhys.push_back( new G4RadioactiveDecayPhysics("radioactiveDecay"));
hadronPhys.push_back( new G4NeutronTrackingCut("Neutron tracking cut"));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void exrdmPhysicsList::SetCuts()
{