Import Geant4 10.4.0 source tree
This commit is contained in:
@@ -0,0 +1,219 @@
|
||||
|
||||
Geant4 10.3 - patch-02 Release Notes
|
||||
------------------------------------
|
||||
|
||||
27 July 2017
|
||||
|
||||
List of fixes included in this public patch since the public release 10.3.p01:
|
||||
|
||||
o Configuration:
|
||||
-------------
|
||||
+ CMake:
|
||||
o Added VECGEOM_DEFINITIONS and VECGEOM_EXTERNAL_INCLUDES when compiling
|
||||
with USolids/VecGeom enabled, to allow for detection of external
|
||||
packages paths from VecGeom.
|
||||
o Corrected Qt setup for GNUmake builds, avoid setting QTLIBS and
|
||||
GLQTLIBS as already handled by the GNUmake system for Qt4 and Qt5.
|
||||
+ GNUmake:
|
||||
o Corrected order of linkage in binmake.gmk for analysis global library.
|
||||
|
||||
o Analysis:
|
||||
--------
|
||||
+ Fixed problem of removing non-empty ntuple files in user application
|
||||
where ntuples are created after open file.
|
||||
+ Added GetP[1,2]Id(const G4String&) functions to G4AnaysisManager.
|
||||
Addressing problem report #1949.
|
||||
+ Corrected handling of open file failure.
|
||||
Addressing problem report #1957.
|
||||
|
||||
o Event:
|
||||
-----
|
||||
+ Fixed 'fallthrough' compilation warnings in case statements on gcc-7.1.
|
||||
|
||||
o Externals:
|
||||
---------
|
||||
+ Fixed compilation warnings on gcc-7.1.
|
||||
|
||||
o G3toG4:
|
||||
------
|
||||
+ Fixed compilation warnings on gcc-7.1.
|
||||
|
||||
o Generic Processes:
|
||||
-----------------
|
||||
+ biasing:
|
||||
o G4GeometrySampler: removed unnecessary ClearSampling() from the
|
||||
destructor.
|
||||
+ scoring:
|
||||
o G4ParallelWorldProcess: fix to have a valid pointer to secondaries
|
||||
in G4Step of a parallel world.
|
||||
|
||||
o Geometry:
|
||||
--------
|
||||
+ biasing:
|
||||
o Added mutex locks to methods within G4IStore and G4ImportanceAlgorithm.
|
||||
Temporary fix for erratic behaviour in MT-mode and crashing if bounds-
|
||||
checking is switched on with many threads/events.
|
||||
Addressing problem report #1945.
|
||||
+ solids/CSG:
|
||||
o Fixed possible rounding off error in calculation of 'astep' (max angle
|
||||
for one step) in CalculateExtent() for G4Cons, G4Tubs, G4CutTubs
|
||||
and related USolids wrappers.
|
||||
o Added accessor to G4Orb and G4UOrb for retrieving cached max radius
|
||||
tolerance.
|
||||
o Fix in G4CutTubs::Inside() for case where inside points were considered
|
||||
as points on surface. Addressing problem report #1973.
|
||||
+ solids/specific:
|
||||
o Fixed possible rounding off error in calculation of 'astep' (max angle
|
||||
for one step) in CalculateExtent() for G4Polycone, G4GenericPolycone
|
||||
and related USolids wrappers.
|
||||
o Removed potential race condition in G4VTwistSurface::AmIOnLeftSide().
|
||||
Addressing problem report #1972.
|
||||
|
||||
o Global:
|
||||
------
|
||||
+ Corrected TLS setup in tls.hh for gcc compiler.
|
||||
+ Updated date and version for 10.3.p02.
|
||||
|
||||
o Intercoms:
|
||||
---------
|
||||
+ Fix to G4GenericMessenger::Command::SetUnit: do not ignore setting and
|
||||
issue a warning when running sequential application built against Geant4
|
||||
libraries compiled with MT enabled.
|
||||
|
||||
o Physics Lists
|
||||
-------------
|
||||
+ constructors/electromagnetic:
|
||||
o G4EmStandardPhysicsSS: apply single scattering to all particles.
|
||||
Addressing problem report #1966.
|
||||
o G4EmModelActivator: fixed Opt4 and SS per region.
|
||||
+ lists:
|
||||
o G4PhysListFactory: fixed EM option "__SS".
|
||||
Addressing problem report #1966.
|
||||
|
||||
o Processes - Electromagnetic:
|
||||
---------------------------
|
||||
+ dna:
|
||||
o Fixed compilation warnings on gcc-7.1.
|
||||
+ lowenergy:
|
||||
o G4LowEPPolarizedComptonModel: fixed FPE in comptation of std::acos().
|
||||
o Fixed compilation warnings on gcc-7.1.
|
||||
+ standard:
|
||||
o G4UniversalFluctuation: fixed numerical problem for sampling
|
||||
low-energy anti-protons with very small steps.
|
||||
o G4NuclearStopping, G4ICRU49NuclearStoppingModel: fixed nuclear
|
||||
stopping power computation addressed in Hypernews post #1595 in the
|
||||
Hadronic Processes Forum.
|
||||
o G4hIonisation: fixed min/max energy for dEdx table for the case when
|
||||
the mass of a hadron is very different from the mass of proton.
|
||||
+ utils:
|
||||
o G4EmCalculator: for computation of the nuclear stopping power, use
|
||||
concrete model (applied at run time) instead of G4EmCorrections
|
||||
emulation; to get cross section per volume for discrete processes
|
||||
use interface of the process. Addressing Hypernwes post #1595 in the
|
||||
Hadronic Processes Forum.
|
||||
o G4VEmModel: added extra protected class member for nuclear stopping.
|
||||
o G4EmSaturation: fixed typo in printout.
|
||||
|
||||
o Processes - Hadronic:
|
||||
--------------------
|
||||
+ models/cascade:
|
||||
o G4CascadeCoalescence: removed clusterHash() function and 'triedClusters'
|
||||
registry. Droped redundant calls of tryCluster() with subcombinatorics;
|
||||
all combinations are handled, uniquely, in main loop over indices.
|
||||
This eliminates significant memory usage observed with high-energy
|
||||
applications of BERT.
|
||||
+ models/de_excitation:
|
||||
o G4DeexPrecoParameters: disabled parameter change in G4_Idle state,
|
||||
only G4_PreInit is allowed; disabled correlated gamma;
|
||||
set default time limit to 1000s (if radioactive decay is enabled this
|
||||
time may be set to the limit of the G4NuclideTable), this allows do
|
||||
not create extra isomeres if radioactive decay is not included in the
|
||||
physics list
|
||||
o G4LevelReader, G4LevelManager, G4PhotonEvaporation: for stable states
|
||||
(ground state isotopes) set life time to "-1"; changed all checks
|
||||
accordingly.
|
||||
o G4LevelReader: issue fatal exception if data file is not open.
|
||||
Addressing problem report #1942.
|
||||
o G4PhotonEvaporation: always have gamma transition to the discrete
|
||||
level (if there is no levels, go to the ground state).
|
||||
Addressing problem report #1950.
|
||||
+ models/lend:
|
||||
o Fixed compilation warnings on gcc-7.1.
|
||||
o Fixed Coverity defects.
|
||||
+ models/particle_hp:
|
||||
o Added check for He3 projectile. Addressing problem report #1907.
|
||||
o G4ParticleHPThermalScattering: fixed angular distribution sampling
|
||||
problem. Addressing problem report #1971.
|
||||
o Fix in destructor of processes to protect against concurrent deletion.
|
||||
o Bug fix and improved stability in G4ParticleHPFinalState.
|
||||
o Suppressed unnecessary warning messages in G4ParticleHPEnAngCorrelation.
|
||||
o Fixed minor inconsistency between documentation and code.
|
||||
+ models/radioactive_decay:
|
||||
o G4RadioactiveDecay::DecayIt(): added statement to propagate weight of
|
||||
parent track. Addressing problem report #1946.
|
||||
+ models/util:
|
||||
o G4Fragment: fixed destructor and printout.
|
||||
o G4PolynomialPDF: fix for potential division by zero.
|
||||
+ util:
|
||||
o G4GHEKinematicsVector: fixed case of variable shadowing.
|
||||
|
||||
o Run:
|
||||
---
|
||||
+ G4RunManagerKernel: removed unnecessary warning message.
|
||||
|
||||
o Visualization:
|
||||
-------------
|
||||
+ Fixed compilation warnings on gcc-7.1.
|
||||
|
||||
o Examples:
|
||||
--------
|
||||
+ Updated reference outputs.
|
||||
+ Fixed compilation warning on gcc-7.1.
|
||||
+ advanced/air_shower:
|
||||
o Updated setup for visualization in main() and Visualisation.mac.
|
||||
+ extended/biasing/B01:
|
||||
+ extended/biasing/B02:
|
||||
o Removed unnecessary clearing of sampling.
|
||||
+ extended/biasing/B03:
|
||||
o B03PhysicsList: removed obsolete unnecessary instantiation of
|
||||
de-excitation sub-models.
|
||||
o Removed unnecessary clearing of sampling.
|
||||
+ extended/eventgenerator/HepMC/MCTruth:
|
||||
o Fixed typo in initialisation.
|
||||
+ extended/g3tog4:
|
||||
o Fixed linking problem for static build.
|
||||
+ extended/optical/LXe:
|
||||
o Fix for issue reported on Hypernews Optical-Photons Forum #651.
|
||||
+ extended/medical/DICOM:
|
||||
o Fix to DicomRun::RecordEvent() that was incrementing the inherited
|
||||
numberOfEvent variable from G4Run twice causing the output of the
|
||||
number of events to be twice the actual value.
|
||||
o Corrected element definitions for Potassium and Phosphorus in
|
||||
DetectorConstruction.
|
||||
+ extended/persistency/gdml/G01:
|
||||
o Updated setup for visualization in main program.
|
||||
o Added missing gdml files to CMake installation script.
|
||||
+ extended/persistency/gdml/G02:
|
||||
+ extended/persistency/gdml/G03:
|
||||
o Updated setup for visualization in main program.
|
||||
+ extended/radioactivedecay/rdecay02:
|
||||
o Updated README, adding a note stating that all histograms but one are
|
||||
turned off by default, and describing how to turn them back on.
|
||||
Addressing problem report #1936.
|
||||
+ extended/runAndEvent/RE05:
|
||||
o Fixed potential rare race condition issue in RE05PrimaryGeneratorAction.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Technical Notes
|
||||
---------------
|
||||
|
||||
o This patch should be applied on top of release 10.3.p01.
|
||||
o Technical notes distributed for release 10.3 are also applicable and
|
||||
valid for this patch.
|
||||
|
||||
The code and rebuilt binary libraries for release 10.3.p02 are available
|
||||
through our "Download" Web page.
|
||||
|
||||
Please refer to the Geant4 User Documentation for further information about
|
||||
using Geant4.
|
||||
@@ -0,0 +1,84 @@
|
||||
|
||||
Geant4 10.3 - patch-03 Release Notes
|
||||
------------------------------------
|
||||
|
||||
20 October 2017
|
||||
|
||||
List of fixes included in this public patch since the public release 10.3.p02:
|
||||
|
||||
o Digits_hits:
|
||||
-----------
|
||||
+ Fixed propagation of warning flag in G4SDStructure.
|
||||
Addressing problem report #1993.
|
||||
|
||||
o Geometry:
|
||||
--------
|
||||
+ magnetic-field:
|
||||
o G4NystromRK4: fixed caching of momentum, field location & value.
|
||||
Addressing problem report #1996, reported by ALICE.
|
||||
Correction in call to getField().
|
||||
+ solids/specific:
|
||||
o Twisted solids: fixed bug in drawing polyhedra with negative twist
|
||||
angle. Addressing problem report #1995.
|
||||
o G4SurfaceVoxelizer: directly set components for bounding-box instead
|
||||
of recreating it in BuildBoundingBox(..).
|
||||
|
||||
o Global:
|
||||
------
|
||||
+ Updated date and version for 10.3.p03.
|
||||
|
||||
o Intercoms:
|
||||
---------
|
||||
+ Explicitly remove constness in G4AnyMethod by means of remove_const.
|
||||
Addressing problem report #1803.
|
||||
|
||||
o Interfaces:
|
||||
----------
|
||||
+ G4VBasicShell: fixed std::out_of_range exception in ModifyPath() when
|
||||
typing 'ls' command at the top directory.
|
||||
Addressing problem report #1989.
|
||||
+ G4UIQt: set always-on-top to the picking windows.
|
||||
|
||||
o Physics Lists:
|
||||
-------------
|
||||
+ constructors/hadron_elastic:
|
||||
o G4HadronElasticPhysics, G4HadronHElasticPhysics: changed kaon elastic
|
||||
cross-sections from, respectively, Gheisha and Chips, to Glauber Gribov
|
||||
ones. This way, the total (elastic + inelastic) kaon cross sections are
|
||||
consistent with the PDG ones.
|
||||
|
||||
o Processes - Hadronic:
|
||||
--------------------
|
||||
+ cross_sections:
|
||||
o Bug fix in G4ComponentGGHadronNucleusXsc to use the correct cross-
|
||||
sections for kaons on Hydrogen; use Starkov parameterization for them.
|
||||
+ models/cascade:
|
||||
o G4ElementaryParticleCollider::generateSCMmuonAbsorption: fixed case of
|
||||
rare segmentation-fault. Added clearing of particles if
|
||||
GetThreeBodyMomenta() returns no momenta.
|
||||
+ processes:
|
||||
o Use class name in process description.
|
||||
+ stopping:
|
||||
o Fixed Coverity defect in G4AntiNeutronAnnihilationAtRest.
|
||||
Removed static thread-local variables and simply made them local.
|
||||
|
||||
o Visualization:
|
||||
-------------
|
||||
+ OpenGL:
|
||||
o Fixed issue affecting repaint for external applications.
|
||||
Addressing problem report #1959.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Technical Notes
|
||||
---------------
|
||||
|
||||
o This patch should be applied on top of release 10.3.p02.
|
||||
o Technical notes distributed for release 10.3 are also applicable and
|
||||
valid for this patch.
|
||||
|
||||
The code and rebuilt binary libraries for release 10.3.p03 are available
|
||||
through our "Download" Web page.
|
||||
|
||||
Please refer to the Geant4 User Documentation for further information about
|
||||
using Geant4.
|
||||
File diff suppressed because it is too large
Load Diff
+125
@@ -31,6 +31,131 @@ add this in the documentation for the changed file as [BUGFIX #BUGNUMBER].
|
||||
|
||||
----------------------------------------------------------
|
||||
|
||||
30th November 2017 - Gabriele Cosmo (cmake-V10-03-49)
|
||||
- Replaced USolids specific flags with VecGeom in Geant4OptionalComponents.cmake.
|
||||
From now on VecGeomConfig.cmake will be required and used instead of
|
||||
USolidsConfig.cmake, as well as VecGeom_DIR instead of USolids_DIR.
|
||||
|
||||
29th November 2017 - Ben Morgan (cmake-V10-03-48)
|
||||
- Bugfix: Restore reporting of GEANT4_BUILD_CXXSTD.
|
||||
|
||||
27th November 2017 - Ben Morgan (cmake-V10-03-47)
|
||||
- Remove obsolete FindROOT module
|
||||
|
||||
10th November 2017 - Gunter Folger (cmake-V10-03-46)
|
||||
- Switch to new dataset G4PhotonEvaporation5.2
|
||||
|
||||
10th November 2017 - Gabriele Cosmo (cmake-V10-03-45)
|
||||
- G4ConfigureGNUMakeHelpers.cmake: corrected setting of USOLIDS_BASE_DIR
|
||||
path for GNUmake.
|
||||
|
||||
7th November 2017 - Ben Morgan (cmake-V10-03-44)
|
||||
- Modules/Geant4OptionalComponents.cmake:
|
||||
When using HDF5 with Multithreaded Geant4, check
|
||||
that found install of HDF5 was built with thread
|
||||
safety. Require HDF5 >= 1.8.
|
||||
|
||||
3rd November 2017 - Ben Morgan (cmake-V10-03-43)
|
||||
- BUGFIX: Make HDF5 component checkable by clients
|
||||
- Templates/Geant4Config.cmake.in : Add "hdf5" component
|
||||
with associated boolean Geant4_hdf5_FOUND.
|
||||
- Templates/geant4-config.in: add "hdf5" feature
|
||||
|
||||
27th October 2017 - Gunter Folger (cmake-V10-03-42)
|
||||
- Switch to new dataset G4EMLOW 7.3
|
||||
|
||||
25th October 2017 - Ben Morgan (cmake-V10-03-41)
|
||||
- Modules/Geant4LibraryBuildOptions.cmake:
|
||||
Add new advanced build option GEANT4_BUILD_MUONIC_ATOMS_IN_USE,
|
||||
requested by Krzysztof Genser and Makoto Asai. OFF by default,
|
||||
when ON, adds G4MUTOMS_INUSE to compile definitions. As the
|
||||
code protected by the symbol only appears in .cc files, do
|
||||
not export this definition to clinet side build settings.
|
||||
- Templates/geant4-config.in, Templates/Geant4Config.cmake.in
|
||||
Record use of GEANT4_BUILD_MUONIC_ATOMS_IN_USE as a feature
|
||||
and component respectively. Neither affects the build settings,
|
||||
it's simply a report on whether the option was used or not.
|
||||
|
||||
19th October 2017 - Gunter Folger (cmake-V10-03-40)
|
||||
- Switch to new dataset G4EMLOW 7.2
|
||||
|
||||
19th October 2017 - Gunter Folger (cmake-V10-03-39)
|
||||
- Switch to new dataset G4ABLA 3.1
|
||||
|
||||
16th October 2017 - Gabriele Cosmo (cmake-V10-03-38)
|
||||
- Modules/Geant4OptionalComponents.cmake: add HYPE flag to enable
|
||||
wrapping of G4Hype in GEANT4_USOLIDS_SHAPES.
|
||||
Coworks with tag geom-specific-V10-03-21.
|
||||
|
||||
26th September 2017 - Gunter Folger (cmake-V10-03-37)
|
||||
- Switch to new datasets:
|
||||
- G4ENSDFSTATE2.2
|
||||
- G4PhotonEvaporation5.1
|
||||
- G4RadioactiveDecay5.2
|
||||
|
||||
13th September 2017 - Ben Morgan (cmake-V10-03-36)
|
||||
- Modules/Geant4OptionalComponents.cmake: Require system expat version
|
||||
>= 2.0.1. Identified in Bugzilla #2003. g4tools uses expat functions
|
||||
only present in 2.0.1 or higher. Though Geant4 supported systems all
|
||||
meet this requirement, check expat version and error out if version
|
||||
is < 2.0.1. On error, report information on cause and how to rectify.
|
||||
|
||||
11th September 2017 - Ben Morgan (cmake-V10-03-35)
|
||||
- Modules/G4CMakeMain.cmake: Remove GEANT4_BUILD_EXAMPLES option.
|
||||
Add GEANT4_INSTALL_EXAMPLES option. Advanced and ON by default,
|
||||
thia is for use by developers who wish to save time/space by not
|
||||
installing all the example code.
|
||||
|
||||
7th September 2017 - Ben Morgan (cmake-V10-03-34)
|
||||
- Modules/G4DeveloperAPI_OLD.cmake: Set INSTALL_RPATH on macOS
|
||||
Requested by Fons Rademackers. Loading Geant4 dylibs in Python
|
||||
can lead to resolution errors as they cannot locate each other.
|
||||
Append "@loader_path" to the INSTALL_RPATH for all Geant4 libraries.
|
||||
This will expand to the directory of the library being loaded, which
|
||||
will contain the other Geant4 libraries. Append is used to that
|
||||
users may still supply CMAKE_INSTALL_RPATH at configure time,
|
||||
and this will be preferred.
|
||||
|
||||
5th September 2017 - Gunter Folger (cmake-V10-03-33)
|
||||
- Modules/Geant4DatasetDefinitions.cmake: switch to G4EMLOW7.1
|
||||
|
||||
23rd August 2017 - Gunter Folger (cmake-V10-03-32)
|
||||
- Modules/Geant4DatasetDefinitions.cmake: switch to G4EMLOW7.0
|
||||
|
||||
3rd August 2017 - Ben Morgan (cmake-V10-03-31)
|
||||
- Create a G4HDF INTERFACE target for uniform access to HDF5 headers
|
||||
and libraries at build, test and install time. It is not completely
|
||||
relocatable as the target hardcodes header/library paths. However,
|
||||
it creates a single point of access so that adding relocation
|
||||
will require minimal changes, limited to the cmake category.
|
||||
|
||||
27th July 2017 - Ivana Hrivnacova (cmake-V10-03-30)
|
||||
- Removed FindHdf5.cmake as the find module is provided with CMake
|
||||
|
||||
27th July 2017 - Ivana Hrivnacova (cmake-V10-03-29)
|
||||
- Modules/Geant4OptionalComponents.cmake : Add new GEANT4_USE_HDF5
|
||||
option, OFF by defaults, to allow user to enable Hdf5 support
|
||||
in analysis library.
|
||||
|
||||
18th July 2017 - Andrea Dotti (cmake-V10-03-27,-28)
|
||||
- Modules/FindStatTest.cmake fix logic to set
|
||||
STATTEST_FOUND==FALSE if GEANT4_ENABLE_TESTING==FALSE
|
||||
|
||||
17th July 2017 - Gabriele Cosmo (cmake-V10-03-26)
|
||||
- Modules/G4ConfigureGNUMakeHelpers, Modules/Geant4InterfaceOptions.cmake:
|
||||
corrected Qt setup for GNUmake builds, avoid setting QTLIBS and GLQTLIBS
|
||||
as already handled by the GNUmake system for Qt4 and Qt5.
|
||||
|
||||
11th July 2017 - Gabriele Cosmo (cmake-V10-03-25)
|
||||
- Modules/Geant4OptionalComponents.cmake: add PARA flag to enable
|
||||
wrapping of G4Para in GEANT4_USOLIDS_SHAPES.
|
||||
Coworks with tag geom-csg-V10-03-29.
|
||||
|
||||
10th July 2017 - Gabriele Cosmo (cmake-V10-03-24)
|
||||
- Modules/Geant4OptionalComponents.cmake: add CTUBS flag to enable
|
||||
wrapping of G4CutTubs in GEANT4_USOLIDS_SHAPES.
|
||||
Coworks with tag geom-csg-V10-03-28.
|
||||
|
||||
12th June 2017 - Ben Morgan (cmake-V10-03-23)
|
||||
- Remove support for modulefile generation, as not used and
|
||||
generated files not compatible with relocatability. It's
|
||||
|
||||
@@ -1,197 +0,0 @@
|
||||
# - Finds ROOT instalation
|
||||
# This module sets up ROOT information
|
||||
# It defines:
|
||||
# ROOT_FOUND If the ROOT is found
|
||||
# ROOT_INCLUDE_DIR PATH to the include directory (deprecated)
|
||||
# ROOT_INCLUDE_DIRS PATH to the include directory
|
||||
# ROOT_LIBRARIES Most common libraries
|
||||
# ROOT_LIBRARY_DIR PATH to the library directory
|
||||
# ROOT_BIN_DIR PATH to the excutables directory
|
||||
# ROOT_PYTHONVER Compatible python version string
|
||||
|
||||
# First search for ROOTConfig.cmake on the path defined via user setting
|
||||
# ROOT_DIR
|
||||
|
||||
if(EXISTS ${ROOT_DIR}/ROOTConfig.cmake)
|
||||
include(${ROOT_DIR}/ROOTConfig.cmake)
|
||||
message(STATUS "Found ROOT CMake configuration in ${ROOT_DIR}")
|
||||
set(ROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIRS})
|
||||
set(ROOT_FOUND TRUE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
find_program(ROOT_CONFIG_EXECUTABLE root-config
|
||||
PATHS ${ROOTSYS}/bin $ENV{ROOTSYS}/bin)
|
||||
|
||||
if(NOT ROOT_CONFIG_EXECUTABLE)
|
||||
set(ROOT_FOUND FALSE)
|
||||
else()
|
||||
set(ROOT_FOUND TRUE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --prefix
|
||||
OUTPUT_VARIABLE ROOTSYS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --version
|
||||
OUTPUT_VARIABLE ROOT_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --incdir
|
||||
OUTPUT_VARIABLE ROOT_INCLUDE_DIRS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --libs
|
||||
OUTPUT_VARIABLE ROOT_LIBRARIES
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --python-version
|
||||
OUTPUT_VARIABLE ROOT_PYTHONVER
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --bindir
|
||||
OUTPUT_VARIABLE ROOT_BIN_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
|
||||
#set(ROOT_LIBRARIES ${ROOT_LIBRARIES} -lThread -lMinuit -lHtml -lVMC -lEG -lGeom -lTreePlayer -lXMLIO -lProof)
|
||||
#set(ROOT_LIBRARIES ${ROOT_LIBRARIES} -lProofPlayer -lMLP -lSpectrum -lEve -lRGL -lGed -lXMLParser -lPhysics)
|
||||
set(ROOT_LIBRARY_DIR ${ROOTSYS}/lib)
|
||||
set(ROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIRS})
|
||||
|
||||
# Make variables changeble to the advanced user
|
||||
mark_as_advanced(ROOT_CONFIG_EXECUTABLE)
|
||||
|
||||
if(NOT ROOT_FIND_QUIETLY)
|
||||
message(STATUS "Found ROOT ${ROOT_VERSION} in ${ROOTSYS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT ROOT_FOUND)
|
||||
if (ROOT_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "ROOT required, but not found")
|
||||
endif (ROOT_FIND_REQUIRED)
|
||||
endif()
|
||||
|
||||
include(CMakeParseArguments)
|
||||
find_program(ROOTCINT_EXECUTABLE rootcint PATHS $ENV{ROOTSYS}/bin)
|
||||
find_program(GENREFLEX_EXECUTABLE genreflex PATHS $ENV{ROOTSYS}/bin)
|
||||
find_package(GCCXML)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# function ROOT_GENERATE_DICTIONARY( dictionary
|
||||
# header1 header2 ...
|
||||
# LINKDEF linkdef1 ...
|
||||
# OPTIONS opt1...)
|
||||
function(ROOT_GENERATE_DICTIONARY dictionary)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG "" "" "LINKDEF;OPTIONS" "" ${ARGN})
|
||||
#---Get the list of header files-------------------------
|
||||
set(headerfiles)
|
||||
foreach(fp ${ARG_UNPARSED_ARGUMENTS})
|
||||
file(GLOB files ${fp})
|
||||
if(files)
|
||||
foreach(f ${files})
|
||||
if(NOT f MATCHES LinkDef)
|
||||
set(headerfiles ${headerfiles} ${f})
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
set(headerfiles ${headerfiles} ${fp})
|
||||
endif()
|
||||
endforeach()
|
||||
#---Get the list of include directories------------------
|
||||
# Filter out UNIX system directory to workaround bug in
|
||||
# rootcint (info from Andrea Dotti, and info from post:
|
||||
# http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=15086
|
||||
get_directory_property(incdirs INCLUDE_DIRECTORIES)
|
||||
set(includedirs)
|
||||
foreach( d ${incdirs})
|
||||
if(NOT ${d} STREQUAL "/usr/include")
|
||||
set(includedirs ${includedirs} -I${d})
|
||||
endif()
|
||||
endforeach()
|
||||
#---Get LinkDef.h file------------------------------------
|
||||
set(linkdefs)
|
||||
foreach( f ${ARG_LINKDEF})
|
||||
if( IS_ABSOLUTE ${f})
|
||||
set(linkdefs ${linkdefs} ${f})
|
||||
else()
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/inc/${f})
|
||||
set(linkdefs ${linkdefs} ${CMAKE_CURRENT_SOURCE_DIR}/inc/${f})
|
||||
else()
|
||||
set(linkdefs ${linkdefs} ${CMAKE_CURRENT_SOURCE_DIR}/${f})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
#---call rootcint------------------------------------------
|
||||
add_custom_command(OUTPUT ${dictionary}.cxx ${dictionary}.h
|
||||
COMMAND ${ROOTCINT_EXECUTABLE} -cint -f ${dictionary}.cxx
|
||||
-c ${ARG_OPTIONS} ${includedirs} ${headerfiles} ${linkdefs}
|
||||
DEPENDS ${headerfiles} ${linkdefs})
|
||||
endfunction()
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# function REFLEX_GENERATE_DICTIONARY(dictionary
|
||||
# header1 header2 ...
|
||||
# SELECTION selectionfile ...
|
||||
# OPTIONS opt1...)
|
||||
function(REFLEX_GENERATE_DICTIONARY dictionary)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG "" "" "SELECTION;OPTIONS" "" ${ARGN})
|
||||
#---Get the list of header files-------------------------
|
||||
set(headerfiles)
|
||||
foreach(fp ${ARG_UNPARSED_ARGUMENTS})
|
||||
file(GLOB files ${fp})
|
||||
if(files)
|
||||
foreach(f ${files})
|
||||
set(headerfiles ${headerfiles} ${f})
|
||||
endforeach()
|
||||
else()
|
||||
set(headerfiles ${headerfiles} ${fp})
|
||||
endif()
|
||||
endforeach()
|
||||
#---Get Selection file------------------------------------
|
||||
if(IS_ABSOLUTE ${ARG_SELECTION})
|
||||
set(selectionfile ${ARG_SELECTION})
|
||||
else()
|
||||
set(selectionfile ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_SELECTION})
|
||||
endif()
|
||||
#---Get the list of include directories------------------
|
||||
get_directory_property(incdirs INCLUDE_DIRECTORIES)
|
||||
set(includedirs)
|
||||
foreach( d ${incdirs})
|
||||
set(includedirs ${includedirs} -I${d})
|
||||
endforeach()
|
||||
#---Get preprocessor definitions--------------------------
|
||||
get_directory_property(defs COMPILE_DEFINITIONS)
|
||||
foreach( d ${defs})
|
||||
set(definitions ${definitions} -D${d})
|
||||
endforeach()
|
||||
#---Names and others---------------------------------------
|
||||
set(gensrcdict ${dictionary}.cpp)
|
||||
if(MSVC)
|
||||
set(gccxmlopts "--gccxmlopt=\"--gccxml-compiler cl\"")
|
||||
elseif(APPLE)
|
||||
set(gccxmlopts "--gccxmlopt=--gccxml-compiler g++ ")
|
||||
else()
|
||||
set(gccxmlopts)
|
||||
endif()
|
||||
#set(rootmapname ${dictionary}Dict.rootmap)
|
||||
#set(rootmapopts --rootmap=${rootmapname} --rootmap-lib=${libprefix}${dictionary}Dict)
|
||||
#---Check GCCXML and get path-----------------------------
|
||||
if(GCCXML)
|
||||
get_filename_component(gccxmlpath ${GCCXML} PATH)
|
||||
else()
|
||||
message(WARNING "GCCXML not found. Install and setup your environment to find 'gccxml' executable")
|
||||
endif()
|
||||
#---Actual command----------------------------------------
|
||||
add_custom_command(OUTPUT ${gensrcdict} ${rootmapname}
|
||||
COMMAND ${GENREFLEX_EXECUTABLE} ${headerfiles} -o ${gensrcdict} ${gccxmlopts} ${rootmapopts} --select=${selectionfile}
|
||||
--gccxmlpath=${gccxmlpath} ${ARG_OPTIONS} ${includedirs} ${definitions}
|
||||
DEPENDS ${headerfiles} ${selectionfile})
|
||||
endfunction()
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#
|
||||
# STATTEST_FOUND - Application found
|
||||
# STATTEST_APP - Application
|
||||
# STATTEST_CMD - Command line to run the application
|
||||
# STATTEST_ADD_TEST - Helper function to define a ctest using
|
||||
# STATTEST_CMD - Command line to run the application
|
||||
# STATTEST_ADD_TEST - Helper function to define a ctest using
|
||||
# StatTest (Only if we are using for G4 testing)
|
||||
#
|
||||
# Variables used by this module, which can change the default behaviour
|
||||
@@ -14,6 +14,13 @@
|
||||
#
|
||||
# STATTEST_ROOT_DIR Root directory to StatTest package
|
||||
#
|
||||
|
||||
if(NOT GEANT4_ENABLE_TESTING)
|
||||
#No meaning for this if not testing
|
||||
SET(STATTEST_FOUND FALSE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
#Search application
|
||||
#Note that the second suggested path is G4 specific...
|
||||
find_path(STATTEST_APP_DIR
|
||||
@@ -23,7 +30,7 @@ find_path(STATTEST_APP_DIR
|
||||
)
|
||||
|
||||
#If we didn't find it there, fall back to some standard search paths
|
||||
find_path(STATTEST_APP_DIR NAMES StatTest/StatTestVersion.py)
|
||||
find_path(STATTEST_APP_DIR NAMES StatTestVersion.py)
|
||||
|
||||
####
|
||||
#### Run-time dependencies...
|
||||
@@ -32,102 +39,101 @@ find_path(STATTEST_APP_DIR NAMES StatTest/StatTestVersion.py)
|
||||
find_package(ROOT QUIET)
|
||||
if(NOT ROOT_FOUND)
|
||||
MESSAGE(STATUS "StatTest: ROOT package not found --> StatTest package disabled")
|
||||
set(STATTEST_FOUND FALSE)
|
||||
set(_root_isok FALSE)
|
||||
else()
|
||||
set(_root_isok TRUE)
|
||||
# - Check if python interpreter is correct version
|
||||
# (the one compatible with root)
|
||||
find_package(PythonInterp ${ROOT_PYTHONVER} QUIET)
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
MESSAGE(STATUS "StatTest: Python interpreter of version ${ROOT_PYTHONVER} not found --> StatTest package disabled")
|
||||
set(STATTEST_FOUND FALSE)
|
||||
set(_python_isok FALSE)
|
||||
else()
|
||||
set(STATTEST_FOUND TRUE)
|
||||
set(_python_isok TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# - Check if python interpreter is correct version
|
||||
# (the one compatible with root)
|
||||
find_package(PythonInterp ${ROOT_PYTHONVER} QUIET)
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
MESSAGE(STATUS "StatTest: Python interpreter of version ${ROOT_PYTHONVER} not found --> StatTest package disabled")
|
||||
set(_python_isok FALSE)
|
||||
else()
|
||||
set(_python_isok TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
StatTest
|
||||
DEFAULT_MSG
|
||||
STATTEST_APP_DIR
|
||||
_root_isok
|
||||
_python_isok
|
||||
StatTest
|
||||
DEFAULT_MSG
|
||||
STATTEST_APP_DIR
|
||||
_root_isok
|
||||
_python_isok
|
||||
)
|
||||
|
||||
|
||||
if(STATTEST_FOUND)
|
||||
set(STATTEST_APP ${STATTEST_APP_DIR}/runtests.py)
|
||||
set(STATTEST_CMD ${PYTHON_EXECUTABLE} ${STATTEST_APP})
|
||||
|
||||
if(GEANT4_ENABLE_TESTING)
|
||||
# Let's create a function that helps in building tests for
|
||||
# regression testing
|
||||
# function STATTEST_ADD_TEST(<name>
|
||||
# G4TEST testname
|
||||
# CONFIG conffile
|
||||
# INPUT inputfile
|
||||
# [DEBUG]
|
||||
# [TEXT] #Input is text file instead of root
|
||||
# [REFERENCE reference]
|
||||
# [LABELS label1 label2 ...]
|
||||
# [IMG filename])
|
||||
function(STATTEST_ADD_TEST stattest)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG "DEBUG;TEXT"
|
||||
# Let's create a function that helps in building tests for
|
||||
# regression testing
|
||||
# function STATTEST_ADD_TEST(<name>
|
||||
# G4TEST testname
|
||||
# CONFIG conffile
|
||||
# INPUT inputfile
|
||||
# [DEBUG]
|
||||
# [TEXT] #Input is text file instead of root
|
||||
# [REFERENCE reference]
|
||||
# [LABELS label1 label2 ...]
|
||||
# [IMG filename])
|
||||
function(STATTEST_ADD_TEST stattest)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG "DEBUG;TEXT"
|
||||
"CONFIG;INPUT;REFERENCE;G4TEST;IMG"
|
||||
"LABELS" ${ARGN}
|
||||
)
|
||||
|
||||
#check mandatory arguments
|
||||
list(LENGTH ARG_CONFIG _len)
|
||||
if(_len LESS 1)
|
||||
)
|
||||
#check mandatory arguments
|
||||
list(LENGTH ARG_CONFIG _len)
|
||||
if(_len LESS 1)
|
||||
message(FATAL_ERROR "STATTEST_ADD_TEST: conffile is mandatory")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(LENGTH ARG_INPUT _len)
|
||||
if(_len LESS 1)
|
||||
list(LENGTH ARG_INPUT _len)
|
||||
if(_len LESS 1)
|
||||
message(FATAL_ERROR "STATTEST_ADD_TEST: inputfile is mandatory")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(LENGTH ARG_G4TEST _len)
|
||||
if(_len LESS 1)
|
||||
list(LENGTH ARG_G4TEST _len)
|
||||
if(_len LESS 1)
|
||||
message(FATAL_ERROR "STATTEST_ADD_TEST: testname is mandatory")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#Set basic command line
|
||||
if(ARG_IMG)
|
||||
#Set basic command line
|
||||
if(ARG_IMG)
|
||||
set(_command ${STATTEST_CMD} -g ${ARG_IMG})
|
||||
else()
|
||||
else()
|
||||
set(_command ${STATTEST_CMD})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ARG_TEXT)
|
||||
set(_command ${_command} "-T")
|
||||
endif()
|
||||
if(ARG_TEXT)
|
||||
set(_command ${_command} "-T")
|
||||
endif()
|
||||
|
||||
#Mandatory parameters
|
||||
set(_command ${_command} ${ARG_CONFIG} ${ARG_INPUT})
|
||||
if(ARG_REFERENCE)
|
||||
#Mandatory parameters
|
||||
set(_command ${_command} ${ARG_CONFIG} ${ARG_INPUT})
|
||||
if(ARG_REFERENCE)
|
||||
set(_command ${_command} ${ARG_REFERENCE})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ARG_LABELS)
|
||||
if(ARG_LABELS)
|
||||
set(_labels ${ARG_LABELS})
|
||||
else()
|
||||
else()
|
||||
set(_labels "")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(Geant4CTest)
|
||||
include(Geant4CTest)
|
||||
|
||||
#Now build G4 test
|
||||
GEANT4_ADD_TEST(${stattest}
|
||||
#Now build G4 test
|
||||
GEANT4_ADD_TEST(${stattest}
|
||||
COMMAND ${_command}
|
||||
DEPENDS ${ARG_G4TEST}
|
||||
LABELS ${_labels}
|
||||
)
|
||||
endfunction()
|
||||
endif(GEANT4_ENABLE_TESTING)
|
||||
endfunction()
|
||||
endif(STATTEST_FOUND)
|
||||
|
||||
mark_as_advanced(STATTEST_APP_DIR)
|
||||
|
||||
@@ -155,6 +155,8 @@ enum_option(GEANT4_BUILD_CXXSTD
|
||||
|
||||
string(REGEX REPLACE "^c\\+\\+" "" GEANT4_BUILD_CXXSTD "${GEANT4_BUILD_CXXSTD}")
|
||||
mark_as_advanced(GEANT4_BUILD_CXXSTD)
|
||||
geant4_add_feature(GEANT4_BUILD_CXXSTD "Compiling against C++ Standard '${GEANT4_BUILD_CXXSTD}'")
|
||||
|
||||
|
||||
# Require at least C++11 with no extensions and the following features
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
@@ -306,6 +308,24 @@ if(GEANT4_BUILD_VERBOSE_CODE)
|
||||
add_definitions(-DG4VERBOSE)
|
||||
endif()
|
||||
|
||||
#.rst:
|
||||
# - ``GEANT4_BUILD_MUONIC_ATOMS_IN_USE`` (Default: OFF)
|
||||
#
|
||||
# - Switched off by default to improve performance when not using
|
||||
# Muonic Atom code. It should be switched on if the project requires
|
||||
# support for Muonic Atoms.
|
||||
# Mark as advanced because most users should not need to worry about it
|
||||
#
|
||||
option(GEANT4_BUILD_MUONIC_ATOMS_IN_USE
|
||||
"Enable turning on some if statements in track and event code. Switch on if using new Muonic Atom code."
|
||||
OFF)
|
||||
mark_as_advanced(GEANT4_BUILD_MUONIC_ATOMS_IN_USE)
|
||||
|
||||
# TODO: Migrate this to header
|
||||
if(GEANT4_BUILD_MUONIC_ATOMS_IN_USE)
|
||||
add_definitions(-DG4MUATOMS_INUSE)
|
||||
endif()
|
||||
|
||||
#.rst:
|
||||
# - ``GEANT4_BUILD_MSVC_MP`` (Windows only, Default: OFF)
|
||||
#
|
||||
@@ -324,7 +344,6 @@ if(MSVC)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
#.rst:
|
||||
# Library Mode and Link Options
|
||||
|
||||
@@ -114,25 +114,20 @@ endif()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - Examples build/install
|
||||
# NB: Build of examples is a *testing* proceedure. It is *not* intended
|
||||
# that examples be built and installed as part of a full Geant4 install.
|
||||
option(GEANT4_BUILD_EXAMPLES "Build all the examples of the project" OFF)
|
||||
GEANT4_ADD_FEATURE(GEANT4_BUILD_EXAMPLES "Build all the examples of the project")
|
||||
mark_as_advanced(GEANT4_BUILD_EXAMPLES)
|
||||
# ON by default for end users. Developers can switch this OFF if they
|
||||
# need to save time/space
|
||||
option(GEANT4_INSTALL_EXAMPLES "Install code and documentation for Geant4 examples" ON)
|
||||
mark_as_advanced(GEANT4_INSTALL_EXAMPLES)
|
||||
|
||||
if(GEANT4_BUILD_EXAMPLES)
|
||||
set(Geant4_DIR ${CMAKE_BINARY_DIR} CACHE PATH "Current build directory")
|
||||
add_subdirectory(examples)
|
||||
if(GEANT4_INSTALL_EXAMPLES)
|
||||
install(DIRECTORY examples
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Geant4-${Geant4_VERSION}
|
||||
COMPONENT Examples
|
||||
PATTERN "CVS" EXCLUDE
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
endif()
|
||||
|
||||
# - Install example code to datarootdir
|
||||
install(DIRECTORY examples
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Geant4-${Geant4_VERSION}
|
||||
COMPONENT Examples
|
||||
PATTERN "CVS" EXCLUDE
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# - CPack-aging
|
||||
include(Geant4CPackBase)
|
||||
|
||||
@@ -160,12 +160,9 @@ set(CMAKE_MODULE_PATH \${CMAKE_MODULE_PATH} ${CMAKE_MODULE_PATH})
|
||||
# Geant4 data used in build tree
|
||||
geant4_export_datasets(BUILD GEANT4_DATASET_DESCRIPTIONS)
|
||||
|
||||
# Export targets from the build tree. We rely on the GEANT4_EXPORTED_TARGETS
|
||||
# global property to list these for us.
|
||||
#
|
||||
get_property(__geant4_exported_targets GLOBAL PROPERTY GEANT4_EXPORTED_TARGETS)
|
||||
|
||||
export(TARGETS ${__geant4_exported_targets}
|
||||
# Export targets in the Geant4LibraryDepends export set from the build tree
|
||||
# No longer need GEANT4_EXPORTED_TARGETS global property to list these for us.
|
||||
export(EXPORT Geant4LibraryDepends
|
||||
FILE ${PROJECT_BINARY_DIR}/Geant4LibraryDepends.cmake
|
||||
)
|
||||
|
||||
@@ -190,7 +187,7 @@ configure_file(
|
||||
COPYONLY
|
||||
)
|
||||
|
||||
foreach(_mod AIDA HepMC Pythia6 ROOT StatTest TBB)
|
||||
foreach(_mod AIDA HepMC Pythia6 StatTest TBB)
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Modules/Find${_mod}.cmake
|
||||
${PROJECT_BINARY_DIR}/Modules/Find${_mod}.cmake
|
||||
|
||||
@@ -531,7 +531,7 @@ macro(_g4tc_configure_tc_variables SHELL_FAMILY SCRIPT_NAME)
|
||||
# Derive base dir from include path, NB, not 100% robust as Geant4GNUmake makes
|
||||
# significant assumptions about how USolids was installed
|
||||
get_filename_component(_USOLIDS_INCLUDE_DIR "${USOLIDS_INCLUDE_DIRS}" REALPATH)
|
||||
get_filename_component(_USOLIDS_BASE_DIR "${_USOLIDS_INCLUDE_DIR}" DIRECTORY)
|
||||
get_filename_component(_USOLIDS_BASE_DIR "${VECGEOM_INSTALL_DIR}" REALPATH)
|
||||
_g4tc_setenv_command(GEANT4_TC_USOLIDS_BASE_DIR ${SHELL_FAMILY} USOLIDS_BASE_DIR "${_USOLIDS_BASE_DIR}")
|
||||
|
||||
if(GEANT4_USE_ALL_USOLIDS)
|
||||
@@ -562,14 +562,6 @@ macro(_g4tc_configure_tc_variables SHELL_FAMILY SCRIPT_NAME)
|
||||
if(GEANT4_USE_QT)
|
||||
_g4tc_setenv_command(GEANT4_TC_QTHOME ${SHELL_FAMILY} QTHOME ${G4QTHOME})
|
||||
_g4tc_setenv_command(GEANT4_TC_QTLIBPATH ${SHELL_FAMILY} QTLIBPATH ${G4QTLIBPATH})
|
||||
if(QT4_FOUND)
|
||||
set(GEANT4_TC_QTLIBS "#Geant4Make automatically handles QTLIBS for Qt4")
|
||||
set(GEANT4_TC_GLQTLIBS "#Geant4Make automatically handles GLQTLIBS for Qt4")
|
||||
else()
|
||||
_g4tc_setenv_command(GEANT4_TC_QTLIBS ${SHELL_FAMILY} QTLIBS "\"-L${G4QTLIBPATH} ${G4QTLIBLIST}\"")
|
||||
_g4tc_setenv_command(GEANT4_TC_GLQTLIBS ${SHELL_FAMILY} GLQTLIBS "\"-L${G4QTLIBPATH} ${G4GLQTLIBLIST}\"")
|
||||
endif()
|
||||
|
||||
_g4tc_setenv_command(GEANT4_TC_G4UI_USE_QT ${SHELL_FAMILY} G4UI_USE_QT 1)
|
||||
_g4tc_setenv_command(GEANT4_TC_G4VIS_USE_OPENGLQT ${SHELL_FAMILY} G4VIS_USE_OPENGLQT 1)
|
||||
|
||||
|
||||
@@ -123,6 +123,13 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
|
||||
set(G4_BUILTWITH_MULTITHREADING "no")
|
||||
endif()
|
||||
|
||||
# - Muonic Atom support
|
||||
if(GEANT4_BUILD_MUONIC_ATOMS_IN_USE)
|
||||
set(G4_BUILTWITH_MUONIC_ATOMS "yes")
|
||||
else()
|
||||
set(G4_BUILTWITH_MUONIC_ATOMS "no")
|
||||
endif()
|
||||
|
||||
# - CLHEP
|
||||
if(GEANT4_USE_SYSTEM_CLHEP)
|
||||
set(G4_BUILTWITH_CLHEP "no")
|
||||
@@ -204,6 +211,13 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
|
||||
set(G4_BUILTWITH_FREETYPE "no")
|
||||
endif()
|
||||
|
||||
# - Freetype
|
||||
if(GEANT4_USE_HDF5)
|
||||
set(G4_BUILTWITH_HDF5 "yes")
|
||||
else()
|
||||
set(G4_BUILTWITH_HDF5 "no")
|
||||
endif()
|
||||
|
||||
# - Qt
|
||||
if(GEANT4_USE_QT)
|
||||
set(G4_BUILTWITH_QT "yes")
|
||||
|
||||
@@ -307,16 +307,21 @@ macro(geant4_library_target)
|
||||
set_target_properties(${G4LIBTARGET_NAME}
|
||||
PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
|
||||
# Always use '@rpath' in install names of libraries. This is the
|
||||
# most flexible mechanism for
|
||||
# Use '@rpath' in install names of libraries on macOS to provide relocatibility
|
||||
set_target_properties(${G4LIBTARGET_NAME}
|
||||
PROPERTIES MACOSX_RPATH 1
|
||||
)
|
||||
# Add '@loader_path' to INSTALL_RPATH on macOS so that Geant4
|
||||
# libraries self-locate each other whilst remaining relocatable
|
||||
if(APPLE)
|
||||
set_property(TARGET ${G4LIBTARGET_NAME}
|
||||
APPEND PROPERTY INSTALL_RPATH "@loader_path"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Install the library - note the use of RUNTIME, LIBRARY and ARCHIVE
|
||||
# this helps with later DLL builds.
|
||||
# Export to standard depends file for later install
|
||||
# NEEDS WORK TO REMOVE HARDCODED LIB/BIN DIR
|
||||
install(TARGETS ${G4LIBTARGET_NAME}
|
||||
EXPORT Geant4LibraryDepends
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
|
||||
|
||||
@@ -18,31 +18,31 @@ geant4_add_dataset(
|
||||
# - Low energy electromagnetics
|
||||
geant4_add_dataset(
|
||||
NAME G4EMLOW
|
||||
VERSION 6.54
|
||||
VERSION 7.3
|
||||
FILENAME G4EMLOW
|
||||
EXTENSION tar.gz
|
||||
ENVVAR G4LEDATA
|
||||
MD5SUM 9d9b5207861fbed0aebddb7f89384151
|
||||
MD5SUM 0446e7f53af993343956e5d3900157b8
|
||||
)
|
||||
|
||||
# - Photon evaporation
|
||||
geant4_add_dataset(
|
||||
NAME PhotonEvaporation
|
||||
VERSION 5.0
|
||||
VERSION 5.2
|
||||
FILENAME G4PhotonEvaporation
|
||||
EXTENSION tar.gz
|
||||
ENVVAR G4LEVELGAMMADATA
|
||||
MD5SUM d796cc6d8c65d010f8f0e1641408b89d
|
||||
MD5SUM 37c5dea9614a07885050350d071a6973
|
||||
)
|
||||
|
||||
# - Radioisotopes
|
||||
geant4_add_dataset(
|
||||
NAME RadioactiveDecay
|
||||
VERSION 5.1.1
|
||||
VERSION 5.2
|
||||
FILENAME G4RadioactiveDecay
|
||||
EXTENSION tar.gz
|
||||
ENVVAR G4RADIOACTIVEDATA
|
||||
MD5SUM d298454d2217359b7b3d1050c9ac34fc
|
||||
MD5SUM e035ed77e12be3a69c2d32806d1b5cde
|
||||
)
|
||||
|
||||
# - Neutron XS
|
||||
@@ -88,20 +88,20 @@ geant4_add_dataset(
|
||||
# - ABLA
|
||||
geant4_add_dataset(
|
||||
NAME G4ABLA
|
||||
VERSION 3.0
|
||||
VERSION 3.1
|
||||
FILENAME G4ABLA
|
||||
EXTENSION tar.gz
|
||||
ENVVAR G4ABLADATA
|
||||
MD5SUM d7049166ef74a592cb97df0ed4b757bd
|
||||
MD5SUM 180f1f5d937733b207f8d5677f76296e
|
||||
)
|
||||
|
||||
# - ENSDFSTATE
|
||||
geant4_add_dataset(
|
||||
NAME G4ENSDFSTATE
|
||||
VERSION 2.1
|
||||
VERSION 2.2
|
||||
FILENAME G4ENSDFSTATE
|
||||
EXTENSION tar.gz
|
||||
ENVVAR G4ENSDFSTATEDATA
|
||||
MD5SUM 95d970b97885aeafaa8909f29997b0df
|
||||
MD5SUM 495439cf600225753d7bd99825e5c6bc
|
||||
)
|
||||
|
||||
|
||||
@@ -106,8 +106,6 @@ if(GEANT4_USE_QT)
|
||||
set(QT_USE_FILE "${PROJECT_BINARY_DIR}/Geant4UseQt5.cmake")
|
||||
configure_file("${Qt5_USE_FILE_IN}" "${QT_USE_FILE}" @ONLY)
|
||||
get_target_property(QT_QMAKE_EXECUTABLE ${Qt5Core_QMAKE_EXECUTABLE} IMPORTED_LOCATION)
|
||||
set(G4QTLIBLIST "-lQt5PrintSupport -lQt5Widgets -lQt5Gui -lQt5Core")
|
||||
set(G4GLQTLIBLIST "-lQt5OpenGL ${G4QTLIBLIST}")
|
||||
else()
|
||||
unset(Qt5Core_DIR CACHE)
|
||||
unset(Qt5Gui_DIR CACHE)
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
# ZLIB - Control use of internal G4zlib, or locate external ZLIB
|
||||
# GDML - Requires external XercesC
|
||||
# G3TOG4 - UNIX only
|
||||
# USOLIDS - Allow use of USolids classes in geometry, and must find
|
||||
# external USolids install
|
||||
# USOLIDS - Allow use of VecGeom classes in geometry, and must find
|
||||
# external VecGeom install
|
||||
# FREETYPE - For analysis module, find external FreeType install
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
@@ -113,8 +113,24 @@ else()
|
||||
option(GEANT4_USE_SYSTEM_EXPAT "Use system Expat library" ON)
|
||||
|
||||
if(GEANT4_USE_SYSTEM_EXPAT)
|
||||
# If system package requested, make damn sure we find it
|
||||
# If system package requested, find it or fail
|
||||
find_package(EXPAT REQUIRED)
|
||||
|
||||
# Check version requirement externally to provide information
|
||||
# on using internal expat.
|
||||
if(${EXPAT_VERSION_STRING} VERSION_LESS "2.0.1")
|
||||
set(__badexpat_include_dir ${EXPAT_INCLUDE_DIR})
|
||||
set(__badexpat_library ${EXPAT_LIBRARY})
|
||||
unset(EXPAT_FOUND)
|
||||
unset(EXPAT_INCLUDE_DIR CACHE)
|
||||
unset(EXPAT_LIBRARY CACHE)
|
||||
message(FATAL_ERROR
|
||||
"Detected system expat header and library:
|
||||
EXPAT_INCLUDE_DIR = ${__badexpat_include_dir}
|
||||
EXPAT_LIBRARY = ${__badexpat_library}
|
||||
are of insufficient version '${EXPAT_VERSION_STRING}' (Required >= 2.0.1)
|
||||
Set the above CMake variables to point to an expat install of the required version, or set GEANT4_USE_SYSTEM_EXPAT to OFF to use Geant4's packaged version.")
|
||||
endif()
|
||||
else()
|
||||
set(EXPAT_FOUND TRUE)
|
||||
set(GEANT4_USE_BUILTIN_EXPAT TRUE)
|
||||
@@ -191,18 +207,21 @@ if(UNIX)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Optional support for USolids - Requires USolids package
|
||||
# Optional support for VecGeom - Requires VecGeom package
|
||||
# GEANT4_USE_USOLIDS is a list argument which must take values:
|
||||
# - Empty/CMake boolean false : DEFAULT, do not replace G4 solids with USolids
|
||||
# - ALL/CMake boolean true : Replace all G4 solids with USolids
|
||||
# - List : Replace listed G4 solids with Usolids equivalents. Valid elements are
|
||||
# - Empty/CMake boolean false : DEFAULT, do not replace G4 solids with VecGeom
|
||||
# - ALL/CMake boolean true : Replace all G4 solids with VecGeom
|
||||
# - List : Replace listed G4 solids with VecGeom equivalents. Valid elements are
|
||||
set(GEANT4_USOLIDS_SHAPES
|
||||
BOX
|
||||
CONS
|
||||
CTUBS
|
||||
EXTRUDEDSOLID
|
||||
HYPE
|
||||
GENERICPOLYCONE
|
||||
GENERICTRAP
|
||||
ORB
|
||||
PARA
|
||||
PARABOLOID
|
||||
POLYCONE
|
||||
POLYHEDRA
|
||||
@@ -214,7 +233,7 @@ set(GEANT4_USOLIDS_SHAPES
|
||||
TUBS
|
||||
)
|
||||
|
||||
set(GEANT4_USE_USOLIDS OFF CACHE STRING "EXPERIMENTAL: List Geant4 solids to replace with USolids equivalents (ALL;${GEANT4_USOLIDS_SHAPES})")
|
||||
set(GEANT4_USE_USOLIDS OFF CACHE STRING "EXPERIMENTAL: List Geant4 solids to replace with VecGeom equivalents (ALL;${GEANT4_USOLIDS_SHAPES})")
|
||||
mark_as_advanced(GEANT4_USE_USOLIDS)
|
||||
|
||||
# - Must be a CMake list - no real way to enforce this
|
||||
@@ -242,28 +261,28 @@ if(NOT GEANT4_USE_ALL_USOLIDS AND GEANT4_USE_USOLIDS)
|
||||
endif()
|
||||
|
||||
|
||||
# - G4USolids setup
|
||||
# - Geant4 USolids/VecGom setup
|
||||
if(GEANT4_USE_ALL_USOLIDS OR GEANT4_USE_PARTIAL_USOLIDS)
|
||||
find_package(USolids REQUIRED)
|
||||
find_package(VecGeom REQUIRED)
|
||||
|
||||
if(GEANT4_USE_ALL_USOLIDS)
|
||||
set(GEANT4_USOLIDS_COMPILE_DEFINITIONS "-DG4GEOM_USE_USOLIDS")
|
||||
GEANT4_ADD_FEATURE(GEANT4_USE_USOLIDS "Replacing all Geant4 solids with USolids equivalents (EXPERIMENTAL)")
|
||||
GEANT4_ADD_FEATURE(GEANT4_USE_USOLIDS "Replacing Geant4 solids with all VecGeom equivalents (EXPERIMENTAL)")
|
||||
else()
|
||||
set(GEANT4_USOLIDS_COMPILE_DEFINITIONS "-DG4GEOM_USE_PARTIAL_USOLIDS")
|
||||
foreach(__g4_usolid_shape ${GEANT4_USE_PARTIAL_USOLIDS_SHAPE_LIST})
|
||||
list(APPEND GEANT4_USOLIDS_COMPILE_DEFINITIONS "-DG4GEOM_USE_U${__g4_usolid_shape}")
|
||||
endforeach()
|
||||
GEANT4_ADD_FEATURE(GEANT4_USE_USOLIDS "Replacing Geant4 solids with USolids equivalents for ${GEANT4_USE_PARTIAL_USOLIDS_SHAPE_LIST} (EXPERIMENTAL)")
|
||||
GEANT4_ADD_FEATURE(GEANT4_USE_USOLIDS "Replacing Geant4 solids with VecGeom equivalents for ${GEANT4_USE_PARTIAL_USOLIDS_SHAPE_LIST} (EXPERIMENTAL)")
|
||||
endif()
|
||||
list (APPEND GEANT4_USOLIDS_COMPILE_DEFINITIONS ${VECGEOM_DEFINITIONS})
|
||||
|
||||
# Combined definitions
|
||||
add_definitions(${GEANT4_USOLIDS_COMPILE_DEFINITIONS})
|
||||
|
||||
# Add USolids inc dirs here - can be removed once USolids supports
|
||||
# Add VecGeom inc dirs here - can be removed once VecGeom supports
|
||||
# INTERFACE_INCLUDE_DIRECTORIES
|
||||
include_directories(${USOLIDS_INCLUDE_DIRS} ${VECGEOM_EXTERNAL_INCLUDES})
|
||||
include_directories(${VECGEOM_INCLUDE_DIR} ${VECGEOM_EXTERNAL_INCLUDES})
|
||||
endif()
|
||||
|
||||
|
||||
@@ -279,3 +298,46 @@ endif()
|
||||
|
||||
GEANT4_ADD_FEATURE(GEANT4_USE_FREETYPE "Building Geant4 analysis library with Freetype support")
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Optional support for HDF5
|
||||
# - Requires external HDF5 1.8 or higher install
|
||||
# - Install must be MT safe if building Geant4 in MT mode
|
||||
#
|
||||
option(GEANT4_USE_HDF5 "Build Geant4 analysis library with HDF5 support" OFF)
|
||||
mark_as_advanced(GEANT4_USE_HDF5)
|
||||
|
||||
if(GEANT4_USE_HDF5)
|
||||
find_package(HDF5 1.8 REQUIRED)
|
||||
|
||||
# If we're in MT mode, found HDF5 must also support MT
|
||||
if(GEANT4_BUILD_MULTITHREADED)
|
||||
include(CheckCXXSymbolExists)
|
||||
set(CMAKE_REQUIRED_INCLUDES "${HDF5_INCLUDE_DIRS}")
|
||||
check_cxx_symbol_exists(H5_HAVE_THREADSAFE "H5pubconf.h" GEANT4_HAVE_H5_HAVE_THREADSAFE)
|
||||
unset(CMAKE_REQUIRED_INCLUDES)
|
||||
|
||||
if(NOT GEANT4_HAVE_H5_HAVE_THREADSAFE)
|
||||
message(FATAL_ERROR
|
||||
"Found an install of HDF5, but it was not built with support for thread safety. "
|
||||
"Either build Geant4 in single threaded mode, or use/reinstall HDF5 with "
|
||||
"thread safety enabled. See HDF5's install guides, available from https://support.hdfgroup.org/HDF5/release/, for instructions on this.\n"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# As FindHDF5 does not yet supply imported targets, we
|
||||
# create an internal INTERFACE target to wrap these.
|
||||
# This still hard-codes include/library paths, but limits it
|
||||
# to one place. Later, we'll create proper imported targets
|
||||
# with re-finds but for now this is the best minimally invasive proceedure
|
||||
add_library(G4HDF5 INTERFACE)
|
||||
target_include_directories(G4HDF5 INTERFACE ${HDF5_INCLUDE_DIRS})
|
||||
target_link_libraries(G4HDF5 INTERFACE ${HDF5_LIBRARIES})
|
||||
install(TARGETS G4HDF5 EXPORT Geant4LibraryDepends)
|
||||
|
||||
# Override HDF5_LIBRARIES for back compatibility
|
||||
set(HDF5_LIBRARIES G4HDF5)
|
||||
endif()
|
||||
|
||||
GEANT4_ADD_FEATURE(GEANT4_USE_HDF5 "Building Geant4 analysis library with HDF5 support")
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
# gdml (GDML support)
|
||||
# g3tog4 (Geant3 geometry call list reader library)
|
||||
# freetype (G4analysis library has freetype support)
|
||||
# hdf5 (G4analysis library has HDF5 support)
|
||||
#
|
||||
# ui_tcsh (TCsh Style Application Command Line Interface)
|
||||
# ui_win32 (WIN32 Style Application Command Line Interface)
|
||||
@@ -306,6 +307,12 @@ if(Geant4_multithreaded_FOUND)
|
||||
set(Geant4_TLS_MODEL "@GEANT4_BUILD_TLS_MODEL@")
|
||||
endif()
|
||||
|
||||
# - Muonic Atom support
|
||||
set(Geant4_muonic_atoms_FOUND @GEANT4_BUILD_MUONIC_ATOMS_IN_USE@)
|
||||
if(Geant4_muonic_atoms_FOUND)
|
||||
list(REMOVE_ITEM Geant4_FIND_COMPONENTS muonic_atoms)
|
||||
endif()
|
||||
|
||||
# - GDML
|
||||
set(Geant4_gdml_FOUND @GEANT4_USE_GDML@)
|
||||
if(Geant4_gdml_FOUND)
|
||||
@@ -333,6 +340,12 @@ if(Geant4_freetype_FOUND)
|
||||
list(REMOVE_ITEM Geant4_FIND_COMPONENTS freetype)
|
||||
endif()
|
||||
|
||||
# - HDF5
|
||||
set(Geant4_hdf5_FOUND @GEANT4_USE_HDF5@)
|
||||
if(Geant4_hdf5_FOUND)
|
||||
list(REMOVE_ITEM Geant4_FIND_COMPONENTS hdf5)
|
||||
endif()
|
||||
|
||||
# - UI : TCSH
|
||||
set(Geant4_ui_tcsh_FOUND @UNIX@)
|
||||
if(Geant4_ui_tcsh_FOUND)
|
||||
|
||||
@@ -124,6 +124,10 @@ libs="-lG4interfaces \
|
||||
geant4_uses_opengl="no"
|
||||
geant4_uses_x11="no"
|
||||
|
||||
# - Muonic Atom support
|
||||
have_muonic_atoms="@G4_BUILTWITH_MUONIC_ATOMS@"
|
||||
feature_list="${feature_list} muonic_atoms[${have_muonic_atoms}]"
|
||||
|
||||
# - CLHEP
|
||||
have_clhep="@G4_BUILTWITH_CLHEP@"
|
||||
feature_list="${feature_list} clhep[${have_clhep}]"
|
||||
@@ -171,6 +175,10 @@ fi
|
||||
have_freetype="@G4_BUILTWITH_FREETYPE@"
|
||||
feature_list="${feature_list} freetype[${have_freetype}]"
|
||||
|
||||
# - HDF5
|
||||
have_hdf5="@G4_BUILTWITH_HDF5@"
|
||||
feature_list="${feature_list} hdf5[${have_hdf5}]"
|
||||
|
||||
# - G3toG4
|
||||
have_g3tog4="@G4_BUILTWITH_G3TOG4@"
|
||||
feature_list="${feature_list} g3tog4[${have_g3tog4}]"
|
||||
@@ -564,6 +572,9 @@ while test $# -gt 0 ; do
|
||||
freetype)
|
||||
echo ${have_freetype}
|
||||
;;
|
||||
hdf5)
|
||||
echo ${have_hdf5}
|
||||
;;
|
||||
g3tog4)
|
||||
echo ${have_g3tog4}
|
||||
;;
|
||||
|
||||
+23
-1
@@ -1,4 +1,4 @@
|
||||
svn log $Id: History 103646 2017-04-20 09:30:24Z gcosmo $
|
||||
svn log $Id: History 107491 2017-11-16 09:38:59Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,6 +16,28 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
16th November 2017 Gabriele Cosmo (config-V10-03-07)
|
||||
- architecture.gmk: removed references to old USolids library; just use VecGeom.
|
||||
|
||||
16th October 2017 Gabriele Cosmo (config-V10-03-06)
|
||||
- geomconf.gmk: added G4GEOM_USE_UHYPE flag to enable VecGeom wrapper for G4Hype.
|
||||
|
||||
10th October 2017 Gabriele Cosmo (config-V10-03-05)
|
||||
- binmake.gmk: added hadronic/models/gamma_nuclear module to include paths.
|
||||
|
||||
11th July 2017 Gabriele Cosmo (config-V10-03-04)
|
||||
- geomconf.gmk: updated flags for Scalar build of VecGeom.
|
||||
|
||||
11th July 2017 Gabriele Cosmo (config-V10-03-03)
|
||||
- geomconf.gmk: added selector for G4GEOM_USE_UPARA flag, to enable
|
||||
wrapping of G4Para for USolids/VecGeom.
|
||||
Coworks with tag geom-csg-V10-03-29.
|
||||
|
||||
10th July 2017 Gabriele Cosmo (config-V10-03-02)
|
||||
- geomconf.gmk: added selector for G4GEOM_USE_UCTUBS flag, to enable
|
||||
wrapping of G4CutTubs for USolids/VecGeom.
|
||||
Coworks with tag geom-csg-V10-03-28.
|
||||
|
||||
20th April 2017 Gabriele Cosmo (config-V10-03-01)
|
||||
- binmake-gmk: added 'processses/solidstate' module include path.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: architecture.gmk 96443 2016-04-14 14:19:28Z gcosmo $
|
||||
# $Id: architecture.gmk 107491 2017-11-16 09:38:59Z gcosmo $
|
||||
# ------------------------------------------------------------------------
|
||||
# GEANT 4 - Architecture configuration script for GNU Make
|
||||
#
|
||||
@@ -188,15 +188,13 @@ endif
|
||||
ifdef G4USOLIDS
|
||||
G4LIB_USE_USOLIDS := 1
|
||||
ifndef USOLIDS_BASE_DIR
|
||||
$(error ERROR - Define path USOLIDS_BASE_DIR to USolids/VecGeom installation!)
|
||||
$(error ERROR - Define path USOLIDS_BASE_DIR to VecGeom installation!)
|
||||
else
|
||||
ifndef USOLIDS_LIB
|
||||
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
||||
USOLIDS_LIB := usolids.lib
|
||||
VECGEOM_LIB := vecgeom.lib
|
||||
USOLIDS_LIB := vecgeom.lib
|
||||
else
|
||||
USOLIDS_LIB := usolids
|
||||
VECGEOM_LIB := vecgeom
|
||||
USOLIDS_LIB := vecgeom
|
||||
endif
|
||||
endif
|
||||
ifndef USOLIDS_INCLUDE_DIR
|
||||
@@ -281,10 +279,10 @@ endif
|
||||
ifdef G4LIB_USE_USOLIDS
|
||||
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
||||
LDFLAGS += -link $(LIB_PATH)$(USOLIDS_LIB_DIR)
|
||||
LOADLIBS += $(USOLIDS_LIB) $(VECGEOM_LIB)
|
||||
LOADLIBS += $(USOLIDS_LIB)
|
||||
else
|
||||
LDFLAGS += -L$(USOLIDS_LIB_DIR)
|
||||
LOADLIBS += -l$(USOLIDS_LIB) -l$(VECGEOM_LIB)
|
||||
LOADLIBS += -l$(USOLIDS_LIB)
|
||||
endif
|
||||
endif
|
||||
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
||||
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
# $Id: binmake.gmk 103646 2017-04-20 09:30:24Z gcosmo $
|
||||
# $Id: binmake.gmk 106467 2017-10-11 08:09:08Z gcosmo $
|
||||
# ----------------------------------------------------------
|
||||
# Script defining rules and paths for making binaries.
|
||||
# First implementation: Gabriele Cosmo, 25/06/1998.
|
||||
@@ -126,6 +126,7 @@ ifndef INCFLAGS
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/em_dissociation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/fission/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/gamma_nuclear/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/im_r_matrix/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/inclxx/interface/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/inclxx/utils/include \
|
||||
|
||||
+10
-1
@@ -21,9 +21,15 @@ endif
|
||||
ifdef G4GEOM_USE_UCONS
|
||||
CPPFLAGS += -DG4GEOM_USE_UCONS
|
||||
endif
|
||||
ifdef G4GEOM_USE_UCTUBS
|
||||
CPPFLAGS += -DG4GEOM_USE_UCTUBS
|
||||
endif
|
||||
ifdef G4GEOM_USE_UEXTRUDEDSOLID
|
||||
CPPFLAGS += -DG4GEOM_USE_UEXTRUDEDSOLID
|
||||
endif
|
||||
ifdef G4GEOM_USE_UHYPE
|
||||
CPPFLAGS += -DG4GEOM_USE_UHYPE
|
||||
endif
|
||||
ifdef G4GEOM_USE_UGENERICPOLYCONE
|
||||
CPPFLAGS += -DG4GEOM_USE_UGENERICPOLYCONE
|
||||
endif
|
||||
@@ -33,6 +39,9 @@ endif
|
||||
ifdef G4GEOM_USE_UORB
|
||||
CPPFLAGS += -DG4GEOM_USE_UORB
|
||||
endif
|
||||
ifdef G4GEOM_USE_UPARA
|
||||
CPPFLAGS += -DG4GEOM_USE_UPARA
|
||||
endif
|
||||
ifdef G4GEOM_USE_UPARABOLOID
|
||||
CPPFLAGS += -DG4GEOM_USE_UPARABOLOID
|
||||
endif
|
||||
@@ -62,5 +71,5 @@ ifdef G4GEOM_USE_UTUBS
|
||||
endif
|
||||
|
||||
ifdef UEXTRAFLAGS
|
||||
CPPFLAGS += -DVECGEOM_SCALAR -DVECGEOM_REPLACE_USOLIDS -DVECGEOM_NO_SPECIALIZATION -DVECGEOM_USOLIDS
|
||||
CPPFLAGS += -DVECGEOM_SCALAR -DVECGEOM_REPLACE_USOLIDS -DVECGEOM_QUADRILATERALS_VC -DVECGEOM_NO_SPECIALIZATION -DVECGEOM_USOLIDS -DVECGEOM_INPLACE_TRANSFORMATIONS -DVECGEOM_USE_INDEXEDNAVSTATES
|
||||
endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 101892 2016-12-07 08:07:30Z gcosmo $
|
||||
$Id: History 107590 2017-11-24 11:59:22Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -18,6 +18,10 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
envs-V10-03-01 / Nov. 24 K.Murakami
|
||||
- g4py, updated for 10.4 release
|
||||
- zmq, new ZeroMQ interface (experimental)
|
||||
|
||||
envs-V10-02-02 / 7 Dec. 2016 K.Murakami
|
||||
- remove G4VisAttributes::Invisible as deprecated
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ Geant4Py is a Geant4-Python bridge.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
24 Nov. 2017 K. Murakami
|
||||
- update for 10.4 release
|
||||
|
||||
7 Dec. 2016 K. Murakami
|
||||
- remove G4VisAttributes::Invisible as deprecated
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -25,7 +25,7 @@ ROOT for histogramming/analysis
|
||||
### Tested Platforms
|
||||
|
||||
* CentOS7 (RH7 clones)
|
||||
* OSX (Sierra)
|
||||
* OSX (High Siera)
|
||||
|
||||
|
||||
How to Install
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4ChordFinder.cc 76884 2013-11-18 12:54:03Z gcosmo $
|
||||
// $Id: pyG4ChordFinder.cc 107590 2017-11-24 11:59:22Z gcosmo $
|
||||
// ====================================================================
|
||||
// pyG4ChordFinder.cc
|
||||
//
|
||||
@@ -54,7 +54,6 @@ void export_G4ChordFinder()
|
||||
class_<G4ChordFinder, G4ChordFinder*, boost::noncopyable>
|
||||
("G4ChordFinder", "chord finder class", no_init)
|
||||
// constructor
|
||||
.def(init<G4MagInt_Driver*>())
|
||||
.def(init<G4MagneticField*>())
|
||||
.def(init<G4MagneticField*, G4double>())
|
||||
.def(init<G4MagneticField*, G4double, G4MagIntegratorStepper*>())
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4FieldManager.cc 76884 2013-11-18 12:54:03Z gcosmo $
|
||||
// $Id: pyG4FieldManager.cc 107590 2017-11-24 11:59:22Z gcosmo $
|
||||
// ====================================================================
|
||||
// pyG4FieldManager.cc
|
||||
//
|
||||
@@ -39,17 +39,6 @@
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
// ====================================================================
|
||||
// miscs
|
||||
// ====================================================================
|
||||
#if G4VERSION_NUMBER <= 801
|
||||
// What a hell!
|
||||
inline const G4ChordFinder* G4FieldManager::GetChordFinder() const
|
||||
{
|
||||
return fChordFinder;
|
||||
}
|
||||
#endif
|
||||
|
||||
// ====================================================================
|
||||
// thin wrappers
|
||||
// ====================================================================
|
||||
@@ -57,9 +46,13 @@ namespace pyG4FieldManager {
|
||||
|
||||
G4ChordFinder*(G4FieldManager::*f1_GetChordFinder)()
|
||||
= &G4FieldManager::GetChordFinder;
|
||||
|
||||
const G4ChordFinder*(G4FieldManager::*f2_GetChordFinder)() const
|
||||
= &G4FieldManager::GetChordFinder;
|
||||
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_SetDetectorField,
|
||||
SetDetectorField, 1, 2);
|
||||
|
||||
}
|
||||
|
||||
using namespace pyG4FieldManager;
|
||||
@@ -78,7 +71,8 @@ void export_G4FieldManager()
|
||||
.def(init<G4Field*, G4ChordFinder*, G4bool>())
|
||||
.def(init<G4MagneticField*>())
|
||||
// ---
|
||||
.def("SetDetectorField", &G4FieldManager::SetDetectorField)
|
||||
.def("SetDetectorField", &G4FieldManager::SetDetectorField,
|
||||
f_SetDetectorField())
|
||||
.def("GetDetectorField", &G4FieldManager::GetDetectorField,
|
||||
return_internal_reference<>())
|
||||
.def("DoesFieldExist", &G4FieldManager::DoesFieldExist)
|
||||
@@ -103,4 +97,3 @@ void export_G4FieldManager()
|
||||
.def("SetFieldChangesEnergy", &G4FieldManager::SetFieldChangesEnergy)
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4RandomDirection.cc 66892 2013-01-17 10:57:59Z gunter $
|
||||
// $Id: pyG4RandomDirection.cc 107590 2017-11-24 11:59:22Z gcosmo $
|
||||
// ====================================================================
|
||||
// pyG4RandomDirection.cc
|
||||
//
|
||||
@@ -34,11 +34,23 @@
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
// ====================================================================
|
||||
// thin wrappers
|
||||
// ====================================================================
|
||||
namespace pyG4RandomDirection {
|
||||
|
||||
G4ThreeVector(*G4RandomDirection_1)() = G4RandomDirection;
|
||||
G4ThreeVector(*G4RandomDirection_2)(double) = G4RandomDirection;
|
||||
|
||||
}
|
||||
|
||||
using namespace pyG4RandomDirection;
|
||||
|
||||
// ====================================================================
|
||||
// module definition
|
||||
// ====================================================================
|
||||
void export_G4RandomDirection()
|
||||
{
|
||||
def("G4RandomDirection", G4RandomDirection);
|
||||
def("G4RandomDirection", G4RandomDirection_1);
|
||||
def("G4RandomDirection", G4RandomDirection_2);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4TwoVector.cc 76884 2013-11-18 12:54:03Z gcosmo $
|
||||
// $Id: pyG4TwoVector.cc 107590 2017-11-24 11:59:22Z gcosmo $
|
||||
// ====================================================================
|
||||
// pyG4TwoVector.cc
|
||||
//
|
||||
@@ -31,8 +31,6 @@
|
||||
// ====================================================================
|
||||
#include <boost/python.hpp>
|
||||
#include "G4Version.hh"
|
||||
|
||||
#if G4VERSION_NUMBER >= 830
|
||||
#include "G4TwoVector.hh"
|
||||
|
||||
using namespace boost::python;
|
||||
@@ -53,15 +51,11 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_isOrthogonal, isOrthogonal, 1, 2)
|
||||
|
||||
using namespace pyG4TwoVector;
|
||||
|
||||
#endif
|
||||
|
||||
// ====================================================================
|
||||
// module definition
|
||||
// ====================================================================
|
||||
void export_G4TwoVector()
|
||||
{
|
||||
#if G4VERSION_NUMBER >= 830
|
||||
|
||||
class_<G4TwoVector>("G4TwoVector", "general 2-vector")
|
||||
// constructors
|
||||
.def(init<G4double>())
|
||||
@@ -112,8 +106,4 @@ void export_G4TwoVector()
|
||||
.def(self >= self)
|
||||
.def(self <= self)
|
||||
;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyglobals.cc 76884 2013-11-18 12:54:03Z gcosmo $
|
||||
// $Id: pyglobals.cc 107590 2017-11-24 11:59:22Z gcosmo $
|
||||
// ====================================================================
|
||||
// pyglobals.cc
|
||||
//
|
||||
@@ -65,9 +65,8 @@ typedef std::vector<G4int> G4intVector;
|
||||
typedef std::vector<G4double> G4doubleVector;
|
||||
typedef std::vector<G4String> G4StringVector;
|
||||
typedef std::vector<G4ThreeVector> G4ThreeVectorVector;
|
||||
#if G4VERSION_NUMBER >= 830
|
||||
typedef std::vector<G4TwoVector> G4TwoVectorVector;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
using namespace pyglobals;
|
||||
@@ -96,11 +95,8 @@ void export_globals()
|
||||
.def(vector_indexing_suite<G4ThreeVectorVector>())
|
||||
;
|
||||
|
||||
#if G4VERSION_NUMBER >= 830
|
||||
class_<G4TwoVectorVector> ("G4StringVector", "2-vector vector")
|
||||
.def(vector_indexing_suite<G4TwoVectorVector>())
|
||||
;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
# This package contains a set of Python interface with Geant4.
|
||||
# ==================================================================
|
||||
"""
|
||||
# $Id: __init__.py 101648 2016-11-21 08:42:14Z gcosmo $
|
||||
__version__ ='10.3'
|
||||
__date__ = 'November/2016'
|
||||
# $Id: __init__.py 107590 2017-11-24 11:59:22Z gcosmo $
|
||||
__version__ ='10.4'
|
||||
__date__ = 'December/2017'
|
||||
__author__ = 'K.Murakami (Koichi.Murakami@kek.jp)'
|
||||
|
||||
# import submodules
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
# This package contains a set of Python interface with Geant4.
|
||||
# ==================================================================
|
||||
"""
|
||||
# $Id: __init__.py 101648 2016-11-21 08:42:14Z gcosmo $
|
||||
__version__ ='10.3'
|
||||
__date__ = 'November/2016'
|
||||
# $Id: __init__.py 107590 2017-11-24 11:59:22Z gcosmo $
|
||||
__version__ ='10.4'
|
||||
__date__ = 'December/2017'
|
||||
__author__ = 'K.Murakami (Koichi.Murakami@kek.jp)'
|
||||
|
||||
# import submodules
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,99 @@
|
||||
#
|
||||
# CMakeLists.txt for buidlig zmq-geant4
|
||||
#
|
||||
# Copyright 2017 Koichi Murakami
|
||||
#
|
||||
# ***************************
|
||||
# !! DONOT EDIT THIS FILE !!
|
||||
# ***************************
|
||||
#
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
include(config.cmake)
|
||||
#==============================================================================
|
||||
project(ZMQ-GEANT4)
|
||||
#==============================================================================
|
||||
|
||||
# version.h generation (true for release)
|
||||
if(DEVMODE)
|
||||
set(SKIP_VERSION FALSE)
|
||||
else()
|
||||
set(SKIP_VERSION TRUE)
|
||||
endif()
|
||||
|
||||
# static / shared library
|
||||
#set (LIBRARY_TYPE "STATIC")
|
||||
|
||||
# cmake modules
|
||||
set(CMAKE_MODULE_PATH
|
||||
${PROJECT_SOURCE_DIR}/cmake/Modules
|
||||
${CMAKE_MODULE_PATH})
|
||||
|
||||
# library path (lib or lib64)
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set(_LIBDIR_DEFAULT "lib")
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux"
|
||||
AND NOT EXISTS "/etc/debian_version")
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(_LIBDIR_DEFAULT "lib64")
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}")
|
||||
endif()
|
||||
|
||||
# find packages
|
||||
find_package(Geant4 REQUIRED)
|
||||
find_package(ZMQ REQUIRED)
|
||||
|
||||
# c++11
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# build options
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
if(DEBUG)
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG")
|
||||
elseif(OPTIMIZE)
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
else()
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# parameters for building
|
||||
message(STATUS "--------------------------------------------------------")
|
||||
message(STATUS "Parameters for building")
|
||||
message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
|
||||
message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
|
||||
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
|
||||
message(STATUS "GEANT4_LIBRARY_DIR: ${GEANT4_LIBRARY_DIR}")
|
||||
|
||||
message(STATUS "--------------------------------------------------------")
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# version.h (#.##d# + rev# / dev flag d/a/b/rc)
|
||||
#if(NOT SKIP_VERSION)
|
||||
#set(G4ZMQ_VERSION_MAJOR 1)
|
||||
#set(G4ZMQ_VERSION_MINOR 0.1)
|
||||
#execute_process (COMMAND git rev-parse --short HEAD OUTPUT_VARIABLE
|
||||
# G4ZMQ_VERSION_BUILD OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
#configure_file(
|
||||
# "${PROJECT_SOURCE_DIR}/cmake/version.h.in"
|
||||
# "${PROJECT_SOURCE_DIR}/zmq/version.h"
|
||||
#)
|
||||
#endif()
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# adding sub directories to the project
|
||||
add_subdirectory(zmq)
|
||||
|
||||
# unit tests
|
||||
if(DEVMODE)
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
#add_subdirectory(tests/ut)
|
||||
endif()
|
||||
|
||||
# integration tests
|
||||
#add_subdirectory(tests/it EXCLUDE_FROM_ALL)
|
||||
@@ -0,0 +1,15 @@
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
G4ZMQ History file
|
||||
---------------------
|
||||
|
||||
ZeroMQ Interface for Geant4
|
||||
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
24 Nov. 2017 K. Murakami
|
||||
- First release for ZeroMQ interface (experimental)
|
||||
@@ -0,0 +1,14 @@
|
||||
# ZeroMQ Interface for Geant4
|
||||
|
||||
Copyright (c) 2017, Koichi Murakami
|
||||
|
||||
zmq-geant4 is a [ZeroMQ](http://zeromq.org/) interface with Geant4,
|
||||
that is an alternative implementation of Geant4 UI session.
|
||||
The interface is designed for the purpose of Geant4 kernel
|
||||
for [Jupyter](http://jupyter.org/).
|
||||
A Jupyter kernel is provided in
|
||||
[igeant4](https://github.com/koichi-murakami/igeant4) repository.
|
||||
|
||||
* [Releases](https://github.com/koichi-murakami/zmq-geant4/releases)
|
||||
* [Install Instructions](https://github.com/koichi-murakami/zmq-geant4/wiki/Installation)
|
||||
* [Issues](https://github.com/koichi-murakami/zmq-geant4/issues)
|
||||
@@ -0,0 +1,54 @@
|
||||
# - Find Geant4 library
|
||||
# This module sets up Geant4 information
|
||||
# It defines:
|
||||
# GEANT4_FOUND If the Geant4 is found
|
||||
# GEANT4_INCLUDE_DIR PATH to the include directory
|
||||
# GEANT4_LIBRARY_DIR PATH to the library directory
|
||||
# GEANT4_LIBRARIES Most common libraries
|
||||
# GEANT4_LIBRARIES_WITH_VIS Most common libraries with visualization
|
||||
|
||||
find_program(GEANT4_CONFIG NAMES geant4-config
|
||||
PATHS $ENV{GEANT4_INSTALL}/bin
|
||||
${GEANT4_INSTALL}/bin
|
||||
/usr/local/bin /opt/local/bin)
|
||||
|
||||
if(GEANT4_CONFIG)
|
||||
set(GEANT4_FOUND TRUE)
|
||||
|
||||
execute_process(COMMAND ${GEANT4_CONFIG} --prefix
|
||||
OUTPUT_VARIABLE GEANT4_PREFIX
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${GEANT4_CONFIG} --version
|
||||
OUTPUT_VARIABLE GEANT4_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
message(STATUS "Found Geant4: ${GEANT4_PREFIX} (${GEANT4_VERSION})")
|
||||
|
||||
else()
|
||||
set(GEANT4_FOUND FALSE)
|
||||
if (Geant4_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "NOT Found Geant4: set GEANT4_INSTALL.")
|
||||
else()
|
||||
message(WARNING "NOT Found Geant4: set GEANT4_INSTALL.")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
set(GEANT4_INCLUDE_DIR ${GEANT4_PREFIX}/include/Geant4)
|
||||
set(GEANT4_LIBRARY_DIR ${GEANT4_PREFIX}/${_LIBDIR_DEFAULT})
|
||||
set(GEANT4_LIBRARIES G4interfaces G4persistency G4analysis
|
||||
G4error_propagation G4readout G4physicslists
|
||||
G4run G4event G4tracking G4parmodels G4processes
|
||||
G4digits_hits G4track G4particles G4geometry
|
||||
G4materials G4graphics_reps G4intercoms
|
||||
G4global G4clhep G4zlib)
|
||||
|
||||
set(GEANT4_LIBRARIES_WITH_VIS
|
||||
G4OpenGL G4gl2ps G4Tree G4FR G4GMocren G4visHepRep
|
||||
G4RayTracer G4VRML G4vis_management G4modeling
|
||||
G4interfaces G4persistency G4analysis
|
||||
G4error_propagation G4readout G4physicslists
|
||||
G4run G4event G4tracking G4parmodels G4processes
|
||||
G4digits_hits G4track G4particles G4geometry
|
||||
G4materials G4graphics_reps G4intercoms
|
||||
G4global G4clhep G4zlib)
|
||||
@@ -0,0 +1,45 @@
|
||||
# - Find ZMQ library
|
||||
#
|
||||
# It defines:
|
||||
# ZMQ_FOUND If the ZeroMQ is found
|
||||
# ZMQ_INCLUDE_DIRS PATH to the include directory
|
||||
# ZMQ_LIBRARIES libraries
|
||||
#
|
||||
# ZMQ_DIR is used for guessing the installed path.
|
||||
#
|
||||
|
||||
message("-- Detecting ZeroMQ package")
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(ZMQ QUIET zmq)
|
||||
|
||||
if(PC_ZMQ_FOUND)
|
||||
set(ZMQ_FOUND 1)
|
||||
else()
|
||||
set(ZMQ_FOUND 0)
|
||||
endif()
|
||||
|
||||
# find include path
|
||||
find_path(ZMQ_INCLUDE_DIRS zmq.hpp
|
||||
HINTS /usr/include ${ZMQ_DIR}/include ${PC_ZMQ_INCLUDE_DIRS})
|
||||
if(ZMQ_INCLUDE_DIRS MATCHES "^.*-NOTFOUND")
|
||||
set(ZMQ_FOUND 0)
|
||||
endif()
|
||||
|
||||
# find library
|
||||
find_library(ZMQ_LIBRARIES NAMES zmq
|
||||
PATHS /usr/lib64 /usr/lib
|
||||
${ZMQ_DIR}/lib64 ${ZMQ_DIR}/lib ${PC_ZMQ_LIBRARY_DIRS})
|
||||
|
||||
if(ZMQ_LIBRARIES MATCHES "^.*-NOTFOUND")
|
||||
set(ZMQ_FOUND 0)
|
||||
endif()
|
||||
#
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(ZMQ DEFAULT_MSG
|
||||
ZMQ_INCLUDE_DIRS ZMQ_LIBRARIES)
|
||||
|
||||
mark_as_advanced(ZMQ_INCLUDE_DIRS ZMQ_LIBRARY_DIRS ZMQ_LIBRARIES)
|
||||
|
||||
message("-- Detecting ZMQ package - done")
|
||||
@@ -0,0 +1,28 @@
|
||||
#==============================================================================
|
||||
# CMake configuration
|
||||
#
|
||||
# NOTE:
|
||||
# CACHE variables can be changed in CMake CLI with -D option.
|
||||
#==============================================================================
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX /zzz
|
||||
CACHE STRING "Install prefix")
|
||||
|
||||
# Geant4 installation path
|
||||
set(GEANT4_INSTALL /zzz
|
||||
CACHE STRING "Geant4 installation path")
|
||||
|
||||
# visualization flag
|
||||
set(ENABLE_VIS FALSE CACHE BOOL "Enable visualization flag")
|
||||
|
||||
# Optimizaton / Debug flags
|
||||
set(OPTIMIZE TRUE CACHE BOOL "Optimizaton flag (O3)")
|
||||
set(DEBUG FALSE CACHE BOOL "Debug mode")
|
||||
|
||||
# Development flag (set false for release)
|
||||
set(DEVMODE FALSE CACHE BOOL "Development mode")
|
||||
|
||||
# Optional configurations
|
||||
# Compiler
|
||||
#set(CMAKE_C_COMPILER /opt/gcc-4.8.5/bin/gcc)
|
||||
#set(CMAKE_CXX_COMPILER /opt/gcc-4.8.5/bin/g++)
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
#!/bin/sh -
|
||||
# ======================================================================
|
||||
# Configure script for G4Bench
|
||||
#
|
||||
# Note:
|
||||
# This script is an alternative cmake wrapper.
|
||||
# The script generates a cmake build directory in "build" directory.
|
||||
# You can do the same things with cmake command using -DXXX=VVV options.
|
||||
# ======================================================================
|
||||
export LANG=C
|
||||
|
||||
# ======================================================================
|
||||
# help message
|
||||
# ======================================================================
|
||||
show_help() {
|
||||
cat <<EOF
|
||||
|
||||
\`configure' cmake configure script for G4Bench apps.
|
||||
|
||||
Usage: configure [OPTION]... [VAR=VALUE]...
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
|
||||
Installation directories:
|
||||
--prefix=PREFIX installation prefix [config.cmake]
|
||||
|
||||
Fine tuning of the library build:
|
||||
--with-geant4-dir=DIR Geant4 installed dir [config.cmake]
|
||||
|
||||
Enable/disable options: prefix with either --enable- or --disable-
|
||||
vis OpenGL support [disable]
|
||||
opt optimization (O3) [enable]
|
||||
debug debug mode [disable]
|
||||
dev development mode [config.cmake/disable]
|
||||
|
||||
After configuration is done,
|
||||
cd build
|
||||
make
|
||||
make install
|
||||
EOF
|
||||
}
|
||||
|
||||
# ======================================================================
|
||||
# functions
|
||||
# ======================================================================
|
||||
check_error() {
|
||||
if [ $? -ne 0 ]; then
|
||||
exit -1
|
||||
fi
|
||||
}
|
||||
|
||||
show_line() {
|
||||
echo "========================================================================"
|
||||
}
|
||||
|
||||
# ======================================================================
|
||||
# main
|
||||
# ======================================================================
|
||||
# default values
|
||||
prefix=_cmake
|
||||
g4_install=_cmake
|
||||
enable_vis=0
|
||||
enable_opt=1
|
||||
enable_debug=0
|
||||
enable_dev=_cmake
|
||||
|
||||
# parsing options
|
||||
while test $# -gt 0
|
||||
do
|
||||
case $1 in
|
||||
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) optarg= ;;
|
||||
esac
|
||||
|
||||
case $1 in
|
||||
--help|-h) show_help; exit 0 ;;
|
||||
# ---------------------------------------------------------------
|
||||
--prefix=*) prefix=$optarg ;;
|
||||
--with-geant4-dir=*) g4_install=$optarg ;;
|
||||
# ---------------------------------------------------------------
|
||||
--enable-vis ) enable_vis=1 ;;
|
||||
--disable-vis ) enable_vis=0 ;;
|
||||
--enable-opt ) enable_opt=1 ;;
|
||||
--disable-opt ) enable_opt=0 ;;
|
||||
--enable-debug ) enable_debug=1 ;;
|
||||
--disable-debug ) enable_debug=0 ;;
|
||||
--enable-dev ) enable_dev=1 ;;
|
||||
--disable-dev ) enable_dev=0 ;;
|
||||
# ---------------------------------------------------------------
|
||||
-*)
|
||||
echo "Unrecognized option: $1"
|
||||
exit -1
|
||||
;;
|
||||
*)
|
||||
echo "Invalid argument: $1"
|
||||
exit -1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# ======================================================================
|
||||
cmake_option=""
|
||||
|
||||
echo "Build configuration:"
|
||||
echo -n "G4Bench prefix ... "
|
||||
if [ $prefix = _cmake ]; then
|
||||
echo "[config.cmake]"
|
||||
else
|
||||
echo $prefix
|
||||
cmake_option="-DCMAKE_INSTALL_PREFIX=${prefix}"
|
||||
fi
|
||||
|
||||
echo -n "Geant4 dir ... "
|
||||
if [ $g4_install = _cmake ]; then
|
||||
echo "[config.cmake]"
|
||||
else
|
||||
echo $g4_install
|
||||
cmake_option="${cmake_option} -DGEANT4_INSTALL=${g4_install}"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo -n "Enabled support for [ "
|
||||
if [ $enable_vis = 1 ]; then
|
||||
echo -n "vis "
|
||||
cmake_option="${cmake_option} -DENABLE_VIS=TRUE"
|
||||
else
|
||||
cmake_option="${cmake_option} -DENABLE_VIS=FALSE"
|
||||
fi
|
||||
|
||||
if [ $enable_debug = 1 ]; then
|
||||
echo -n "debug "
|
||||
cmake_option="${cmake_option} -DDEBUG=TRUE"
|
||||
enable_opt=0
|
||||
else
|
||||
cmake_option="${cmake_option} -DDEBUG=FALSE"
|
||||
fi
|
||||
|
||||
if [ $enable_opt = 1 ]; then
|
||||
echo -n "opt "
|
||||
cmake_option="${cmake_option} -DOPTIMIZE=TRUE"
|
||||
else
|
||||
cmake_option="${cmake_option} -DOPTIMIZE=FALSE"
|
||||
fi
|
||||
|
||||
if [ $enable_dev != _cmake ]; then
|
||||
if [ $enable_dev = 1 ]; then
|
||||
echo -n "dev "
|
||||
cmake_option="${cmake_option} -DDEVMODE=TRUE"
|
||||
else
|
||||
cmake_option="${cmake_option} -DDEVMODE=FALSE"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "]"
|
||||
echo " "
|
||||
echo "cmake flags:${cmake_option}"
|
||||
# ======================================================================
|
||||
show_line
|
||||
echo "@@ execute cmake..."
|
||||
if [ -d build ]; then
|
||||
rm -r -f build
|
||||
fi
|
||||
mkdir build
|
||||
cd build
|
||||
cmake $cmake_option ..
|
||||
check_error
|
||||
exit 0
|
||||
Executable
+106
@@ -0,0 +1,106 @@
|
||||
#/usr/bin/env python
|
||||
# ==================================================================
|
||||
# python client for zmq-geant4
|
||||
#
|
||||
# *** Python3 ***
|
||||
# ==================================================================
|
||||
import zmq
|
||||
|
||||
# global vars
|
||||
charset = 'utf-8'
|
||||
context = zmq.Context(1)
|
||||
socket = context.socket(zmq.REQ)
|
||||
|
||||
# ===============================================================
|
||||
def connect(endpoint="tcp://127.0.0.1:5555") :
|
||||
socket.setsockopt(zmq.LINGER, 0)
|
||||
socket.connect(endpoint)
|
||||
ping()
|
||||
|
||||
def ping() :
|
||||
socket.send(b"@@ping")
|
||||
poller = zmq.Poller()
|
||||
poller.register(socket, zmq.POLLIN)
|
||||
if poller.poll(1*1000) :
|
||||
output = socket.recv()
|
||||
print ("@@ G4ZMQ server connected.")
|
||||
else :
|
||||
raise ConnectionError("*** connection timeout")
|
||||
|
||||
def debug(dflag) :
|
||||
if dflag :
|
||||
socket.send(b"@@debug")
|
||||
else :
|
||||
socket.send(b"@@nodebug")
|
||||
output = socket.recv()
|
||||
print(output.decode(charset))
|
||||
|
||||
def apply(command) :
|
||||
cmd_str= command.encode(charset)
|
||||
socket.send(cmd_str)
|
||||
output = socket.recv()
|
||||
print(output.decode(charset))
|
||||
|
||||
def execute(command) :
|
||||
apply(command)
|
||||
|
||||
def pwd() :
|
||||
socket.send(b"pwd")
|
||||
output = socket.recv()
|
||||
print(output.decode(charset))
|
||||
|
||||
def cwd() :
|
||||
socket.send(b"cwd")
|
||||
output = socket.recv()
|
||||
print(output.decode(charset))
|
||||
|
||||
def cd(dir="") :
|
||||
cmd = "cd " + dir
|
||||
socket.send(cmd.encode(charset))
|
||||
output = socket.recv()
|
||||
print(output.decode(charset))
|
||||
|
||||
def lc(target="") :
|
||||
cmd = "lc " + target
|
||||
socket.send(cmd.encode(charset))
|
||||
output = socket.recv()
|
||||
print(output.decode(charset))
|
||||
|
||||
def ls(target="") :
|
||||
cmd = "ls " + target
|
||||
socket.send(cmd.encode(charset))
|
||||
output = socket.recv()
|
||||
print(output.decode(charset))
|
||||
|
||||
def help(target="") :
|
||||
if ( target == "" ) :
|
||||
raise SyntaxWarning("*** no command specified.")
|
||||
else :
|
||||
cmd = "help " + target
|
||||
socket.send(cmd.encode(charset))
|
||||
output = socket.recv()
|
||||
print(output.decode(charset))
|
||||
|
||||
def history() :
|
||||
socket.send(b"history")
|
||||
output = socket.recv()
|
||||
print(output.decode(charset))
|
||||
|
||||
def beamOn(nevent) :
|
||||
cmd = "/run/beamOn " + str(nevent)
|
||||
apply(cmd)
|
||||
|
||||
def getvalue(target="") :
|
||||
cmd = "?" + target
|
||||
socket.send(cmd.encode(charset))
|
||||
output = socket.recv()
|
||||
print(output.decode(charset))
|
||||
|
||||
def exit() :
|
||||
socket.send(b"exit")
|
||||
output = socket.recv()
|
||||
print(output.decode(charset))
|
||||
|
||||
# ===============================================================
|
||||
if __name__ == '__main__' :
|
||||
pass
|
||||
@@ -0,0 +1,18 @@
|
||||
# - build G4zeromq library
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR} ${GEANT4_INCLUDE_DIR}
|
||||
${ZMQ_INCLUDE_DIRS})
|
||||
|
||||
# library
|
||||
add_library(
|
||||
G4zeromq SHARED
|
||||
G4ZMQServer.cc
|
||||
)
|
||||
# headers
|
||||
set(HEADERS
|
||||
G4ZMQServer.hh
|
||||
)
|
||||
|
||||
# install
|
||||
install(TARGETS G4zeromq LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
|
||||
@@ -0,0 +1,314 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4RunManager.hh 95232 2016-02-01 14:31:22Z gcosmo $
|
||||
//
|
||||
//
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
#include <zmq.hpp>
|
||||
#include "G4UItcsh.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4UIcommandTree.hh"
|
||||
#include "G4ZMQServer.hh"
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
namespace {
|
||||
|
||||
G4UImanager* ui_manager = nullptr;
|
||||
G4bool qexit = false;
|
||||
std::stringstream cout_stream;
|
||||
std::string black_str = "\033[30m";
|
||||
std::string command_list = "";
|
||||
|
||||
void ThrowException(const std::string& message)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "[ERROR] " << message << std::endl;
|
||||
throw std::runtime_error(ss.str());
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
void GetCommandTree(G4UIcommandTree* ctree)
|
||||
{
|
||||
command_list += (ctree-> GetPathName() + " ");
|
||||
|
||||
auto n_cmd = ctree-> GetCommandEntry();
|
||||
for ( auto icmd = 1; icmd <= n_cmd; icmd++ ) {
|
||||
auto cmd_path = ctree-> GetCommand(icmd)-> GetCommandPath();
|
||||
command_list += (cmd_path + " ");
|
||||
}
|
||||
|
||||
auto n_tree = ctree-> GetTreeEntry();
|
||||
for ( auto itr = 1; itr <= n_tree ; itr++ ) {
|
||||
G4UIcommandTree* atree = ctree-> GetTree(itr);
|
||||
::GetCommandTree(atree);
|
||||
}
|
||||
}
|
||||
|
||||
} // end of namespace
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
G4ZMQServer::G4ZMQServer()
|
||||
{
|
||||
endpoint_ = "tcp://127.0.0.1:5555";
|
||||
qdebug_ = false;
|
||||
shell_= new G4UItcsh();
|
||||
shell_-> SetLsColor(BLUE, RED);
|
||||
|
||||
::ui_manager = G4UImanager::GetUIpointer();
|
||||
::ui_manager-> SetSession(this);
|
||||
::ui_manager-> SetCoutDestination(this);
|
||||
|
||||
::qexit = false;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
G4ZMQServer::~G4ZMQServer()
|
||||
{
|
||||
delete shell_;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
G4UIsession* G4ZMQServer::SessionStart()
|
||||
{
|
||||
zmq::context_t context(1);
|
||||
zmq::socket_t socket( context, ZMQ_REP );
|
||||
socket.bind(endpoint_);
|
||||
|
||||
enum { kBufferSize = 4096 };
|
||||
char buffer[kBufferSize];
|
||||
|
||||
while ( ! ::qexit ) {
|
||||
if ( qdebug_ ) {
|
||||
std::cout << "@@ Waiting..." << std::endl;
|
||||
}
|
||||
|
||||
// waiting command
|
||||
zmq::message_t request;
|
||||
G4bool qok = socket.recv(&request);
|
||||
if ( qok == false ) ::ThrowException("G4ZMQSever: socket recv error");
|
||||
auto end_pos = request.size();
|
||||
if ( end_pos >= kBufferSize ) end_pos = kBufferSize - 1;
|
||||
std::memcpy(buffer, request.data(), end_pos);
|
||||
buffer[end_pos] = '\0';
|
||||
std::string cmd_str = buffer;
|
||||
|
||||
if ( qdebug_ ) {
|
||||
std::cout << "@@ Recv=" << cmd_str << "<<" << std::endl;
|
||||
}
|
||||
|
||||
// store output & send back response
|
||||
::cout_stream.str("");
|
||||
|
||||
if ( cmd_str == "@@ping" ) {
|
||||
G4cout << "pong" << G4endl;
|
||||
|
||||
} else if ( cmd_str == "@@debug") {
|
||||
qdebug_ = true;
|
||||
G4cout << "G4ZMQ debug activated" << G4endl;
|
||||
|
||||
} else if ( cmd_str == "@@nodebug") {
|
||||
qdebug_ = false;
|
||||
G4cout << "G4ZMQ debug deactivated" << G4endl;
|
||||
|
||||
} else if ( cmd_str == "@@get_command_tree" ) {
|
||||
auto cwd_name = GetCurrentWorkingDirectory();
|
||||
auto cwd_tree = FindDirectory(cwd_name.c_str());
|
||||
::command_list = "";
|
||||
::GetCommandTree(cwd_tree);
|
||||
G4cout << ::command_list << std::flush;
|
||||
|
||||
} else if ( cmd_str == "@@get_fullcommand_tree" ) {
|
||||
auto root = ::ui_manager-> GetTree();
|
||||
::command_list = "";
|
||||
::GetCommandTree(root);
|
||||
G4cout << ::command_list << std::flush;
|
||||
|
||||
} else if ( cmd_str == "help" ) {
|
||||
G4cout << "help <command>" << G4endl;
|
||||
|
||||
} else {
|
||||
G4String new_command = GetCommand(cmd_str);
|
||||
if ( qdebug_ ) {
|
||||
std::cout << ::black_str << "@@ Cmd="
|
||||
<< new_command << "<<" << std::endl;
|
||||
}
|
||||
ExecuteCommand(new_command);
|
||||
}
|
||||
|
||||
std::string reply = ::cout_stream.str();
|
||||
size_t cout_size = reply.size();
|
||||
zmq::message_t message(cout_size);
|
||||
std::strncpy((char*)message.data(), reply.c_str(), cout_size);
|
||||
qok = socket.send(message);
|
||||
if ( qok == false ) ::ThrowException("G4ZMQServer: socket send error");
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
void G4ZMQServer::PauseSessionStart(const G4String& msg)
|
||||
{
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
G4int G4ZMQServer::ReceiveG4cout(const G4String& coutString)
|
||||
{
|
||||
if ( qdebug_ ) {
|
||||
std::cout << coutString << std::flush;
|
||||
}
|
||||
|
||||
::cout_stream << coutString << std::flush;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
G4int G4ZMQServer::ReceiveG4cerr(const G4String& cerrString)
|
||||
{
|
||||
if ( qdebug_ ) {
|
||||
std::cerr << cerrString << std::flush;
|
||||
}
|
||||
|
||||
::cout_stream << cerrString << std::flush;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
G4String G4ZMQServer::GetCommand(const G4String& input)
|
||||
{
|
||||
const std::string nullstr = "";
|
||||
G4String cmdstr = input;
|
||||
|
||||
G4String cstr = cmdstr.strip(G4String::leading);
|
||||
if ( cstr.length() == 0 ) {
|
||||
cmdstr = nullstr;
|
||||
|
||||
// define built-in shell commands...
|
||||
} else if ( cstr(0) == '#' ) {
|
||||
G4cout << cstr << G4endl;
|
||||
cmdstr = nullstr;
|
||||
|
||||
} else if ( cstr == "ls" || cstr.substr(0,3) == "ls " ) {
|
||||
ListDirectory(cstr);
|
||||
cmdstr = nullstr;
|
||||
|
||||
} else if ( cstr == "lc" || cstr.substr(0,3) == "lc " ) {
|
||||
shell_-> ListCommand(cstr.remove(0,2));
|
||||
cmdstr = nullstr;
|
||||
|
||||
} else if (cstr == "pwd" ) {
|
||||
G4cout << "Current Command Directory : "
|
||||
<< GetCurrentWorkingDirectory() << G4endl;
|
||||
cmdstr = nullstr;
|
||||
|
||||
} else if ( cstr == "cwd" ) {
|
||||
shell_-> ShowCurrentDirectory();
|
||||
cmdstr = nullstr;
|
||||
|
||||
} else if (cstr == "cd" || cstr.substr(0,3) == "cd " ) {
|
||||
ChangeDirectoryCommand(cstr);
|
||||
shell_-> SetCurrentDirectory(GetCurrentWorkingDirectory());
|
||||
cmdstr = nullstr;
|
||||
|
||||
} else if ( cstr == "help" || cstr.substr(0,5) == "help " ) {
|
||||
TerminalHelp(cstr);
|
||||
cmdstr = nullstr;
|
||||
|
||||
} else if ( cstr(0) == '?' ) {
|
||||
ShowCurrent(cstr);
|
||||
cmdstr = nullstr;
|
||||
|
||||
} else if ( cstr == "history" ) {
|
||||
auto nh= ::ui_manager-> GetNumberOfHistory();
|
||||
for (auto i = 0; i < nh; i++) {
|
||||
G4cout << i << ": " << ::ui_manager->GetPreviousCommand(i) << G4endl;
|
||||
}
|
||||
cmdstr = nullstr;
|
||||
|
||||
} else if ( cstr == "exit" ) {
|
||||
::qexit = true;
|
||||
cmdstr = nullstr;
|
||||
}
|
||||
|
||||
return ModifyToFullPathCommand(cmdstr);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
void G4ZMQServer::ExecuteCommand(const G4String& command)
|
||||
{
|
||||
auto rc = ::ui_manager-> ApplyCommand(command);
|
||||
auto pcode = rc % 100;
|
||||
auto status = rc - pcode;
|
||||
|
||||
G4UIcommand* cmd = nullptr;
|
||||
if( status != fCommandSucceeded ) cmd = FindCommand(command);
|
||||
|
||||
switch ( status ) {
|
||||
case fCommandSucceeded:
|
||||
break;
|
||||
case fCommandNotFound:
|
||||
G4cerr << "command <" << ::ui_manager-> SolveAlias(command)
|
||||
<< "> not found" << G4endl;
|
||||
break;
|
||||
case fIllegalApplicationState:
|
||||
G4cerr << "illegal application state -- command refused" << G4endl;
|
||||
break;
|
||||
case fParameterOutOfRange:
|
||||
G4cerr << "Parameter is out of range" << G4endl;
|
||||
break;
|
||||
case fParameterOutOfCandidates:
|
||||
G4cerr << "Parameter is out of candidate list (index "
|
||||
<< pcode << ")" << G4endl;
|
||||
G4cerr << "Candidates : "
|
||||
<< cmd-> GetParameter(pcode)-> GetParameterCandidates()
|
||||
<< G4endl;
|
||||
break;
|
||||
case fParameterUnreadable:
|
||||
G4cerr << "Parameter is wrong type and/or is not omittable (index "
|
||||
<< pcode << ")" << G4endl;
|
||||
break;
|
||||
case fAliasNotFound:
|
||||
break;
|
||||
default:
|
||||
G4cerr << "command refused (" << status << ")" << G4endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
G4bool G4ZMQServer::GetHelpChoice(G4int&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
void G4ZMQServer::ExitHelp() const
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4RunManager.hh 95232 2016-02-01 14:31:22Z gcosmo $
|
||||
//
|
||||
//
|
||||
#ifndef G4ZMQ_SERVER_H_
|
||||
#define G4ZMQ_SERVER_H_
|
||||
|
||||
#include "G4VBasicShell.hh"
|
||||
|
||||
class G4UItcsh;
|
||||
|
||||
class G4ZMQServer : public G4VBasicShell {
|
||||
public:
|
||||
G4ZMQServer();
|
||||
~G4ZMQServer();
|
||||
|
||||
void SetEndpoint(const G4String& endpoint);
|
||||
G4String GetEndpoint() const;
|
||||
|
||||
void SetDebug(G4bool flag);
|
||||
|
||||
virtual G4UIsession* SessionStart();
|
||||
virtual void PauseSessionStart(const G4String& message);
|
||||
|
||||
virtual G4int ReceiveG4cout(const G4String& coutString);
|
||||
virtual G4int ReceiveG4cerr(const G4String& cerrString);
|
||||
|
||||
private:
|
||||
G4bool qdebug_;
|
||||
G4String endpoint_;
|
||||
G4UItcsh* shell_;
|
||||
|
||||
G4String GetCommand(const G4String& input);
|
||||
|
||||
virtual void ExecuteCommand(const G4String& command);
|
||||
virtual G4bool GetHelpChoice(G4int& );
|
||||
virtual void ExitHelp() const;
|
||||
|
||||
};
|
||||
|
||||
// ==========================================================================
|
||||
inline void G4ZMQServer::SetEndpoint(const G4String& endpoint)
|
||||
{
|
||||
endpoint_ = endpoint;
|
||||
}
|
||||
|
||||
inline G4String G4ZMQServer::GetEndpoint() const
|
||||
{
|
||||
return endpoint_;
|
||||
}
|
||||
|
||||
inline void G4ZMQServer::SetDebug(G4bool flag)
|
||||
{
|
||||
qdebug_ = flag;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -152,7 +152,7 @@ FULL_PATH_NAMES = YES
|
||||
# will be relative from the directory where doxygen is started.
|
||||
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
|
||||
|
||||
STRIP_FROM_PATH = /work/packages/geant4/geant4.10.1/examples/
|
||||
STRIP_FROM_PATH = /Users/ivana/work/packages/geant4/geant4-10-04-cand-01/examples/
|
||||
|
||||
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
|
||||
# path mentioned in the documentation of a class, which tells the reader which
|
||||
@@ -776,6 +776,7 @@ INPUT = Doxymain.h \
|
||||
Doxymodules_parallel.h \
|
||||
Doxymodules_parameterisations.h \
|
||||
Doxymodules_persistency.h \
|
||||
Doxymodules_physicslists.h \
|
||||
Doxymodules_polarisation.h \
|
||||
Doxymodules_radioactivedecay.h \
|
||||
Doxymodules_runAndEvent.h \
|
||||
@@ -846,7 +847,6 @@ INPUT = Doxymain.h \
|
||||
../extended/hadronic/Hadr02/.README.txt \
|
||||
../extended/hadronic/Hadr03/.README.txt \
|
||||
../extended/hadronic/Hadr04/.README.txt \
|
||||
../extended/hadronic/Hadr05/.README.txt \
|
||||
../extended/hadronic/Hadr06/.README.txt \
|
||||
../extended/hadronic/Hadr07/.README.txt \
|
||||
../extended/hadronic/FissionFragment \
|
||||
@@ -866,8 +866,10 @@ INPUT = Doxymain.h \
|
||||
../extended/medical/dna/clustering/.README.txt \
|
||||
../extended/medical/dna/dnaphysics/.README.txt \
|
||||
../extended/medical/dna/icsd/.README.txt \
|
||||
../extended/medical/dna/mfp/.README.txt \
|
||||
../extended/medical/dna/microdosimetry/.README.txt \
|
||||
../extended/medical/dna/microyz/.README.txt \
|
||||
../extended/medical/dna/neuron/.README.txt \
|
||||
../extended/medical/dna/pdb4dna/.README.txt \
|
||||
../extended/medical/dna/range/.README.txt \
|
||||
../extended/medical/dna/slowing/.README.txt \
|
||||
@@ -890,6 +892,10 @@ INPUT = Doxymain.h \
|
||||
../extended/parallel/TopC/ParN04/.README.N04.txt \
|
||||
../extended/parameterisations \
|
||||
../extended/persistency \
|
||||
../extended/physicslists/.README.txt \
|
||||
../extended/physicslists/factory/.README.txt \
|
||||
../extended/physicslists/extensibleFactory/.README.txt \
|
||||
../extended/physicslists/genericPL/.README.txt \
|
||||
../extended/polarisation/.README.txt \
|
||||
../extended/polarisation/Pol01/.README.txt \
|
||||
../extended/radioactivedecay/.README.txt \
|
||||
|
||||
@@ -152,7 +152,7 @@ FULL_PATH_NAMES = YES
|
||||
# will be relative from the directory where doxygen is started.
|
||||
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
|
||||
|
||||
STRIP_FROM_PATH = /work/packages/geant4/geant4.10.1/examples/
|
||||
STRIP_FROM_PATH = /Users/ivana/work/packages/geant4/geant4-10-04-cand-01/examples/
|
||||
|
||||
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
|
||||
# path mentioned in the documentation of a class, which tells the reader which
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: Doxymodules_hadronic.h 101330 2016-11-14 15:38:27Z gcosmo $
|
||||
// $Id: Doxymodules_hadronic.h 107787 2017-11-30 13:11:33Z gcosmo $
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_hadronic.h
|
||||
@@ -55,15 +55,6 @@
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_hadronic_Hadr05 Hadr05
|
||||
* The Hadr05 hadronic classes have their
|
||||
* <a href="../html_Hadr05/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_hadronic
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_hadronic_Hadr06 Hadr06
|
||||
* The Hadr06 hadronic classes have their
|
||||
* <a href="../html_Hadr06/html/index.html">standalone documentation </a>
|
||||
@@ -71,6 +62,8 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_hadronic_Hadr07 Hadr07
|
||||
* The Hadr07 hadronic classes have their
|
||||
* <a href="../html_Hadr05/html/index.html">standalone documentation </a>
|
||||
@@ -78,6 +71,8 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_hadronic_FissionFragment FissionFragment
|
||||
* Hadronic example FissionFragment
|
||||
* @ingroup extended_hadronic
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// $Id: Doxymodules_medical.h 104750 2017-06-15 08:47:26Z gcosmo $
|
||||
// $Id: Doxymodules_medical.h 107787 2017-11-30 13:11:33Z gcosmo $
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_medical.h
|
||||
@@ -175,6 +175,15 @@
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_mfp mfp
|
||||
* Medical dna mfp example has its
|
||||
* <a href="../html_mfp/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_microdosimetry microdosimetry
|
||||
* Medical dna microdosimetry example has its
|
||||
* <a href="../html_microdosimetry/html/index.html">standalone documentation </a>
|
||||
@@ -193,6 +202,15 @@
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_neuron neuron
|
||||
* Medical dna neuron example has its
|
||||
* <a href="../html_neuron/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_medical_dna
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_medical_dna_pdb4dna pdb4dna
|
||||
* Medical dna pdb4dna example has its
|
||||
* <a href="../html_pdb4dna/html/index.html">standalone documentation </a>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
// $Id: Doxymodules_physicslists.h 107673 2017-11-28 15:28:12Z gcosmo $
|
||||
// The example class categories definitions for Doxygen
|
||||
|
||||
/// \file Doxymodules_physicslists.h
|
||||
/// \brief The page that defines the extended/physicslists examples modules
|
||||
|
||||
|
||||
/** @defgroup extended_physicslists physicslists
|
||||
* Extended examples physicslists classes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup extended_physicslists_factory factory
|
||||
* Exotic physics example factory has its
|
||||
* <a href="../html_factory/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_physicslists
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_physicslists_extensibleFactory extensibleFactory
|
||||
* physicslists extensibleFactory example has its
|
||||
* <a href="../html_extensibleFactory/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_physicslists
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @defgroup extended_physicslists_genericPL genericPL
|
||||
* physicslists genericPL example has its
|
||||
* <a href="../html_genericPL/html/index.html">standalone documentation </a>
|
||||
* @ingroup extended_physicslists
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
@@ -18,6 +18,15 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
30/11/17 I.Hrivnacova (doxygen-V10-03-02)
|
||||
- Fixing documentation for 10.4:
|
||||
- Added still missing new dna examples (mft, neuron)
|
||||
- Removed Hadr05
|
||||
|
||||
28/11/17 I.Hrivnacova (doxygen-V10-03-01)
|
||||
- Added new physicslists category
|
||||
- Fixed warning in Doxymodules_hadronic.h
|
||||
|
||||
13/06/17 I.Hrivnacova (doxygen-V10-03-00)
|
||||
- Added new extended examples exoticphysics/dmparticle,
|
||||
medical/dna/icsd, slowing, spower and radioactivedecay/Activation
|
||||
|
||||
@@ -45,12 +45,12 @@ generate() {
|
||||
}
|
||||
|
||||
# process examples in second level directory in extended
|
||||
for DIR in analysis/shared analysis/AnaEx01 analysis/AnaEx02 analysis/AnaEx03 electromagnetic/TestEm0 electromagnetic/TestEm1 electromagnetic/TestEm2 electromagnetic/TestEm3 electromagnetic/TestEm4 electromagnetic/TestEm5 electromagnetic/TestEm6 electromagnetic/TestEm7 electromagnetic/TestEm8 electromagnetic/TestEm9 electromagnetic/TestEm10 electromagnetic/TestEm11 electromagnetic/TestEm12 electromagnetic/TestEm13 electromagnetic/TestEm14 electromagnetic/TestEm15 electromagnetic/TestEm16 electromagnetic/TestEm17 electromagnetic/TestEm18 eventgenerator/particleGun eventgenerator/exgps eventgenerator/userPrimaryGenerator exoticphysics/channeling exoticphysics/dmparticle exoticphysics/monopole geometry/transforms hadronic/Hadr00 hadronic/Hadr01 hadronic/Hadr02 hadronic/Hadr03 hadronic/Hadr04 hadronic/Hadr05 hadronic/Hadr06 hadronic/Hadr07 hadronic/NeutronSource medical/electronScattering medical/electronScattering2 medical/fanoCavity medical/fanoCavity2 medical/GammaTherapy polarisation/Pol01 radioactivedecay/Activation radioactivedecay/rdecay01 radioactivedecay/rdecay02; do
|
||||
for DIR in analysis/shared analysis/AnaEx01 analysis/AnaEx02 analysis/AnaEx03 electromagnetic/TestEm0 electromagnetic/TestEm1 electromagnetic/TestEm2 electromagnetic/TestEm3 electromagnetic/TestEm4 electromagnetic/TestEm5 electromagnetic/TestEm6 electromagnetic/TestEm7 electromagnetic/TestEm8 electromagnetic/TestEm9 electromagnetic/TestEm10 electromagnetic/TestEm11 electromagnetic/TestEm12 electromagnetic/TestEm13 electromagnetic/TestEm14 electromagnetic/TestEm15 electromagnetic/TestEm16 electromagnetic/TestEm17 electromagnetic/TestEm18 eventgenerator/particleGun eventgenerator/exgps eventgenerator/userPrimaryGenerator exoticphysics/channeling exoticphysics/dmparticle exoticphysics/monopole geometry/transforms hadronic/Hadr00 hadronic/Hadr01 hadronic/Hadr02 hadronic/Hadr03 hadronic/Hadr04 hadronic/Hadr06 hadronic/Hadr07 hadronic/NeutronSource medical/electronScattering medical/electronScattering2 medical/fanoCavity medical/fanoCavity2 medical/GammaTherapy physicslists/extensibleFactory physicslists/factory physicslists/genericPL polarisation/Pol01 radioactivedecay/Activation radioactivedecay/rdecay01 radioactivedecay/rdecay02; do
|
||||
generate ${DIR} ${BACK_PATH2}
|
||||
done
|
||||
|
||||
# process examples in third level directory in extended
|
||||
for DIR in eventgenerator/HepMC/MCTruth parallel/TopC/ParN02 parallel/TopC/ParN04 medical/dna/chem1 medical/dna/chem2 medical/dna/chem3 medical/dna/chem4 medical/dna/clustering medical/dna/dnaphysics medical/dna/microdosimetry medical/dna/microyz medical/dna/pdb4dna medical/dna/range medical/dna/svalue medical/dna/wholeNuclearDNA medical/dna/wvalue; do
|
||||
for DIR in eventgenerator/HepMC/MCTruth parallel/TopC/ParN02 parallel/TopC/ParN04 medical/dna/chem1 medical/dna/chem2 medical/dna/chem3 medical/dna/chem4 medical/dna/clustering medical/dna/dnaphysics medical/dna/icsd medical/dna/mfp medical/dna/microdosimetry medical/dna/microyz medical/dna/neuron medical/dna/pdb4dna medical/dna/range medical/dna/slowing medical/dna/spower medical/dna/svalue medical/dna/wholeNuclearDNA medical/dna/wvalue; do
|
||||
generate ${DIR} ${BACK_PATH3}
|
||||
done
|
||||
|
||||
|
||||
@@ -17,6 +17,53 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
8th December 2017 Gabriele Cosmo (examples-V10-04-00)
|
||||
- Updated reference outputs according to reference tag geant4-10-04-ref-00.
|
||||
- Includes tags: brachy-V10-03-01, exdna-V10-03-02, ChargeExchangeMC-V10-03-08,
|
||||
eRosita-V10-03-02, iort_therapy-V10-03-01, AnaEx02-V10-03-01,
|
||||
medical_linac-V10-03-02, ReverseMC01-V10-03-01, MPI-V10-03-02,
|
||||
testem0-V10-03-01, testem5-V10-03-08, testem7-V10-03-01,
|
||||
testem17-V10-03-00, monopole-V10-03-04, exHadronic-V10-03-00,
|
||||
phononExample-V10-03-08, DICOM-V10-03-12, chem3-V10-03-00,
|
||||
gtherapy-V10-03-08, expar01-V10-03-00, exampleP01-V10-03-01,
|
||||
exampleP02-V10-03-01, extFactory-V10-03-00, factory-V10-03-01,
|
||||
genericPL-V10-03-01, activation-V10-03-05, rdecay01-V10-03-13,
|
||||
doxygen-V10-03-02.
|
||||
|
||||
31st October 2017 Gabriele Cosmo (examples-V10-03-10)
|
||||
- Updated reference outputs according to reference tag geant4-10-03-ref-10.
|
||||
- Includes tags: ChargeExchangeMC-V10-03-06, hadrontherapy-V10-03-11,
|
||||
iort_therapy-V10-03-00, microbeam-V10-03-04, fano-V10-03-02,
|
||||
ReverseMC01-V10-03-00, excommon-V10-03-01, testem8-V10-03-01,
|
||||
testem18-V10-03-06, p6decayer-V10-03-01, monopole-V10-03-01,
|
||||
phononExample-V10-03-06, g3tog4Tests-V10-03-03,
|
||||
dnaphysics-V10-03-14, microdosimetry-V10-03-06,
|
||||
gtherapy-V10-03-07, factory-V10-03-00, genericPL-V10-03-00,
|
||||
physicslistsShared-V10-03-00, activation-V10-03-04,
|
||||
rdecay01-V10-03-12.
|
||||
|
||||
28th September 2017 Gabriele Cosmo (examples-V10-03-09)
|
||||
- Updated reference outputs according to reference tag geant4-10-03-ref-09.
|
||||
- Includes tags: ExUCN-V10-03-01, exhadr00-V10-03-00, DICOM-V10-03-03,
|
||||
range-V10-03-03, svalue-V10-03-03, wvalue-V10-03-03
|
||||
MPI-V10-03-01.
|
||||
|
||||
31st August 2017 Gabriele Cosmo (examples-V10-03-08)
|
||||
- Updated reference outputs according to reference tag geant4-10-03-ref-08.
|
||||
- Includes tags: microbeam-V10-03-03, AnaEx01-V10-03-00, AnaEx02-V10-03-00,
|
||||
AnaEx03-V10-03-00, testem5-V10-03-06, testem8-V10-03-00,
|
||||
testem14-V10-03-01, testem18-V10-03-05, exhadr03-V10-03-04,
|
||||
channelingExample-V10-03-03, microdosimetry-V10-03-04,
|
||||
clustering-V10-03-00, dnaphysics-V10-03-11, mfp-V10-03-00,
|
||||
neuron-V10-03-02, range-V10-03-02, slowing-V10-03-02,
|
||||
svalue-V10-03-02, wvalue-V10-03-02, OpNovice-V10-03-02,
|
||||
ThreadsafeScorers-V10-03-02, rdecay01-V10-03-11.
|
||||
|
||||
27th July 2017 Gabriele Cosmo (examples-V10-03-07)
|
||||
- Updated reference outputs according to reference tag geant4-10-03-ref-07.
|
||||
- Includes tags: testem18-V10-03-03, microyz-V10-03-01, range-V10-03-01,
|
||||
rdecay01-V10-03-09, rdecay02-V10-03-01.
|
||||
|
||||
30th June 2017 Gabriele Cosmo (examples-V10-03-06)
|
||||
- Updated reference outputs according to reference tag geant4-10-03-ref-06.
|
||||
- Includes tags: doxygen-V10-03-00, hadrontherapy-V10-03-10, testem0-V10-03-00,
|
||||
|
||||
@@ -4,16 +4,7 @@ include(CMakeDependentOption)
|
||||
set(name ChargeExchangeMC)
|
||||
project(${name})
|
||||
|
||||
|
||||
find_package(Geant4 REQUIRED)
|
||||
|
||||
# the project requires Geant4 GDML support!
|
||||
find_package(gdml QUIET)
|
||||
if(NOT gdml_FOUND)
|
||||
message(STATUS "G4 Examples: GDML package not found. --> ChargeExchangeMC example disabled"
|
||||
)
|
||||
return()
|
||||
endif()
|
||||
find_package(Geant4 REQUIRED gdml)
|
||||
|
||||
# if CEXMC_USE_TCSH is 'yes' then tcsh session support will be built
|
||||
option(CEXMC_USE_TCSH
|
||||
@@ -48,7 +39,7 @@ set(EXTRA_LIBRARIES )
|
||||
# written; requires boost::serialize headers and library
|
||||
option(CEXMC_USE_PERSISTENCY
|
||||
"Build ${name} with data persistency support
|
||||
(requires Boost Serialization library)" ON)
|
||||
(requires Boost Serialization library)" OFF)
|
||||
if(CEXMC_USE_PERSISTENCY)
|
||||
find_package(Boost COMPONENTS serialization)
|
||||
if(Boost_SERIALIZATION_FOUND)
|
||||
@@ -121,7 +112,7 @@ if(CEXMC_USE_HISTOGRAMING)
|
||||
find_package(ROOT QUIET)
|
||||
if(ROOT_FOUND)
|
||||
add_definitions(-DCEXMC_USE_ROOT)
|
||||
include_directories(${ROOT_INCLUDE_DIR})
|
||||
include_directories(${ROOT_INCLUDE_DIRS})
|
||||
list(APPEND EXTRA_LIBRARIES ${ROOT_LIBRARIES})
|
||||
message(STATUS
|
||||
"Libraries ${ROOT_LIBRARIES} were added to the linkage list")
|
||||
@@ -143,8 +134,8 @@ if(CEXMC_USE_ROOTQT AND ROOT_FOUND)
|
||||
NO_DEFAULT_PATH)
|
||||
if(ROOTQT_LIBRARY)
|
||||
add_definitions(-DCEXMC_USE_ROOTQT)
|
||||
list(APPEND EXTRA_LIBRARIES -lGQt)
|
||||
message(STATUS "Library -lGQt was added to the linkage list")
|
||||
list(APPEND EXTRA_LIBRARIES ${ROOTQT_LIBRARY})
|
||||
message(STATUS "ROOT Qt library was added to the linkage list")
|
||||
else()
|
||||
message(WARNING
|
||||
"Could not find ROOT Qt library, skip GUI histograming support")
|
||||
@@ -162,7 +153,7 @@ if(CEXMC_USE_GENBOD)
|
||||
if(CERNLIB_CONFIG_EXE)
|
||||
execute_process(
|
||||
COMMAND ${CERNLIB_CONFIG_EXE} geant321 phtools packlib kernlib
|
||||
OUTPUT_VARIABLE CERNLIB_LIBRARIES
|
||||
OUTPUT_VARIABLE CERNLIB_LIBRARIES
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
add_definitions(-DCEXMC_USE_GENBOD)
|
||||
list(APPEND EXTRA_LIBRARIES ${CERNLIB_LIBRARIES})
|
||||
@@ -174,9 +165,6 @@ if(CEXMC_USE_GENBOD)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# all classes in this project have same member names as their formal constructor
|
||||
# parameters, so -Wno-shadow option is mandatory to prevent multiple warnings!
|
||||
add_definitions(-Wno-shadow)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${Geant4_INCLUDE_DIR})
|
||||
file(GLOB sources ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc)
|
||||
@@ -184,5 +172,25 @@ file(GLOB sources ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc)
|
||||
add_executable(${name} ${name}.cc ${sources})
|
||||
target_link_libraries(${name} ${Geant4_LIBRARIES} ${EXTRA_LIBRARIES})
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Copy all scripts to the build directory, i.e. the directory in which we
|
||||
# build ChargeExchangeMC. This is so that we can run the executable
|
||||
# directly because it relies on these scripts being in the current working
|
||||
# directory.
|
||||
|
||||
set(chargeexchangemc_SCRIPTS
|
||||
batch.mac replay.mac init.mac preinit.mac lht.gdml)
|
||||
|
||||
foreach(_script ${chargeexchangemc_SCRIPTS})
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/${_script}
|
||||
${PROJECT_BINARY_DIR}/${_script}
|
||||
COPYONLY
|
||||
)
|
||||
endforeach()
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
|
||||
#
|
||||
install(TARGETS ${name} DESTINATION bin)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,38 @@ cirrone@lns.infn.it
|
||||
History file of the ChargeExchangeMC application
|
||||
====================================================
|
||||
|
||||
29.11.2017 - B.Morgan, Tag ChargeExchangeMC-V10-03-08
|
||||
Use full path to ROOT Qt library, if found
|
||||
|
||||
28.11.2017 - B.Morgan, Tag ChargeExchangeMC-V10-03-07
|
||||
Replace ROOT_INCLUDE_DIR with ROOT_INCLUDE_DIRS
|
||||
|
||||
31.10.2017 - L. Pandola, Tag ChargeExchangeMC-V10-03-06
|
||||
Clean up preinit.mac, to avoid a cerr when
|
||||
ROOT is not available
|
||||
|
||||
26.10.2017 - L. Pandola, Tag ChargeExchangeMC-V10-03-05
|
||||
Edit CMakeLists.txt such to copy mac/gmdl in the
|
||||
build directory
|
||||
|
||||
25.10.2017 - L. Pandola, Tag ChargeExchangeMC-V10-03-04
|
||||
Fix residual shadowing on gcc 4.9
|
||||
|
||||
23.10.2017 - A. Radkov, Tag ChargeExchangeMC-V10-03-03
|
||||
Fix shadowed variabiles (and removed flag from
|
||||
CMakeLists.txt)
|
||||
|
||||
12.10.2017 - L. Pandola, Tag ChargeExchangeMC-V10-03-02
|
||||
Fix residual compiler warning on clang
|
||||
|
||||
11.10.2017 - L. Pandola, Tag ChargeExchangeMC-V10-03-01
|
||||
Fix compiler warnings in clang
|
||||
|
||||
10.10.2017 - L. Pandola, Tag ChargeExchangeMC-V10-03-00
|
||||
Fix CMakeLists.txt to allow for STT integration
|
||||
Fix compilation error in CexmcHistoManager.hh (when
|
||||
CEXMC_USE_ROOTQT is not defined)
|
||||
|
||||
02.11.2016 - L. Garnier, Tag ChargeExchangeMC-V10-02-00
|
||||
Remove icons.mac. Automatically include since interfaces-V10-02-07
|
||||
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
/control/verbose 1
|
||||
/run/verbose 1
|
||||
/event/verbose 0
|
||||
#/hits/verbose 0
|
||||
|
||||
# here we define branching ratios of decay modes of eta meson
|
||||
# 0 - gamma gamma (original 0.3942)
|
||||
# 1 - pi0 pi0 pi0 (original 0.3256)
|
||||
# 2 - pi0 pi+ pi- (original 0.226)
|
||||
# 3 - gamma pi+ pi- (original 0.0468)
|
||||
/particle/select eta
|
||||
/particle/property/decay/select 0
|
||||
/particle/property/decay/br 1
|
||||
/particle/property/decay/select 1
|
||||
/particle/property/decay/br 0
|
||||
/particle/property/decay/select 2
|
||||
/particle/property/decay/br 0
|
||||
/particle/property/decay/select 3
|
||||
/particle/property/decay/br 0
|
||||
/particle/property/decay/dump
|
||||
|
||||
#/run/setCutForRegion Calorimeter 1 mm
|
||||
|
||||
#/cexmc/detector/Monitor/ED/verbose 1
|
||||
#/cexmc/detector/VetoCounter/ED/verbose 1
|
||||
#/cexmc/detector/Calorimeter/ED/verbose 1
|
||||
#/cexmc/detector/Target/TP/verbose 1
|
||||
#/cexmc/detector/Monitor/TP/verbose 1
|
||||
#/cexmc/detector/VetoCounter/TP/verbose 1
|
||||
#/cexmc/detector/Calorimeter/TP/verbose 1
|
||||
|
||||
/cexmc/detector/calorimeterTriggerAlgorithm inner
|
||||
|
||||
/cexmc/detector/Monitor/ED/threshold 125 keV
|
||||
/cexmc/detector/VetoCounter/ED/threshold 250 keV
|
||||
/cexmc/detector/Calorimeter/ED/threshold 40 MeV
|
||||
|
||||
/cexmc/detector/outerCrystalsVetoAlgorithm none
|
||||
/cexmc/detector/outerCrystalsVetoFraction 0.5
|
||||
|
||||
/cexmc/detector/applyFiniteCrystalResolution true
|
||||
/cexmc/detector/addCrystalResolutionRange 0. 0.04 0.48
|
||||
/cexmc/detector/addCrystalResolutionRange 0.04 0.06 0.27
|
||||
/cexmc/detector/addCrystalResolutionRange 0.06 0.10 0.22
|
||||
/cexmc/detector/addCrystalResolutionRange 0.10 0.20 0.18
|
||||
/cexmc/detector/addCrystalResolutionRange 0.20 2.00 0.15
|
||||
|
||||
/cexmc/gun/particle pi-
|
||||
/cexmc/gun/position 0 0 -36 cm
|
||||
/cexmc/gun/direction 0 0 1
|
||||
/cexmc/gun/momentumAmp 732.1 MeV
|
||||
/cexmc/gun/fwhmPosX 3.0 cm
|
||||
/cexmc/gun/fwhmPosY 3.5 cm
|
||||
/cexmc/gun/fwhmDirX 1.12 deg
|
||||
/cexmc/gun/fwhmDirY 1.35 deg
|
||||
/cexmc/gun/fwhmMomentumAmp 0.015
|
||||
|
||||
/cexmc/physics/setMaxILCorrection 0
|
||||
/cexmc/physics/applyFermiMotionInTarget false
|
||||
#/cexmc/physics/setAngularRange 0.1 -0.1 2
|
||||
#/cexmc/physics/addAngularRange 1.0 0.0 10
|
||||
#/cexmc/physics/addAngularRange -0.5 -0.8 2
|
||||
/cexmc/physics/setAngularRange 1.0 -1.0 10
|
||||
|
||||
/cexmc/reconstructor/momentumAmpDiff -2.1 MeV
|
||||
|
||||
/cexmc/reconstructor/edCollectionAlgo all
|
||||
/cexmc/reconstructor/useInnerRefCrystal true
|
||||
/cexmc/reconstructor/entryPointDefinitionAlgo sqrt
|
||||
/cexmc/reconstructor/crystalSelectionAlgo all
|
||||
/cexmc/reconstructor/entryPointDepthDefinitionAlgo plain
|
||||
/cexmc/reconstructor/entryPointDepth 0 cm
|
||||
/cexmc/reconstructor/useTableMass false
|
||||
|
||||
/cexmc/reconstructor/useMassCut false
|
||||
/cexmc/reconstructor/mCutOPCenter 530 MeV
|
||||
/cexmc/reconstructor/mCutNOPCenter 970 MeV
|
||||
/cexmc/reconstructor/mCutOPWidth 10 MeV
|
||||
/cexmc/reconstructor/mCutNOPWidth 30 MeV
|
||||
/cexmc/reconstructor/mCutAngle 45 deg
|
||||
|
||||
/cexmc/reconstructor/useAbsorbedEnergyCut false
|
||||
/cexmc/reconstructor/aeCutCLCenter 310 MeV
|
||||
/cexmc/reconstructor/aeCutCRCenter 310 MeV
|
||||
/cexmc/reconstructor/aeCutCLWidth 100 MeV
|
||||
/cexmc/reconstructor/aeCutCRWidth 180 MeV
|
||||
/cexmc/reconstructor/aeCutAngle 45 deg
|
||||
|
||||
/cexmc/run/eventCountPolicy trigger
|
||||
/cexmc/run/eventDataVerboseLevel trigger
|
||||
/cexmc/event/verbose 2
|
||||
/cexmc/vis/verbose 2
|
||||
|
||||
/run/beamOn 10
|
||||
@@ -78,9 +78,9 @@ namespace CexmcAST
|
||||
|
||||
struct Operator
|
||||
{
|
||||
Operator( OperatorType type = Uninitialized, int priority = 0,
|
||||
bool hasRLAssoc = false ) :
|
||||
type( type ), priority( priority ), hasRLAssoc( hasRLAssoc )
|
||||
Operator( OperatorType type_ = Uninitialized, int priority_ = 0,
|
||||
bool hasRLAssoc_ = false ) :
|
||||
type( type_ ), priority( priority_ ), hasRLAssoc( hasRLAssoc_ )
|
||||
{}
|
||||
|
||||
OperatorType type;
|
||||
|
||||
@@ -54,8 +54,8 @@ struct CexmcAngularRange
|
||||
CexmcAngularRange()
|
||||
{}
|
||||
|
||||
CexmcAngularRange( G4double top, G4double bottom, G4int index ) :
|
||||
top( top ), bottom( bottom ), index( index )
|
||||
CexmcAngularRange( G4double top_, G4double bottom_, G4int index_ ) :
|
||||
top( top_ ), bottom( bottom_ ), index( index_ )
|
||||
{}
|
||||
|
||||
G4double top;
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#include "CexmcCommon.hh"
|
||||
|
||||
class CexmcChargeExchangeReconstructorMessenger;
|
||||
class CexmcEnergyDepositStore;
|
||||
struct CexmcEnergyDepositStore;
|
||||
class CexmcProductionModel;
|
||||
class CexmcParticleGun;
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace CexmcCustomFilter
|
||||
using namespace boost::spirit::ascii;
|
||||
using namespace boost::phoenix;
|
||||
using namespace CexmcAST;
|
||||
using boost::spirit::qi::rule;
|
||||
using boost::spirit::ascii::space;
|
||||
using boost::spirit::ascii::space_type;
|
||||
using boost::spirit::ascii::alpha;
|
||||
|
||||
@@ -51,29 +51,29 @@
|
||||
|
||||
struct CexmcEnergyDepositStore
|
||||
{
|
||||
CexmcEnergyDepositStore( G4double monitorED,
|
||||
G4double vetoCounterEDLeft,
|
||||
G4double vetoCounterEDRight,
|
||||
G4double calorimeterEDLeft,
|
||||
G4double calorimeterEDRight,
|
||||
G4int calorimeterEDLeftMaxX,
|
||||
G4int calorimeterEDLeftMaxY,
|
||||
G4int calorimeterEDRightMaxX,
|
||||
G4int calorimeterEDRightMaxY,
|
||||
CexmcEnergyDepositStore( G4double monitorED_,
|
||||
G4double vetoCounterEDLeft_,
|
||||
G4double vetoCounterEDRight_,
|
||||
G4double calorimeterEDLeft_,
|
||||
G4double calorimeterEDRight_,
|
||||
G4int calorimeterEDLeftMaxX_,
|
||||
G4int calorimeterEDLeftMaxY_,
|
||||
G4int calorimeterEDRightMaxX_,
|
||||
G4int calorimeterEDRightMaxY_,
|
||||
const CexmcEnergyDepositCalorimeterCollection &
|
||||
calorimeterEDLeftCollection,
|
||||
calorimeterEDLeftCollection_,
|
||||
const CexmcEnergyDepositCalorimeterCollection &
|
||||
calorimeterEDRightCollection ) :
|
||||
monitorED( monitorED ), vetoCounterEDLeft( vetoCounterEDLeft ),
|
||||
vetoCounterEDRight( vetoCounterEDRight ),
|
||||
calorimeterEDLeft( calorimeterEDLeft ),
|
||||
calorimeterEDRight( calorimeterEDRight ),
|
||||
calorimeterEDLeftMaxX( calorimeterEDLeftMaxX ),
|
||||
calorimeterEDLeftMaxY( calorimeterEDLeftMaxY ),
|
||||
calorimeterEDRightMaxX( calorimeterEDRightMaxX ),
|
||||
calorimeterEDRightMaxY( calorimeterEDRightMaxY ),
|
||||
calorimeterEDLeftCollection( calorimeterEDLeftCollection ),
|
||||
calorimeterEDRightCollection( calorimeterEDRightCollection )
|
||||
calorimeterEDRightCollection_ ) :
|
||||
monitorED( monitorED_ ), vetoCounterEDLeft( vetoCounterEDLeft_ ),
|
||||
vetoCounterEDRight( vetoCounterEDRight_ ),
|
||||
calorimeterEDLeft( calorimeterEDLeft_ ),
|
||||
calorimeterEDRight( calorimeterEDRight_ ),
|
||||
calorimeterEDLeftMaxX( calorimeterEDLeftMaxX_ ),
|
||||
calorimeterEDLeftMaxY( calorimeterEDLeftMaxY_ ),
|
||||
calorimeterEDRightMaxX( calorimeterEDRightMaxX_ ),
|
||||
calorimeterEDRightMaxY( calorimeterEDRightMaxY_ ),
|
||||
calorimeterEDLeftCollection( calorimeterEDLeftCollection_ ),
|
||||
calorimeterEDRightCollection( calorimeterEDRightCollection_ )
|
||||
{}
|
||||
|
||||
void * operator new( size_t size );
|
||||
|
||||
@@ -50,11 +50,11 @@
|
||||
class G4Event;
|
||||
class CexmcPhysicsManager;
|
||||
class CexmcEnergyDepositDigitizer;
|
||||
class CexmcEnergyDepositStore;
|
||||
struct CexmcEnergyDepositStore;
|
||||
class CexmcTrackPointsDigitizer;
|
||||
class CexmcTrackPointsStore;
|
||||
struct CexmcTrackPointsStore;
|
||||
class CexmcEventActionMessenger;
|
||||
class CexmcProductionModelData;
|
||||
struct CexmcProductionModelData;
|
||||
class CexmcChargeExchangeReconstructor;
|
||||
|
||||
|
||||
@@ -150,7 +150,9 @@ class CexmcEventAction : public G4UserEventAction
|
||||
|
||||
CexmcChargeExchangeReconstructor * reconstructor;
|
||||
|
||||
G4double opKinEnergy;
|
||||
#ifdef CEXMC_USE_ROOT
|
||||
G4double opKinEnergy;
|
||||
#endif
|
||||
|
||||
private:
|
||||
G4int verbose;
|
||||
|
||||
@@ -63,8 +63,8 @@ class CexmcHadronicPhysics : public CexmcStudiedPhysics< CexmcHadronicProcess >
|
||||
|
||||
template < typename ProductionModel >
|
||||
CexmcHadronicPhysics< ProductionModel >::CexmcHadronicPhysics(
|
||||
CexmcPhysicsManager * physicsManager ) :
|
||||
CexmcStudiedPhysics< CexmcHadronicProcess >( physicsManager )
|
||||
CexmcPhysicsManager * physicsManager_ ) :
|
||||
CexmcStudiedPhysics< CexmcHadronicProcess >( physicsManager_ )
|
||||
{
|
||||
productionModel = new ProductionModel;
|
||||
}
|
||||
|
||||
@@ -128,9 +128,9 @@ class CexmcHistoManager
|
||||
CexmcHistoAxisData() : nBins( 0 ), nBinsMin( 0 ), nBinsMax( 0 )
|
||||
{}
|
||||
|
||||
CexmcHistoAxisData( Int_t nBins, Double_t nBinsMin,
|
||||
Double_t nBinsMax ) :
|
||||
nBins( nBins ), nBinsMin( nBinsMin ), nBinsMax( nBinsMax )
|
||||
CexmcHistoAxisData( Int_t nBins_, Double_t nBinsMin_,
|
||||
Double_t nBinsMax_ ) :
|
||||
nBins( nBins_ ), nBinsMin( nBinsMin_ ), nBinsMax( nBinsMax_ )
|
||||
{}
|
||||
|
||||
Int_t nBins;
|
||||
@@ -156,14 +156,14 @@ class CexmcHistoManager
|
||||
isARHisto( false ), isARRec( false ), triggerType( CexmcTPT )
|
||||
{}
|
||||
|
||||
CexmcHistoData( CexmcHistoType type, CexmcHistoImpl impl,
|
||||
bool isARHisto, bool isARRec,
|
||||
CexmcTriggerType triggerType,
|
||||
const G4String & name, const G4String & title,
|
||||
const CexmcHistoAxes & axes ) :
|
||||
type( type ), impl( impl ), isARHisto( isARHisto ),
|
||||
isARRec( isARRec ), triggerType( triggerType ), name( name ),
|
||||
title( title ), axes( axes )
|
||||
CexmcHistoData( CexmcHistoType type_, CexmcHistoImpl impl_,
|
||||
bool isARHisto_, bool isARRec_,
|
||||
CexmcTriggerType triggerType_,
|
||||
const G4String & name_, const G4String & title_,
|
||||
const CexmcHistoAxes & axes_ ) :
|
||||
type( type_ ), impl( impl_ ), isARHisto( isARHisto_ ),
|
||||
isARRec( isARRec_ ), triggerType( triggerType_ ), name( name_ ),
|
||||
title( title_ ), axes( axes_ )
|
||||
{}
|
||||
|
||||
CexmcHistoType type;
|
||||
@@ -310,6 +310,7 @@ inline G4int CexmcHistoManager::GetVerboseLevel( void ) const
|
||||
return verboseLevel;
|
||||
}
|
||||
|
||||
#ifdef CEXMC_USE_ROOTQT
|
||||
|
||||
inline void CexmcHistoManager::AddHistoMenu( const G4String & handle,
|
||||
const G4String & label )
|
||||
@@ -335,7 +336,7 @@ inline void CexmcHistoManager::SetDrawOptions3D( const G4String & value )
|
||||
{
|
||||
drawOptions3D = value;
|
||||
}
|
||||
|
||||
#endif //CEXMC_USE_ROOTQT
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -51,8 +51,9 @@
|
||||
|
||||
struct CexmcPhaseSpaceOutVectorElement
|
||||
{
|
||||
CexmcPhaseSpaceOutVectorElement( G4LorentzVector * lVec, G4double mass ) :
|
||||
lVec( lVec ), mass( mass )
|
||||
CexmcPhaseSpaceOutVectorElement( G4LorentzVector * lVec_,
|
||||
G4double mass_ ) :
|
||||
lVec( lVec_ ), mass( mass_ )
|
||||
{}
|
||||
|
||||
G4LorentzVector * lVec;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#include "CexmcCommon.hh"
|
||||
|
||||
class CexmcReconstructorMessenger;
|
||||
class CexmcEnergyDepositStore;
|
||||
struct CexmcEnergyDepositStore;
|
||||
|
||||
|
||||
class CexmcReconstructor
|
||||
|
||||
@@ -63,9 +63,9 @@ struct CexmcSimpleRangeWithValue
|
||||
CexmcSimpleRangeWithValue()
|
||||
{}
|
||||
|
||||
CexmcSimpleRangeWithValue( G4double bottom, G4double top,
|
||||
G4double value ) :
|
||||
bottom( bottom ), top( top ), value( value )
|
||||
CexmcSimpleRangeWithValue( G4double bottom_, G4double top_,
|
||||
G4double value_ ) :
|
||||
bottom( bottom_ ), top( top_ ), value( value_ )
|
||||
{}
|
||||
|
||||
G4double bottom;
|
||||
|
||||
@@ -86,9 +86,10 @@ class CexmcStudiedPhysics : public G4VPhysicsConstructor
|
||||
|
||||
template < typename Process >
|
||||
CexmcStudiedPhysics< Process >::CexmcStudiedPhysics(
|
||||
CexmcPhysicsManager * physicsManager ) :
|
||||
G4VPhysicsConstructor( "studiedPhysics" ), physicsManager( physicsManager ),
|
||||
productionModel( NULL ), wasActivated( false )
|
||||
CexmcPhysicsManager * physicsManager_ ) :
|
||||
G4VPhysicsConstructor( "studiedPhysics" ),
|
||||
physicsManager( physicsManager_ ), productionModel( NULL ),
|
||||
wasActivated( false )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -55,20 +55,23 @@
|
||||
|
||||
struct CexmcTrackPointInfo
|
||||
{
|
||||
CexmcTrackPointInfo() : trackId( CexmcInvalidTrackId )
|
||||
{}
|
||||
// explicit argument is only needed by G4THitsMap template,
|
||||
// it has no actual use here
|
||||
explicit CexmcTrackPointInfo( G4double unused = 0. ) :
|
||||
momentumAmp ( unused ), trackId( CexmcInvalidTrackId )
|
||||
{}
|
||||
|
||||
CexmcTrackPointInfo( const G4ThreeVector & positionLocal,
|
||||
const G4ThreeVector & positionWorld,
|
||||
const G4ThreeVector & directionLocal,
|
||||
const G4ThreeVector & directionWorld,
|
||||
G4double momentumAmp,
|
||||
const G4ParticleDefinition * particle,
|
||||
G4int trackId, CexmcTrackType trackType ) :
|
||||
positionLocal( positionLocal ), positionWorld( positionWorld ),
|
||||
directionLocal( directionLocal ), directionWorld( directionWorld ),
|
||||
momentumAmp( momentumAmp ), particle( particle ), trackId( trackId ),
|
||||
trackType( trackType )
|
||||
CexmcTrackPointInfo( const G4ThreeVector & positionLocal_,
|
||||
const G4ThreeVector & positionWorld_,
|
||||
const G4ThreeVector & directionLocal_,
|
||||
const G4ThreeVector & directionWorld_,
|
||||
G4double momentumAmp_,
|
||||
const G4ParticleDefinition * particle_,
|
||||
G4int trackId_, CexmcTrackType trackType_ ) :
|
||||
positionLocal( positionLocal_ ), positionWorld( positionWorld_ ),
|
||||
directionLocal( directionLocal_ ), directionWorld( directionWorld_ ),
|
||||
momentumAmp( momentumAmp_ ), particle( particle_ ), trackId( trackId_ ),
|
||||
trackType( trackType_ )
|
||||
{}
|
||||
|
||||
G4bool IsValid( void ) const
|
||||
|
||||
@@ -50,27 +50,27 @@
|
||||
|
||||
struct CexmcTrackPointsStore
|
||||
{
|
||||
CexmcTrackPointsStore( const CexmcTrackPointInfo & monitorTP,
|
||||
const CexmcTrackPointInfo & targetTPBeamParticle,
|
||||
const CexmcTrackPointInfo & targetTPOutputParticle,
|
||||
const CexmcTrackPointInfo & targetTPNucleusParticle,
|
||||
const CexmcTrackPointInfo & targetTPOutputParticleDecayProductParticle1,
|
||||
const CexmcTrackPointInfo & targetTPOutputParticleDecayProductParticle2,
|
||||
const CexmcTrackPointInfo & vetoCounterTPLeft,
|
||||
const CexmcTrackPointInfo & vetoCounterTPRight,
|
||||
const CexmcTrackPointInfo & calorimeterTPLeft,
|
||||
const CexmcTrackPointInfo & calorimeterTPRight ) :
|
||||
monitorTP( monitorTP ), targetTPBeamParticle( targetTPBeamParticle ),
|
||||
targetTPOutputParticle( targetTPOutputParticle ),
|
||||
targetTPNucleusParticle( targetTPNucleusParticle ),
|
||||
CexmcTrackPointsStore( const CexmcTrackPointInfo & monitorTP_,
|
||||
const CexmcTrackPointInfo & targetTPBeamParticle_,
|
||||
const CexmcTrackPointInfo & targetTPOutputParticle_,
|
||||
const CexmcTrackPointInfo & targetTPNucleusParticle_,
|
||||
const CexmcTrackPointInfo & targetTPOutputParticleDecayProductParticle1_,
|
||||
const CexmcTrackPointInfo & targetTPOutputParticleDecayProductParticle2_,
|
||||
const CexmcTrackPointInfo & vetoCounterTPLeft_,
|
||||
const CexmcTrackPointInfo & vetoCounterTPRight_,
|
||||
const CexmcTrackPointInfo & calorimeterTPLeft_,
|
||||
const CexmcTrackPointInfo & calorimeterTPRight_ ) :
|
||||
monitorTP( monitorTP_ ), targetTPBeamParticle( targetTPBeamParticle_ ),
|
||||
targetTPOutputParticle( targetTPOutputParticle_ ),
|
||||
targetTPNucleusParticle( targetTPNucleusParticle_ ),
|
||||
targetTPOutputParticleDecayProductParticle1(
|
||||
targetTPOutputParticleDecayProductParticle1 ),
|
||||
targetTPOutputParticleDecayProductParticle1_ ),
|
||||
targetTPOutputParticleDecayProductParticle2(
|
||||
targetTPOutputParticleDecayProductParticle2 ),
|
||||
vetoCounterTPLeft( vetoCounterTPLeft ),
|
||||
vetoCounterTPRight( vetoCounterTPRight ),
|
||||
calorimeterTPLeft( calorimeterTPLeft ),
|
||||
calorimeterTPRight( calorimeterTPRight )
|
||||
targetTPOutputParticleDecayProductParticle2_ ),
|
||||
vetoCounterTPLeft( vetoCounterTPLeft_ ),
|
||||
vetoCounterTPRight( vetoCounterTPRight_ ),
|
||||
calorimeterTPLeft( calorimeterTPLeft_ ),
|
||||
calorimeterTPRight( calorimeterTPRight_ )
|
||||
{}
|
||||
|
||||
void * operator new( size_t size );
|
||||
|
||||
@@ -5,6 +5,5 @@
|
||||
|
||||
/cexmc/geometry/gdmlFile lht.gdml
|
||||
/cexmc/geometry/validateGdmlFile
|
||||
/cexmc/histo/verbose 0
|
||||
|
||||
/cexmc/physics/productionModel eta
|
||||
|
||||
@@ -148,9 +148,9 @@ namespace
|
||||
const G4double CexmcASTEval::constants[] = { eV, keV, MeV, GeV, mm, cm, m };
|
||||
|
||||
|
||||
CexmcASTEval::CexmcASTEval( const CexmcEventFastSObject * evFastSObject,
|
||||
const CexmcEventSObject * evSObject ) :
|
||||
evFastSObject( evFastSObject ), evSObject( evSObject )
|
||||
CexmcASTEval::CexmcASTEval( const CexmcEventFastSObject * evFastSObject_,
|
||||
const CexmcEventSObject * evSObject_ ) :
|
||||
evFastSObject( evFastSObject_ ), evSObject( evSObject_ )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -208,10 +208,10 @@ CexmcAST::BasicEval::ScalarValueType CexmcASTEval::GetVarScalarValue(
|
||||
}
|
||||
else
|
||||
{
|
||||
const int * const & addr( boost::get< const int * >( var.addr ) );
|
||||
const int * const & addr_( boost::get< const int * >( var.addr ) );
|
||||
|
||||
if ( addr )
|
||||
return *addr;
|
||||
if ( addr_ )
|
||||
return *addr_;
|
||||
}
|
||||
|
||||
/* found in varAddrMap */
|
||||
@@ -220,26 +220,26 @@ CexmcAST::BasicEval::ScalarValueType CexmcASTEval::GetVarScalarValue(
|
||||
|
||||
if ( found != varAddrMap.end() )
|
||||
{
|
||||
const CexmcEnergyDepositCalorimeterCollection * const * addr(
|
||||
const CexmcEnergyDepositCalorimeterCollection * const * addr_(
|
||||
boost::get< const CexmcEnergyDepositCalorimeterCollection * >(
|
||||
&found->second ) );
|
||||
if ( addr )
|
||||
if ( addr_ )
|
||||
{
|
||||
if ( *addr )
|
||||
if ( *addr_ )
|
||||
{
|
||||
if ( ( *addr )->size() == 0 )
|
||||
if ( ( *addr_ )->size() == 0 )
|
||||
throw CexmcException( CexmcCFUninitializedVector );
|
||||
if ( var.index1 == 0 || var.index2 == 0 )
|
||||
throw CexmcException( CexmcCFUnexpectedVectorIndex );
|
||||
return ( *addr )->at( var.index1 - 1 ).at( var.index2 - 1 );
|
||||
return ( *addr_ )->at( var.index1 - 1 ).at( var.index2 - 1 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const bool * const & addr( boost::get< const bool * >(
|
||||
const bool * const & addr__( boost::get< const bool * >(
|
||||
found->second ) );
|
||||
if ( addr )
|
||||
return int( *addr );
|
||||
if ( addr__ )
|
||||
return int( *addr__ );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
|
||||
CexmcChargeExchangeReconstructorMessenger::
|
||||
CexmcChargeExchangeReconstructorMessenger(
|
||||
CexmcChargeExchangeReconstructor * reconstructor ) :
|
||||
reconstructor( reconstructor ), useTableMass( NULL ),
|
||||
CexmcChargeExchangeReconstructor * reconstructor_ ) :
|
||||
reconstructor( reconstructor_ ), useTableMass( NULL ),
|
||||
useMassCut( NULL ), mCutOPCenter( NULL ), mCutNOPCenter( NULL ),
|
||||
mCutOPWidth( NULL ), mCutNOPWidth( NULL ), mCutAngle( NULL ),
|
||||
useAbsorbedEnergyCut( NULL ), aeCutCLCenter( NULL ),
|
||||
|
||||
@@ -120,16 +120,16 @@ namespace CexmcCustomFilter
|
||||
if ( candidate->children.size() < 2 )
|
||||
break;
|
||||
|
||||
bool haveSamePriorities( false );
|
||||
bool haveSamePriorities_( false );
|
||||
Operator * candidateOp( boost::get< Operator >(
|
||||
&candidate->type ) );
|
||||
|
||||
if ( candidateOp )
|
||||
haveSamePriorities = value.priority == candidateOp->priority;
|
||||
haveSamePriorities_ = value.priority == candidateOp->priority;
|
||||
|
||||
/* FIXME: what to do if candidate has RL association? Our grammar is
|
||||
* not a subject of this issue; probably no grammar is a subject */
|
||||
if ( ! haveSamePriorities )
|
||||
if ( ! haveSamePriorities_ )
|
||||
break;
|
||||
|
||||
astDeepestRight = candidate;
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
|
||||
|
||||
CexmcEnergyDepositDigitizerMessenger::CexmcEnergyDepositDigitizerMessenger(
|
||||
CexmcEnergyDepositDigitizer * energyDepositDigitizer ) :
|
||||
energyDepositDigitizer( energyDepositDigitizer ),
|
||||
CexmcEnergyDepositDigitizer * energyDepositDigitizer_ ) :
|
||||
energyDepositDigitizer( energyDepositDigitizer_ ),
|
||||
setMonitorThreshold( NULL ), setVetoCountersThreshold( NULL ),
|
||||
setLeftVetoCounterThreshold( NULL ), setRightVetoCounterThreshold( NULL ),
|
||||
setCalorimetersThreshold( NULL ), setLeftCalorimeterThreshold( NULL ),
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
|
||||
|
||||
CexmcEnergyDepositInCalorimeter::CexmcEnergyDepositInCalorimeter(
|
||||
const G4String & name, const CexmcSetup * setup ) :
|
||||
CexmcEnergyDepositInLeftRightSet( name, setup )
|
||||
const G4String & name, const CexmcSetup * setup_ ) :
|
||||
CexmcEnergyDepositInLeftRightSet( name, setup_ )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
|
||||
|
||||
CexmcEnergyDepositInLeftRightSet::CexmcEnergyDepositInLeftRightSet(
|
||||
const G4String & name, const CexmcSetup * setup ) :
|
||||
CexmcSimpleEnergyDeposit( name ), setup( setup )
|
||||
const G4String & name, const CexmcSetup * setup_ ) :
|
||||
CexmcSimpleEnergyDeposit( name ), setup( setup_ )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -83,18 +83,22 @@ namespace
|
||||
G4Colour CexmcTrackPointsMarkerColour( 0.0, 1.0, 0.4 );
|
||||
G4Colour CexmcRecTrackPointsMarkerColour( 1.0, 0.4, 0.0 );
|
||||
|
||||
|
||||
#ifdef CEXMC_USE_ROOT
|
||||
inline G4double CexmcGetKinEnergy( G4double momentumAmp, G4double mass )
|
||||
{
|
||||
return std::sqrt( momentumAmp * momentumAmp + mass * mass ) - mass;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
CexmcEventAction::CexmcEventAction( CexmcPhysicsManager * physicsManager,
|
||||
G4int verbose ) :
|
||||
physicsManager( physicsManager ), reconstructor( NULL ), opKinEnergy( 0. ),
|
||||
verbose( verbose ), verboseDraw( 4 ), messenger( NULL )
|
||||
CexmcEventAction::CexmcEventAction( CexmcPhysicsManager * physicsManager_,
|
||||
G4int verbose_ ) :
|
||||
physicsManager( physicsManager_ ), reconstructor( NULL ),
|
||||
#ifdef CEXMC_USE_ROOT
|
||||
opKinEnergy( 0. ),
|
||||
#endif
|
||||
verbose( verbose_ ), verboseDraw( 4 ), messenger( NULL )
|
||||
{
|
||||
G4DigiManager * digiManager( G4DigiManager::GetDMpointer() );
|
||||
digiManager->AddNewModule( new CexmcEnergyDepositDigitizer(
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
|
||||
|
||||
CexmcEventActionMessenger::CexmcEventActionMessenger(
|
||||
CexmcEventAction * eventAction ) :
|
||||
eventAction( eventAction ), setVerboseLevel( NULL ),
|
||||
CexmcEventAction * eventAction_ ) :
|
||||
eventAction( eventAction_ ), setVerboseLevel( NULL ),
|
||||
setVerboseDrawLevel( NULL )
|
||||
{
|
||||
setVerboseLevel = new G4UIcmdWithAnInteger(
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
#include "CexmcEventInfo.hh"
|
||||
|
||||
|
||||
CexmcEventInfo::CexmcEventInfo( G4bool edTriggerIsOk, G4bool tpTriggerIsOk,
|
||||
G4bool reconstructionIsOk ) :
|
||||
edTriggerIsOk( edTriggerIsOk ), tpTriggerIsOk( tpTriggerIsOk ),
|
||||
reconstructionIsOk( reconstructionIsOk )
|
||||
CexmcEventInfo::CexmcEventInfo( G4bool edTriggerIsOk_, G4bool tpTriggerIsOk_,
|
||||
G4bool reconstructionIsOk_ ) :
|
||||
edTriggerIsOk( edTriggerIsOk_ ), tpTriggerIsOk( tpTriggerIsOk_ ),
|
||||
reconstructionIsOk( reconstructionIsOk_ )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "CexmcCommon.hh"
|
||||
|
||||
|
||||
CexmcException::CexmcException( CexmcExceptionType type ) : type( type )
|
||||
CexmcException::CexmcException( CexmcExceptionType type_ ) : type( type_ )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
|
||||
|
||||
CexmcHistoManagerMessenger::CexmcHistoManagerMessenger(
|
||||
CexmcHistoManager * histoManager ) :
|
||||
histoManager( histoManager ), setVerboseLevel( NULL ), listHistos( NULL ),
|
||||
CexmcHistoManager * histoManager_ ) :
|
||||
histoManager( histoManager_ ), setVerboseLevel( NULL ), listHistos( NULL ),
|
||||
printHisto( NULL )
|
||||
#ifdef CEXMC_USE_ROOTQT
|
||||
, drawHisto( NULL ), addHistoMenu( NULL ), drawHistoOptions1D( NULL ),
|
||||
|
||||
@@ -60,7 +60,7 @@ CexmcHistoWidget::CexmcHistoWidget()
|
||||
}
|
||||
|
||||
|
||||
void CexmcHistoWidget::contextMenuEvent( QContextMenuEvent * event )
|
||||
void CexmcHistoWidget::contextMenuEvent( QContextMenuEvent * aEvent )
|
||||
{
|
||||
/* TRootContextMenu responsiveness is very ugly and unstable in Geant4
|
||||
* environment, so we have to replace it with something more useful
|
||||
@@ -69,7 +69,7 @@ void CexmcHistoWidget::contextMenuEvent( QContextMenuEvent * event )
|
||||
* backend for its context menu.
|
||||
* TQtWidget utilizes QContextMenuEvent::Other reason to draw
|
||||
* TRootContextMenu object. */
|
||||
if ( event->reason() == QContextMenuEvent::Other )
|
||||
if ( aEvent->reason() == QContextMenuEvent::Other )
|
||||
{
|
||||
TObject * object( NULL );
|
||||
TListIter curPrimitive( fCanvas->GetListOfPrimitives() );
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
|
||||
|
||||
CexmcIncidentParticleTrackInfo::CexmcIncidentParticleTrackInfo(
|
||||
CexmcTrackType trackType ) :
|
||||
CexmcTrackInfo( trackType ), currentTrackLengthInTarget( 0. ),
|
||||
CexmcTrackType trackType_ ) :
|
||||
CexmcTrackInfo( trackType_ ), currentTrackLengthInTarget( 0. ),
|
||||
finalTrackLengthInTarget( 0. ), isStudiedProcessActivated( false ),
|
||||
needsTrackLengthResampling( false )
|
||||
{
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
#include "CexmcParticleGunMessenger.hh"
|
||||
|
||||
|
||||
CexmcParticleGun::CexmcParticleGun( CexmcPhysicsManager * physicsManager,
|
||||
CexmcParticleGun::CexmcParticleGun( CexmcPhysicsManager * physicsManager_,
|
||||
G4int nmbOfParticles ) :
|
||||
G4ParticleGun( nmbOfParticles ), physicsManager( physicsManager ),
|
||||
G4ParticleGun( nmbOfParticles ), physicsManager( physicsManager_ ),
|
||||
origPos( 0, 0, 0 ), origDir( 0, 0, 0 ), origMomentumAmp( 0 ),
|
||||
messenger( NULL )
|
||||
{
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
|
||||
|
||||
CexmcParticleGunMessenger::CexmcParticleGunMessenger(
|
||||
CexmcParticleGun * particleGun ) :
|
||||
particleGun( particleGun ), setParticle( NULL ), setOrigPosition( NULL ),
|
||||
CexmcParticleGun * particleGun_ ) :
|
||||
particleGun( particleGun_ ), setParticle( NULL ), setOrigPosition( NULL ),
|
||||
setOrigDirection( NULL ), setOrigMomentumAmp( NULL )
|
||||
{
|
||||
setParticle = new G4UIcmdWithAString(
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
|
||||
|
||||
CexmcPhysicsManagerMessenger::CexmcPhysicsManagerMessenger(
|
||||
CexmcPhysicsManager * physicsManager ) :
|
||||
physicsManager( physicsManager ), setMaxILCorrection( NULL )
|
||||
CexmcPhysicsManager * physicsManager_ ) :
|
||||
physicsManager( physicsManager_ ), setMaxILCorrection( NULL )
|
||||
{
|
||||
setMaxILCorrection = new G4UIcmdWithADoubleAndUnit(
|
||||
( CexmcMessenger::physicsDirName + "setMaxILCorrection" ).c_str(),
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
|
||||
|
||||
CexmcPrimaryGeneratorActionMessenger::CexmcPrimaryGeneratorActionMessenger(
|
||||
CexmcPrimaryGeneratorAction * primaryGeneratorAction ) :
|
||||
primaryGeneratorAction( primaryGeneratorAction ),
|
||||
CexmcPrimaryGeneratorAction * primaryGeneratorAction_ ) :
|
||||
primaryGeneratorAction( primaryGeneratorAction_ ),
|
||||
fwhmPosX( NULL ), fwhmPosY( NULL ), fwhmDirX( NULL ), fwhmDirY( NULL ),
|
||||
fwhmMomentumAmp( NULL )
|
||||
{
|
||||
|
||||
@@ -46,10 +46,10 @@
|
||||
#include "CexmcProductionModelMessenger.hh"
|
||||
|
||||
|
||||
CexmcProductionModel::CexmcProductionModel( const G4String & name,
|
||||
G4bool fermiMotionIsOn ) :
|
||||
name( name ), fermiMotionIsOn( fermiMotionIsOn ), incidentParticle( NULL ),
|
||||
nucleusParticle( NULL ), outputParticle( NULL ),
|
||||
CexmcProductionModel::CexmcProductionModel( const G4String & name_,
|
||||
G4bool fermiMotionIsOn_ ) :
|
||||
name( name_ ), fermiMotionIsOn( fermiMotionIsOn_ ),
|
||||
incidentParticle( NULL ), nucleusParticle( NULL ), outputParticle( NULL ),
|
||||
nucleusOutputParticle( NULL ), messenger( NULL )
|
||||
{
|
||||
angularRanges.push_back( CexmcAngularRange( 1.0, -1.0, 0 ) );
|
||||
|
||||
@@ -51,29 +51,29 @@ CexmcProductionModelData::CexmcProductionModelData()
|
||||
|
||||
|
||||
CexmcProductionModelData::CexmcProductionModelData(
|
||||
const G4LorentzVector & incidentParticleSCM,
|
||||
const G4LorentzVector & incidentParticleLAB,
|
||||
const G4LorentzVector & nucleusParticleSCM,
|
||||
const G4LorentzVector & nucleusParticleLAB,
|
||||
const G4LorentzVector & outputParticleSCM,
|
||||
const G4LorentzVector & outputParticleLAB,
|
||||
const G4LorentzVector & nucleusOutputParticleSCM,
|
||||
const G4LorentzVector & nucleusOutputParticleLAB,
|
||||
const G4ParticleDefinition * incidentParticle,
|
||||
const G4ParticleDefinition * nucleusParticle,
|
||||
const G4ParticleDefinition * outputParticle,
|
||||
const G4ParticleDefinition * nucleusOutputParticle ) :
|
||||
incidentParticleSCM( incidentParticleSCM ),
|
||||
incidentParticleLAB( incidentParticleLAB ),
|
||||
nucleusParticleSCM( nucleusParticleSCM ),
|
||||
nucleusParticleLAB( nucleusParticleLAB ),
|
||||
outputParticleSCM( outputParticleSCM ),
|
||||
outputParticleLAB( outputParticleLAB ),
|
||||
nucleusOutputParticleSCM( nucleusOutputParticleSCM ),
|
||||
nucleusOutputParticleLAB( nucleusOutputParticleLAB ),
|
||||
incidentParticle( incidentParticle ), nucleusParticle( nucleusParticle ),
|
||||
outputParticle( outputParticle ),
|
||||
nucleusOutputParticle( nucleusOutputParticle )
|
||||
const G4LorentzVector & incidentParticleSCM_,
|
||||
const G4LorentzVector & incidentParticleLAB_,
|
||||
const G4LorentzVector & nucleusParticleSCM_,
|
||||
const G4LorentzVector & nucleusParticleLAB_,
|
||||
const G4LorentzVector & outputParticleSCM_,
|
||||
const G4LorentzVector & outputParticleLAB_,
|
||||
const G4LorentzVector & nucleusOutputParticleSCM_,
|
||||
const G4LorentzVector & nucleusOutputParticleLAB_,
|
||||
const G4ParticleDefinition * incidentParticle_,
|
||||
const G4ParticleDefinition * nucleusParticle_,
|
||||
const G4ParticleDefinition * outputParticle_,
|
||||
const G4ParticleDefinition * nucleusOutputParticle_ ) :
|
||||
incidentParticleSCM( incidentParticleSCM_ ),
|
||||
incidentParticleLAB( incidentParticleLAB_ ),
|
||||
nucleusParticleSCM( nucleusParticleSCM_ ),
|
||||
nucleusParticleLAB( nucleusParticleLAB_ ),
|
||||
outputParticleSCM( outputParticleSCM_ ),
|
||||
outputParticleLAB( outputParticleLAB_ ),
|
||||
nucleusOutputParticleSCM( nucleusOutputParticleSCM_ ),
|
||||
nucleusOutputParticleLAB( nucleusOutputParticleLAB_ ),
|
||||
incidentParticle( incidentParticle_ ), nucleusParticle( nucleusParticle_ ),
|
||||
outputParticle( outputParticle_ ),
|
||||
nucleusOutputParticle( nucleusOutputParticle_ )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
|
||||
|
||||
CexmcProductionModelMessenger::CexmcProductionModelMessenger(
|
||||
CexmcProductionModel * productionModel ) :
|
||||
productionModel( productionModel ), applyFermiMotion( NULL ),
|
||||
CexmcProductionModel * productionModel_ ) :
|
||||
productionModel( productionModel_ ), applyFermiMotion( NULL ),
|
||||
setAngularRange( NULL ), addAngularRange( NULL )
|
||||
{
|
||||
applyFermiMotion = new G4UIcmdWithABool(
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
|
||||
|
||||
CexmcReconstructorMessenger::CexmcReconstructorMessenger(
|
||||
CexmcReconstructor * reconstructor ) :
|
||||
reconstructor( reconstructor ),
|
||||
CexmcReconstructor * reconstructor_ ) :
|
||||
reconstructor( reconstructor_ ),
|
||||
setCalorimeterEntryPointDefinitionAlgorithm( NULL ),
|
||||
setCrystalSelectionAlgorithm( NULL ), useInnerRefCrystal( NULL ),
|
||||
setCalorimeterEntryPointDepth( NULL )
|
||||
|
||||
@@ -178,8 +178,8 @@ G4double CexmcReimplementedGenbod::Generate( void )
|
||||
++i;
|
||||
}
|
||||
|
||||
for ( int i( 0 ); i < nmbOfOutputParticles; ++i )
|
||||
*outVec[ i ].lVec *= GeV;
|
||||
for ( int j( 0 ); j < nmbOfOutputParticles; ++j )
|
||||
*outVec[ j ].lVec *= GeV;
|
||||
|
||||
//
|
||||
//---> return the weigth of event
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
#include "CexmcException.hh"
|
||||
|
||||
|
||||
CexmcRunAction::CexmcRunAction( CexmcPhysicsManager * physicsManager ) :
|
||||
physicsManager( physicsManager )
|
||||
CexmcRunAction::CexmcRunAction( CexmcPhysicsManager * physicsManager_ ) :
|
||||
physicsManager( physicsManager_ )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -167,8 +167,8 @@ void CexmcRunAction::PrintResults(
|
||||
|
||||
std::vector< std::string > auxString( nmbOfAuxColumns );
|
||||
|
||||
for ( size_t i( 0 ); i < nmbOfAuxColumns; ++i )
|
||||
auxString[ i ] = auxStringStream[ i ].str();
|
||||
for ( size_t j( 0 ); j < nmbOfAuxColumns; ++j )
|
||||
auxString[ j ] = auxStringStream[ j ].str();
|
||||
|
||||
auxStrings.push_back( auxString );
|
||||
}
|
||||
|
||||
@@ -102,14 +102,14 @@ namespace
|
||||
}
|
||||
|
||||
|
||||
CexmcRunManager::CexmcRunManager( const G4String & projectId,
|
||||
const G4String & rProject,
|
||||
CexmcRunManager::CexmcRunManager( const G4String & projectId_,
|
||||
const G4String & rProject_,
|
||||
G4bool overrideExistingProject ) :
|
||||
basePhysicsUsed( CexmcPMFactoryInstance::GetBasePhysics() ),
|
||||
productionModelType( CexmcUnknownProductionModel ),
|
||||
gdmlFileName( "default.gdml" ), shouldGdmlFileBeValidated( true ),
|
||||
zipGdmlFile( false ), projectsDir( "." ), projectId( projectId ),
|
||||
rProject( rProject ), guiMacroName( "" ), cfFileName( "" ),
|
||||
zipGdmlFile( false ), projectsDir( "." ), projectId( projectId_ ),
|
||||
rProject( rProject_ ), guiMacroName( "" ), cfFileName( "" ),
|
||||
eventCountPolicy( CexmcCountAllEvents ),
|
||||
skipInteractionsWithoutEDTonWrite( true ),
|
||||
evDataVerboseLevel( CexmcWriteEventDataOnEveryEDT ),
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
|
||||
|
||||
CexmcRunManagerMessenger::CexmcRunManagerMessenger(
|
||||
CexmcRunManager * runManager ) :
|
||||
runManager( runManager ), setProductionModel( NULL ), setGdmlFile( NULL ),
|
||||
CexmcRunManager * runManager_ ) :
|
||||
runManager( runManager_ ), setProductionModel( NULL ), setGdmlFile( NULL ),
|
||||
setGuiMacro( NULL ), setEventCountPolicy( NULL ),
|
||||
setEventDataVerboseLevel( NULL ),
|
||||
#ifdef CEXMC_USE_PERSISTENCY
|
||||
|
||||
@@ -68,8 +68,8 @@ namespace
|
||||
}
|
||||
|
||||
|
||||
CexmcScenePrimitives::CexmcScenePrimitives( CexmcSetup * setup ) :
|
||||
setup( setup ), markTargetCenter( false ), highlightInnerCrystals( false ),
|
||||
CexmcScenePrimitives::CexmcScenePrimitives( CexmcSetup * setup_ ) :
|
||||
setup( setup_ ), markTargetCenter( false ), highlightInnerCrystals( false ),
|
||||
messenger( NULL )
|
||||
{
|
||||
messenger = new CexmcScenePrimitivesMessenger( this );
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
|
||||
|
||||
CexmcScenePrimitivesMessenger::CexmcScenePrimitivesMessenger(
|
||||
CexmcScenePrimitives * scenePrimitives ) :
|
||||
scenePrimitives( scenePrimitives ), drawRadialLine( NULL ),
|
||||
CexmcScenePrimitives * scenePrimitives_ ) :
|
||||
scenePrimitives( scenePrimitives_ ), drawRadialLine( NULL ),
|
||||
clearRadialLines( NULL ), markTargetCenter( NULL ),
|
||||
highlightInnerCrystals( NULL ), setColour( NULL )
|
||||
{
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
|
||||
|
||||
CexmcSensitiveDetectorMessenger::CexmcSensitiveDetectorMessenger(
|
||||
G4VPrimitiveScorer * scorer ) :
|
||||
scorer( scorer ), detectorPath( NULL ), setVerboseLevel( NULL )
|
||||
G4VPrimitiveScorer * scorer_ ) :
|
||||
scorer( scorer_ ), detectorPath( NULL ), setVerboseLevel( NULL )
|
||||
{
|
||||
G4MultiFunctionalDetector * detector(
|
||||
scorer->GetMultiFunctionalDetector() );
|
||||
|
||||
@@ -68,8 +68,9 @@
|
||||
#include "CexmcException.hh"
|
||||
|
||||
|
||||
CexmcSetup::CexmcSetup( const G4String & gdmlFile, G4bool validateGDMLFile ) :
|
||||
world( 0 ), gdmlFile( gdmlFile ), validateGDMLFile( validateGDMLFile ),
|
||||
CexmcSetup::CexmcSetup( const G4String & gdmlFile_,
|
||||
G4bool validateGDMLFile_ ) :
|
||||
world( 0 ), gdmlFile( gdmlFile_ ), validateGDMLFile( validateGDMLFile_ ),
|
||||
calorimeterRegionInitialized( false ),
|
||||
calorimeterGeometryDataInitialized( false ), monitorVolume( NULL ),
|
||||
vetoCounterVolume( NULL ), calorimeterVolume( NULL ), targetVolume( NULL ),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user