Import Geant4 10.7.0 source tree

This commit is contained in:
Gabriele Cosmo
2020-12-04 12:30:43 +01:00
parent 67ba86d073
commit dab42d2018
3770 changed files with 226369 additions and 286486 deletions
+7 -3
View File
@@ -1,6 +1,9 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
cmake_minimum_required(VERSION 3.8...3.18)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
project(air_shower)
#----------------------------------------------------------------------------
@@ -21,7 +24,7 @@ endif()
include(${Geant4_USE_FILE})
#----------------------------------------------------------------------------
# Add options
# Add options
#
option(ULTRA_VERBOSE "Set verbosity" OFF)
@@ -32,7 +35,7 @@ endif()
#----------------------------------------------------------------------------
# Locate sources and headers for this project
#
include_directories(${PROJECT_SOURCE_DIR}/include
include_directories(${PROJECT_SOURCE_DIR}/include
${Geant4_INCLUDE_DIR})
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
@@ -50,6 +53,7 @@ target_link_libraries(Ultra ${Geant4_LIBRARIES})
#
set(air_shower_SCRIPTS
UltraMacro.mac OpenVis.mac VisDirect.mac Direct.mac Mirror.mac Ground.mac Source.mac
do_plots.C
)
foreach(_script ${air_shower_SCRIPTS})
View File
View File
+34 -21
View File
@@ -6,27 +6,40 @@
History file
------------
14.11.2020 - S. Guatelli(air_shower-V10-06-04)
Migration to G4RunFactoryManager
05.11.2020 - B.Tome (air_shower-V10-06-03)
Output results histograms to ROOT file
Add ROOT macro file to plot histograms
03.11.2020 - D.Sawkey (air_shower-V10-06-02)
Create material properties using std::vectors
02.11.2020 - B.Morgan (air_shower-V10-06-01)
Support same CMake version range as core Geant4
29.05.2020 - D.Sawkey (air_shower-V10-06-00)
added an #include to UltraDetectorConstruction, due to optical
added an #include to UltraDetectorConstruction, due to optical
physics changes.
8 November, 2019 B. Tomé (air_shower-V10-05-01)
- Minor changes, mainly stetics.
- Minor changes, mainly stetics.
31.01.2019 - I.Hrivnacova (air_shower-V10-05-00)
Merged GitHub PR #4: all Boolean operators now return G4bool.
09.11.2018 - B. Tome (air_shower-V10-04-04)
Allow to remove reflecting surface.
Allow to remove reflecting surface.
09.11.2018 - B. Tome (air_shower-V10-04-03)
Add UltraMacro.mac to CMakeLists.txt
Add UltraMacro.mac to CMakeLists.txt
09.11.2018 - B. Tome (air_shower-V10-04-02)
Reorganise macros. Add new macros.
Reorganise and simplify code in UltraDetectorConstruction.
Geometry can now be changed in the same interactive session.
Reorganise and simplify code in UltraDetectorConstruction.
Geometry can now be changed in the same interactive session.
08.11.2018 - B. Tome (air_shower-V10-04-01)
Drop detector configuration through preprocessor directives. Use detector messenger instead.
@@ -65,27 +78,27 @@
in UltraDetectorConstruction.
20.02.2015 - A. Dotti (air_shower-V10-01-00)
Set defaults for GPS in master thread
Set defaults for GPS in master thread
04.06.2014 - A. Dotti (air_shower-V10-00-00)
New MT-ready GPS: migration
22.10.2013 - L. Pandola (air_shower-V09-06-03)
UltraRunAction.cc: add include for <ctime>,
22.10.2013 - L. Pandola (air_shower-V09-06-03)
UltraRunAction.cc: add include for <ctime>,
needed for Windows
21.10.2013 - L. Pandola (air_shower-V09-06-02)
Migrated to MT. Works in MT and sequential mode.
Removed RunActionMessenger and edited UltraMacro.mac
Removed RunActionMessenger and edited UltraMacro.mac
accordingly.
27.08.2013 - G. Cosmo (air_shower-V09-06-01)
Added G4Ellipsoid among solids enabled for parameterisation.
28.05.2013 - L. Pandola (air_shower-V09-06-00)
Migrate analysis from AIDA (with local singleton
analysis class) to the g4analysis tools.
Remove AIDA dependency. CMakeLists.txt and
Migrate analysis from AIDA (with local singleton
analysis class) to the g4analysis tools.
Remove AIDA dependency. CMakeLists.txt and
README are updated accordingly
28.11.2012 - G. Cosmo (air_shower-V09-05-07)
@@ -105,7 +118,7 @@
latest change to optical boundary process.
31.01.2012 - G.Folger (air_shower-V09-05-02)
fix another compilation warning from gcc4.6: variables set but
fix another compilation warning from gcc4.6: variables set but
not used, in src/UltraEventAction.cc
18.01.2012 - G.Folger (air_shower-V09-05-01)
@@ -129,10 +142,10 @@
16.11.2009 -- B. Tomé,
Tag air_shower-V09-02-06
Changed UltraPhysicsList.cc to use new processes G4eMultipleScattering, G4MuMultipleScattering
and G4hMultipleScattering
and G4hMultipleScattering
Tested example air_shower with Geant4 tag geant4-09-02-ref-10
15.05.2009 -- B. Tomé,
15.05.2009 -- B. Tomé,
Updated README file. Tag air_shower-V09-01-00
Tested example with Geant4 tag geant4-09-02-ref-04 and iAIDA-1.0.14
@@ -146,7 +159,7 @@
Added check of optical photon energy in UltraPrimaryGeneratorAction;
Cerenkov process attached to all applicable particles;
Modified Visualisation.mac and UltraMacro.mac files
26.06.2008 -- G.A.P.Cirrone; Tag air_shower-V09-01-02
Corrected a parameter in the UltraDetectorConstruction to remove a segmentation
due to a non correct definition of the refraction index of the Quartz.
@@ -155,7 +168,7 @@
Removed no more necessary AIDA commands from GNUmakefile
11.06.2008 -- G.A.P.Cirrone air_shower-V09-01-00
Solved a compilation error in the Analysis Manager
Solved a compilation error in the Analysis Manager
30.09.2007 -- P.Gumplinger - air_shower-V09-00-00
-- adjust to the G4Cerenkov process now being a G4VDiscreteProcess
@@ -167,7 +180,7 @@
02.06.2006 -- B. Tome - air_shower-V08-00-01
-- UltraRunAction.cc : Removed use of visualization UI commands.
-- Small changes in UltraPrimaryGeneratorAction.cc
17.05.2006 -- B. Tome - air_shower-V08-00-00
-- Small fix correction
@@ -197,8 +210,8 @@
24.11.2004 -- air_shower-V06-02-01
-- Migration to the new tree-structured command format for G4GeneralParticleSource:
- new UI commands implemented
- changed access to public methods of G4GeneralParticleSource in
UltraPrimaryGenerationAction; methods of G4SPSxxxDistribution are now used.
- changed access to public methods of G4GeneralParticleSource in
UltraPrimaryGenerationAction; methods of G4SPSxxxDistribution are now used.
-- Migration to <cmath>
20.05.2004 -- Example committed
View File
+4 -1
View File
@@ -104,11 +104,14 @@ the Geant4 application developer manual (Analysis Manager Classes)
------------------------------------------------------------------------
----> Simulation output
the output is ultra.xml (or ultra.root)
the output is ultra.root
It contains:
1)1Dhistogram with the detected photons energy (eV)
2)1Dhistogram with the number of detected photons per event
To plot these histograms run the ROOT macro 'do_plots.C' :
> root do_plots.C
------------------------------------------------------------------------
for comments and questions: bernardo@lip.pt
View File
+4 -13
View File
@@ -36,13 +36,7 @@
// *******************************************************
#include "G4Types.hh"
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
#else
#include "G4RunManager.hh"
#endif
#include "G4RunManagerFactory.hh"
#include "G4UImanager.hh"
#include "Randomize.hh"
@@ -61,12 +55,9 @@ int main(int argc,char** argv) {
G4Random::setTheEngine(new CLHEP::RanluxEngine);
#ifdef G4MULTITHREADED
G4MTRunManager* runManager = new G4MTRunManager;
//runManager->SetNumberOfThreads(2);
#else
G4RunManager* runManager = new G4RunManager;
#endif
auto* runManager = G4RunManagerFactory::CreateRunManager();
G4int nThreads = 4;
runManager->SetNumberOfThreads(nThreads);
// UserInitialization classes - mandatory
runManager->SetUserInitialization(new UltraDetectorConstruction);
View File
+24 -18
View File
@@ -1,10 +1,11 @@
Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Forcing G4RunManager type...
############################################
!!! WARNING - FPE detection is activated !!!
############################################
**************************************************************
Geant4 version Name: geant4-10-06-ref-06 (26-June-2020)
Geant4 version Name: geant4-10-07-ref-00 (4-December-2020)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -89,10 +90,12 @@ Registered graphics systems are:
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
OpenGLImmediateXm (OGLIXm, OGLI)
OpenGLStoredXm (OGLSXm, OGL, OGLS)
OpenGLImmediateX (OGLIX, OGLIXm_FALLBACK)
OpenGLStoredX (OGLSX, OGLSXm_FALLBACK)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
OpenGLImmediateXm (OGLIXm, OGLIQt_FALLBACK)
OpenGLStoredXm (OGLSXm, OGLSQt_FALLBACK)
OpenGLImmediateX (OGLIX, OGLIQt_FALLBACK, OGLIXm_FALLBACK)
OpenGLStoredX (OGLSX, OGLSQt_FALLBACK, OGLSXm_FALLBACK)
RayTracerX (RayTracerX)
Registering model factories...
@@ -207,21 +210,21 @@ Index : 0 used in the geometry : Yes
Index : 1 used in the geometry : Yes
Material : Aluminum
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 6.90532 keV e- 597.637 keV e+ 574.097 keV proton 100 keV
Energy thresholds : gamma 6.90363 keV e- 598.345 keV e+ 570.85 keV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 2 used in the geometry : Yes
Material : Acrylic
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 2.77708 keV e- 389.292 keV e+ 376.471 keV proton 100 keV
Energy thresholds : gamma 2.78665 keV e- 389.196 keV e+ 376.336 keV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 3 used in the geometry : Yes
Material : Quartz
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 6.0396 keV e- 609.767 keV e+ 589.685 keV proton 100 keV
Energy thresholds : gamma 6.03542 keV e- 610.53 keV e+ 590.357 keV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
@@ -230,7 +233,7 @@ Index : 3 used in the geometry : Yes
Start closing geometry.
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 2 kByte
Total memory consumed for geometry optimisation: 1 kByte
Total CPU time elapsed for geometry optimisation: 0 seconds
Voxelisation: top CPU users:
@@ -242,16 +245,16 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Voxelisation: top memory users:
Percent Memory Heads Nodes Pointers Total CPU Volume
------- -------- ------ ------ -------- ---------- ----------
52.81 1k 1 13 26 0.00 LensMotherLV
47.19 1k 3 9 22 0.00 World
52.31 0k 1 13 26 0.00 LensMotherLV
47.69 0k 3 9 22 0.00 World
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
See commands in /vis/modeling/trajectories/ for other options.
### Run 0 starts.
ooo Run 0 starts (global).
--------- Ranlux engine status ---------
Initial seed = 1593046427
float_seed_table[] = 0.147597 0.980425 0.900216 0.380846 0.303985 0.791623 0.132859 0.350516 0.641343 0.866017 0.885685 0.873382 0.665981 0.724537 0.776523 0.937184 0.512054 0.420086 0.399701 0.749612 0.0040521 0.148756 0.382486 0.991302
Initial seed = 1606871379
float_seed_table[] = 0.939458 0.62324 0.465535 0.0973256 0.406636 0.289566 0.762446 0.616188 0.268306 0.178795 0.36999 0.847358 0.199686 0.353497 0.919378 0.171744 0.360638 0.609156 0.807621 0.281062 0.462247 0.400262 0.252149 0.502587
i_lag = 23, j_lag = 9
carry = 0, count24 = 0
luxury = 3 nskip = 199
@@ -262,8 +265,11 @@ mu- Mono Plane
Run terminated.
Run Summary
Number of events processed : 100
User=3.570000s Real=3.741177s Sys=0.010000s
User=2.060000s Real=2.096824s Sys=0.000000s
### Run 0 (global) ended.
0 events have been kept for refreshing and/or reviewing.
"/vis/reviewKeptEvents" to review them one by one.
"/vis/enable", then "/vis/viewer/flush" or "/vis/viewer/rebuild" to see them accumulated.
Graphics systems deleted.
Visualization Manager deleting...
G4 kernel has come to Quit state.
@@ -277,9 +283,9 @@ G4SDManager deleted.
EventManager deleted.
Units table cleared.
TransportationManager deleted.
Total navigation history collections cleaned: 9
Total navigation history collections cleaned: 10
================== Deleting memory pools ===================
Pool ID '20G4NavigationLevelRep', size : 0.0115 MB
Pool ID '20G4NavigationLevelRep', size : 0.0135 MB
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
Pool ID '7G4Event', size : 0.000961 MB
Pool ID '15G4PrimaryVertex', size : 0.000961 MB
@@ -290,9 +296,9 @@ Pool ID '17G4DynamicParticle', size : 0.024 MB
Pool ID '7G4Track', size : 0.0471 MB
Pool ID '18G4TouchableHistory', size : 0.000961 MB
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
Pool ID '15UltraOpticalHit', size : 0.000961 MB
Pool ID '15UltraOpticalHit', size : 0.00385 MB
Number of memory pools allocated: 12 of which, static: 0
Dynamic pools deleted: 12 / Total memory freed: 0.091 MB
Dynamic pools deleted: 12 / Total memory freed: 0.096 MB
============================================================
G4Allocator objects are deleted.
UImanager deleted.
+12
View File
@@ -0,0 +1,12 @@
{
// Plot the energy spectrum of the primary particles
gROOT -> Reset();
TFile f("ultra.root");
TCanvas *c1 = new TCanvas("Photons energy");
PhotonEnergy->Draw();
TCanvas *c2 = new TCanvas("Number of photons");
NumberDetectedPhotons->Draw();
}
@@ -41,7 +41,6 @@
#ifndef ULTRAANALYSISMANAGER_HH
#define ULTRAANALYSISMANAGER_HH 1
//#include "g4root.hh"
#include "g4xml.hh"
#include "g4root.hh"
#endif
@@ -227,22 +227,20 @@ void UltraDetectorConstruction::ConstructTableMaterials()
// Construct Material Properties Tables
/////////////////////////////////////////////
const G4int NUMENTRIES = 2;
// Energy bins
G4double X_RINDEX[NUMENTRIES] = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
std::vector<G4double> X_RINDEX = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
// Air
G4double RINDEX_AIR[NUMENTRIES] = {1.00, 1.00} ;
std::vector<G4double> RINDEX_AIR = {1.00, 1.00} ;
// Air refractive index at 20 oC and 1 atm (from PDG)
for(G4int j=0 ; j<NUMENTRIES ; j++){
for(size_t j=0 ; j<RINDEX_AIR.size(); ++j){
RINDEX_AIR[j] = RINDEX_AIR[j] + 2.73*std::pow(10.0,-4) ;
}
G4MaterialPropertiesTable *MPT_Air = new G4MaterialPropertiesTable();
MPT_Air->AddProperty("RINDEX", X_RINDEX, RINDEX_AIR, NUMENTRIES);
MPT_Air->AddProperty("RINDEX", X_RINDEX, RINDEX_AIR);
Air->SetMaterialPropertiesTable(MPT_Air);
//////////////////////////////////////////////////////////////////////////////////////
@@ -253,12 +251,11 @@ void UltraDetectorConstruction::ConstructTableMaterials()
// Refractive index
const G4int N_RINDEX_QUARTZ = 2 ;
G4double X_RINDEX_QUARTZ[N_RINDEX_QUARTZ] = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
G4double RINDEX_QUARTZ[N_RINDEX_QUARTZ] = {1.54, 1.54};
std::vector<G4double> X_RINDEX_QUARTZ = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
std::vector<G4double> RINDEX_QUARTZ = {1.54, 1.54};
G4MaterialPropertiesTable *MPT_PMT = new G4MaterialPropertiesTable();
MPT_PMT->AddProperty("RINDEX", X_RINDEX_QUARTZ, RINDEX_QUARTZ, N_RINDEX_QUARTZ);
MPT_PMT->AddProperty("RINDEX", X_RINDEX_QUARTZ, RINDEX_QUARTZ);
Quartz->SetMaterialPropertiesTable(MPT_PMT);
@@ -270,38 +267,36 @@ void UltraDetectorConstruction::ConstructTableMaterials()
// Refractive index
const G4int NENTRIES = 11 ;
G4double LAMBDA_ACRYLIC[NENTRIES] ;
std::vector<G4double> RINDEX_ACRYLIC;
std::vector<G4double> ENERGY_ACRYLIC;
G4double RINDEX_ACRYLIC[NENTRIES] ;
G4double ENERGY_ACRYLIC[NENTRIES] ;
// Parameterization for refractive index of High Grade PMMA
// Parameterization for refractive index of High Grade PMMA
G4double bParam[4] = {1760.7010,-1.3687,2.4388e-3,-1.5178e-6} ;
for(G4int i=0;i<NENTRIES; i++){
G4double lambda = 0.;
for(G4int i=0;i<NENTRIES; ++i){
LAMBDA_ACRYLIC[i] = lambda_min + i*(lambda_max-lambda_min)/float(NENTRIES-1) ;
RINDEX_ACRYLIC[i] = 0.0 ;
lambda = lambda_min + i*(lambda_max-lambda_min)/float(NENTRIES-1);
RINDEX_ACRYLIC.push_back(0.0);
for (G4int jj=0 ; jj<4 ; jj++)
{
RINDEX_ACRYLIC[i] += (bParam[jj]/1000.0)*std::pow(LAMBDA_ACRYLIC[i]/nm,jj) ;
RINDEX_ACRYLIC[i] += (bParam[jj]/1000.0)*std::pow(lambda/nm,jj) ;
}
ENERGY_ACRYLIC[i] = h_Planck*c_light/LAMBDA_ACRYLIC[i] ; // Convert from wavelength to energy ;
// G4cout << ENERGY_ACRYLIC[i]/eV << " " << LAMBDA_ACRYLIC[i]/nm << " " << RINDEX_ACRYLIC[i] << G4endl ;
ENERGY_ACRYLIC.push_back(h_Planck*c_light/lambda); // Convert from wavelength to energy ;
// G4cout << ENERGY_ACRYLIC[i]/eV << " " << lambda/nm << " " << RINDEX_ACRYLIC[i] << G4endl ;
}
G4MaterialPropertiesTable *MPT_Acrylic = new G4MaterialPropertiesTable();
MPT_Acrylic->AddProperty("RINDEX", ENERGY_ACRYLIC, RINDEX_ACRYLIC, NENTRIES);
MPT_Acrylic->AddProperty("RINDEX", ENERGY_ACRYLIC, RINDEX_ACRYLIC);
// Absorption
const G4int NENT = 25 ;
G4double LAMBDAABS[NENT] =
std::vector<G4double> LAMBDAABS =
{
100.0,
246.528671, 260.605103, 263.853516, 266.019104, 268.726105,
@@ -312,7 +307,7 @@ void UltraDetectorConstruction::ConstructTableMaterials()
700.0
} ;
G4double ABS[NENT] = // Transmission (in %) of 3mm thick PMMA
std::vector<G4double> ABS = // Transmission (in %) of 3mm thick PMMA
{
0.0000000,
0.0000000, 5.295952, 9.657321, 19.937695, 29.283491,
@@ -325,7 +320,7 @@ void UltraDetectorConstruction::ConstructTableMaterials()
MPT_Acrylic->AddProperty("ABSLENGTH", new G4MaterialPropertyVector()) ;
for(G4int i=0;i<NENT; i++){
for(size_t i=0;i<ABS.size(); ++i){
G4double energy = h_Planck*c_light/(LAMBDAABS[i]*nm) ;
G4double abslength ;
@@ -382,12 +377,11 @@ void UltraDetectorConstruction::ConstructReflector()
fReflectorOpticalSurface->SetModel(unified);
fReflectorOpticalSurface->SetType(dielectric_dielectric);
const G4int NUM = 2;
G4double XX[NUM] = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
G4double ICEREFLECTIVITY[NUM] = { 0.95, 0.95 };
std::vector<G4double> XX = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
std::vector<G4double> ICEREFLECTIVITY = { 0.95, 0.95 };
G4MaterialPropertiesTable *AirMirrorMPT = new G4MaterialPropertiesTable();
AirMirrorMPT->AddProperty("REFLECTIVITY", XX, ICEREFLECTIVITY,NUM);
AirMirrorMPT->AddProperty("REFLECTIVITY", XX, ICEREFLECTIVITY);
fReflectorOpticalSurface->SetMaterialPropertiesTable(AirMirrorMPT);
new G4LogicalSkinSurface("ReflectorSurface",fReflectorLog,fReflectorOpticalSurface);
@@ -557,13 +551,12 @@ void UltraDetectorConstruction::ConstructUVscope()
OpticalAirPaint->SetType(dielectric_dielectric);
OpticalAirPaint->SetFinish(groundfrontpainted);
const G4int NUM = 2;
G4double XX[NUM] = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
G4double BLACKPAINTREFLECTIVITY[NUM] = { 0.05, 0.05 };
//G4double WHITEPAINTREFLECTIVITY[NUM] = { 0.99, 0.99 };
std::vector<G4double> XX = {h_Planck*c_light/lambda_max, h_Planck*c_light/lambda_min} ;
std::vector<G4double> BLACKPAINTREFLECTIVITY = { 0.05, 0.05 };
//std::vector<G4double> WHITEPAINTREFLECTIVITY = { 0.99, 0.99 };
G4MaterialPropertiesTable *AirPaintMPT = new G4MaterialPropertiesTable();
AirPaintMPT->AddProperty("REFLECTIVITY", XX, BLACKPAINTREFLECTIVITY,NUM);
AirPaintMPT->AddProperty("REFLECTIVITY", XX, BLACKPAINTREFLECTIVITY);
OpticalAirPaint->SetMaterialPropertiesTable(AirPaintMPT);
//OpticalAirPaint->DumpInfo();
@@ -72,9 +72,9 @@ void UltraRunAction::BeginOfRunAction(const G4Run* aRun)
man->SetFirstHistoId(1);
// Create histogram(s)
man->CreateH1("1","Optical photons energy (eV)", //histoID,histo name
man->CreateH1("PhotonEnergy","Optical photons energy (eV)", //histoID,histo name
500,0.,5.); //bins' number, xmin, xmax
man->CreateH1("2","Number of Detected Photons",
man->CreateH1("NumberDetectedPhotons","Number of Detected Photons",
10,0.,10.); //bins' number, xmin, xmax
if (!IsMaster()) //it is a slave, do nothing else