Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: DetectorConstruction.cc,v 1.13 2006/09/25 17:06:29 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: DetectorConstruction.cc,v 1.14 2008/03/17 18:22:00 maire Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -124,6 +124,7 @@ lAr->AddElement(Ar, natoms=1);
new G4Material("Iron", z=26, a= 55.85*g/mole, density= 7.870*g/cm3);
new G4Material("Copper", z=29, a= 63.55*g/mole, density= 8.960*g/cm3);
new G4Material("Germanium",z=32, a= 72.61*g/mole, density= 5.323*g/cm3);
new G4Material("Silver", z=47, a=107.87*g/mole, density= 10.50*g/cm3);
new G4Material("Tungsten", z=74, a=183.85*g/mole, density= 19.30*g/cm3);
new G4Material("Gold", z=79, a=196.97*g/mole, density= 19.32*g/cm3);
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: DetectorMessenger.cc,v 1.4 2006/06/29 16:55:32 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: EventAction.cc,v 1.6 2006/06/29 16:55:34 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: EventMessenger.cc,v 1.5 2006/06/29 16:55:36 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: HistoManager.cc,v 1.21 2007/11/28 12:37:56 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: HistoManager.cc,v 1.26 2008/09/13 17:05:40 maire Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -53,8 +53,8 @@ HistoManager::HistoManager()
#endif
fileName[0] = "testem5";
fileType = "hbook";
fileOption = "--noErrors uncompress";
fileType = "root";
fileOption = "--noErrors export=root uncompress";
// histograms
for (G4int k=0; k<MaxHisto; k++) {
histo[k] = 0;
@@ -198,7 +198,7 @@ void HistoManager::SetHisto(G4int ih,
"(reflect , charged) : projected angle at exit", //33
"dummy","dummy","dummy","dummy","dummy","dummy", //34-39
"(reflect , neutral) : kinetic energy at exit", //40
"(reflect , neutral) : ener fluence: dE(MeV)/dOmega" //41
"(reflect , neutral) : ener fluence: dE(MeV)/dOmega", //41
"(reflect , neutral) : space angle: dN/dOmega", //42
"(reflect , neutral) : projected angle at exit", //43
"dummy","dummy","dummy","dummy","dummy","dummy" //44-49
@@ -244,9 +244,23 @@ void HistoManager::RemoveHisto(G4int ih)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void HistoManager::Scale(G4int ih, G4double fac)
{
if (ih > MaxHisto) {
G4cout << "---> warning from HistoManager::Scale() : histo " << ih
<< "does not exist. (fac = " << fac << ")" << G4endl;
return;
}
#ifdef G4ANALYSIS_USE
if(exist[ih]) histo[ih]->scale(fac);
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void HistoManager::PrintHisto(G4int ih)
{
if (ih < MaxHisto) ascii[ih] = true;
if (ih < MaxHisto) { ascii[ih] = true; ascii[0] = true; }
else
G4cout << "---> warning from HistoManager::PrintHisto() : histo " << ih
<< "does not exist" << G4endl;
@@ -259,6 +273,8 @@ void HistoManager::PrintHisto(G4int ih)
void HistoManager::saveAscii()
{
#ifdef G4ANALYSIS_USE
if (!ascii[0]) return;
G4String name = fileName[0] + ".ascii";
std::ofstream File(name, std::ios::out);
@@ -272,7 +288,8 @@ void HistoManager::saveAscii()
for (G4int iBin=0; iBin<Nbins[ih]; iBin++) {
File << " " << iBin << "\t"
<< histo[ih]->binMean(iBin) << "\t"
<< 0.5*(histo[ih]->axis().binLowerEdge(iBin) +
histo[ih]->axis().binUpperEdge(iBin)) << "\t"
<< histo[ih]->binHeight(iBin)
<< G4endl;
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: HistoMessenger.cc,v 1.8 2007/11/12 17:48:16 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -25,7 +25,7 @@
//
//
// $Id: PhysListEmLivermore.cc,v 1.2 2006/06/29 16:55:51 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -25,7 +25,7 @@
//
//
// $Id: PhysListEmPenelope.cc,v 1.3 2006/06/29 16:55:53 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PhysListEmStandard.cc,v 1.14 2007/11/21 17:41:19 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: PhysListEmStandard.cc,v 1.23 2008/11/16 18:51:42 maire Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -37,7 +37,8 @@
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
#include "G4eMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
@@ -48,6 +49,9 @@
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
#include "G4hBremsstrahlung.hh"
#include "G4hPairProduction.hh"
#include "G4ionIonisation.hh"
#include "G4EmProcessOptions.hh"
@@ -85,62 +89,80 @@ void PhysListEmStandard::ConstructProcess()
} else if (particleName == "e-") {
//electron
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
pmanager->AddProcess(new G4eIonisation, -1, 2, 2);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
} else if (particleName == "e+") {
//positron
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
pmanager->AddProcess(new G4eIonisation, -1, 2, 2);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4);
} else if (particleName == "mu+" ||
particleName == "mu-" ) {
//muon
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
pmanager->AddProcess(new G4MuIonisation, -1, 2,2);
pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3,3);
pmanager->AddProcess(new G4MuPairProduction, -1, 4,4);
pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
pmanager->AddProcess(new G4MuIonisation, -1, 2, 2);
pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3);
pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4);
} else if (particleName == "alpha" || particleName == "GenericIon" ) {
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
pmanager->AddProcess(new G4ionIonisation, -1, 2,2);
} else if( particleName == "proton" ||
particleName == "pi-" ||
particleName == "pi+" ) {
//proton
pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3);
pmanager->AddProcess(new G4hPairProduction, -1, 4, 4);
} else if( particleName == "alpha" ||
particleName == "He3" ||
particleName == "GenericIon" ) {
//Ions
pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
pmanager->AddProcess(new G4ionIonisation, -1, 2, 2);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
//all others charged particles except geantino
pmanager->AddProcess(new G4MultipleScattering, -1,1,1);
pmanager->AddProcess(new G4hIonisation, -1,2,2);
pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
}
}
// Em options
//
G4EmProcessOptions emOptions;
//coulomb scattering
// Main options and setting parameters are shown here.
// Several of them have default values.
//
emOptions.SetMscStepLimitation(fUseDistanceToBoundary);
emOptions.SetSkin(4.);
G4EmProcessOptions emOptions;
//physics tables
//
emOptions.SetMinEnergy(100*eV);
emOptions.SetMaxEnergy(100*TeV);
emOptions.SetDEDXBinning(1200);
emOptions.SetLambdaBinning(1200);
emOptions.SetMinEnergy(100*eV); //default
emOptions.SetMaxEnergy(100*TeV); //default
emOptions.SetDEDXBinning(12*20); //default=12*7
emOptions.SetLambdaBinning(12*20); //default=12*7
emOptions.SetSplineFlag(true); //default
//multiple coulomb scattering
//
emOptions.SetMscStepLimitation(fUseDistanceToBoundary); //default=fUseSafety
emOptions.SetMscRangeFactor(0.04); //default
emOptions.SetMscGeomFactor (2.5); //default
emOptions.SetSkin(3.); //default
//energy loss
//
emOptions.SetLinearLossLimit(1.e-6);
emOptions.SetStepFunction(0.2, 100*um);
emOptions.SetStepFunction(0.2, 100*um); //default=(0.2, 1*mm)
emOptions.SetLinearLossLimit(1.e-2); //default
//ionization
//
emOptions.SetSubCutoff(false);
emOptions.SetSubCutoff(false); //default
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,154 +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. *
// ********************************************************************
//
// $Id: PhysListEmStandardIG.cc,v 1.1 2007/11/13 14:41:28 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysListEmStandardIG.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
#include "G4hMultipleScattering.hh"
#include "G4MuMultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
#include "G4ionGasIonisation.hh"
#include "G4CoulombScattering.hh"
#include "G4EmProcessOptions.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEmStandardIG::PhysListEmStandardIG(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEmStandardIG::~PhysListEmStandardIG()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysListEmStandardIG::ConstructProcess()
{
G4double thetamin = 0.05;
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->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 G4MuMultipleScattering(thetamin), -1, 1,1);
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
G4CoulombScattering* cs = new G4CoulombScattering();
cs->SetThetaMin(thetamin);
pmanager->AddDiscreteProcess(cs);
} else if (particleName == "e+") {
//positron
pmanager->AddProcess(new G4MuMultipleScattering(thetamin), -1, 1,1);
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
G4CoulombScattering* cs = new G4CoulombScattering();
cs->SetThetaMin(thetamin);
pmanager->AddDiscreteProcess(cs);
} else if (particleName == "mu+" ||
particleName == "mu-" ) {
//muon
pmanager->AddProcess(new G4MuMultipleScattering(thetamin), -1, 1,1);
pmanager->AddProcess(new G4MuIonisation, -1, 2,2);
pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3,3);
pmanager->AddProcess(new G4MuPairProduction, -1, 4,4);
G4CoulombScattering* cs = new G4CoulombScattering();
cs->SetThetaMin(thetamin);
pmanager->AddDiscreteProcess(cs);
} else if (particleName == "alpha" || particleName == "He3") {
pmanager->AddProcess(new G4MuMultipleScattering(thetamin), -1, 1,1);
pmanager->AddProcess(new G4ionGasIonisation, -1, 2,2);
G4CoulombScattering* cs = new G4CoulombScattering();
cs->SetThetaMin(thetamin);
pmanager->AddDiscreteProcess(cs);
// pmanager->AddDiscreteProcess(nucr);
} else if (particleName == "GenericIon" ) {
pmanager->AddProcess(new G4MuMultipleScattering(thetamin), -1, 1,1);
pmanager->AddProcess(new G4ionGasIonisation, -1, 2,2);
G4CoulombScattering* cs = new G4CoulombScattering();
cs->SetThetaMin(thetamin);
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 G4MuMultipleScattering(thetamin), -1, 1,1);
pmanager->AddProcess(new G4hIonisation, -1, 2,2);
G4CoulombScattering* cs = new G4CoulombScattering();
cs->SetThetaMin(thetamin);
pmanager->AddDiscreteProcess(cs);
}
}
G4EmProcessOptions opt;
opt.SetSubCutoff(true);
opt.SetMinEnergy(0.1*keV);
opt.SetMaxEnergy(100.*GeV);
opt.SetDEDXBinning(360);
opt.SetLambdaBinning(360);
opt.SetLinearLossLimit(1.e-6);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,13 +23,14 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PhysListEmStandardSS.cc,v 1.3 2007/07/31 16:51:29 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: PhysListEmStandardSS.cc,v 1.6 2008/11/16 18:51:42 maire Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysListEmStandardSS.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
@@ -37,7 +38,7 @@
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
#include "G4CoulombScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
@@ -49,7 +50,8 @@
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
#include "G4CoulombScattering.hh"
#include "G4EmProcessOptions.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -82,44 +84,67 @@ void PhysListEmStandardSS::ConstructProcess()
} else if (particleName == "e-") {
//electron
pmanager->AddProcess(new G4eIonisation, -1, 1,1);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 2,2);
pmanager->AddDiscreteProcess(new G4CoulombScattering);
pmanager->AddDiscreteProcess(new G4CoulombScattering);
pmanager->AddProcess(new G4eIonisation, -1, 1, 1);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 2, 2);
} 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);
pmanager->AddDiscreteProcess(new G4CoulombScattering);
pmanager->AddDiscreteProcess(new G4CoulombScattering);
pmanager->AddProcess(new G4eIonisation, -1, 1, 1);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 2, 2);
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 3);
} 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);
pmanager->AddDiscreteProcess(new G4CoulombScattering);
//muon
pmanager->AddDiscreteProcess(new G4CoulombScattering);
pmanager->AddProcess(new G4MuIonisation, -1, 1, 1);
pmanager->AddProcess(new G4MuBremsstrahlung, -1, 2, 2);
pmanager->AddProcess(new G4MuPairProduction, -1, 3, 3);
} else if (particleName == "alpha" || particleName == "He3") {
pmanager->AddProcess(new G4ionIonisation, -1, 1,1);
pmanager->AddDiscreteProcess(new G4CoulombScattering);
pmanager->AddDiscreteProcess(new G4CoulombScattering);
pmanager->AddProcess(new G4ionIonisation, -1, 1, 1);
} else if (particleName == "GenericIon" ) {
pmanager->AddProcess(new G4ionIonisation, -1, 1,1);
G4CoulombScattering* cs = new G4CoulombScattering();
cs->SetBuildTableFlag(false);
pmanager->AddDiscreteProcess(cs);
pmanager->AddProcess(new G4ionIonisation, -1, 1, 1);
} 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);
pmanager->AddDiscreteProcess(new G4CoulombScattering);
pmanager->AddProcess(new G4hIonisation, -1, 1, 1);
}
}
// Em options
//
// Main options and setting parameters are shown here.
// Several of them have default values.
//
G4EmProcessOptions emOptions;
//physics tables
//
emOptions.SetMinEnergy(100*eV); //default
emOptions.SetMaxEnergy(100*TeV); //default
emOptions.SetDEDXBinning(12*20); //default=12*7
emOptions.SetLambdaBinning(12*20); //default=12*7
emOptions.SetSplineFlag(true); //default
//energy loss
//
emOptions.SetStepFunction(0.2, 100*um); //default=(0.2, 1*mm)
emOptions.SetLinearLossLimit(1.e-2); //default
//ionization
//
emOptions.SetSubCutoff(false); //default
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PhysicsList.cc,v 1.21 2007/11/19 14:57:07 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: PhysicsList.cc,v 1.26 2008/11/16 18:51:42 maire Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -34,13 +34,13 @@
#include "PhysListEmStandard.hh"
#include "PhysListEmStandardSS.hh"
#include "PhysListEmStandardIG.hh"
#include "PhysListEmLivermore.hh"
#include "PhysListEmPenelope.hh"
#include "G4EmStandardPhysics.hh"
#include "G4EmStandardPhysics_option1.hh"
#include "G4EmStandardPhysics_option2.hh"
#include "G4EmStandardPhysics_option3.hh"
#include "G4HadronElasticPhysics.hh"
#include "G4HadronDElasticPhysics.hh"
@@ -54,8 +54,6 @@
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4Decay.hh"
#include "StepMax.hh"
// Bosons
#include "G4ChargedGeantino.hh"
@@ -93,8 +91,6 @@ PhysicsList::PhysicsList() : G4VModularPhysicsList()
helIsRegisted = false;
bicIsRegisted = false;
biciIsRegisted = false;
stepMaxProcess = 0;
defaultCutValue = 1.*mm;
cutForGamma = defaultCutValue;
@@ -164,6 +160,8 @@ void PhysicsList::ConstructProcess()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4Decay.hh"
void PhysicsList::AddDecay()
{
// Add Decay Process
@@ -189,10 +187,12 @@ void PhysicsList::AddDecay()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "StepMax.hh"
void PhysicsList::AddStepMax()
{
// Step limitation seen as a process
stepMaxProcess = new StepMax();
StepMax* stepMaxProcess = new StepMax();
theParticleIterator->reset();
while ((*theParticleIterator)()){
@@ -239,19 +239,19 @@ void PhysicsList::AddPhysicsList(const G4String& name)
emName = name;
delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics_option2();
} else if (name == "emstandard_opt3") {
emName = name;
delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics_option3();
} else if (name == "standardSS") {
emName = name;
delete emPhysicsList;
emPhysicsList = new PhysListEmStandardSS(name);
} else if (name == "standardIG") {
emName = name;
delete emPhysicsList;
emPhysicsList = new PhysListEmStandardIG(name);
} else if (name == "livermore") {
emName = name;
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: PhysicsListMessenger.cc,v 1.6 2006/06/29 16:56:07 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: PrimaryGeneratorAction.cc,v 1.4 2006/06/29 16:56:09 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: PrimaryGeneratorMessenger.cc,v 1.4 2006/06/29 16:56:12 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: RunAction.cc,v 1.25 2007/11/21 17:41:19 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: RunAction.cc,v 1.27 2008/01/14 13:21:19 maire Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -265,7 +265,22 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
}
G4cout.precision(prec);
// normalize histograms
//
G4int ih = 1;
G4double binWidth = histoManager->GetBinWidth(ih);
G4double unit = histoManager->GetHistoUnit(ih);
G4double fac = unit/(TotNbofEvents*binWidth);
histoManager->Scale(ih,fac);
ih = 10;
binWidth = histoManager->GetBinWidth(ih);
unit = histoManager->GetHistoUnit(ih);
fac = unit/(TotNbofEvents*binWidth);
histoManager->Scale(ih,fac);
// save histograms
histoManager->save();
// show Rndm status
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: StackingAction.cc,v 1.7 2006/09/25 17:06:29 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: StackingMessenger.cc,v 1.5 2006/09/25 17:06:29 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: StepMax.cc,v 1.2 2006/06/29 16:56:21 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: StepMaxMessenger.cc,v 1.3 2006/06/29 16:56:23 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: SteppingAction.cc,v 1.7 2006/06/29 16:56:25 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: SteppingVerbose.cc,v 1.3 2006/06/29 16:56:27 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: TrackingAction.cc,v 1.16 2007/11/28 12:37:57 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: TrackingAction.cc,v 1.18 2008/08/28 15:28:04 maire Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -64,10 +64,11 @@ void TrackingAction::PreUserTrackingAction(const G4Track* aTrack )
void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
{
G4ThreeVector position = aTrack->GetPosition();
G4double charge = aTrack->GetDefinition()->GetPDGCharge();
G4ThreeVector vertex = aTrack->GetVertexPosition();
G4double charge = aTrack->GetDefinition()->GetPDGCharge();
G4bool transmit = (position.x() >= xendAbs);
G4bool reflect = (position.x() <= xstartAbs);
G4bool transmit = ((position.x() >= xendAbs) && (vertex.x() < xendAbs));
G4bool reflect = (position.x() <= xstartAbs);
G4bool notabsor = (transmit || reflect);
//transmitted + reflected particles counter
@@ -81,17 +82,18 @@ void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
//
//histograms
//
G4int id = 0;
G4bool charged = (charge != 0.);
G4bool neutral = !charged;
//energy spectrum at exit
//
G4int id = 0;
if (transmit && charged) id = 10;
else if (transmit && neutral) id = 20;
else if (reflect && charged) id = 30;
else if (reflect && neutral) id = 40;
if (id>0)
histoManager->FillHisto(id, aTrack->GetKineticEnergy());
//energy leakage
@@ -107,13 +109,14 @@ void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
//space angle distribution at exit : dN/dOmega
//
G4ThreeVector direction = aTrack->GetMomentumDirection();
id = 0;
if (transmit && charged) id = 12;
else if (transmit && neutral) id = 22;
else if (reflect && charged) id = 32;
else if (reflect && neutral) id = 42;
G4ThreeVector direction = aTrack->GetMomentumDirection();
if (histoManager->HistoExist(id)) {
if (id>0) {
G4double theta = std::acos(direction.x());
G4double dteta = histoManager->GetBinWidth(id);
G4double unit = histoManager->GetHistoUnit(id);
@@ -123,12 +126,13 @@ void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
//energy fluence at exit : dE(MeV)/dOmega
//
id = 0;
if (transmit && charged) id = 11;
else if (transmit && neutral) id = 21;
else if (reflect && charged) id = 31;
else if (reflect && neutral) id = 41;
if (histoManager->HistoExist(id)) {
if (id>0) {
G4double theta = std::acos(direction.x());
G4double dteta = histoManager->GetBinWidth(id);
G4double unit = histoManager->GetHistoUnit(id);
@@ -139,6 +143,7 @@ void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
//projected angles distribution at exit
//
id = 0;
if (transmit && charged) id = 13;
else if (transmit && neutral) id = 23;
else if (reflect && charged) id = 33;
@@ -156,6 +161,7 @@ void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
//projected position and radius at exit
//
id = 0;
if (transmit && charged) id = 14;
if (id>0) {