Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 103624 2017-04-19 13:27:14Z gcosmo $
|
||||
$Id: History 110644 2018-06-04 16:51:03Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -15,6 +15,20 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
04-06-18 mma (testem11-V10-04-03)
|
||||
- SteppingAction.cc : Photoelectric, edep at end of step
|
||||
|
||||
09-05-18 B.Morgan (testem11-V10-04-02)
|
||||
- Include G4Types before use of G4MULTITHREADED. For forward
|
||||
compatibility with move to #defines over -D for G4 preprocessor
|
||||
symbols.
|
||||
|
||||
09-04-18 mma (testem11-V10-04-01)
|
||||
- testem11.cc : set visualisation only in interactive mode
|
||||
|
||||
19-03-18 mma (testem11-V10-04-00)
|
||||
- testem11.cc : remove G4UI_USE and G4VIS_USE
|
||||
|
||||
19-04-17 mma (testem11-V10-03-00)
|
||||
- BeginOfRunAction() : remove SetRandomNumberStore(true)
|
||||
|
||||
|
||||
@@ -26,11 +26,13 @@
|
||||
/// \file electromagnetic/TestEm11/TestEm11.cc
|
||||
/// \brief Main program of the electromagnetic/TestEm11 example
|
||||
//
|
||||
// $Id: TestEm11.cc 96329 2016-04-06 15:53:16Z gcosmo $
|
||||
//
|
||||
// $Id: TestEm11.cc 110644 2018-06-04 16:51:03Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4Types.hh"
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
#else
|
||||
@@ -45,22 +47,23 @@
|
||||
#include "ActionInitialization.hh"
|
||||
#include "SteppingVerbose.hh"
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
#include "G4VisExecutive.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4UI_USE
|
||||
#include "G4UIExecutive.hh"
|
||||
#endif
|
||||
#include "G4VisExecutive.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
int main(int argc,char** argv) {
|
||||
|
||||
|
||||
//detect interactive mode (if no arguments) and define UI session
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if (argc == 1) ui = new G4UIExecutive(argc,argv);
|
||||
|
||||
//choose the Random engine
|
||||
G4Random::setTheEngine(new CLHEP::RanecuEngine);
|
||||
G4VSteppingVerbose::SetInstance(new SteppingVerbose);
|
||||
|
||||
|
||||
//choose local stepping verbose
|
||||
G4VSteppingVerbose::SetInstance(new SteppingVerbose);
|
||||
|
||||
//Construct the default run manager
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MTRunManager* runManager = new G4MTRunManager;
|
||||
@@ -68,7 +71,7 @@ int main(int argc,char** argv) {
|
||||
G4int nThreads = std::min(G4Threading::G4GetNumberOfCores(),4);
|
||||
if (argc==3) nThreads = G4UIcommand::ConvertToInt(argv[2]);
|
||||
runManager->SetNumberOfThreads(nThreads);
|
||||
G4cout << "===== TestEm11 is started with "
|
||||
G4cout << "===== TestEm11 is started with "
|
||||
<< runManager->GetNumberOfThreads() << " threads =====" << G4endl;
|
||||
#else
|
||||
G4RunManager* runManager = new G4RunManager;
|
||||
@@ -80,41 +83,32 @@ int main(int argc,char** argv) {
|
||||
|
||||
PhysicsList* phys = new PhysicsList;
|
||||
runManager->SetUserInitialization(phys);
|
||||
|
||||
|
||||
runManager->SetUserInitialization(new ActionInitialization(det, phys));
|
||||
|
||||
//get the pointer to the User Interface manager
|
||||
G4UImanager* UI = G4UImanager::GetUIpointer();
|
||||
|
||||
if (argc!=1) // batch mode
|
||||
{
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UI->ApplyCommand(command+fileName);
|
||||
}
|
||||
else //define visualization and UI terminal for interactive mode
|
||||
{
|
||||
#ifdef G4VIS_USE
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
#endif
|
||||
|
||||
#ifdef G4UI_USE
|
||||
G4UIExecutive * ui = new G4UIExecutive(argc,argv);
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
delete visManager;
|
||||
#endif
|
||||
}
|
||||
//initialize visualization
|
||||
G4VisManager* visManager = nullptr;
|
||||
|
||||
//get the pointer to the User Interface manager
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
if (ui) {
|
||||
//interactive mode
|
||||
visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
else {
|
||||
//batch mode
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command+fileName);
|
||||
}
|
||||
|
||||
//job termination
|
||||
//
|
||||
delete visManager;
|
||||
delete runManager;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
############################################
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-10-04-patch-02 (25-May-2018)
|
||||
Geant4 version Name: geant4-10-05-beta-01 (29-June-2018)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -71,8 +71,8 @@ compt: for gamma SubType= 13 BuildTable= 1
|
||||
conv: for gamma SubType= 14 BuildTable= 1
|
||||
Lambda table from 1.022 MeV to 100 TeV, 20 bins per decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BetheHeitler : Emin= 0 eV Emax= 80 GeV
|
||||
BetheHeitlerLPM : Emin= 80 GeV Emax= 100 TeV
|
||||
BetheHeitler : Emin= 0 eV Emax= 80 GeV AngularGenUrban
|
||||
BetheHeitlerLPM : Emin= 80 GeV Emax= 100 TeV AngularGenUrban
|
||||
|
||||
Rayl: for gamma SubType= 11 BuildTable= 1
|
||||
Lambda table from 10 eV to 100 keV, 20 bins per decade, spline: 0
|
||||
@@ -106,7 +106,7 @@ ePairProd: for e- SubType= 4
|
||||
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
|
||||
Sampling table 25x1001 from 0.1 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
muPairProd : Emin= 0 eV Emax= 100 TeV
|
||||
ePairProd : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
msc: for e+ SubType= 10
|
||||
RangeFactor= 0.04, stepLimitType: 3, latDisplacement: 1, skin= 1, geomFactor= 2.5
|
||||
@@ -134,7 +134,7 @@ ePairProd: for e+ SubType= 4
|
||||
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
|
||||
Sampling table 25x1001 from 0.1 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
muPairProd : Emin= 0 eV Emax= 100 TeV
|
||||
ePairProd : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
annihil: for e+, integral: 1 SubType= 5 BuildTable= 0
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
@@ -472,27 +472,27 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 20000
|
||||
User=2.37s Real=2.52s Sys=0s
|
||||
User=1.520000s Real=1.521822s Sys=0.000000s
|
||||
|
||||
======================== run summary =====================
|
||||
|
||||
The run is 20000 e- of 500.00 keV through 1 absorbers:
|
||||
1 1.00 mm of G4_Si (density: 2.33 g/cm3 )
|
||||
|
||||
Edep in absorber 1 = 447.818 keV (20.838 keV-->500.000 keV)
|
||||
Edep in absorber 1 = 447.861 keV (20.428 keV-->500.000 keV)
|
||||
|
||||
Track length of primary track = 880.168 um +- 192.969 um
|
||||
Track length of primary track = 879.764 um +- 192.720 um
|
||||
Range from EmCalculator = 942.776 um (from full dE/dx)
|
||||
|
||||
Projected range = 317.026 um +- 198.295 um
|
||||
Projected range = 318.159 um +- 198.950 um
|
||||
|
||||
Nb of steps of primary track = 21.02 +- 4.89 Step size= 42.334 um +- 6.726 um
|
||||
Nb of steps of primary track = 20.99 +- 4.89 Step size= 42.393 um +- 6.739 um
|
||||
|
||||
absorbed = 78.01 % transmit = 5.12 % reflected = 16.86 %
|
||||
absorbed = 77.61 % transmit = 4.96 % reflected = 17.43 %
|
||||
|
||||
--------- Ranecu engine status ---------
|
||||
Initial seed (index) = 0
|
||||
Current couple of seeds = 512212800, 564968512
|
||||
Current couple of seeds = 1981514717, 1520502085
|
||||
----------------------------------------
|
||||
G4 kernel has come to Quit state.
|
||||
UserDetectorConstruction deleted.
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm11/src/SteppingAction.cc
|
||||
/// \brief Implementation of the SteppingAction class
|
||||
//
|
||||
// $Id: SteppingAction.cc 98749 2016-08-09 13:43:36Z gcosmo $
|
||||
// $Id: SteppingAction.cc 110644 2018-06-04 16:51:03Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -69,8 +69,9 @@ void SteppingAction::UserSteppingAction(const G4Step* step)
|
||||
G4ThreeVector P1 = prePoint ->GetPosition();
|
||||
G4ThreeVector P2 = postPoint->GetPosition();
|
||||
G4ThreeVector point = P1 + G4UniformRand()*(P2 - P1);
|
||||
if (step->GetTrack()->GetDefinition()->GetPDGCharge() == 0.) point = P2;
|
||||
G4double x = point.x();
|
||||
G4double xshifted = x + 0.5*fDetector->GetAbsorSizeX();
|
||||
G4double xshifted = x + 0.5*fDetector->GetAbsorSizeX();
|
||||
analysisManager->FillH1(1, xshifted, edep);
|
||||
|
||||
//"normalized" histogram
|
||||
@@ -98,7 +99,7 @@ void SteppingAction::UserSteppingAction(const G4Step* step)
|
||||
const G4Track* track = step->GetTrack();
|
||||
if (track->GetTrackID() == 1) analysisManager->FillH1(4, steplen);
|
||||
else if (track->GetDefinition()->GetPDGCharge() != 0.)
|
||||
analysisManager->FillH1(7, steplen);
|
||||
analysisManager->FillH1(7, steplen);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user