Import Geant4 10.5.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2018-06-29 10:58:11 +02:00
parent fe81a77428
commit 6aa23be517
1581 changed files with 124288 additions and 83758 deletions
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm1/src/HistoManager.cc
/// \brief Implementation of the HistoManager class
//
// $Id: HistoManager.cc 81776 2014-06-05 08:41:01Z gcosmo $
// $Id: HistoManager.cc 109283 2018-04-09 10:00:23Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -64,16 +64,16 @@ void HistoManager::Book()
// Define histograms start values
const G4int kMaxHisto = 6;
const G4String id[] = { "1", "2", "3" , "4", "5", "6"};
const G4String id[] = { "1", "2", "3" , "4", "5", "6" };
const G4String title[] =
{ "total track length of primary particle", //1
"nb steps of primary particle", //2
"step size of primary particle", //3
"total energy deposit", //4
"energy of charged secondaries at creation", //5
"energy of neutral secondaries at creation" //6
"energy of neutral secondaries at creation" //6
};
// Default values (to be reset via /analysis/h1/set command)
// Default values (to be reset via /analysis/h1/set command)
G4int nbins = 100;
G4double vmin = 0.;
G4double vmax = 100.;
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm1/src/PhysicsList.cc
/// \brief Implementation of the PhysicsList class
//
// $Id: PhysicsList.cc 100290 2016-10-17 08:47:55Z gcosmo $
// $Id: PhysicsList.cc 108857 2018-03-12 07:42:27Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -134,7 +134,12 @@ void PhysicsList::ConstructProcess()
// step limitation (as a full process)
//
AddStepMax();
AddStepMax();
// Get process
auto process = GetProcess("RadioactiveDecay");
if (process != nullptr)
G4cout << "\n GetProcess : " << process->GetProcessName() << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -303,3 +308,21 @@ void PhysicsList::GetRange(G4double val)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Proton.hh"
#include "G4GenericIon.hh"
G4VProcess* PhysicsList::GetProcess(const G4String& processName) const
{
G4ParticleDefinition* particle = G4GenericIon::GenericIon();
G4ProcessVector* procList = particle->GetProcessManager()->GetProcessList();
G4int nbProc = particle->GetProcessManager()->GetProcessListLength();
for (G4int k=0; k<nbProc; k++) {
G4VProcess* process = (*procList)[k];
if (process->GetProcessName() == processName) return process;
}
return nullptr;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -38,6 +38,7 @@
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
#include "G4EmCalculator.hh"
#include "G4ProductionCutsTable.hh"
#include <iomanip>
@@ -140,8 +141,8 @@ void Run::EndOfRun()
<< G4BestUnit(fEkin,"Energy") << " through "
<< G4BestUnit(fDetector->GetSize(),"Length") << " of "
<< material->GetName() << " (density: "
<< G4BestUnit(density,"Volumic Mass") << ")" << G4endl;
<< G4BestUnit(density,"Volumic Mass") << ")" << G4endl;
if (numberOfEvent == 0) { G4cout.precision(dfprec); return;}
G4double dNbOfEvents = double(numberOfEvent);
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm1/src/SteppingAction.cc
/// \brief Implementation of the SteppingAction class
//
// $Id: SteppingAction.cc 98759 2016-08-09 14:03:09Z gcosmo $
// $Id: SteppingAction.cc 109283 2018-04-09 10:00:23Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -56,6 +56,7 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep)
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
G4double EdepStep = aStep->GetTotalEnergyDeposit();
if (EdepStep > 0.) { run->AddEdep(EdepStep);
fEventAction->AddEdep(EdepStep);
}