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
@@ -25,7 +25,7 @@
//
//
// $Id: DetectorConstruction.cc,v 1.3 2007/05/12 16:33:53 vnivanch 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: DetectorMessenger.cc,v 1.2 2006/06/29 16:48:51 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: EventAction.cc,v 1.2 2006/06/29 16:48:53 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: EventActionMessenger.cc,v 1.2 2006/06/29 16:48:55 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.2 2006/06/29 16:48:58 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: HistoManager.cc,v 1.4 2008/09/26 20:15:04 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] = "testem17";
fileType = "hbook";
fileOption = "--noErrors uncompress";
fileType = "root";
fileOption = "--noErrors export=root uncompress";
// histograms
for (G4int k=0; k<MaxHisto; k++) {
histo[k] = 0;
@@ -163,13 +163,16 @@ void HistoManager::SetHisto(G4int ih,
return;
}
const G4String id[] = { "0", "1", "2", "3", "4"};
const G4String id[] = { "0", "1", "2", "3", "4", "5", "6", "7"};
const G4String title[] =
{ "dummy", //0
"log10(Etransfert/Emu) Ionization", //1
"log10(Etransfert/Emu) Pair", //2
"log10(Etransfert/Emu) Brems", //3
"log10(Etransfert/Emu) Nuclear" //4
"log10(Etransfert/Emu) Nuclear", //4
"log10(Etransfert/Emu) Ionization", //5
"log10(Etransfert/Emu) Pair", //6
"log10(Etransfert/Emu) Brems" //7
};
G4String titl = title[ih];
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: HistoMessenger.cc,v 1.2 2006/06/29 16:49:01 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: MuCrossSections.cc,v 1.2 2006/06/29 16:49:03 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: MuNuclearBuilder.cc,v 1.2 2006/06/29 16:49:05 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.2 2006/06/29 16:49:09 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: PhysListEmStandard.cc,v 1.4 2008/05/07 13:57:56 maire Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -34,11 +34,17 @@
#include "G4ParticleDefinition.hh"
#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4Proton.hh"
#include "G4ProcessManager.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
#include "G4hBremsstrahlung.hh"
#include "G4hPairProduction.hh"
#include "G4LossTableManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -56,32 +62,49 @@ PhysListEmStandard::~PhysListEmStandard()
void PhysListEmStandard::ConstructProcess()
{
// Common processes for mu+ and mu-
//
G4MuIonisation* muioni = new G4MuIonisation();
G4MuBremsstrahlung* mubrem = new G4MuBremsstrahlung();
G4MuPairProduction* mupair = new G4MuPairProduction();
// mu+
G4ParticleDefinition* particle = G4MuonPlus::MuonPlus();
G4ProcessManager* pmanager = particle->GetProcessManager();
//
pmanager->AddProcess(muioni, -1, 2,2);
pmanager->AddProcess(mubrem, -1,-1,3);
pmanager->AddProcess(mupair, -1,-1,4);
pmanager->AddProcess(new G4MuIonisation(), -1, 2, 2);
pmanager->AddProcess(new G4MuBremsstrahlung(), -1, 3, 3);
pmanager->AddProcess(new G4MuPairProduction(), -1, 4, 4);
// mu-
particle = G4MuonMinus::MuonMinus();
pmanager = particle->GetProcessManager();
//
pmanager->AddProcess(muioni, -1, 2,2);
pmanager->AddProcess(mubrem, -1,-1,3);
pmanager->AddProcess(mupair, -1,-1,4);
pmanager->AddProcess(new G4MuIonisation(), -1, 2, 2);
pmanager->AddProcess(new G4MuBremsstrahlung(), -1, 3, 3);
pmanager->AddProcess(new G4MuPairProduction(), -1, 4, 4);
// pi+
particle = G4PionPlus::PionPlus();
pmanager = particle->GetProcessManager();
pmanager->AddProcess(new G4hIonisation(), -1, 2, 2);
pmanager->AddProcess(new G4hBremsstrahlung(), -1, 3, 3);
pmanager->AddProcess(new G4hPairProduction(), -1, 4, 4);
// pi-
particle = G4PionMinus::PionMinus();
pmanager = particle->GetProcessManager();
pmanager->AddProcess(new G4hIonisation(), -1, 2, 2);
pmanager->AddProcess(new G4hBremsstrahlung(), -1, 3, 3);
pmanager->AddProcess(new G4hPairProduction(), -1, 4, 4);
// proton
particle = G4Proton::Proton();
pmanager = particle->GetProcessManager();
pmanager->AddProcess(new G4hIonisation(), -1, 2, 2);
pmanager->AddProcess(new G4hBremsstrahlung(), -1, 3, 3);
pmanager->AddProcess(new G4hPairProduction(), -1, 4, 4);
//extend binning of PhysicsTables
//
G4LossTableManager::Instance()->SetMaxEnergy(1000.0*PeV);
G4LossTableManager::Instance()->SetDEDXBinning(220);
G4LossTableManager::Instance()->SetLambdaBinning(220);
G4LossTableManager::Instance()->SetVerbose(0);
G4LossTableManager::Instance()->SetMinEnergy(100*eV);
G4LossTableManager::Instance()->SetMaxEnergy(1000*PeV);
G4LossTableManager::Instance()->SetDEDXBinning(160);
G4LossTableManager::Instance()->SetLambdaBinning(160);
G4LossTableManager::Instance()->SetSplineFlag(true);
G4LossTableManager::Instance()->SetVerbose(1);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -25,7 +25,7 @@
//
//
// $Id: PhysicsList.cc,v 1.4 2006/10/24 10:06:21 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: PhysicsListMessenger.cc,v 1.2 2006/06/29 16:49:13 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.2 2006/06/29 16:49:15 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.2 2006/06/29 16:49:17 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: RunAction.cc,v 1.4 2008/03/31 10:22:59 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -138,22 +138,23 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
//compute theoritical predictions
//
totalCrossSection = 0.;
for (size_t i=0; i< ProcCounter->size();i++) {
G4String procName = (*ProcCounter)[i]->GetName();
if (procName != "Transportation")
totalCrossSection += ComputeTheory(procName, NbOfEvents);
if(particle == "mu+" || particle == "mu-") {
totalCrossSection = 0.;
for (size_t i=0; i< ProcCounter->size();i++) {
G4String procName = (*ProcCounter)[i]->GetName();
if (procName != "Transportation")
totalCrossSection += ComputeTheory(procName, NbOfEvents);
}
MeanFreePath = 1./totalCrossSection;
massCrossSection = totalCrossSection/density;
G4cout << " Theory: "
<< "total CrossSection = " << totalCrossSection*cm << " /cm"
<< "\t MeanFreePath = " << G4BestUnit(MeanFreePath,"Length")
<< "\t massicCrossSection = " << massCrossSection*g/cm2 << " cm2/g"
<< G4endl;
}
MeanFreePath = 1./totalCrossSection;
massCrossSection = totalCrossSection/density;
G4cout << " Theory: "
<< "total CrossSection = " << totalCrossSection*cm << " /cm"
<< "\t MeanFreePath = " << G4BestUnit(MeanFreePath,"Length")
<< "\t massicCrossSection = " << massCrossSection*g/cm2 << " cm2/g"
<< G4endl;
G4cout.setf(mode,std::ios::floatfield);
G4cout.precision(prec);
@@ -182,11 +183,15 @@ G4double RunAction::ComputeTheory(G4String process, G4int NbOfMu)
MuCrossSections crossSections;
G4int id = 0; G4double cut = 0.;
if (process == "muIoni") {id = 1; cut = GetEnergyCut(material,1); }
if (process == "muPairProd") {id = 2; cut = 2*(GetEnergyCut(material,1)
if (process == "muIoni") {id = 1; cut = GetEnergyCut(material,1);}
else if (process == "muPairProd") {id = 2; cut = 2*(GetEnergyCut(material,1)
+ electron_mass_c2); }
if (process == "muBrems") {id = 3; cut = GetEnergyCut(material,0); }
if (process == "muNucl") id = 4;
else if (process == "muBrems") {id = 3; cut = GetEnergyCut(material,0);}
else if (process == "muNucl") id = 4;
else if (process == "hIoni") {id = 5; cut = GetEnergyCut(material,1);}
else if (process == "hPairProd") {id = 6; cut = 2*(GetEnergyCut(material,1)
+ electron_mass_c2); }
else if (process == "hBrems") {id = 7; cut = GetEnergyCut(material,0);}
if (id == 0) return 0.;
G4int nbOfBins = 100;
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: StackingAction.cc,v 1.2 2006/06/29 16:49:20 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: SteppingAction.cc,v 1.2 2006/06/29 16:49:22 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: SteppingAction.cc,v 1.4 2008/03/31 10:22:59 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -69,10 +69,13 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep)
if (etrans > 0.) lgepsE = std::log10(etrans/E1);
G4int id = 0;
if (procName == "muIoni") id = 1;
if (procName == "muPairProd") id = 2;
if (procName == "muBrems") id = 3;
if (procName == "muNucl") id = 4;
if (procName == "muIoni") id = 1;
else if (procName == "muPairProd") id = 2;
else if (procName == "muBrems") id = 3;
else if (procName == "muNucl") id = 4;
else if (procName == "hIoni") id = 5;
else if (procName == "hPairProd") id = 6;
else if (procName == "hBrems") id = 7;
histoManager->FillHisto(id,lgepsE);
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: SteppingVerbose.cc,v 1.2 2006/06/29 16:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......