Import Geant4 10.7.0.beta source tree
This commit is contained in:
+3
-3
@@ -22,7 +22,7 @@ cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
|
|||||||
|
|
||||||
# - Make overrides for default flags, so they appear in interfaces
|
# - Make overrides for default flags, so they appear in interfaces
|
||||||
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
|
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
|
||||||
${CMAKE_SOURCE_DIR}/cmake/Modules/Geant4MakeRules_cxx.cmake)
|
${CMAKE_SOURCE_DIR}/cmake/Modules/G4MakeRules_cxx.cmake)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# - Project definition and basic configuration
|
# - Project definition and basic configuration
|
||||||
@@ -31,8 +31,8 @@ set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
|
|||||||
# the same form.
|
# the same form.
|
||||||
project(Geant4)
|
project(Geant4)
|
||||||
set(${PROJECT_NAME}_VERSION_MAJOR 10)
|
set(${PROJECT_NAME}_VERSION_MAJOR 10)
|
||||||
set(${PROJECT_NAME}_VERSION_MINOR 6)
|
set(${PROJECT_NAME}_VERSION_MINOR 7)
|
||||||
set(${PROJECT_NAME}_VERSION_PATCH 2)
|
set(${PROJECT_NAME}_VERSION_PATCH 0)
|
||||||
set(${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}")
|
set(${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}")
|
||||||
|
|
||||||
# - Prepend our own CMake Modules to the search path
|
# - Prepend our own CMake Modules to the search path
|
||||||
|
|||||||
@@ -0,0 +1,885 @@
|
|||||||
|
|
||||||
|
Geant4 10.7-beta-01 Release Notes
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
26 June 2020
|
||||||
|
|
||||||
|
Migration Notes & Main New Features
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
o Introducing new optional (experimental) tasking system, based on TBL
|
||||||
|
(Parallel Tasking Library), dedicated run manager (G4TaskRunManager) and
|
||||||
|
factory (G4RunManagerFactory), enabling use of tasks for the event loop.
|
||||||
|
The tasking system is fully compatible with Intel TBB, which can be
|
||||||
|
selected if GEANT4_USE_TBB=ON is specified when configuring CMake. The
|
||||||
|
default behavior is to submit the tasks to an internal thread-pool and
|
||||||
|
task-queue. A comprehensive description of the system and options available
|
||||||
|
can be found in the README document located within the new source/tasking
|
||||||
|
module.
|
||||||
|
o Revision of G4PhysicsVector classes to use similar algorithm for bin
|
||||||
|
selection and adding checks on vectors length.
|
||||||
|
o G4PhysicsLinearVector, G4PhysicsLogVector: more accurate checks in class
|
||||||
|
constructors.
|
||||||
|
o New class G4DriverReporter to print progress of field drivers.
|
||||||
|
o Enabled "check-mode" for G4PropagatorInField and G4VIntersectionLocator.
|
||||||
|
Enable use of whiteboard for logging/debugging in G4MultiLevelLocator, if
|
||||||
|
"check-mode" in navigation is being activated through UI command.
|
||||||
|
o Added layered mass geometry option for the new "probe" scoring mesh.
|
||||||
|
o Introducing G4VPrimitivePlotter allowing the user to extend a primitive
|
||||||
|
scorer and directly fill a 1D histogram.
|
||||||
|
o Enabled handling of automatic min/max axes values in case of log scale
|
||||||
|
in analysis tools.
|
||||||
|
o Fixed reading and writing of const properties of materials in GDML.
|
||||||
|
o Cleanup destruction of physics processes at the end of job.
|
||||||
|
Reviewed ownership/deletion of physics models at the end of the run.
|
||||||
|
o Introducing thermal model of positronium decay to two gammas.
|
||||||
|
In this model, the positronium acquires a mean kinetic energy on formation,
|
||||||
|
which contributes to a small non-collinearity of the gammas, detectable and
|
||||||
|
significant in PET.
|
||||||
|
o Added new EM model for polarized gamma elastic scattering.
|
||||||
|
o Implemented three time constants for G4Scintillation, and allow multiple
|
||||||
|
time constants to work with scintillation by particle type.
|
||||||
|
o Added second wavelength shifting process within the same material.
|
||||||
|
o New physics-list builder classes to allow alternative builders for
|
||||||
|
anti_proton, anti_neutron, hyperons and anti-hyperons nuclear interactions
|
||||||
|
at high energies with QGSP.
|
||||||
|
o Extended EM physics-list constructors to allow extra available DNA options.
|
||||||
|
o New General Particle Source energy distribution option that generates flat
|
||||||
|
energy distribution with track weights representing energy spectrum.
|
||||||
|
o Added handling of lepto-nuclear interactions for anti_nu_e, nu_e and
|
||||||
|
anti_mu_nu.
|
||||||
|
o Define PDG code as "-22" for G4OpticalPhoton.
|
||||||
|
o Added implementation of IRT in G4DNA module.
|
||||||
|
o Added new UI messenger for hadronic physics, currently used for controlling
|
||||||
|
verbosity level: the UI command "/process/had/verbose 0" allows to switch
|
||||||
|
off the print-out at initialization of hadronic processes, models and
|
||||||
|
cross sections (similar to the existing command "/process/em/verbose 0"
|
||||||
|
to switch off the print-out of electromagnetic physics information).
|
||||||
|
o Fixed non-conservation warnings coming from G4HadronicProcess due to
|
||||||
|
sub-threshold reactions in Bertini cascade.
|
||||||
|
o G4CrossSectionElastic, G4CrossSectionInelastic: fix of the max energy of
|
||||||
|
applicability of the (elastic and inelastic) cross-sections of ions and
|
||||||
|
anti-ions nuclear interactions.
|
||||||
|
o Improved treatment of antibaryon interactions in QGS.
|
||||||
|
o Added support for OpenInventor Qt visualisation driver to be built and
|
||||||
|
used in applications. The OpenInventor module can be built with either
|
||||||
|
the OIQT driver, or with the OIX/OIXE drivers, but not with both.
|
||||||
|
Enabled use of OIQT viewer with Qt UI.
|
||||||
|
o New advanced example showing how to efficiently simulate particle transport
|
||||||
|
through aerosols containing billions of randomly-positioned droplets, using
|
||||||
|
an ordinary workstation.
|
||||||
|
o Added support for modular builds in CMake.
|
||||||
|
o Extended CMake build system to support G4Py activation through
|
||||||
|
GEANT4_USE_PYTHON flag.
|
||||||
|
o Build option with VecGeom requires VecGeom-1.1.7.
|
||||||
|
o New data sets G4EMLOW-7.12.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Technical Notes
|
||||||
|
---------------
|
||||||
|
|
||||||
|
o Tested platforms:
|
||||||
|
+ Linux, gcc-4.9.3.
|
||||||
|
Tested on 64 bit architectures (Intel or AMD) with CERN CentOS
|
||||||
|
Linux 7 (CC7) (based on CentOS Linux 7).
|
||||||
|
Versions of Geant4 have also been compiled successfully on other
|
||||||
|
Linux distributions, Ubuntu, Debian, Suse or other RedHat systems.
|
||||||
|
+ MacOSX 10.15, Apple LLVM/clang-11.0.3
|
||||||
|
+ Windows/10 with Visual C++ 14.23 (Visual Studio 2019)
|
||||||
|
|
||||||
|
o More verified configurations:
|
||||||
|
+ Linux, gcc-5.4.0/7.3.0/8.3.0/9.2.0/10.1.0, clang-7.0/8.0/10.0.
|
||||||
|
+ Linux, Intel-icc 19.0.
|
||||||
|
+ MacOSX 10.14 with Apple LLVM/clang-10.0.
|
||||||
|
|
||||||
|
o External dependencies
|
||||||
|
+ CLHEP-2.4.1.3, suggested for external installation of the CLHEP library.
|
||||||
|
+ VecGeom-1.1.7, for optional use of the VecGeom geometry primitives.
|
||||||
|
|
||||||
|
o New data sets:
|
||||||
|
+ G4EMLOW-7.12.
|
||||||
|
|
||||||
|
Please refer to the Geant4 User Documentation:
|
||||||
|
http://cern.ch/geant4/support/user_documentation
|
||||||
|
for further information about using Geant4.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
List of features and fixes included in this Beta release since 10.6.p02:
|
||||||
|
|
||||||
|
o Configuration:
|
||||||
|
-------------
|
||||||
|
+ CMake:
|
||||||
|
o Added support for building PTL external module and introduced
|
||||||
|
GEANT4_USE_TBB option, enabling use of TBB as possible alternative
|
||||||
|
to builtin PTL tasking.
|
||||||
|
o Added support for OpenInventor Qt visualisation driver to be built and
|
||||||
|
used in applications. The OpenInventor module can be built with either
|
||||||
|
the OIQT driver, or with the OIX/OIXE drivers, but not with both.
|
||||||
|
Added GEANT4_USE_XM to OpenInventor X11 driver code block to correct
|
||||||
|
Xm and Xt link order.
|
||||||
|
o Removed requirement on presence of GLU library.
|
||||||
|
No longer save GLU related variables in the package cache.
|
||||||
|
o Change shimmed imported target name to VecGeom::vecgeom to match
|
||||||
|
upstream usage and reliably use target when available from VecGeom.
|
||||||
|
Export VecCore_DIR to package cache when set so that Geant4 behaviour
|
||||||
|
is consistent. Co-works with VecGeom-1.1.7.
|
||||||
|
o Added GEANT4_USE_NEW_CMAKE option in preparation for testing of modular
|
||||||
|
build updates, ON by default, to switch between systems. Importing new
|
||||||
|
"target" style API for declaring and composing libraries from modules
|
||||||
|
of source code. Retain GEANT4_BUILDTREE_INCLUDE_DIRS in new CMake
|
||||||
|
system to support clients that may not yet support CMake target usage
|
||||||
|
requirements.
|
||||||
|
o Propagate value of CMAKE_DISABLE_FIND_PACKAGE_ROOT down to tests
|
||||||
|
that optionally support Root to allow testing Geant4 with Root support
|
||||||
|
disabled. This is necessary when testing Geant4 with a different C++
|
||||||
|
standard than Root when it's installed. Avoid warnings from propagating
|
||||||
|
the flag down to tests.
|
||||||
|
o Applied patch to allow compilation on Windows using Clang.
|
||||||
|
o Use "${FOO:-}" variable expansion and "-z" test to check for
|
||||||
|
undefined variables in Bourne Shell scripts. Prevents errors when
|
||||||
|
shell is in "set -u" mode. Addressing problem report #2221.
|
||||||
|
o Handle install of G4clhep{-static} independently of main modules
|
||||||
|
due it being built outside the category system.
|
||||||
|
o Renamed remaining internal "Geant4..." modules to "G4" convention.
|
||||||
|
Retain Geant4DefineModule and Geant4LibraryTargets until new
|
||||||
|
modularization scheme is in place.
|
||||||
|
o Updated version of data sets: G4EMLOW-7.12.
|
||||||
|
Updated tag-IDs for 10.7-beta.
|
||||||
|
+ GNUMake:
|
||||||
|
o Added setup for building and configuring new externals/ptl
|
||||||
|
and tasking modules. External installation of PTL can be enabled
|
||||||
|
by defining the installation through the environment variable
|
||||||
|
PTL_BASE_DIR.
|
||||||
|
o Added -pthread to all builds in Linux targets.
|
||||||
|
o Corrected setup for use of OpenInventor (Coin).
|
||||||
|
o Added missing settings in G4UI_BUILD.gmk script for OIQt and use of UI.
|
||||||
|
o Removed deprecated G4USE_STD11 flag settings.
|
||||||
|
o Removed dependency on GLU for all configurations, as no longer
|
||||||
|
necessary.
|
||||||
|
|
||||||
|
o Analysis:
|
||||||
|
--------
|
||||||
|
+ Updated to g4tools 5.1.0:
|
||||||
|
o Corrections to handle automatic min/max axes values in case of log
|
||||||
|
scale. See History_tools in analysis module for all details.
|
||||||
|
+ Fix to add a null-pointer check to ntupleDescription->fNtuple in
|
||||||
|
G4RootPNtupleManager::Merge().
|
||||||
|
+ Fixed compilation warnings on clang-10 for g4tools.
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
+ Update granular dependencies in preparation for modularization
|
||||||
|
+ Remove uneeded links to externals in factory.
|
||||||
|
|
||||||
|
o Digits & Hits:
|
||||||
|
-------------
|
||||||
|
+ Introducing G4VPrimitivePlotter allowing the user to extend a primitive
|
||||||
|
scorer and directly fill 1D histogram.
|
||||||
|
+ Added two ComputeSolid() method to G4VPrimitiveScorer, to consolidate
|
||||||
|
code.
|
||||||
|
+ Fixed cases of comparison between int and size_t in templated classes
|
||||||
|
and some cleanup.
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
|
||||||
|
o Error Propagation:
|
||||||
|
-----------------
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
|
||||||
|
o Event:
|
||||||
|
-----
|
||||||
|
+ Introducing a new General Particle Source energy distribution option,
|
||||||
|
that generates flat energy distribution with track weights that
|
||||||
|
represent energy spectrum provided by /gps/hist/point commands.
|
||||||
|
This option can enhance, for example, higher energy tracks that are
|
||||||
|
rare but contribute to the scores.
|
||||||
|
+ Corrected logic in G4VPrimaryGenerator::CheckVertexInsideWorld() method.
|
||||||
|
+ G4GeneralParticleSourceMessenger: command structure clean-up.
|
||||||
|
+ Some code cleanup, formatting and C++11 revision.
|
||||||
|
+ Removed obsolete and unused headers.
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
+ Fixed Coverity defect in G4GeneralParticleSourceMessenger.
|
||||||
|
|
||||||
|
o Externals:
|
||||||
|
---------
|
||||||
|
+ ptl:
|
||||||
|
o New module for PTL (Parallel Tasking Library), implementing a
|
||||||
|
lightweight C++11 multi-threading tasking system featuring thread-pool,
|
||||||
|
task-groups, and lock-free task queue.
|
||||||
|
+ zlib:
|
||||||
|
o Added needed include directories to CMake script when using new
|
||||||
|
CMake system.
|
||||||
|
|
||||||
|
o G3toG4:
|
||||||
|
------
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
|
||||||
|
o Geometry:
|
||||||
|
--------
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
+ magneticfield:
|
||||||
|
o New class G4DriverReporter to print progress of drivers.
|
||||||
|
o G4VIntegrationDriver and dependent driver classes: added new virtual
|
||||||
|
method StreamInfo(), used to implement operator<<() for
|
||||||
|
G4VIntegrationDriver.
|
||||||
|
o G4MagInt_Driver: fixed max iterations & clarified that its method
|
||||||
|
ComputeNewStepSize() does not (yet) respect maximum reduction factor
|
||||||
|
(0.1); this is to enable comparisons with new G4IntegrationDriver<>
|
||||||
|
implementation.
|
||||||
|
o G4OldMagIntDriver maintains all old behaviour of G4MagInt_Driver.
|
||||||
|
o In G4MultiLevelLocator, added ability to record in a 'whiteboard',
|
||||||
|
the start/end steps of integration intervals, to allow identify issues
|
||||||
|
like negative or zero steps occurrences. Includes new classes
|
||||||
|
G4LocatorChangeLogger and G4LocatorChangeRecord.
|
||||||
|
o G4PropagationInField: improved ClearPropagatorState() method.
|
||||||
|
o Implemented move constructor and operator for G4FieldTrack.
|
||||||
|
+ management:
|
||||||
|
o Added deleted declarations for copy constructor and assignment operators
|
||||||
|
on store singletons. Based on GitHub PR#12 report.
|
||||||
|
o Reduced size of G4LogicalVolume objects by reordering class members.
|
||||||
|
o Adopt new convention for location of headers in VecGeom for wrappers.
|
||||||
|
o Fix to CMake script to support new CMake system.
|
||||||
|
+ navigation:
|
||||||
|
o Enabled "check-mode" for G4PropagatorInField and G4VIntersectionLocator.
|
||||||
|
Enable use of whiteboard for logging/debugging in G4MultiLevelLocator,
|
||||||
|
if "check-mode" in navigation is being activated through UI command.
|
||||||
|
o Reordered data members in G4Navigator, to reduce object size.
|
||||||
|
+ solids/CSG:
|
||||||
|
o G4Trap: fixed calculation of normal for points on edge in
|
||||||
|
SurfaceNormal(). Improved code for Inside().
|
||||||
|
o Adopt new convention for location of headers in VecGeom for all
|
||||||
|
wrappers.
|
||||||
|
+ solids/specific:
|
||||||
|
o Added GetTwistedFaceSurfaceArea() in G4GenericTrap and fixed
|
||||||
|
calculation of surface area in unit tests.
|
||||||
|
o Adopt new convention for location of headers in VecGeom for all
|
||||||
|
wrappers.
|
||||||
|
|
||||||
|
o Global:
|
||||||
|
------
|
||||||
|
+ G4Physics2DVector: extended number of characters in the table dump from 5
|
||||||
|
to 8; use similar algorithm for bin selection as in 1D vector;
|
||||||
|
if any dimension is less than 2 throw a G4Exception.
|
||||||
|
+ G4PhysicsVector: use same code for interpolation for all types of
|
||||||
|
PhysicsVector; removed obsolete unused methods; maximally use const
|
||||||
|
variables; preserve precision of printout.
|
||||||
|
+ G4PhysicsLinearVector: added checks on vector length: if it is less
|
||||||
|
than 2 throw a G4Exception.
|
||||||
|
+ G4PhysicsLogVector: added checks on vector length: if it is less
|
||||||
|
than 3 throw a G4Exception.
|
||||||
|
+ G4PhysicsLinearVector, G4PhysicsLogVector: more accurate checks in class
|
||||||
|
constructors. Fixed Coverity warnings.
|
||||||
|
+ C++11 revision in 'management' and 'HEPNumerics' modules; general
|
||||||
|
code cleanup/formatting.
|
||||||
|
+ Removed use of deprecated G4USE_STD11 flag.
|
||||||
|
+ Fix to CMake script to support new CMake system.
|
||||||
|
+ Changed date for release 10.7-beta.
|
||||||
|
|
||||||
|
o Graphics Representations:
|
||||||
|
------------------------
|
||||||
|
+ HepPolyhedron, G4Polyhedron: added HepPolyhedronTet.
|
||||||
|
+ G4VisAttributes: clarify that if number of cloud points (for cloud style
|
||||||
|
drawing) is <= 0, this is to be interpreted as under control of the
|
||||||
|
viewer, i.e., to be decided by the viewer. Otherwise this number is to be
|
||||||
|
drawn. Zero is the default value, which may be changed by invoking the
|
||||||
|
method SetForceNumberOfCloudPoints(); also possible to force cloud
|
||||||
|
drawing with SetForceCloud().
|
||||||
|
+ Improved deprecation message for G4AttDefs::operator<<().
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
|
||||||
|
o Intercoms
|
||||||
|
---------
|
||||||
|
+ Removed unnecessary use of deprecated G4USE_STD11 flag in G4AnyMethod.
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
|
||||||
|
o Interfaces
|
||||||
|
----------
|
||||||
|
+ G4UIQt: replaced use of setTextColor() with adoption of rich text html
|
||||||
|
tags (improving visibility in MacOS Dark Mode).
|
||||||
|
+ Fixed deprecation warnings being triggered when using Qt-5.15.
|
||||||
|
+ Use CMake AUTOMOC to automatically generate and compile Moc sources
|
||||||
|
and fixed CMake script to support new CMake system.
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
|
||||||
|
o Materials
|
||||||
|
---------
|
||||||
|
+ G4MaterialPropertiesTable: added ConstPropertyExists() method.
|
||||||
|
+ G4MaterialPropertiesTable, G4MaterialPropertiesIndex: added new
|
||||||
|
properties for scintillation allowing 3 time constants and a second
|
||||||
|
wavelength shifter in the same material.
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
|
||||||
|
o Parameterisations:
|
||||||
|
-----------------
|
||||||
|
+ GFlash:
|
||||||
|
o Substituting Gamma calculation with corresponding STL functions, as
|
||||||
|
suggested in GitHub PR#3. Makes LnGamma calculation 1.4 times faster,
|
||||||
|
and Gamma 1.9 times faster.
|
||||||
|
o GFlashSamplingShowerParameterisation: added X0eff calculation.
|
||||||
|
o Delete local tuning data in GFlashXXXShowerParameterisation class
|
||||||
|
destructors.
|
||||||
|
|
||||||
|
o Particles:
|
||||||
|
---------
|
||||||
|
+ G4ParticleTable: create/destruct only one instance of G4IonTable and
|
||||||
|
associated messenger; define assignment operator and copy constructor
|
||||||
|
as deleted; added cache with pointer to selected particle and get/set
|
||||||
|
methods.
|
||||||
|
+ G4DynamicParticle: added GetBeta() method.
|
||||||
|
+ G4OpticalPhoton: define PDG code as "-22".
|
||||||
|
+ G4NuclideTable: added destruction of messenger
|
||||||
|
+ Added move operators to G4DynamicParticle.
|
||||||
|
Code revision for c++11 and cleanup in 'management' module.
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
+ Fixed Coverity warning.
|
||||||
|
|
||||||
|
o Persistency:
|
||||||
|
-----------
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
+ ASCII:
|
||||||
|
o Fixed Coverity defects warnings.
|
||||||
|
+ GDML:
|
||||||
|
o Fixed reading and writing of const properties of materials.
|
||||||
|
Matrices of size 1x1 are now used both for writing out and reading in
|
||||||
|
of const material. This fixes the inconsistency (using constants by the
|
||||||
|
writer) found in the code. Const material properties with the same name
|
||||||
|
(in different materials) are now written out with the properties table
|
||||||
|
address appended.
|
||||||
|
|
||||||
|
o Physics Lists:
|
||||||
|
-------------
|
||||||
|
+ Fixes to CMake scripts to support new CMake system.
|
||||||
|
+ Builders:
|
||||||
|
o Revised all classes to remove unnecessary members, not destruct models
|
||||||
|
and cross-sections and use updated instantiation of string models.
|
||||||
|
This should help to achieve full deletion of hadronic physics objects
|
||||||
|
at the end of run.
|
||||||
|
o G4QGSPAntiBarionBuilder: created new class to handle anti_proton and
|
||||||
|
anti_neutron at high energies with QGSP. For the light anti-ions
|
||||||
|
(anti_deuteron, anti_triton, anti_He3, and anti_alpha), currently QGSP
|
||||||
|
cannot handle them, therefore FTFP is used.
|
||||||
|
o G4VHyperonBuilder, G4HyperonBuilder, G4HyperonQGSPBuilder: new classes
|
||||||
|
to allow alternative builders for hyperons (and anti-hyperons).
|
||||||
|
The class G4HyperonQGSPBuilder uses QGSP model to handle hyperons (and
|
||||||
|
anti-hyperons) at high energies.
|
||||||
|
o G4HyperonFTFPBuilder: now it derives from G4VHyperonBuilder (physics
|
||||||
|
behind remains unchanged, i.e. it is still based on BERT and FTFP
|
||||||
|
models).
|
||||||
|
o G4HadronicBuilder: new utility class to build kaons, hyperons, and b-,
|
||||||
|
c- particles.
|
||||||
|
o Added second wavelength shifter optical process to the
|
||||||
|
OrderingParameterTable.
|
||||||
|
+ Constructors:
|
||||||
|
o decay:
|
||||||
|
- G4RadioactiveDecayPhysics: enabled flag for isomer production,
|
||||||
|
required after fix to problem report #2226.
|
||||||
|
Updated initialisation to be coherent with recent updates in
|
||||||
|
initialisation of atomic de-excitation.
|
||||||
|
- G4DecayPhysics, G4RadioactiveDecayPhysics, G4SpinDecayPhysics,
|
||||||
|
G4UnknownDecayPhysics: general cleanup. Removed thread local pointers,
|
||||||
|
avoid deleting objects; use C++11 keywords; use standard signatures
|
||||||
|
for constructors; define builder type for the main constructor
|
||||||
|
G4DecayPhysics (bDecay, for others bUnknown).
|
||||||
|
o electromagnetic:
|
||||||
|
- G4OpticalPhysics, G4OpticalPhysicsMessenger: added settings for
|
||||||
|
G4Scintillation to use 3 time constants. Added second wavelength
|
||||||
|
shifter optical process to constructors.
|
||||||
|
- G4EmBuilder: new utility class to allow reducing code duplication for
|
||||||
|
standard and low-energy EM physics constructors. Includes flag for
|
||||||
|
allowing choice of multiple-scattering model.
|
||||||
|
- G4EmStandardPhysics_option1: switch to use new G4EmBuilder utility;
|
||||||
|
fixed StepFunction definition.
|
||||||
|
- G4EmStandardPhysics_option3: switch to use new G4EmBuilder utility;
|
||||||
|
use ICRU90 stopping power data for water and air.
|
||||||
|
- Removed duplicate code by using G4EmBuilder in several constructors,
|
||||||
|
fixed definition of StepFunction, use the same flag as hadronic
|
||||||
|
physics to enable EM interaction of b- and c- mesons and baryons.
|
||||||
|
- G4EmModelActivator: use same options for physics per region as used
|
||||||
|
in EM constructors recently updated.
|
||||||
|
- G4LivermorePolarizedPhysics: use inheritance from G4LivermorePhysics.
|
||||||
|
- G4EmDNAModelActivator: extended to extra available DNA options
|
||||||
|
(DNA_Opt2, DNA_Opt4, DNA_Opt4a, DNA_Opt6, DNA_Opt6a, DNA_Opt7).
|
||||||
|
- Optimisation in initialisation of G4EmDNAChemistry_option3.
|
||||||
|
- Use C++11 features in several constructors.
|
||||||
|
o gamma_lepto_nuclear:
|
||||||
|
- G4EmExtraPhysics, G4EmMessenger: added low-energy limit, set method,
|
||||||
|
and UI command defining low-energy gamma-nuclear model, which is
|
||||||
|
using de-excitation module and providing isomer production and
|
||||||
|
gamma transitions.
|
||||||
|
- G4EmExtraPhysics: extension to anti_nu_mu, nu_e and anti_nu_e
|
||||||
|
processes-models.
|
||||||
|
o hadron_inelastic:
|
||||||
|
- Use the new builder class G4QGSPAntiBarionBuilder to handle
|
||||||
|
anti_proton and anti_neutron at high energies with QGSP.
|
||||||
|
For the light anti-ions - anti_deuteron, anti_triton, anti_He3 and
|
||||||
|
anti_alpha - currently QGSP cannot handle them, therefore FTFP is used.
|
||||||
|
- In all the inelastic physics constructors which are using the builder
|
||||||
|
G4HyperonFTFPBuilder, introduced the new builder G4HyperonBuilder;
|
||||||
|
moreover, the new builder G4HyperonQGSPBuilder is used now in all
|
||||||
|
QGS-based inelastic physics constructor for hyperons (and
|
||||||
|
anti-hyperons) at high energies, while keeping using
|
||||||
|
G4HyperonFTFPBuilder at lower energies.
|
||||||
|
- G4HadronPhysicsFTFP_BERT, G4HadronPhysicsQGSP_BERT,
|
||||||
|
G4HadronInelasticQBBC: added b- and c- particles.
|
||||||
|
- G4HadronPhysicsQGSP_BIC_HP, G4HadronPhysicsQGSP_BIC_AllHP: refactoring
|
||||||
|
consistently with all others. For G4HadronPhysicsQGSP_BIC_HP, the
|
||||||
|
physics remains unchanged; for G4HadronPhysicsQGSP_BIC_AllHP, the
|
||||||
|
physics remains unchanged except for the transition region between
|
||||||
|
Binary and ProtonHP which is now 190-200 MeV (instead than 199-200),
|
||||||
|
as for light ions.
|
||||||
|
o ions:
|
||||||
|
- Cleanup of constructors: fixed names; made all constructor signatures
|
||||||
|
universal, removed thread local members, added c++11 keywords.
|
||||||
|
o stopping:
|
||||||
|
- Cleanup of constructors: fixed names; made all constructor signatures
|
||||||
|
universal, removed thread local members, added c++11 keywords.
|
||||||
|
+ utils:
|
||||||
|
o G4HadParticles: new utility providing several lists of PDG codes for
|
||||||
|
kaons, hyperons, b- and c- particles in order to be used for
|
||||||
|
construction of hadronic physics. Updated list of heavy EM particles.
|
||||||
|
|
||||||
|
o Electromagnetic Processes:
|
||||||
|
-------------------------
|
||||||
|
+ DNA:
|
||||||
|
o Added classes for IRT; added features in management classes for IRT
|
||||||
|
(G4ITReaction, G4ITModelProcessor ...).
|
||||||
|
o Added features in G4DNAMolecularReactionTable for GFDE.
|
||||||
|
o Added molecules (Oxygen, O2, O3, HO2) from: Plante et al.(2017).
|
||||||
|
o G4MoleculeDefinition: copy constructor and assignment operator are not
|
||||||
|
allowed (as for G4ParticleDefinition). Now deleted.
|
||||||
|
o Revised displacement of OH radicals of B1A1 dissociation based on
|
||||||
|
momentum conservation in G4DNAWaterDissociationDisplacer.
|
||||||
|
o Fix to CMake script to support new CMake system.
|
||||||
|
+ Low Energy:
|
||||||
|
o Added new model for polarized gamma elastic scattering, provided by
|
||||||
|
the JAEA group. Updated existing process (G4JAEAElasticScattering) and
|
||||||
|
model (G4JAEAElasticScatteringModel) in order to comply with the new
|
||||||
|
data format. Changed initialisation of JAEA models.
|
||||||
|
o G4LivermorePhotoElectricModel: allow "Water" as a name of water
|
||||||
|
material for low-energy photo-effect.
|
||||||
|
o Added G4LivermoreGammaConversion5DModel class. Reading EPICS2017 data.
|
||||||
|
o Change in G4LivermoreGammaConversion to now derive from
|
||||||
|
G4PairProductionRelModel. Added missing method InitialiseForElement().
|
||||||
|
o Fixed compilation warnings on clang-10.
|
||||||
|
+ Standard:
|
||||||
|
o G4eplusAnnihilation: fixed problem seen in the rare case, when initial
|
||||||
|
energy is null; introducing thermal model of positronium decay to two gammas.
|
||||||
|
In this model, the positronium acquires a mean kinetic energy on
|
||||||
|
formation, which contributes to a small non-collinearity of the
|
||||||
|
gammas, detectable and significant in PET. To activate this model:
|
||||||
|
material->GetIonisation()->SetMeanEnergyPerIonPair(meanKE).
|
||||||
|
A mean kinetic energy of 5 eV produces a projected acollinearity
|
||||||
|
of about 0.5 degrees FWHM, as reported in:
|
||||||
|
K.Shibuya et al., IFMBE Proceedings Vol. 14/3 1667 (2007).
|
||||||
|
o G4UniversalFluctuation: changed 'nmaxCont' from 16 to 8 for speedup.
|
||||||
|
Set value for 'a0' to 42 after optimisations. Minor C++ improvements.
|
||||||
|
o G4UrbanMscModel: tuned 'tlimitmin' computation for e- (for e+ kept
|
||||||
|
unchanged) and changed parameterisation of 'stepmin'; added two private
|
||||||
|
inline methods to reduce code duplication.
|
||||||
|
Removed cache and introduced data struct precomputed at initialisation,
|
||||||
|
added e- range cut to the data structure.
|
||||||
|
o G4BetheHeitler5DModel: change "final" keyword by "override" for virtual
|
||||||
|
methods.
|
||||||
|
o G4LindhardSorensenData: fixed few numbers in the data table.
|
||||||
|
o G4eeToTwoGammaModel: code cleanup; added static flag, which identifies
|
||||||
|
if electron motion is taken into account for sampling of acollinearity,
|
||||||
|
when annihilation happens at rest; ensuring that by default no extra
|
||||||
|
computation is performed; also removed extra printout at initialisation
|
||||||
|
and extra data structure.
|
||||||
|
o Fixed compilation warnings on clang-10.
|
||||||
|
+ Utils:
|
||||||
|
o G4EmParameters, G4EmLowEParameters, G4EmLowEParametersMessenger: added
|
||||||
|
a new parameter - name of the sub-directory with data for Livermore
|
||||||
|
models with variants: "livermore" (default), "epics_2017".
|
||||||
|
Comes with G4EMLOW-7.10 data set and higher.
|
||||||
|
o G4EmParameters, G4EmParametersMessenger, G4VMultipleScattering:
|
||||||
|
removed displacement-beyond-safety option, as may lead to crashes in
|
||||||
|
some circomstances, and wrong results in others.
|
||||||
|
o G4EmParameters, G4EmParametersMessenger, G4EmExtraParametersMessenger,
|
||||||
|
G4VEnergyLossProcess: added two extra sets of StepFunction parameters
|
||||||
|
for light ions and generic ions. Added extra UI commands. Modified
|
||||||
|
interfaces accordingly. Removed old comments.
|
||||||
|
o G4EmLowEParametersMessenger: extended number of DNA PhysicsList options.
|
||||||
|
o G4VEmProcess: removed old unused methods; DefinedMaterial() method is
|
||||||
|
now protected (needed for AtRest processes).
|
||||||
|
o G4LossTableManager: made ResetParameters() method public.
|
||||||
|
o G4VAtomicDeexcitation: optimized arrays initialisation.
|
||||||
|
o G4EmCalculator: fixed printout.
|
||||||
|
+ Xrays:
|
||||||
|
o Implemented three time constants for G4Scintillation, and allow
|
||||||
|
multiple time constants to work with scintillation by particle type.
|
||||||
|
The existing material property names have FAST and SLOW in them, like
|
||||||
|
FASTTIMECONSTANT. This doesn't generalize well. Also YIELDRATIO as a
|
||||||
|
single value doesn't generalize to three time constants. Proposal is
|
||||||
|
to create new names SCINTILLATIONTIMECONSTANT1/2/3 and the same for
|
||||||
|
other parameters. The existing names are kept for backwards
|
||||||
|
compatibility, with the idea to remove them in the next major release.
|
||||||
|
There is a flag in G4Scintillation, with messenger command in the
|
||||||
|
OpticalPhysics list, to use the new method:
|
||||||
|
/process/optical/scintillation/setEnhancedTimeConstants true.
|
||||||
|
Results are unchanged if using same values.
|
||||||
|
Set verbosity levels correctly.
|
||||||
|
o G4VXTRenergyLoss: fixed destructor.
|
||||||
|
o Code formatting.
|
||||||
|
|
||||||
|
o Generic Processes:
|
||||||
|
-----------------
|
||||||
|
+ Biasing:
|
||||||
|
o G4ImportanceProcess: added process type as fParallel.
|
||||||
|
+ Cuts:
|
||||||
|
o Revision for use of c++11 constructs. Code cleanup and formatting.
|
||||||
|
+ Management:
|
||||||
|
o G4ProcessManagerMessenger: use cache pointer of selected particle
|
||||||
|
in the G4ParticleTable class.
|
||||||
|
o G4ProcessTable: enabled deletion of all processes except
|
||||||
|
G4Transportation at the end of run.
|
||||||
|
o Fixed Coverity warning for uninitialised data in G4VProcess.
|
||||||
|
o C++11 revision and code cleanup/formatting.
|
||||||
|
+ Optical:
|
||||||
|
o Added second wavelength shifting process, G4OpWLS2, within the same
|
||||||
|
material.
|
||||||
|
o Use new ConstPropertyExists(int) method rather than passing strings.
|
||||||
|
o G4OpRayleigh: avoid double deletion of property vectors.
|
||||||
|
o Code cleanup and improved readability.
|
||||||
|
+ Parameterisation:
|
||||||
|
o G4FastSimulationHelper: merged ActivateFastSimulation() calls for mass
|
||||||
|
and parallel geometry cases.
|
||||||
|
o G4FastSimulationManager, G4VFastSimulationModel: removed redefinition
|
||||||
|
of G4Envelope type.
|
||||||
|
o Added sanity check for root logical volumes in regions for
|
||||||
|
G4GlobalFastSimulationManager. UI command /param/showSetup works also
|
||||||
|
if no parallel world is present.
|
||||||
|
+ Scoring:
|
||||||
|
o G4ParallelWorldProcess, G4ParallelWorldScoringProcess: use new PDG
|
||||||
|
code for optical photon, "-22".
|
||||||
|
o G4ParallelWorldProcess: make some private methods and data members
|
||||||
|
protected so that this class can be extendable.
|
||||||
|
|
||||||
|
o Hadronic Processes:
|
||||||
|
------------------
|
||||||
|
+ Fixes to CMake scripts to support new CMake system.
|
||||||
|
+ cross_sections
|
||||||
|
o G4ElNeutrinoNucleusTotXsc: new class for (nu_e,anti_nu_e)-nucleus
|
||||||
|
cross-sections.
|
||||||
|
o G4PhotoNuclearCrossSection: corrected threshold for
|
||||||
|
gamma + p -> pi0 + p, extended for use on 3H and 3He targets.
|
||||||
|
o G4HadronNucleonXsc: general clean-up of the code; use PDG number
|
||||||
|
instead of particle pointer; removed instantiation of most of hadrons,
|
||||||
|
optimisation in selection of parameterisation parameters.
|
||||||
|
o G4CrossSectionElastic, G4CrossSectionInelastic: fix for ions and
|
||||||
|
anti-ions, where the max energy of applicability of the (elastic and
|
||||||
|
inelastic) cross-sections must scale with the absolute baryonic number;
|
||||||
|
however, the cross-sections objects are often shared between the
|
||||||
|
different types of ions (d, t, He3, alpha, and genericIon), therefore
|
||||||
|
we scale by a large value (256, safely larger than the number of
|
||||||
|
nucleons of the heaviest nuclides).
|
||||||
|
o Fixed compilation warnings on clang-10.
|
||||||
|
+ management
|
||||||
|
o G4HadronicProcess: fixed Coverity defect warning to EP check method for
|
||||||
|
the case when primary particle remains in the interaction.
|
||||||
|
o G4HadronicProcessStore: in the method Dump(), check the internal
|
||||||
|
verbosity level as well as the newly introduced global hadronic
|
||||||
|
verbosity level, returning immediately (without printing anything) if
|
||||||
|
one of these is 0. Extended default initialisation printout to sigma-,
|
||||||
|
D-, B-. Removed check for G4HadronicException, where it cannot be;
|
||||||
|
limit printout on kaon0 in final state.
|
||||||
|
o Removed use of deprecated G4USE_STD11 flag.
|
||||||
|
o G4HadLeadBias: replaced 'G4int' with 'size_t' to fix warnings
|
||||||
|
on Windows.
|
||||||
|
+ models/binary_cascade
|
||||||
|
o G4BinaryCascade: fixed memory leak at exit.
|
||||||
|
+ models/cascade
|
||||||
|
o Fixed non-conservation warnings coming from G4HadronicProcess due to
|
||||||
|
sub-threshold reactions in Bertini. Sub-threshold reactions are now
|
||||||
|
treated as having a "non-interaction" final state, that is, the initial
|
||||||
|
particles are simply copied to the final state.
|
||||||
|
o Fixed compilation warnings on clang-10.
|
||||||
|
+ models/de_excitation
|
||||||
|
o G4PhotonEvaporation, G4DeexPrecoParameters, G4DeexParametersMessenger:
|
||||||
|
added extra flag 'IsomerProduction'; if enabled. photon evaporation
|
||||||
|
samples the time of gamma transition; added C++ interface and UI command
|
||||||
|
allowing to set this flag; radioactive decay constructor should enable
|
||||||
|
this parameter. Addressing problem report #2226.
|
||||||
|
o G4DeexPrecoParameters: in method Dump(), check the global verbosity
|
||||||
|
level of hadronics (if zero, do not print anything).
|
||||||
|
o Fixed compilation warnings on clang-10.
|
||||||
|
+ models/inclxx
|
||||||
|
o G4INCLXXInterfaceStore: in method EmitBigWarning(), check the global
|
||||||
|
verbosity level of hadronics (if zero, do not print anything).
|
||||||
|
o Fixed compilation warnings on clang-10.
|
||||||
|
+ models/lepto_nuclear
|
||||||
|
o G4NuMuNucleusCcModel, G4NeutrinoNucleusModel, new access methods
|
||||||
|
and minor fixes in in nu-mu nucleus model.
|
||||||
|
o Added classes G4ANuElNucleusCcModel and G4ANuElNucleusNcModel,
|
||||||
|
for anti_nu_e. Initialization from G4PARTICLEXS (neutrino/anti_nu_e).
|
||||||
|
o Added classes G4NuElNucleusCcModel and G4NuElNucleusNcModel,
|
||||||
|
for nu_e. Initialization from G4PARTICLEXS (neutrino/nu_e).
|
||||||
|
o Added classes G4ANuMuNucleusCcModel and G4ANuMuNucleusNcModel,
|
||||||
|
for anti_mu_nu. Initialization from G4PARTICLEXS (neutrino/anti_nu_mu).
|
||||||
|
o G4NuMuNucleusCcModel, G4NuMuNucleusNcModel, G4NeutrinoNucleusModel:
|
||||||
|
rearrangement of initialisation methods and arrays.
|
||||||
|
Fixes in CoherentPion() method, cleanup of Cc and Nc.
|
||||||
|
o G4NeutrinoNucleusModel: added K+, K- in final state.
|
||||||
|
o Fixed Coverity warnings for defects.
|
||||||
|
+ models/management
|
||||||
|
o G4HadronicInteractionRegistry: delete HP and PHP at the end of run.
|
||||||
|
o G4HadronicInteraction: provide default implementation for all virtual
|
||||||
|
methods.
|
||||||
|
o G4VHighEnergyGenerator, G4VIntraNuclearTransportModel,
|
||||||
|
G4VPreCompoundModel: cleaned up: removed old commented lines,
|
||||||
|
code format, C++11 keywords.
|
||||||
|
+ models/particle_hp
|
||||||
|
o Allow printout only if the global hadronic verbosity level is not zero.
|
||||||
|
o G4ParticleHPHash, G4ParticleHPCaptureFS: fixes for implicit conversion
|
||||||
|
between 'size_t' and 'G4int', to avoid warnings on Windows.
|
||||||
|
+ models/parton_string
|
||||||
|
o Improved treatment of antibaryon interactions in QGS.
|
||||||
|
In G4QGSMFragmentation, corrected the treatment of low-mass diquark-
|
||||||
|
antidiquark strings. In addition to this, introduced the Mt
|
||||||
|
distribution of produced hadrons.
|
||||||
|
In G4VLongitudinalStringDecay, introduced in SetMinimalStringMass()
|
||||||
|
a check that the strings are of allowed type: quark-antiquark, diquark-
|
||||||
|
antidiquark, quark-diquark and antiquark-antidiquark. Introduced also
|
||||||
|
for diquark-antidiquark strings a special algorithm (already present
|
||||||
|
for the other types of allowed strings) for treating low-mass strings
|
||||||
|
with masses below known hadrons.
|
||||||
|
o In G4QGSParticipants, the average transverse momentum of partons in a
|
||||||
|
hadron is set to zero (according to the study of transverse momentum
|
||||||
|
distributions of hadrons produced in hadronic interactions, in
|
||||||
|
particular the study of Xf - Pt correlations presented by the NA49
|
||||||
|
Collaboration). In G4QuarkExchange, the reggeon exchanges are now
|
||||||
|
treated as annihilation and creation of quark-antiquark pairs (to
|
||||||
|
reflect in inelastic processes the non-vacuum reggeon exchanges present
|
||||||
|
in antiparticle-particle elastic scattering amplitudes).
|
||||||
|
o G4VLongitudinalStringDecay, G4LundStringFragmentation,
|
||||||
|
G4ExcitedStringDecay: inherit from G4HadronicInteraction; destruction
|
||||||
|
of these models at the end of run is now done by the hadron model
|
||||||
|
store; removed implementations of private operators.
|
||||||
|
o G4VStringFragmentation: use inheritance from G4HadronicInteraction;
|
||||||
|
removed implementations of private operators.
|
||||||
|
o G4SPBaryonTable: changed return type of the method 'length()' from
|
||||||
|
'double' to 'size_t', to fix warnings on Windows.
|
||||||
|
o G4FTFModel, G4FTFParticipants: clean-up: removed unused methods,
|
||||||
|
delete operators, use of C++11 keywords.
|
||||||
|
o G4VParticipants, G4VPartonStringModel, G4VStringFragmentation,
|
||||||
|
G4StringModel: clean-up; removed unused methods, delete operators,
|
||||||
|
use of C++11 keywords.
|
||||||
|
o G4QGSModel: clean-up; removed unused methods, delete operators, use of
|
||||||
|
C++11 keywords, moved inline implementation to source.
|
||||||
|
+ models/qmd
|
||||||
|
o G4QMDReaction: added code in ApplyYourself() to get cross-section when
|
||||||
|
projectile is pion. Replaced data member G4PiNuclearCrossSection with
|
||||||
|
G4BGGPionElasticXS and G4BGGPionInelasticXS.
|
||||||
|
In G4QMDGroundStateNucleus constructor, move check for p or n
|
||||||
|
projectile earlier in code so baryon number can be conserved.
|
||||||
|
Addressing problem report #2236.
|
||||||
|
+ models/quasi_elastic
|
||||||
|
o G4QuasiElRatios: fixed memory leak at exit.
|
||||||
|
+ models/radioactive_decay
|
||||||
|
o G4RadioactiveDecayBase, G4RadioactiveDecay: in BuildPhysicsTable(),
|
||||||
|
check the global hadronic verbosity level before printing out
|
||||||
|
information.
|
||||||
|
+ models/rpg
|
||||||
|
o Fixed Coverity warnings for unused variables.
|
||||||
|
+ models/theo_high_energy
|
||||||
|
o G4QuasiElasticChannel: use inheritance from G4HadronicInteraction.
|
||||||
|
In G4TheoFSGenerator do not destruct G4QuasiElasticChannel.
|
||||||
|
o G4QuasiElasticChannel, G4TheoFSGenerator: clean-up; use of C++11
|
||||||
|
keywords and loops, removed unused methods, formatting.
|
||||||
|
+ models/util
|
||||||
|
o Fixed compilation warnings on clang-10.
|
||||||
|
+ processes
|
||||||
|
o G4MuNeutrinoNucleusProcess, G4ElNeutrinoNucleusProcess: extended to
|
||||||
|
anti_nu_mu, nu_e and anti_nu_e.
|
||||||
|
+ stopping
|
||||||
|
o G4HadronicAbsorptionFritiof,
|
||||||
|
G4HadronicAbsorptionFritiofWithWithBinaryCascade: simplified
|
||||||
|
instantiation of the FTF model, do not destruct its components.
|
||||||
|
o G4MuonicAtomDecay: fixed Coverity defect warning.
|
||||||
|
+ util
|
||||||
|
o G4HadronicParameters: added modifiers for Cascade-FTF transition.
|
||||||
|
Creates the new messenger.
|
||||||
|
o G4HadronicParametersMessenger: created new messenger class for
|
||||||
|
G4HadronicParameters. For the time being it has only the global
|
||||||
|
verbosity level for hadronics.
|
||||||
|
o G4HadFinalState: fixed warning on Windows for implicit conversions
|
||||||
|
from 'size_t' to 'G4int'.
|
||||||
|
|
||||||
|
o Readout
|
||||||
|
-------
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
|
||||||
|
o Run
|
||||||
|
---
|
||||||
|
+ G4RunManager, G4WorkerRunManager: added layered mass geometry option
|
||||||
|
for the new "probe" scoring mesh.
|
||||||
|
+ G4RunManager: do not call G4ParticleTable for Messenger deletion.
|
||||||
|
+ Modified G4MTRunManager to enable inheritance for new G4TaskRunManager.
|
||||||
|
+ G4MTRunManager, G4RunManager: fixes for windows, to avoid inline static
|
||||||
|
methods and use export flag G4RUN_DLL for static data.
|
||||||
|
+ Added second wavelength shifter process to G4PhysicsListHelper.
|
||||||
|
+ G4VPhysicsConstructor: added harmless call to G4HadronicParameters in
|
||||||
|
constructors, setting a default parameter; needed to create the instance
|
||||||
|
of the G4HadronicParameters singleton before run initialization.
|
||||||
|
+ General code formatting.
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
|
||||||
|
o Tasking
|
||||||
|
-------
|
||||||
|
+ New module implementing a new Geant4 run manager, G4TaskRunManager,
|
||||||
|
enabling use of the TBL tasking system for the event loop. The tasking
|
||||||
|
system is fully compatible with Intel TBB, which can be selected if
|
||||||
|
GEANT4_USE_TBB=ON is specified when configuring CMake. The default
|
||||||
|
behavior, however, is to submit the tasks to an internal thread-pool
|
||||||
|
and task-queue.
|
||||||
|
A comprehensive description of the system and options provided can be
|
||||||
|
found in the README document located within this module.
|
||||||
|
|
||||||
|
o Track & Tracking
|
||||||
|
----------------
|
||||||
|
+ G4Track: use new G4OpticalPhoton PDG code; removed static thread local
|
||||||
|
variables; slightly simplified velocity computation; fixed Coverity
|
||||||
|
warnings connected with unnecessary checks for valid pointers to G4Step
|
||||||
|
and G4DynamicParticle; removed commented code.
|
||||||
|
Avoid using velocity table, use GetBeta() method from G4DynamicParticle
|
||||||
|
instead; expected minor speedup.
|
||||||
|
+ Minor c++11 revision; code cleanup and formatting in tracking module.
|
||||||
|
+ Fixed minor Coverity defect for uninitialised data in G4SteppingManager.
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories.
|
||||||
|
|
||||||
|
o Visualization:
|
||||||
|
-------------
|
||||||
|
+ Cleanup CMake build, removing obsolete granular library options and
|
||||||
|
explicit include_directories. Fixed compilation warnings on clang-10.
|
||||||
|
+ Use CMake AUTOMOC to automatically generate and compile Moc sources
|
||||||
|
and fixed CMake script to support new CMake system.
|
||||||
|
+ management:
|
||||||
|
o Fixed case where models with no extent do not contribute to scene's
|
||||||
|
extent.
|
||||||
|
o Trap infinite loop when looking for a fallback graphics system when
|
||||||
|
issuing "/vis/sceneHandler/create".
|
||||||
|
o G4VisExecutive: added support for OIQT driver, via "OIQT" or "OI"
|
||||||
|
keywords, provided the G4OpenInventor library has been built with
|
||||||
|
the OIQT driver included.
|
||||||
|
o Added new command "/vis/geometry/set/forceCloud".
|
||||||
|
o G4VVisCommand: added CheckView for future utility.
|
||||||
|
o G4VisCommandsScene: improved output layout for "/vis/scene/showExtents".
|
||||||
|
o Bug fix: rebuild graphics databases after "/vis/filtering/*/mode".
|
||||||
|
o Improved printing of available systems and models.
|
||||||
|
+ modeling:
|
||||||
|
o Suppress warnings while filter not fully established.
|
||||||
|
o Minor code tidy.
|
||||||
|
+ OpenGL:
|
||||||
|
o Improved guidance and tidy "/vis/ogl/" commands.
|
||||||
|
o Removed no longer required dependence on GLU.
|
||||||
|
o Removed support for Qt4.
|
||||||
|
o Fixed bug in "/vis/ogl/export" when dot '.' is included in name.
|
||||||
|
+ OpenInventor:
|
||||||
|
o Enable configuration for OIQT driver, as orthogonal to OIX and OIXE.
|
||||||
|
o Corrections to OIQT viewer and changes for use with Qt UI.
|
||||||
|
|
||||||
|
o Data Sets:
|
||||||
|
---------
|
||||||
|
+ G4EMLOW-7.12:
|
||||||
|
o Added new cross-section files for protons (HT).
|
||||||
|
o Added EPICS2017 data for gamma conversion (ZL).
|
||||||
|
o Added new JAEA elastic polarized gamma scattering data files
|
||||||
|
in compressed format.
|
||||||
|
o Added a new numerical DCS set for e-/e+ elastic scattering
|
||||||
|
obtained by numerical Dirac Partial Wave Analysis (DPWA).
|
||||||
|
More information can be found in the 'dpwa/Readme.txt' file.
|
||||||
|
|
||||||
|
o Examples:
|
||||||
|
--------
|
||||||
|
+ Updated reference outputs, macros, READMEs and scripts.
|
||||||
|
+ advanced/air_shower
|
||||||
|
o Added missing include statement in UltraDetectorConstruction.
|
||||||
|
+ advanced/fastAerosol
|
||||||
|
o New example showing use of FastAerosol geometry classes, allowing to
|
||||||
|
efficiently and accurately simulate particle transport through aerosols
|
||||||
|
containing billions of randomly-positioned droplets, using an ordinary
|
||||||
|
workstation. See: MacFadden, N., Knaian, A., "Efficient Modeling of
|
||||||
|
Particle Transport through Aerosols in Geant4", manuscript in
|
||||||
|
preparation, 2020.
|
||||||
|
+ advanced/gammaray_telescope
|
||||||
|
o GammaRayTelHadronPhysics, GammaRayTelIonPhysics: fixed
|
||||||
|
compilation problems due to incorrect FTFP instantiation.
|
||||||
|
+ advanced/hadrontherapy
|
||||||
|
o Deleted many obsolete macro files.
|
||||||
|
o Code cleaup; removed Root script folder and other cosmetics.
|
||||||
|
+ basic/B5
|
||||||
|
o Migrated main() to use new G4RunManagerFactory.
|
||||||
|
The new G4TaskRunManager is exercised by default in MT builds.
|
||||||
|
+ extended/electromagnetic/TestEm1
|
||||||
|
o PhysicsList: use G4RadioactiveDecayBase instead of deprecated
|
||||||
|
G4RadioactiveDecay. Minor code cleanup.
|
||||||
|
+ extended/electromagnetic/TestEm4
|
||||||
|
+ extended/electromagnetic/TestEm7
|
||||||
|
o Do not call vis.mac automatically in interactive mode.
|
||||||
|
+ extended/electromagnetic/TestEm11
|
||||||
|
o PhysicsList: use G4RadioactiveDecayBase instead of deprecated
|
||||||
|
G4RadioactiveDecay. Minor code cleanup.
|
||||||
|
+ extended/hadronic/Hadr00
|
||||||
|
o HistoManagerMessenger: fixed destructor.
|
||||||
|
+ extended/hadronic/Hadr02
|
||||||
|
o HadronPhysicsCRMC_FTFP_BERT , HadronPhysicsHIJING , HadronPhysicsUrQMD:
|
||||||
|
introduced the new class G4HyperonBuilder which is now needed when
|
||||||
|
using G4HyperonFTFPBuilder.
|
||||||
|
+ extended/hadronic/Hadr03
|
||||||
|
o PhysicsList: added G4HadronPhysicsQGSP_BIC, Shielding, RadioactiveDecay.
|
||||||
|
o GammaNuclearPhysics: added G4LowEGammaNuclearModel.
|
||||||
|
o Added GammaNuclearPhysicsLEND.
|
||||||
|
o HistoManager, SteppingAction: added plot of e-.
|
||||||
|
o Modified gamma.mac script; added Au196.mac.
|
||||||
|
+ extended/hadronic/Hadr06
|
||||||
|
o HistoManager, TrackingAction: plot particle energy at creation.
|
||||||
|
o GammaNuclearPhysics: added G4LowEGammaNuclearModel.
|
||||||
|
+ extended/hadronic/Hadr07
|
||||||
|
+ extended/hadronic/NeutronSource
|
||||||
|
o GammaNuclearPhysics: added G4LowEGammaNuclearModel.
|
||||||
|
+ extended/medical/dna/chem6
|
||||||
|
o New example providing scoring of the radiochemical yield G defined as
|
||||||
|
(Number of species X) / (100 eV of deposited energy), as a function of
|
||||||
|
time and LET. The details are described in the following paper:
|
||||||
|
J. Appl. Phys. 125 (2019) 104301.
|
||||||
|
+ extended/optical/OpNovice2
|
||||||
|
o Use new scintillation time constant parameter.
|
||||||
|
o Added code to generate statistics for wavelength shifting.
|
||||||
|
o Added wls.mac to test WLS and new process WLS2.
|
||||||
|
o Removed string comparisons and redundant calls in SteppingAction.
|
||||||
|
o Removed redundant G4AnalysisManager::Instance() calls.
|
||||||
|
+ extended/parallel/TBB
|
||||||
|
o Updated to use new tasking system which is fully compatible with TBB.
|
||||||
|
+ extended/parallel/ThreadsafeScorers
|
||||||
|
o Updated to use new tasking system; forcing use of G4TaskRunManager.
|
||||||
|
o Added example of user code leveraging tasking in TSRunAction; it
|
||||||
|
leverages tasks on the master thread at the end of the run to generate
|
||||||
|
some strings of output via a nested hierarchy of tasks and uses the
|
||||||
|
features of the G4TaskGroup to combine the strings in the order that
|
||||||
|
they were submitted to the task-group (thus producing the same output
|
||||||
|
result as the serial version).
|
||||||
|
+ extended/persistency/gdml/G01
|
||||||
|
o Use [] brackets in loop.gdml sample to show how to index names
|
||||||
|
and dimensions in loops.
|
||||||
|
+ extended/persistency/P01
|
||||||
|
o Fixed CMake script for search or Root macros.
|
||||||
|
+ extended/radioactivedecay/Activation
|
||||||
|
o GammaNuclearPhysics: added G4LowEGammaNuclearModel.
|
||||||
|
o In Run, corrected a protection on maximum number of histograms.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -33,8 +33,8 @@ List of fixes included in this public patch since the public release 10.6:
|
|||||||
o Turn off verbosity flags by default in G4IntegratorDriver,
|
o Turn off verbosity flags by default in G4IntegratorDriver,
|
||||||
G4InterpolationDriver and G4MagIntegratorDriver.
|
G4InterpolationDriver and G4MagIntegratorDriver.
|
||||||
+ navigation:
|
+ navigation:
|
||||||
o Avoid looping infinitely by pushing N times with increasing step size.
|
o Avoid looping infinitely in G4RegularNavigation by pushing N times
|
||||||
Addressing problem report #2196.
|
with increasing step size. Addressing problem report #2196.
|
||||||
+ solids/specific:
|
+ solids/specific:
|
||||||
o Re-established parameterisation mechanism for G4Tet and G4UTet which was
|
o Re-established parameterisation mechanism for G4Tet and G4UTet which was
|
||||||
removed by mistake. Addressing problem report #2209.
|
removed by mistake. Addressing problem report #2209.
|
||||||
|
|||||||
+99
-15
@@ -29,46 +29,130 @@ add this in the documentation for the changed file as [BUGFIX #BUGNUMBER].
|
|||||||
* Reverse chronological order (last date on top), please *
|
* Reverse chronological order (last date on top), please *
|
||||||
|
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
21st April 2020 - Ben Morgan (cmake-V10-05-39)
|
|
||||||
- BUGFIX: Only store variables in Geant4PackageCache if they have
|
|
||||||
a value.
|
|
||||||
|
|
||||||
6th April 2020 - Ben Morgan (cmake-V10-05-38)
|
17th June 2020 - Jonathan Madsen (cmake-V10-06-25)
|
||||||
|
- Moved TBB before PTL
|
||||||
|
- Forced PTL_USE_TBB to be set to GEANT4_USE_TBB when not
|
||||||
|
using system PTL
|
||||||
|
- Added Geant4::G4ptl ALIAS targets for build tree testing
|
||||||
|
- Added support for building G4ptl, GEANT4_USE_TBB option
|
||||||
|
- Updated FindTBB.cmake to be more robust
|
||||||
|
- Updates to PTL internal/external handling
|
||||||
|
- fixed PTL find_dependency
|
||||||
|
|
||||||
|
15th June 2020 - Gunter Folger (cmake-V10-06-24)
|
||||||
|
- Switch to G4EMLOW 7.12
|
||||||
|
|
||||||
|
8th June 2020 - Ben Morgan (cmake-V10-06-23)
|
||||||
|
- Default GEANT4_USE_NEW_CMAKE to ON to use new build organization
|
||||||
|
as the primary system.
|
||||||
|
- Fix bug in setting of AUTOMOC
|
||||||
|
- Handle install of G4clhep{-static} independently of main modules
|
||||||
|
due it being built outside the category system.
|
||||||
|
- Retain GEANT4_BUILDTREE_INCLUDE_DIRS in new CMake system to support
|
||||||
|
clients that may not yet support CMake target usage requirements.
|
||||||
|
- Protect recursion into tests module on existence of the directory
|
||||||
|
|
||||||
|
2nd June 2020 - Guilherme Amadio (cmake-V10-06-22)
|
||||||
|
- Avoid warnings from propagating CMAKE_DISABLE_FIND_PACKAGE_ROOT
|
||||||
|
down to tests.
|
||||||
|
|
||||||
|
30th May 2020 - Ben Morgan (cmake-V10-06-21)
|
||||||
|
- Modules/Geant4DeveloperAPI.cmake: Import new "target" style API for
|
||||||
|
declaring and composing libraries from modules of source code.
|
||||||
|
Provide GEANT4_USE_NEW_CMAKE option, OFF by default, to switch between
|
||||||
|
systems.
|
||||||
|
|
||||||
|
28th May 2020 - Gunter Folger (cmake-V10-06-20)
|
||||||
|
- Switch to G4EMLOW 7.11
|
||||||
|
|
||||||
|
26th May 2020 - Ben Morgan (cmake-V10-06-19)
|
||||||
|
- Use "VecGeom::vecgeom" as imported target name for VecGeom library
|
||||||
|
to bring in line with upstream master of VecGeom. Export VecCore_DIR
|
||||||
|
if it is set to package cache file, as new VecGeomConfig needs to refind
|
||||||
|
VecCore.
|
||||||
|
|
||||||
|
20 May 2020 - Frederick Jones (cmake-V10-06-18)
|
||||||
|
- Modules/G4InterfaceOptions.cmake: added GEANT4_USE_XM to Open
|
||||||
|
Inventor X driver code block to correct Xm and Xt link order.
|
||||||
|
|
||||||
|
19th May 2020 - Guilherme Amadio (cmake-V10-06-17)
|
||||||
|
- Propagate value of CMAKE_DISABLE_FIND_PACKAGE_ROOT down to tests
|
||||||
|
that optionally support ROOT to allow testing Geant4 with ROOT support
|
||||||
|
disabled. This is necessary when testing Geant4 with a different C++
|
||||||
|
standard than ROOT when it's installed.
|
||||||
|
|
||||||
|
29th April 2020 - Ben Morgan (cmake-V10-06-16)
|
||||||
|
- Add GEANT4_USE_NEW_CMAKE option in preparation for testing of modular
|
||||||
|
build updates. Added now to suppress Continuous warnings
|
||||||
|
|
||||||
|
22 April 2020 - Frederick Jones (cmake-V10-06-15)
|
||||||
|
- Modules/G4InterfaceOptions.cmake, Templates/Geant4Config.cmake.in:
|
||||||
|
Added support for Open Inventor Qt Vis driver to be built
|
||||||
|
and used in applications. The library can be built with the
|
||||||
|
OIQT driver, or with the OIX/OIXE drivers, but not both.
|
||||||
|
|
||||||
|
6th April 2020 - Ben Morgan (cmake-V10-06-14)
|
||||||
- Activate build of geant4py when GEANT4_USE_PYTHON is set
|
- Activate build of geant4py when GEANT4_USE_PYTHON is set
|
||||||
Check that MT builds use global-dynamic TLS to allow Python
|
Check that MT builds use global-dynamic TLS to allow Python
|
||||||
module loading of the Geant4 dynamic libraries.
|
module loading of the Geant4 dynamic libraries.
|
||||||
|
|
||||||
3rd April 2020 - Guilherme Amadio (cmake-V10-05-37)
|
21st April 2020 - Ben Morgan (cmake-V10-06-13)
|
||||||
|
- BUGFIX: Only store variables in Geant4PackageCache if they have
|
||||||
|
a value.
|
||||||
|
|
||||||
|
20th April 2020 - Ben Morgan (cmake-V10-06-12)
|
||||||
|
- Remove Qt4 support
|
||||||
|
|
||||||
|
17th April 2020 - Ben Morgan (cmake-V10-06-11)
|
||||||
|
- Add GEANT4_USE_PYTHON option to suppress Continuous warnings
|
||||||
|
|
||||||
|
3rd April 2020 - Guilherme Amadio (cmake-V10-06-10)
|
||||||
- Use full path to datasets if GEANT4_INSTALL_DATADIR is an absolute path
|
- Use full path to datasets if GEANT4_INSTALL_DATADIR is an absolute path
|
||||||
|
|
||||||
2nd April 2020 - Guilherme Amadio (cmake-V10-05-36)
|
2nd April 2020 - Guilherme Amadio (cmake-V10-06-09)
|
||||||
- Customize CMAKE_INSTALL_DATADIR in a single location
|
- Customize CMAKE_INSTALL_DATADIR in a single location
|
||||||
|
|
||||||
18th March 2020 - Gunter Folger (cmake-V10-05-35)
|
18th March 2020 - Gunter Folger (cmake-V10-06-08)
|
||||||
- In Modules/G4CPack.cmake suppress warnings about icc libraries not existing
|
- In Modules/G4CPack.cmake suppress warnings about icc libraries not existing
|
||||||
for Intel icc version 19.
|
for Intel icc version 19.
|
||||||
|
|
||||||
14th February 2020 - Ben Morgan (cmake-V10-05-34)
|
16th March 2020 - Gunter Folger (cmake-V10-06-07)
|
||||||
|
- Switch to G4EMLOW 7.10
|
||||||
|
|
||||||
|
14th February 2020 - Ben Morgan (cmake-V10-06-06)
|
||||||
- No longer create gnumake symlinks on Windows
|
- No longer create gnumake symlinks on Windows
|
||||||
Windows permissions may prevent creation of symlinks, leading to
|
Windows permissions may prevent creation of symlinks, leading to
|
||||||
errors at install time. As gnumake is no longer supported on
|
errors at install time. As gnumake is no longer supported on
|
||||||
Windows, protect symlink creation with test on host platform.
|
Windows, protect symlink creation with test on host platform.
|
||||||
|
|
||||||
5th February 2020 - Ben Morgan (cmake-V10-05-33)
|
4th February 2020 - Ben Morgan (cmake-V10-06-05)
|
||||||
- Apply patch from TXCorp to allow compilation on Windows using Clang
|
|
||||||
|
|
||||||
4th February 2020 - Ben Morgan (cmake-V10-05-32)
|
|
||||||
- BUGFIX 2221
|
- BUGFIX 2221
|
||||||
Use "${FOO:-}" variable expansion and "-z" test to check for
|
Use "${FOO:-}" variable expansion and "-z" test to check for
|
||||||
undefined variables in Bourne Shell scripts. Prevents errors when
|
undefined variables in Bourne Shell scripts. Prevents errors when
|
||||||
shell is in "set -u" mode. Report and patch supplied by Michael Reilly
|
shell is in "set -u" mode. Report and patch supplied by Michael Reilly
|
||||||
|
|
||||||
28th January 2020 - Gunter Folger (cmake-V10-05-31)
|
27th January 2020 - Gunter Folger (cmake-V10-06-04)
|
||||||
- Switch to patched dataset for G4EMLOW 7.9.1
|
- Switch to G4EMLOW 7.9.1
|
||||||
|
|
||||||
15th January 2020 - Ben Morgan (cmake-V10-05-30)
|
15th January 2020 - Ben Morgan (cmake-V10-06-03)
|
||||||
- Quote VECGEOM_COMPILE_DEFINITIONS to avoid incorrect argument errors
|
- Quote VECGEOM_COMPILE_DEFINITIONS to avoid incorrect argument errors
|
||||||
|
|
||||||
|
6th January 2020 - Ben Morgan (cmake-V10-06-02)
|
||||||
|
- Apply patch from TXCorp to allow compilation on Windows using Clang
|
||||||
|
|
||||||
|
12th December 2019 - Ben Morgan (cmake-V10-06-01)
|
||||||
|
- Remove requirement on presence of XQuartz GLU library
|
||||||
|
- No longer save glu related variables in the package cache
|
||||||
|
|
||||||
|
6th December 2019 - Ben Morgan (cmake-V10-06-00)
|
||||||
|
- Remove obsolete Geant4Wrapping module in preparation for full G4Py
|
||||||
|
build support
|
||||||
|
- Rename remaining internal "Geant4..." modules to "G4" convention
|
||||||
|
Retain Geant4DefineModule and Geant4LibraryTargets until new modularization
|
||||||
|
scheme in place.
|
||||||
|
- Format G4ClangFormat
|
||||||
|
|
||||||
25th November 2019 - Ben Morgan (cmake-V10-05-29)
|
25th November 2019 - Ben Morgan (cmake-V10-05-29)
|
||||||
- Disable configuration of Wt UI/Vis driver due to it no longer
|
- Disable configuration of Wt UI/Vis driver due to it no longer
|
||||||
compiling with recent Wt versions
|
compiling with recent Wt versions
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
function(WRITE_UNINSTALL_TARGET_SCRIPT)
|
function(write_uninstall_target_script)
|
||||||
# Create uninstall target template file, if it doesn't exist...
|
# Create uninstall target template file, if it doesn't exist...
|
||||||
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in)
|
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in)
|
||||||
set(__uninstall_filename ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake.in)
|
set(__uninstall_filename ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake.in)
|
||||||
@@ -42,10 +42,8 @@ endforeach(file)
|
|||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Call the file writing function, if needed
|
# Call the file writing function, if needed
|
||||||
WRITE_UNINSTALL_TARGET_SCRIPT()
|
write_uninstall_target_script()
|
||||||
|
|
||||||
# Configure the file that reads the install manifest and processes the files
|
# Configure the file that reads the install manifest and processes the files
|
||||||
configure_file(
|
configure_file(
|
||||||
@@ -56,5 +54,3 @@ configure_file(
|
|||||||
# Add the uninstall target
|
# Add the uninstall target
|
||||||
add_custom_target(uninstall
|
add_custom_target(uninstall
|
||||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
# - Find StatTest
|
# - Find StatTest
|
||||||
# This module tries to find the StatTest application
|
# This module tries to find the StatTest application
|
||||||
# Once done this will define
|
# Once done this will define
|
||||||
#
|
#
|
||||||
# STATTEST_FOUND - Application found
|
# STATTEST_FOUND - Application found
|
||||||
# STATTEST_APP - Application
|
# STATTEST_APP - Application
|
||||||
# STATTEST_CMD - Command line to run the application
|
# STATTEST_CMD - Command line to run the application
|
||||||
# STATTEST_ADD_TEST - Helper function to define a ctest using
|
# STATTEST_ADD_TEST - Helper function to define a ctest using
|
||||||
# StatTest (Only if we are using for G4 testing)
|
# StatTest (Only if we are using for G4 testing)
|
||||||
#
|
#
|
||||||
# Variables used by this module, which can change the default behaviour
|
# Variables used by this module, which can change the default behaviour
|
||||||
# and need to be set before calling find_package
|
# and need to be set before calling find_package
|
||||||
#
|
#
|
||||||
# STATTEST_ROOT_DIR Root directory to StatTest package
|
# STATTEST_ROOT_DIR Root directory to StatTest package
|
||||||
@@ -22,7 +22,7 @@ if(NOT GEANT4_ENABLE_TESTING)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
#Search application
|
#Search application
|
||||||
#Note that the second suggested path is G4 specific...
|
#Note that the second suggested path is G4 specific...
|
||||||
find_path(STATTEST_APP_DIR
|
find_path(STATTEST_APP_DIR
|
||||||
NAMES StatTestVersion.py
|
NAMES StatTestVersion.py
|
||||||
PATHS ${STATTEST_ROOT_DIR} ${CMAKE_SOURCE_DIR}/verification/StatTest
|
PATHS ${STATTEST_ROOT_DIR} ${CMAKE_SOURCE_DIR}/verification/StatTest
|
||||||
@@ -43,7 +43,7 @@ if(NOT ROOT_FOUND)
|
|||||||
set(_root_isok FALSE)
|
set(_root_isok FALSE)
|
||||||
else()
|
else()
|
||||||
set(_root_isok TRUE)
|
set(_root_isok TRUE)
|
||||||
# - Check if python interpreter is correct version
|
# - Check if python interpreter is correct version
|
||||||
# (the one compatible with root)
|
# (the one compatible with root)
|
||||||
find_package(PythonInterp ${ROOT_PYTHONVER} QUIET)
|
find_package(PythonInterp ${ROOT_PYTHONVER} QUIET)
|
||||||
if(NOT PYTHONINTERP_FOUND)
|
if(NOT PYTHONINTERP_FOUND)
|
||||||
@@ -70,9 +70,9 @@ if(STATTEST_FOUND)
|
|||||||
set(STATTEST_APP ${STATTEST_APP_DIR}/runtests.py)
|
set(STATTEST_APP ${STATTEST_APP_DIR}/runtests.py)
|
||||||
set(STATTEST_CMD ${PYTHON_EXECUTABLE} ${STATTEST_APP})
|
set(STATTEST_CMD ${PYTHON_EXECUTABLE} ${STATTEST_APP})
|
||||||
|
|
||||||
# Let's create a function that helps in building tests for
|
# Let's create a function that helps in building tests for
|
||||||
# regression testing
|
# regression testing
|
||||||
# function STATTEST_ADD_TEST(<name>
|
# function STATTEST_ADD_TEST(<name>
|
||||||
# G4TEST testname
|
# G4TEST testname
|
||||||
# CONFIG conffile
|
# CONFIG conffile
|
||||||
# INPUT inputfile
|
# INPUT inputfile
|
||||||
@@ -82,7 +82,7 @@ if(STATTEST_FOUND)
|
|||||||
# [LABELS label1 label2 ...]
|
# [LABELS label1 label2 ...]
|
||||||
# [IMG filename])
|
# [IMG filename])
|
||||||
function(STATTEST_ADD_TEST stattest)
|
function(STATTEST_ADD_TEST stattest)
|
||||||
CMAKE_PARSE_ARGUMENTS(ARG "DEBUG;TEXT"
|
CMAKE_PARSE_ARGUMENTS(ARG "DEBUG;TEXT"
|
||||||
"CONFIG;INPUT;REFERENCE;G4TEST;IMG"
|
"CONFIG;INPUT;REFERENCE;G4TEST;IMG"
|
||||||
"LABELS" ${ARGN}
|
"LABELS" ${ARGN}
|
||||||
)
|
)
|
||||||
@@ -91,12 +91,12 @@ if(STATTEST_FOUND)
|
|||||||
if(_len LESS 1)
|
if(_len LESS 1)
|
||||||
message(FATAL_ERROR "STATTEST_ADD_TEST: conffile is mandatory")
|
message(FATAL_ERROR "STATTEST_ADD_TEST: conffile is mandatory")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(LENGTH ARG_INPUT _len)
|
list(LENGTH ARG_INPUT _len)
|
||||||
if(_len LESS 1)
|
if(_len LESS 1)
|
||||||
message(FATAL_ERROR "STATTEST_ADD_TEST: inputfile is mandatory")
|
message(FATAL_ERROR "STATTEST_ADD_TEST: inputfile is mandatory")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(LENGTH ARG_G4TEST _len)
|
list(LENGTH ARG_G4TEST _len)
|
||||||
if(_len LESS 1)
|
if(_len LESS 1)
|
||||||
message(FATAL_ERROR "STATTEST_ADD_TEST: testname is mandatory")
|
message(FATAL_ERROR "STATTEST_ADD_TEST: testname is mandatory")
|
||||||
@@ -108,10 +108,10 @@ if(STATTEST_FOUND)
|
|||||||
else()
|
else()
|
||||||
set(_command ${STATTEST_CMD})
|
set(_command ${STATTEST_CMD})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ARG_TEXT)
|
if(ARG_TEXT)
|
||||||
set(_command ${_command} "-T")
|
set(_command ${_command} "-T")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#Mandatory parameters
|
#Mandatory parameters
|
||||||
set(_command ${_command} ${ARG_CONFIG} ${ARG_INPUT})
|
set(_command ${_command} ${ARG_CONFIG} ${ARG_INPUT})
|
||||||
@@ -125,10 +125,10 @@ if(STATTEST_FOUND)
|
|||||||
set(_labels "")
|
set(_labels "")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(Geant4CTest)
|
include(G4CTest)
|
||||||
|
|
||||||
#Now build G4 test
|
#Now build G4 test
|
||||||
GEANT4_ADD_TEST(${stattest}
|
GEANT4_ADD_TEST(${stattest}
|
||||||
COMMAND ${_command}
|
COMMAND ${_command}
|
||||||
DEPENDS ${ARG_G4TEST}
|
DEPENDS ${ARG_G4TEST}
|
||||||
LABELS ${_labels}
|
LABELS ${_labels}
|
||||||
|
|||||||
+234
-171
@@ -43,13 +43,19 @@
|
|||||||
|
|
||||||
INCLUDE (FindPackageHandleStandardArgs)
|
INCLUDE (FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
IF (CMAKE_VERSION VERSION_GREATER 2.8.7)
|
#------------------------------------------------------------------------------#
|
||||||
SET (_TBB_CHECK_COMPONENTS FALSE)
|
#
|
||||||
ELSE (CMAKE_VERSION VERSION_GREATER 2.8.7)
|
# Paths
|
||||||
SET (_TBB_CHECK_COMPONENTS TRUE)
|
#
|
||||||
ENDIF (CMAKE_VERSION VERSION_GREATER 2.8.7)
|
#------------------------------------------------------------------------------#
|
||||||
|
|
||||||
FIND_PATH (TBB_ROOT_DIR
|
IF(CMAKE_VERSION VERSION_GREATER 2.8.7)
|
||||||
|
SET(_TBB_CHECK_COMPONENTS ON)
|
||||||
|
ELSE()
|
||||||
|
SET(_TBB_CHECK_COMPONENTS OFF)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
FIND_PATH(TBB_ROOT_DIR
|
||||||
NAMES include/tbb/tbb.h
|
NAMES include/tbb/tbb.h
|
||||||
PATHS ENV TBBROOT
|
PATHS ENV TBBROOT
|
||||||
ENV TBB40_INSTALL_DIR
|
ENV TBB40_INSTALL_DIR
|
||||||
@@ -59,229 +65,286 @@ FIND_PATH (TBB_ROOT_DIR
|
|||||||
ENV TBB_ROOT_DIR
|
ENV TBB_ROOT_DIR
|
||||||
DOC "TBB root directory")
|
DOC "TBB root directory")
|
||||||
|
|
||||||
FIND_PATH (TBB_INCLUDE_DIR
|
FIND_PATH(TBB_INCLUDE_DIR
|
||||||
NAMES tbb/tbb.h
|
NAMES tbb/tbb.h
|
||||||
HINTS ${TBB_ROOT_DIR}
|
HINTS ${TBB_ROOT_DIR}
|
||||||
PATH_SUFFIXES include
|
PATH_SUFFIXES include
|
||||||
DOC "TBB include directory")
|
DOC "TBB include directory")
|
||||||
|
|
||||||
IF (MSVC11)
|
#------------------------------------------------------------------------------#
|
||||||
SET (_TBB_COMPILER vc11)
|
#
|
||||||
ELSEIF (MSVC10)
|
# Library suffixes
|
||||||
SET (_TBB_COMPILER vc10)
|
#
|
||||||
ELSEIF (MSVC90)
|
#------------------------------------------------------------------------------#
|
||||||
SET (_TBB_COMPILER vc9)
|
|
||||||
ELSEIF (MSVC80)
|
|
||||||
SET (_TBB_COMPILER vc8)
|
|
||||||
ELSEIF (WIN32)
|
|
||||||
SET (_TBB_COMPILER vc_mt)
|
|
||||||
ENDIF (MSVC11)
|
|
||||||
|
|
||||||
IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
IF(MSVC11)
|
||||||
SET (_TBB_POSSIBLE_LIB_SUFFIXES lib/intel64/${_TBB_COMPILER})
|
SET(_TBB_COMPILER vc11)
|
||||||
SET (_TBB_POSSIBLE_BIN_SUFFIXES bin/intel64/${_TBB_COMPILER})
|
ELSEIF(MSVC10)
|
||||||
ELSE (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
SET(_TBB_COMPILER vc10)
|
||||||
SET (_TBB_POSSIBLE_LIB_SUFFIXES lib/ia32/${_TBB_COMPILER})
|
ELSEIF(MSVC90)
|
||||||
SET (_TBB_POSSIBLE_BIN_SUFFIXES bin/ia32/${_TBB_COMPILER})
|
SET(_TBB_COMPILER vc9)
|
||||||
ENDIF (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
ELSEIF(MSVC80)
|
||||||
|
SET(_TBB_COMPILER vc8)
|
||||||
|
ELSEIF(WIN32)
|
||||||
|
SET(_TBB_COMPILER vc_mt)
|
||||||
|
ENDIF(MSVC11)
|
||||||
|
|
||||||
LIST (APPEND _TBB_POSSIBLE_LIB_SUFFIXES lib/$ENV{TBB_ARCH_PLATFORM})
|
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
SET(_TBB_POSSIBLE_LIB_SUFFIXES lib/intel64/${_TBB_COMPILER})
|
||||||
|
SET(_TBB_POSSIBLE_BIN_SUFFIXES bin/intel64/${_TBB_COMPILER})
|
||||||
|
ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
SET(_TBB_POSSIBLE_LIB_SUFFIXES lib/ia32/${_TBB_COMPILER})
|
||||||
|
SET(_TBB_POSSIBLE_BIN_SUFFIXES bin/ia32/${_TBB_COMPILER})
|
||||||
|
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
|
||||||
FIND_LIBRARY (TBB_LIBRARY_RELEASE
|
LIST(APPEND _TBB_POSSIBLE_LIB_SUFFIXES lib/$ENV{TBB_ARCH_PLATFORM})
|
||||||
|
|
||||||
|
IF(UNIX)
|
||||||
|
FOREACH(_VERSION 4.7 4.4 4.1)
|
||||||
|
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
LIST(APPEND _TBB_POSSIBLE_LIB_SUFFIXES lib/intel64/gcc${_VERSION})
|
||||||
|
ELSE()
|
||||||
|
LIST(APPEND _TBB_POSSIBLE_LIB_SUFFIXES lib/ia32/gcc${_VERSION})
|
||||||
|
ENDIF()
|
||||||
|
ENDFOREACH()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
#
|
||||||
|
# TBB library
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
|
||||||
|
FIND_LIBRARY(TBB_LIBRARY_RELEASE
|
||||||
NAMES tbb
|
NAMES tbb
|
||||||
HINTS ${TBB_ROOT_DIR}
|
HINTS ${TBB_ROOT_DIR}
|
||||||
PATH_SUFFIXES ${_TBB_POSSIBLE_LIB_SUFFIXES}
|
PATH_SUFFIXES ${_TBB_POSSIBLE_LIB_SUFFIXES}
|
||||||
DOC "TBB release library")
|
DOC "TBB release library")
|
||||||
|
|
||||||
FIND_LIBRARY (TBB_LIBRARY_DEBUG
|
FIND_LIBRARY(TBB_LIBRARY_DEBUG
|
||||||
NAMES tbb_debug
|
NAMES tbb_debug
|
||||||
HINTS ${TBB_ROOT_DIR}
|
HINTS ${TBB_ROOT_DIR}
|
||||||
PATH_SUFFIXES ${_TBB_POSSIBLE_LIB_SUFFIXES}
|
PATH_SUFFIXES ${_TBB_POSSIBLE_LIB_SUFFIXES}
|
||||||
DOC "TBB debug library")
|
DOC "TBB debug library")
|
||||||
|
|
||||||
IF (TBB_LIBRARY_RELEASE AND TBB_LIBRARY_DEBUG)
|
IF(TBB_LIBRARY_RELEASE AND TBB_LIBRARY_DEBUG)
|
||||||
IF (NOT TBB_LIBRARY)
|
IF(NOT TBB_LIBRARY)
|
||||||
SET (TBB_LIBRARY optimized ${TBB_LIBRARY_RELEASE} debug ${TBB_LIBRARY_DEBUG}
|
SET(TBB_LIBRARY optimized ${TBB_LIBRARY_RELEASE} debug ${TBB_LIBRARY_DEBUG}
|
||||||
CACHE DOC "TBB library" FORCE)
|
CACHE DOC "TBB library" FORCE)
|
||||||
ENDIF (NOT TBB_LIBRARY)
|
ENDIF(NOT TBB_LIBRARY)
|
||||||
ELSEIF (TBB_LIBRARY_RELEASE)
|
LIST(APPEND _TBB_ALL_LIBS optimized ${TBB_LIBRARY_RELEASE} debug ${TBB_LIBRARY_DEBUG})
|
||||||
IF (NOT TBB_LIBRARY)
|
ELSE()
|
||||||
SET (TBB_LIBRARY ${TBB_LIBRARY_RELEASE} CACHE DOC "TBB library" FORCE)
|
IF(TBB_LIBRARY_DEBUG)
|
||||||
ENDIF (NOT TBB_LIBRARY)
|
IF(NOT TBB_LIBRARY)
|
||||||
ENDIF (TBB_LIBRARY_RELEASE AND TBB_LIBRARY_DEBUG)
|
SET(TBB_LIBRARY ${TBB_LIBRARY_DEBUG} CACHE FILEPATH "TBB library" FORCE)
|
||||||
|
ENDIF(NOT TBB_LIBRARY)
|
||||||
|
LIST(APPEND _TBB_ALL_LIBS ${TBB_LIBRARY_DEBUG})
|
||||||
|
ENDIF(TBB_LIBRARY_DEBUG)
|
||||||
|
|
||||||
IF (TBB_LIBRARY_DEBUG)
|
IF(TBB_LIBRARY_RELEASE)
|
||||||
LIST (APPEND _TBB_ALL_LIBS ${TBB_LIBRARY_DEBUG})
|
IF(NOT TBB_LIBRARY)
|
||||||
ENDIF (TBB_LIBRARY_DEBUG)
|
SET(TBB_LIBRARY ${TBB_LIBRARY_RELEASE} CACHE FILEPATH "TBB library" FORCE)
|
||||||
|
ENDIF(NOT TBB_LIBRARY)
|
||||||
|
LIST(APPEND _TBB_ALL_LIBS ${TBB_LIBRARY_RELEASE})
|
||||||
|
ENDIF()
|
||||||
|
ENDIF(TBB_LIBRARY_RELEASE AND TBB_LIBRARY_DEBUG)
|
||||||
|
|
||||||
IF (TBB_LIBRARY_RELEASE)
|
|
||||||
LIST (APPEND _TBB_ALL_LIBS ${TBB_LIBRARY_RELEASE})
|
|
||||||
ENDIF (TBB_LIBRARY_RELEASE)
|
|
||||||
|
|
||||||
FOREACH (_TBB_COMPONENT ${TBB_FIND_COMPONENTS})
|
#------------------------------------------------------------------------------#
|
||||||
STRING (TOUPPER ${_TBB_COMPONENT} _TBB_COMPONENT_UPPER)
|
#
|
||||||
SET (_TBB_LIBRARY_BASE TBB_${_TBB_COMPONENT_UPPER}_LIBRARY)
|
# Components
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
|
||||||
IF (${_TBB_COMPONENT} STREQUAL preview)
|
SET(_TBB_POSSIBLE_COMPONENTS preview malloc malloc_proxy)
|
||||||
SET (_TBB_LIBRARY_NAME tbb_${_TBB_COMPONENT})
|
|
||||||
ELSE (${_TBB_COMPONENT} STREQUAL preview)
|
|
||||||
SET (_TBB_LIBRARY_NAME tbb${_TBB_COMPONENT})
|
|
||||||
message(STATUS " FindTBB.cmake: Trying to find component " ${_TBB_COMPONENT} " using name " ${_TBB_LIBRARY_NAME} " " )
|
|
||||||
ENDIF (${_TBB_COMPONENT} STREQUAL preview)
|
|
||||||
|
|
||||||
FIND_LIBRARY (${_TBB_LIBRARY_BASE}_RELEASE
|
FOREACH(_TBB_COMPONENT ${TBB_FIND_COMPONENTS})
|
||||||
NAMES ${_TBB_LIBRARY_NAME}
|
|
||||||
HINTS ${TBB_ROOT_DIR}
|
|
||||||
PATH_SUFFIXES ${_TBB_POSSIBLE_LIB_SUFFIXES}
|
|
||||||
DOC "TBB ${_TBB_COMPONENT} release library")
|
|
||||||
|
|
||||||
FIND_LIBRARY (${_TBB_LIBRARY_BASE}_DEBUG
|
STRING(REPLACE "_debug" "" _TBB_COMPONENT ${_TBB_COMPONENT})
|
||||||
NAMES ${_TBB_LIBRARY_NAME}_debug
|
STRING(TOUPPER ${_TBB_COMPONENT} _TBB_COMPONENT_UPPER)
|
||||||
HINTS ${TBB_ROOT_DIR}
|
SET(_TBB_LIBRARY_BASE TBB_${_TBB_COMPONENT_UPPER}_LIBRARY)
|
||||||
PATH_SUFFIXES ${_TBB_POSSIBLE_LIB_SUFFIXES}
|
|
||||||
DOC "TBB ${_TBB_COMPONENT} debug library")
|
|
||||||
|
|
||||||
MARK_AS_ADVANCED (${_TBB_LIBRARY_BASE} ${_TBB_LIBRARY_BASE}_DEBUG)
|
IF(${_TBB_COMPONENT} MATCHES "malloc*")
|
||||||
|
SET(_TBB_LIBRARY_NAME tbb${_TBB_COMPONENT})
|
||||||
|
ELSE()
|
||||||
|
SET(_TBB_LIBRARY_NAME tbb_${_TBB_COMPONENT})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
SET (TBB_${_TBB_COMPONENT_UPPER}_FOUND TRUE)
|
FIND_LIBRARY(${_TBB_LIBRARY_BASE}_RELEASE
|
||||||
|
NAMES ${_TBB_LIBRARY_NAME}
|
||||||
|
HINTS ${TBB_ROOT_DIR}
|
||||||
|
PATH_SUFFIXES ${_TBB_POSSIBLE_LIB_SUFFIXES}
|
||||||
|
DOC "TBB ${_TBB_COMPONENT} release library")
|
||||||
|
|
||||||
IF (${_TBB_LIBRARY_BASE}_DEBUG AND ${_TBB_LIBRARY_BASE}_RELEASE)
|
FIND_LIBRARY(${_TBB_LIBRARY_BASE}_DEBUG
|
||||||
SET (${_TBB_LIBRARY_BASE}
|
NAMES ${_TBB_LIBRARY_NAME}_debug
|
||||||
debug ${${_TBB_LIBRARY_BASE}_DEBUG}
|
HINTS ${TBB_ROOT_DIR}
|
||||||
optimized ${${_TBB_LIBRARY_BASE}_RELEASE} CACHE DOC
|
PATH_SUFFIXES ${_TBB_POSSIBLE_LIB_SUFFIXES}
|
||||||
"TBB ${_TBB_COMPONENT} library")
|
DOC "TBB ${_TBB_COMPONENT} debug library")
|
||||||
ELSEIF (${_TBB_LIBRARY_BASE}_DEBUG)
|
|
||||||
SET (${_TBB_LIBRARY_BASE} ${${_TBB_LIBRARY_BASE}_DEBUG})
|
|
||||||
ELSEIF (${_TBB_LIBRARY_BASE}_RELEASE)
|
|
||||||
SET (${_TBB_LIBRARY_BASE} ${${_TBB_LIBRARY_BASE}_RELEASE}
|
|
||||||
CACHE DOC "TBB ${_TBB_COMPONENT} library")
|
|
||||||
ELSE (${_TBB_LIBRARY_BASE}_DEBUG AND ${_TBB_LIBRARY_BASE}_RELEASE)
|
|
||||||
# Component missing: record it for a later report
|
|
||||||
LIST (APPEND _TBB_MISSING_COMPONENTS ${_TBB_COMPONENT})
|
|
||||||
SET (TBB_${_TBB_COMPONENT_UPPER}_FOUND FALSE)
|
|
||||||
ENDIF (${_TBB_LIBRARY_BASE}_DEBUG AND ${_TBB_LIBRARY_BASE}_RELEASE)
|
|
||||||
|
|
||||||
IF (${_TBB_LIBRARY_BASE}_DEBUG)
|
MARK_AS_ADVANCED (${_TBB_LIBRARY_BASE} ${_TBB_LIBRARY_BASE}_DEBUG)
|
||||||
LIST (APPEND _TBB_ALL_LIBS ${${_TBB_LIBRARY_BASE}_DEBUG})
|
|
||||||
ENDIF (${_TBB_LIBRARY_BASE}_DEBUG)
|
|
||||||
|
|
||||||
IF (${_TBB_LIBRARY_BASE}_RELEASE)
|
# default assumption
|
||||||
LIST (APPEND _TBB_ALL_LIBS ${${_TBB_LIBRARY_BASE}_RELEASE})
|
SET(TBB_${_TBB_COMPONENT_UPPER}_FOUND ON)
|
||||||
ENDIF (${_TBB_LIBRARY_BASE}_RELEASE)
|
SET(TBB_${_TBB_COMPONENT}_FOUND ON)
|
||||||
|
|
||||||
SET (TBB_${_TBB_COMPONENT}_FOUND ${TBB_${_TBB_COMPONENT_UPPER}_FOUND})
|
IF(${_TBB_LIBRARY_BASE}_DEBUG AND ${_TBB_LIBRARY_BASE}_RELEASE)
|
||||||
|
SET(${_TBB_LIBRARY_BASE}
|
||||||
|
debug ${${_TBB_LIBRARY_BASE}_DEBUG}
|
||||||
|
optimized ${${_TBB_LIBRARY_BASE}_RELEASE} CACHE STRING
|
||||||
|
"TBB ${_TBB_COMPONENT} library")
|
||||||
|
LIST(APPEND _TBB_ALL_LIBS
|
||||||
|
optimized ${${_TBB_LIBRARY_BASE}_RELEASE}
|
||||||
|
debug ${${_TBB_LIBRARY_BASE}_DEBUG})
|
||||||
|
LIST(APPEND TBB_FOUND_COMPONENTS ${_TBB_LIBRARY_BASE} ${_TBB_LIBRARY_BASE}_debug)
|
||||||
|
SET(TBB_${_TBB_COMPONENT_UPPER}_LIBRARY ${${_TBB_LIBRARY_BASE}_RELEASE})
|
||||||
|
ELSEIF(${_TBB_LIBRARY_BASE}_DEBUG)
|
||||||
|
SET(${_TBB_LIBRARY_BASE} ${${_TBB_LIBRARY_BASE}_DEBUG})
|
||||||
|
LIST(APPEND _TBB_ALL_LIBS ${${_TBB_LIBRARY_BASE}_DEBUG})
|
||||||
|
LIST(APPEND TBB_FOUND_COMPONENTS ${_TBB_LIBRARY_BASE})
|
||||||
|
SET(TBB_${_TBB_COMPONENT_UPPER}_LIBRARY ${${_TBB_LIBRARY_BASE}_DEBUG})
|
||||||
|
ELSEIF(${_TBB_LIBRARY_BASE}_RELEASE)
|
||||||
|
SET(${_TBB_LIBRARY_BASE} ${${_TBB_LIBRARY_BASE}_RELEASE}
|
||||||
|
CACHE FILEPATH "TBB ${_TBB_COMPONENT} library")
|
||||||
|
LIST(APPEND _TBB_ALL_LIBS ${${_TBB_LIBRARY_BASE}_RELEASE})
|
||||||
|
LIST(APPEND TBB_FOUND_COMPONENTS ${_TBB_LIBRARY_BASE}_debug)
|
||||||
|
SET(TBB_${_TBB_COMPONENT_UPPER}_LIBRARY ${${_TBB_LIBRARY_BASE}_RELEASE})
|
||||||
|
ELSE()
|
||||||
|
# Component missing: record it for a later report
|
||||||
|
LIST(APPEND _TBB_MISSING_COMPONENTS ${_TBB_COMPONENT})
|
||||||
|
SET(TBB_${_TBB_COMPONENT}_FOUND OFF)
|
||||||
|
SET(TBB_${_TBB_COMPONENT_UPPER}_FOUND OFF)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF (${_TBB_LIBRARY_BASE})
|
IF(${_TBB_LIBRARY_BASE})
|
||||||
# setup the TBB_<COMPONENT>_LIBRARIES variable
|
# setup the TBB_<COMPONENT>_LIBRARIES variable
|
||||||
SET (TBB_${_TBB_COMPONENT_UPPER}_LIBRARIES ${${_TBB_LIBRARY_BASE}})
|
SET(TBB_${_TBB_COMPONENT_UPPER}_LIBRARIES ${${_TBB_LIBRARY_BASE}})
|
||||||
LIST (APPEND TBB_LIBRARIES ${${_TBB_LIBRARY_BASE}})
|
ELSE()
|
||||||
ELSE (${_TBB_LIBRARY_BASE})
|
LIST(APPEND _TBB_MISSING_LIBRARIES ${_TBB_LIBRARY_BASE})
|
||||||
LIST (APPEND _TBB_MISSING_LIBRARIES ${_TBB_LIBRARY_BASE})
|
ENDIF()
|
||||||
ENDIF (${_TBB_LIBRARY_BASE})
|
|
||||||
ENDFOREACH (_TBB_COMPONENT ${TBB_FIND_COMPONENTS})
|
|
||||||
|
|
||||||
LIST (APPEND TBB_LIBRARIES ${TBB_LIBRARY})
|
ENDFOREACH(_TBB_COMPONENT ${TBB_FIND_COMPONENTS})
|
||||||
SET (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
|
|
||||||
|
|
||||||
IF (DEFINED _TBB_MISSING_COMPONENTS AND _TBB_CHECK_COMPONENTS)
|
#------------------------------------------------------------------------------#
|
||||||
IF (NOT TBB_FIND_QUIETLY)
|
#
|
||||||
MESSAGE (STATUS "One or more TBB components were not found:")
|
# Standard variables
|
||||||
# Display missing components indented, each on a separate line
|
#
|
||||||
FOREACH (_TBB_MISSING_COMPONENT ${_TBB_MISSING_COMPONENTS})
|
#------------------------------------------------------------------------------#
|
||||||
MESSAGE (STATUS " " ${_TBB_MISSING_COMPONENT})
|
IF(_TBB_ALL_LIBS)
|
||||||
ENDFOREACH (_TBB_MISSING_COMPONENT ${_TBB_MISSING_COMPONENTS})
|
SET(TBB_LIBRARIES ${_TBB_ALL_LIBS})
|
||||||
ENDIF (NOT TBB_FIND_QUIETLY)
|
ENDIF()
|
||||||
ENDIF (DEFINED _TBB_MISSING_COMPONENTS AND _TBB_CHECK_COMPONENTS)
|
|
||||||
|
|
||||||
# Determine library's version
|
IF(TBB_INCLUDE_DIR)
|
||||||
|
SET(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
SET (_TBB_VERSION_HEADER ${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h)
|
IF(DEFINED _TBB_MISSING_COMPONENTS AND _TBB_CHECK_COMPONENTS)
|
||||||
|
IF(NOT TBB_FIND_QUIETLY)
|
||||||
|
MESSAGE(STATUS "One or more TBB components were not found:")
|
||||||
|
# Display missing components indented, each on a separate line
|
||||||
|
FOREACH(_TBB_MISSING_COMPONENT ${_TBB_MISSING_COMPONENTS})
|
||||||
|
MESSAGE(STATUS " " ${_TBB_MISSING_COMPONENT})
|
||||||
|
ENDFOREACH(_TBB_MISSING_COMPONENT ${_TBB_MISSING_COMPONENTS})
|
||||||
|
ENDIF(NOT TBB_FIND_QUIETLY)
|
||||||
|
ENDIF(DEFINED _TBB_MISSING_COMPONENTS AND _TBB_CHECK_COMPONENTS)
|
||||||
|
|
||||||
IF (EXISTS ${_TBB_VERSION_HEADER})
|
#------------------------------------------------------------------------------#
|
||||||
FILE (READ ${_TBB_VERSION_HEADER} _TBB_VERSION_CONTENTS)
|
#
|
||||||
|
# Library's version
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
|
||||||
STRING (REGEX REPLACE ".*#define TBB_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1"
|
SET(_TBB_VERSION_HEADER ${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h)
|
||||||
TBB_VERSION_MAJOR "${_TBB_VERSION_CONTENTS}")
|
|
||||||
STRING (REGEX REPLACE ".*#define TBB_VERSION_MINOR[ \t]+([0-9]+).*" "\\1"
|
|
||||||
TBB_VERSION_MINOR "${_TBB_VERSION_CONTENTS}")
|
|
||||||
|
|
||||||
SET (TBB_VERSION ${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR})
|
IF(EXISTS ${_TBB_VERSION_HEADER})
|
||||||
SET (TBB_VERSION_COMPONENTS 2)
|
FILE(READ ${_TBB_VERSION_HEADER} _TBB_VERSION_CONTENTS)
|
||||||
ENDIF (EXISTS ${_TBB_VERSION_HEADER})
|
|
||||||
|
|
||||||
IF (WIN32)
|
STRING(REGEX REPLACE ".*#define TBB_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1"
|
||||||
FIND_PROGRAM (LIB_EXECUTABLE NAMES lib
|
TBB_VERSION_MAJOR "${_TBB_VERSION_CONTENTS}")
|
||||||
HINTS "$ENV{VS110COMNTOOLS}/../../VC/bin"
|
STRING(REGEX REPLACE ".*#define TBB_VERSION_MINOR[ \t]+([0-9]+).*" "\\1"
|
||||||
"$ENV{VS100COMNTOOLS}/../../VC/bin"
|
TBB_VERSION_MINOR "${_TBB_VERSION_CONTENTS}")
|
||||||
"$ENV{VS90COMNTOOLS}/../../VC/bin"
|
|
||||||
"$ENV{VS71COMNTOOLS}/../../VC/bin"
|
|
||||||
"$ENV{VS80COMNTOOLS}/../../VC/bin"
|
|
||||||
DOC "Library manager")
|
|
||||||
|
|
||||||
MARK_AS_ADVANCED (LIB_EXECUTABLE)
|
SET(TBB_VERSION ${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR})
|
||||||
ENDIF (WIN32)
|
SET(TBB_VERSION_COMPONENTS 2)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
MACRO (GET_LIB_REQUISITES LIB REQUISITES)
|
IF(WIN32)
|
||||||
IF (LIB_EXECUTABLE)
|
FIND_PROGRAM(LIB_EXECUTABLE NAMES lib
|
||||||
GET_FILENAME_COMPONENT (_LIB_PATH ${LIB_EXECUTABLE} PATH)
|
HINTS
|
||||||
|
"$ENV{VS110COMNTOOLS}/../../VC/bin"
|
||||||
|
"$ENV{VS100COMNTOOLS}/../../VC/bin"
|
||||||
|
"$ENV{VS90COMNTOOLS}/../../VC/bin"
|
||||||
|
"$ENV{VS71COMNTOOLS}/../../VC/bin"
|
||||||
|
"$ENV{VS80COMNTOOLS}/../../VC/bin"
|
||||||
|
DOC "Library manager")
|
||||||
|
|
||||||
IF (MSVC)
|
MARK_AS_ADVANCED (LIB_EXECUTABLE)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
MACRO(GET_LIB_REQUISITES LIB REQUISITES)
|
||||||
|
IF(LIB_EXECUTABLE)
|
||||||
|
GET_FILENAME_COMPONENT(_LIB_PATH ${LIB_EXECUTABLE} PATH)
|
||||||
|
|
||||||
|
IF(MSVC)
|
||||||
# Do not redirect the output
|
# Do not redirect the output
|
||||||
UNSET (ENV{VS_UNICODE_OUTPUT})
|
UNSET(ENV{VS_UNICODE_OUTPUT})
|
||||||
ENDIF (MSVC)
|
ENDIF()
|
||||||
|
|
||||||
EXECUTE_PROCESS (COMMAND ${LIB_EXECUTABLE} /nologo /list ${LIB}
|
EXECUTE_PROCESS(COMMAND ${LIB_EXECUTABLE} /nologo /list ${LIB}
|
||||||
WORKING_DIRECTORY ${_LIB_PATH}/../../Common7/IDE
|
WORKING_DIRECTORY ${_LIB_PATH}/../../Common7/IDE
|
||||||
OUTPUT_VARIABLE _LIB_OUTPUT ERROR_QUIET)
|
OUTPUT_VARIABLE _LIB_OUTPUT ERROR_QUIET)
|
||||||
|
|
||||||
STRING (REPLACE "\n" ";" "${REQUISITES}" "${_LIB_OUTPUT}")
|
STRING(REPLACE "\n" ";" "${REQUISITES}" "${_LIB_OUTPUT}")
|
||||||
LIST (REMOVE_DUPLICATES ${REQUISITES})
|
LIST(REMOVE_DUPLICATES ${REQUISITES})
|
||||||
ENDIF (LIB_EXECUTABLE)
|
ENDIF()
|
||||||
ENDMACRO (GET_LIB_REQUISITES)
|
ENDMACRO()
|
||||||
|
|
||||||
IF (_TBB_ALL_LIBS)
|
IF(_TBB_ALL_LIBS)
|
||||||
# collect lib requisites using the lib tool
|
# collect lib requisites using the lib tool
|
||||||
FOREACH (_TBB_COMPONENT ${_TBB_ALL_LIBS})
|
FOREACH(_TBB_COMPONENT ${_TBB_ALL_LIBS})
|
||||||
GET_LIB_REQUISITES (${_TBB_COMPONENT} _TBB_REQUISITES)
|
GET_LIB_REQUISITES(${_TBB_COMPONENT} _TBB_REQUISITES)
|
||||||
ENDFOREACH (_TBB_COMPONENT)
|
ENDFOREACH(_TBB_COMPONENT)
|
||||||
ENDIF (_TBB_ALL_LIBS)
|
ENDIF()
|
||||||
|
|
||||||
IF (NOT TBB_BINARY_DIR)
|
IF(NOT TBB_BINARY_DIR)
|
||||||
SET (_TBB_UPDATE_BINARY_DIR TRUE)
|
SET(_TBB_UPDATE_BINARY_DIR ON)
|
||||||
ELSE (NOT TBB_BINARY_DIR)
|
ELSE()
|
||||||
SET (_TBB_UPDATE_BINARY_DIR FALSE)
|
SET(_TBB_UPDATE_BINARY_DIR OFF)
|
||||||
ENDIF (NOT TBB_BINARY_DIR)
|
ENDIF()
|
||||||
|
|
||||||
SET (_TBB_BINARY_DIR_HINTS ${_TBB_POSSIBLE_BIN_SUFFIXES})
|
SET(_TBB_BINARY_DIR_HINTS ${_TBB_POSSIBLE_BIN_SUFFIXES})
|
||||||
|
|
||||||
IF (_TBB_REQUISITES)
|
IF(_TBB_REQUISITES)
|
||||||
FIND_FILE (TBB_BINARY_DIR NAMES ${_TBB_REQUISITES}
|
FIND_FILE(TBB_BINARY_DIR NAMES ${_TBB_REQUISITES}
|
||||||
HINTS ${TBB_ROOT_DIR}
|
HINTS ${TBB_ROOT_DIR}
|
||||||
PATH_SUFFIXES ${_TBB_BINARY_DIR_HINTS} NO_DEFAULT_PATH)
|
PATH_SUFFIXES ${_TBB_BINARY_DIR_HINTS} NO_DEFAULT_PATH)
|
||||||
ENDIF (_TBB_REQUISITES)
|
ENDIF()
|
||||||
|
|
||||||
IF (TBB_BINARY_DIR AND _TBB_UPDATE_BINARY_DIR)
|
IF(TBB_BINARY_DIR AND _TBB_UPDATE_BINARY_DIR)
|
||||||
SET (_TBB_BINARY_DIR ${TBB_BINARY_DIR})
|
SET(_TBB_BINARY_DIR ${TBB_BINARY_DIR})
|
||||||
UNSET (TBB_BINARY_DIR CACHE)
|
UNSET(TBB_BINARY_DIR CACHE)
|
||||||
|
|
||||||
IF (_TBB_BINARY_DIR)
|
IF(_TBB_BINARY_DIR)
|
||||||
GET_FILENAME_COMPONENT (TBB_BINARY_DIR ${_TBB_BINARY_DIR} PATH)
|
GET_FILENAME_COMPONENT(TBB_BINARY_DIR ${_TBB_BINARY_DIR} PATH)
|
||||||
ENDIF (_TBB_BINARY_DIR)
|
ENDIF()
|
||||||
ENDIF (TBB_BINARY_DIR AND _TBB_UPDATE_BINARY_DIR)
|
ENDIF()
|
||||||
|
|
||||||
SET (TBB_BINARY_DIR ${TBB_BINARY_DIR} CACHE PATH "TBB binary directory")
|
SET(TBB_BINARY_DIR ${TBB_BINARY_DIR} CACHE PATH "TBB binary directory")
|
||||||
|
|
||||||
MARK_AS_ADVANCED (TBB_INCLUDE_DIR TBB_LIBRARY TBB_LIBRARY_RELEASE
|
MARK_AS_ADVANCED(TBB_INCLUDE_DIR TBB_LIBRARY TBB_LIBRARY_RELEASE
|
||||||
TBB_LIBRARY_DEBUG TBB_BINARY_DIR)
|
TBB_LIBRARY_DEBUG TBB_BINARY_DIR)
|
||||||
|
|
||||||
IF (NOT _TBB_CHECK_COMPONENTS)
|
IF(NOT _TBB_CHECK_COMPONENTS)
|
||||||
SET (_TBB_FPHSA_ADDITIONAL_ARGS HANDLE_COMPONENTS)
|
SET(_TBB_FPHSA_ADDITIONAL_ARGS HANDLE_COMPONENTS)
|
||||||
ENDIF (NOT _TBB_CHECK_COMPONENTS)
|
ENDIF()
|
||||||
|
|
||||||
IF (CMAKE_VERSION VERSION_GREATER 2.8.2)
|
LIST(APPEND _TBB_FPHSA_ADDITIONAL_ARGS VERSION_VAR TBB_VERSION)
|
||||||
LIST (APPEND _TBB_FPHSA_ADDITIONAL_ARGS VERSION_VAR TBB_VERSION)
|
|
||||||
ENDIF (CMAKE_VERSION VERSION_GREATER 2.8.2)
|
|
||||||
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS (TBB REQUIRED_VARS TBB_ROOT_DIR
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB
|
||||||
TBB_INCLUDE_DIR TBB_LIBRARY ${_TBB_MISSING_LIBRARIES}
|
REQUIRED_VARS
|
||||||
${_TBB_FPHSA_ADDITIONAL_ARGS})
|
TBB_ROOT_DIR
|
||||||
|
TBB_INCLUDE_DIR
|
||||||
|
TBB_LIBRARY
|
||||||
|
${_TBB_MISSING_LIBRARIES}
|
||||||
|
HANDLE_COMPONENTS
|
||||||
|
${_TBB_FPHSA_ADDITIONAL_ARGS})
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ Result Variables
|
|||||||
This module sets the following variables:
|
This module sets the following variables:
|
||||||
|
|
||||||
``XQuartzGL_FOUND``
|
``XQuartzGL_FOUND``
|
||||||
True, if the XQuartz GL/GLU libraries were located
|
True, if the XQuartz GL libraries were located
|
||||||
|
|
||||||
Cache Variables
|
Cache Variables
|
||||||
^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^
|
||||||
@@ -72,7 +72,6 @@ find_package_handle_standard_args(XQuartzGL
|
|||||||
REQUIRED_VARS
|
REQUIRED_VARS
|
||||||
XQuartzGL_INCLUDE_DIR
|
XQuartzGL_INCLUDE_DIR
|
||||||
XQuartzGL_gl_LIBRARY
|
XQuartzGL_gl_LIBRARY
|
||||||
XQuartzGL_glu_LIBRARY
|
|
||||||
)
|
)
|
||||||
|
|
||||||
mark_as_advanced(XQuartzGL_INCLUDE_DIR XQuartzGL_gl_LIBRARY XQuartzGL_glu_LIBRARY)
|
mark_as_advanced(XQuartzGL_INCLUDE_DIR XQuartzGL_gl_LIBRARY XQuartzGL_glu_LIBRARY)
|
||||||
@@ -86,7 +85,7 @@ if(XQuartzGL_FOUND)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT TARGET XQuartzGL::GLU)
|
if(NOT TARGET XQuartzGL::GLU AND XQuartzGL_glu_LIBRARY)
|
||||||
add_library(XQuartzGL::GLU UNKNOWN IMPORTED)
|
add_library(XQuartzGL::GLU UNKNOWN IMPORTED)
|
||||||
set_target_properties(XQuartzGL::GLU PROPERTIES
|
set_target_properties(XQuartzGL::GLU PROPERTIES
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${XQuartzGL_INCLUDE_DIR}"
|
INTERFACE_INCLUDE_DIRECTORIES "${XQuartzGL_INCLUDE_DIR}"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
# Geant4 libraries and tests,
|
# Geant4 libraries and tests,
|
||||||
#
|
#
|
||||||
# In addition to the core compiler/linker flags (configured in the
|
# In addition to the core compiler/linker flags (configured in the
|
||||||
# Geant4MakeRules_<LANG>.cmake files) for Geant4, the build may require
|
# G4MakeRules_<LANG>.cmake files) for Geant4, the build may require
|
||||||
# further configuration. This module performs this task whicj includes:
|
# further configuration. This module performs this task whicj includes:
|
||||||
#
|
#
|
||||||
# 1) Extra build modes for developers
|
# 1) Extra build modes for developers
|
||||||
@@ -273,8 +273,6 @@ if(GEANT4_BUILD_MULTITHREADED)
|
|||||||
set(GEANT4_MULTITHREADED_CXX_FLAGS "${GEANT4_MULTITHREADED_CXX_FLAGS} ${${GEANT4_BUILD_TLS_MODEL}_TLSMODEL_FLAGS}")
|
set(GEANT4_MULTITHREADED_CXX_FLAGS "${GEANT4_MULTITHREADED_CXX_FLAGS} ${${GEANT4_BUILD_TLS_MODEL}_TLSMODEL_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Set Defs/Compiler Flags
|
|
||||||
# TODO: Migrate def to header
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GEANT4_MULTITHREADED_CXX_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GEANT4_MULTITHREADED_CXX_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -424,5 +422,3 @@ foreach(_conftype ${CMAKE_CONFIGURATION_TYPES})
|
|||||||
"${BASE_OUTPUT_DIRECTORY}/${_conftype}/${CMAKE_INSTALL_LIBDIR}"
|
"${BASE_OUTPUT_DIRECTORY}/${_conftype}/${CMAKE_INSTALL_LIBDIR}"
|
||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -56,19 +56,18 @@ include(G4BuildSettings)
|
|||||||
include(G4DeveloperAPI)
|
include(G4DeveloperAPI)
|
||||||
|
|
||||||
# - Provide interface to control use of optional components
|
# - Provide interface to control use of optional components
|
||||||
include(Geant4OptionalComponents)
|
include(G4OptionalComponents)
|
||||||
|
|
||||||
# - Provide interface to control use of UI/Vis components
|
# - Provide interface to control use of UI/Vis components
|
||||||
# Written in a separate module from other optional components because
|
# Written in a separate module from other optional components because
|
||||||
# there are many complex options to handle.
|
# there are many complex options to handle.
|
||||||
include(Geant4InterfaceOptions)
|
include(G4InterfaceOptions)
|
||||||
|
|
||||||
# - Installation of optional read-only architecture independent data files.
|
# - Installation of optional read-only architecture independent data files.
|
||||||
include(Geant4InstallData)
|
include(G4InstallData)
|
||||||
|
|
||||||
# - Include testing up front so both source and environments can use it if required
|
# - Include testing up front so both source and environments can use it if required
|
||||||
include(Geant4CTest)
|
include(G4CTest)
|
||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# Add the source and environments subdirectories
|
# Add the source and environments subdirectories
|
||||||
@@ -95,8 +94,6 @@ endif()
|
|||||||
# these tasks can be performed.
|
# these tasks can be performed.
|
||||||
#
|
#
|
||||||
# - Generate any Use/Config/Support files here once everything else has
|
# - Generate any Use/Config/Support files here once everything else has
|
||||||
# been processed e.g. "UseGeant4.cmake", "Geant4Config.cmake", library
|
|
||||||
# dependencies etc.
|
|
||||||
# - Geant4Make.gmk
|
# - Geant4Make.gmk
|
||||||
include(G4ConfigureGNUMakeHelpers)
|
include(G4ConfigureGNUMakeHelpers)
|
||||||
|
|
||||||
@@ -110,7 +107,9 @@ include(G4ConfigureCMakeHelpers)
|
|||||||
# - Testing configuration.
|
# - Testing configuration.
|
||||||
# Done here, as projects under 'tests' require Geant4Config.
|
# Done here, as projects under 'tests' require Geant4Config.
|
||||||
if(GEANT4_ENABLE_TESTING)
|
if(GEANT4_ENABLE_TESTING)
|
||||||
add_subdirectory(tests)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/tests)
|
||||||
|
add_subdirectory(tests)
|
||||||
|
endif()
|
||||||
if(EXISTS ${CMAKE_SOURCE_DIR}/benchmarks)
|
if(EXISTS ${CMAKE_SOURCE_DIR}/benchmarks)
|
||||||
add_subdirectory(benchmarks)
|
add_subdirectory(benchmarks)
|
||||||
endif()
|
endif()
|
||||||
@@ -137,11 +136,11 @@ endif()
|
|||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# - CPack-aging
|
# - CPack-aging
|
||||||
include(Geant4CPackBase)
|
include(G4CPack)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# Final output - show what's been enabled so that user knows what's
|
# Final output - show what's been enabled so that user knows what's
|
||||||
# happening - also useful for later problem solving!
|
# happening - also useful for later problem solving!
|
||||||
#
|
#
|
||||||
GEANT4_PRINT_ENABLED_FEATURES()
|
geant4_print_enabled_features()
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
# Integration and unit tests
|
# Integration and unit tests
|
||||||
# - "ENABLE_TESTING" means all tests under tests/
|
# - "ENABLE_TESTING" means all tests under tests/
|
||||||
option(GEANT4_ENABLE_TESTING "Enable and define all the tests of the project" OFF)
|
option(GEANT4_ENABLE_TESTING "Enable and define all the tests of the project" OFF)
|
||||||
GEANT4_ADD_FEATURE(GEANT4_ENABLE_TESTING "Enable and define all the tests of the project")
|
geant4_add_feature(GEANT4_ENABLE_TESTING "Enable and define all the tests of the project")
|
||||||
mark_as_advanced(GEANT4_ENABLE_TESTING)
|
mark_as_advanced(GEANT4_ENABLE_TESTING)
|
||||||
|
|
||||||
# - "BUILD_TESTS" means all 'tests' in individual categories.
|
# - "BUILD_TESTS" means all 'tests' in individual categories.
|
||||||
option(GEANT4_BUILD_TESTS "Build all the tests of the project" OFF)
|
option(GEANT4_BUILD_TESTS "Build all the tests of the project" OFF)
|
||||||
GEANT4_ADD_FEATURE(GEANT4_BUILD_TESTS "Build all the tests of the project")
|
geant4_add_feature(GEANT4_BUILD_TESTS "Build all the tests of the project")
|
||||||
mark_as_advanced(GEANT4_BUILD_TESTS)
|
mark_as_advanced(GEANT4_BUILD_TESTS)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
@@ -33,7 +33,7 @@ if(GEANT4_ENABLE_TESTING)
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# - Add base URL for test reference files
|
# - Add base URL for test reference files
|
||||||
set (GEANT4_TEST_REFERENCES_URL "http://cern.ch/geant4-data/stt/references/" CACHE
|
set(GEANT4_TEST_REFERENCES_URL "http://cern.ch/geant4-data/stt/references/" CACHE
|
||||||
STRING "base URL for test reference files")
|
STRING "base URL for test reference files")
|
||||||
mark_as_advanced(GEANT4_TEST_REFERENCES_URL)
|
mark_as_advanced(GEANT4_TEST_REFERENCES_URL)
|
||||||
|
|
||||||
+138
-143
@@ -1,168 +1,163 @@
|
|||||||
################################################################################
|
#.rst
|
||||||
|
# G4ClangFormat
|
||||||
|
# =============
|
||||||
#
|
#
|
||||||
# Creates a 'format' target that runs clang-format
|
# Functions and helper targets for formatting sources of a target using
|
||||||
#
|
# clang-format
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# - Include guard
|
# - Include guard
|
||||||
if(NOT __G4CLANGFORMAT_INCLUDED)
|
if(NOT __G4CLANGFORMAT_INCLUDED)
|
||||||
set(__G4CLANGFORMAT_INCLUDED 1)
|
set(__G4CLANGFORMAT_INCLUDED 1)
|
||||||
else()
|
else()
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#------------------------------------------------------------------------------#
|
# Default logging directory
|
||||||
|
|
||||||
set(G4FORMAT_LOGDIR ${PROJECT_BINARY_DIR}/format CACHE PATH
|
set(G4FORMAT_LOGDIR ${PROJECT_BINARY_DIR}/format CACHE PATH
|
||||||
"Output folder of files that are formatted")
|
"Output folder of files that are formatted")
|
||||||
|
|
||||||
#------------------------------------------------------------------------------#
|
# Find clang-format (optional)
|
||||||
|
find_program(CLANG_FORMATTER NAMES
|
||||||
find_program(CLANG_FORMATTER
|
clang-format-6 # prefer clang-format version 6.0
|
||||||
NAMES
|
clang-format-6.0
|
||||||
clang-format-8.0
|
clang-format-mp-6.0 # Apple macports version
|
||||||
clang-format-7.0
|
clang-format)
|
||||||
clang-format-6.0
|
|
||||||
clang-format)
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------#
|
|
||||||
|
|
||||||
function(exclude_from_format)
|
function(exclude_from_format)
|
||||||
cmake_parse_arguments(ARG
|
cmake_parse_arguments(ARG "" "" "HEADERS;SOURCES;FILES" ${ARGN})
|
||||||
"" "" "HEADERS;SOURCES;FILES" ${ARGN})
|
|
||||||
|
|
||||||
function(_add_labels _path)
|
function(_add_labels _path)
|
||||||
foreach(_FILE ${ARGN})
|
foreach(_FILE ${ARGN})
|
||||||
if(NOT IS_ABSOLUTE ${_FILE})
|
if(NOT IS_ABSOLUTE ${_FILE})
|
||||||
set(_FILE ${CMAKE_CURRENT_LIST_DIR}${_path}/${_FILE})
|
set(_FILE ${CMAKE_CURRENT_LIST_DIR}${_path}/${_FILE})
|
||||||
endif()
|
endif()
|
||||||
set(_LABELS "EXCLUDE_FORMAT")
|
set(_LABELS "EXCLUDE_FORMAT")
|
||||||
get_source_file_property(_EXISTING_LABELS ${_FILE} LABELS)
|
get_source_file_property(_EXISTING_LABELS ${_FILE} LABELS)
|
||||||
if(_EXISTING_LABELS)
|
if(_EXISTING_LABELS)
|
||||||
list(APPEND _LABELS ${_EXISTING_LABELS})
|
list(APPEND _LABELS ${_EXISTING_LABELS})
|
||||||
endif()
|
endif()
|
||||||
set_source_files_properties(${_FILE} PROPERTIES
|
set_source_files_properties(${_FILE} PROPERTIES LABELS "${_LABELS}")
|
||||||
LABELS "${_LABELS}")
|
get_source_file_property(_EXISTING_LABELS ${_FILE} LABELS)
|
||||||
get_source_file_property(_EXISTING_LABELS ${_FILE} LABELS)
|
endforeach()
|
||||||
endforeach()
|
endfunction()
|
||||||
endfunction()
|
|
||||||
|
|
||||||
_add_labels("/include" ${ARG_HEADERS})
|
|
||||||
_add_labels("/src" ${ARG_SOURCES})
|
|
||||||
_add_labels("" ${ARG_FILES})
|
|
||||||
|
|
||||||
|
_add_labels("/include" ${ARG_HEADERS})
|
||||||
|
_add_labels("/src" ${ARG_SOURCES})
|
||||||
|
_add_labels("" ${ARG_FILES})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
#------------------------------------------------------------------------------#
|
#------------------------------------------------------------------------------#
|
||||||
|
|
||||||
function(create_format_directory)
|
function(create_format_directory)
|
||||||
if(NOT EXISTS ${G4FORMAT_LOGDIR})
|
if(NOT EXISTS ${G4FORMAT_LOGDIR})
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND}
|
execute_process(COMMAND ${CMAKE_COMMAND}
|
||||||
-E make_directory ${G4FORMAT_LOGDIR})
|
-E make_directory ${G4FORMAT_LOGDIR})
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
#------------------------------------------------------------------------------#
|
#------------------------------------------------------------------------------#
|
||||||
|
|
||||||
function(geant4_format_target)
|
function(geant4_format_target)
|
||||||
if(CLANG_FORMATTER)
|
if(NOT CLANG_FORMATTER)
|
||||||
cmake_parse_arguments(G4FMTTARGET
|
return()
|
||||||
"" "NAME" "SOURCES" ${ARGN})
|
endif()
|
||||||
string(REGEX REPLACE "-format$" "" G4TARGET_NAME "${G4FMTTARGET_NAME}")
|
|
||||||
# ensure not empty list
|
|
||||||
if(NOT "${G4FMTTARGET_SOURCES}" STREQUAL "")
|
|
||||||
# create output directory
|
|
||||||
create_format_directory()
|
|
||||||
set(SOURCES ) # list of sources
|
|
||||||
set(FILELOG ) # string of sources (for log)
|
|
||||||
foreach(_SOURCE ${G4FMTTARGET_SOURCES})
|
|
||||||
# files in binary directory are almost always generated files
|
|
||||||
string(FIND "${_SOURCE}" "${PROJECT_BINARY_DIR}" IN_BINARY_DIR)
|
|
||||||
# ignore generated files
|
|
||||||
if(IN_BINARY_DIR GREATER -1)
|
|
||||||
continue()
|
|
||||||
endif()
|
|
||||||
# check if exists (valid full path)
|
|
||||||
if(EXISTS "${_SOURCE}")
|
|
||||||
# do nothing -- absolute path was specified
|
|
||||||
elseif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${_SOURCE}")
|
|
||||||
# a relative path was specified
|
|
||||||
set(_SOURCE ${CMAKE_CURRENT_LIST_DIR}/${_SOURCE})
|
|
||||||
else()
|
|
||||||
# neither relative nor absolute
|
|
||||||
message(STATUS "[format] file not found: '${_SOURCE}'")
|
|
||||||
continue()
|
|
||||||
endif()
|
|
||||||
#string(REPLACE "${PROJECT_SOURCE_DIR}/" "" _SOURCE ${_SOURCE})
|
|
||||||
get_source_file_property(SOURCE_LABELS ${_SOURCE} LABELS)
|
|
||||||
list(FIND SOURCE_LABELS "EXCLUDE_FORMAT" EXCLUDE_FORMAT)
|
|
||||||
if(EXCLUDE_FORMAT GREATER -1)
|
|
||||||
continue()
|
|
||||||
endif()
|
|
||||||
# append to log
|
|
||||||
set(FILELOG "${FILELOG}${_SOURCE}\n")
|
|
||||||
# add to list to be processed
|
|
||||||
list(APPEND SOURCES ${_SOURCE})
|
|
||||||
endforeach()
|
|
||||||
# write format file
|
|
||||||
set(FMTLOG_OUT ${G4FORMAT_LOGDIR}/${G4TARGET_NAME}.txt)
|
|
||||||
file(WRITE ${FMTLOG_OUT} "${FILELOG}")
|
|
||||||
file(RELATIVE_PATH FMTLOG_RELATIVE_OUT ${PROJECT_BINARY_DIR} ${FMTLOG_OUT})
|
|
||||||
# get the number of source files
|
|
||||||
list(LENGTH SOURCES NUM_SOURCES)
|
|
||||||
# if there are too many source files (arguments), command will fail
|
|
||||||
# so process no more than 500 at a time
|
|
||||||
if(NUM_SOURCES GREATER 500)
|
|
||||||
# function to generate indices
|
|
||||||
function(generate_indices VAR NUM)
|
|
||||||
set(INDICES )
|
|
||||||
set(N 0)
|
|
||||||
while(N LESS NUM)
|
|
||||||
list(APPEND INDICES ${N})
|
|
||||||
math(EXPR N "${N}+1")
|
|
||||||
endwhile()
|
|
||||||
set(${VAR} ${INDICES} PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
# generate 500 indices
|
|
||||||
generate_indices(INDICES 500)
|
|
||||||
set(FORMAT_COMMANDS )
|
|
||||||
# while there are still sources in list
|
|
||||||
while(NUM_SOURCES GREATER 0)
|
|
||||||
# if below 500, re-generate indices
|
|
||||||
if(NUM_SOURCES LESS 500)
|
|
||||||
generate_indices(INDICES ${NUM_SOURCES})
|
|
||||||
endif()
|
|
||||||
# get the subset of first 500
|
|
||||||
list(GET SOURCES ${INDICES} SOURCES_SUBSET)
|
|
||||||
# add the target for block of 500
|
|
||||||
list(APPEND FORMAT_COMMANDS COMMAND ${CLANG_FORMATTER} -i ${SOURCES_SUBSET})
|
|
||||||
# remove 500 we just processed
|
|
||||||
list(REMOVE_AT SOURCES ${INDICES})
|
|
||||||
# update the number of sources remaining
|
|
||||||
list(LENGTH SOURCES NUM_SOURCES)
|
|
||||||
endwhile()
|
|
||||||
# add the custom command
|
|
||||||
list(LENGTH FORMAT_COMMANDS NUM_COMMANDS)
|
|
||||||
if(NUM_COMMANDS GREATER 0)
|
|
||||||
add_custom_target(${G4FMTTARGET_NAME}
|
|
||||||
${FORMAT_COMMANDS}
|
|
||||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
|
||||||
COMMENT
|
|
||||||
"Running '${CLANG_FORMATTER}' on source files in '${G4TARGET_NAME}' target (see ${FMTLOG_RELATIVE_OUT})...")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
list(LENGTH SOURCES NUM_SOURCES)
|
|
||||||
if(NUM_SOURCES GREATER 0)
|
|
||||||
# if less than 500 source files, add all in one target
|
|
||||||
add_custom_target(${G4FMTTARGET_NAME}
|
|
||||||
COMMAND ${CLANG_FORMATTER} -i ${SOURCES}
|
|
||||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
|
||||||
COMMENT
|
|
||||||
"Running '${CLANG_FORMATTER}' on source files in '${G4TARGET_NAME}' target (see ${FMTLOG_RELATIVE_OUT})...")
|
|
||||||
endif()
|
|
||||||
endif(NUM_SOURCES GREATER 500)
|
|
||||||
endif(NOT "${G4FMTTARGET_SOURCES}" STREQUAL "")
|
|
||||||
endif(CLANG_FORMATTER)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------#
|
cmake_parse_arguments(G4FMTTARGET "" "NAME" "SOURCES" ${ARGN})
|
||||||
|
string(REGEX REPLACE "-format$" "" G4TARGET_NAME "${G4FMTTARGET_NAME}")
|
||||||
|
|
||||||
|
# ensure not empty list
|
||||||
|
if("${G4FMTTARGET_SOURCES}" STREQUAL "")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# create output directory
|
||||||
|
create_format_directory()
|
||||||
|
set(SOURCES ) # list of sources
|
||||||
|
set(FILELOG ) # string of sources (for log)
|
||||||
|
foreach(_SOURCE ${G4FMTTARGET_SOURCES})
|
||||||
|
# files in binary directory are almost always generated files
|
||||||
|
string(FIND "${_SOURCE}" "${PROJECT_BINARY_DIR}" IN_BINARY_DIR)
|
||||||
|
# ignore generated files
|
||||||
|
if(IN_BINARY_DIR GREATER -1)
|
||||||
|
continue()
|
||||||
|
endif()
|
||||||
|
# check if exists (valid full path)
|
||||||
|
if(EXISTS "${_SOURCE}")
|
||||||
|
# do nothing -- absolute path was specified
|
||||||
|
elseif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${_SOURCE}")
|
||||||
|
# a relative path was specified
|
||||||
|
set(_SOURCE ${CMAKE_CURRENT_LIST_DIR}/${_SOURCE})
|
||||||
|
else()
|
||||||
|
# neither relative nor absolute
|
||||||
|
message(STATUS "[format] file not found: '${_SOURCE}'")
|
||||||
|
continue()
|
||||||
|
endif()
|
||||||
|
#string(REPLACE "${PROJECT_SOURCE_DIR}/" "" _SOURCE ${_SOURCE})
|
||||||
|
get_source_file_property(SOURCE_LABELS ${_SOURCE} LABELS)
|
||||||
|
list(FIND SOURCE_LABELS "EXCLUDE_FORMAT" EXCLUDE_FORMAT)
|
||||||
|
if(EXCLUDE_FORMAT GREATER -1)
|
||||||
|
continue()
|
||||||
|
endif()
|
||||||
|
# append to log
|
||||||
|
set(FILELOG "${FILELOG}${_SOURCE}\n")
|
||||||
|
# add to list to be processed
|
||||||
|
list(APPEND SOURCES ${_SOURCE})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
# write format file
|
||||||
|
set(FMTLOG_OUT ${G4FORMAT_LOGDIR}/${G4TARGET_NAME}.txt)
|
||||||
|
file(WRITE ${FMTLOG_OUT} "${FILELOG}")
|
||||||
|
file(RELATIVE_PATH FMTLOG_RELATIVE_OUT ${PROJECT_BINARY_DIR} ${FMTLOG_OUT})
|
||||||
|
# get the number of source files
|
||||||
|
list(LENGTH SOURCES NUM_SOURCES)
|
||||||
|
# if there are too many source files (arguments), command will fail
|
||||||
|
# so process no more than 500 at a time
|
||||||
|
if(NUM_SOURCES GREATER 500)
|
||||||
|
# function to generate indices
|
||||||
|
function(generate_indices VAR NUM)
|
||||||
|
set(INDICES )
|
||||||
|
set(N 0)
|
||||||
|
while(N LESS NUM)
|
||||||
|
list(APPEND INDICES ${N})
|
||||||
|
math(EXPR N "${N}+1")
|
||||||
|
endwhile()
|
||||||
|
set(${VAR} ${INDICES} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
# generate 500 indices
|
||||||
|
generate_indices(INDICES 500)
|
||||||
|
set(FORMAT_COMMANDS )
|
||||||
|
# while there are still sources in list
|
||||||
|
while(NUM_SOURCES GREATER 0)
|
||||||
|
# if below 500, re-generate indices
|
||||||
|
if(NUM_SOURCES LESS 500)
|
||||||
|
generate_indices(INDICES ${NUM_SOURCES})
|
||||||
|
endif()
|
||||||
|
# get the subset of first 500
|
||||||
|
list(GET SOURCES ${INDICES} SOURCES_SUBSET)
|
||||||
|
# add the target for block of 500
|
||||||
|
list(APPEND FORMAT_COMMANDS COMMAND ${CLANG_FORMATTER} -i ${SOURCES_SUBSET})
|
||||||
|
# remove 500 we just processed
|
||||||
|
list(REMOVE_AT SOURCES ${INDICES})
|
||||||
|
# update the number of sources remaining
|
||||||
|
list(LENGTH SOURCES NUM_SOURCES)
|
||||||
|
endwhile()
|
||||||
|
# add the custom command
|
||||||
|
list(LENGTH FORMAT_COMMANDS NUM_COMMANDS)
|
||||||
|
if(NUM_COMMANDS GREATER 0)
|
||||||
|
add_custom_target(${G4FMTTARGET_NAME}
|
||||||
|
${FORMAT_COMMANDS}
|
||||||
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
|
COMMENT "Running '${CLANG_FORMATTER}' on source files in '${G4TARGET_NAME}' target (see ${FMTLOG_RELATIVE_OUT})...")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
list(LENGTH SOURCES NUM_SOURCES)
|
||||||
|
if(NUM_SOURCES GREATER 0)
|
||||||
|
# if less than 500 source files, add all in one target
|
||||||
|
add_custom_target(${G4FMTTARGET_NAME}
|
||||||
|
COMMAND ${CLANG_FORMATTER} -i ${SOURCES}
|
||||||
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
|
COMMENT
|
||||||
|
"Running '${CLANG_FORMATTER}' on source files in '${G4TARGET_NAME}' target (see ${FMTLOG_RELATIVE_OUT})...")
|
||||||
|
endif()
|
||||||
|
endif(NUM_SOURCES GREATER 500)
|
||||||
|
endfunction()
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ set(GEANT4_THIRD_PARTY_IMPORT_SETUP )
|
|||||||
# Externals libraries that may be present
|
# Externals libraries that may be present
|
||||||
set(GEANT4_EXTERNALS_TARGETS )
|
set(GEANT4_EXTERNALS_TARGETS )
|
||||||
|
|
||||||
# - Stuff from Geant4OptionalComponents.cmake
|
# - Stuff from G4OptionalComponents.cmake
|
||||||
# - CLHEP
|
# - CLHEP
|
||||||
# If it's internal, add it to the externals list
|
# If it's internal, add it to the externals list
|
||||||
if(NOT GEANT4_USE_SYSTEM_CLHEP)
|
if(NOT GEANT4_USE_SYSTEM_CLHEP)
|
||||||
@@ -82,13 +82,20 @@ if(NOT GEANT4_USE_SYSTEM_ZLIB)
|
|||||||
list(APPEND GEANT4_EXTERNALS_TARGETS G4zlib)
|
list(APPEND GEANT4_EXTERNALS_TARGETS G4zlib)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# - PTL
|
||||||
|
# If it's internal, add it to the externals list
|
||||||
|
if(NOT GEANT4_USE_SYSTEM_PTL)
|
||||||
|
list(APPEND GEANT4_EXTERNALS_TARGETS G4ptl)
|
||||||
|
set(PTL_BUILDTREE_PREFIX "${PROJECT_BINARY_DIR}/source/externals/ptl")
|
||||||
|
set(PTL_INSTALLTREE_PREFIX "\${_geant4_thisdir}/../PTL")
|
||||||
|
endif()
|
||||||
|
|
||||||
# - USolids
|
# - USolids
|
||||||
# Compile definitions
|
# Compile definitions
|
||||||
if(GEANT4_USE_USOLIDS OR GEANT4_USE_PARTIAL_USOLIDS)
|
if(GEANT4_USE_USOLIDS OR GEANT4_USE_PARTIAL_USOLIDS)
|
||||||
set(GEANT4_USE_USOLIDS_EITHER ON)
|
set(GEANT4_USE_USOLIDS_EITHER ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# - Stuff from Geant4InterfaceOptions.cmake
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# - Common Build/Install Tree Configuration files
|
# - Common Build/Install Tree Configuration files
|
||||||
@@ -124,7 +131,8 @@ set(GEANT4_INCLUDE_DIR_SETUP "
|
|||||||
# Geant4 configured for use from the build tree - absolute paths are used.
|
# Geant4 configured for use from the build tree - absolute paths are used.
|
||||||
set(Geant4_INCLUDE_DIR \"${__geant4_buildtree_include_dirs}\")
|
set(Geant4_INCLUDE_DIR \"${__geant4_buildtree_include_dirs}\")
|
||||||
")
|
")
|
||||||
|
# Builtin PTL is self located
|
||||||
|
set(PACKAGE_PTL_PREFIX "${PTL_BUILDTREE_PREFIX}")
|
||||||
# Geant4 data used in build tree
|
# Geant4 data used in build tree
|
||||||
geant4_export_datasets(BUILD GEANT4_DATASET_DESCRIPTIONS)
|
geant4_export_datasets(BUILD GEANT4_DATASET_DESCRIPTIONS)
|
||||||
|
|
||||||
@@ -238,7 +246,8 @@ else()
|
|||||||
get_filename_component(Geant4_INCLUDE_DIR \"\${_geant4_thisdir}/${GEANT4_RELATIVE_HEADER_PATH}\" ABSOLUTE)
|
get_filename_component(Geant4_INCLUDE_DIR \"\${_geant4_thisdir}/${GEANT4_RELATIVE_HEADER_PATH}\" ABSOLUTE)
|
||||||
")
|
")
|
||||||
endif()
|
endif()
|
||||||
|
# Builtin PTL is self located
|
||||||
|
set(PACKAGE_PTL_PREFIX "${PTL_INSTALLTREE_PREFIX}")
|
||||||
# Geant4 data used in install tree
|
# Geant4 data used in install tree
|
||||||
geant4_export_datasets(INSTALL GEANT4_DATASET_DESCRIPTIONS)
|
geant4_export_datasets(INSTALL GEANT4_DATASET_DESCRIPTIONS)
|
||||||
|
|
||||||
|
|||||||
@@ -507,6 +507,13 @@ macro(_g4tc_configure_tc_variables SHELL_FAMILY SCRIPT_NAME)
|
|||||||
_g4tc_setenv_command(GEANT4_TC_G4LIB_USE_ZLIB ${SHELL_FAMILY} G4LIB_USE_ZLIB 1)
|
_g4tc_setenv_command(GEANT4_TC_G4LIB_USE_ZLIB ${SHELL_FAMILY} G4LIB_USE_ZLIB 1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# - PTL...
|
||||||
|
if(GEANT4_USE_SYSTEM_PTL)
|
||||||
|
set(GEANT4_TC_G4LIB_USE_PTL "# USING SYSTEM PTL")
|
||||||
|
else()
|
||||||
|
_g4tc_setenv_command(GEANT4_TC_G4LIB_USE_PTL ${SHELL_FAMILY} G4LIB_USE_PTL 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
# - GDML...
|
# - GDML...
|
||||||
if(GEANT4_USE_GDML)
|
if(GEANT4_USE_GDML)
|
||||||
_g4tc_setenv_command(GEANT4_TC_G4LIB_USE_GDML ${SHELL_FAMILY} G4LIB_USE_GDML 1)
|
_g4tc_setenv_command(GEANT4_TC_G4LIB_USE_GDML ${SHELL_FAMILY} G4LIB_USE_GDML 1)
|
||||||
|
|||||||
@@ -167,12 +167,21 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
|
|||||||
set(G4_BUILTWITH_ZLIB "yes")
|
set(G4_BUILTWITH_ZLIB "yes")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# - PTL
|
||||||
|
if(GEANT4_USE_SYSTEM_PTL)
|
||||||
|
set(G4_BUILTWITH_PTL "no")
|
||||||
|
else()
|
||||||
|
set(G4_BUILTWITH_PTL "yes")
|
||||||
|
endif()
|
||||||
|
|
||||||
# - GDML
|
# - GDML
|
||||||
if(GEANT4_USE_GDML)
|
if(GEANT4_USE_GDML)
|
||||||
set(G4_BUILTWITH_GDML "yes")
|
set(G4_BUILTWITH_GDML "yes")
|
||||||
set(G4_XERCESC_INCLUDE_DIRS ${XercesC_INCLUDE_DIR})
|
set(G4_XERCESC_INCLUDE_DIRS ${XercesC_INCLUDE_DIR})
|
||||||
list(REMOVE_DUPLICATES G4_XERCESC_INCLUDE_DIRS)
|
list(REMOVE_DUPLICATES G4_XERCESC_INCLUDE_DIRS)
|
||||||
list(REMOVE_ITEM G4_XERCESC_INCLUDE_DIRS ${_cxx_compiler_dirs})
|
if(_cxx_compiler_dirs)
|
||||||
|
list(REMOVE_ITEM G4_XERCESC_INCLUDE_DIRS ${_cxx_compiler_dirs})
|
||||||
|
endif()
|
||||||
|
|
||||||
set(G4_XERCESC_CFLAGS )
|
set(G4_XERCESC_CFLAGS )
|
||||||
foreach(_dir ${G4_XERCESC_INCLUDE_DIRS})
|
foreach(_dir ${G4_XERCESC_INCLUDE_DIRS})
|
||||||
@@ -194,7 +203,9 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
|
|||||||
set(G4_BUILTWITH_USOLIDS "yes")
|
set(G4_BUILTWITH_USOLIDS "yes")
|
||||||
set(G4_USOLIDS_INCLUDE_DIRS "${USOLIDS_INCLUDE_DIRS} ${VECGEOM_EXTERNAL_INCLUDES}")
|
set(G4_USOLIDS_INCLUDE_DIRS "${USOLIDS_INCLUDE_DIRS} ${VECGEOM_EXTERNAL_INCLUDES}")
|
||||||
list(REMOVE_DUPLICATES G4_USOLIDS_INCLUDE_DIRS)
|
list(REMOVE_DUPLICATES G4_USOLIDS_INCLUDE_DIRS)
|
||||||
list(REMOVE_ITEM G4_USOLIDS_INCLUDE_DIRS ${_cxx_compiler_dirs})
|
if(_cxx_compiler_dirs)
|
||||||
|
list(REMOVE_ITEM G4_USOLIDS_INCLUDE_DIRS ${_cxx_compiler_dirs})
|
||||||
|
endif()
|
||||||
|
|
||||||
string(REPLACE ";" " " G4_USOLIDS_CFLAGS "${VECGEOM_DEFINITIONS}")
|
string(REPLACE ";" " " G4_USOLIDS_CFLAGS "${VECGEOM_DEFINITIONS}")
|
||||||
foreach(_dir ${G4_USOLIDS_INCLUDE_DIRS})
|
foreach(_dir ${G4_USOLIDS_INCLUDE_DIRS})
|
||||||
@@ -221,14 +232,12 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
|
|||||||
# - Qt
|
# - Qt
|
||||||
if(GEANT4_USE_QT)
|
if(GEANT4_USE_QT)
|
||||||
set(G4_BUILTWITH_QT "yes")
|
set(G4_BUILTWITH_QT "yes")
|
||||||
if(QT4_FOUND)
|
set(G4_QT_INCLUDE_DIRS ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5OpenGL_INCLUDE_DIRS} ${Qt5PrintSupport_INCLUDE_DIRS})
|
||||||
set(G4_QT_INCLUDE_DIRS ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR})
|
|
||||||
else()
|
|
||||||
set(G4_QT_INCLUDE_DIRS ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5OpenGL_INCLUDE_DIRS} ${Qt5PrintSupport_INCLUDE_DIRS})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
list(REMOVE_DUPLICATES G4_QT_INCLUDE_DIRS)
|
list(REMOVE_DUPLICATES G4_QT_INCLUDE_DIRS)
|
||||||
list(REMOVE_ITEM G4_QT_INCLUDE_DIRS ${_cxx_compiler_dirs})
|
if(_cxx_compiler_dirs)
|
||||||
|
list(REMOVE_ITEM G4_QT_INCLUDE_DIRS ${_cxx_compiler_dirs})
|
||||||
|
endif()
|
||||||
|
|
||||||
set(G4_QT_CFLAGS )
|
set(G4_QT_CFLAGS )
|
||||||
foreach(_dir ${G4_QT_INCLUDE_DIRS})
|
foreach(_dir ${G4_QT_INCLUDE_DIRS})
|
||||||
@@ -289,7 +298,9 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
|
|||||||
if(G4_CONFIG_NEEDS_X11)
|
if(G4_CONFIG_NEEDS_X11)
|
||||||
set(_raw_x11_includes ${X11_INCLUDE_DIR})
|
set(_raw_x11_includes ${X11_INCLUDE_DIR})
|
||||||
list(REMOVE_DUPLICATES _raw_x11_includes)
|
list(REMOVE_DUPLICATES _raw_x11_includes)
|
||||||
list(REMOVE_ITEM _raw_x11_includes ${_cxx_compiler_dirs})
|
if(_cxx_compiler_dirs)
|
||||||
|
list(REMOVE_ITEM _raw_x11_includes ${_cxx_compiler_dirs})
|
||||||
|
endif()
|
||||||
set(G4_X11_CFLAGS )
|
set(G4_X11_CFLAGS )
|
||||||
foreach(_p ${_raw_x11_includes})
|
foreach(_p ${_raw_x11_includes})
|
||||||
set(G4_X11_CFLAGS "-I${_p} ${G4_X11_CFLAGS}")
|
set(G4_X11_CFLAGS "-I${_p} ${G4_X11_CFLAGS}")
|
||||||
|
|||||||
+2
-2
@@ -18,11 +18,11 @@ geant4_add_dataset(
|
|||||||
# - Low energy electromagnetics
|
# - Low energy electromagnetics
|
||||||
geant4_add_dataset(
|
geant4_add_dataset(
|
||||||
NAME G4EMLOW
|
NAME G4EMLOW
|
||||||
VERSION 7.9.1
|
VERSION 7.12
|
||||||
FILENAME G4EMLOW
|
FILENAME G4EMLOW
|
||||||
EXTENSION tar.gz
|
EXTENSION tar.gz
|
||||||
ENVVAR G4LEDATA
|
ENVVAR G4LEDATA
|
||||||
MD5SUM 1308dc5d73b5539557e2ec6b96f7e5ef
|
MD5SUM 0d3d46eeb7420f2b996242fec756ee52
|
||||||
)
|
)
|
||||||
|
|
||||||
# - Photon evaporation
|
# - Photon evaporation
|
||||||
@@ -9,9 +9,6 @@
|
|||||||
# CMake functions and macros for declaring and working with build
|
# CMake functions and macros for declaring and working with build
|
||||||
# products of Geant4.
|
# products of Geant4.
|
||||||
#
|
#
|
||||||
# WIP: At present, this simply forwards to the old implementation
|
|
||||||
# Eventually will allow switch between the old and the new,
|
|
||||||
# then just the new once transition complete.
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------
|
#-----------------------------------------------------------------
|
||||||
# License and Disclaimer
|
# License and Disclaimer
|
||||||
@@ -44,4 +41,965 @@ else()
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(G4DeveloperAPI_OLD)
|
# Whilst we test, allow switching between old and new implementations
|
||||||
|
option(GEANT4_USE_NEW_CMAKE "Use new CMake module/library implementation" ON)
|
||||||
|
mark_as_advanced(GEANT4_USE_NEW_CMAKE)
|
||||||
|
|
||||||
|
if(NOT GEANT4_USE_NEW_CMAKE)
|
||||||
|
include(G4DeveloperAPI_OLD)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Needed modules
|
||||||
|
include(G4ClangFormat)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# Module Commands
|
||||||
|
# ^^^^^^^^^^^^^^^
|
||||||
|
#
|
||||||
|
# .. cmake:command:: geant4_add_module
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# geant4_add_module(<name>
|
||||||
|
# PUBLIC_HEADERS header1 [header2 ...]
|
||||||
|
# [SOURCES source1 [source2 ...]])
|
||||||
|
#
|
||||||
|
# Add a Geant4 module called ``<name>`` to the project, composed
|
||||||
|
# of the source files listed in the ``PUBLIC_HEADERS`` and ``SOURCES``
|
||||||
|
# arguments. The ``<name>`` must be unique within the project.
|
||||||
|
# The directory in which the module is added (i.e. ``CMAKE_CURRENT_LIST_DIR``
|
||||||
|
# for the CMake script in which ``geant4_add_module`` is called) must contain:
|
||||||
|
#
|
||||||
|
# * An ``include`` subdirectory for the public headers
|
||||||
|
# * A ``src`` subdirectory for source files if the module provides these
|
||||||
|
#
|
||||||
|
# The ``PUBLIC_HEADERS`` argument must list the headers comprising the
|
||||||
|
# public interface of the module. If a header is supplied as a relative path,
|
||||||
|
# this is interpreted as being relative to the ``include`` subdirectory of the module.
|
||||||
|
# Absolute paths may also be supplied, e.g. if headers are generated by the project.
|
||||||
|
#
|
||||||
|
# The ``SOURCES`` argument should list any source files for the module.
|
||||||
|
# If a source is is supplied as a relative path, this is interpreted as being
|
||||||
|
# relative to the ``src`` subdirectory of the module. Absolute paths may
|
||||||
|
# also be supplied, e.g. if sources are generated by the project.
|
||||||
|
#
|
||||||
|
function(geant4_add_module _name)
|
||||||
|
__geant4_module_assert_not_exists(${_name})
|
||||||
|
set_property(GLOBAL APPEND PROPERTY GEANT4_DEFINED_MODULES ${_name})
|
||||||
|
cmake_parse_arguments(G4ADDMOD
|
||||||
|
""
|
||||||
|
""
|
||||||
|
"PUBLIC_HEADERS;SOURCES"
|
||||||
|
${ARGN}
|
||||||
|
)
|
||||||
|
|
||||||
|
# - Check required directory structure at definition point
|
||||||
|
# Headers always
|
||||||
|
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/include")
|
||||||
|
message(FATAL_ERROR "Missing required 'include' subdirectory for module '${_name}' at '${CMAKE_CURRENT_LIST_DIR}'")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Sources if defined
|
||||||
|
if(G4ADDMOD_SOURCES AND (NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/src"))
|
||||||
|
message(FATAL_ERROR "Missing required 'src' subdirectory for module '${_name}' at '${CMAKE_CURRENT_LIST_DIR}'")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Compose header/source lists
|
||||||
|
set(__tmp_HEADERS)
|
||||||
|
foreach(__elem ${G4ADDMOD_PUBLIC_HEADERS})
|
||||||
|
if(IS_ABSOLUTE "${__elem}")
|
||||||
|
list(APPEND __tmp_HEADERS "${__elem}")
|
||||||
|
else()
|
||||||
|
list(APPEND __tmp_HEADERS "${CMAKE_CURRENT_LIST_DIR}/include/${__elem}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
geant4_set_module_property(${_name} PROPERTY PUBLIC_HEADERS ${__tmp_HEADERS})
|
||||||
|
|
||||||
|
set(__tmp_SOURCES)
|
||||||
|
foreach(__elem ${G4ADDMOD_SOURCES})
|
||||||
|
if(IS_ABSOLUTE "${__elem}")
|
||||||
|
list(APPEND __tmp_SOURCES "${__elem}")
|
||||||
|
else()
|
||||||
|
list(APPEND __tmp_SOURCES "${CMAKE_CURRENT_LIST_DIR}/src/${__elem}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
geant4_set_module_property(${_name} PROPERTY SOURCES ${__tmp_SOURCES})
|
||||||
|
|
||||||
|
# Set the default include directory for this module
|
||||||
|
geant4_module_include_directories(${_name} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>)
|
||||||
|
|
||||||
|
# Backward compatibility shim for direct usage of build directory
|
||||||
|
# Not all clients (esp. those using ROOT) may not fully support usage requirements
|
||||||
|
# and expect GEANT4_INCLUDE_DIRS to be complete
|
||||||
|
set_property(GLOBAL APPEND PROPERTY GEANT4_BUILDTREE_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/include")
|
||||||
|
|
||||||
|
# Record where we're defined so we can pop the file into IDEs
|
||||||
|
geant4_set_module_property(${_name} PROPERTY CMAKE_LIST_FILE "${CMAKE_CURRENT_LIST_FILE}")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# .. cmake:command:: geant4_module_include_directories
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# geant4_module_include_directories(<module>
|
||||||
|
# [PUBLIC pub1 [pub2 ...]
|
||||||
|
# [PRIVATE pri1 [pri2 ...]
|
||||||
|
# [INTERFACE int1 [int2 ...])
|
||||||
|
#
|
||||||
|
# Add include directories to given module.
|
||||||
|
#
|
||||||
|
function(geant4_module_include_directories _module)
|
||||||
|
__geant4_module_assert_exists(${_module})
|
||||||
|
cmake_parse_arguments(G4MODINCDIR
|
||||||
|
""
|
||||||
|
""
|
||||||
|
"PUBLIC;PRIVATE;INTERFACE"
|
||||||
|
${ARGN}
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach(_dir ${G4MODINCDIR_PUBLIC})
|
||||||
|
geant4_set_module_property(${_module} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_dir})
|
||||||
|
geant4_set_module_property(${_module} APPEND PROPERTY INCLUDE_DIRECTORIES ${_dir})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(_dir ${G4MODINCDIR_PRIVATE})
|
||||||
|
geant4_set_module_property(${_module} APPEND PROPERTY INCLUDE_DIRECTORIES ${_dir})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(_dir ${G4MODINCDIR_INTERFACE})
|
||||||
|
geant4_set_module_property(${_module} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_dir})
|
||||||
|
endforeach()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# .. cmake:command:: geant4_module_link_libraries
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# geant4_module_link_libraries(<module>
|
||||||
|
# [PUBLIC pub1 [pub2 ...]
|
||||||
|
# [PRIVATE pri1 [pri2 ...]
|
||||||
|
# [INTERFACE int1 [int2 ...])
|
||||||
|
#
|
||||||
|
# Link ``<module>`` to given targets.
|
||||||
|
#
|
||||||
|
function(geant4_module_link_libraries _module)
|
||||||
|
__geant4_module_assert_exists(${_module})
|
||||||
|
cmake_parse_arguments(G4MODLINKLIB
|
||||||
|
""
|
||||||
|
""
|
||||||
|
"PUBLIC;PRIVATE;INTERFACE"
|
||||||
|
${ARGN}
|
||||||
|
)
|
||||||
|
foreach(_lib ${G4MODLINKLIB_PUBLIC})
|
||||||
|
geant4_set_module_property(${_module} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${_lib})
|
||||||
|
geant4_set_module_property(${_module} APPEND PROPERTY LINK_LIBRARIES ${_lib})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(_lib ${G4MODLINKLIB_PRIVATE})
|
||||||
|
geant4_set_module_property(${_module} APPEND PROPERTY LINK_LIBRARIES ${_lib})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(_dir ${G4MODLINKLIB_INTERFACE})
|
||||||
|
geant4_set_module_property(${_module} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${_lib})
|
||||||
|
endforeach()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# .. cmake:command:: geant4_module_compile_definitions
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# geant4_module_compile_definitions(<module>
|
||||||
|
# [PUBLIC pub1 [pub2 ...]
|
||||||
|
# [PRIVATE pri1 [pri2 ...]
|
||||||
|
# [INTERFACE int1 [int2 ...])
|
||||||
|
#
|
||||||
|
# Add compile definitions for this module
|
||||||
|
#
|
||||||
|
# Use cases:
|
||||||
|
# 1. workarounds when a config header isn't suitable
|
||||||
|
#
|
||||||
|
# Needs care with DLLs if used for import/export declspecs
|
||||||
|
# Application of specific defs to single files not considered
|
||||||
|
# Expected that uses cases here minimal, and developers should
|
||||||
|
# in that case use set_source_files_properties or similar
|
||||||
|
# directly.
|
||||||
|
#
|
||||||
|
function(geant4_module_compile_definitions _module)
|
||||||
|
__geant4_module_assert_exists(${_module})
|
||||||
|
cmake_parse_arguments(G4MODCOMPILEDEF
|
||||||
|
""
|
||||||
|
""
|
||||||
|
"PUBLIC;PRIVATE;INTERFACE"
|
||||||
|
${ARGN}
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach(_lib ${G4MODCOMPILEDEF_PUBLIC})
|
||||||
|
geant4_set_module_property(${_module} APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS ${_lib})
|
||||||
|
geant4_set_module_property(${_module} APPEND PROPERTY COMPILE_DEFINITIONS ${_lib})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(_lib ${G4MODCOMPILEDEF_PRIVATE})
|
||||||
|
geant4_set_module_property(${_module} APPEND PROPERTY COMPILE_DEFINITIONS ${_lib})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(_dir ${G4MODCOMPILEDEF_INTERFACE})
|
||||||
|
geant4_set_module_property(${_module} APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS ${_lib})
|
||||||
|
endforeach()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# .. cmake:command:: geant4_get_modules
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# geant4_get_modules(<result>)
|
||||||
|
#
|
||||||
|
# Store the list of currently defined modules in the variable ``<result>``.
|
||||||
|
#
|
||||||
|
function(geant4_get_modules _result)
|
||||||
|
get_property(__tmp GLOBAL PROPERTY GEANT4_DEFINED_MODULES)
|
||||||
|
set(${_result} ${__tmp} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# .. cmake:command:: geant4_has_module
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# geant4_has_module(<result> <name>)
|
||||||
|
#
|
||||||
|
# Set variable ``<result>`` to a boolean which will be true if the module
|
||||||
|
# ``<name>`` is defined.
|
||||||
|
#
|
||||||
|
function(geant4_has_module _result _name)
|
||||||
|
set(__exists FALSE)
|
||||||
|
|
||||||
|
geant4_get_modules(__tmp)
|
||||||
|
if(__tmp)
|
||||||
|
list(FIND __tmp ${_name} __index)
|
||||||
|
if(__index GREATER -1)
|
||||||
|
set(__exists TRUE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(${_result} ${__exists} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# Module Properties
|
||||||
|
# =================
|
||||||
|
#
|
||||||
|
# A Geant4 module stores its build and usage requirements in a series
|
||||||
|
# of properties:
|
||||||
|
#
|
||||||
|
# * ``PUBLIC_HEADERS``
|
||||||
|
# * ``PRIVATE_HEADERS``
|
||||||
|
# * ``SOURCES``
|
||||||
|
# * ``INTERFACE_COMPILE_DEFINITIONS``
|
||||||
|
# * ``COMPILE_DEFINITIONS``
|
||||||
|
# * ``INTERFACE_INCLUDE_DIRECTORIES``
|
||||||
|
# * ``INCLUDE_DIRECTORIES``
|
||||||
|
# * ``INTERFACE_LINK_LIBRARIES``
|
||||||
|
# * ``LINK_LIBRARIES``
|
||||||
|
# * ``PARENT_TARGET``
|
||||||
|
# * ``CMAKE_LIST_FILE``
|
||||||
|
# * ``GLOBAL_DEPENDENCIES``
|
||||||
|
#
|
||||||
|
# The properties of a module may be queried and set using the following
|
||||||
|
# commands.
|
||||||
|
|
||||||
|
# .. cmake:command:: geant4_get_module_property
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# geant4_get_module_property(<result> <module> <property>)
|
||||||
|
#
|
||||||
|
# Store value of property ``<property>`` for ``<module>`` in variable
|
||||||
|
# ``<result>``.
|
||||||
|
#
|
||||||
|
# If ``<property>`` is not a valid module property, a FATAL_ERROR is
|
||||||
|
# emitted.
|
||||||
|
#
|
||||||
|
function(geant4_get_module_property _output _module _propertyname)
|
||||||
|
__geant4_module_assert_exists(${_module})
|
||||||
|
__geant4_module_validate_property(${_propertyname})
|
||||||
|
get_property(__result GLOBAL PROPERTY ${_module}_${_propertyname})
|
||||||
|
set(${_output} ${__result} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# .. cmake:command:: geant4_set_module_property
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# geant4_set_module_property(<module>
|
||||||
|
# [APPEND | APPEND_STRING]
|
||||||
|
# PROPERTY <property> <value>)
|
||||||
|
#
|
||||||
|
# Set property ``<property>`` of module ``<module>`` to ``<value>``.
|
||||||
|
#
|
||||||
|
# If ``APPEND`` is supplied, ``<value>`` will be appended to any existing
|
||||||
|
# value for the property as a list.
|
||||||
|
#
|
||||||
|
# If ``APPEND_STRING`` is supplied, ``<value>`` will be appended to any existing
|
||||||
|
# value for the property as a string. This option is mutually exclusive with
|
||||||
|
# ``APPEND``.
|
||||||
|
#
|
||||||
|
# If ``<property>`` is not a valid module property, a FATAL_ERROR is
|
||||||
|
# emitted.
|
||||||
|
#
|
||||||
|
function(geant4_set_module_property _module)
|
||||||
|
cmake_parse_arguments(G4SMP
|
||||||
|
"APPEND;APPEND_STRING"
|
||||||
|
""
|
||||||
|
"PROPERTY"
|
||||||
|
${ARGN}
|
||||||
|
)
|
||||||
|
# module must exist!
|
||||||
|
__geant4_module_assert_exists(${_module})
|
||||||
|
|
||||||
|
# Append/Append_string are mutually exclusive
|
||||||
|
if(G4SMP_APPEND AND G4SMP_APPEND_STRING)
|
||||||
|
message(FATAL_ERROR "geant4_set_module_property: cannot set both APPEND and APPEND_STRING")
|
||||||
|
elseif(G4SMP_APPEND)
|
||||||
|
set(G4SMP_APPEND_MODE "APPEND")
|
||||||
|
elseif(G4SMP_APPEND_MODE)
|
||||||
|
set(G4SMP_APPEND_MODE "APPEND_STRING")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# First element of PROPERTY list is prop name
|
||||||
|
list(GET G4SMP_PROPERTY 0 G4SMP_PROPERTY_NAME)
|
||||||
|
if(NOT G4SMP_PROPERTY_NAME)
|
||||||
|
message(FATAL_ERROR "geant4_set_module_property: Required PROPERTY argument is missing")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
__geant4_module_validate_property(${G4SMP_PROPERTY_NAME})
|
||||||
|
# Remainder is arguments, so strip first element
|
||||||
|
list(REMOVE_AT G4SMP_PROPERTY 0)
|
||||||
|
|
||||||
|
set_property(GLOBAL ${G4SMP_APPEND_MODE} PROPERTY ${_module}_${G4SMP_PROPERTY_NAME} ${G4SMP_PROPERTY})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# Category Commands
|
||||||
|
# ^^^^^^^^^^^^^^^^^
|
||||||
|
#
|
||||||
|
# .. cmake:command:: geant4_add_category
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# geant4_add_category(<name> MODULES <module> [<module> ...])
|
||||||
|
#
|
||||||
|
# Add a Geant4 category ``<name>`` to the project, composed of the modules
|
||||||
|
# supplied in the ``MODULES`` list.
|
||||||
|
#
|
||||||
|
# Calling this function does not create an actual CMake library target.
|
||||||
|
# Because modules declare dependencies on modules rather than libraries, we
|
||||||
|
# defer creation of library targets to after creation of categories, which
|
||||||
|
# allows resolution of module <-> category use. Additionally, category specific
|
||||||
|
# actions such as install may be added.
|
||||||
|
#
|
||||||
|
function(geant4_add_category _name)
|
||||||
|
# Check existence? final add_library will warn, but may wish to double check
|
||||||
|
set_property(GLOBAL APPEND PROPERTY GEANT4_DEFINED_CATEGORIES ${_name})
|
||||||
|
cmake_parse_arguments(G4ADDCAT
|
||||||
|
""
|
||||||
|
""
|
||||||
|
"MODULES"
|
||||||
|
${ARGN}
|
||||||
|
)
|
||||||
|
# - Modules must not be empty (Could also just be ARGN)
|
||||||
|
if(NOT G4ADDCAT_MODULES)
|
||||||
|
message(FATAL_ERROR "geant4_add_category: Missing/empty 'MODULES' argument")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Compose Category from Modules
|
||||||
|
foreach(__g4module ${G4ADDCAT_MODULES})
|
||||||
|
# Module must not have been composed already
|
||||||
|
geant4_get_module_property(_parent ${__g4module} PARENT_TARGET)
|
||||||
|
if(${_parent})
|
||||||
|
message(FATAL_ERROR "geant4_add_category: trying to compose category '${_name}' using module '${__g4module}' which is already composed into category '${_parent}'")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Compose it
|
||||||
|
geant4_set_module_property(${__g4module} PROPERTY PARENT_TARGET ${_name})
|
||||||
|
set_property(GLOBAL APPEND PROPERTY GEANT4_CATEGORIES_${_name}_MODULES ${__g4module})
|
||||||
|
|
||||||
|
geant4_get_module_property(_headers ${__g4module} PUBLIC_HEADERS)
|
||||||
|
set_property(GLOBAL APPEND PROPERTY GEANT4_CATEGORIES_${_name}_PUBLIC_HEADERS ${_headers})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
# As we do not create a physical target, store the script in which we're called
|
||||||
|
set_property(GLOBAL PROPERTY GEANT4_CATEGORIES_${_name}_CMAKE_LIST_FILE "${CMAKE_CURRENT_LIST_FILE}")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
# Resolve a list of links
|
||||||
|
# These may include Geant4 modules as well as standard targets or other expressions
|
||||||
|
# Resolve Modules to PARENT_TARGET, removing duplicates
|
||||||
|
# Leave other links unchanged
|
||||||
|
function(geant4_resolve_link_libraries _list)
|
||||||
|
set(_resolved_list )
|
||||||
|
foreach(__lib ${${_list}})
|
||||||
|
# If "library" is a module, resolve it to PARENT_TARGET
|
||||||
|
geant4_has_module(__is_module ${__lib})
|
||||||
|
if(__is_module)
|
||||||
|
geant4_get_module_property(__parent_lib ${__lib} PARENT_TARGET)
|
||||||
|
list(APPEND _resolved_list ${__parent_lib})
|
||||||
|
else()
|
||||||
|
list(APPEND _resolved_list ${__lib})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
if(_resolved_list)
|
||||||
|
list(REMOVE_DUPLICATES _resolved_list)
|
||||||
|
endif()
|
||||||
|
set(${_list} ${_resolved_list} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# .. cmake:command:: geant4_compose_targets
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# geant4_compose_targets()
|
||||||
|
#
|
||||||
|
# Create physical SHARED/STATIC library targets from the defined Geant4
|
||||||
|
# categories and modules.
|
||||||
|
#
|
||||||
|
# Can only be called once, and must be done so after all Geant4 libraries
|
||||||
|
# and modules are defined.
|
||||||
|
#
|
||||||
|
function(geant4_compose_targets)
|
||||||
|
get_property(__alreadyCalled GLOBAL PROPERTY GEANT4_COMPOSE_TARGETS_CALLED)
|
||||||
|
if(__alreadyCalled)
|
||||||
|
get_property(__callsite GLOBAL PROPERTY GEANT4_COMPOSE_TARGETS_LIST_FILE)
|
||||||
|
message(FATAL_ERROR "geant4_compose_targets already called from ${__callsite}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Check that every defined module is composed
|
||||||
|
geant4_get_modules(__g4definedmodules)
|
||||||
|
foreach(__module ${__g4definedmodules})
|
||||||
|
geant4_get_module_property(__iscomposed ${__module} PARENT_TARGET)
|
||||||
|
if(NOT __iscomposed)
|
||||||
|
message(FATAL_ERROR "Geant4 module '${__module}' is not composed into any category")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
# Process all defined libraries, except for G4clhep{-static}
|
||||||
|
# G4clhep/G4ptl are a corner cases because its call to add_library happens
|
||||||
|
# at a different (lower) directory level than all the other targets
|
||||||
|
# This means we cannot install it here. That's left to it
|
||||||
|
get_property(__g4definedlibraries GLOBAL PROPERTY GEANT4_DEFINED_CATEGORIES)
|
||||||
|
list(REMOVE_ITEM __g4definedlibraries G4clhep G4clhep-static G4ptl G4ptl-static)
|
||||||
|
set(__g4builtlibraries)
|
||||||
|
set(__g4public_headers)
|
||||||
|
|
||||||
|
foreach(__g4lib ${__g4definedlibraries})
|
||||||
|
if(BUILD_SHARED_LIBS)
|
||||||
|
__geant4_add_library(${__g4lib} SHARED)
|
||||||
|
list(APPEND __g4builtlibraries ${__g4lib})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_STATIC_LIBS)
|
||||||
|
__geant4_add_library(${__g4lib} STATIC)
|
||||||
|
list(APPEND __g4builtlibraries ${__g4lib}-static)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
get_property(__headers GLOBAL PROPERTY GEANT4_CATEGORIES_${__g4lib}_PUBLIC_HEADERS)
|
||||||
|
list(APPEND __g4public_headers ${__headers})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
# TEMP INSTALL - do here purely to review exported links. Should be
|
||||||
|
# factored out into separate function later.
|
||||||
|
install(TARGETS ${__g4builtlibraries}
|
||||||
|
EXPORT Geant4LibraryDepends
|
||||||
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Development
|
||||||
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Runtime
|
||||||
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT Runtime
|
||||||
|
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}")
|
||||||
|
install(FILES ${__g4public_headers} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}" COMPONENT Development)
|
||||||
|
|
||||||
|
set_property(GLOBAL PROPERTY GEANT4_COMPOSE_TARGETS_CALLED ON)
|
||||||
|
set_property(GLOBAL PROPERTY GEANT4_COMPOSE_TARGETS_LIST_FILE "${CMAKE_CURRENT_LIST_FILE}")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# Backward Compatibility Commands
|
||||||
|
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
#
|
||||||
|
# These commands implement the old module/library definition macros in
|
||||||
|
# terms of the new command set. They provide a facade allowing migration
|
||||||
|
# to the new interfaces with a controlled transition.
|
||||||
|
#
|
||||||
|
# As migration progresses, these commands will gradually be deprecated,
|
||||||
|
# with warnings issued about what to do at each stage.
|
||||||
|
#
|
||||||
|
# .. cmake:command:: geant4_define_module
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# geant4_define_module(NAME <name>
|
||||||
|
# HEADERS header1 [header2 ...]
|
||||||
|
# SOURCES source1 [source2 ...]
|
||||||
|
# GRANULAR_DEPENDENCIES lib1 [lib2 ...]
|
||||||
|
# GLOBAL_DEPENDENCIES lib1 [lib2 ...]
|
||||||
|
# LINK_LIBRARIES lib1 [lib2 ...])
|
||||||
|
#
|
||||||
|
# DEPRECATED: Use :cmake:command:`geant4_add_module` to add a module with headers/sources,
|
||||||
|
# and :cmake:command:`geant4_module_link_libraries` to declare internal and external
|
||||||
|
# libraries to link to.
|
||||||
|
#
|
||||||
|
function(geant4_define_module)
|
||||||
|
cmake_parse_arguments(G4DEFMOD
|
||||||
|
""
|
||||||
|
"NAME"
|
||||||
|
"HEADERS;SOURCES;GRANULAR_DEPENDENCIES;GLOBAL_DEPENDENCIES;LINK_LIBRARIES;HEADERS_EXCLUDE_FORMAT;SOURCES_EXCLUDE_FORMAT"
|
||||||
|
${ARGN}
|
||||||
|
)
|
||||||
|
# HEADERS -> PUBLIC_HEADERS
|
||||||
|
# SOURCES -> SOURCES
|
||||||
|
# Don't support clang-formatting yet.
|
||||||
|
geant4_add_module(${G4DEFMOD_NAME}
|
||||||
|
PUBLIC_HEADERS ${G4DEFMOD_HEADERS}
|
||||||
|
SOURCES ${G4DEFMOD_SOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
# GRANULAR_DEPENDENCIES -> geant4_module_link_libraries(mod PUBLIC ...)
|
||||||
|
# GLOBAL_DEPENDENCIES -> new property... Just record it for now, later
|
||||||
|
# we need to link these to the physical library the module is composed into
|
||||||
|
# checking that
|
||||||
|
# i) Granular -> Global link is complete, i.e. resolving granular deps results
|
||||||
|
# in same global link list.
|
||||||
|
# Has to be stored separately because we want/need to check for full resolution of
|
||||||
|
# the granular libs to the same set of global libs. That's needed to ensure we
|
||||||
|
# can correct any missing links in existing GRANULAR_DEPENDENCIES lists.
|
||||||
|
# (i.e. it's a transtional property)
|
||||||
|
# LINK_LIBRARIES -> geant4_module_link_libraries(mod PUBLIC ...)
|
||||||
|
|
||||||
|
geant4_module_link_libraries(${G4DEFMOD_NAME} PUBLIC ${G4DEFMOD_GRANULAR_DEPENDENCIES} ${G4DEFMOD_LINK_LIBRARIES})
|
||||||
|
geant4_set_module_property(${G4DEFMOD_NAME} PROPERTY GLOBAL_DEPENDENCIES ${G4DEFMOD_GLOBAL_DEPENDENCIES})
|
||||||
|
|
||||||
|
# When we are ready, start issuing a deprecation warning here, including instructions for
|
||||||
|
# migration...
|
||||||
|
# message(WARNING "Use of geant4_define_module is deprecated, please use... instead")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# .. cmake:command:: geant4_global_library_target
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# geant4_global_library_target(NAME <name>
|
||||||
|
# COMPONENTS file1 [file2 ...])
|
||||||
|
#
|
||||||
|
# DEPRECATED: Use :cmake:command:`geant4_add_library` to add a library with a list
|
||||||
|
# of modules.
|
||||||
|
#
|
||||||
|
# This function provides a facade around :cmake:command:`geant4_add_library` to
|
||||||
|
# allow back compatibility with the older module/library functions
|
||||||
|
#
|
||||||
|
function(geant4_global_library_target)
|
||||||
|
cmake_parse_arguments(G4GLOBLIB
|
||||||
|
""
|
||||||
|
"NAME"
|
||||||
|
"COMPONENTS"
|
||||||
|
${ARGN}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Because components are sources.cmake files, must know currently defined modules
|
||||||
|
# so we can pick up the newly defined ones
|
||||||
|
geant4_get_modules(__oldmodules)
|
||||||
|
|
||||||
|
# Load components
|
||||||
|
foreach(__comp ${G4GLOBLIB_COMPONENTS})
|
||||||
|
include(${__comp})
|
||||||
|
endforeach()
|
||||||
|
# Reset directory scope include dirs so we enforce usage requirements
|
||||||
|
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "")
|
||||||
|
|
||||||
|
# List modules now defined, and filter out old from new
|
||||||
|
geant4_get_modules(__newmodules)
|
||||||
|
|
||||||
|
if(__oldmodules)
|
||||||
|
list(REMOVE_ITEM __newmodules ${__oldmodules})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Old function allowed optional NAME argument, in which case it should
|
||||||
|
# be the first element in the module list
|
||||||
|
if(NOT G4GLOBLIB_NAME)
|
||||||
|
list(GET __newmodules 0 G4GLOBLIB_NAME)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Some compile definitions are still transported via directory level
|
||||||
|
# "add_definitions" calls at the site of the geant4_global_library call
|
||||||
|
# These, if they exist, are equivalent to PRIVATE level compile defs.
|
||||||
|
get_directory_property(__local_compile_defs COMPILE_DEFINITIONS)
|
||||||
|
foreach(__module ${__newmodules})
|
||||||
|
geant4_module_compile_definitions(${__module} PRIVATE ${__local_compile_defs})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
# Compose the modules into the category
|
||||||
|
geant4_add_category(${G4GLOBLIB_NAME} MODULES ${__newmodules})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# .. cmake:command:: geant4_library_target
|
||||||
|
#
|
||||||
|
# .. code-block::
|
||||||
|
#
|
||||||
|
# geant4_library_target(NAME <name>
|
||||||
|
# SOURCES source1 [source2 ...]
|
||||||
|
# GEANT4_LINK_LIBRARIES lib1 [lib2 ...]
|
||||||
|
# LINK_LIBRARIES lib1 [lib2 ...])
|
||||||
|
#
|
||||||
|
# DEPRECATED: Maintained only for building internal G4clhep target because of its
|
||||||
|
# different include structure.
|
||||||
|
#
|
||||||
|
function(geant4_library_target)
|
||||||
|
cmake_parse_arguments(G4GLOBLIB
|
||||||
|
""
|
||||||
|
"NAME"
|
||||||
|
"SOURCES;GEANT4_LINK_LIBRARIES;LINK_LIBRARIES"
|
||||||
|
${ARGN}
|
||||||
|
)
|
||||||
|
# Currently a hack to get G4clhep to build, so an error if used elsewhere
|
||||||
|
if(NOT (${G4GLOBLIB_NAME} STREQUAL "G4clhep"))
|
||||||
|
message(FATAL_ERROR "geant4_library_target called for '${G4GLOBLIB_NAME}' in '${CMAKE_CURRENT_LIST_DIR}'")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
geant4_format_target(NAME ${G4GLOBLIB_NAME}-format SOURCES ${G4GLOBLIB_SOURCES})
|
||||||
|
|
||||||
|
if(BUILD_SHARED_LIBS)
|
||||||
|
add_library(${G4GLOBLIB_NAME} SHARED ${G4GLOBLIB_SOURCES})
|
||||||
|
add_library(Geant4::${G4GLOBLIB_NAME} ALIAS ${G4GLOBLIB_NAME})
|
||||||
|
target_compile_features(${G4GLOBLIB_NAME} PUBLIC ${GEANT4_TARGET_COMPILE_FEATURES})
|
||||||
|
target_compile_definitions(${G4GLOBLIB_NAME} PUBLIC G4LIB_BUILD_DLL)
|
||||||
|
target_include_directories(${G4GLOBLIB_NAME}
|
||||||
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
|
||||||
|
)
|
||||||
|
set_target_properties(${G4GLOBLIB_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||||
|
|
||||||
|
install(TARGETS ${G4GLOBLIB_NAME}
|
||||||
|
EXPORT Geant4LibraryDepends
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Runtime
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development
|
||||||
|
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_STATIC_LIBS)
|
||||||
|
add_library(${G4GLOBLIB_NAME}-static STATIC ${G4GLOBLIB_SOURCES})
|
||||||
|
add_library(Geant4::${G4GLOBLIB_NAME}-static ALIAS ${G4GLOBLIB_NAME}-static)
|
||||||
|
target_compile_features(${G4GLOBLIB_NAME}-static PUBLIC ${GEANT4_TARGET_COMPILE_FEATURES})
|
||||||
|
target_include_directories(${G4GLOBLIB_NAME}-static
|
||||||
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT WIN32)
|
||||||
|
set_target_properties(${G4GLOBLIB_NAME}-static PROPERTIES OUTPUT_NAME ${G4GLOBLIB_NAME})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(TARGETS ${G4GLOBLIB_NAME}-static
|
||||||
|
EXPORT Geant4LibraryDepends
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Runtime
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development
|
||||||
|
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Needs to be in defined category list for static/shared to be linked correctly.
|
||||||
|
set_property(GLOBAL APPEND PROPERTY GEANT4_DEFINED_CATEGORIES ${G4GLOBLIB_NAME})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
# .rst:
|
||||||
|
# .. cmake:command:: geant4_add_compile_definitions
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# geant4_add_compile_definitions(SOURCES <source1> ... <sourceN>
|
||||||
|
# COMPILE_DEFINITIONS <def1> ... <defN>)
|
||||||
|
#
|
||||||
|
# Add extra compile definitions to a specific list of sources
|
||||||
|
# in the current module. Macroized to handle the need to specify absolute paths.
|
||||||
|
# and *must* be called at the same level as geant4_define_module
|
||||||
|
#
|
||||||
|
macro(geant4_add_compile_definitions)
|
||||||
|
cmake_parse_arguments(G4ADDDEF
|
||||||
|
""
|
||||||
|
""
|
||||||
|
"SOURCES;COMPILE_DEFINITIONS"
|
||||||
|
${ARGN}
|
||||||
|
)
|
||||||
|
|
||||||
|
# We assume that the sources have been added at the level of a
|
||||||
|
# a sources.cmake, so are inside the src subdir of the sources.cmake
|
||||||
|
get_filename_component(_ACD_BASE_PATH ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||||
|
|
||||||
|
# Now for each file, add the definitions
|
||||||
|
foreach(_acd_source ${G4ADDDEF_SOURCES})
|
||||||
|
# Extract any existing compile definitions
|
||||||
|
get_source_file_property(
|
||||||
|
_acd_existing_properties
|
||||||
|
${_ACD_BASE_PATH}/src/${_acd_source}
|
||||||
|
COMPILE_DEFINITIONS)
|
||||||
|
|
||||||
|
if(_acd_existing_properties)
|
||||||
|
set(_acd_new_defs ${_acd_existing_properties}
|
||||||
|
${G4ADDDEF_COMPILE_DEFINITIONS})
|
||||||
|
else()
|
||||||
|
set(_acd_new_defs ${G4ADDDEF_COMPILE_DEFINITIONS})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# quote compile defs because this must epand to space separated list
|
||||||
|
set_source_files_properties(${_ACD_BASE_PATH}/src/${_acd_source}
|
||||||
|
PROPERTIES COMPILE_DEFINITIONS "${_acd_new_defs}")
|
||||||
|
endforeach()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# Internal Helper Commands
|
||||||
|
# ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
#
|
||||||
|
# These macros and functions are for use in the implementation of the
|
||||||
|
# module and library functions. They should never be used directly
|
||||||
|
# in developer-level scripts.
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
#.rst:
|
||||||
|
# .. cmake:command:: __geant4_module_assert_exists
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# __geant4_module_assert_exists(<name>)
|
||||||
|
#
|
||||||
|
# Emit a ``FATAL_ERROR`` if the module ``<name>`` is not defined.
|
||||||
|
#
|
||||||
|
# This is a macro intended for use in G4DeveloperAPI functions when
|
||||||
|
# the existence of a module is required for further processing
|
||||||
|
#
|
||||||
|
macro(__geant4_module_assert_exists _module)
|
||||||
|
geant4_has_module(__geant4_module_assert_exists_tmp ${_module})
|
||||||
|
if(NOT __geant4_module_assert_exists_tmp)
|
||||||
|
message(FATAL_ERROR "Geant4 module '${_module}' has not been created")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
#.rst:
|
||||||
|
# .. cmake:command:: __geant4_module_assert_not_exists
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# __geant4_module_assert_not_exists(<name>)
|
||||||
|
#
|
||||||
|
# Emit a ``FATAL_ERROR`` if the module ``<name>`` is defined
|
||||||
|
#
|
||||||
|
# This is a macro intended for use in G4DeveloperAPI functions when
|
||||||
|
# the non-existence of a module is required for further processing
|
||||||
|
#
|
||||||
|
macro(__geant4_module_assert_not_exists _module)
|
||||||
|
geant4_has_module(__geant4_module_assert_not_exists_tmp ${_module})
|
||||||
|
if(__geant4_module_assert_not_exists_tmp)
|
||||||
|
geant4_get_module_property(__previous_cmake_list ${_module} CMAKE_LIST_FILE)
|
||||||
|
message(FATAL_ERROR "Geant4 module '${_module}' has already been created by call in '${__previous_cmake_list}'")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
#.rst:
|
||||||
|
# .. cmake:command:: __geant4_module_validate_property
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# __geant4_module_validate_property(<property>)
|
||||||
|
#
|
||||||
|
# Emit a ``FATAL_ERROR`` if the ``<property>`` is not one of the valid
|
||||||
|
# properties for a module:
|
||||||
|
#
|
||||||
|
# This is used internally by the property get/set functions.
|
||||||
|
#
|
||||||
|
function(__geant4_module_validate_property _property)
|
||||||
|
if(NOT (${_property} MATCHES "PUBLIC_HEADERS|PRIVATE_HEADERS|SOURCES|INTERFACE_COMPILE_DEFINITIONS|COMPILE_DEFINITIONS|INTERFACE_INCLUDE_DIRECTORIES|INCLUDE_DIRECTORIES|INTERFACE_LINK_LIBRARIES|LINK_LIBRARIES|PARENT_TARGET|CMAKE_LIST_FILE|GLOBAL_DEPENDENCIES"))
|
||||||
|
message(FATAL_ERROR "Undefined property '${_property}'")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
|
#.rst:
|
||||||
|
# .. cmake:command:: __geant4_add_library
|
||||||
|
#
|
||||||
|
# .. code-block:: cmake
|
||||||
|
#
|
||||||
|
# __geant4_add_library(<libraryname> <mode>)
|
||||||
|
#
|
||||||
|
# Compose an actual CMake library target
|
||||||
|
#
|
||||||
|
# This is used internally by the ``geant4_compose_targets`` command.
|
||||||
|
#
|
||||||
|
function(__geant4_add_library _name _type)
|
||||||
|
# TEMP HACK: G4clhep/G4ptl are a special cases, and build is handled separately
|
||||||
|
if(_name MATCHES "G4clhep|G4ptl")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT (${_type} MATCHES "SHARED|STATIC"))
|
||||||
|
message(FATAL_ERROR "Invalid library type '${_type}'")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Get targets
|
||||||
|
get_property(__g4definedlibraries GLOBAL PROPERTY GEANT4_DEFINED_CATEGORIES)
|
||||||
|
|
||||||
|
set(_target_name ${_name})
|
||||||
|
if(_type STREQUAL "STATIC")
|
||||||
|
set(_target_name ${_name}-static)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# - General target creation/properties
|
||||||
|
add_library(${_target_name} ${_type} "")
|
||||||
|
# Alias for transparent use with imported targets
|
||||||
|
add_library(Geant4::${_target_name} ALIAS ${_target_name})
|
||||||
|
target_compile_features(${_target_name} PUBLIC ${GEANT4_TARGET_COMPILE_FEATURES})
|
||||||
|
|
||||||
|
if(_type STREQUAL "SHARED")
|
||||||
|
# G4LIB_BUILD_DLL is public as despite the name it indicates the shared/archive mode
|
||||||
|
# and clients must apply it when linking to the shared libs. The global
|
||||||
|
# category handles the exact import/export statements
|
||||||
|
target_compile_definitions(${_target_name} PUBLIC G4LIB_BUILD_DLL)
|
||||||
|
set_target_properties(${_target_name} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||||
|
|
||||||
|
# MacOS
|
||||||
|
# Use '@rpath' in install names of libraries on macOS to provide relocatibility
|
||||||
|
# Add '@loader_path' to INSTALL_RPATH on macOS so that Geant4
|
||||||
|
# libraries self-locate each other whilst remaining relocatable
|
||||||
|
set_target_properties(${_target_name} PROPERTIES MACOSX_RPATH 1)
|
||||||
|
if(APPLE)
|
||||||
|
set_property(TARGET ${G4LIBTARGET_NAME} APPEND PROPERTY INSTALL_RPATH "@loader_path")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if((_type STREQUAL "STATIC") AND NOT WIN32)
|
||||||
|
set_target_properties(${_target_name} PROPERTIES OUTPUT_NAME ${_name})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Compose target sources and links from its constituent modules
|
||||||
|
set(__sources_to_format)
|
||||||
|
|
||||||
|
get_property(__g4modules GLOBAL PROPERTY GEANT4_CATEGORIES_${_name}_MODULES)
|
||||||
|
foreach(__g4mod ${__g4modules})
|
||||||
|
# - Process sources...
|
||||||
|
geant4_get_module_property(_headers ${__g4mod} PUBLIC_HEADERS)
|
||||||
|
geant4_get_module_property(_srcs ${__g4mod} SOURCES)
|
||||||
|
geant4_get_module_property(_cmakescript ${__g4mod} CMAKE_LIST_FILE)
|
||||||
|
|
||||||
|
# Store sources to be formatted (one mode only)
|
||||||
|
if(_type STREQUAL "SHARED")
|
||||||
|
list(APPEND __sources_to_format ${_headers} ${_srcs})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# - Group sources and scripts for IDEs
|
||||||
|
# NB: Seemingly has to be done at same level we define target.
|
||||||
|
# TODO: If lib name is same as mod name, don't group avoid extra
|
||||||
|
# folder layer.
|
||||||
|
source_group(${__g4mod}\\Headers FILES ${_headers})
|
||||||
|
source_group(${__g4mod}\\Sources FILES ${_srcs})
|
||||||
|
source_group(${__g4mod} FILES ${_cmakescript})
|
||||||
|
|
||||||
|
# - Add sources to target - PRIVATE, because consuming targets don't need them
|
||||||
|
target_sources(${_target_name} PRIVATE ${_headers} ${_srcs} ${_cmakescript})
|
||||||
|
|
||||||
|
# - Process usage properties
|
||||||
|
# Include dirs and compile definitions can be handled together
|
||||||
|
# Important to note that these promote PUBLIC/PRIVATE/INTERFACE
|
||||||
|
# from module level to library level. I.e. other modules in the
|
||||||
|
# library can see each other's PRIVATE include paths/compile defs.
|
||||||
|
# The only known way to fully wall things off is OBJECT libs,
|
||||||
|
# but then run into issues mentioned at start - linking and
|
||||||
|
# use in IDEs.
|
||||||
|
# This "promotion" is probably correct though - interfaces are
|
||||||
|
# at physical library level rather than module, and in Geant4
|
||||||
|
# all files must have globally unique names (no nested hedaers
|
||||||
|
# nor namespaces). Also, DLL export symbols may need this
|
||||||
|
# behaviour (esp. ALLOC_EXPORT).
|
||||||
|
# Only really an issue if header names/definitions aren't
|
||||||
|
# globally (in Geant4) unique. Or if a module is moved and hasn't
|
||||||
|
# declared its deps correctly (but then an error will occur
|
||||||
|
# anyway, and point is that libs are linked, not modules!)
|
||||||
|
# "Module" level really means "Source file" level, so same
|
||||||
|
# sets of rules should apply (i.e. can't specify inc dirs
|
||||||
|
# at source level).
|
||||||
|
foreach(_prop IN ITEMS INCLUDE_DIRECTORIES INTERFACE_INCLUDE_DIRECTORIES COMPILE_DEFINITIONS INTERFACE_COMPILE_DEFINITIONS)
|
||||||
|
geant4_get_module_property(_value ${__g4mod} ${_prop})
|
||||||
|
set_property(TARGET ${_target_name} APPEND PROPERTY ${_prop} ${_value})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
# Link libraries
|
||||||
|
foreach(_link_prop IN ITEMS LINK_LIBRARIES INTERFACE_LINK_LIBRARIES)
|
||||||
|
geant4_get_module_property(_linklibs ${__g4mod} ${_link_prop})
|
||||||
|
geant4_resolve_link_libraries(_linklibs)
|
||||||
|
# Remove self-linking
|
||||||
|
if(_linklibs)
|
||||||
|
list(REMOVE_ITEM _linklibs ${_name})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Filter list for internal static targets
|
||||||
|
if(_type STREQUAL "STATIC")
|
||||||
|
set(_g4linklibs )
|
||||||
|
foreach(_linklib ${_linklibs})
|
||||||
|
# If the linklib is a G4Library, change name to "name-static"
|
||||||
|
list(FIND __g4definedlibraries ${_linklib} _isg4lib)
|
||||||
|
if(_isg4lib GREATER -1)
|
||||||
|
list(APPEND _g4linklibs "${_linklib}-static")
|
||||||
|
else()
|
||||||
|
list(APPEND _g4linklibs "${_linklib}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
set(_linklibs ${_g4linklibs})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_property(TARGET ${_target_name} APPEND PROPERTY ${_link_prop} ${_linklibs})
|
||||||
|
|
||||||
|
# Temp workaround for modules needing Qt. We use AUTOMOC, but can't yet set
|
||||||
|
# it on a per module basis. However, only have three modules that require
|
||||||
|
# moc-ing, so hard code for now.
|
||||||
|
# TODO: likely need an additional "module target properties" to hold things
|
||||||
|
# that can be passed to set_target_properties
|
||||||
|
if(__g4mod MATCHES "G4UIbasic|G4OpenGL|G4OpenInventor" AND GEANT4_USE_QT)
|
||||||
|
set_target_properties(${_target_name} PROPERTIES AUTOMOC ON)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
# - Use stored total list of sources to create format target for one mode only
|
||||||
|
if(_type STREQUAL "SHARED")
|
||||||
|
geant4_format_target(NAME ${_name}-format SOURCES ${__sources_to_format})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# - Postprocess target properties to remove duplicates
|
||||||
|
foreach(_link_prop IN ITEMS LINK_LIBRARIES INTERFACE_LINK_LIBRARIES INCLUDE_DIRECTORIES INTERFACE_INCLUDE_DIRECTORIES COMPILE_DEFINITIONS INTERFACE_COMPILE_DEFINITIONS)
|
||||||
|
get_target_property(__g4lib_link_libs ${_target_name} ${_link_prop})
|
||||||
|
if(__g4lib_link_libs)
|
||||||
|
list(SORT __g4lib_link_libs)
|
||||||
|
list(REMOVE_DUPLICATES __g4lib_link_libs)
|
||||||
|
set_property(TARGET ${_target_name} PROPERTY ${_link_prop} ${__g4lib_link_libs})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endfunction()
|
||||||
|
|||||||
@@ -239,9 +239,13 @@ macro(geant4_library_target)
|
|||||||
add_library(${G4LIBTARGET_NAME} SHARED ${G4LIBTARGET_SOURCES})
|
add_library(${G4LIBTARGET_NAME} SHARED ${G4LIBTARGET_SOURCES})
|
||||||
target_compile_definitions(${G4LIBTARGET_NAME} PRIVATE GEANT4_DEVELOPER_$<CONFIG>)
|
target_compile_definitions(${G4LIBTARGET_NAME} PRIVATE GEANT4_DEVELOPER_$<CONFIG>)
|
||||||
target_compile_features(${G4LIBTARGET_NAME} PUBLIC ${GEANT4_TARGET_COMPILE_FEATURES})
|
target_compile_features(${G4LIBTARGET_NAME} PUBLIC ${GEANT4_TARGET_COMPILE_FEATURES})
|
||||||
target_link_libraries(${G4LIBTARGET_NAME}
|
|
||||||
${G4LIBTARGET_GEANT4_LINK_LIBRARIES}
|
set(__sorted_link_libs ${G4LIBTARGET_GEANT4_LINK_LIBRARIES} ${G4LIBTARGET_LINK_LIBRARIES})
|
||||||
${G4LIBTARGET_LINK_LIBRARIES})
|
if(__sorted_link_libs)
|
||||||
|
list(SORT __sorted_link_libs)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(${G4LIBTARGET_NAME} ${__sorted_link_libs})
|
||||||
# DLL support, portable to all platforms
|
# DLL support, portable to all platforms
|
||||||
# G4LIB_BUILD_DLL is public as despite the name it indicates the shared/archive mode
|
# G4LIB_BUILD_DLL is public as despite the name it indicates the shared/archive mode
|
||||||
# and clients must apply it when linking to the shared libs. The global
|
# and clients must apply it when linking to the shared libs. The global
|
||||||
@@ -305,14 +309,16 @@ macro(geant4_library_target)
|
|||||||
# Because externals like clhep appear in G4LIBTARGET_LINK_LIBRARIES,
|
# Because externals like clhep appear in G4LIBTARGET_LINK_LIBRARIES,
|
||||||
# filter this list to replace shared builtins with their static variant
|
# filter this list to replace shared builtins with their static variant
|
||||||
string(REGEX REPLACE
|
string(REGEX REPLACE
|
||||||
"(G4clhep|G4expat|G4zlib|G4geomUSolids)(;|$)" "\\1-static\\2"
|
"(G4clhep|G4expat|G4zlib|G4ptl|G4geomUSolids)(;|$)" "\\1-static\\2"
|
||||||
G4LIBTARGET_LINK_LIBRARIES_STATIC
|
G4LIBTARGET_LINK_LIBRARIES_STATIC
|
||||||
"${G4LIBTARGET_LINK_LIBRARIES}"
|
"${G4LIBTARGET_LINK_LIBRARIES}"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(${G4LIBTARGET_NAME}-static PUBLIC
|
set(__sorted_link_libs ${G4LIBTARGET_GEANT4_LINK_LIBRARIES_STATIC} ${G4LIBTARGET_LINK_LIBRARIES_STATIC})
|
||||||
${G4LIBTARGET_GEANT4_LINK_LIBRARIES_STATIC}
|
if(__sorted_link_libs)
|
||||||
${G4LIBTARGET_LINK_LIBRARIES_STATIC})
|
list(SORT __sorted_link_libs)
|
||||||
|
endif()
|
||||||
|
target_link_libraries(${G4LIBTARGET_NAME}-static PUBLIC ${__sorted_link_libs})
|
||||||
|
|
||||||
# But we can rename the output library to the correct name
|
# But we can rename the output library to the correct name
|
||||||
# On WIN32 we *retain* the -static postfix to avoid name clashes
|
# On WIN32 we *retain* the -static postfix to avoid name clashes
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ set(GEANT4_BUILD_FULL_DATADIR ${PROJECT_BINARY_DIR}/data)
|
|||||||
set(GEANT4_INSTALL_DATADIR_DEFAULT "${CMAKE_INSTALL_DATADIR}/data")
|
set(GEANT4_INSTALL_DATADIR_DEFAULT "${CMAKE_INSTALL_DATADIR}/data")
|
||||||
|
|
||||||
# File containing dataset list
|
# File containing dataset list
|
||||||
set(GEANT4_DATASETS_DEFINITIONS "Geant4DatasetDefinitions")
|
set(GEANT4_DATASETS_DEFINITIONS "G4DatasetDefinitions")
|
||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
+34
-60
@@ -42,6 +42,12 @@ set(OpenGL_GL_PREFERENCE "LEGACY")
|
|||||||
# Configure OpenInventor support
|
# Configure OpenInventor support
|
||||||
#
|
#
|
||||||
option(GEANT4_USE_INVENTOR "Build Geant4 OpenInventor Visualization Driver" OFF)
|
option(GEANT4_USE_INVENTOR "Build Geant4 OpenInventor Visualization Driver" OFF)
|
||||||
|
option(GEANT4_USE_INVENTOR_QT "Build Geant4 OpenInventor Qt Visualization Driver" OFF)
|
||||||
|
|
||||||
|
if(GEANT4_USE_INVENTOR_QT)
|
||||||
|
set(GEANT4_USE_INVENTOR ON)
|
||||||
|
set(GEANT4_USE_QT ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(GEANT4_USE_INVENTOR)
|
if(GEANT4_USE_INVENTOR)
|
||||||
# Always need Inventor and OpenGL
|
# Always need Inventor and OpenGL
|
||||||
@@ -50,16 +56,20 @@ if(GEANT4_USE_INVENTOR)
|
|||||||
|
|
||||||
# On UNIX, we also require Xm and X11 (inc. Xpm)...
|
# On UNIX, we also require Xm and X11 (inc. Xpm)...
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
if(NOT INVENTOR_SOXT_LIBRARY OR NOT INVENTOR_SOXT_INCLUDE_DIR)
|
|
||||||
message(FATAL_ERROR "Could not find SoXt library and/or headers")
|
|
||||||
endif()
|
|
||||||
if (GEANT4_USE_INVENTOR_QT)
|
if (GEANT4_USE_INVENTOR_QT)
|
||||||
if (NOT INVENTOR_SOQT_LIBRARY OR NOT INVENTOR_SOQT_INCLUDE_DIR)
|
if (NOT INVENTOR_SOQT_LIBRARY OR NOT INVENTOR_SOQT_INCLUDE_DIR)
|
||||||
message(FATAL_ERROR "Could not find SoQt library and/or headers")
|
message(FATAL_ERROR "Could not find SoQt library and/or headers")
|
||||||
endif()
|
endif()
|
||||||
|
set(INVENTOR_INCLUDE_DIR "${INVENTOR_INCLUDE_DIR}" "${INVENTOR_SOQT_INCLUDE_DIR}")
|
||||||
|
else()
|
||||||
|
if(NOT INVENTOR_SOXT_LIBRARY OR NOT INVENTOR_SOXT_INCLUDE_DIR)
|
||||||
|
message(FATAL_ERROR "Could not find SoXt library and/or headers")
|
||||||
|
endif()
|
||||||
|
set(INVENTOR_INCLUDE_DIR "${INVENTOR_INCLUDE_DIR}" "${INVENTOR_SOXT_INCLUDE_DIR}")
|
||||||
|
set(GEANT4_USE_XM ON)
|
||||||
|
find_package(Motif REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
set(INVENTOR_INCLUDE_DIR "${INVENTOR_INCLUDE_DIR}" "${INVENTOR_SOXT_INCLUDE_DIR}")
|
|
||||||
find_package(Motif REQUIRED)
|
|
||||||
find_package(X11 REQUIRED)
|
find_package(X11 REQUIRED)
|
||||||
|
|
||||||
if(NOT X11_Xpm_FOUND)
|
if(NOT X11_Xpm_FOUND)
|
||||||
@@ -74,63 +84,27 @@ endif()
|
|||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# Configure Qt Support if needed (CROSSPLATFORM).
|
# Configure Qt Support if needed (CROSSPLATFORM).
|
||||||
#
|
#
|
||||||
option(GEANT4_USE_QT "Build Geant4 with Qt support (Qt5 preferred, Qt4 fallback)" OFF)
|
option(GEANT4_USE_QT "Build Geant4 with Qt support" OFF)
|
||||||
|
|
||||||
if(GEANT4_USE_QT)
|
if(GEANT4_USE_QT)
|
||||||
# Find and configure Qt and OpenGL - Search for 5 first, then 4
|
# Find and configure Qt and OpenGL
|
||||||
find_package(Qt5Core QUIET)
|
find_package(Qt5Core REQUIRED)
|
||||||
find_package(Qt5Gui QUIET)
|
find_package(Qt5Gui REQUIRED)
|
||||||
find_package(Qt5Widgets QUIET)
|
find_package(Qt5Widgets REQUIRED)
|
||||||
find_package(Qt5OpenGL QUIET)
|
find_package(Qt5OpenGL REQUIRED)
|
||||||
find_package(Qt5PrintSupport QUIET)
|
find_package(Qt5PrintSupport REQUIRED)
|
||||||
|
|
||||||
if(Qt5Core_FOUND
|
set(QT_QTCORE_LIBRARY Qt5::Core Qt5::PrintSupport)
|
||||||
AND Qt5Gui_FOUND
|
set(QT_QTGUI_LIBRARY Qt5::Gui Qt5::Widgets)
|
||||||
AND Qt5Widgets_FOUND
|
set(QT_OPENGL_LIBRARY Qt5::Gui Qt5::OpenGL)
|
||||||
AND Qt5OpenGL_FOUND
|
set(QT_LIBRARIES Qt5::OpenGL Qt5::Gui Qt5::PrintSupport Qt5::Widgets)
|
||||||
AND Qt5PrintSupport_FOUND)
|
get_target_property(QT_QMAKE_EXECUTABLE ${Qt5Core_QMAKE_EXECUTABLE} IMPORTED_LOCATION)
|
||||||
# Compatibility
|
geant4_save_package_variables(Qt5 Qt5Core_DIR Qt5Gui_DIR Qt5Widgets_DIR Qt5OpenGL_DIR Qt5PrintSupport_DIR)
|
||||||
macro(qt4_wrap_cpp)
|
|
||||||
qt5_wrap_cpp(${ARGN})
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
# 4/5 Compatibility
|
|
||||||
set(QT_QTCORE_LIBRARY Qt5::Core Qt5::PrintSupport)
|
|
||||||
set(QT_QTGUI_LIBRARY Qt5::Gui Qt5::Widgets)
|
|
||||||
set(QT_OPENGL_LIBRARY Qt5::Gui Qt5::OpenGL)
|
|
||||||
set(QT_LIBRARIES Qt5::OpenGL Qt5::Gui Qt5::PrintSupport Qt5::Widgets)
|
|
||||||
get_target_property(QT_QMAKE_EXECUTABLE ${Qt5Core_QMAKE_EXECUTABLE} IMPORTED_LOCATION)
|
|
||||||
geant4_save_package_variables(Qt5 Qt5Core_DIR Qt5Gui_DIR Qt5Widgets_DIR Qt5OpenGL_DIR Qt5PrintSupport_DIR)
|
|
||||||
else()
|
|
||||||
unset(Qt5Core_DIR CACHE)
|
|
||||||
unset(Qt5Gui_DIR CACHE)
|
|
||||||
unset(Qt5Widgets_DIR CACHE)
|
|
||||||
unset(Qt5OpenGL_DIR CACHE)
|
|
||||||
unset(Qt5PrintSupport_DIR CACHE)
|
|
||||||
# On WIN32 only, set QT_USE_IMPORTED_TARGETS. The Qt4 module will
|
|
||||||
# otherwise set QT_LIBRARIES using the 'optimized A; debug Ad'
|
|
||||||
# technique.
|
|
||||||
if(WIN32)
|
|
||||||
set(QT_USE_IMPORTED_TARGETS ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui QtOpenGL)
|
|
||||||
if(Qt4_FOUND)
|
|
||||||
message(WARNING "Support for Qt4 in Geant4 is now deprecated and will be removed in the next release")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# 4/5 Compatibility
|
|
||||||
set(QT_QTCORE_LIBRARY Qt4::QtCore)
|
|
||||||
set(QT_QTGUI_LIBRARY Qt4::QtGui)
|
|
||||||
set(QT_OPENGL_LIBRARY Qt4::QtOpenGL)
|
|
||||||
set(QT_LIBRARIES Qt4::QtOpenGL Qt4::QtGui)
|
|
||||||
geant4_save_package_variables(Qt4 QT_QMAKE_EXECUTABLE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
geant4_save_package_variables(OpenGL OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY OPENGL_glu_LIBRARY)
|
geant4_save_package_variables(OpenGL OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY)
|
||||||
|
|
||||||
# Variables for export
|
# Variables for export to GNUmake
|
||||||
execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_PREFIX OUTPUT_VARIABLE G4QTHOME OUTPUT_STRIP_TRAILING_WHITESPACE)
|
execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_PREFIX OUTPUT_VARIABLE G4QTHOME OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_LIBS OUTPUT_VARIABLE G4QTLIBPATH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_LIBS OUTPUT_VARIABLE G4QTLIBPATH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
@@ -157,7 +131,7 @@ set(GEANT4_USE_WT OFF)
|
|||||||
# find_package(OpenGL REQUIRED)
|
# find_package(OpenGL REQUIRED)
|
||||||
#
|
#
|
||||||
# geant4_save_package_variables(Wt Wt_INCLUDE_DIR Wt_LIBRARY_RELEASE Wt_LIBRARY_DEBUG Wt_HTTP_LIBRARY_RELEASE Wt_HTTP_LIBRARY_DEBUG)
|
# geant4_save_package_variables(Wt Wt_INCLUDE_DIR Wt_LIBRARY_RELEASE Wt_LIBRARY_DEBUG Wt_HTTP_LIBRARY_RELEASE Wt_HTTP_LIBRARY_DEBUG)
|
||||||
# geant4_save_package_variables(OpenGL OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY OPENGL_glu_LIBRARY)
|
# geant4_save_package_variables(OpenGL OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY)
|
||||||
#
|
#
|
||||||
# set(WT_DEFINITIONS "-DQT_NO_KEYWORDS")
|
# set(WT_DEFINITIONS "-DQT_NO_KEYWORDS")
|
||||||
#
|
#
|
||||||
@@ -238,12 +212,12 @@ if(UNIX)
|
|||||||
if(GEANT4_USE_INVENTOR OR GEANT4_USE_XM OR GEANT4_USE_OPENGL_X11)
|
if(GEANT4_USE_INVENTOR OR GEANT4_USE_XM OR GEANT4_USE_OPENGL_X11)
|
||||||
# - Find native GL first
|
# - Find native GL first
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
geant4_save_package_variables(OpenGL OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY OPENGL_glu_LIBRARY)
|
geant4_save_package_variables(OpenGL OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY)
|
||||||
|
|
||||||
# - If we're on Apple, also find the XQuartz GL libraries and append t.
|
# - If we're on Apple, also find the XQuartz GL libraries and append t.
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
find_package(XQuartzGL REQUIRED)
|
find_package(XQuartzGL REQUIRED)
|
||||||
geant4_save_package_variables(XQuartzGL XQuartzGL_INCLUDE_DIR XQuartzGL_gl_LIBRARY XQuartzGL_glu_LIBRARY)
|
geant4_save_package_variables(XQuartzGL XQuartzGL_INCLUDE_DIR XQuartzGL_gl_LIBRARY)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Add feature for X11 GL
|
# Add feature for X11 GL
|
||||||
@@ -278,7 +252,7 @@ if(WIN32)
|
|||||||
# This is part of the G4OpenGL component, so mark it as needed
|
# This is part of the G4OpenGL component, so mark it as needed
|
||||||
set(GEANT4_USE_OPENGL ON)
|
set(GEANT4_USE_OPENGL ON)
|
||||||
geant4_add_feature(GEANT4_USE_OPENGL_WIN32 "Build OpenGL driver with Win32 support")
|
geant4_add_feature(GEANT4_USE_OPENGL_WIN32 "Build OpenGL driver with Win32 support")
|
||||||
geant4_save_package_variables(OpenGL OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY OPENGL_glu_LIBRARY)
|
geant4_save_package_variables(OpenGL OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
+43
-2
@@ -153,6 +153,41 @@ endif()
|
|||||||
|
|
||||||
geant4_add_feature(GEANT4_USE_SYSTEM_ZLIB "Using system zlib library")
|
geant4_add_feature(GEANT4_USE_SYSTEM_ZLIB "Using system zlib library")
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
# TBB support
|
||||||
|
#
|
||||||
|
set(_default_use_tbb OFF)
|
||||||
|
if(TBB_DIR)
|
||||||
|
set(_default_use_tbb ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(GEANT4_USE_TBB "Enable (optional) use of TBB as a tasking backend" ${_default_use_tbb})
|
||||||
|
if(GEANT4_USE_TBB)
|
||||||
|
find_package(TBB REQUIRED)
|
||||||
|
geant4_save_package_variables(TBB TBB_INCLUDE_DIR TBB_LIBRARY TBB_LIBRARY_DEBUG
|
||||||
|
TBB_LIBRARY_RELEASE TBB_ROOT_DIR)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
geant4_add_feature(GEANT4_USE_TBB "Enable (optional) use of TBB as a tasking backend")
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
# Find required PTL package, defaulting in internal
|
||||||
|
# Rely on PTL::PTL imported target (since CMake 3.1)
|
||||||
|
option(GEANT4_USE_SYSTEM_PTL "Use system zlib library" OFF)
|
||||||
|
if(GEANT4_USE_SYSTEM_PTL)
|
||||||
|
find_package(PTL REQUIRED)
|
||||||
|
# Backward compatibility for sources.cmake using the variable
|
||||||
|
set(PTL_LIBRARIES PTL::PTL)
|
||||||
|
geant4_save_package_variables(PTL PTL_DIR)
|
||||||
|
else()
|
||||||
|
set(PTL_USE_TBB ${GEANT4_USE_TBB})
|
||||||
|
set(PTL_FOUND TRUE)
|
||||||
|
set(GEANT4_USE_BUILTIN_PTL TRUE)
|
||||||
|
set(PTL_LIBRARIES G4ptl)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
geant4_add_feature(GEANT4_USE_SYSTEM_PTL "Using system PTL library")
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# Optional Support for GDML - requires Xerces-C package
|
# Optional Support for GDML - requires Xerces-C package
|
||||||
# Relies on XercesC::XercesC imported target (since CMake 3.5)
|
# Relies on XercesC::XercesC imported target (since CMake 3.5)
|
||||||
@@ -191,7 +226,7 @@ geant4_add_feature(GEANT4_USE_SMARTSTACK "Use smart track stack")
|
|||||||
# easily installed via:
|
# easily installed via:
|
||||||
# git clone https://github.com/NERSC/timemory.git timemory
|
# git clone https://github.com/NERSC/timemory.git timemory
|
||||||
# pip install -vvv ./timemory
|
# pip install -vvv ./timemory
|
||||||
# and setting timemory_DIR to `python -c "import sys; print(sys.prefix)"`
|
# and prepending CMAKE_PREFIX_PATH with `python -c "import sys; print(sys.prefix)"`
|
||||||
#
|
#
|
||||||
set(_default_use_timemory OFF)
|
set(_default_use_timemory OFF)
|
||||||
if(TiMemory_DIR)
|
if(TiMemory_DIR)
|
||||||
@@ -295,10 +330,16 @@ if(GEANT4_USE_ALL_USOLIDS OR GEANT4_USE_PARTIAL_USOLIDS)
|
|||||||
# Shim until VecGeom supports config mode properly
|
# Shim until VecGeom supports config mode properly
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/G4VecGeomShim.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/G4VecGeomShim.cmake")
|
||||||
# Backward Compatibility
|
# Backward Compatibility
|
||||||
set(VECGEOM_LIBRARIES VecGeom::VecGeom)
|
set(VECGEOM_LIBRARIES VecGeom::vecgeom)
|
||||||
|
|
||||||
geant4_save_package_variables(VecGeom VecGeom_DIR)
|
geant4_save_package_variables(VecGeom VecGeom_DIR)
|
||||||
|
|
||||||
|
# If VecCore_DIR is set, means updated VecGeom install used, so
|
||||||
|
# also store VecCore_DIR
|
||||||
|
if(VecCore_DIR)
|
||||||
|
geant4_save_package_variables(VecGeom VecCore_DIR)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(GEANT4_USE_ALL_USOLIDS)
|
if(GEANT4_USE_ALL_USOLIDS)
|
||||||
set(G4GEOM_USE_USOLIDS TRUE)
|
set(G4GEOM_USE_USOLIDS TRUE)
|
||||||
GEANT4_ADD_FEATURE(GEANT4_USE_USOLIDS "Replacing Geant4 solids with all VecGeom equivalents (EXPERIMENTAL)")
|
GEANT4_ADD_FEATURE(GEANT4_USE_USOLIDS "Replacing Geant4 solids with all VecGeom equivalents (EXPERIMENTAL)")
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# Create imported target to help use VecGeom (a mess because the VecGeomConfig is...)
|
# Create imported target to help use VecGeom (a mess because the VecGeomConfig is...)
|
||||||
if(VecGeom_FOUND)
|
if(VecGeom_FOUND)
|
||||||
if(NOT TARGET VecGeom::VecGeom)
|
if(NOT TARGET VecGeom::vecgeom)
|
||||||
add_library(VecGeom::VecGeom UNKNOWN IMPORTED)
|
add_library(VecGeom::vecgeom UNKNOWN IMPORTED)
|
||||||
# VecGeom's config file is awful, so the following is neccessary...
|
# VecGeom's config file is awful, so the following is neccessary...
|
||||||
foreach(__vglib ${VECGEOM_LIBRARIES})
|
foreach(__vglib ${VECGEOM_LIBRARIES})
|
||||||
if(__vglib MATCHES ".*libvecgeom\.(a|so|dylib|lib|dll)$")
|
if(__vglib MATCHES ".*libvecgeom\.(a|so|dylib|lib|dll)$")
|
||||||
@@ -10,7 +10,7 @@ if(VecGeom_FOUND)
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
string(REGEX REPLACE "^\-D|;-D" ";" VECGEOM_COMPILE_DEFINITIONS "${VECGEOM_DEFINITIONS}")
|
string(REGEX REPLACE "^\-D|;-D" ";" VECGEOM_COMPILE_DEFINITIONS "${VECGEOM_DEFINITIONS}")
|
||||||
set_target_properties(VecGeom::VecGeom PROPERTIES
|
set_target_properties(VecGeom::vecgeom PROPERTIES
|
||||||
INTERFACE_COMPILE_DEFINITIONS "${VECGEOM_COMPILE_DEFINITIONS}"
|
INTERFACE_COMPILE_DEFINITIONS "${VECGEOM_COMPILE_DEFINITIONS}"
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${VECGEOM_INCLUDE_DIRS}"
|
INTERFACE_INCLUDE_DIRECTORIES "${VECGEOM_INCLUDE_DIRS}"
|
||||||
INTERFACE_LINK_LIBRARIES "${VECGEOM_LIBRARIES}"
|
INTERFACE_LINK_LIBRARIES "${VECGEOM_LIBRARIES}"
|
||||||
|
|||||||
@@ -25,6 +25,4 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
# ui_win32 (WIN32 Style Application Command Line Interface)
|
# ui_win32 (WIN32 Style Application Command Line Interface)
|
||||||
#
|
#
|
||||||
# motif (Motif-X11/OpenGL Graphical User Interface)
|
# motif (Motif-X11/OpenGL Graphical User Interface)
|
||||||
# qt (Qt4/OpenGL Graphical User Interface)
|
# qt (Qt5/OpenGL Graphical User Interface)
|
||||||
#
|
#
|
||||||
# vis_network_dawn (Client/Server network interface to DAWN visualization)
|
# vis_network_dawn (Client/Server network interface to DAWN visualization)
|
||||||
# vis_network_vrml (Client/Server network interface to VRML visualization)
|
# vis_network_vrml (Client/Server network interface to VRML visualization)
|
||||||
@@ -265,6 +265,20 @@ if(NOT Geant4_builtin_zlib_FOUND)
|
|||||||
find_dependency(ZLIB @ZLIB_VERSION_STRING@)
|
find_dependency(ZLIB @ZLIB_VERSION_STRING@)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(Geant4_system_ptl_FOUND @GEANT4_USE_SYSTEM_PTL@)
|
||||||
|
if(Geant4_system_ptl_FOUND)
|
||||||
|
set(Geant4_builtin_ptl_FOUND FALSE)
|
||||||
|
find_dependency(PTL @PTL_VERSION_STRING@)
|
||||||
|
else()
|
||||||
|
# We know exactly where PTL is
|
||||||
|
set(Geant4_builtin_ptl_FOUND TRUE)
|
||||||
|
if(CMAKE_VERSION VERSION_GREATER 3.8.9999)
|
||||||
|
find_dependency(PTL @PTL_VERSION_STRING@ NO_DEFAULT_PATH PATHS "@PACKAGE_PTL_PREFIX@")
|
||||||
|
else()
|
||||||
|
find_package(PTL @PTL_VERSION_STRING@ REQUIRED NO_DEFAULT_PATH PATHS "@PACKAGE_PTL_PREFIX@")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# - Multithreading
|
# - Multithreading
|
||||||
set(Geant4_multithreaded_FOUND @GEANT4_BUILD_MULTITHREADED@)
|
set(Geant4_multithreaded_FOUND @GEANT4_BUILD_MULTITHREADED@)
|
||||||
if(Geant4_multithreaded_FOUND)
|
if(Geant4_multithreaded_FOUND)
|
||||||
@@ -284,6 +298,12 @@ endif()
|
|||||||
# - Smart track stack
|
# - Smart track stack
|
||||||
set(Geant4_smartstack_FOUND @GEANT4_USE_SMARTSTACK@)
|
set(Geant4_smartstack_FOUND @GEANT4_USE_SMARTSTACK@)
|
||||||
|
|
||||||
|
# - TBB
|
||||||
|
set(Geant4_TBB_FOUND @GEANT4_USE_TBB@)
|
||||||
|
if(Geant4_TBB_FOUND)
|
||||||
|
find_dependency(TBB @TBB_VERSION@)
|
||||||
|
endif()
|
||||||
|
|
||||||
# - TiMemory
|
# - TiMemory
|
||||||
set(Geant4_timemory_FOUND @GEANT4_USE_TIMEMORY@)
|
set(Geant4_timemory_FOUND @GEANT4_USE_TIMEMORY@)
|
||||||
if(Geant4_timemory_FOUND)
|
if(Geant4_timemory_FOUND)
|
||||||
@@ -395,19 +415,14 @@ endif()
|
|||||||
|
|
||||||
# - Qt (UI and Vis!)
|
# - Qt (UI and Vis!)
|
||||||
set(Geant4_qt_FOUND @GEANT4_USE_QT@)
|
set(Geant4_qt_FOUND @GEANT4_USE_QT@)
|
||||||
set(Geant4_USES_QT5 @Qt5Core_FOUND@)
|
|
||||||
if(Geant4_qt_FOUND)
|
if(Geant4_qt_FOUND)
|
||||||
# Must always refind Qt5 to recreate imported targets. Because these
|
# Must always refind Qt5 to recreate imported targets. Because these
|
||||||
# are in the public interface, always need linking.
|
# are in the public interface, always need linking.
|
||||||
if(Geant4_USES_QT5)
|
find_dependency(Qt5Core REQUIRED)
|
||||||
find_dependency(Qt5Core REQUIRED)
|
find_dependency(Qt5Gui REQUIRED)
|
||||||
find_dependency(Qt5Gui REQUIRED)
|
find_dependency(Qt5Widgets REQUIRED)
|
||||||
find_dependency(Qt5Widgets REQUIRED)
|
find_dependency(Qt5OpenGL REQUIRED)
|
||||||
find_dependency(Qt5OpenGL REQUIRED)
|
find_dependency(Qt5PrintSupport REQUIRED)
|
||||||
find_dependency(Qt5PrintSupport REQUIRED)
|
|
||||||
else()
|
|
||||||
find_dependency(Qt4 REQUIRED QtCore QtGui QtOpenGL)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Also require OpenGL
|
# Also require OpenGL
|
||||||
find_dependency(OpenGL)
|
find_dependency(OpenGL)
|
||||||
@@ -498,14 +513,22 @@ endif()
|
|||||||
|
|
||||||
# - OpenInventor
|
# - OpenInventor
|
||||||
set(Geant4_vis_openinventor_FOUND @GEANT4_USE_INVENTOR@)
|
set(Geant4_vis_openinventor_FOUND @GEANT4_USE_INVENTOR@)
|
||||||
|
set(Geant4_vis_openinventor_qt_FOUND @GEANT4_USE_INVENTOR_QT@)
|
||||||
if(Geant4_vis_openinventor_FOUND)
|
if(Geant4_vis_openinventor_FOUND)
|
||||||
if(("vis_openinventor" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_vis_all_FOUND)
|
if(("vis_openinventor" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_vis_all_FOUND)
|
||||||
if(UNIX AND NOT WIN32)
|
if(UNIX AND NOT WIN32)
|
||||||
list(APPEND Geant4_DEFINITIONS
|
if(Geant4_vis_openinventor_qt_FOUND)
|
||||||
-DG4INTY_USE_XT
|
list(APPEND Geant4_DEFINITIONS
|
||||||
-DG4VIS_USE_OI
|
-DG4VIS_USE_OI
|
||||||
-DG4VIS_USE_OIX
|
-DG4VIS_USE_OIQT
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
list(APPEND Geant4_DEFINITIONS
|
||||||
|
-DG4INTY_USE_XT
|
||||||
|
-DG4VIS_USE_OI
|
||||||
|
-DG4VIS_USE_OIX
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
list(APPEND Geant4_DEFINITIONS
|
list(APPEND Geant4_DEFINITIONS
|
||||||
-G4INTY_USE_WIN32
|
-G4INTY_USE_WIN32
|
||||||
@@ -640,6 +663,7 @@ list(APPEND _geant4_internal_libraries
|
|||||||
${_geant4_physicslists_library}
|
${_geant4_physicslists_library}
|
||||||
Geant4::G4run${_geant4_lib_use_suffix}
|
Geant4::G4run${_geant4_lib_use_suffix}
|
||||||
Geant4::G4event${_geant4_lib_use_suffix}
|
Geant4::G4event${_geant4_lib_use_suffix}
|
||||||
|
Geant4::G4tasking${_geant4_lib_use_suffix}
|
||||||
Geant4::G4tracking${_geant4_lib_use_suffix}
|
Geant4::G4tracking${_geant4_lib_use_suffix}
|
||||||
Geant4::G4parmodels${_geant4_lib_use_suffix}
|
Geant4::G4parmodels${_geant4_lib_use_suffix}
|
||||||
Geant4::G4processes${_geant4_lib_use_suffix}
|
Geant4::G4processes${_geant4_lib_use_suffix}
|
||||||
|
|||||||
@@ -182,9 +182,9 @@ function(geant4_add_test test)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
#- Locate the test driver
|
#- Locate the test driver
|
||||||
set(_driver ${CMAKE_SOURCE_DIR}/cmake/Modules/Geant4TestDriver.cmake)
|
set(_driver ${CMAKE_SOURCE_DIR}/cmake/Modules/G4TestDriver.cmake)
|
||||||
if(NOT EXISTS ${_driver})
|
if(NOT EXISTS ${_driver})
|
||||||
message(FATAL_ERROR "GEANT4_ADD_TEST: Geant4TestDriver.cmake not found!")
|
message(FATAL_ERROR "GEANT4_ADD_TEST: G4TestDriver.cmake not found!")
|
||||||
endif()
|
endif()
|
||||||
set(_command ${_command} -P ${_driver})
|
set(_command ${_command} -P ${_driver})
|
||||||
|
|
||||||
@@ -211,6 +211,7 @@ function(geant4_add_test test)
|
|||||||
--build-project ${ARG_PROJECT}
|
--build-project ${ARG_PROJECT}
|
||||||
--build-config $<CONFIGURATION>
|
--build-config $<CONFIGURATION>
|
||||||
--build-noclean
|
--build-noclean
|
||||||
|
--build-options --no-warn-unused-cli -DCMAKE_DISABLE_FIND_PACKAGE_ROOT=$<BOOL:${CMAKE_DISABLE_FIND_PACKAGE_ROOT}>
|
||||||
--test-command ${_command} )
|
--test-command ${_command} )
|
||||||
set_property(TEST ${test} PROPERTY ENVIRONMENT Geant4_DIR=${CMAKE_BINARY_DIR})
|
set_property(TEST ${test} PROPERTY ENVIRONMENT Geant4_DIR=${CMAKE_BINARY_DIR})
|
||||||
if(ARG_FAILREGEX)
|
if(ARG_FAILREGEX)
|
||||||
|
|||||||
@@ -19,10 +19,13 @@ ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
|||||||
G4INTY_BUILD_XT = 1
|
G4INTY_BUILD_XT = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Special case: if OIX vis driver requested, G4Xt must be built.
|
# Special case: if OIX/OIQt vis driver requested, G4Xt/G4Qt must be built.
|
||||||
ifdef G4VIS_BUILD_OIX_DRIVER
|
ifdef G4VIS_BUILD_OIX_DRIVER
|
||||||
G4INTY_BUILD_XT = 1
|
G4INTY_BUILD_XT = 1
|
||||||
endif
|
endif
|
||||||
|
ifdef G4VIS_BUILD_OIQT_DRIVER
|
||||||
|
G4INTY_BUILD_QT = 1
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef G4UI_BUILD_XM_SESSION
|
ifdef G4UI_BUILD_XM_SESSION
|
||||||
G4UI_BUILD_BASIC_SESSION = 1
|
G4UI_BUILD_BASIC_SESSION = 1
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
|||||||
# OPENGLXM requires OPENGLX...
|
# OPENGLXM requires OPENGLX...
|
||||||
G4VIS_BUILD_OPENGLX_DRIVER = 1
|
G4VIS_BUILD_OPENGLX_DRIVER = 1
|
||||||
G4INTY_BUILD_XT = 1
|
G4INTY_BUILD_XT = 1
|
||||||
INC_XM = 1
|
INC_XM = 1
|
||||||
CPPFLAGS += -DG4VIS_BUILD_OPENGLXM_DRIVER
|
CPPFLAGS += -DG4VIS_BUILD_OPENGLXM_DRIVER
|
||||||
endif
|
endif
|
||||||
ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||||
@@ -60,11 +60,13 @@ endif
|
|||||||
ifdef G4VIS_BUILD_OIX_DRIVER
|
ifdef G4VIS_BUILD_OIX_DRIVER
|
||||||
G4VIS_BUILD_OI_DRIVER = 1
|
G4VIS_BUILD_OI_DRIVER = 1
|
||||||
G4INTY_BUILD_XT = 1
|
G4INTY_BUILD_XT = 1
|
||||||
|
INC_XM = 1
|
||||||
CPPFLAGS += -DG4VIS_BUILD_OIX_DRIVER
|
CPPFLAGS += -DG4VIS_BUILD_OIX_DRIVER
|
||||||
endif
|
endif
|
||||||
ifdef G4VIS_BUILD_OIQT_DRIVER
|
ifdef G4VIS_BUILD_OIQT_DRIVER
|
||||||
G4VIS_BUILD_OI_DRIVER = 1
|
G4VIS_BUILD_OI_DRIVER = 1
|
||||||
G4INTY_BUILDQT = 1
|
G4INTY_BUILD_QT = 1
|
||||||
|
INC_QT = 1
|
||||||
CPPFLAGS += -DG4VIS_BUILD_OIQT_DRIVER
|
CPPFLAGS += -DG4VIS_BUILD_OIQT_DRIVER
|
||||||
endif
|
endif
|
||||||
ifdef G4VIS_BUILD_OIWIN32_DRIVER
|
ifdef G4VIS_BUILD_OIWIN32_DRIVER
|
||||||
|
|||||||
+21
-1
@@ -15,9 +15,29 @@ committal in the CVS repository !
|
|||||||
* Reverse chronological order (last date on top), please *
|
* Reverse chronological order (last date on top), please *
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
|
|
||||||
12th Feb 2020 Gabriele Cosmo (config-V10-05-09)
|
22nd June 2020 Gabriele Cosmo (config-V10-06-06)
|
||||||
|
- Added -pthread to all builds in Linux targets.
|
||||||
|
|
||||||
|
18th June 2020 Gabriele Cosmo (config-V10-06-05)
|
||||||
|
- Added setup for building and configuring new externals/ptl
|
||||||
|
and tasking modules. External installation of PTL can be enabled
|
||||||
|
by defining the installation through the environment variable PTL_BASE_DIR.
|
||||||
|
|
||||||
|
25th May 2020 Gabriele Cosmo (config-V10-06-04)
|
||||||
|
- Added missing settings in G4UI_BUILD.gmk script for OIQt and use of UI.
|
||||||
|
|
||||||
|
18th May 2020 Gabriele Cosmo (config-V10-06-03)
|
||||||
|
- Removed deprecated G4USE_STD11 flag settings.
|
||||||
|
|
||||||
|
30th Apr 2020 Gabriele Cosmo (config-V10-06-02)
|
||||||
|
- Corrected setup for use of OpenInventor (Coin).
|
||||||
|
|
||||||
|
12th Feb 2020 Gabriele Cosmo (config-V10-06-01)
|
||||||
- Fixed and updated setup for DLL builds on Windows.
|
- Fixed and updated setup for DLL builds on Windows.
|
||||||
|
|
||||||
|
12th Dec 2019 Gabriele Cosmo (config-V10-06-00)
|
||||||
|
- Removed dependency on GLU for all configurations, as no longer necessary.
|
||||||
|
|
||||||
20th Nov 2019 Gabriele Cosmo (config-V10-05-08)
|
20th Nov 2019 Gabriele Cosmo (config-V10-05-08)
|
||||||
- interactivity.gmk: added -DQT_NO_DEPRECATED_WARNINGS to Qt compilation
|
- interactivity.gmk: added -DQT_NO_DEPRECATED_WARNINGS to Qt compilation
|
||||||
settings, to silence warnings from Qt for use of deprecated features.
|
settings, to silence warnings from Qt for use of deprecated features.
|
||||||
|
|||||||
+47
-10
@@ -131,10 +131,10 @@ ifndef G4BIN
|
|||||||
endif
|
endif
|
||||||
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4BIN) ] && mkdir -p $(G4BIN) )
|
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4BIN) ] && mkdir -p $(G4BIN) )
|
||||||
|
|
||||||
# Use C++11 standard constructs and compilation options ...
|
# Use minimum C++14 standard constructs and compilation options ...
|
||||||
#
|
#
|
||||||
CPPFLAGS += -DG4USE_STD11
|
# CPPFLAGS += -DG4USE_STD14
|
||||||
G4USE_STD11 := 1
|
# G4USE_STD14 := 1
|
||||||
|
|
||||||
# If G4DEBUG or G4NO_OPTIMISE are not specified,
|
# If G4DEBUG or G4NO_OPTIMISE are not specified,
|
||||||
# the default compilation is optimised ...
|
# the default compilation is optimised ...
|
||||||
@@ -181,6 +181,29 @@ ifndef CLHEP_LIB_DIR
|
|||||||
CLHEP_LIB_DIR := $(CLHEP_BASE_DIR)/lib
|
CLHEP_LIB_DIR := $(CLHEP_BASE_DIR)/lib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# PTL path, etc.
|
||||||
|
#
|
||||||
|
ifndef PTL_BASE_DIR
|
||||||
|
PTL_BASE_DIR := $(G4BASE)/externals/ptl
|
||||||
|
G4LIB_BUILD_PTL := 1
|
||||||
|
G4LIB_USE_PTL := 1
|
||||||
|
endif
|
||||||
|
ifndef G4LIB_USE_PTL
|
||||||
|
ifndef PTL_LIB
|
||||||
|
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
||||||
|
PTL_LIB := ptl.lib
|
||||||
|
else
|
||||||
|
PTL_LIB := ptl
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifndef PTL_INCLUDE_DIR
|
||||||
|
PTL_INCLUDE_DIR := $(PTL_BASE_DIR)/include
|
||||||
|
endif
|
||||||
|
ifndef CLHEP_LIB_DIR
|
||||||
|
PTL_LIB_DIR := $(PTL_BASE_DIR)/lib
|
||||||
|
endif
|
||||||
|
|
||||||
# USolids path, etc.
|
# USolids path, etc.
|
||||||
#
|
#
|
||||||
ifdef G4GEOM_USE_USOLIDS
|
ifdef G4GEOM_USE_USOLIDS
|
||||||
@@ -256,7 +279,7 @@ endif
|
|||||||
# Variables for implicit rules, etc., as suggested in GNU Make manual...
|
# Variables for implicit rules, etc., as suggested in GNU Make manual...
|
||||||
#
|
#
|
||||||
CPPFLAGS += -Iinclude
|
CPPFLAGS += -Iinclude
|
||||||
CPPFLAGS += -I$(CLHEP_INCLUDE_DIR)
|
CPPFLAGS += -I$(CLHEP_INCLUDE_DIR) -I$(PTL_INCLUDE_DIR)
|
||||||
|
|
||||||
# Positional qualifiers in action...
|
# Positional qualifiers in action...
|
||||||
#
|
#
|
||||||
@@ -280,6 +303,15 @@ ifndef G4LIB_USE_CLHEP
|
|||||||
LOADLIBS += -l$(CLHEP_LIB)
|
LOADLIBS += -l$(CLHEP_LIB)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
ifndef G4LIB_USE_PTL
|
||||||
|
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
||||||
|
LDFLAGS += -link $(LIB_PATH)$(PTL_LIB_DIR)
|
||||||
|
LOADLIBS += $(PTL_LIB)
|
||||||
|
else
|
||||||
|
LDFLAGS += -L$(PTL_LIB_DIR)
|
||||||
|
LOADLIBS += -l$(PTL_LIB)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
ifdef G4LIB_USE_USOLIDS
|
ifdef G4LIB_USE_USOLIDS
|
||||||
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
|
||||||
LDFLAGS += -link $(LIB_PATH)$(USOLIDS_LIB_DIR)
|
LDFLAGS += -link $(LIB_PATH)$(USOLIDS_LIB_DIR)
|
||||||
@@ -340,8 +372,8 @@ endif
|
|||||||
# OGLFLAGS gives the directory containing include files.
|
# OGLFLAGS gives the directory containing include files.
|
||||||
# E.g.: OGLFLAGS := -I$(OGLHOME)/include
|
# E.g.: OGLFLAGS := -I$(OGLHOME)/include
|
||||||
# OGLLIBS gives the libraries.
|
# OGLLIBS gives the libraries.
|
||||||
# E.g.: OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
# E.g.: OGLLIBS := -L$(OGLHOME)/lib -lGL
|
||||||
# Or : OGLLIBS := -L$(OGLHOME)/lib -lMesaGLU -lMesaGL
|
# Or : OGLLIBS := -L$(OGLHOME)/lib -lMesaGL
|
||||||
# OGLHOME is often /usr or /usr/local. In such case, it is not necessary
|
# OGLHOME is often /usr or /usr/local. In such case, it is not necessary
|
||||||
# to specify the path in OGLFLAGS, since added already by default by the
|
# to specify the path in OGLFLAGS, since added already by default by the
|
||||||
# compiler. OGLHOME can also point to a special installation.
|
# compiler. OGLHOME can also point to a special installation.
|
||||||
@@ -349,18 +381,23 @@ endif
|
|||||||
# are set below. Most system-dependent code assumes OGLHOME is set.
|
# are set below. Most system-dependent code assumes OGLHOME is set.
|
||||||
|
|
||||||
# ------------- OpenInventor -----------------
|
# ------------- OpenInventor -----------------
|
||||||
# The path to the installation of OpenInventor must be specified
|
# The path to the installation of OpenInventor (Coin) must be specified
|
||||||
# if the package is installed in a location different
|
# if the package is installed in a location different
|
||||||
# than default system directories (like... /usr or /usr/local).
|
# than default system directories (like... /usr or /usr/local).
|
||||||
#
|
#
|
||||||
ifndef OIVHOME
|
ifndef OIVHOME
|
||||||
OIVHOME := /usr/local/Inventor
|
OIVHOME := /usr/local/Inventor
|
||||||
endif
|
endif
|
||||||
ifndef OIVFLAGS
|
ifndef OIVFLAGS
|
||||||
OIVFLAGS := -I$(OIVHOME)/include
|
OIVFLAGS := -I$(OIVHOME)/include
|
||||||
endif
|
endif
|
||||||
ifndef OIVLIBS
|
ifndef OIVLIBS
|
||||||
OIVLIBS := -L$(OIVHOME)/lib -lInventorXt -lInventor
|
ifdef G4VIS_USE_OIQT
|
||||||
|
OIVLIBS := -L$(OIVHOME)/lib -lSoQt
|
||||||
|
else
|
||||||
|
OIVLIBS := -L$(OIVHOME)/lib -lSoXt
|
||||||
|
endif
|
||||||
|
OIVLIBS += -lCoin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ----------------- GDML ---------------------
|
# ----------------- GDML ---------------------
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ ifndef INCFLAGS
|
|||||||
-I$(G4BASE)/geometry/navigation/include \
|
-I$(G4BASE)/geometry/navigation/include \
|
||||||
-I$(G4BASE)/geometry/magneticfield/include \
|
-I$(G4BASE)/geometry/magneticfield/include \
|
||||||
-I$(G4BASE)/geometry/biasing/include \
|
-I$(G4BASE)/geometry/biasing/include \
|
||||||
|
-I$(G4BASE)/tasking/include \
|
||||||
-I$(G4BASE)/track/include \
|
-I$(G4BASE)/track/include \
|
||||||
-I$(G4BASE)/tracking/include \
|
-I$(G4BASE)/tracking/include \
|
||||||
-I$(G4BASE)/digits_hits/detector/include \
|
-I$(G4BASE)/digits_hits/detector/include \
|
||||||
@@ -238,6 +239,7 @@ ifdef GLOBALLIBS
|
|||||||
LDLIBS2 += -lG4error_propagation \
|
LDLIBS2 += -lG4error_propagation \
|
||||||
-lG4readout \
|
-lG4readout \
|
||||||
-lG4physicslists \
|
-lG4physicslists \
|
||||||
|
-lG4tasking \
|
||||||
-lG4run \
|
-lG4run \
|
||||||
-lG4event \
|
-lG4event \
|
||||||
-lG4tracking \
|
-lG4tracking \
|
||||||
@@ -257,6 +259,10 @@ ifdef GLOBALLIBS
|
|||||||
LDLIBS2 += -lG4clhep
|
LDLIBS2 += -lG4clhep
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef G4LIB_USE_PTL
|
||||||
|
LDLIBS2 += -lG4ptl
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef G4LIB_USE_EXPAT
|
ifdef G4LIB_USE_EXPAT
|
||||||
LDLIBS2 += -lG4expat
|
LDLIBS2 += -lG4expat
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ ifeq ($(G4SYSTEM),AIX-xlC)
|
|||||||
OGLFLAGS := -I$(OGLHOME)/include
|
OGLFLAGS := -I$(OGLHOME)/include
|
||||||
endif
|
endif
|
||||||
ifndef OGLLIBS
|
ifndef OGLLIBS
|
||||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
OGLLIBS := -L$(OGLHOME)/lib -lGL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
define build-granular-shared-lib
|
define build-granular-shared-lib
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ ifeq ($(G4SYSTEM),DEC-cxx)
|
|||||||
# OGLFLAGS := -I/usr/include -I/usr/local/include
|
# OGLFLAGS := -I/usr/include -I/usr/local/include
|
||||||
endif
|
endif
|
||||||
ifndef OGLLIBS
|
ifndef OGLLIBS
|
||||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
OGLLIBS := -L$(OGLHOME)/lib -lGL
|
||||||
# OGLLIBS := -lMesaGLU -lMesaGL
|
# OGLLIBS := -lMesaGL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
define build-granular-shared-lib
|
define build-granular-shared-lib
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ ifeq ($(G4SYSTEM),Darwin-clang)
|
|||||||
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe
|
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe
|
||||||
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
|
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
|
||||||
CPPFLAGS += -DGL_SILENCE_DEPRECATION
|
CPPFLAGS += -DGL_SILENCE_DEPRECATION
|
||||||
G4USE_STD11 := 1
|
|
||||||
ifdef G4USE_STD14
|
ifdef G4USE_STD14
|
||||||
CPPFLAGS += -std=c++14
|
CPPFLAGS += -std=c++14
|
||||||
CXXFLAGS += -std=c++14
|
CXXFLAGS += -std=c++14
|
||||||
@@ -92,7 +91,7 @@ ifeq ($(G4SYSTEM),Darwin-clang)
|
|||||||
ifneq ($(OGLPATH),)
|
ifneq ($(OGLPATH),)
|
||||||
OGLLIBS := -F$(OGLPATH)/.. -framework OpenGL -framework AGL
|
OGLLIBS := -F$(OGLPATH)/.. -framework OpenGL -framework AGL
|
||||||
else
|
else
|
||||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
OGLLIBS := -L$(OGLHOME)/lib -lGL
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ ifeq ($(G4SYSTEM),Darwin-g++)
|
|||||||
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe
|
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe
|
||||||
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
|
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
|
||||||
CPPFLAGS += -DGL_SILENCE_DEPRECATION
|
CPPFLAGS += -DGL_SILENCE_DEPRECATION
|
||||||
G4USE_STD11 := 1
|
|
||||||
ifdef G4USE_STD14
|
ifdef G4USE_STD14
|
||||||
CPPFLAGS += -std=c++14
|
CPPFLAGS += -std=c++14
|
||||||
CXXFLAGS += -std=c++14
|
CXXFLAGS += -std=c++14
|
||||||
@@ -100,7 +99,7 @@ ifeq ($(G4SYSTEM),Darwin-g++)
|
|||||||
ifneq ($(OGLPATH),)
|
ifneq ($(OGLPATH),)
|
||||||
OGLLIBS := -F$(OGLPATH)/.. -framework OpenGL -framework AGL
|
OGLLIBS := -F$(OGLPATH)/.. -framework OpenGL -framework AGL
|
||||||
else
|
else
|
||||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
OGLLIBS := -L$(OGLHOME)/lib -lGL
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifndef OGLLIBS
|
ifndef OGLLIBS
|
||||||
@@ -112,13 +111,13 @@ ifeq ($(G4SYSTEM),Darwin-g++)
|
|||||||
DARWIN_VERSION = $(shell uname -r | sed 's/\([0-9]*\).[0-9]*.[0-9]*/\1/')
|
DARWIN_VERSION = $(shell uname -r | sed 's/\([0-9]*\).[0-9]*.[0-9]*/\1/')
|
||||||
ifeq ($(DARWIN_VERSION),9)
|
ifeq ($(DARWIN_VERSION),9)
|
||||||
# the following lines are for building on MacOSX 10.5 "Leopard"
|
# the following lines are for building on MacOSX 10.5 "Leopard"
|
||||||
OGLLIBS := -Wl,$(OGLPATH)/Libraries/libGL.dylib -L$(OGLHOME)/lib -lGLU -lGL
|
OGLLIBS := -Wl,$(OGLPATH)/Libraries/libGL.dylib -L$(OGLHOME)/lib -lGL
|
||||||
else
|
else
|
||||||
# the following lines are for building on MacOSX > 10.5
|
# the following lines are for building on MacOSX > 10.5
|
||||||
OGLLIBS := -F$(OGLPATH)/.. -framework OpenGL -framework AGL
|
OGLLIBS := -F$(OGLPATH)/.. -framework OpenGL -framework AGL
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
OGLLIBS := -L$(OGLHOME)/lib -lGL
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ ifeq ($(G4SYSTEM),HP-aCC)
|
|||||||
OGLFLAGS := -I$(OGLHOME)/include
|
OGLFLAGS := -I$(OGLHOME)/include
|
||||||
endif
|
endif
|
||||||
ifndef OGLLIBS
|
ifndef OGLLIBS
|
||||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
OGLLIBS := -L$(OGLHOME)/lib -lGL
|
||||||
OGLLIBS += -L/opt/graphics/common/lib -lXwindow -lhpgfx -lXhp11 -ldld
|
OGLLIBS += -L/opt/graphics/common/lib -lXwindow -lhpgfx -lXhp11 -ldld
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,8 @@ ifeq ($(G4SYSTEM),Linux-clang)
|
|||||||
CXX := clang++
|
CXX := clang++
|
||||||
CXXFLAGS := -Wall -Wno-non-virtual-dtor -Wno-long-long
|
CXXFLAGS := -Wall -Wno-non-virtual-dtor -Wno-long-long
|
||||||
CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual
|
CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual
|
||||||
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe
|
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe -pthread
|
||||||
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
|
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
|
||||||
G4USE_STD11 := 1
|
|
||||||
ifdef G4USE_STD14
|
ifdef G4USE_STD14
|
||||||
CPPFLAGS += -std=c++14
|
CPPFLAGS += -std=c++14
|
||||||
CXXFLAGS += -std=c++14
|
CXXFLAGS += -std=c++14
|
||||||
@@ -23,7 +22,7 @@ ifeq ($(G4SYSTEM),Linux-clang)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef G4MULTITHREADED
|
ifdef G4MULTITHREADED
|
||||||
CXXFLAGS += -ftls-model=initial-exec -pthread
|
CXXFLAGS += -ftls-model=initial-exec
|
||||||
endif
|
endif
|
||||||
ifdef G4OPTIMISE
|
ifdef G4OPTIMISE
|
||||||
CXXFLAGS += -O3
|
CXXFLAGS += -O3
|
||||||
@@ -88,7 +87,7 @@ ifeq ($(G4SYSTEM),Linux-clang)
|
|||||||
OGLFLAGS := -I$(OGLHOME)/include
|
OGLFLAGS := -I$(OGLHOME)/include
|
||||||
endif
|
endif
|
||||||
ifndef OGLLIBS
|
ifndef OGLLIBS
|
||||||
OGLLIBS := -L$(OGLHOME)/lib$(ARCH) -lGLU -lGL
|
OGLLIBS := -L$(OGLHOME)/lib$(ARCH) -lGL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ---- QT Setup block -------------------------------------------------------
|
# ---- QT Setup block -------------------------------------------------------
|
||||||
|
|||||||
@@ -5,9 +5,8 @@ ifeq ($(G4SYSTEM),Linux-g++)
|
|||||||
CXX := g++
|
CXX := g++
|
||||||
CXXFLAGS := -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long
|
CXXFLAGS := -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long
|
||||||
CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual
|
CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual
|
||||||
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe
|
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe -pthread
|
||||||
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
|
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
|
||||||
G4USE_STD11 := 1
|
|
||||||
ifdef G4USE_STD14
|
ifdef G4USE_STD14
|
||||||
CPPFLAGS += -std=c++14
|
CPPFLAGS += -std=c++14
|
||||||
CXXFLAGS += -std=c++14
|
CXXFLAGS += -std=c++14
|
||||||
@@ -21,7 +20,7 @@ ifeq ($(G4SYSTEM),Linux-g++)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef G4MULTITHREADED
|
ifdef G4MULTITHREADED
|
||||||
CXXFLAGS += -ftls-model=initial-exec -pthread
|
CXXFLAGS += -ftls-model=initial-exec
|
||||||
endif
|
endif
|
||||||
ifdef G4OPTIMISE
|
ifdef G4OPTIMISE
|
||||||
CXXFLAGS += -O3
|
CXXFLAGS += -O3
|
||||||
@@ -86,7 +85,7 @@ ifeq ($(G4SYSTEM),Linux-g++)
|
|||||||
OGLFLAGS := -I$(OGLHOME)/include
|
OGLFLAGS := -I$(OGLHOME)/include
|
||||||
endif
|
endif
|
||||||
ifndef OGLLIBS
|
ifndef OGLLIBS
|
||||||
OGLLIBS := -L$(OGLHOME)/lib$(ARCH) -lGLU -lGL
|
OGLLIBS := -L$(OGLHOME)/lib$(ARCH) -lGL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ---- QT Setup block -------------------------------------------------------
|
# ---- QT Setup block -------------------------------------------------------
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
#
|
#
|
||||||
ifeq ($(G4SYSTEM),Linux-icc)
|
ifeq ($(G4SYSTEM),Linux-icc)
|
||||||
CXX := icc
|
CXX := icc
|
||||||
CXXFLAGS := -ansi -fp-model precise -w1
|
CXXFLAGS := -ansi -fp-model precise -w1 -pthread
|
||||||
G4USE_STD11 := 1
|
|
||||||
ifdef G4USE_STD14
|
ifdef G4USE_STD14
|
||||||
CPPFLAGS += -std=c++14
|
CPPFLAGS += -std=c++14
|
||||||
CXXFLAGS += -std=c++14
|
CXXFLAGS += -std=c++14
|
||||||
@@ -18,7 +17,7 @@ ifeq ($(G4SYSTEM),Linux-icc)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef G4MULTITHREADED
|
ifdef G4MULTITHREADED
|
||||||
CXXFLAGS += -ftls-model=initial-exec -pthread
|
CXXFLAGS += -ftls-model=initial-exec
|
||||||
endif
|
endif
|
||||||
ifdef G4OPTIMISE
|
ifdef G4OPTIMISE
|
||||||
CXXFLAGS += -O3
|
CXXFLAGS += -O3
|
||||||
@@ -51,7 +50,6 @@ ifeq ($(G4SYSTEM),Linux-icc)
|
|||||||
AR := ar r
|
AR := ar r
|
||||||
ECHO := /bin/echo -e
|
ECHO := /bin/echo -e
|
||||||
SHEXT := so
|
SHEXT := so
|
||||||
# LOADLIBS += -lstdc++
|
|
||||||
ifndef X11FLAGS
|
ifndef X11FLAGS
|
||||||
X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
|
X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
|
||||||
endif
|
endif
|
||||||
@@ -78,7 +76,7 @@ ifeq ($(G4SYSTEM),Linux-icc)
|
|||||||
OGLHOME := /usr
|
OGLHOME := /usr
|
||||||
endif
|
endif
|
||||||
ifndef OGLLIBS
|
ifndef OGLLIBS
|
||||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
OGLLIBS := -L$(OGLHOME)/lib -lGL
|
||||||
endif
|
endif
|
||||||
define build-granular-shared-lib
|
define build-granular-shared-lib
|
||||||
@libdir=`(cd $(@D);/bin/pwd)`; \
|
@libdir=`(cd $(@D);/bin/pwd)`; \
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ ifeq ($(G4SYSTEM),SGI-CC)
|
|||||||
OGLFLAGS :=
|
OGLFLAGS :=
|
||||||
endif
|
endif
|
||||||
ifndef OGLLIBS
|
ifndef OGLLIBS
|
||||||
OGLLIBS := -L/usr/lib -lGLU -lGL
|
OGLLIBS := -L/usr/lib -lGL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
define build-granular-shared-lib
|
define build-granular-shared-lib
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ ifeq ($(G4SYSTEM),SUN-CC)
|
|||||||
OGLFLAGS := -I$(OGLHOME)/include
|
OGLFLAGS := -I$(OGLHOME)/include
|
||||||
endif
|
endif
|
||||||
ifndef OGLLIBS
|
ifndef OGLLIBS
|
||||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
OGLLIBS := -L$(OGLHOME)/lib -lGL
|
||||||
endif
|
endif
|
||||||
LOADLIBS += -lsunmath -lsocket -lnsl
|
LOADLIBS += -lsunmath -lsocket -lnsl
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ ifeq ($(G4SYSTEM),WIN32-VC)
|
|||||||
OGLFLAGS :=
|
OGLFLAGS :=
|
||||||
endif
|
endif
|
||||||
ifndef OGLLIBS
|
ifndef OGLLIBS
|
||||||
OGLLIBS := glu32.lib opengl32.lib gdi32.lib user32.lib
|
OGLLIBS := opengl32.lib gdi32.lib user32.lib
|
||||||
endif
|
endif
|
||||||
ifndef UI32LIBS
|
ifndef UI32LIBS
|
||||||
UI32LIBS := gdi32.lib user32.lib
|
UI32LIBS := gdi32.lib user32.lib
|
||||||
@@ -85,6 +85,9 @@ ifeq ($(G4SYSTEM),WIN32-VC)
|
|||||||
ifdef G4LIB_USE_CLHEP
|
ifdef G4LIB_USE_CLHEP
|
||||||
GLOBLIBS += libG4clhep.lib
|
GLOBLIBS += libG4clhep.lib
|
||||||
endif
|
endif
|
||||||
|
ifdef G4LIB_USE_PTL
|
||||||
|
GLOBLIBS += libptl.lib
|
||||||
|
endif
|
||||||
define build-granular-shared-lib
|
define build-granular-shared-lib
|
||||||
@libdir=`(cd $(@D);/bin/pwd)`;\
|
@libdir=`(cd $(@D);/bin/pwd)`;\
|
||||||
cd $(G4TMP)/$(G4SYSTEM);\
|
cd $(G4TMP)/$(G4SYSTEM);\
|
||||||
@@ -102,6 +105,7 @@ ifeq ($(G4SYSTEM),WIN32-VC)
|
|||||||
$(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
|
$(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
|
||||||
$(LIB_PATH)$(G4LIBDIR) $(GLOBLIBS) \
|
$(LIB_PATH)$(G4LIBDIR) $(GLOBLIBS) \
|
||||||
$(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
|
$(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
|
||||||
|
$(LIB_PATH)$(PTL_LIB_DIR) $(PTL_LIB) \
|
||||||
$(INTYLIBS) $(GDMLLIBS) $(ANALYSISLIBS) $(UI32LIBS) $(LOADLIBS)
|
$(INTYLIBS) $(GDMLLIBS) $(ANALYSISLIBS) $(UI32LIBS) $(LOADLIBS)
|
||||||
endef
|
endef
|
||||||
define build-global-shared-lib
|
define build-global-shared-lib
|
||||||
@@ -121,6 +125,7 @@ ifeq ($(G4SYSTEM),WIN32-VC)
|
|||||||
$(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
|
$(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
|
||||||
$(LIB_PATH)$(G4LIBDIR) $(GLOBLIBS) \
|
$(LIB_PATH)$(G4LIBDIR) $(GLOBLIBS) \
|
||||||
$(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
|
$(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
|
||||||
|
$(LIB_PATH)$(PTL_LIB_DIR) $(PTL_LIB) \
|
||||||
$(INTYLIBS) $(GDMLLIBS) $(ANALYSISLIBS) $(UI32LIBS) $(LOADLIBS)
|
$(INTYLIBS) $(GDMLLIBS) $(ANALYSISLIBS) $(UI32LIBS) $(LOADLIBS)
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ ifeq ($(G4SYSTEM),WIN32-g++)
|
|||||||
CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual
|
CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual
|
||||||
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe
|
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe
|
||||||
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
|
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
|
||||||
G4USE_STD11 := 1
|
|
||||||
G4USE_STD17 := 1
|
G4USE_STD17 := 1
|
||||||
CPPFLAGS += -std=c++17
|
CPPFLAGS += -std=c++17
|
||||||
CXXFLAGS += -std=c++17
|
CXXFLAGS += -std=c++17
|
||||||
@@ -74,7 +73,7 @@ ifeq ($(G4SYSTEM),WIN32-g++)
|
|||||||
OGLFLAGS := -I$(OGLHOME)/include
|
OGLFLAGS := -I$(OGLHOME)/include
|
||||||
endif
|
endif
|
||||||
ifndef OGLLIBS
|
ifndef OGLLIBS
|
||||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
OGLLIBS := -L$(OGLHOME)/lib -lGL
|
||||||
endif
|
endif
|
||||||
define build-granular-shared-lib
|
define build-granular-shared-lib
|
||||||
@libdir=`(cd $(@D);/bin/pwd)`; \
|
@libdir=`(cd $(@D);/bin/pwd)`; \
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Geant4Py is a Geant4-Python bridge.
|
|||||||
* Reverse chronological order (last date on top), please *
|
* Reverse chronological order (last date on top), please *
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
|
|
||||||
19 Mar. 2020 B. Morgan (geant4py-V10-05-00)
|
19 Mar. 2020 B. Morgan (geant4py-V10-06-00)
|
||||||
- Integrate build, test, and install of geant4py with core Geant4
|
- Integrate build, test, and install of geant4py with core Geant4
|
||||||
CMake buildsystem.
|
CMake buildsystem.
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ void(G4ProcessTable::*f2_SetProcessActivation)
|
|||||||
= &G4ProcessTable::SetProcessActivation;
|
= &G4ProcessTable::SetProcessActivation;
|
||||||
|
|
||||||
void(G4ProcessTable::*f3_SetProcessActivation)
|
void(G4ProcessTable::*f3_SetProcessActivation)
|
||||||
(const G4String&, G4ParticleDefinition*, G4bool)
|
(const G4String&, const G4ParticleDefinition*, G4bool)
|
||||||
= &G4ProcessTable::SetProcessActivation;
|
= &G4ProcessTable::SetProcessActivation;
|
||||||
|
|
||||||
void(G4ProcessTable::*f4_SetProcessActivation)
|
void(G4ProcessTable::*f4_SetProcessActivation)
|
||||||
@@ -125,7 +125,7 @@ void(G4ProcessTable::*f6_SetProcessActivation)
|
|||||||
= &G4ProcessTable::SetProcessActivation;
|
= &G4ProcessTable::SetProcessActivation;
|
||||||
|
|
||||||
void(G4ProcessTable::*f7_SetProcessActivation)
|
void(G4ProcessTable::*f7_SetProcessActivation)
|
||||||
(G4ProcessType, G4ParticleDefinition*, G4bool)
|
(G4ProcessType, const G4ParticleDefinition*, G4bool)
|
||||||
= &G4ProcessTable::SetProcessActivation;
|
= &G4ProcessTable::SetProcessActivation;
|
||||||
|
|
||||||
void(G4ProcessTable::*f8_SetProcessActivation)
|
void(G4ProcessTable::*f8_SetProcessActivation)
|
||||||
|
|||||||
@@ -16,6 +16,40 @@ committal in the CVS repository !
|
|||||||
* Reverse chronological order (last date on top), please *
|
* Reverse chronological order (last date on top), please *
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
|
|
||||||
|
26th June 2020 Gabriele Cosmo (examples-V10-06-06)
|
||||||
|
- Updated reference outputs according to reference tag geant4-10-06-ref-06.
|
||||||
|
- Includes tags: exampleB5-V10-06-00, exhadr03-V10-06-02, exhadr06-V10-06-01,
|
||||||
|
tbbex-V10-06-00, ThreadsafeScorers-V10-06-01,
|
||||||
|
activation-V10-06-01.
|
||||||
|
|
||||||
|
31st May 2020 Gabriele Cosmo (examples-V10-06-05)
|
||||||
|
- Updated reference outputs according to reference tag geant4-10-06-ref-05.
|
||||||
|
- Includes tags: air_shower-V10-06-00, ChargeExchangeMC-V10-06-00,
|
||||||
|
fastAerosol-V10-06-00, ReverseMC01-V10-06-00,
|
||||||
|
exhadr02-V10-06-00, exhadr03-V10-06-01, exhadr06-V10-06-00,
|
||||||
|
exhadr07-V10-06-00, NeutronSource-V10-06-00, G01-V10-06-00,
|
||||||
|
OpNovice2-V10-06-03, activation-V10-06-00.
|
||||||
|
|
||||||
|
30th April 2020 Gabriele Cosmo (examples-V10-06-04)
|
||||||
|
- Updated reference outputs according to reference tag geant4-10-06-ref-04.
|
||||||
|
- Includes tags: exdna-V10-06-02, testem4-V10-06-00, testem7-V10-06-00,
|
||||||
|
exampleP01-V10-06-01.
|
||||||
|
|
||||||
|
31st March 2020 Gabriele Cosmo (examples-V10-06-03)
|
||||||
|
- Updated reference outputs according to reference tag geant4-10-06-ref-03.
|
||||||
|
- Includes tags: hadrontherapy-V10-06-00.
|
||||||
|
|
||||||
|
29th February 2020 Gabriele Cosmo (examples-V10-06-02)
|
||||||
|
- Updated reference outputs according to reference tag geant4-10-06-ref-02.
|
||||||
|
- Includes tags: gammaraytel-V10-06-00, exampleB2-V10-06-00, monopole-V10-06-00,
|
||||||
|
exHadr00-V10-06-00, exdna-V10-06-01, chem6-V10-06-00,
|
||||||
|
OpNovice2-V10-06-01.
|
||||||
|
|
||||||
|
31st January 2020 Gabriele Cosmo (examples-V10-06-01)
|
||||||
|
- Updated reference outputs according to reference tag geant4-10-06-ref-01.
|
||||||
|
- Includes tags: exbasic-V10-06-00, testem1-V10-06-00, testem11-V10-06-00,
|
||||||
|
exHadr01-V10-06-00, OpNovice2-V10-06-00.
|
||||||
|
|
||||||
6th December 2019 Gabriele Cosmo (examples-V10-06-00)
|
6th December 2019 Gabriele Cosmo (examples-V10-06-00)
|
||||||
- Updated reference outputs according to reference tag geant4-10-06-ref-00.
|
- Updated reference outputs according to reference tag geant4-10-06-ref-00.
|
||||||
- Includes tags: doxygen-V10-05-02, air_shower-V10-05-01, ccal-V10-05-01,
|
- Includes tags: doxygen-V10-05-02, air_shower-V10-05-01, ccal-V10-05-01,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ cirrone@lns.infn.it
|
|||||||
History file of the ChargeExchangeMC application
|
History file of the ChargeExchangeMC application
|
||||||
====================================================
|
====================================================
|
||||||
|
|
||||||
08.04.2020 - S. Guatelli, Tag ChargeExchangeMC-V10-05-00
|
08.04.2020 - S. Guatelli, Tag ChargeExchangeMC-V10-06-00
|
||||||
Error removed from the main. CMakeList.txt updated.
|
Error removed from the main. CMakeList.txt updated.
|
||||||
Dependence to Qt Libraries when using ROOT demoved as obsolete.
|
Dependence to Qt Libraries when using ROOT demoved as obsolete.
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,17 @@
|
|||||||
# --------------------------------------------------------------
|
name := cloud
|
||||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
G4TARGET := $(name)
|
||||||
# --------------------------------------------------------------
|
G4EXLIB := true
|
||||||
|
|
||||||
ifndef G4INSTALL
|
ifndef G4INSTALL
|
||||||
G4INSTALL = ../..
|
G4INSTALL = ../../..
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(G4INSTALL)/config/architecture.gmk
|
|
||||||
|
|
||||||
SUBDIRS = gammaray_telescope underground_physics xray_fluorescence xray_telescope
|
.PHONY: all
|
||||||
SUBDIRS += brachytherapy hadrontherapy iort_therapy medical_linac
|
all: lib bin
|
||||||
SUBDIRS += purging_magnet radioprotection human_phantom
|
|
||||||
SUBDIRS += air_shower microbeam microelectronics nanobeam
|
|
||||||
SUBDIRS += composite_calorimeter lAr_calorimeter
|
|
||||||
SUBDIRS += amsEcal ChargeExchangeMC eRosita
|
|
||||||
|
|
||||||
.PHONY : all clean clean_libs
|
include $(G4INSTALL)/config/binmake.gmk
|
||||||
|
|
||||||
all:
|
visclean:
|
||||||
@for dir in $(SUBDIRS); do (cd $$dir; $(MAKE)); done
|
rm -f g4*.prim g4*.eps g4*.wrl
|
||||||
|
rm -f .DAWN_*
|
||||||
|
|
||||||
clean:
|
|
||||||
@for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) clean); done
|
|
||||||
|
|
||||||
clean_libs:
|
|
||||||
@for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) clean_libs); done
|
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
History file
|
History file
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
29.05.2020 - D.Sawkey (air_shower-V10-06-00)
|
||||||
|
added an #include to UltraDetectorConstruction, due to optical
|
||||||
|
physics changes.
|
||||||
|
|
||||||
8 November, 2019 B. Tomé (air_shower-V10-05-01)
|
8 November, 2019 B. Tomé (air_shower-V10-05-01)
|
||||||
- Minor changes, mainly stetics.
|
- Minor changes, mainly stetics.
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
############################################
|
############################################
|
||||||
|
|
||||||
**************************************************************
|
**************************************************************
|
||||||
Geant4 version Name: geant4-10-06-patch-02 (29-May-2020)
|
Geant4 version Name: geant4-10-06-ref-06 (26-June-2020)
|
||||||
Copyright : Geant4 Collaboration
|
Copyright : Geant4 Collaboration
|
||||||
References : NIM A 506 (2003), 250-303
|
References : NIM A 506 (2003), 250-303
|
||||||
: IEEE-TNS 53 (2006), 270-278
|
: IEEE-TNS 53 (2006), 270-278
|
||||||
@@ -80,20 +80,20 @@ Visualization Manager initialising...
|
|||||||
Registering graphics systems...
|
Registering graphics systems...
|
||||||
|
|
||||||
You have successfully registered the following graphics systems.
|
You have successfully registered the following graphics systems.
|
||||||
Current available graphics systems are:
|
Registered graphics systems are:
|
||||||
ASCIITree (ATree)
|
ASCIITree (ATree)
|
||||||
DAWNFILE (DAWNFILE)
|
DAWNFILE (DAWNFILE)
|
||||||
G4HepRep (HepRepXML)
|
G4HepRep (HepRepXML)
|
||||||
G4HepRepFile (HepRepFile)
|
G4HepRepFile (HepRepFile)
|
||||||
RayTracer (RayTracer)
|
RayTracer (RayTracer)
|
||||||
VRML1FILE (VRML1FILE)
|
VRML1FILE (VRML1FILE)
|
||||||
VRML2FILE (VRML2FILE)
|
VRML2FILE (VRML2FILE)
|
||||||
gMocrenFile (gMocrenFile)
|
gMocrenFile (gMocrenFile)
|
||||||
OpenGLImmediateXm (OGLIXm, OGLI)
|
OpenGLImmediateXm (OGLIXm, OGLI)
|
||||||
OpenGLStoredXm (OGLSXm, OGL, OGLS)
|
OpenGLStoredXm (OGLSXm, OGL, OGLS)
|
||||||
OpenGLImmediateX (OGLIX, OGLIXm_FALLBACK)
|
OpenGLImmediateX (OGLIX, OGLIXm_FALLBACK)
|
||||||
OpenGLStoredX (OGLSX, OGLSXm_FALLBACK)
|
OpenGLStoredX (OGLSX, OGLSXm_FALLBACK)
|
||||||
RayTracerX (RayTracerX)
|
RayTracerX (RayTracerX)
|
||||||
|
|
||||||
Registering model factories...
|
Registering model factories...
|
||||||
|
|
||||||
@@ -106,6 +106,9 @@ Registered model factories:
|
|||||||
drawByParticleID
|
drawByParticleID
|
||||||
drawByEncounteredVolume
|
drawByEncounteredVolume
|
||||||
|
|
||||||
|
Registered models:
|
||||||
|
None
|
||||||
|
|
||||||
Registered filter factories:
|
Registered filter factories:
|
||||||
attributeFilter
|
attributeFilter
|
||||||
chargeFilter
|
chargeFilter
|
||||||
@@ -113,6 +116,9 @@ Registered filter factories:
|
|||||||
particleFilter
|
particleFilter
|
||||||
encounteredVolumeFilter
|
encounteredVolumeFilter
|
||||||
|
|
||||||
|
Registered filters:
|
||||||
|
None
|
||||||
|
|
||||||
You have successfully registered the following user vis actions.
|
You have successfully registered the following user vis actions.
|
||||||
Run Duration User Vis Actions: none
|
Run Duration User Vis Actions: none
|
||||||
End of Event User Vis Actions: none
|
End of Event User Vis Actions: none
|
||||||
@@ -189,7 +195,7 @@ Region <DefaultRegionForParallelWorld> -- -- is not associated to any world.
|
|||||||
Materials :
|
Materials :
|
||||||
Production cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
|
Production cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
|
||||||
|
|
||||||
========= Table of registered couples ==============================
|
========= Table of registered couples ============================
|
||||||
|
|
||||||
Index : 0 used in the geometry : Yes
|
Index : 0 used in the geometry : Yes
|
||||||
Material : Air
|
Material : Air
|
||||||
@@ -201,30 +207,30 @@ Index : 0 used in the geometry : Yes
|
|||||||
Index : 1 used in the geometry : Yes
|
Index : 1 used in the geometry : Yes
|
||||||
Material : Aluminum
|
Material : Aluminum
|
||||||
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
|
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
|
||||||
Energy thresholds : gamma 6.90363 keV e- 598.345 keV e+ 570.85 keV proton 100 keV
|
Energy thresholds : gamma 6.90532 keV e- 597.637 keV e+ 574.097 keV proton 100 keV
|
||||||
Region(s) which use this couple :
|
Region(s) which use this couple :
|
||||||
DefaultRegionForTheWorld
|
DefaultRegionForTheWorld
|
||||||
|
|
||||||
Index : 2 used in the geometry : Yes
|
Index : 2 used in the geometry : Yes
|
||||||
Material : Acrylic
|
Material : Acrylic
|
||||||
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
|
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
|
||||||
Energy thresholds : gamma 2.78665 keV e- 389.196 keV e+ 376.336 keV proton 100 keV
|
Energy thresholds : gamma 2.77708 keV e- 389.292 keV e+ 376.471 keV proton 100 keV
|
||||||
Region(s) which use this couple :
|
Region(s) which use this couple :
|
||||||
DefaultRegionForTheWorld
|
DefaultRegionForTheWorld
|
||||||
|
|
||||||
Index : 3 used in the geometry : Yes
|
Index : 3 used in the geometry : Yes
|
||||||
Material : Quartz
|
Material : Quartz
|
||||||
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
|
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
|
||||||
Energy thresholds : gamma 6.03542 keV e- 610.53 keV e+ 590.357 keV proton 100 keV
|
Energy thresholds : gamma 6.0396 keV e- 609.767 keV e+ 589.685 keV proton 100 keV
|
||||||
Region(s) which use this couple :
|
Region(s) which use this couple :
|
||||||
DefaultRegionForTheWorld
|
DefaultRegionForTheWorld
|
||||||
|
|
||||||
====================================================================
|
==================================================================
|
||||||
|
|
||||||
Start closing geometry.
|
Start closing geometry.
|
||||||
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||||
|
|
||||||
Total memory consumed for geometry optimisation: 1 kByte
|
Total memory consumed for geometry optimisation: 2 kByte
|
||||||
Total CPU time elapsed for geometry optimisation: 0 seconds
|
Total CPU time elapsed for geometry optimisation: 0 seconds
|
||||||
|
|
||||||
Voxelisation: top CPU users:
|
Voxelisation: top CPU users:
|
||||||
@@ -236,16 +242,16 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
|||||||
Voxelisation: top memory users:
|
Voxelisation: top memory users:
|
||||||
Percent Memory Heads Nodes Pointers Total CPU Volume
|
Percent Memory Heads Nodes Pointers Total CPU Volume
|
||||||
------- -------- ------ ------ -------- ---------- ----------
|
------- -------- ------ ------ -------- ---------- ----------
|
||||||
52.31 0k 1 13 26 0.00 LensMotherLV
|
52.81 1k 1 13 26 0.00 LensMotherLV
|
||||||
47.69 0k 3 9 22 0.00 World
|
47.19 1k 3 9 22 0.00 World
|
||||||
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
|
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
|
||||||
See commands in /vis/modeling/trajectories/ for other options.
|
See commands in /vis/modeling/trajectories/ for other options.
|
||||||
### Run 0 starts.
|
### Run 0 starts.
|
||||||
ooo Run 0 starts (global).
|
ooo Run 0 starts (global).
|
||||||
|
|
||||||
--------- Ranlux engine status ---------
|
--------- Ranlux engine status ---------
|
||||||
Initial seed = 1590745240
|
Initial seed = 1593046427
|
||||||
float_seed_table[] = 0.769771 0.683744 0.431496 0.063198 0.981073 0.662218 0.139998 0.0275069 0.809529 0.691412 0.220709 0.553455 0.998968 0.80317 0.0774835 0.496753 0.139411 0.555612 0.271583 0.197803 0.878428 0.535016 0.310122 0.39858
|
float_seed_table[] = 0.147597 0.980425 0.900216 0.380846 0.303985 0.791623 0.132859 0.350516 0.641343 0.866017 0.885685 0.873382 0.665981 0.724537 0.776523 0.937184 0.512054 0.420086 0.399701 0.749612 0.0040521 0.148756 0.382486 0.991302
|
||||||
i_lag = 23, j_lag = 9
|
i_lag = 23, j_lag = 9
|
||||||
carry = 0, count24 = 0
|
carry = 0, count24 = 0
|
||||||
luxury = 3 nskip = 199
|
luxury = 3 nskip = 199
|
||||||
@@ -256,7 +262,7 @@ mu- Mono Plane
|
|||||||
Run terminated.
|
Run terminated.
|
||||||
Run Summary
|
Run Summary
|
||||||
Number of events processed : 100
|
Number of events processed : 100
|
||||||
User=2.460000s Real=2.458819s Sys=0.000000s
|
User=3.570000s Real=3.741177s Sys=0.010000s
|
||||||
### Run 0 (global) ended.
|
### Run 0 (global) ended.
|
||||||
Graphics systems deleted.
|
Graphics systems deleted.
|
||||||
Visualization Manager deleting...
|
Visualization Manager deleting...
|
||||||
@@ -271,22 +277,22 @@ G4SDManager deleted.
|
|||||||
EventManager deleted.
|
EventManager deleted.
|
||||||
Units table cleared.
|
Units table cleared.
|
||||||
TransportationManager deleted.
|
TransportationManager deleted.
|
||||||
Total navigation history collections cleaned: 10
|
Total navigation history collections cleaned: 9
|
||||||
================== Deleting memory pools ===================
|
================== Deleting memory pools ===================
|
||||||
Pool ID '20G4NavigationLevelRep', size : 0.0135 MB
|
Pool ID '20G4NavigationLevelRep', size : 0.0115 MB
|
||||||
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
|
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
|
||||||
Pool ID '7G4Event', size : 0.000961 MB
|
Pool ID '7G4Event', size : 0.000961 MB
|
||||||
Pool ID '15G4PrimaryVertex', size : 0.000961 MB
|
Pool ID '15G4PrimaryVertex', size : 0.000961 MB
|
||||||
Pool ID '17G4PrimaryParticle', size : 0.000961 MB
|
Pool ID '17G4PrimaryParticle', size : 0.000961 MB
|
||||||
Pool ID '15G4HCofThisEvent', size : 0.000961 MB
|
Pool ID '15G4HCofThisEvent', size : 0.000961 MB
|
||||||
Pool ID '16G4HitsCollection', size : 0.000961 MB
|
Pool ID '16G4HitsCollection', size : 0.000961 MB
|
||||||
Pool ID '17G4DynamicParticle', size : 0.025 MB
|
Pool ID '17G4DynamicParticle', size : 0.024 MB
|
||||||
Pool ID '7G4Track', size : 0.049 MB
|
Pool ID '7G4Track', size : 0.0471 MB
|
||||||
Pool ID '18G4TouchableHistory', size : 0.000961 MB
|
Pool ID '18G4TouchableHistory', size : 0.000961 MB
|
||||||
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
|
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
|
||||||
Pool ID '15UltraOpticalHit', size : 0.00481 MB
|
Pool ID '15UltraOpticalHit', size : 0.000961 MB
|
||||||
Number of memory pools allocated: 12 of which, static: 0
|
Number of memory pools allocated: 12 of which, static: 0
|
||||||
Dynamic pools deleted: 12 / Total memory freed: 0.1 MB
|
Dynamic pools deleted: 12 / Total memory freed: 0.091 MB
|
||||||
============================================================
|
============================================================
|
||||||
G4Allocator objects are deleted.
|
G4Allocator objects are deleted.
|
||||||
UImanager deleted.
|
UImanager deleted.
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
#include "G4Element.hh"
|
#include "G4Element.hh"
|
||||||
#include "G4ElementTable.hh"
|
#include "G4ElementTable.hh"
|
||||||
#include "G4LogicalBorderSurface.hh"
|
#include "G4LogicalBorderSurface.hh"
|
||||||
|
#include "G4LogicalSkinSurface.hh"
|
||||||
#include "G4Box.hh"
|
#include "G4Box.hh"
|
||||||
#include "G4Sphere.hh"
|
#include "G4Sphere.hh"
|
||||||
#include "G4Tubs.hh"
|
#include "G4Tubs.hh"
|
||||||
|
|||||||
+103
-103
@@ -4,7 +4,7 @@
|
|||||||
############################################
|
############################################
|
||||||
|
|
||||||
**************************************************************
|
**************************************************************
|
||||||
Geant4 version Name: geant4-10-06-patch-02 (29-May-2020)
|
Geant4 version Name: geant4-10-06-ref-06 (26-June-2020)
|
||||||
Copyright : Geant4 Collaboration
|
Copyright : Geant4 Collaboration
|
||||||
References : NIM A 506 (2003), 250-303
|
References : NIM A 506 (2003), 250-303
|
||||||
: IEEE-TNS 53 (2006), 270-278
|
: IEEE-TNS 53 (2006), 270-278
|
||||||
@@ -116,7 +116,7 @@ Region <DefaultRegionForParallelWorld> -- -- is not associated to any world.
|
|||||||
Materials :
|
Materials :
|
||||||
Production cuts : gamma 1 km e- 1 km e+ 1 km proton 1 km
|
Production cuts : gamma 1 km e- 1 km e+ 1 km proton 1 km
|
||||||
|
|
||||||
========= Table of registered couples ==============================
|
========= Table of registered couples ============================
|
||||||
|
|
||||||
Index : 0 used in the geometry : Yes
|
Index : 0 used in the geometry : Yes
|
||||||
Material : Galactic
|
Material : Galactic
|
||||||
@@ -139,27 +139,27 @@ Index : 2 used in the geometry : Yes
|
|||||||
Region(s) which use this couple :
|
Region(s) which use this couple :
|
||||||
DefaultRegionForTheWorld
|
DefaultRegionForTheWorld
|
||||||
|
|
||||||
====================================================================
|
==================================================================
|
||||||
|
|
||||||
Start closing geometry.
|
Start closing geometry.
|
||||||
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||||
|
|
||||||
Total memory consumed for geometry optimisation: 32 kByte
|
Total memory consumed for geometry optimisation: 48 kByte
|
||||||
Total CPU time elapsed for geometry optimisation: 0 seconds
|
Total CPU time elapsed for geometry optimisation: 0 seconds
|
||||||
|
|
||||||
Voxelisation: top CPU users:
|
Voxelisation: top CPU users:
|
||||||
Percent Total CPU System CPU Memory Volume
|
Percent Total CPU System CPU Memory Volume
|
||||||
------- ---------- ---------- -------- ----------
|
------- ---------- ---------- -------- ----------
|
||||||
0.00 0.00 0.00 31k layer
|
0.00 0.00 0.00 46k layer
|
||||||
0.00 0.00 0.00 1k module
|
0.00 0.00 0.00 2k module
|
||||||
0.00 0.00 0.00 1k calorimeter
|
0.00 0.00 0.00 1k calorimeter
|
||||||
|
|
||||||
Voxelisation: top memory users:
|
Voxelisation: top memory users:
|
||||||
Percent Memory Heads Nodes Pointers Total CPU Volume
|
Percent Memory Heads Nodes Pointers Total CPU Volume
|
||||||
------- -------- ------ ------ -------- ---------- ----------
|
------- -------- ------ ------ -------- ---------- ----------
|
||||||
94.74 30k 1 490 980 0.00 layer
|
94.64 46k 1 490 980 0.00 layer
|
||||||
3.16 1k 1 17 20 0.00 module
|
3.26 1k 1 17 20 0.00 module
|
||||||
2.10 0k 1 10 18 0.00 calorimeter
|
2.10 1k 1 10 18 0.00 calorimeter
|
||||||
### Run 0 starts.
|
### Run 0 starts.
|
||||||
|
|
||||||
--------- Ranecu engine status ---------
|
--------- Ranecu engine status ---------
|
||||||
@@ -179,7 +179,7 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
|||||||
Run terminated.
|
Run terminated.
|
||||||
Run Summary
|
Run Summary
|
||||||
Number of events processed : 10000
|
Number of events processed : 10000
|
||||||
User=7.940000s Real=8.196714s Sys=0.020000s
|
User=9.110000s Real=9.179492s Sys=0.000000s
|
||||||
|
|
||||||
-------------------------------------------------------------
|
-------------------------------------------------------------
|
||||||
---> The calorimeter is 9 Modules
|
---> The calorimeter is 9 Modules
|
||||||
@@ -202,106 +202,106 @@ Run Summary
|
|||||||
|
|
||||||
total Energy (rms/mean) visible Energy (rms/mean)
|
total Energy (rms/mean) visible Energy (rms/mean)
|
||||||
|
|
||||||
layer 1: 1.5506 MeV +- 2.614 MeV (1.7e+02 %) 163.08 keV +- 753.9 keV (4.6e+02 %)
|
layer 1: 1.4872 MeV +- 2.143 MeV (1.4e+02 %) 164.1 keV +- 639.4 keV (3.9e+02 %)
|
||||||
layer 2: 1.5385 MeV +- 2.217 MeV (1.4e+02 %) 155.04 keV +- 500.3 keV (3.2e+02 %)
|
layer 2: 1.5541 MeV +- 2.889 MeV (1.9e+02 %) 150.27 keV +- 366.5 keV (2.4e+02 %)
|
||||||
layer 3: 1.488 MeV +- 1.934 MeV (1.3e+02 %) 154.61 keV +- 715.2 keV (4.6e+02 %)
|
layer 3: 1.5412 MeV +- 2.694 MeV (1.7e+02 %) 158.31 keV +- 633.2 keV (4e+02 %)
|
||||||
layer 4: 1.5191 MeV +- 2.154 MeV (1.4e+02 %) 154.56 keV +- 616.5 keV (4e+02 %)
|
layer 4: 1.5458 MeV +- 2.48 MeV (1.6e+02 %) 149.63 keV +- 355.5 keV (2.4e+02 %)
|
||||||
layer 5: 1.5336 MeV +- 2.506 MeV (1.6e+02 %) 156.04 keV +- 506.9 keV (3.2e+02 %)
|
layer 5: 1.5365 MeV +- 2.434 MeV (1.6e+02 %) 160.99 keV +- 709.3 keV (4.4e+02 %)
|
||||||
layer 6: 1.4942 MeV +- 1.849 MeV (1.2e+02 %) 148.98 keV +- 383.3 keV (2.6e+02 %)
|
layer 6: 1.5393 MeV +- 2.087 MeV (1.4e+02 %) 151.94 keV +- 642 keV (4.2e+02 %)
|
||||||
layer 7: 1.5536 MeV +- 2.632 MeV (1.7e+02 %) 167.22 keV +- 874 keV (5.2e+02 %)
|
layer 7: 1.5182 MeV +- 2.246 MeV (1.5e+02 %) 161.74 keV +- 699.7 keV (4.3e+02 %)
|
||||||
layer 8: 1.552 MeV +- 2.292 MeV (1.5e+02 %) 152.97 keV +- 447.8 keV (2.9e+02 %)
|
layer 8: 1.4907 MeV +- 1.963 MeV (1.3e+02 %) 154.44 keV +- 469.4 keV (3e+02 %)
|
||||||
layer 9: 1.5007 MeV +- 2.391 MeV (1.6e+02 %) 145.34 keV +- 236.8 keV (1.6e+02 %)
|
layer 9: 1.5176 MeV +- 2.537 MeV (1.7e+02 %) 170.42 keV +- 908.6 keV (5.3e+02 %)
|
||||||
layer 10: 1.5306 MeV +- 2.19 MeV (1.4e+02 %) 163.51 keV +- 768.1 keV (4.7e+02 %)
|
layer 10: 1.5237 MeV +- 2.276 MeV (1.5e+02 %) 151.8 keV +- 371.5 keV (2.4e+02 %)
|
||||||
layer 11: 1.5114 MeV +- 2.269 MeV (1.5e+02 %) 158.05 keV +- 928.2 keV (5.9e+02 %)
|
layer 11: 1.52 MeV +- 2.069 MeV (1.4e+02 %) 167.08 keV +- 919.6 keV (5.5e+02 %)
|
||||||
layer 12: 1.5684 MeV +- 2.741 MeV (1.7e+02 %) 167.5 keV +- 1.114 MeV (6.6e+02 %)
|
layer 12: 1.5011 MeV +- 2.05 MeV (1.4e+02 %) 158.59 keV +- 753.3 keV (4.8e+02 %)
|
||||||
layer 13: 1.5332 MeV +- 2.284 MeV (1.5e+02 %) 155.42 keV +- 659.7 keV (4.2e+02 %)
|
layer 13: 1.5003 MeV +- 1.939 MeV (1.3e+02 %) 155.25 keV +- 452.6 keV (2.9e+02 %)
|
||||||
layer 14: 1.542 MeV +- 2.187 MeV (1.4e+02 %) 149.53 keV +- 385.8 keV (2.6e+02 %)
|
layer 14: 1.5078 MeV +- 2.183 MeV (1.4e+02 %) 150.96 keV +- 475.4 keV (3.1e+02 %)
|
||||||
layer 15: 1.5523 MeV +- 2.688 MeV (1.7e+02 %) 152.7 keV +- 702.3 keV (4.6e+02 %)
|
layer 15: 1.5598 MeV +- 2.648 MeV (1.7e+02 %) 168.21 keV +- 906.1 keV (5.4e+02 %)
|
||||||
layer 16: 1.5513 MeV +- 2.087 MeV (1.3e+02 %) 166.82 keV +- 676.6 keV (4.1e+02 %)
|
layer 16: 1.5307 MeV +- 2.076 MeV (1.4e+02 %) 155.67 keV +- 538.4 keV (3.5e+02 %)
|
||||||
layer 17: 1.4781 MeV +- 1.755 MeV (1.2e+02 %) 149.58 keV +- 329.3 keV (2.2e+02 %)
|
layer 17: 1.5295 MeV +- 2.285 MeV (1.5e+02 %) 170.02 keV +- 1.016 MeV (6e+02 %)
|
||||||
layer 18: 1.5432 MeV +- 2.544 MeV (1.6e+02 %) 157.19 keV +- 552.9 keV (3.5e+02 %)
|
layer 18: 1.5121 MeV +- 2.045 MeV (1.4e+02 %) 152.57 keV +- 530.9 keV (3.5e+02 %)
|
||||||
layer 19: 1.5387 MeV +- 2.49 MeV (1.6e+02 %) 150.56 keV +- 385.5 keV (2.6e+02 %)
|
layer 19: 1.5292 MeV +- 2.265 MeV (1.5e+02 %) 168.86 keV +- 963.2 keV (5.7e+02 %)
|
||||||
layer 20: 1.5315 MeV +- 2.454 MeV (1.6e+02 %) 176.18 keV +- 1.207 MeV (6.9e+02 %)
|
layer 20: 1.545 MeV +- 2.443 MeV (1.6e+02 %) 162.01 keV +- 1.004 MeV (6.2e+02 %)
|
||||||
layer 21: 1.5272 MeV +- 2.18 MeV (1.4e+02 %) 161.94 keV +- 714.7 keV (4.4e+02 %)
|
layer 21: 1.5362 MeV +- 2.431 MeV (1.6e+02 %) 157.97 keV +- 772.8 keV (4.9e+02 %)
|
||||||
layer 22: 1.5475 MeV +- 2.395 MeV (1.5e+02 %) 151.16 keV +- 445.8 keV (2.9e+02 %)
|
layer 22: 1.5478 MeV +- 2.402 MeV (1.6e+02 %) 162.57 keV +- 586 keV (3.6e+02 %)
|
||||||
layer 23: 1.5661 MeV +- 2.791 MeV (1.8e+02 %) 180.13 keV +- 1.331 MeV (7.4e+02 %)
|
layer 23: 1.5645 MeV +- 2.577 MeV (1.6e+02 %) 152.66 keV +- 581.1 keV (3.8e+02 %)
|
||||||
layer 24: 1.5079 MeV +- 2.006 MeV (1.3e+02 %) 159.86 keV +- 1.091 MeV (6.8e+02 %)
|
layer 24: 1.4855 MeV +- 1.744 MeV (1.2e+02 %) 156.47 keV +- 438.2 keV (2.8e+02 %)
|
||||||
layer 25: 1.5327 MeV +- 2.401 MeV (1.6e+02 %) 167.61 keV +- 942.5 keV (5.6e+02 %)
|
layer 25: 1.5673 MeV +- 2.705 MeV (1.7e+02 %) 156.82 keV +- 688.8 keV (4.4e+02 %)
|
||||||
layer 26: 1.5464 MeV +- 2.41 MeV (1.6e+02 %) 171.76 keV +- 1.31 MeV (7.6e+02 %)
|
layer 26: 1.5368 MeV +- 2.567 MeV (1.7e+02 %) 153.15 keV +- 471 keV (3.1e+02 %)
|
||||||
layer 27: 1.5339 MeV +- 2.081 MeV (1.4e+02 %) 165.51 keV +- 567.1 keV (3.4e+02 %)
|
layer 27: 1.4974 MeV +- 2.065 MeV (1.4e+02 %) 156.48 keV +- 573.3 keV (3.7e+02 %)
|
||||||
layer 28: 1.5343 MeV +- 2.458 MeV (1.6e+02 %) 166.71 keV +- 1.213 MeV (7.3e+02 %)
|
layer 28: 1.501 MeV +- 1.995 MeV (1.3e+02 %) 159.86 keV +- 696.1 keV (4.4e+02 %)
|
||||||
layer 29: 1.5072 MeV +- 2.089 MeV (1.4e+02 %) 162.14 keV +- 983.9 keV (6.1e+02 %)
|
layer 29: 1.5483 MeV +- 2.513 MeV (1.6e+02 %) 152.71 keV +- 452.4 keV (3e+02 %)
|
||||||
layer 30: 1.5096 MeV +- 1.798 MeV (1.2e+02 %) 149.44 keV +- 677.5 keV (4.5e+02 %)
|
layer 30: 1.5254 MeV +- 2.407 MeV (1.6e+02 %) 155.3 keV +- 545.9 keV (3.5e+02 %)
|
||||||
layer 31: 1.5167 MeV +- 2.269 MeV (1.5e+02 %) 152.02 keV +- 540.2 keV (3.6e+02 %)
|
layer 31: 1.5378 MeV +- 2.45 MeV (1.6e+02 %) 158.11 keV +- 701.2 keV (4.4e+02 %)
|
||||||
layer 32: 1.5204 MeV +- 2.141 MeV (1.4e+02 %) 153.02 keV +- 494.1 keV (3.2e+02 %)
|
layer 32: 1.5284 MeV +- 2.381 MeV (1.6e+02 %) 163.91 keV +- 831.9 keV (5.1e+02 %)
|
||||||
layer 33: 1.564 MeV +- 2.738 MeV (1.8e+02 %) 167.6 keV +- 1.06 MeV (6.3e+02 %)
|
layer 33: 1.5312 MeV +- 2.344 MeV (1.5e+02 %) 167.41 keV +- 864.6 keV (5.2e+02 %)
|
||||||
layer 34: 1.5087 MeV +- 2.108 MeV (1.4e+02 %) 156.4 keV +- 713.6 keV (4.6e+02 %)
|
layer 34: 1.5015 MeV +- 1.987 MeV (1.3e+02 %) 150.08 keV +- 409 keV (2.7e+02 %)
|
||||||
layer 35: 1.5214 MeV +- 2.275 MeV (1.5e+02 %) 149.31 keV +- 315.1 keV (2.1e+02 %)
|
layer 35: 1.5334 MeV +- 2.508 MeV (1.6e+02 %) 162.58 keV +- 1.042 MeV (6.4e+02 %)
|
||||||
layer 36: 1.5427 MeV +- 2.479 MeV (1.6e+02 %) 166.44 keV +- 829.2 keV (5e+02 %)
|
layer 36: 1.5276 MeV +- 2.071 MeV (1.4e+02 %) 152.84 keV +- 490 keV (3.2e+02 %)
|
||||||
layer 37: 1.5449 MeV +- 2.326 MeV (1.5e+02 %) 163.88 keV +- 1.091 MeV (6.7e+02 %)
|
layer 37: 1.5336 MeV +- 2.564 MeV (1.7e+02 %) 164.5 keV +- 975.9 keV (5.9e+02 %)
|
||||||
layer 38: 1.5098 MeV +- 2.153 MeV (1.4e+02 %) 160.57 keV +- 915.8 keV (5.7e+02 %)
|
layer 38: 1.544 MeV +- 2.432 MeV (1.6e+02 %) 154.02 keV +- 564.4 keV (3.7e+02 %)
|
||||||
layer 39: 1.5208 MeV +- 2.309 MeV (1.5e+02 %) 148.83 keV +- 356.8 keV (2.4e+02 %)
|
layer 39: 1.4935 MeV +- 2.179 MeV (1.5e+02 %) 154.4 keV +- 544.9 keV (3.5e+02 %)
|
||||||
layer 40: 1.5017 MeV +- 1.894 MeV (1.3e+02 %) 154.16 keV +- 432.4 keV (2.8e+02 %)
|
layer 40: 1.5477 MeV +- 2.298 MeV (1.5e+02 %) 158.83 keV +- 662.7 keV (4.2e+02 %)
|
||||||
layer 41: 1.5414 MeV +- 2.182 MeV (1.4e+02 %) 155.22 keV +- 520.2 keV (3.4e+02 %)
|
layer 41: 1.5394 MeV +- 2.401 MeV (1.6e+02 %) 161.88 keV +- 1.048 MeV (6.5e+02 %)
|
||||||
layer 42: 1.4857 MeV +- 1.683 MeV (1.1e+02 %) 155.11 keV +- 485.1 keV (3.1e+02 %)
|
layer 42: 1.5529 MeV +- 2.737 MeV (1.8e+02 %) 163.13 keV +- 1.036 MeV (6.3e+02 %)
|
||||||
layer 43: 1.523 MeV +- 2.318 MeV (1.5e+02 %) 149.9 keV +- 335.4 keV (2.2e+02 %)
|
layer 43: 1.5387 MeV +- 2.333 MeV (1.5e+02 %) 167.46 keV +- 866 keV (5.2e+02 %)
|
||||||
layer 44: 1.4995 MeV +- 1.9 MeV (1.3e+02 %) 158.2 keV +- 806.2 keV (5.1e+02 %)
|
layer 44: 1.5434 MeV +- 2.679 MeV (1.7e+02 %) 157.85 keV +- 754.2 keV (4.8e+02 %)
|
||||||
layer 45: 1.5406 MeV +- 2.373 MeV (1.5e+02 %) 170.43 keV +- 854.8 keV (5e+02 %)
|
layer 45: 1.5176 MeV +- 2.435 MeV (1.6e+02 %) 158.74 keV +- 920.6 keV (5.8e+02 %)
|
||||||
layer 46: 1.512 MeV +- 2.207 MeV (1.5e+02 %) 156.29 keV +- 556.7 keV (3.6e+02 %)
|
layer 46: 1.5252 MeV +- 2.272 MeV (1.5e+02 %) 157.13 keV +- 559.9 keV (3.6e+02 %)
|
||||||
layer 47: 1.5076 MeV +- 2.146 MeV (1.4e+02 %) 152.68 keV +- 620.6 keV (4.1e+02 %)
|
layer 47: 1.4946 MeV +- 2.065 MeV (1.4e+02 %) 148.12 keV +- 296.9 keV (2e+02 %)
|
||||||
layer 48: 1.5163 MeV +- 2.173 MeV (1.4e+02 %) 167.18 keV +- 990.3 keV (5.9e+02 %)
|
layer 48: 1.532 MeV +- 2.23 MeV (1.5e+02 %) 168.64 keV +- 1.007 MeV (6e+02 %)
|
||||||
layer 49: 1.5037 MeV +- 2.055 MeV (1.4e+02 %) 151.25 keV +- 457.6 keV (3e+02 %)
|
layer 49: 1.515 MeV +- 2.018 MeV (1.3e+02 %) 148.49 keV +- 303.4 keV (2e+02 %)
|
||||||
layer 50: 1.5082 MeV +- 2.003 MeV (1.3e+02 %) 162.09 keV +- 730.7 keV (4.5e+02 %)
|
layer 50: 1.54 MeV +- 2.445 MeV (1.6e+02 %) 156.93 keV +- 686.5 keV (4.4e+02 %)
|
||||||
layer 51: 1.496 MeV +- 1.862 MeV (1.2e+02 %) 156.96 keV +- 527.4 keV (3.4e+02 %)
|
layer 51: 1.5566 MeV +- 2.522 MeV (1.6e+02 %) 176.16 keV +- 1.203 MeV (6.8e+02 %)
|
||||||
layer 52: 1.5218 MeV +- 2.244 MeV (1.5e+02 %) 157.59 keV +- 643.6 keV (4.1e+02 %)
|
layer 52: 1.5409 MeV +- 2.528 MeV (1.6e+02 %) 151.83 keV +- 408 keV (2.7e+02 %)
|
||||||
layer 53: 1.5178 MeV +- 2.279 MeV (1.5e+02 %) 154.46 keV +- 400.8 keV (2.6e+02 %)
|
layer 53: 1.5138 MeV +- 2.407 MeV (1.6e+02 %) 147.04 keV +- 365.3 keV (2.5e+02 %)
|
||||||
layer 54: 1.5472 MeV +- 2.32 MeV (1.5e+02 %) 168.14 keV +- 1.022 MeV (6.1e+02 %)
|
layer 54: 1.5019 MeV +- 1.93 MeV (1.3e+02 %) 165.82 keV +- 716.3 keV (4.3e+02 %)
|
||||||
layer 55: 1.5137 MeV +- 2.018 MeV (1.3e+02 %) 163.99 keV +- 964.5 keV (5.9e+02 %)
|
layer 55: 1.5096 MeV +- 1.915 MeV (1.3e+02 %) 153.31 keV +- 368.2 keV (2.4e+02 %)
|
||||||
layer 56: 1.4752 MeV +- 1.756 MeV (1.2e+02 %) 156.14 keV +- 427.5 keV (2.7e+02 %)
|
layer 56: 1.5345 MeV +- 2.301 MeV (1.5e+02 %) 150.21 keV +- 420.1 keV (2.8e+02 %)
|
||||||
layer 57: 1.5349 MeV +- 2.497 MeV (1.6e+02 %) 162.01 keV +- 889.9 keV (5.5e+02 %)
|
layer 57: 1.5089 MeV +- 2.147 MeV (1.4e+02 %) 154.62 keV +- 479.6 keV (3.1e+02 %)
|
||||||
layer 58: 1.5153 MeV +- 2.168 MeV (1.4e+02 %) 154.22 keV +- 765.8 keV (5e+02 %)
|
layer 58: 1.522 MeV +- 2.198 MeV (1.4e+02 %) 160.32 keV +- 533.9 keV (3.3e+02 %)
|
||||||
layer 59: 1.4901 MeV +- 1.997 MeV (1.3e+02 %) 162.14 keV +- 916.2 keV (5.7e+02 %)
|
layer 59: 1.5673 MeV +- 2.815 MeV (1.8e+02 %) 156.03 keV +- 555.4 keV (3.6e+02 %)
|
||||||
layer 60: 1.5236 MeV +- 2.314 MeV (1.5e+02 %) 158.74 keV +- 633.4 keV (4e+02 %)
|
layer 60: 1.5006 MeV +- 1.982 MeV (1.3e+02 %) 152.33 keV +- 468.5 keV (3.1e+02 %)
|
||||||
layer 61: 1.5109 MeV +- 1.855 MeV (1.2e+02 %) 162.29 keV +- 637 keV (3.9e+02 %)
|
layer 61: 1.5069 MeV +- 2.087 MeV (1.4e+02 %) 152.1 keV +- 337.2 keV (2.2e+02 %)
|
||||||
layer 62: 1.5314 MeV +- 2.616 MeV (1.7e+02 %) 166.16 keV +- 802.1 keV (4.8e+02 %)
|
layer 62: 1.5206 MeV +- 2.154 MeV (1.4e+02 %) 164.41 keV +- 603.9 keV (3.7e+02 %)
|
||||||
layer 63: 1.5516 MeV +- 2.562 MeV (1.7e+02 %) 149.72 keV +- 410.6 keV (2.7e+02 %)
|
layer 63: 1.4971 MeV +- 1.896 MeV (1.3e+02 %) 147.71 keV +- 286.3 keV (1.9e+02 %)
|
||||||
layer 64: 1.4892 MeV +- 1.796 MeV (1.2e+02 %) 148.45 keV +- 349.8 keV (2.4e+02 %)
|
layer 64: 1.5219 MeV +- 2.277 MeV (1.5e+02 %) 155.99 keV +- 821 keV (5.3e+02 %)
|
||||||
layer 65: 1.5008 MeV +- 2.104 MeV (1.4e+02 %) 162.64 keV +- 1.027 MeV (6.3e+02 %)
|
layer 65: 1.4807 MeV +- 1.729 MeV (1.2e+02 %) 161.69 keV +- 816 keV (5e+02 %)
|
||||||
layer 66: 1.5167 MeV +- 2.17 MeV (1.4e+02 %) 156.91 keV +- 908.3 keV (5.8e+02 %)
|
layer 66: 1.5051 MeV +- 2.064 MeV (1.4e+02 %) 157.17 keV +- 474.4 keV (3e+02 %)
|
||||||
layer 67: 1.4873 MeV +- 1.88 MeV (1.3e+02 %) 151.39 keV +- 553.7 keV (3.7e+02 %)
|
layer 67: 1.4871 MeV +- 1.939 MeV (1.3e+02 %) 148.1 keV +- 410.3 keV (2.8e+02 %)
|
||||||
layer 68: 1.5262 MeV +- 2.013 MeV (1.3e+02 %) 159.66 keV +- 724.3 keV (4.5e+02 %)
|
layer 68: 1.5027 MeV +- 2.004 MeV (1.3e+02 %) 159.72 keV +- 699.5 keV (4.4e+02 %)
|
||||||
layer 69: 1.5075 MeV +- 2.202 MeV (1.5e+02 %) 151.84 keV +- 399.2 keV (2.6e+02 %)
|
layer 69: 1.5158 MeV +- 2.251 MeV (1.5e+02 %) 180.81 keV +- 1.365 MeV (7.5e+02 %)
|
||||||
layer 70: 1.5439 MeV +- 2.385 MeV (1.5e+02 %) 180.5 keV +- 1.197 MeV (6.6e+02 %)
|
layer 70: 1.5214 MeV +- 2.097 MeV (1.4e+02 %) 154.02 keV +- 642.5 keV (4.2e+02 %)
|
||||||
layer 71: 1.5027 MeV +- 2.019 MeV (1.3e+02 %) 157.36 keV +- 581.9 keV (3.7e+02 %)
|
layer 71: 1.5557 MeV +- 2.333 MeV (1.5e+02 %) 155.61 keV +- 651.7 keV (4.2e+02 %)
|
||||||
layer 72: 1.5277 MeV +- 2.146 MeV (1.4e+02 %) 160.82 keV +- 685.6 keV (4.3e+02 %)
|
layer 72: 1.5031 MeV +- 2.045 MeV (1.4e+02 %) 153.78 keV +- 434.9 keV (2.8e+02 %)
|
||||||
layer 73: 1.5189 MeV +- 2.173 MeV (1.4e+02 %) 171.88 keV +- 996.7 keV (5.8e+02 %)
|
layer 73: 1.4794 MeV +- 1.8 MeV (1.2e+02 %) 152.07 keV +- 526.2 keV (3.5e+02 %)
|
||||||
layer 74: 1.5022 MeV +- 1.989 MeV (1.3e+02 %) 156.41 keV +- 594 keV (3.8e+02 %)
|
layer 74: 1.4901 MeV +- 1.992 MeV (1.3e+02 %) 149.66 keV +- 417 keV (2.8e+02 %)
|
||||||
layer 75: 1.5045 MeV +- 2.178 MeV (1.4e+02 %) 160.81 keV +- 571.7 keV (3.6e+02 %)
|
layer 75: 1.5185 MeV +- 2.385 MeV (1.6e+02 %) 168.6 keV +- 1.174 MeV (7e+02 %)
|
||||||
layer 76: 1.5321 MeV +- 2.328 MeV (1.5e+02 %) 156.79 keV +- 523.5 keV (3.3e+02 %)
|
layer 76: 1.5248 MeV +- 2.187 MeV (1.4e+02 %) 158.97 keV +- 677.2 keV (4.3e+02 %)
|
||||||
layer 77: 1.5407 MeV +- 2.419 MeV (1.6e+02 %) 155.22 keV +- 548.2 keV (3.5e+02 %)
|
layer 77: 1.5207 MeV +- 2.451 MeV (1.6e+02 %) 158.62 keV +- 630.2 keV (4e+02 %)
|
||||||
layer 78: 1.4794 MeV +- 1.927 MeV (1.3e+02 %) 155.96 keV +- 450.1 keV (2.9e+02 %)
|
layer 78: 1.507 MeV +- 2.073 MeV (1.4e+02 %) 158.08 keV +- 706 keV (4.5e+02 %)
|
||||||
layer 79: 1.5386 MeV +- 2.013 MeV (1.3e+02 %) 159.75 keV +- 760.5 keV (4.8e+02 %)
|
layer 79: 1.4996 MeV +- 2.206 MeV (1.5e+02 %) 161.06 keV +- 676.3 keV (4.2e+02 %)
|
||||||
layer 80: 1.4887 MeV +- 2.154 MeV (1.4e+02 %) 152.01 keV +- 450 keV (3e+02 %)
|
layer 80: 1.5326 MeV +- 2.317 MeV (1.5e+02 %) 153.65 keV +- 513.9 keV (3.3e+02 %)
|
||||||
layer 81: 1.4936 MeV +- 2.027 MeV (1.4e+02 %) 158.67 keV +- 645.7 keV (4.1e+02 %)
|
layer 81: 1.5218 MeV +- 2.195 MeV (1.4e+02 %) 155.83 keV +- 576.7 keV (3.7e+02 %)
|
||||||
layer 82: 1.5215 MeV +- 2.061 MeV (1.4e+02 %) 151.29 keV +- 414.4 keV (2.7e+02 %)
|
layer 82: 1.4969 MeV +- 1.912 MeV (1.3e+02 %) 148.89 keV +- 381.4 keV (2.6e+02 %)
|
||||||
layer 83: 1.4908 MeV +- 2.072 MeV (1.4e+02 %) 156.05 keV +- 529.9 keV (3.4e+02 %)
|
layer 83: 1.4897 MeV +- 1.922 MeV (1.3e+02 %) 151.74 keV +- 470.1 keV (3.1e+02 %)
|
||||||
layer 84: 1.5293 MeV +- 2.263 MeV (1.5e+02 %) 146.03 keV +- 311.6 keV (2.1e+02 %)
|
layer 84: 1.5145 MeV +- 1.848 MeV (1.2e+02 %) 170.18 keV +- 981.1 keV (5.8e+02 %)
|
||||||
layer 85: 1.5292 MeV +- 2.24 MeV (1.5e+02 %) 150.7 keV +- 397.5 keV (2.6e+02 %)
|
layer 85: 1.5219 MeV +- 2.211 MeV (1.5e+02 %) 149.4 keV +- 287.2 keV (1.9e+02 %)
|
||||||
layer 86: 1.4954 MeV +- 1.977 MeV (1.3e+02 %) 151.58 keV +- 535.6 keV (3.5e+02 %)
|
layer 86: 1.5198 MeV +- 2.403 MeV (1.6e+02 %) 164.25 keV +- 920.1 keV (5.6e+02 %)
|
||||||
layer 87: 1.5204 MeV +- 2.145 MeV (1.4e+02 %) 162.44 keV +- 860.3 keV (5.3e+02 %)
|
layer 87: 1.5623 MeV +- 2.444 MeV (1.6e+02 %) 163.11 keV +- 951.4 keV (5.8e+02 %)
|
||||||
layer 88: 1.5291 MeV +- 2.15 MeV (1.4e+02 %) 155.02 keV +- 514 keV (3.3e+02 %)
|
layer 88: 1.4918 MeV +- 2.046 MeV (1.4e+02 %) 154.03 keV +- 524.5 keV (3.4e+02 %)
|
||||||
layer 89: 1.5264 MeV +- 2.235 MeV (1.5e+02 %) 156.74 keV +- 736.3 keV (4.7e+02 %)
|
layer 89: 1.5022 MeV +- 2.007 MeV (1.3e+02 %) 169.08 keV +- 1.129 MeV (6.7e+02 %)
|
||||||
layer 90: 1.4995 MeV +- 2.017 MeV (1.3e+02 %) 157.06 keV +- 556.3 keV (3.5e+02 %)
|
layer 90: 1.4778 MeV +- 1.84 MeV (1.2e+02 %) 152.49 keV +- 461.6 keV (3e+02 %)
|
||||||
|
|
||||||
total calor : 149.39 MeV +- 21.51 MeV ( 14 %) 14.248 MeV +- 6.866 MeV ( 48 %)
|
total calor : 149.46 MeV +- 21.76 MeV ( 15 %) 14.22 MeV +- 6.577 MeV ( 46 %)
|
||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
|
|
||||||
Leakage : 850.61 MeV +- 21.51 MeV
|
Leakage : 850.54 MeV +- 21.76 MeV
|
||||||
Eleak/Ebeam =85.1 % ( forward =85.1 % backward = 0 % lateral = 0 %)
|
Eleak/Ebeam =85.1 % ( forward =85.1 % backward = 0 % lateral = 0 %)
|
||||||
|
|
||||||
--------- Ranecu engine status ---------
|
--------- Ranecu engine status ---------
|
||||||
Initial seed (index) = 0
|
Initial seed (index) = 0
|
||||||
Current couple of seeds = 529754949, 629829302
|
Current couple of seeds = 284607476, 169023242
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
G4 kernel has come to Quit state.
|
G4 kernel has come to Quit state.
|
||||||
UserDetectorConstruction deleted.
|
UserDetectorConstruction deleted.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
############################################
|
############################################
|
||||||
|
|
||||||
**************************************************************
|
**************************************************************
|
||||||
Geant4 version Name: geant4-10-06-patch-02 (29-May-2020)
|
Geant4 version Name: geant4-10-06-ref-06 (26-June-2020)
|
||||||
Copyright : Geant4 Collaboration
|
Copyright : Geant4 Collaboration
|
||||||
References : NIM A 506 (2003), 250-303
|
References : NIM A 506 (2003), 250-303
|
||||||
: IEEE-TNS 53 (2006), 270-278
|
: IEEE-TNS 53 (2006), 270-278
|
||||||
@@ -20,20 +20,20 @@ Visualization Manager initialising...
|
|||||||
Registering graphics systems...
|
Registering graphics systems...
|
||||||
|
|
||||||
You have successfully registered the following graphics systems.
|
You have successfully registered the following graphics systems.
|
||||||
Current available graphics systems are:
|
Registered graphics systems are:
|
||||||
ASCIITree (ATree)
|
ASCIITree (ATree)
|
||||||
DAWNFILE (DAWNFILE)
|
DAWNFILE (DAWNFILE)
|
||||||
G4HepRep (HepRepXML)
|
G4HepRep (HepRepXML)
|
||||||
G4HepRepFile (HepRepFile)
|
G4HepRepFile (HepRepFile)
|
||||||
RayTracer (RayTracer)
|
RayTracer (RayTracer)
|
||||||
VRML1FILE (VRML1FILE)
|
VRML1FILE (VRML1FILE)
|
||||||
VRML2FILE (VRML2FILE)
|
VRML2FILE (VRML2FILE)
|
||||||
gMocrenFile (gMocrenFile)
|
gMocrenFile (gMocrenFile)
|
||||||
OpenGLImmediateXm (OGLIXm, OGLI)
|
OpenGLImmediateXm (OGLIXm, OGLI)
|
||||||
OpenGLStoredXm (OGLSXm, OGL, OGLS)
|
OpenGLStoredXm (OGLSXm, OGL, OGLS)
|
||||||
OpenGLImmediateX (OGLIX, OGLIXm_FALLBACK)
|
OpenGLImmediateX (OGLIX, OGLIXm_FALLBACK)
|
||||||
OpenGLStoredX (OGLSX, OGLSXm_FALLBACK)
|
OpenGLStoredX (OGLSX, OGLSXm_FALLBACK)
|
||||||
RayTracerX (RayTracerX)
|
RayTracerX (RayTracerX)
|
||||||
|
|
||||||
Registering model factories...
|
Registering model factories...
|
||||||
|
|
||||||
@@ -46,6 +46,9 @@ Registered model factories:
|
|||||||
drawByParticleID
|
drawByParticleID
|
||||||
drawByEncounteredVolume
|
drawByEncounteredVolume
|
||||||
|
|
||||||
|
Registered models:
|
||||||
|
None
|
||||||
|
|
||||||
Registered filter factories:
|
Registered filter factories:
|
||||||
attributeFilter
|
attributeFilter
|
||||||
chargeFilter
|
chargeFilter
|
||||||
@@ -53,6 +56,9 @@ Registered filter factories:
|
|||||||
particleFilter
|
particleFilter
|
||||||
encounteredVolumeFilter
|
encounteredVolumeFilter
|
||||||
|
|
||||||
|
Registered filters:
|
||||||
|
None
|
||||||
|
|
||||||
You have successfully registered the following user vis actions.
|
You have successfully registered the following user vis actions.
|
||||||
Run Duration User Vis Actions: none
|
Run Duration User Vis Actions: none
|
||||||
End of Event User Vis Actions: none
|
End of Event User Vis Actions: none
|
||||||
@@ -248,7 +254,7 @@ compt: for gamma SubType=13 BuildTable=1
|
|||||||
conv: for gamma SubType=14 BuildTable=1
|
conv: for gamma SubType=14 BuildTable=1
|
||||||
Lambda table from 1.022 MeV to 100 TeV, 20 bins/decade, spline: 1
|
Lambda table from 1.022 MeV to 100 TeV, 20 bins/decade, spline: 1
|
||||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
BetheHeitler5D : Emin= 0 eV Emax= 100 TeV ModifiedTsai
|
Livermore5DConversion : Emin= 0 eV Emax= 100 TeV ModifiedTsai
|
||||||
|
|
||||||
Rayl: for gamma SubType=11 BuildTable=1
|
Rayl: for gamma SubType=11 BuildTable=1
|
||||||
Lambda table from 100 eV to 100 keV, 20 bins/decade, spline: 0
|
Lambda table from 100 eV to 100 keV, 20 bins/decade, spline: 0
|
||||||
@@ -337,7 +343,7 @@ msc: for proton SubType= 10
|
|||||||
hIoni: for proton SubType=2
|
hIoni: for proton SubType=2
|
||||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||||
StepFunction=(0.2, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
Bragg : Emin= 0 eV Emax= 2 MeV deltaVI
|
Bragg : Emin= 0 eV Emax= 2 MeV deltaVI
|
||||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV deltaVI
|
BetheBloch : Emin= 2 MeV Emax= 100 TeV deltaVI
|
||||||
@@ -362,6 +368,10 @@ CoulombScat: for proton, integral:1 SubType=1 BuildTable=1
|
|||||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||||
|
|
||||||
|
nuclearStopping: for proton SubType=8 BuildTable=0
|
||||||
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
|
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
|
||||||
|
|
||||||
msc: for GenericIon SubType= 10
|
msc: for GenericIon SubType= 10
|
||||||
RangeFactor= 0.2, stepLimType: 0, latDisp: 0
|
RangeFactor= 0.2, stepLimType: 0, latDisp: 0
|
||||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
@@ -370,7 +380,7 @@ msc: for GenericIon SubType= 10
|
|||||||
ionIoni: for GenericIon SubType=2
|
ionIoni: for GenericIon SubType=2
|
||||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||||
StepFunction=(0.1, 0.001 mm), integ: 1, fluct: 1, linLossLim= 0.02
|
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.02
|
||||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
ParamICRU73 : Emin= 0 eV Emax= 100 TeV deltaVI
|
ParamICRU73 : Emin= 0 eV Emax= 100 TeV deltaVI
|
||||||
|
|
||||||
@@ -400,7 +410,7 @@ msc: for alpha SubType= 10
|
|||||||
ionIoni: for alpha SubType=2
|
ionIoni: for alpha SubType=2
|
||||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||||
StepFunction=(0.2, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.02
|
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.02
|
||||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
BraggIon : Emin= 0 eV Emax=7.9452 MeV deltaVI
|
BraggIon : Emin= 0 eV Emax=7.9452 MeV deltaVI
|
||||||
BetheBloch : Emin=7.9452 MeV Emax= 100 TeV deltaVI
|
BetheBloch : Emin=7.9452 MeV Emax= 100 TeV deltaVI
|
||||||
@@ -417,7 +427,7 @@ msc: for anti_proton SubType= 10
|
|||||||
hIoni: for anti_proton SubType=2
|
hIoni: for anti_proton SubType=2
|
||||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||||
StepFunction=(0.2, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
ICRU73QO : Emin= 0 eV Emax= 2 MeV deltaVI
|
ICRU73QO : Emin= 0 eV Emax= 2 MeV deltaVI
|
||||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV deltaVI
|
BetheBloch : Emin= 2 MeV Emax= 100 TeV deltaVI
|
||||||
@@ -450,7 +460,7 @@ msc: for kaon+ SubType= 10
|
|||||||
hIoni: for kaon+ SubType=2
|
hIoni: for kaon+ SubType=2
|
||||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||||
StepFunction=(0.2, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
Bragg : Emin= 0 eV Emax=1.05231 MeV deltaVI
|
Bragg : Emin= 0 eV Emax=1.05231 MeV deltaVI
|
||||||
BetheBloch : Emin=1.05231 MeV Emax= 100 TeV deltaVI
|
BetheBloch : Emin=1.05231 MeV Emax= 100 TeV deltaVI
|
||||||
@@ -483,7 +493,7 @@ msc: for kaon- SubType= 10
|
|||||||
hIoni: for kaon- SubType=2
|
hIoni: for kaon- SubType=2
|
||||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||||
StepFunction=(0.2, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
ICRU73QO : Emin= 0 eV Emax=1.05231 MeV deltaVI
|
ICRU73QO : Emin= 0 eV Emax=1.05231 MeV deltaVI
|
||||||
BetheBloch : Emin=1.05231 MeV Emax= 100 TeV deltaVI
|
BetheBloch : Emin=1.05231 MeV Emax= 100 TeV deltaVI
|
||||||
@@ -516,7 +526,7 @@ msc: for mu+ SubType= 10
|
|||||||
muIoni: for mu+ SubType=2
|
muIoni: for mu+ SubType=2
|
||||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||||
StepFunction=(0.2, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
Bragg : Emin= 0 eV Emax= 200 keV deltaVI
|
Bragg : Emin= 0 eV Emax= 200 keV deltaVI
|
||||||
BetheBloch : Emin= 200 keV Emax= 1 GeV deltaVI
|
BetheBloch : Emin= 200 keV Emax= 1 GeV deltaVI
|
||||||
@@ -550,7 +560,7 @@ msc: for mu- SubType= 10
|
|||||||
muIoni: for mu- SubType=2
|
muIoni: for mu- SubType=2
|
||||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||||
StepFunction=(0.2, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
ICRU73QO : Emin= 0 eV Emax= 200 keV deltaVI
|
ICRU73QO : Emin= 0 eV Emax= 200 keV deltaVI
|
||||||
BetheBloch : Emin= 200 keV Emax= 1 GeV deltaVI
|
BetheBloch : Emin= 200 keV Emax= 1 GeV deltaVI
|
||||||
@@ -584,7 +594,7 @@ msc: for pi+ SubType= 10
|
|||||||
hIoni: for pi+ SubType=2
|
hIoni: for pi+ SubType=2
|
||||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||||
StepFunction=(0.2, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
Bragg : Emin= 0 eV Emax=297.505 keV deltaVI
|
Bragg : Emin= 0 eV Emax=297.505 keV deltaVI
|
||||||
BetheBloch : Emin=297.505 keV Emax= 100 TeV deltaVI
|
BetheBloch : Emin=297.505 keV Emax= 100 TeV deltaVI
|
||||||
@@ -617,7 +627,7 @@ msc: for pi- SubType= 10
|
|||||||
hIoni: for pi- SubType=2
|
hIoni: for pi- SubType=2
|
||||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||||
StepFunction=(0.2, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
ICRU73QO : Emin= 0 eV Emax=297.505 keV deltaVI
|
ICRU73QO : Emin= 0 eV Emax=297.505 keV deltaVI
|
||||||
BetheBloch : Emin=297.505 keV Emax= 100 TeV deltaVI
|
BetheBloch : Emin=297.505 keV Emax= 100 TeV deltaVI
|
||||||
@@ -642,7 +652,7 @@ CoulombScat: for pi-, integral:1 SubType=1 BuildTable=1
|
|||||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||||
|
|
||||||
========= Table of registered couples ==============================
|
========= Table of registered couples ============================
|
||||||
|
|
||||||
Index : 0 used in the geometry : Yes
|
Index : 0 used in the geometry : Yes
|
||||||
Material : Air
|
Material : Air
|
||||||
@@ -654,25 +664,25 @@ Index : 0 used in the geometry : Yes
|
|||||||
Index : 1 used in the geometry : Yes
|
Index : 1 used in the geometry : Yes
|
||||||
Material : Water
|
Material : Water
|
||||||
Range cuts : gamma 50 um e- 50 um e+ 50 um proton 50 um
|
Range cuts : gamma 50 um e- 50 um e+ 50 um proton 50 um
|
||||||
Energy thresholds : gamma 250 eV e- 57.2461 keV e+ 56.4171 keV proton 5 keV
|
Energy thresholds : gamma 250 eV e- 57.0453 keV e+ 56.6322 keV proton 5 keV
|
||||||
Region(s) which use this couple :
|
Region(s) which use this couple :
|
||||||
DefaultRegionForTheWorld
|
DefaultRegionForTheWorld
|
||||||
|
|
||||||
Index : 2 used in the geometry : Yes
|
Index : 2 used in the geometry : Yes
|
||||||
Material : Stainless steel 304
|
Material : Stainless steel 304
|
||||||
Range cuts : gamma 50 um e- 50 um e+ 50 um proton 50 um
|
Range cuts : gamma 50 um e- 50 um e+ 50 um proton 50 um
|
||||||
Energy thresholds : gamma 4.39316 keV e- 154.358 keV e+ 151.017 keV proton 5 keV
|
Energy thresholds : gamma 4.38327 keV e- 154.429 keV e+ 151.098 keV proton 5 keV
|
||||||
Region(s) which use this couple :
|
Region(s) which use this couple :
|
||||||
DefaultRegionForTheWorld
|
DefaultRegionForTheWorld
|
||||||
|
|
||||||
Index : 3 used in the geometry : Yes
|
Index : 3 used in the geometry : Yes
|
||||||
Material : Iridium
|
Material : Iridium
|
||||||
Range cuts : gamma 50 um e- 50 um e+ 50 um proton 50 um
|
Range cuts : gamma 50 um e- 50 um e+ 50 um proton 50 um
|
||||||
Energy thresholds : gamma 26.8116 keV e- 240.851 keV e+ 233.926 keV proton 5 keV
|
Energy thresholds : gamma 26.591 keV e- 242.361 keV e+ 233.711 keV proton 5 keV
|
||||||
Region(s) which use this couple :
|
Region(s) which use this couple :
|
||||||
DefaultRegionForTheWorld
|
DefaultRegionForTheWorld
|
||||||
|
|
||||||
====================================================================
|
==================================================================
|
||||||
|
|
||||||
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
|
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
|
||||||
See commands in /vis/modeling/trajectories/ for other options.
|
See commands in /vis/modeling/trajectories/ for other options.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
############################################
|
############################################
|
||||||
|
|
||||||
**************************************************************
|
**************************************************************
|
||||||
Geant4 version Name: geant4-10-06-patch-02 (29-May-2020)
|
Geant4 version Name: geant4-10-06-ref-06 (26-June-2020)
|
||||||
Copyright : Geant4 Collaboration
|
Copyright : Geant4 Collaboration
|
||||||
References : NIM A 506 (2003), 250-303
|
References : NIM A 506 (2003), 250-303
|
||||||
: IEEE-TNS 53 (2006), 270-278
|
: IEEE-TNS 53 (2006), 270-278
|
||||||
@@ -49,6 +49,7 @@ userDetector->Construct() start.
|
|||||||
* Magnetic Field is off *
|
* Magnetic Field is off *
|
||||||
* *
|
* *
|
||||||
***************************
|
***************************
|
||||||
|
G4ChordFinder: Creating G4MagInt_Driver with stepMinimum = 0.1 numVar= 6
|
||||||
==> Opening file testbeamhcal96.conf...
|
==> Opening file testbeamhcal96.conf...
|
||||||
<== Closed file testbeamhcal96.conf
|
<== Closed file testbeamhcal96.conf
|
||||||
==> Opening file g4testbeamhcal96.conf...
|
==> Opening file g4testbeamhcal96.conf...
|
||||||
@@ -487,31 +488,31 @@ CoulombScat: for pi-, integral:1 SubType=1 BuildTable=1
|
|||||||
Process: ionInelastic
|
Process: ionInelastic
|
||||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 100 TeV
|
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
Hadronic Processes for He3
|
Hadronic Processes for He3
|
||||||
|
|
||||||
Process: hadElastic
|
Process: hadElastic
|
||||||
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
||||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 100 TeV
|
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: He3Inelastic
|
Process: He3Inelastic
|
||||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 100 TeV
|
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
Hadronic Processes for alpha
|
Hadronic Processes for alpha
|
||||||
|
|
||||||
Process: hadElastic
|
Process: hadElastic
|
||||||
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
||||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 100 TeV
|
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: alphaInelastic
|
Process: alphaInelastic
|
||||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 100 TeV
|
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
Hadronic Processes for anti_He3
|
Hadronic Processes for anti_He3
|
||||||
@@ -519,11 +520,11 @@ CoulombScat: for pi-, integral:1 SubType=1 BuildTable=1
|
|||||||
Process: hadElastic
|
Process: hadElastic
|
||||||
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
||||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||||
Cr_sctns: AntiAGlauber: 0 eV ---> 100 TeV
|
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: anti_He3Inelastic
|
Process: anti_He3Inelastic
|
||||||
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
||||||
Cr_sctns: AntiAGlauber: 0 eV ---> 100 TeV
|
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: hFritiofCaptureAtRest
|
Process: hFritiofCaptureAtRest
|
||||||
|
|
||||||
@@ -533,11 +534,11 @@ CoulombScat: for pi-, integral:1 SubType=1 BuildTable=1
|
|||||||
Process: hadElastic
|
Process: hadElastic
|
||||||
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
||||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||||
Cr_sctns: AntiAGlauber: 0 eV ---> 100 TeV
|
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: anti_alphaInelastic
|
Process: anti_alphaInelastic
|
||||||
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
||||||
Cr_sctns: AntiAGlauber: 0 eV ---> 100 TeV
|
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: hFritiofCaptureAtRest
|
Process: hFritiofCaptureAtRest
|
||||||
|
|
||||||
@@ -547,11 +548,11 @@ CoulombScat: for pi-, integral:1 SubType=1 BuildTable=1
|
|||||||
Process: hadElastic
|
Process: hadElastic
|
||||||
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
||||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||||
Cr_sctns: AntiAGlauber: 0 eV ---> 100 TeV
|
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: anti_deuteronInelastic
|
Process: anti_deuteronInelastic
|
||||||
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
||||||
Cr_sctns: AntiAGlauber: 0 eV ---> 100 TeV
|
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: hFritiofCaptureAtRest
|
Process: hFritiofCaptureAtRest
|
||||||
|
|
||||||
@@ -561,11 +562,11 @@ CoulombScat: for pi-, integral:1 SubType=1 BuildTable=1
|
|||||||
Process: hadElastic
|
Process: hadElastic
|
||||||
Model: hElasticLHEP: 0 eV ---> 100.1 MeV
|
Model: hElasticLHEP: 0 eV ---> 100.1 MeV
|
||||||
Model: AntiAElastic: 100 MeV ---> 100 TeV
|
Model: AntiAElastic: 100 MeV ---> 100 TeV
|
||||||
Cr_sctns: AntiAGlauber: 0 eV ---> 100 TeV
|
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: anti_neutronInelastic
|
Process: anti_neutronInelastic
|
||||||
Model: FTFP: 0 eV ---> 100 TeV
|
Model: FTFP: 0 eV ---> 100 TeV
|
||||||
Cr_sctns: AntiAGlauber: 0 eV ---> 100 TeV
|
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: hFritiofCaptureAtRest
|
Process: hFritiofCaptureAtRest
|
||||||
|
|
||||||
@@ -575,11 +576,11 @@ CoulombScat: for pi-, integral:1 SubType=1 BuildTable=1
|
|||||||
Process: hadElastic
|
Process: hadElastic
|
||||||
Model: hElasticLHEP: 0 eV ---> 100.1 MeV
|
Model: hElasticLHEP: 0 eV ---> 100.1 MeV
|
||||||
Model: AntiAElastic: 100 MeV ---> 100 TeV
|
Model: AntiAElastic: 100 MeV ---> 100 TeV
|
||||||
Cr_sctns: AntiAGlauber: 0 eV ---> 100 TeV
|
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: anti_protonInelastic
|
Process: anti_protonInelastic
|
||||||
Model: FTFP: 0 eV ---> 100 TeV
|
Model: FTFP: 0 eV ---> 100 TeV
|
||||||
Cr_sctns: AntiAGlauber: 0 eV ---> 100 TeV
|
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: hFritiofCaptureAtRest
|
Process: hFritiofCaptureAtRest
|
||||||
|
|
||||||
@@ -589,11 +590,11 @@ CoulombScat: for pi-, integral:1 SubType=1 BuildTable=1
|
|||||||
Process: hadElastic
|
Process: hadElastic
|
||||||
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
||||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||||
Cr_sctns: AntiAGlauber: 0 eV ---> 100 TeV
|
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: anti_tritonInelastic
|
Process: anti_tritonInelastic
|
||||||
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
||||||
Cr_sctns: AntiAGlauber: 0 eV ---> 100 TeV
|
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: hFritiofCaptureAtRest
|
Process: hFritiofCaptureAtRest
|
||||||
|
|
||||||
@@ -602,12 +603,12 @@ CoulombScat: for pi-, integral:1 SubType=1 BuildTable=1
|
|||||||
|
|
||||||
Process: hadElastic
|
Process: hadElastic
|
||||||
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
||||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 100 TeV
|
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: dInelastic
|
Process: dInelastic
|
||||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 100 TeV
|
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
Hadronic Processes for e+
|
Hadronic Processes for e+
|
||||||
@@ -627,7 +628,8 @@ CoulombScat: for pi-, integral:1 SubType=1 BuildTable=1
|
|||||||
Hadronic Processes for gamma
|
Hadronic Processes for gamma
|
||||||
|
|
||||||
Process: photonNuclear
|
Process: photonNuclear
|
||||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
Model: GammaNPreco: 0 eV ---> 200 MeV
|
||||||
|
Model: BertiniCascade: 199 MeV ---> 6 GeV
|
||||||
Model: TheoFSGenerator: 3 GeV ---> 100 TeV
|
Model: TheoFSGenerator: 3 GeV ---> 100 TeV
|
||||||
Cr_sctns: PhotoNuclearXS: 0 eV ---> 100 TeV
|
Cr_sctns: PhotoNuclearXS: 0 eV ---> 100 TeV
|
||||||
|
|
||||||
@@ -723,17 +725,31 @@ CoulombScat: for pi-, integral:1 SubType=1 BuildTable=1
|
|||||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||||
Cr_sctns: BarashenkovGlauberGribov: 0 eV ---> 100 TeV
|
Cr_sctns: BarashenkovGlauberGribov: 0 eV ---> 100 TeV
|
||||||
|
|
||||||
|
---------------------------------------------------
|
||||||
|
Hadronic Processes for sigma-
|
||||||
|
|
||||||
|
Process: hadElastic
|
||||||
|
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||||
|
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||||
|
|
||||||
|
Process: sigma-Inelastic
|
||||||
|
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||||
|
Model: FTFP: 3 GeV ---> 100 TeV
|
||||||
|
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||||
|
|
||||||
|
Process: hBertiniCaptureAtRest
|
||||||
|
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
Hadronic Processes for triton
|
Hadronic Processes for triton
|
||||||
|
|
||||||
Process: hadElastic
|
Process: hadElastic
|
||||||
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
||||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 100 TeV
|
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
Process: tInelastic
|
Process: tInelastic
|
||||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 100 TeV
|
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||||
|
|
||||||
================================================================
|
================================================================
|
||||||
=======================================================================
|
=======================================================================
|
||||||
@@ -753,6 +769,7 @@ Level density (1/MeV) 0.075
|
|||||||
Use simple level density model 1
|
Use simple level density model 1
|
||||||
Use discrete excitation energy of the residual 0
|
Use discrete excitation energy of the residual 0
|
||||||
Time limit for long lived isomeres (ns) 1000
|
Time limit for long lived isomeres (ns) 1000
|
||||||
|
Isomer production flag 1
|
||||||
Internal e- conversion flag 1
|
Internal e- conversion flag 1
|
||||||
Store e- internal conversion data 0
|
Store e- internal conversion data 0
|
||||||
Electron internal conversion ID 2
|
Electron internal conversion ID 2
|
||||||
@@ -774,7 +791,7 @@ Region <DefaultRegionForParallelWorld> -- -- is not associated to any world.
|
|||||||
Materials :
|
Materials :
|
||||||
Production cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
|
Production cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
|
||||||
|
|
||||||
========= Table of registered couples ==============================
|
========= Table of registered couples ============================
|
||||||
|
|
||||||
Index : 0 used in the geometry : Yes
|
Index : 0 used in the geometry : Yes
|
||||||
Material : Air
|
Material : Air
|
||||||
@@ -786,44 +803,44 @@ Index : 0 used in the geometry : Yes
|
|||||||
Index : 1 used in the geometry : Yes
|
Index : 1 used in the geometry : Yes
|
||||||
Material : Aluminium
|
Material : Aluminium
|
||||||
Range cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
|
Range cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
|
||||||
Energy thresholds : gamma 5.87535 keV e- 460.395 keV e+ 442.201 keV proton 70 keV
|
Energy thresholds : gamma 5.84069 keV e- 457.179 keV e+ 442.122 keV proton 70 keV
|
||||||
Region(s) which use this couple :
|
Region(s) which use this couple :
|
||||||
DefaultRegionForTheWorld
|
DefaultRegionForTheWorld
|
||||||
|
|
||||||
Index : 2 used in the geometry : Yes
|
Index : 2 used in the geometry : Yes
|
||||||
Material : Polystyrene
|
Material : Polystyrene
|
||||||
Range cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
|
Range cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
|
||||||
Energy thresholds : gamma 2.09434 keV e- 281.891 keV e+ 276.265 keV proton 70 keV
|
Energy thresholds : gamma 2.10317 keV e- 282.263 keV e+ 272.967 keV proton 70 keV
|
||||||
Region(s) which use this couple :
|
Region(s) which use this couple :
|
||||||
DefaultRegionForTheWorld
|
DefaultRegionForTheWorld
|
||||||
|
|
||||||
Index : 3 used in the geometry : Yes
|
Index : 3 used in the geometry : Yes
|
||||||
Material : Scintillator
|
Material : Scintillator
|
||||||
Range cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
|
Range cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
|
||||||
Energy thresholds : gamma 2.09434 keV e- 281.891 keV e+ 276.265 keV proton 70 keV
|
Energy thresholds : gamma 2.10317 keV e- 282.263 keV e+ 272.967 keV proton 70 keV
|
||||||
Region(s) which use this couple :
|
Region(s) which use this couple :
|
||||||
DefaultRegionForTheWorld
|
DefaultRegionForTheWorld
|
||||||
|
|
||||||
Index : 4 used in the geometry : Yes
|
Index : 4 used in the geometry : Yes
|
||||||
Material : Copper
|
Material : Copper
|
||||||
Range cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
|
Range cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
|
||||||
Energy thresholds : gamma 20.6438 keV e- 1.03121 MeV e+ 977.24 keV proton 70 keV
|
Energy thresholds : gamma 20.4366 keV e- 1.03504 MeV e+ 981.043 keV proton 70 keV
|
||||||
Region(s) which use this couple :
|
Region(s) which use this couple :
|
||||||
DefaultRegionForTheWorld
|
DefaultRegionForTheWorld
|
||||||
|
|
||||||
Index : 5 used in the geometry : Yes
|
Index : 5 used in the geometry : Yes
|
||||||
Material : E_PbWO4
|
Material : E_PbWO4
|
||||||
Range cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
|
Range cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
|
||||||
Energy thresholds : gamma 76.0286 keV e- 842.936 keV e+ 798.816 keV proton 70 keV
|
Energy thresholds : gamma 75.4435 keV e- 835.367 keV e+ 791.784 keV proton 70 keV
|
||||||
Region(s) which use this couple :
|
Region(s) which use this couple :
|
||||||
DefaultRegionForTheWorld
|
DefaultRegionForTheWorld
|
||||||
|
|
||||||
====================================================================
|
==================================================================
|
||||||
|
|
||||||
Start closing geometry.
|
Start closing geometry.
|
||||||
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||||
|
|
||||||
Total memory consumed for geometry optimisation: 15 kByte
|
Total memory consumed for geometry optimisation: 23 kByte
|
||||||
Total CPU time elapsed for geometry optimisation: 0 seconds
|
Total CPU time elapsed for geometry optimisation: 0 seconds
|
||||||
|
|
||||||
Voxelisation: top CPU users:
|
Voxelisation: top CPU users:
|
||||||
@@ -831,16 +848,16 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
|||||||
------- ---------- ---------- -------- ----------
|
------- ---------- ---------- -------- ----------
|
||||||
0.00 0.00 0.00 0k HcalTB96
|
0.00 0.00 0.00 0k HcalTB96
|
||||||
0.00 0.00 0.00 0k HadronCalorimeter
|
0.00 0.00 0.00 0k HadronCalorimeter
|
||||||
0.00 0.00 0.00 3k HadronCalorimeterBox0 0.00 0.00 0.00 2k HadronCalorimeterBox1 0.00 0.00 0.00 1k HadronCalorimeterScntLayer2 0.00 0.00 0.00 0k HadronCalorimeterScntLayer1 0.00 0.00 0.00 0k HadronCalorimeterScntLayer0 0.00 0.00 0.00 8k CrystalMatrix
|
0.00 0.00 0.00 5k HadronCalorimeterBox0 0.00 0.00 0.00 3k HadronCalorimeterBox1 0.00 0.00 0.00 1k HadronCalorimeterScntLayer2 0.00 0.00 0.00 0k HadronCalorimeterScntLayer1 0.00 0.00 0.00 0k HadronCalorimeterScntLayer0 0.00 0.00 0.00 12k CrystalMatrix
|
||||||
0.00 0.00 0.00 1k CrystalMatrixLayer
|
0.00 0.00 0.00 1k CrystalMatrixLayer
|
||||||
|
|
||||||
Voxelisation: top memory users:
|
Voxelisation: top memory users:
|
||||||
Percent Memory Heads Nodes Pointers Total CPU Volume
|
Percent Memory Heads Nodes Pointers Total CPU Volume
|
||||||
------- -------- ------ ------ -------- ---------- ----------
|
------- -------- ------ ------ -------- ---------- ----------
|
||||||
49.44 7k 12 112 196 0.00 CrystalMatrix
|
49.56 11k 12 112 196 0.00 CrystalMatrix
|
||||||
20.31 3k 6 44 83 0.00 HadronCalorimeterBox0 14.44 2k 5 30 60 0.00 HadronCalorimeterBox1 4.81 0k 1 12 14 0.00 CrystalMatrixLayer
|
20.24 4k 6 44 83 0.00 HadronCalorimeterBox0 14.31 3k 5 30 60 0.00 HadronCalorimeterBox1 4.95 1k 1 12 14 0.00 CrystalMatrixLayer
|
||||||
3.70 0k 2 7 13 0.00 HadronCalorimeterScntLayer2 2.08 0k 1 4 8 0.00 HadronCalorimeter
|
3.67 0k 2 7 13 0.00 HadronCalorimeterScntLayer2 2.05 0k 1 4 8 0.00 HadronCalorimeter
|
||||||
1.98 0k 1 4 6 0.00 HadronCalorimeterScntLayer0 1.67 0k 1 3 6 0.00 HadronCalorimeterScntLayer1 1.57 0k 1 3 4 0.00 HcalTB96
|
1.99 0k 1 4 6 0.00 HadronCalorimeterScntLayer0 1.65 0k 1 3 6 0.00 HadronCalorimeterScntLayer1 1.58 0k 1 3 4 0.00 HcalTB96
|
||||||
### Run 0 starts.
|
### Run 0 starts.
|
||||||
### Run 0 start.
|
### Run 0 start.
|
||||||
... open Root analysis file : ccal.root - done
|
... open Root analysis file : ccal.root - done
|
||||||
@@ -902,7 +919,7 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
|||||||
Run terminated.
|
Run terminated.
|
||||||
Run Summary
|
Run Summary
|
||||||
Number of events processed : 20
|
Number of events processed : 20
|
||||||
User=19.460000s Real=19.994019s Sys=0.030000s
|
User=37.400000s Real=38.427305s Sys=0.060000s
|
||||||
### Run 0 end.
|
### Run 0 end.
|
||||||
... write Root file : ccal.root - done
|
... write Root file : ccal.root - done
|
||||||
... close Root file : ccal.root - done
|
... close Root file : ccal.root - done
|
||||||
@@ -918,23 +935,23 @@ G4SDManager deleted.
|
|||||||
EventManager deleted.
|
EventManager deleted.
|
||||||
Units table cleared.
|
Units table cleared.
|
||||||
TransportationManager deleted.
|
TransportationManager deleted.
|
||||||
Total navigation history collections cleaned: 46
|
Total navigation history collections cleaned: 45
|
||||||
================== Deleting memory pools ===================
|
================== Deleting memory pools ===================
|
||||||
Pool ID '20G4NavigationLevelRep', size : 0.0692 MB
|
Pool ID '20G4NavigationLevelRep', size : 0.0663 MB
|
||||||
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
|
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
|
||||||
Pool ID '7G4Event', size : 0.000961 MB
|
Pool ID '7G4Event', size : 0.000961 MB
|
||||||
Pool ID '15G4PrimaryVertex', size : 0.000961 MB
|
Pool ID '15G4PrimaryVertex', size : 0.000961 MB
|
||||||
Pool ID '17G4PrimaryParticle', size : 0.000961 MB
|
Pool ID '17G4PrimaryParticle', size : 0.000961 MB
|
||||||
Pool ID '15G4HCofThisEvent', size : 0.000961 MB
|
Pool ID '15G4HCofThisEvent', size : 0.000961 MB
|
||||||
Pool ID '16G4HitsCollection', size : 0.000961 MB
|
Pool ID '16G4HitsCollection', size : 0.000961 MB
|
||||||
Pool ID '17G4DynamicParticle', size : 0.074 MB
|
Pool ID '17G4DynamicParticle', size : 0.0538 MB
|
||||||
Pool ID '7G4Track', size : 0.148 MB
|
Pool ID '7G4Track', size : 0.107 MB
|
||||||
Pool ID '18G4TouchableHistory', size : 0.00577 MB
|
Pool ID '18G4TouchableHistory', size : 0.00577 MB
|
||||||
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
|
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
|
||||||
Pool ID '17G4ReactionProduct', size : 0.0115 MB
|
Pool ID '17G4ReactionProduct', size : 0.0135 MB
|
||||||
Pool ID '10G4Fragment', size : 0.00481 MB
|
Pool ID '10G4Fragment', size : 0.00577 MB
|
||||||
Number of memory pools allocated: 13 of which, static: 0
|
Number of memory pools allocated: 13 of which, static: 0
|
||||||
Dynamic pools deleted: 13 / Total memory freed: 0.32 MB
|
Dynamic pools deleted: 13 / Total memory freed: 0.26 MB
|
||||||
============================================================
|
============================================================
|
||||||
G4Allocator objects are deleted.
|
G4Allocator objects are deleted.
|
||||||
UImanager deleted.
|
UImanager deleted.
|
||||||
|
|||||||
@@ -1,20 +1,48 @@
|
|||||||
0.0265972
|
0.00054719
|
||||||
0.00360051
|
0.0924383
|
||||||
0.0227311
|
0.00540259
|
||||||
0.0560521
|
0.0315181
|
||||||
0.00883665
|
0.0554709
|
||||||
0.0317986
|
0.0461491
|
||||||
0.0413313
|
0.0352437
|
||||||
0.00438108
|
0.0616463
|
||||||
0.0243675
|
0.0503998
|
||||||
0.0916592
|
0.0883035
|
||||||
0.0797286
|
0.0541096
|
||||||
0.0871934
|
0.0536329
|
||||||
0.060909
|
0.165736
|
||||||
0.0511198
|
0.107001
|
||||||
0.00211314
|
0.0137942
|
||||||
0.116186
|
0.0798746
|
||||||
0.00328373
|
0.0439708
|
||||||
0.0933519
|
0.125459
|
||||||
0.0598592
|
0.108318
|
||||||
0.0901611
|
0.0717532
|
||||||
|
0.0742445
|
||||||
|
0.0814435
|
||||||
|
0.0701605
|
||||||
|
0.067555
|
||||||
|
0.101544
|
||||||
|
0.101215
|
||||||
|
0.0381575
|
||||||
|
0.16108
|
||||||
|
0.0780461
|
||||||
|
0.0769414
|
||||||
|
0.00932004
|
||||||
|
0.0648569
|
||||||
|
0.0886702
|
||||||
|
0.0371789
|
||||||
|
0.0620033
|
||||||
|
0.103169
|
||||||
|
0.0760348
|
||||||
|
0.00552121
|
||||||
|
0.103203
|
||||||
|
0.0183137
|
||||||
|
0.000799868
|
||||||
|
0.0318793
|
||||||
|
0.0142828
|
||||||
|
0.00236582
|
||||||
|
0.0926735
|
||||||
|
0.0681714
|
||||||
|
0.0395034
|
||||||
|
0.0578033
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
############################################
|
############################################
|
||||||
|
|
||||||
**************************************************************
|
**************************************************************
|
||||||
Geant4 version Name: geant4-10-06-patch-02 (29-May-2020)
|
Geant4 version Name: geant4-10-06-ref-06 (26-June-2020)
|
||||||
Copyright : Geant4 Collaboration
|
Copyright : Geant4 Collaboration
|
||||||
References : NIM A 506 (2003), 250-303
|
References : NIM A 506 (2003), 250-303
|
||||||
: IEEE-TNS 53 (2006), 270-278
|
: IEEE-TNS 53 (2006), 270-278
|
||||||
@@ -154,7 +154,7 @@ hIoni: for anti_proton SubType=2
|
|||||||
ICRU73QO : Emin= 0 eV Emax= 2 MeV
|
ICRU73QO : Emin= 0 eV Emax= 2 MeV
|
||||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV
|
BetheBloch : Emin= 2 MeV Emax= 100 TeV
|
||||||
|
|
||||||
========= Table of registered couples ==============================
|
========= Table of registered couples ============================
|
||||||
|
|
||||||
Index : 0 used in the geometry : Yes
|
Index : 0 used in the geometry : Yes
|
||||||
Material : Galactic
|
Material : Galactic
|
||||||
@@ -166,18 +166,18 @@ Index : 0 used in the geometry : Yes
|
|||||||
Index : 1 used in the geometry : Yes
|
Index : 1 used in the geometry : Yes
|
||||||
Material : Copper
|
Material : Copper
|
||||||
Range cuts : gamma 1 um e- 1 um e+ 1 um proton 1 um
|
Range cuts : gamma 1 um e- 1 um e+ 1 um proton 1 um
|
||||||
Energy thresholds : gamma 250 eV e- 6.83219 keV e+ 6.59324 keV proton 100 eV
|
Energy thresholds : gamma 250 eV e- 6.75977 keV e+ 6.64098 keV proton 100 eV
|
||||||
Region(s) which use this couple :
|
Region(s) which use this couple :
|
||||||
DefaultRegionForTheWorld
|
DefaultRegionForTheWorld
|
||||||
|
|
||||||
Index : 2 used in the geometry : Yes
|
Index : 2 used in the geometry : Yes
|
||||||
Material : Silicon
|
Material : Silicon
|
||||||
Range cuts : gamma 1 um e- 1 um e+ 1 um proton 1 um
|
Range cuts : gamma 1 um e- 1 um e+ 1 um proton 1 um
|
||||||
Energy thresholds : gamma 250 eV e- 858.354 eV e+ 842.18 eV proton 100 eV
|
Energy thresholds : gamma 250 eV e- 853.748 eV e+ 845.694 eV proton 100 eV
|
||||||
Region(s) which use this couple :
|
Region(s) which use this couple :
|
||||||
DefaultRegionForTheWorld
|
DefaultRegionForTheWorld
|
||||||
|
|
||||||
====================================================================
|
==================================================================
|
||||||
|
|
||||||
--- Run 0 start.
|
--- Run 0 start.
|
||||||
---- eRosita event counter: 100
|
---- eRosita event counter: 100
|
||||||
@@ -200,4 +200,4 @@ Index : 2 used in the geometry : Yes
|
|||||||
---- eRosita event counter: 9000
|
---- eRosita event counter: 9000
|
||||||
---- eRosita event counter: 10000
|
---- eRosita event counter: 10000
|
||||||
--- Run 00 ends (Number of events = 10000).
|
--- Run 00 ends (Number of events = 10000).
|
||||||
User=39.280000s Real=39.503039s Sys=0.010000s
|
User=49.320000s Real=49.984513s Sys=0.020000s
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Setup the project
|
||||||
|
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
||||||
|
project(fastAerosol)
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Find Geant4 package, activating all available UI and Vis drivers by default
|
||||||
|
# You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
|
||||||
|
# to build a batch mode only executable
|
||||||
|
#
|
||||||
|
option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
|
||||||
|
if(WITH_GEANT4_UIVIS)
|
||||||
|
find_package(Geant4 REQUIRED ui_all vis_all)
|
||||||
|
else()
|
||||||
|
find_package(Geant4 REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Setup Geant4 include directories and compile definitions
|
||||||
|
# Setup include directory for this project
|
||||||
|
#
|
||||||
|
include(${Geant4_USE_FILE})
|
||||||
|
include_directories(${PROJECT_SOURCE_DIR}/include)
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Locate sources and headers for this project
|
||||||
|
# NB: headers are included so they will show up in IDEs
|
||||||
|
#
|
||||||
|
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
|
||||||
|
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Add the executable, and link it to the Geant4 libraries
|
||||||
|
#
|
||||||
|
add_executable(fastAerosol fastAerosol.cc ${sources} ${headers})
|
||||||
|
target_link_libraries(fastAerosol ${Geant4_LIBRARIES})
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Copy all scripts to the build directory, i.e. the directory in which we
|
||||||
|
# build fastAerosol. This is so that we can run the executable directly because it
|
||||||
|
# relies on these scripts being in the current working directory.
|
||||||
|
#
|
||||||
|
set(AEROSOL_SCRIPTS
|
||||||
|
init_vis.mac
|
||||||
|
vis.mac
|
||||||
|
test.mac
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach(_script ${AEROSOL_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 fastAerosol DESTINATION bin)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=========================================================
|
||||||
|
Geant4 - fastAerosol example
|
||||||
|
=========================================================
|
||||||
|
|
||||||
|
Category History file
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
20.04.2020 - S. Guatelli; New Advanced Example: fastAerosol-V10-06-00.
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
=========================================================
|
||||||
|
Geant4 - FastAerosol advanced example
|
||||||
|
=========================================================
|
||||||
|
|
||||||
|
README
|
||||||
|
---------------------
|
||||||
|
Authors:
|
||||||
|
|
||||||
|
Ara Knaian : ara@nklabs.com
|
||||||
|
Nate MacFadden: natemacfadden@gmail.com
|
||||||
|
NK Labs, LLC (http://www.nklabs.com)
|
||||||
|
|
||||||
|
Related Publication:
|
||||||
|
|
||||||
|
MacFadden, N., Knaian, A., 2020, "Efficient Modeling of Particle
|
||||||
|
Transport through Aerosols in GEANT4", Manuscript in preparation.
|
||||||
|
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Using the FastAerosol geometry classes, it is possible to efficiently
|
||||||
|
and accurately simulate particle transport through aerosols containing
|
||||||
|
billions of randomly-positioned droplets, using an ordinary workstation.
|
||||||
|
This example demonstrates the use of these classes. It is based off
|
||||||
|
exampleB1.
|
||||||
|
|
||||||
|
1- GEOMETRY DEFINITION
|
||||||
|
|
||||||
|
FADetectorConstruction builds a user-defined-shape aerosol of
|
||||||
|
non-intersecting, arbitrarily-shaped droplets. The default
|
||||||
|
bulk shape is a 500 x 500 x 5000 mm box centerred at the origin;
|
||||||
|
the default droplet shape is a r = 1 mm sphere. Intersection checking
|
||||||
|
for non-spherical droplets is performed with the droplet's bounding
|
||||||
|
raidus. These droplets are randomly placed in the bulk.
|
||||||
|
|
||||||
|
A 500 x 500 x 50 mm box-shaped aluminum detector is placed at
|
||||||
|
(0,0,2625) mm so that particles shot along +Z from (0,0,-2612.5) mm
|
||||||
|
travel through the aerosol before being captured in the detector.
|
||||||
|
|
||||||
|
The background material is atmospheric air at an altitude of 14 km.
|
||||||
|
The droplet material is liquid water.
|
||||||
|
|
||||||
|
2- AEROSOL MODELLING
|
||||||
|
|
||||||
|
The example can be configured to allow modeling of the aerosol using
|
||||||
|
one of three methods, to allow for benchmarking and testing.
|
||||||
|
The methods are (a) using the demonstrated FastAerosol class,
|
||||||
|
(b) using a single low-density volume, and (c) using parameterized
|
||||||
|
volumes. Alternating between these build methods can be done by
|
||||||
|
setting one of "/geometry/fastAerosolCloud", "/geometry/smoothCloud",
|
||||||
|
and "/geometry/parameterisedCloud" true for a, b, and c respectively.
|
||||||
|
|
||||||
|
By default, FastAerosol dynamically populates droplets in the bulk
|
||||||
|
as particles transport through it. This reduces memory consumption,
|
||||||
|
especially when the number of primaries is small compared to the
|
||||||
|
number of droplets. Pre-population is slower and uses more memory,
|
||||||
|
but allows saving the droplet distribution over the full volume.
|
||||||
|
Pre-population may be enabled using the "/geometery/prePopulate true"
|
||||||
|
UI command. The example saves the droplet positions in files called
|
||||||
|
"distribution_r???mm_n???mm-3.csv" where ??? denotes the droplet
|
||||||
|
radius and number density respectively).
|
||||||
|
|
||||||
|
User-specified distibution functions for droplet position and rotation
|
||||||
|
may be specified for FastAerosol simulations. Examples of this can be
|
||||||
|
found in lines 311-317 and 326-330 of FADetectorConstruction.cc.
|
||||||
|
|
||||||
|
The example can be configured to model the aerosol using a
|
||||||
|
G4PVParameterized object, instead of using FastAerosol object.
|
||||||
|
This can be used to demonstrate that FastAerosol gives nearly
|
||||||
|
identical transport results as parameterized geometery, but
|
||||||
|
achieves order-of-magnitude performance gains.
|
||||||
|
|
||||||
|
To build the aerosol as a G4PVParameterised object, a droplet
|
||||||
|
distribution is required. The example is set up to use the droplet
|
||||||
|
distribution automatically generated and saved by a previously-run
|
||||||
|
pre-populated FastAerosol simulation, as this allows better comparison
|
||||||
|
between the two classes. By default, the example looks for this
|
||||||
|
distribution under the file name "distribution_r???mm_n???mm-3.csv",
|
||||||
|
so the generated pre-populated FastAerosol distribution can be used
|
||||||
|
by simply running a pre-populated FastAerosol simulation with the
|
||||||
|
same geometry before running the parameterised simulation.
|
||||||
|
|
||||||
|
For comparison, the example can also be run using a single volume
|
||||||
|
containg air and water mixed together at the correct average density.
|
||||||
|
For small-enough droplets, this works well. However, it becomes
|
||||||
|
increasingly innacurate as the droplets appoach a critical size range,
|
||||||
|
which is about r = 1 mm for the materials and energies used in this
|
||||||
|
example. This demonstraties the need to model some aerosols at a
|
||||||
|
droplet level for accurate physics results.
|
||||||
|
|
||||||
|
2- PHYSICS LIST
|
||||||
|
|
||||||
|
This example uses the QGSP_BIC physics list. A global step length
|
||||||
|
limiter physics process is also included, because this can significantly
|
||||||
|
speed up calculations using FastAerosol when particle trajectories
|
||||||
|
curve due to the application of fields.
|
||||||
|
|
||||||
|
3- ACTION INITALIZATION
|
||||||
|
|
||||||
|
Nothing special.
|
||||||
|
|
||||||
|
4- PRIMARY GENERATOR
|
||||||
|
|
||||||
|
Particles are shot from (0,0,-2612.5) mm with a spread in X and Y of
|
||||||
|
+/-55 mm with momentum in the +z direction. The example shoots 50 MeV
|
||||||
|
protons by default.
|
||||||
|
|
||||||
|
5- DETECTOR RESPONSE
|
||||||
|
|
||||||
|
Scoring is done with a scoring grid, to allow histograms of the energy
|
||||||
|
deposited to allow comparison of the results between geometry modeling
|
||||||
|
methods.
|
||||||
|
|
||||||
|
6- SAMPLE EVALUATION
|
||||||
|
|
||||||
|
It is recommended to run the test.mac script for a test/sample
|
||||||
|
evaluation. This will simulate the transport of 100 protons (50 MeV)
|
||||||
|
through an aerosol. The default bulk shape is "box"; other allowed
|
||||||
|
shapes are "ellipsoid", "cylinder", and "pipe". All shapes are aligned
|
||||||
|
along the z axis and maximally sized to fit in the 500 x 500 x 5000 mm
|
||||||
|
bounding box.
|
||||||
|
|
||||||
|
By default, droplets are dynamically populated in the aerosol. One
|
||||||
|
can populate all droplets at the beginning of the simulation by
|
||||||
|
setting prePopulate to true. This saves the generated distribution
|
||||||
|
of droplet centers. One can also run the same experiment, except
|
||||||
|
modelling the aerosol as a parameterised solid, by setting
|
||||||
|
parameterisedCloud to true and FastAerosolCloud to false. This
|
||||||
|
requires a distribution of droplet centers; the one generated by a
|
||||||
|
pre-opulated FastAerosol simulation automatically works. One can
|
||||||
|
also simulate the cloud as a single average-density object by setting
|
||||||
|
FastAerosolCloud and parameterisedCloud to false and smoothCloud to
|
||||||
|
true.
|
||||||
|
|
||||||
|
7 - OUTPUT
|
||||||
|
|
||||||
|
The energy deposited into the aluminum detector by any particles is
|
||||||
|
measured with command line scoring by a 20 x 20 x 1 scoring grid
|
||||||
|
and saved via "/score/dumpQuantityToFile" as a csv file named
|
||||||
|
"eDep_FastAerosol_r1p0mm_n1E-3p7mm-3_bulkbox_dropletsphere.csv"
|
||||||
|
for the default aerosol build parameters.
|
||||||
|
|
||||||
|
The GNU program "/usr/bin/time" may be used measure the simulation
|
||||||
|
time and memory load. If simulating a pre-populated FastAerosol cloud,
|
||||||
|
the time to populate the cloud is printed at population time in the
|
||||||
|
program. This population time is also saved as
|
||||||
|
"popTime_r???mm_n???mm-3.csv".
|
||||||
|
|
||||||
|
The distribution of droplet centers is saved as
|
||||||
|
"distribution_r???mm_n???mm-3.csv" where each row of this csv file
|
||||||
|
corresponds to a droplet with the 1st, 2nd, and 3rd columns
|
||||||
|
corresponding the the x, y, and z position of it's center respectively.
|
||||||
|
|
||||||
|
8 - HOW TO RUN THE EXAMPLE
|
||||||
|
Batch mode: fastAerosol test.mac
|
||||||
|
Interactive mode: fastAerosol (init_vis.mac is executed to set-up visualisation)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
// (adapted from exampleB1)
|
||||||
|
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||||
|
|
||||||
|
|
||||||
|
#include "G4MTRunManager.hh"
|
||||||
|
#include "G4RunManager.hh"
|
||||||
|
|
||||||
|
#include "G4UImanager.hh"
|
||||||
|
#include "G4ScoringManager.hh"
|
||||||
|
|
||||||
|
#include "G4VisExecutive.hh"
|
||||||
|
#include "G4UIExecutive.hh"
|
||||||
|
|
||||||
|
#include "Randomize.hh"
|
||||||
|
|
||||||
|
#include "QGSP_BIC.hh"
|
||||||
|
#include "G4StepLimiterPhysics.hh"
|
||||||
|
|
||||||
|
#include "FADetectorConstruction.hh"
|
||||||
|
#include "FAActionInitialization.hh"
|
||||||
|
|
||||||
|
int main(int argc,char** argv)
|
||||||
|
{
|
||||||
|
// Construct the default run manager
|
||||||
|
#ifdef G4MULTITHREADED
|
||||||
|
G4MTRunManager* runManager = new G4MTRunManager;
|
||||||
|
#else
|
||||||
|
G4RunManager* runManager = new G4RunManager;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Detect interactive mode (if no arguments) and define UI session
|
||||||
|
//
|
||||||
|
G4UIExecutive* ui = 0;
|
||||||
|
if ( argc == 1 ) {
|
||||||
|
ui = new G4UIExecutive(argc, argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Choose the random engine
|
||||||
|
//
|
||||||
|
CLHEP::RanecuEngine* randomEngine = new CLHEP::RanecuEngine;
|
||||||
|
G4Random::setTheEngine(randomEngine);
|
||||||
|
|
||||||
|
// Set mandatory initialization classes
|
||||||
|
//
|
||||||
|
//G4ScoringManager* scoringManager =
|
||||||
|
G4ScoringManager::GetScoringManager();
|
||||||
|
|
||||||
|
// Detector construction initialization
|
||||||
|
runManager->SetUserInitialization(new DetectorConstruction());
|
||||||
|
|
||||||
|
// Physics list
|
||||||
|
G4VModularPhysicsList* physicsList = new QGSP_BIC;
|
||||||
|
physicsList->SetVerboseLevel(1);
|
||||||
|
|
||||||
|
// Physics list - step limiter
|
||||||
|
G4StepLimiterPhysics* stepLimiter = new G4StepLimiterPhysics;
|
||||||
|
stepLimiter->SetApplyToAll(true); // apply step limit to all particles. Default we set limit to DBL_MAX
|
||||||
|
physicsList->RegisterPhysics(stepLimiter);
|
||||||
|
|
||||||
|
// Physics list initialization
|
||||||
|
runManager->SetUserInitialization(physicsList);
|
||||||
|
|
||||||
|
// User action initialization
|
||||||
|
runManager->SetUserInitialization(new ActionInitialization());
|
||||||
|
|
||||||
|
// Initialize visualization
|
||||||
|
//
|
||||||
|
G4VisManager* visManager = new G4VisExecutive;
|
||||||
|
// G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
|
||||||
|
// G4VisManager* visManager = new G4VisExecutive("Quiet");
|
||||||
|
visManager->Initialize();
|
||||||
|
|
||||||
|
// Get the pointer to the User Interface manager
|
||||||
|
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||||
|
|
||||||
|
// Process macro or start UI session
|
||||||
|
//
|
||||||
|
if ( ! ui ) {
|
||||||
|
// batch mode
|
||||||
|
G4String command = "/control/execute ";
|
||||||
|
G4String fileName = argv[1];
|
||||||
|
UImanager->ApplyCommand(command+fileName);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// interactive mode
|
||||||
|
UImanager->ApplyCommand("/control/execute init_vis.mac");
|
||||||
|
ui->SessionStart();
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Job termination
|
||||||
|
// Free the store: user actions, physics_list and detector_description are
|
||||||
|
// owned and deleted by the run manager, so they should not be deleted
|
||||||
|
// in the main() program !
|
||||||
|
|
||||||
|
delete randomEngine;
|
||||||
|
delete visManager;
|
||||||
|
delete runManager;
|
||||||
|
//delete scoringManager;
|
||||||
|
}
|
||||||
|
|
||||||
+18
-19
@@ -23,27 +23,26 @@
|
|||||||
// * acceptance of all terms of the Geant4 Software license. *
|
// * acceptance of all terms of the Geant4 Software license. *
|
||||||
// ********************************************************************
|
// ********************************************************************
|
||||||
//
|
//
|
||||||
#ifndef TBBTASK_HH
|
|
||||||
#define TBBTASK_HH
|
|
||||||
|
|
||||||
#include <tbb/task.h>
|
// (copied from B1ActionInitialization)
|
||||||
#include <tbb/concurrent_queue.h>
|
|
||||||
#include "G4Types.hh"
|
|
||||||
|
|
||||||
class G4Run;
|
#ifndef ActionInitialization_h
|
||||||
|
#define ActionInitialization_h 1
|
||||||
|
|
||||||
class tbbTask : public tbb::task {
|
#include "G4VUserActionInitialization.hh"
|
||||||
public:
|
|
||||||
tbbTask(G4int anId, tbb::concurrent_queue<const G4Run*>* output=0 , G4int nEvts = 1 );
|
/// Action initialization class.
|
||||||
virtual ~tbbTask();
|
|
||||||
tbb::task* execute();
|
class ActionInitialization : public G4VUserActionInitialization
|
||||||
|
{
|
||||||
unsigned int GetSlotId(); //
|
public:
|
||||||
private:
|
ActionInitialization();
|
||||||
G4int m_nEvents;
|
virtual ~ActionInitialization();
|
||||||
G4int m_taskID;
|
|
||||||
tbb::concurrent_queue<const G4Run*>* m_output;
|
virtual void BuildForMaster() const;
|
||||||
G4bool m_beamOnCondition;
|
virtual void Build() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //TBBTASK_HH
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// (adapted from B2bChamberParameterisation)
|
||||||
|
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||||
|
|
||||||
|
#ifndef CloudParameterisation_h
|
||||||
|
#define CloudParameterisation_h 1
|
||||||
|
|
||||||
|
#include "globals.hh"
|
||||||
|
#include "G4VPVParameterisation.hh"
|
||||||
|
#include "G4ThreeVector.hh"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
class G4VPhysicalVolume;
|
||||||
|
class G4Box;
|
||||||
|
|
||||||
|
// Dummy declarations to get rid of warnings ...
|
||||||
|
class G4Trd;
|
||||||
|
class G4Trap;
|
||||||
|
class G4Cons;
|
||||||
|
class G4Orb;
|
||||||
|
class G4Sphere;
|
||||||
|
class G4Ellipsoid;
|
||||||
|
class G4Torus;
|
||||||
|
class G4Para;
|
||||||
|
class G4Hype;
|
||||||
|
class G4Tubs;
|
||||||
|
class G4Polycone;
|
||||||
|
class G4Polyhedra;
|
||||||
|
|
||||||
|
class CloudParameterisation : public G4VPVParameterisation
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
CloudParameterisation(const std::vector<G4ThreeVector>& positions);
|
||||||
|
|
||||||
|
virtual ~CloudParameterisation();
|
||||||
|
|
||||||
|
void ComputeTransformation (const G4int copyNo,
|
||||||
|
G4VPhysicalVolume* physVol) const;
|
||||||
|
|
||||||
|
void ComputeDimensions (G4Box&,const G4int,
|
||||||
|
const G4VPhysicalVolume*) const {}
|
||||||
|
void ComputeDimensions (G4Trd&,const G4int,
|
||||||
|
const G4VPhysicalVolume*) const {}
|
||||||
|
void ComputeDimensions (G4Trap&,const G4int,
|
||||||
|
const G4VPhysicalVolume*) const {}
|
||||||
|
void ComputeDimensions (G4Cons&,const G4int,
|
||||||
|
const G4VPhysicalVolume*) const {}
|
||||||
|
void ComputeDimensions (G4Tubs&,const G4int,
|
||||||
|
const G4VPhysicalVolume*) const {}
|
||||||
|
void ComputeDimensions (G4Orb&,const G4int,
|
||||||
|
const G4VPhysicalVolume*) const {}
|
||||||
|
void ComputeDimensions (G4Ellipsoid&,const G4int,
|
||||||
|
const G4VPhysicalVolume*) const {}
|
||||||
|
void ComputeDimensions (G4Torus&,const G4int,
|
||||||
|
const G4VPhysicalVolume*) const {}
|
||||||
|
void ComputeDimensions (G4Para&,const G4int,
|
||||||
|
const G4VPhysicalVolume*) const {}
|
||||||
|
void ComputeDimensions (G4Hype&,const G4int,
|
||||||
|
const G4VPhysicalVolume*) const {}
|
||||||
|
void ComputeDimensions (G4Polycone&,const G4int,
|
||||||
|
const G4VPhysicalVolume*) const {}
|
||||||
|
void ComputeDimensions (G4Polyhedra&,const G4int,
|
||||||
|
const G4VPhysicalVolume*) const {}
|
||||||
|
void ComputeDimensions (G4Sphere&,const G4int,
|
||||||
|
const G4VPhysicalVolume*) const {}
|
||||||
|
private:
|
||||||
|
|
||||||
|
std::vector<G4ThreeVector> fPositions;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// (adapted from B1DetectorConstruction)
|
||||||
|
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||||
|
|
||||||
|
#ifndef DetectorConstruction_h
|
||||||
|
#define DetectorConstruction_h 1
|
||||||
|
|
||||||
|
#include "G4VUserDetectorConstruction.hh"
|
||||||
|
#include "globals.hh"
|
||||||
|
|
||||||
|
#include "FastAerosol.hh"
|
||||||
|
|
||||||
|
#include "G4UserLimits.hh"
|
||||||
|
|
||||||
|
class G4VPhysicalVolume;
|
||||||
|
class G4LogicalVolume;
|
||||||
|
class DetectorConstructionMessenger;
|
||||||
|
|
||||||
|
/// Detector construction class to define materials and geometry.
|
||||||
|
|
||||||
|
class DetectorConstruction : public G4VUserDetectorConstruction
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DetectorConstruction();
|
||||||
|
virtual ~DetectorConstruction();
|
||||||
|
|
||||||
|
virtual G4VPhysicalVolume* Construct();
|
||||||
|
|
||||||
|
G4LogicalVolume* GetScoringVolume() const { return fScoringVolume; }
|
||||||
|
|
||||||
|
// Physics
|
||||||
|
G4double fStepLim = DBL_MAX; // global step limit
|
||||||
|
G4UserLimits* fStepLimits; // physics implementation of limit
|
||||||
|
|
||||||
|
// Cloud build choice
|
||||||
|
G4bool fFastAerosolCloud = false;
|
||||||
|
G4bool fParameterisedCloud = false;
|
||||||
|
G4bool fSmoothCloud = false;
|
||||||
|
|
||||||
|
// Cloud droplet details
|
||||||
|
G4double fDropletR = 1;
|
||||||
|
|
||||||
|
// FastAerosol cloud details
|
||||||
|
FastAerosol* fCloud = NULL; // the cloud bulk and droplet positions
|
||||||
|
G4bool fPrePopulate = false; // whether to pre-load droplet positions (true) or not (false)
|
||||||
|
G4double fDropletNumDens = 0; // number density of droplets
|
||||||
|
G4double fMinSpacing = 0.0; // minimum spacing between droplets
|
||||||
|
int fCloudSeed = 0; // random seed dictating droplet distribution
|
||||||
|
|
||||||
|
// parameterised cloud details
|
||||||
|
G4double fSmartless = 2.0; // control the 'fSmartless' property of parameterised solid. Roughly how many voxels the volume is split into for geometry optimization
|
||||||
|
|
||||||
|
G4String fCloudShapeStr = "box"; // cloud bulk shape
|
||||||
|
G4String fDropletShapeStr = "sphere"; // droplet shape
|
||||||
|
|
||||||
|
G4VSolid* fCloudShape; // actual cloud bulk shape
|
||||||
|
G4VSolid* fDropletShape; // actual droplet solid
|
||||||
|
|
||||||
|
protected:
|
||||||
|
G4LogicalVolume* fScoringVolume;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DetectorConstructionMessenger* fMessenger;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// (adapted from B2aDetectorMessenger)
|
||||||
|
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||||
|
|
||||||
|
#ifndef DetectorConstructionMessenger_h
|
||||||
|
#define DetectorConstructionMessenger_h 1
|
||||||
|
|
||||||
|
#include "G4UImessenger.hh"
|
||||||
|
|
||||||
|
class G4UIdirectory;
|
||||||
|
class G4UIcmdWithAnInteger;
|
||||||
|
class G4UIcmdWithADoubleAndUnit;
|
||||||
|
class G4UIcmdWithoutParameter;
|
||||||
|
class G4UIcmdWithADouble;
|
||||||
|
class G4UIcmdWithABool;
|
||||||
|
class G4UIcmdWithAString;
|
||||||
|
class DetectorConstruction;
|
||||||
|
|
||||||
|
class DetectorConstructionMessenger: public G4UImessenger
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DetectorConstructionMessenger(DetectorConstruction* detectorIn);
|
||||||
|
virtual ~DetectorConstructionMessenger();
|
||||||
|
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||||
|
|
||||||
|
private:
|
||||||
|
DetectorConstruction* fDetector;
|
||||||
|
|
||||||
|
G4UIdirectory* fGeometryDirectory;
|
||||||
|
|
||||||
|
G4UIcmdWithADoubleAndUnit* fStepLimCmd;
|
||||||
|
|
||||||
|
G4UIcmdWithADoubleAndUnit* fDropletRCmd;
|
||||||
|
G4UIcmdWithADouble* fDropletNumDensCmd;
|
||||||
|
|
||||||
|
G4UIcmdWithABool* fFastAerosolCloudCmd;
|
||||||
|
G4UIcmdWithABool* fParameterisedCloudCmd;
|
||||||
|
G4UIcmdWithABool* fSmoothCloudCmd;
|
||||||
|
|
||||||
|
G4UIcmdWithAString* fCloudShapeCmd;
|
||||||
|
G4UIcmdWithAString* fDropletShapeCmd;
|
||||||
|
|
||||||
|
G4UIcmdWithABool* fPrePopulateCmd;
|
||||||
|
|
||||||
|
G4UIcmdWithADoubleAndUnit* fMinSpacingCmd;
|
||||||
|
|
||||||
|
G4UIcmdWithADouble* fSmartlessCmd;
|
||||||
|
|
||||||
|
G4UIcmdWithAnInteger* fCloudSeedCmd;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
+28
-19
@@ -23,27 +23,36 @@
|
|||||||
// * acceptance of all terms of the Geant4 Software license. *
|
// * acceptance of all terms of the Geant4 Software license. *
|
||||||
// ********************************************************************
|
// ********************************************************************
|
||||||
//
|
//
|
||||||
#include "tbbWorkerRunManager.hh"
|
|
||||||
#include "G4Run.hh"
|
|
||||||
#include "G4MTRunManager.hh"
|
|
||||||
#include "G4UserWorkerInitialization.hh"
|
|
||||||
#include "G4UserRunAction.hh"
|
|
||||||
#include "G4SDManager.hh"
|
|
||||||
|
|
||||||
tbbWorkerRunManager::tbbWorkerRunManager() :
|
// (copied from B1EventAction)
|
||||||
G4WorkerRunManager()
|
|
||||||
{}
|
|
||||||
|
|
||||||
tbbWorkerRunManager::~tbbWorkerRunManager()
|
#ifndef EventAction_h
|
||||||
{}
|
#define EventAction_h 1
|
||||||
|
|
||||||
void tbbWorkerRunManager::MergePartialResults()
|
#include "G4UserEventAction.hh"
|
||||||
|
#include "globals.hh"
|
||||||
|
|
||||||
|
class RunAction;
|
||||||
|
|
||||||
|
/// Event action class
|
||||||
|
///
|
||||||
|
|
||||||
|
class EventAction : public G4UserEventAction
|
||||||
{
|
{
|
||||||
//TBB ??????
|
public:
|
||||||
}
|
EventAction(RunAction* runAction);
|
||||||
|
virtual ~EventAction();
|
||||||
|
|
||||||
void tbbWorkerRunManager::ConstructScoringWorlds()
|
virtual void BeginOfEventAction(const G4Event* event);
|
||||||
{
|
virtual void EndOfEventAction(const G4Event* event);
|
||||||
//Forward call to protected method, that's all
|
|
||||||
G4WorkerRunManager::ConstructScoringWorlds();
|
void AddEdep(G4double edep) { fEdep += edep; }
|
||||||
}
|
|
||||||
|
private:
|
||||||
|
RunAction* fRunAction;
|
||||||
|
G4double fEdep;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// (adapted from B1PrimaryGeneratorAction)
|
||||||
|
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||||
|
|
||||||
|
#ifndef PrimaryGeneratorAction_h
|
||||||
|
#define PrimaryGeneratorAction_h 1
|
||||||
|
|
||||||
|
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||||
|
#include "G4ParticleGun.hh"
|
||||||
|
#include "globals.hh"
|
||||||
|
|
||||||
|
class G4ParticleGun;
|
||||||
|
class G4Event;
|
||||||
|
class G4Box;
|
||||||
|
|
||||||
|
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PrimaryGeneratorAction();
|
||||||
|
virtual ~PrimaryGeneratorAction();
|
||||||
|
|
||||||
|
// method from the base class
|
||||||
|
virtual void GeneratePrimaries(G4Event*);
|
||||||
|
|
||||||
|
// method to access particle gun
|
||||||
|
const G4ParticleGun* GetParticleGun() const { return fParticleGun; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
G4ParticleGun* fParticleGun;
|
||||||
|
G4Box* fWorldBox;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// (copied from B1RunAction)
|
||||||
|
|
||||||
|
#ifndef RunAction_h
|
||||||
|
#define RunAction_h 1
|
||||||
|
|
||||||
|
#include "G4UserRunAction.hh"
|
||||||
|
#include "G4Accumulable.hh"
|
||||||
|
#include "globals.hh"
|
||||||
|
|
||||||
|
class G4Run;
|
||||||
|
|
||||||
|
/// Run action class
|
||||||
|
///
|
||||||
|
/// In EndOfRunAction(), it calculates the dose in the selected volume
|
||||||
|
/// from the energy deposit accumulated via stepping and event actions.
|
||||||
|
/// The computed dose is then printed on the screen.
|
||||||
|
|
||||||
|
class RunAction : public G4UserRunAction
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
RunAction();
|
||||||
|
virtual ~RunAction();
|
||||||
|
|
||||||
|
// virtual G4Run* GenerateRun();
|
||||||
|
virtual void BeginOfRunAction(const G4Run*);
|
||||||
|
virtual void EndOfRunAction(const G4Run*);
|
||||||
|
|
||||||
|
void AddEdep (G4double edep);
|
||||||
|
|
||||||
|
private:
|
||||||
|
G4Accumulable<G4double> fEdep;
|
||||||
|
G4Accumulable<G4double> fEdep2;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
+25
-17
@@ -24,25 +24,33 @@
|
|||||||
// ********************************************************************
|
// ********************************************************************
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "tbbUserWorkerInitialization.hh"
|
// (copied from B1SteppingAction)
|
||||||
#include "G4Threading.hh"
|
|
||||||
#include "tbbWorkerRunManager.hh"
|
|
||||||
|
|
||||||
tbbUserWorkerInitialization::~tbbUserWorkerInitialization()
|
#ifndef SteppingAction_h
|
||||||
{}
|
#define SteppingAction_h 1
|
||||||
|
|
||||||
void tbbUserWorkerInitialization::JoinWorker(G4Thread*)
|
#include "G4UserSteppingAction.hh"
|
||||||
|
#include "globals.hh"
|
||||||
|
|
||||||
|
class EventAction;
|
||||||
|
|
||||||
|
class G4LogicalVolume;
|
||||||
|
|
||||||
|
/// Stepping action class
|
||||||
|
///
|
||||||
|
|
||||||
|
class SteppingAction : public G4UserSteppingAction
|
||||||
{
|
{
|
||||||
//Not needed for TBB
|
public:
|
||||||
}
|
SteppingAction(EventAction* eventAction);
|
||||||
|
virtual ~SteppingAction();
|
||||||
|
|
||||||
G4Thread* tbbUserWorkerInitialization::CreateAndStartWorker(G4WorkerThread*)
|
// method from the base class
|
||||||
{
|
virtual void UserSteppingAction(const G4Step*);
|
||||||
//Not needed for TBB
|
|
||||||
return static_cast<G4Thread*>(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
G4WorkerRunManager* tbbUserWorkerInitialization::CreateWorkerRunManager() const
|
private:
|
||||||
{
|
EventAction* fEventAction;
|
||||||
return new tbbWorkerRunManager();
|
G4LogicalVolume* fScoringVolume;
|
||||||
}
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,238 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
// GEANT 4 class header file
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// FastAerosol
|
||||||
|
//
|
||||||
|
// Class description:
|
||||||
|
//
|
||||||
|
// A FastAerosol is a collection of points in a voxelized
|
||||||
|
// arbitrarily-shaped volume with methods implementing population of
|
||||||
|
// grids/voxels and for efficiently finding the nearest point.
|
||||||
|
//
|
||||||
|
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef FastAerosol_h
|
||||||
|
#define FastAerosol_h
|
||||||
|
|
||||||
|
#include "globals.hh"
|
||||||
|
#include "Randomize.hh"
|
||||||
|
#include "G4ThreeVector.hh"
|
||||||
|
#include "G4VSolid.hh"
|
||||||
|
|
||||||
|
// rotations and number density distribution
|
||||||
|
#include <functional>
|
||||||
|
#include "G4RotationMatrix.hh"
|
||||||
|
#include <atomic>
|
||||||
|
|
||||||
|
//using namespace std;
|
||||||
|
|
||||||
|
class FastAerosol {
|
||||||
|
public:
|
||||||
|
// Constructor; creates a random cloud of droplets
|
||||||
|
FastAerosol(const G4String& pName, G4VSolid* pCloud,
|
||||||
|
G4double pR, G4double pMinD, G4double pAvgNumDens, G4double pdR,
|
||||||
|
std::function<G4double (G4ThreeVector)> pNumDensDistribution);
|
||||||
|
|
||||||
|
FastAerosol(const G4String& pName, G4VSolid* pCloud,
|
||||||
|
G4double pR, G4double pMinD, G4double pNumDens, G4double pdR);
|
||||||
|
|
||||||
|
FastAerosol(const G4String& pName, G4VSolid* pCloud,
|
||||||
|
G4double pR, G4double pMinD, G4double pNumDens);
|
||||||
|
|
||||||
|
// Destructor; frees memory
|
||||||
|
~FastAerosol();
|
||||||
|
|
||||||
|
// Populate all grids. Otherwise, they are populated on-the-fly
|
||||||
|
void PopulateAllGrids();
|
||||||
|
|
||||||
|
// Save locations of droplets to a file for visualization/analysis purposes
|
||||||
|
void SaveToFile(const char *filename);
|
||||||
|
|
||||||
|
// Get absolutely nearest droplet - must be public as FastAerosolSolid uses it
|
||||||
|
bool GetNearestDroplet(const G4ThreeVector &p, G4ThreeVector ¢er, G4double &closestDistance, G4double stepLim, G4VSolid* droplet, std::function<G4RotationMatrix (G4ThreeVector)> rotation);
|
||||||
|
|
||||||
|
// Get nearest droplet along a vector - must be public as FastAerosolSolid uses it
|
||||||
|
bool GetNearestDroplet(const G4ThreeVector &p, const G4ThreeVector &v, G4ThreeVector ¢er, G4double &closestDistance, G4double stepLim, G4VSolid* droplet, std::function<G4RotationMatrix (G4ThreeVector)> rotation);
|
||||||
|
|
||||||
|
// ======
|
||||||
|
// Inline
|
||||||
|
// ======
|
||||||
|
// Input quantities
|
||||||
|
inline G4String GetName() const; // aerosol name
|
||||||
|
inline G4VSolid* GetBulk() const; // bulk shape
|
||||||
|
inline G4double GetRadius() const; // droplet radius
|
||||||
|
inline G4double GetAvgNumDens() const; // droplet number density
|
||||||
|
//inline G4double GetPitch() const; // grid pitch
|
||||||
|
|
||||||
|
inline G4int GetNumDroplets() const; // in case the absolute number is more relevant than density
|
||||||
|
|
||||||
|
// Bulk quantities
|
||||||
|
inline G4double GetXHalfLength() const;
|
||||||
|
inline G4double GetYHalfLength() const;
|
||||||
|
inline G4double GetZHalfLength() const;
|
||||||
|
inline void GetBoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const;
|
||||||
|
inline G4double GetCubicVolume() const;
|
||||||
|
|
||||||
|
inline G4double DistanceToCloud(const G4ThreeVector &p);
|
||||||
|
inline G4double DistanceToCloud(const G4ThreeVector &p, const G4ThreeVector &v);
|
||||||
|
|
||||||
|
// Misc getters and setters
|
||||||
|
inline long GetSeed();
|
||||||
|
inline void SetSeed(long seed);
|
||||||
|
|
||||||
|
inline G4int GetNumPlacementTries();
|
||||||
|
inline void SetNumPlacementTries(G4int numTries);
|
||||||
|
|
||||||
|
inline G4int GetPreSphereR();
|
||||||
|
inline void SetPreSphereR(G4int fPreSphereRIn);
|
||||||
|
|
||||||
|
inline std::function<G4double (G4ThreeVector)> GetDistribution(); // the droplet number density distribution
|
||||||
|
|
||||||
|
inline G4double GetDropletsPerVoxel();
|
||||||
|
inline void SetDropletsPerVoxel(G4double newDropletsPerVoxel);
|
||||||
|
|
||||||
|
// Printing diagnostic tool
|
||||||
|
inline void PrintPopulationReport();
|
||||||
|
|
||||||
|
private:
|
||||||
|
G4double kCarTolerance;
|
||||||
|
|
||||||
|
// Parameters, set in constructor
|
||||||
|
G4String fName;
|
||||||
|
|
||||||
|
G4VSolid* fCloud; // Solid volume of the cloud
|
||||||
|
G4double fDx, fDy, fDz; // Half widths
|
||||||
|
|
||||||
|
G4double fR; // Bounding radius of each droplet
|
||||||
|
G4double fR2; // Bounding radius squared of each droplet
|
||||||
|
|
||||||
|
G4double fdR; // Uncertainty in DistanceToIn droplet when just using knowledge of droplet center
|
||||||
|
|
||||||
|
G4double fMinD; // Minimum distance allowed between faces of droplets when constructing random array of droplets
|
||||||
|
|
||||||
|
std::function<G4double (G4ThreeVector)> fDistribution;
|
||||||
|
G4double fAvgNumDens; // Average droplet number density
|
||||||
|
long int fNumDroplets = 0; // Number of droplets that have been created
|
||||||
|
|
||||||
|
G4double fGridPitch; // Pitch of collision detection grid. Must be greater than diameter of droplets for correctness of collision detection.
|
||||||
|
|
||||||
|
// Ramdom engine
|
||||||
|
CLHEP::HepJamesRandom fCloudEngine;
|
||||||
|
long fSeed = 0; // Global random seed
|
||||||
|
|
||||||
|
G4double fDropletsPerVoxel = 4.0; // Expected number of droplets per voxel
|
||||||
|
|
||||||
|
// How far the voxel center must be inside the bulk order for there to be no risk of placing a droplet outside
|
||||||
|
G4double fEdgeDistance;
|
||||||
|
|
||||||
|
// Grid variables
|
||||||
|
std::vector<std::vector<G4ThreeVector>> fGrid;// Grid of lists of inidices to grid points, used for fast collsion checking
|
||||||
|
std::vector<G4double> fGridMean; // Array listing mean count for each voxel
|
||||||
|
std::atomic<bool> *fGridValid; // Array listing validity of each grid. uses atomic variables
|
||||||
|
|
||||||
|
G4int fNx, fNy, fNz; // Number of x, y, and z elements in fGrid
|
||||||
|
G4int fNxy; // Cached fNx*fNy
|
||||||
|
long int fNumGridCells; // Cached fNx*fNy*fNz
|
||||||
|
|
||||||
|
|
||||||
|
G4double fCollisionLimit2; // Threshold distance squared when checking for collsion
|
||||||
|
G4int fNumNewPointTries = 100; // How many times we try to place droplets
|
||||||
|
G4double fMaxDropPercent = 1.0; // The maximal percentage of skipped droplets before crashing0
|
||||||
|
G4int fMaxDropCount; // The maximal number of skipped droplets before crashing
|
||||||
|
G4int fNumDropped = 0; // Number of skipped droplets due to collisions/out of bulk placement
|
||||||
|
|
||||||
|
G4int fNumCollisions = 0; // How many collisions occured when attempting to place
|
||||||
|
|
||||||
|
// Droplet search variables
|
||||||
|
G4int fVectorSearchRadius; // maximum vector search radius
|
||||||
|
|
||||||
|
// Droplet placement functions
|
||||||
|
// ===========================
|
||||||
|
void InitializeGrid();
|
||||||
|
|
||||||
|
G4bool FindNewPoint(G4bool edgeVoxel, G4double dX, G4double dY, G4double dZ, G4double minX, G4double minY, G4double minZ, G4ThreeVector &foundVec);
|
||||||
|
|
||||||
|
G4double VoxelOverlap(G4ThreeVector voxelCenter, G4int nStat, G4double epsilon);
|
||||||
|
|
||||||
|
bool CheckCollision(G4double x, G4double y, G4double z);
|
||||||
|
bool CheckCollisionInsideGrid(G4double x, G4double y, G4double z, unsigned int xi, unsigned int yi, unsigned int zi);
|
||||||
|
bool CheckCollisionWithDroplet(G4double x, G4double y, G4double z, G4ThreeVector p);
|
||||||
|
|
||||||
|
// Droplet distance functions
|
||||||
|
// ==========================
|
||||||
|
void SearchSphere(G4int searchRad, G4double &minDistance, std::vector<G4ThreeVector> &candidates, std::vector<G4double> &distances2, G4int xGrid, G4int yGrid, G4int zGrid, const G4ThreeVector &p);
|
||||||
|
void GetNearestDropletInsideRegion(G4double &minDistance, G4ThreeVector ¢er, int xGrid, int yGrid, int zGrid, int xWidth, int yWidth, int zWidth, const G4ThreeVector &p, const G4ThreeVector &v, G4VSolid* droplet, std::function<G4RotationMatrix (G4ThreeVector)> rotation);
|
||||||
|
void GetNearestDropletInsideGrid(G4double &minDistance, std::vector<G4ThreeVector> &candidates, std::vector<G4double> &distances2, unsigned int xGrid, unsigned int yGrid, unsigned int zGrid, const G4ThreeVector &p);
|
||||||
|
void GetNearestDropletInsideGrid(G4double &minDistance, G4ThreeVector ¢er, unsigned int xGrid, unsigned int yGrid, unsigned int zGrid, const G4ThreeVector &p, const G4ThreeVector &v, G4VSolid* droplet, std::function<G4RotationMatrix (G4ThreeVector)> rotation);
|
||||||
|
|
||||||
|
// Voxelized sphere methods
|
||||||
|
// ========================
|
||||||
|
// a collection of points as in {{x1,y1},{x2,y2},...}
|
||||||
|
typedef std::vector<std::vector<int>> fCircleType;
|
||||||
|
|
||||||
|
// a collection of points describing a spherical shell
|
||||||
|
// with points (x,y,z)=(i-R,j-R,sphere[i][j][k])
|
||||||
|
// that is, first index gives x-position, second index
|
||||||
|
// gives y-position, and the value gives z-position
|
||||||
|
//
|
||||||
|
// this is done so that searching may be optimized:
|
||||||
|
// if searching some x=i-R that is outside the
|
||||||
|
// aerosol's bounding box, immediately increment i
|
||||||
|
// (similar for y).
|
||||||
|
typedef std::vector<std::vector<std::vector<int>>> fSphereType;
|
||||||
|
|
||||||
|
G4int fMaxCircleR;
|
||||||
|
G4int fMaxSphereR;
|
||||||
|
G4int fPreSphereR = 20;
|
||||||
|
std::vector<fCircleType> fCircleCollection;
|
||||||
|
std::vector<fSphereType> fSphereCollection;
|
||||||
|
|
||||||
|
fSphereType MakeSphere(G4int R);
|
||||||
|
fCircleType MakeCircle(G4int R);
|
||||||
|
fCircleType MakeHalfCircle(G4int R);
|
||||||
|
|
||||||
|
void PopulateGrid(unsigned int xi, unsigned int yi, unsigned int zi, unsigned int& gi);
|
||||||
|
|
||||||
|
// ======
|
||||||
|
// Inline
|
||||||
|
// ======
|
||||||
|
inline bool GetGrid(const G4ThreeVector &p, G4int &xGrid, G4int &yGrid, G4int &zGrid);
|
||||||
|
inline bool AnyIndexOutOfBounds(G4int xGrid, G4int yGrid, G4int zGrid);
|
||||||
|
|
||||||
|
inline unsigned int GetGridIndex(unsigned int xi, unsigned int yi, unsigned int zi);
|
||||||
|
inline G4ThreeVector GetIndexCoord(G4int index);
|
||||||
|
|
||||||
|
inline std::pair<G4int, G4int> GetMinMaxSide(G4int index, G4int numGrids);
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "FastAerosol.icc"
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,252 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
// GEANT 4 inline definitions file
|
||||||
|
//
|
||||||
|
// FastAerosol.icc
|
||||||
|
//
|
||||||
|
// Implementation of inline methods of FastAerosol
|
||||||
|
//
|
||||||
|
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
|
inline
|
||||||
|
G4String FastAerosol::GetName() const
|
||||||
|
{
|
||||||
|
return(fName);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
G4VSolid* FastAerosol::GetBulk() const
|
||||||
|
{
|
||||||
|
return(fCloud);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
G4double FastAerosol::GetRadius() const
|
||||||
|
{
|
||||||
|
return(fR);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
G4double FastAerosol::GetAvgNumDens() const
|
||||||
|
{
|
||||||
|
return(fAvgNumDens);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
G4int FastAerosol::GetNumDroplets() const
|
||||||
|
{
|
||||||
|
return((int)(fAvgNumDens*GetCubicVolume()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
|
G4double FastAerosol::GetXHalfLength() const
|
||||||
|
{
|
||||||
|
return(fDx);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
G4double FastAerosol::GetYHalfLength() const
|
||||||
|
{
|
||||||
|
return(fDy);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
G4double FastAerosol::GetZHalfLength() const
|
||||||
|
{
|
||||||
|
return(fDz);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
void FastAerosol::GetBoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
|
||||||
|
{
|
||||||
|
pMin.setX(-fDx); pMax.setX(fDx);
|
||||||
|
pMin.setY(-fDy); pMax.setY(fDy);
|
||||||
|
pMin.setZ(-fDz); pMax.setZ(fDz);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
G4double FastAerosol::GetCubicVolume() const
|
||||||
|
{
|
||||||
|
return(fCloud->GetCubicVolume());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Find the absolute distance to the cloud bulk from p
|
||||||
|
inline
|
||||||
|
G4double FastAerosol::DistanceToCloud(const G4ThreeVector &p) {
|
||||||
|
if (fCloud->Inside(p)==kOutside)
|
||||||
|
{
|
||||||
|
return(fCloud->DistanceToIn(p));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find the distance to the cloud bulk from p along a vector v
|
||||||
|
inline
|
||||||
|
G4double FastAerosol::DistanceToCloud(const G4ThreeVector &p, const G4ThreeVector &v) {
|
||||||
|
if (fCloud->Inside(p)==kInside)
|
||||||
|
{
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return(fCloud->DistanceToIn(p,v));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get and set the base of the random seed used to set droplet positions
|
||||||
|
// For a given seed and a given geometry, the droplet positions are the same
|
||||||
|
inline
|
||||||
|
long FastAerosol::GetSeed() {
|
||||||
|
return(fSeed);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
void FastAerosol::SetSeed(long seedIn) {
|
||||||
|
fSeed = seedIn;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get and set the maximum radius of the voxelized spheres to pre-populate
|
||||||
|
inline
|
||||||
|
G4int FastAerosol::GetPreSphereR() {
|
||||||
|
return(fPreSphereR);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
void FastAerosol::SetPreSphereR(G4int preSphereRIn) {
|
||||||
|
fPreSphereR = preSphereRIn;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get the droplet distribution function
|
||||||
|
inline
|
||||||
|
std::function<G4double (G4ThreeVector)> FastAerosol::GetDistribution() {
|
||||||
|
return(fDistribution);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get and set the maximum number of droplet placement tries in the solid
|
||||||
|
// Skip placement if attempting to place a single droplet more than this
|
||||||
|
inline
|
||||||
|
G4int FastAerosol::GetNumPlacementTries()
|
||||||
|
{
|
||||||
|
return(fNumNewPointTries);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
void FastAerosol::SetNumPlacementTries(G4int numTries)
|
||||||
|
{
|
||||||
|
fNumNewPointTries = numTries;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get and set the expected number of droplets per voxel (on average)
|
||||||
|
inline
|
||||||
|
G4double FastAerosol::GetDropletsPerVoxel()
|
||||||
|
{
|
||||||
|
return(fDropletsPerVoxel);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
void FastAerosol::SetDropletsPerVoxel(G4double newDropletsPerVoxel)
|
||||||
|
{
|
||||||
|
if (newDropletsPerVoxel >= std::pow(4.0*std::sqrt(2),-1.0))
|
||||||
|
{
|
||||||
|
fDropletsPerVoxel = newDropletsPerVoxel;
|
||||||
|
InitializeGrid();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::ostringstream message;
|
||||||
|
message << "Invalid droplets/voxel for cloud: " << GetName() << "!" << G4endl
|
||||||
|
<< " For grid pitch to be larger than radius (currently assumed),"
|
||||||
|
<< " droplets/voxel must be greater than or equal to 1/(4*sqrt(2))"
|
||||||
|
<< " newDropletsPerVoxel = " << newDropletsPerVoxel;
|
||||||
|
G4Exception("FastAerosol::SetDropletsPerVoxel()", "GeomSolids0002",
|
||||||
|
FatalErrorInArgument, message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
|
void FastAerosol::PrintPopulationReport() {
|
||||||
|
G4cout << "Total grids: " << fNumGridCells << G4endl;
|
||||||
|
G4cout << "Droplets created: " << fNumDroplets << G4endl;
|
||||||
|
G4cout << "Average Number density: " << fAvgNumDens << G4endl;
|
||||||
|
G4cout << "Droplets expected: " << GetNumDroplets() << G4endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// =======
|
||||||
|
// Private
|
||||||
|
// =======
|
||||||
|
// Find the grid associated with a point. Return true if that is a valid grid,
|
||||||
|
// false if it is out of bounds.
|
||||||
|
inline
|
||||||
|
bool FastAerosol::GetGrid(const G4ThreeVector &p, int &xGrid, int &yGrid, int &zGrid) {
|
||||||
|
xGrid = (int)floorl((p.x() + fDx) / fGridPitch);
|
||||||
|
yGrid = (int)floorl((p.y() + fDy) / fGridPitch);
|
||||||
|
zGrid = (int)floorl((p.z() + fDz) / fGridPitch);
|
||||||
|
return(!AnyIndexOutOfBounds(xGrid, yGrid, zGrid));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return true if any grid index given is out of bounds, false otherwise
|
||||||
|
inline
|
||||||
|
bool FastAerosol::AnyIndexOutOfBounds(G4int xGrid, G4int yGrid, G4int zGrid) {
|
||||||
|
return ((xGrid < 0) || (xGrid >= fNx) ||
|
||||||
|
(yGrid < 0) || (yGrid >= fNy) ||
|
||||||
|
(zGrid < 0) || (zGrid >= fNz));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create index for grid
|
||||||
|
inline
|
||||||
|
unsigned int FastAerosol::GetGridIndex(unsigned int xi, unsigned int yi, unsigned int zi) {
|
||||||
|
return(zi*fNxy + yi*fNx + xi);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create get coordinates of index
|
||||||
|
inline
|
||||||
|
G4ThreeVector FastAerosol::GetIndexCoord(G4int index) {
|
||||||
|
G4int x = index % fNx;
|
||||||
|
G4int y = ( (index -x)/fNx ) % fNy;
|
||||||
|
G4int z = (index -x -fNx*y )/(fNx*fNy);
|
||||||
|
return(G4ThreeVector(x,y,z));
|
||||||
|
}
|
||||||
|
|
||||||
|
// find lower and upper grid boundary
|
||||||
|
inline
|
||||||
|
std::pair<G4int, G4int> FastAerosol::GetMinMaxSide(G4int i, G4int numGrids) {
|
||||||
|
return(std::make_pair((i == 0) ? 0 : (i-1),
|
||||||
|
(i == (numGrids-1)) ? i : (i+1)));
|
||||||
|
}
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
// GEANT 4 class header file
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// FastAerosolSolid
|
||||||
|
//
|
||||||
|
// Class description:
|
||||||
|
//
|
||||||
|
// A FastAerosolSolid is a collection of fDroplet solids
|
||||||
|
// with positions set randomly by FastAerosol in a
|
||||||
|
// volume given by a bulk shape given by FastAerosol member
|
||||||
|
//
|
||||||
|
// The FastAerosol member fCloud handles the optimization
|
||||||
|
// (finding nearest droplet, populating the cloud) needed for
|
||||||
|
// efficient simulations.
|
||||||
|
//
|
||||||
|
// This class is heavily based on system solids.
|
||||||
|
//
|
||||||
|
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef FastAerosolSolid_HH
|
||||||
|
#define FastAerosolSolid_HH
|
||||||
|
|
||||||
|
#include "FastAerosol.hh"
|
||||||
|
|
||||||
|
#include "G4Polyhedron.hh"
|
||||||
|
|
||||||
|
// rotations
|
||||||
|
#include <functional>
|
||||||
|
#include "G4RotationMatrix.hh"
|
||||||
|
|
||||||
|
class FastAerosolSolid : public G4VSolid
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
FastAerosolSolid(const G4String& pName,
|
||||||
|
FastAerosol* pCloud,
|
||||||
|
G4VSolid* pDroplet,
|
||||||
|
std::function<G4RotationMatrix (G4ThreeVector)> pRotation);
|
||||||
|
|
||||||
|
FastAerosolSolid(const G4String& pName,
|
||||||
|
FastAerosol* pCloud,
|
||||||
|
G4VSolid* pDroplet);
|
||||||
|
~FastAerosolSolid();
|
||||||
|
|
||||||
|
// Access functions
|
||||||
|
inline G4double GetCubicVolume();
|
||||||
|
inline G4double GetSurfaceArea();
|
||||||
|
|
||||||
|
// Solid standard methods
|
||||||
|
G4bool CalculateExtent(const EAxis pAxis,
|
||||||
|
const G4VoxelLimits& pVoxelLimit,
|
||||||
|
const G4AffineTransform& pTransform,
|
||||||
|
G4double& pmin, G4double& pmax) const;
|
||||||
|
EInside Inside(const G4ThreeVector& p) const;
|
||||||
|
G4ThreeVector SurfaceNormal( const G4ThreeVector& p) const;
|
||||||
|
G4double DistanceToIn(const G4ThreeVector& p,
|
||||||
|
const G4ThreeVector& v) const;
|
||||||
|
G4double DistanceToIn(const G4ThreeVector& p) const;
|
||||||
|
G4double DistanceToOut(const G4ThreeVector& p,
|
||||||
|
const G4ThreeVector& v,
|
||||||
|
const G4bool calcNorm=G4bool(false),
|
||||||
|
G4bool *validNorm=0,
|
||||||
|
G4ThreeVector *n=0) const;
|
||||||
|
G4double DistanceToOut(const G4ThreeVector& p) const;
|
||||||
|
|
||||||
|
G4GeometryType GetEntityType() const;
|
||||||
|
|
||||||
|
G4VSolid* Clone() const;
|
||||||
|
|
||||||
|
std::ostream& StreamInfo(std::ostream& os) const;
|
||||||
|
|
||||||
|
G4ThreeVector GetPointOnSurface() const;
|
||||||
|
|
||||||
|
G4Polyhedron* GetPolyhedron () const;
|
||||||
|
void DescribeYourselfTo(G4VGraphicsScene& scene) const;
|
||||||
|
G4VisExtent GetExtent() const;
|
||||||
|
G4Polyhedron* CreatePolyhedron() const;
|
||||||
|
|
||||||
|
|
||||||
|
public: // without description
|
||||||
|
|
||||||
|
FastAerosolSolid(__void__&);
|
||||||
|
//
|
||||||
|
// Fake default constructor for usage restricted to direct object
|
||||||
|
// persistency for clients requiring preallocation of memory for
|
||||||
|
// persistifiable objects.
|
||||||
|
|
||||||
|
FastAerosolSolid(const FastAerosolSolid& rhs);
|
||||||
|
FastAerosolSolid& operator=(const FastAerosolSolid& rhs);
|
||||||
|
// Copy constructor and assignment operator.
|
||||||
|
|
||||||
|
inline void SetStepLim(G4double newLim);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
inline void Initialize();
|
||||||
|
//
|
||||||
|
// Reset relevant values to zero
|
||||||
|
|
||||||
|
G4double fStepLim = DBL_MAX; // Maximum step length. Allows speed up in droplet search
|
||||||
|
|
||||||
|
FastAerosol* fCloud; // FastAerosol which handles brunt of work
|
||||||
|
G4VSolid* fDroplet; // Droplet shape
|
||||||
|
G4VSolid* fBulk; // Aerosol bulk
|
||||||
|
|
||||||
|
G4double fR = 0.0; // Droplet bounding radius
|
||||||
|
|
||||||
|
G4double fVisDx, fVisDy, fVisDz; // Visual extent
|
||||||
|
|
||||||
|
G4double fCubicVolume = 0.0; // Cubic volume of all droplets
|
||||||
|
G4double fSurfaceArea = 0.0; // Surface area of all droplets
|
||||||
|
|
||||||
|
G4double farFromCloudDist;
|
||||||
|
|
||||||
|
std::function<G4RotationMatrix (G4ThreeVector)> fRotation; // rotation function
|
||||||
|
|
||||||
|
protected: // without description
|
||||||
|
|
||||||
|
mutable G4bool fRebuildPolyhedron;
|
||||||
|
mutable G4Polyhedron* fpPolyhedron;
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "FastAerosolSolid.icc"
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
// GEANT 4 inline definitions file
|
||||||
|
//
|
||||||
|
// FastAerosolSolid.icc
|
||||||
|
//
|
||||||
|
// Implementation of inline methods of FastAerosolSolid
|
||||||
|
//
|
||||||
|
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
|
inline
|
||||||
|
G4double FastAerosolSolid::GetCubicVolume()
|
||||||
|
{
|
||||||
|
if(fCubicVolume != 0 ) {;}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fCubicVolume = (fDroplet->GetCubicVolume())*(fCloud->GetNumDroplets());
|
||||||
|
}
|
||||||
|
return(fCubicVolume);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
G4double FastAerosolSolid::GetSurfaceArea()
|
||||||
|
{
|
||||||
|
if(fSurfaceArea != 0.) {;}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fSurfaceArea = (fDroplet->GetSurfaceArea())*(fCloud->GetNumDroplets());
|
||||||
|
}
|
||||||
|
return(fSurfaceArea);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
void FastAerosolSolid::SetStepLim(G4double newLim)
|
||||||
|
{
|
||||||
|
fStepLim = newLim;
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# Macro file for the initialization of example B1
|
||||||
|
# in interactive session
|
||||||
|
#
|
||||||
|
|
||||||
|
# Build the 'standard aerosol'
|
||||||
|
/geometry/minSpacing 0.01 mm
|
||||||
|
/geometry/dropletNumDens 0.001
|
||||||
|
|
||||||
|
/geometry/parameterisedCloud false
|
||||||
|
/geometry/fastAerosolCloud true
|
||||||
|
/geometry/smoothCloud false
|
||||||
|
|
||||||
|
/geometry/prePopulate false
|
||||||
|
|
||||||
|
/geometry/cloudShape ellipsoid
|
||||||
|
/geometry/dropletShape sphere
|
||||||
|
|
||||||
|
/geometry/dropletR 1.0 mm
|
||||||
|
|
||||||
|
# Set some default verbose
|
||||||
|
/control/verbose 2
|
||||||
|
/control/saveHistory
|
||||||
|
/run/verbose 2
|
||||||
|
#
|
||||||
|
# Change the default number of threads (in multi-threaded mode)
|
||||||
|
#/run/numberOfThreads 4
|
||||||
|
#
|
||||||
|
# Initialize kernel
|
||||||
|
/run/initialize
|
||||||
|
#
|
||||||
|
# Visualization setting
|
||||||
|
/control/execute vis.mac
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// (copied from B1ActionInitialization)
|
||||||
|
|
||||||
|
#include "FAActionInitialization.hh"
|
||||||
|
#include "FAPrimaryGeneratorAction.hh"
|
||||||
|
#include "FARunAction.hh"
|
||||||
|
#include "FAEventAction.hh"
|
||||||
|
#include "FASteppingAction.hh"
|
||||||
|
|
||||||
|
ActionInitialization::ActionInitialization()
|
||||||
|
: G4VUserActionInitialization()
|
||||||
|
{}
|
||||||
|
|
||||||
|
ActionInitialization::~ActionInitialization()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void ActionInitialization::BuildForMaster() const
|
||||||
|
{
|
||||||
|
RunAction* runAction = new RunAction;
|
||||||
|
SetUserAction(runAction);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ActionInitialization::Build() const
|
||||||
|
{
|
||||||
|
SetUserAction(new PrimaryGeneratorAction);
|
||||||
|
|
||||||
|
RunAction* runAction = new RunAction;
|
||||||
|
SetUserAction(runAction);
|
||||||
|
|
||||||
|
EventAction* eventAction = new EventAction(runAction);
|
||||||
|
SetUserAction(eventAction);
|
||||||
|
|
||||||
|
SetUserAction(new SteppingAction(eventAction));
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// (adapted from B2bChamberParameterisation)
|
||||||
|
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||||
|
|
||||||
|
#include "FACloudParameterisation.hh"
|
||||||
|
|
||||||
|
#include "G4VPhysicalVolume.hh"
|
||||||
|
#include "G4ThreeVector.hh"
|
||||||
|
#include "G4Sphere.hh"
|
||||||
|
#include "G4SystemOfUnits.hh"
|
||||||
|
|
||||||
|
CloudParameterisation::CloudParameterisation(
|
||||||
|
const std::vector<G4ThreeVector>& positions)
|
||||||
|
: G4VPVParameterisation()
|
||||||
|
{
|
||||||
|
fPositions = positions;
|
||||||
|
}
|
||||||
|
|
||||||
|
CloudParameterisation::~CloudParameterisation()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
void CloudParameterisation::ComputeTransformation
|
||||||
|
(const G4int copyNo, G4VPhysicalVolume* physVol) const
|
||||||
|
{
|
||||||
|
physVol->SetTranslation(fPositions[copyNo]);
|
||||||
|
}
|
||||||
@@ -0,0 +1,561 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// (adapted from B1DetectorConstruction)
|
||||||
|
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||||
|
|
||||||
|
#include "FADetectorConstruction.hh"
|
||||||
|
#include "FADetectorConstructionMessenger.hh"
|
||||||
|
|
||||||
|
#include "G4RunManager.hh"
|
||||||
|
#include "G4NistManager.hh"
|
||||||
|
|
||||||
|
#include "G4LogicalVolume.hh"
|
||||||
|
#include "G4PVPlacement.hh"
|
||||||
|
#include "G4SystemOfUnits.hh"
|
||||||
|
|
||||||
|
// shapes
|
||||||
|
#include "G4Box.hh"
|
||||||
|
#include "G4Cons.hh"
|
||||||
|
#include "G4Orb.hh"
|
||||||
|
#include "G4Sphere.hh"
|
||||||
|
#include "G4Trd.hh"
|
||||||
|
#include "G4Tubs.hh"
|
||||||
|
#include "G4Ellipsoid.hh"
|
||||||
|
|
||||||
|
// to build FastAerosol cloud
|
||||||
|
#include "FastAerosolSolid.hh"
|
||||||
|
|
||||||
|
// to build parameterised cloud
|
||||||
|
#include "FACloudParameterisation.hh"
|
||||||
|
#include "G4PVParameterised.hh"
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
// step limits
|
||||||
|
#include "G4UserLimits.hh"
|
||||||
|
|
||||||
|
// visualization
|
||||||
|
#include "G4VisAttributes.hh"
|
||||||
|
#include "G4Colour.hh"
|
||||||
|
|
||||||
|
// to save distribution
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <ctime> // for measuring FastAerosol droplet center population time
|
||||||
|
|
||||||
|
|
||||||
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||||
|
|
||||||
|
DetectorConstruction::DetectorConstruction()
|
||||||
|
: G4VUserDetectorConstruction(),
|
||||||
|
fScoringVolume(0)
|
||||||
|
{
|
||||||
|
fMessenger = new DetectorConstructionMessenger(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||||
|
|
||||||
|
DetectorConstruction::~DetectorConstruction()
|
||||||
|
{
|
||||||
|
delete fMessenger;
|
||||||
|
|
||||||
|
delete fStepLimits;
|
||||||
|
|
||||||
|
delete fCloudShape;
|
||||||
|
delete fDropletShape;
|
||||||
|
|
||||||
|
delete fCloud;
|
||||||
|
}
|
||||||
|
|
||||||
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||||
|
|
||||||
|
G4VPhysicalVolume* DetectorConstruction::Construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Check cloud build settings
|
||||||
|
//
|
||||||
|
if (fFastAerosolCloud + fParameterisedCloud + fSmoothCloud > 1)
|
||||||
|
{
|
||||||
|
std::ostringstream message;
|
||||||
|
message << "Must select at most one build type! Selections:" << G4endl
|
||||||
|
<< " fFastAerosolCloud = " << fFastAerosolCloud << G4endl
|
||||||
|
<< " fParameterisedCloud = " << fParameterisedCloud << G4endl
|
||||||
|
<< " fSmoothCloud = " << fSmoothCloud << G4endl;
|
||||||
|
G4Exception("DetectorConstruction::Construct()", "GeomSolids0002",
|
||||||
|
FatalException, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Get nist material manager
|
||||||
|
//
|
||||||
|
G4NistManager* nist = G4NistManager::Instance();
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Option to switch on/off checking of volumes overlaps
|
||||||
|
//
|
||||||
|
G4bool checkOverlaps = false;
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Large scale geometry dimensions
|
||||||
|
//
|
||||||
|
G4double cloud_sizeXY = 0.5*m;
|
||||||
|
G4double cloud_sizeZ = 5.0*m;
|
||||||
|
|
||||||
|
G4double world_sizeXY = 1.1*(cloud_sizeXY);
|
||||||
|
G4double world_sizeZ= 1.1*(cloud_sizeZ);
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Cloud shape
|
||||||
|
//
|
||||||
|
if (fCloudShapeStr == "box")
|
||||||
|
{
|
||||||
|
G4cout << "Cloud shape = box" << G4endl;
|
||||||
|
fCloudShape = new G4Box("cloudShape", 0.5*cloud_sizeXY, 0.5*cloud_sizeXY, 0.5*cloud_sizeZ);
|
||||||
|
}
|
||||||
|
else if (fCloudShapeStr == "ellipsoid")
|
||||||
|
{
|
||||||
|
G4cout << "Cloud shape = ellipsoid" << G4endl;
|
||||||
|
fCloudShape = new G4Ellipsoid("cloudShape", 0.5*cloud_sizeXY, 0.5*cloud_sizeXY, 0.5*cloud_sizeZ, 0, 0);
|
||||||
|
}
|
||||||
|
else if (fCloudShapeStr == "cylinder")
|
||||||
|
{
|
||||||
|
G4cout << "Cloud shape = cylinder" << G4endl;
|
||||||
|
fCloudShape = new G4Tubs("cloudShape", 0.0, 0.5*cloud_sizeXY, 0.5*cloud_sizeZ, 0, 360*deg);
|
||||||
|
}
|
||||||
|
else if (fCloudShapeStr == "pipe")
|
||||||
|
{
|
||||||
|
G4cout << "Cloud shape = pipe" << G4endl;
|
||||||
|
fCloudShape = new G4Tubs("cloudShape", 0.25*cloud_sizeXY, 0.5*cloud_sizeXY, 0.5*cloud_sizeZ, 0, 360.*deg);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::ostringstream message;
|
||||||
|
message << "Invalid cloud shape = " << fCloudShapeStr << "!";
|
||||||
|
G4Exception("DetectorConstruction::Construct()", "GeomSolids0002",
|
||||||
|
FatalException, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Droplet Shape
|
||||||
|
//
|
||||||
|
|
||||||
|
// The difference in radii of the maximal sphere (centered at the origin) contained in the droplet and the minimal sphere (centered at the origin) containing the droplet
|
||||||
|
G4double sphericalUncertainty = 0.0;
|
||||||
|
|
||||||
|
if (fDropletShapeStr == "sphere")
|
||||||
|
{
|
||||||
|
G4cout << "Droplet shape = sphere" << G4endl;
|
||||||
|
fDropletShape = new G4Orb("dropletSV", fDropletR);
|
||||||
|
sphericalUncertainty = 0.0;
|
||||||
|
}
|
||||||
|
else if (fDropletShapeStr == "halfSphere")
|
||||||
|
{
|
||||||
|
G4cout << "Droplet shape = halfSphere" << G4endl;
|
||||||
|
fDropletShape = new G4Sphere("dropletSV", 0.0, fDropletR,
|
||||||
|
0.0, 180.*deg,
|
||||||
|
0.0, 180.*deg);
|
||||||
|
sphericalUncertainty = fDropletR;
|
||||||
|
}
|
||||||
|
else if (fDropletShapeStr == "cylinder")
|
||||||
|
{
|
||||||
|
G4cout << "Droplet shape = cylinder" << G4endl;
|
||||||
|
fDropletShape = new G4Tubs("dropletSV", 0, fDropletR/std::sqrt(3), fDropletR/std::sqrt(3), 0, 360.*deg);
|
||||||
|
sphericalUncertainty = fDropletR*(1-1/std::sqrt(3));
|
||||||
|
}
|
||||||
|
else if (fDropletShapeStr == "box")
|
||||||
|
{
|
||||||
|
G4cout << "Droplet shape = box" << G4endl;
|
||||||
|
fDropletShape = new G4Box("dropletSV", fDropletR/std::sqrt(3), fDropletR/std::sqrt(3), fDropletR/std::sqrt(3));
|
||||||
|
sphericalUncertainty = fDropletR*(1-1/std::sqrt(3));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::ostringstream message;
|
||||||
|
message << "Invalid droplet shape = " << fCloudShapeStr << "!";
|
||||||
|
G4Exception("DetectorConstruction::Construct()", "GeomSolids0002",
|
||||||
|
FatalException, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Materials
|
||||||
|
//
|
||||||
|
|
||||||
|
// Compute the density of air at 14 km using the Barometric formula
|
||||||
|
// see, e.g., https://en.wikipedia.org/wiki/Density_of_air
|
||||||
|
G4double h = 14.0*km;
|
||||||
|
G4double p0 = 101325*hep_pascal;
|
||||||
|
G4double T0 = 288.15*kelvin;
|
||||||
|
G4double grav = 9.80665*m/(s*s);
|
||||||
|
G4double La = 0.0065*kelvin/m;
|
||||||
|
G4double R = 8.31447*joule/(mole*kelvin);
|
||||||
|
G4double M = 0.0289644*kg/mole;
|
||||||
|
G4double T = T0 - La*h;
|
||||||
|
G4double p = p0*std::pow(1-La*h/T0,grav*M/(R*La));
|
||||||
|
G4double air_density = p*M/(R*T);
|
||||||
|
|
||||||
|
// make materials and set densities
|
||||||
|
G4Material* air_mat = nist->BuildMaterialWithNewDensity("Atmosphere","G4_AIR",air_density);
|
||||||
|
G4Material* water_mat = nist->FindOrBuildMaterial("G4_WATER");
|
||||||
|
|
||||||
|
G4double water_density = water_mat->GetDensity();
|
||||||
|
G4double ice_density = 0.9168*g/cm3;
|
||||||
|
|
||||||
|
G4Material* ice_mat = new G4Material("Water ice ", ice_density, 1, kStateSolid, T, p);
|
||||||
|
ice_mat->AddMaterial(water_mat, 1.);
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Droplets
|
||||||
|
//
|
||||||
|
G4double droplet_density = water_density;
|
||||||
|
G4Material* droplet_mat = water_mat;
|
||||||
|
|
||||||
|
G4double droplet_count = fDropletNumDens*(fCloudShape->GetCubicVolume());
|
||||||
|
|
||||||
|
G4double droplet_volume = fDropletShape->GetCubicVolume();
|
||||||
|
G4double droplet_total_volume = droplet_count*droplet_volume;
|
||||||
|
|
||||||
|
G4double droplet_total_mass = droplet_total_volume*droplet_density;
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Cloud macroscopic quantities
|
||||||
|
//
|
||||||
|
G4double cloud_volume = fCloudShape->GetCubicVolume();
|
||||||
|
G4double cloud_air_volume = cloud_volume - droplet_total_volume;
|
||||||
|
G4double cloud_air_mass = air_density*cloud_air_volume;
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Step limit
|
||||||
|
//
|
||||||
|
fStepLimits = new G4UserLimits(fStepLim);
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Build world
|
||||||
|
//
|
||||||
|
G4Box* solidWorld =
|
||||||
|
new G4Box("World", //its name
|
||||||
|
0.5*world_sizeXY, //half x-span
|
||||||
|
0.5*world_sizeXY, //half y-span
|
||||||
|
0.5*world_sizeZ); //half z-span
|
||||||
|
|
||||||
|
G4LogicalVolume* logicWorld =
|
||||||
|
new G4LogicalVolume(solidWorld, //its solid
|
||||||
|
air_mat, //its material
|
||||||
|
"World"); //its name
|
||||||
|
|
||||||
|
logicWorld->SetUserLimits(fStepLimits);
|
||||||
|
|
||||||
|
G4VPhysicalVolume* physWorld =
|
||||||
|
new G4PVPlacement(0, //no rotation
|
||||||
|
G4ThreeVector(), //at (0,0,0)
|
||||||
|
logicWorld, //its logical volume
|
||||||
|
"World", //its name
|
||||||
|
0, //its mothervolume
|
||||||
|
false, //no boolean operation
|
||||||
|
0, //copy number
|
||||||
|
checkOverlaps); //overlaps checking
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Build cloud
|
||||||
|
//
|
||||||
|
G4LogicalVolume* logicCloud;
|
||||||
|
|
||||||
|
// **********************************************************
|
||||||
|
//
|
||||||
|
// Build the cloud using the FastAerosol geometry class
|
||||||
|
//
|
||||||
|
// ***********************************************************
|
||||||
|
if (fFastAerosolCloud) {
|
||||||
|
G4cout << "\nFastAerosol geometry with n=" << fDropletNumDens*mm3 << "/mm3, r=" << fDropletR/mm << "mm spheres.\n" << G4endl;
|
||||||
|
|
||||||
|
fCloud = new FastAerosol("cloud",
|
||||||
|
fCloudShape, //cloud shape
|
||||||
|
fDropletR, //bounding radius of droplets
|
||||||
|
fMinSpacing, //minimum spacing between droplets
|
||||||
|
fDropletNumDens, //approximate number of droplets in cloud
|
||||||
|
sphericalUncertainty); //uncertainty in distance to droplet surface from outside using just droplet's origin as info
|
||||||
|
fCloud->SetDropletsPerVoxel(4);
|
||||||
|
|
||||||
|
/*
|
||||||
|
fCloud = new FastAerosol("fCloud",
|
||||||
|
fCloudShape, //cloud shape
|
||||||
|
fDropletR, //bounding radius of droplets
|
||||||
|
fMinSpacing, //minimum spacing between droplets
|
||||||
|
fDropletNumDens, //approximate number of droplets in cloud
|
||||||
|
sphericalUncertainty, //uncertainty in distance to droplet surface from outside using just droplet's origin as info
|
||||||
|
[](G4ThreeVector pos) {return pos.x();}); //number density distribution function
|
||||||
|
*/
|
||||||
|
|
||||||
|
FastAerosolSolid* solidCloud =
|
||||||
|
new FastAerosolSolid("cloudSV", //its name
|
||||||
|
fCloud, //its shape
|
||||||
|
fDropletShape); //its droplets
|
||||||
|
|
||||||
|
/*
|
||||||
|
FastAerosolSolid* solidCloud =
|
||||||
|
new FastAerosolSolid("cloudSV", //its name
|
||||||
|
fCloud, //its shape
|
||||||
|
fDropletShape, //its droplets
|
||||||
|
[](G4ThreeVector) {G4RotationMatrix rotm = G4RotationMatrix(); rotm.rotateY(90.0*deg); return rotm;}); //droplet rotation function
|
||||||
|
*/
|
||||||
|
|
||||||
|
solidCloud->SetStepLim(fStepLim); //FastAerosol can use step limit to speed calculations
|
||||||
|
|
||||||
|
logicCloud =
|
||||||
|
new G4LogicalVolume(solidCloud, //its solid
|
||||||
|
droplet_mat, //its material
|
||||||
|
"cloudLV"); //its name
|
||||||
|
logicCloud->SetUserLimits(fStepLimits);
|
||||||
|
logicCloud->SetVisAttributes(G4VisAttributes(G4Colour(0.0,0.0,1.0,0.4)));
|
||||||
|
|
||||||
|
new G4PVPlacement(0, //no rotation
|
||||||
|
G4ThreeVector(), //at position
|
||||||
|
logicCloud, //its logical volume
|
||||||
|
"cloudPV", //its name
|
||||||
|
logicWorld, //its mother volume
|
||||||
|
false, //no boolean operation
|
||||||
|
0, //copy number
|
||||||
|
checkOverlaps); //overlaps checking
|
||||||
|
|
||||||
|
|
||||||
|
fCloud->SetSeed(fCloudSeed);
|
||||||
|
|
||||||
|
// fPrePopulate = whether to populate all voxels at the beginning or on the fly
|
||||||
|
if (fPrePopulate) {
|
||||||
|
// populate (proving it to the user by printing population reports)
|
||||||
|
clock_t t;
|
||||||
|
t = clock();
|
||||||
|
|
||||||
|
G4cout << "\nBefore populating" << G4endl;
|
||||||
|
G4cout << "=================" << G4endl;
|
||||||
|
fCloud->PrintPopulationReport();
|
||||||
|
G4cout << "\nPopulating..." << G4endl;
|
||||||
|
fCloud->PopulateAllGrids();
|
||||||
|
G4cout << "\nAfter populating" << G4endl;
|
||||||
|
G4cout << "================" << G4endl;
|
||||||
|
fCloud->PrintPopulationReport();
|
||||||
|
G4cout << G4endl;
|
||||||
|
|
||||||
|
t = clock() - t;
|
||||||
|
|
||||||
|
G4cout << "\nThis took " << ((float)t)/CLOCKS_PER_SEC << "s\n" << G4endl;
|
||||||
|
|
||||||
|
// make filename variables to save data
|
||||||
|
G4String rStr = std::to_string(fDropletR/mm);
|
||||||
|
rStr.erase ( rStr.find_last_not_of('0') + 1, std::string::npos ); // drop trailing 0
|
||||||
|
replace( rStr.begin(), rStr.end(), '.', 'p');
|
||||||
|
if (rStr.back() == 'p') { rStr.pop_back(); } // don't write "3p" for 3.0, just write "3"
|
||||||
|
|
||||||
|
// want to represent the number density as 1E-ApB for some A, B
|
||||||
|
G4int order10 = (G4int) -round(10*std::log10(fDropletNumDens*mm3)); // gives 10x the exponent rounded to the int (10x so we get two decimals)
|
||||||
|
G4int leading = order10 / 10; // first number
|
||||||
|
G4int trailing = order10 % 10; // second number
|
||||||
|
G4String nStr = "1E-" + std::to_string(leading) + "p" + std::to_string(trailing);
|
||||||
|
|
||||||
|
|
||||||
|
// save population time
|
||||||
|
std::ofstream file;
|
||||||
|
file.open("popTime_r" + rStr + "mm_n" + nStr + "mm-3.csv");
|
||||||
|
file << ((float)t)/CLOCKS_PER_SEC;
|
||||||
|
file.close();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// save distribution
|
||||||
|
G4String fName = "distribution_r" + rStr + "mm_n" + nStr + "mm-3.csv";
|
||||||
|
fCloud->SaveToFile(fName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// **********************************************************
|
||||||
|
//
|
||||||
|
// (For comparision/benchmarking) Build the cloud using G4VParameterized (does not use FastAerosol)
|
||||||
|
//
|
||||||
|
// ***********************************************************
|
||||||
|
|
||||||
|
// the droplet positions for this cloud are those saved in the "distribution" folder of our data
|
||||||
|
// this is to make comparable simulations between FastAerosol and parameterised clouds
|
||||||
|
// this requires that we first simulate FastAerosol (pre-populated) to generate the positions
|
||||||
|
|
||||||
|
else if (fParameterisedCloud)
|
||||||
|
{
|
||||||
|
G4cout << "\nParameterised geometry with n=" << fDropletNumDens*mm3 << "/mm3 and r=" << fDropletR/mm << "mm spheres.\n" << G4endl;
|
||||||
|
std::vector<G4ThreeVector> positions;
|
||||||
|
G4double x,y,z;
|
||||||
|
|
||||||
|
// load distribution file
|
||||||
|
G4String fName;
|
||||||
|
|
||||||
|
G4String rStr = std::to_string(fDropletR/mm);
|
||||||
|
rStr.erase ( rStr.find_last_not_of('0') + 1, std::string::npos ); // drop trailing 0
|
||||||
|
replace( rStr.begin(), rStr.end(), '.', 'p');
|
||||||
|
if (rStr.back() == 'p') { rStr.pop_back(); } // don't write "3p" for 3.0, just write "3"
|
||||||
|
|
||||||
|
// want to represent the number density as 1E-ApB for some A, B
|
||||||
|
G4int order10 = (G4int) -round(10*std::log10(fDropletNumDens*mm3)); // gives 10x the exponent rounded to the int (10x so we get two decimals)
|
||||||
|
G4int leading = order10 / 10; // first number
|
||||||
|
G4int trailing = order10 % 10; // second number
|
||||||
|
G4String nStr = "1E-" + std::to_string(leading) + "p" + std::to_string(trailing);
|
||||||
|
|
||||||
|
fName = "distribution_r" + rStr + "mm_n" + nStr + "mm-3.csv";
|
||||||
|
|
||||||
|
std::ifstream infile(fName);
|
||||||
|
std::string line;
|
||||||
|
|
||||||
|
while (getline(infile,line)) {
|
||||||
|
std::istringstream stream(line);
|
||||||
|
std::string field;
|
||||||
|
|
||||||
|
getline(stream,field,','); x = stod(field)*mm;
|
||||||
|
getline(stream,field,','); y = stod(field)*mm;
|
||||||
|
getline(stream,field,','); z = stod(field)*mm;
|
||||||
|
|
||||||
|
positions.push_back(G4ThreeVector(x,y,z));
|
||||||
|
}
|
||||||
|
|
||||||
|
G4VPVParameterisation* cloudParam =
|
||||||
|
new CloudParameterisation(positions);
|
||||||
|
|
||||||
|
G4Box* cloudBounding =
|
||||||
|
new G4Box("cloudBounding", //its name
|
||||||
|
0.5*cloud_sizeXY, //half x-span
|
||||||
|
0.5*cloud_sizeXY, //half y-span
|
||||||
|
0.5*cloud_sizeZ); //half z-span
|
||||||
|
|
||||||
|
logicCloud =
|
||||||
|
new G4LogicalVolume(cloudBounding, //its solid
|
||||||
|
air_mat, //its material
|
||||||
|
"cloudLV"); //its name
|
||||||
|
|
||||||
|
logicCloud->SetSmartless(fSmartless);
|
||||||
|
logicCloud->SetUserLimits(fStepLimits);
|
||||||
|
logicCloud->SetVisAttributes(G4VisAttributes(false));
|
||||||
|
|
||||||
|
new G4PVPlacement(0, //no rotation
|
||||||
|
G4ThreeVector(), //at position
|
||||||
|
logicCloud, //its logical volume
|
||||||
|
"cloudPV", //its name
|
||||||
|
logicWorld, //its mothervolume
|
||||||
|
false, //no boolean operation
|
||||||
|
0, //copy number
|
||||||
|
checkOverlaps); //overlaps checking
|
||||||
|
|
||||||
|
G4LogicalVolume* logicDroplet =
|
||||||
|
new G4LogicalVolume(fDropletShape, //its solid
|
||||||
|
droplet_mat, //its material
|
||||||
|
"dropletLV"); //its name
|
||||||
|
|
||||||
|
logicDroplet->SetUserLimits(fStepLimits);
|
||||||
|
|
||||||
|
/*G4PVParameterised* paramDroplet =*/
|
||||||
|
new G4PVParameterised("droplets", //its name
|
||||||
|
logicDroplet, //droplet logical volume
|
||||||
|
logicCloud, //mother logical volume
|
||||||
|
kUndefined, //droplets placed along this axis
|
||||||
|
positions.size(), //number of droplets
|
||||||
|
cloudParam); //the parametrisation
|
||||||
|
}
|
||||||
|
// **********************************************************
|
||||||
|
//
|
||||||
|
// (For comparision/benchmarking) Simulate the cloud by smearing droplets out into a single solid (does not use FastAerosol)
|
||||||
|
//
|
||||||
|
// ***********************************************************
|
||||||
|
else if (fSmoothCloud)
|
||||||
|
{
|
||||||
|
G4cout << "\nSmooth geometry based on a cloud of n=" << fDropletNumDens*mm3 << "/mm3 and r=" << fDropletR/mm << "mm spheres.\n" << G4endl;
|
||||||
|
// build cloud by smearing the droplets uniformly across the cloud volume, for comparison/benchmarking purposes (does not use FastAerosol)
|
||||||
|
G4Material* cloud_mat = new G4Material("Cloud", (droplet_total_mass+cloud_air_mass)/cloud_volume, 2);
|
||||||
|
cloud_mat->AddMaterial(droplet_mat, droplet_total_mass/(cloud_air_mass+droplet_total_mass));
|
||||||
|
cloud_mat->AddMaterial(air_mat, cloud_air_mass/(cloud_air_mass+droplet_total_mass));
|
||||||
|
|
||||||
|
logicCloud =
|
||||||
|
new G4LogicalVolume(fCloudShape, //its solid
|
||||||
|
cloud_mat, //its material
|
||||||
|
"cloudLV"); //its name
|
||||||
|
logicCloud->SetUserLimits(fStepLimits);
|
||||||
|
logicCloud->SetVisAttributes(G4VisAttributes(G4Colour(0.0,0.0,1.0,0.4)));
|
||||||
|
|
||||||
|
new G4PVPlacement(0, //no rotation
|
||||||
|
G4ThreeVector(), //at position
|
||||||
|
logicCloud, //its logical volume
|
||||||
|
"cloudPV", //its name
|
||||||
|
logicWorld, //its mothervolume
|
||||||
|
false, //no boolean operation
|
||||||
|
0, //copy number
|
||||||
|
checkOverlaps); //overlaps checking
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
G4cout << "\nNo cloud.\n" << G4endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Build detector
|
||||||
|
//
|
||||||
|
G4double detector_sizeXY = cloud_sizeXY;
|
||||||
|
G4double detector_sizeZ = 0.05*m;
|
||||||
|
G4Material* detector_mat = nist->FindOrBuildMaterial("G4_Al");
|
||||||
|
G4ThreeVector detector_pos = G4ThreeVector(0, 0, 0.5*1.05*cloud_sizeZ);
|
||||||
|
|
||||||
|
G4Box* soldDetector =
|
||||||
|
new G4Box("detectorSV", //its name
|
||||||
|
0.5*detector_sizeXY, //half x-span
|
||||||
|
0.5*detector_sizeXY, //half y-span
|
||||||
|
0.5*detector_sizeZ); //half z-span
|
||||||
|
|
||||||
|
G4LogicalVolume* logicDetector =
|
||||||
|
new G4LogicalVolume(soldDetector, //its solid
|
||||||
|
detector_mat, //its material
|
||||||
|
"detectorLV"); //its name
|
||||||
|
|
||||||
|
logicDetector->SetUserLimits(fStepLimits);
|
||||||
|
|
||||||
|
new G4PVPlacement(0, //no rotation
|
||||||
|
detector_pos, //at position
|
||||||
|
logicDetector, //its logical volume
|
||||||
|
"detectorPV", //its name
|
||||||
|
logicWorld, //its mothervolume
|
||||||
|
false, //no boolean operation
|
||||||
|
0, //copy number
|
||||||
|
checkOverlaps); //overlaps checking
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Scoring Volume
|
||||||
|
//
|
||||||
|
fScoringVolume = logicDetector;
|
||||||
|
|
||||||
|
return physWorld;
|
||||||
|
}
|
||||||
|
|
||||||
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||||
@@ -0,0 +1,216 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// (adapted from B2aDetectorMessenger)
|
||||||
|
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||||
|
|
||||||
|
#include "FADetectorConstructionMessenger.hh"
|
||||||
|
#include "FADetectorConstruction.hh"
|
||||||
|
|
||||||
|
#include "G4UIcmdWithAnInteger.hh"
|
||||||
|
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||||
|
#include "G4UIcmdWithADouble.hh"
|
||||||
|
#include "G4UIcmdWithABool.hh"
|
||||||
|
#include "G4UIcmdWithAString.hh"
|
||||||
|
|
||||||
|
DetectorConstructionMessenger::DetectorConstructionMessenger(DetectorConstruction* detectorIn)
|
||||||
|
: G4UImessenger()
|
||||||
|
{
|
||||||
|
fDetector = detectorIn;
|
||||||
|
|
||||||
|
// Directory
|
||||||
|
//
|
||||||
|
// /geometry
|
||||||
|
fGeometryDirectory = new G4UIdirectory("/geometry/");
|
||||||
|
fGeometryDirectory->SetGuidance("Geometry setup.");
|
||||||
|
|
||||||
|
// Physics
|
||||||
|
//
|
||||||
|
// /geometry/stepLim
|
||||||
|
fStepLimCmd = new G4UIcmdWithADoubleAndUnit("/geometry/stepLim",this);
|
||||||
|
fStepLimCmd->SetGuidance("Maximum step length.");
|
||||||
|
fStepLimCmd->SetParameterName("stepLim",false);
|
||||||
|
fStepLimCmd->SetRange("stepLim>=0.");
|
||||||
|
fStepLimCmd->SetDefaultValue(DBL_MAX);
|
||||||
|
fStepLimCmd->SetDefaultUnit("mm");
|
||||||
|
fStepLimCmd->AvailableForStates(G4State_PreInit);
|
||||||
|
|
||||||
|
// Cloud droplet settings
|
||||||
|
// /geometry/dropletR
|
||||||
|
fDropletRCmd = new G4UIcmdWithADoubleAndUnit("/geometry/dropletR",this);
|
||||||
|
fDropletRCmd->SetGuidance("Minimal bounding radius of droplet.");
|
||||||
|
fDropletRCmd->SetParameterName("dropletR",false);
|
||||||
|
fDropletRCmd->SetRange("dropletR>0.");
|
||||||
|
fDropletRCmd->SetDefaultValue(1.0);
|
||||||
|
fDropletRCmd->SetDefaultUnit("mm");
|
||||||
|
fDropletRCmd->AvailableForStates(G4State_PreInit);
|
||||||
|
|
||||||
|
// /geometry/dropletNumDens
|
||||||
|
fDropletNumDensCmd = new G4UIcmdWithADouble("/geometry/dropletNumDens", this);
|
||||||
|
fDropletNumDensCmd->SetGuidance("Number of droplets per mm^3."); // would be nice to have official number density units
|
||||||
|
fDropletNumDensCmd->SetParameterName("dropletCOunt",false);
|
||||||
|
fDropletNumDensCmd->SetDefaultValue(0);
|
||||||
|
fDropletNumDensCmd->AvailableForStates(G4State_PreInit);
|
||||||
|
|
||||||
|
// Cloud build type
|
||||||
|
//
|
||||||
|
// /geometry/fastAerosol
|
||||||
|
fFastAerosolCloudCmd = new G4UIcmdWithABool("/geometry/fastAerosolCloud",this);
|
||||||
|
fFastAerosolCloudCmd->SetGuidance("Whether or not to build the fastAerosol cloud.");
|
||||||
|
fFastAerosolCloudCmd->SetParameterName("fastAerosol",false);
|
||||||
|
fFastAerosolCloudCmd->SetDefaultValue(false);
|
||||||
|
fFastAerosolCloudCmd->AvailableForStates(G4State_PreInit);
|
||||||
|
|
||||||
|
// /geometry/parameterisedCloud
|
||||||
|
fParameterisedCloudCmd = new G4UIcmdWithABool("/geometry/parameterisedCloud",this);
|
||||||
|
fParameterisedCloudCmd->SetGuidance("Whether or not to build the parameterised cloud.");
|
||||||
|
fParameterisedCloudCmd->SetParameterName("parameterisedCloud",false);
|
||||||
|
fParameterisedCloudCmd->SetDefaultValue(false);
|
||||||
|
fParameterisedCloudCmd->AvailableForStates(G4State_PreInit);
|
||||||
|
|
||||||
|
// /geometry/smoothCloud
|
||||||
|
fSmoothCloudCmd = new G4UIcmdWithABool("/geometry/smoothCloud",this);
|
||||||
|
fSmoothCloudCmd->SetGuidance("Whether or not to build the smooth cloud.");
|
||||||
|
fSmoothCloudCmd->SetParameterName("smoothCloud",false);
|
||||||
|
fSmoothCloudCmd->SetDefaultValue(false);
|
||||||
|
fSmoothCloudCmd->AvailableForStates(G4State_PreInit);
|
||||||
|
|
||||||
|
// fastAerosol cloud details
|
||||||
|
//
|
||||||
|
// /geometry/cloudShape
|
||||||
|
fCloudShapeCmd = new G4UIcmdWithAString("/geometry/cloudShape",this);
|
||||||
|
fCloudShapeCmd->SetGuidance("Cloud bulk shape");
|
||||||
|
fCloudShapeCmd->SetParameterName("cloudShapeStr",false);
|
||||||
|
fCloudShapeCmd->AvailableForStates(G4State_PreInit);
|
||||||
|
|
||||||
|
// /geometry/dropletShape
|
||||||
|
fDropletShapeCmd = new G4UIcmdWithAString("/geometry/dropletShape",this);
|
||||||
|
fDropletShapeCmd->SetGuidance("Cloud droplet shape");
|
||||||
|
fDropletShapeCmd->SetParameterName("dropletShapeStr",false);
|
||||||
|
fDropletShapeCmd->AvailableForStates(G4State_PreInit);
|
||||||
|
|
||||||
|
// /geometry/prePopulate
|
||||||
|
fPrePopulateCmd = new G4UIcmdWithABool("/geometry/prePopulate",this);
|
||||||
|
fPrePopulateCmd->SetGuidance("Whether or not to populate the cloud at the beginning.");
|
||||||
|
fPrePopulateCmd->SetParameterName("prePopulate",false);
|
||||||
|
fPrePopulateCmd->SetDefaultValue(false);
|
||||||
|
fPrePopulateCmd->AvailableForStates(G4State_PreInit);
|
||||||
|
|
||||||
|
// /geometry/minSpacing
|
||||||
|
fMinSpacingCmd = new G4UIcmdWithADoubleAndUnit("/geometry/minSpacing",this);
|
||||||
|
fMinSpacingCmd->SetGuidance("Minimum spacing between surfaces of spheres when generating random cloud of spheres.");
|
||||||
|
fMinSpacingCmd->SetParameterName("minSpacing",false);
|
||||||
|
fMinSpacingCmd->SetRange("minSpacing>0.");
|
||||||
|
fMinSpacingCmd->SetDefaultValue(10.);
|
||||||
|
fMinSpacingCmd->SetDefaultUnit("micrometer");
|
||||||
|
fMinSpacingCmd->AvailableForStates(G4State_PreInit);
|
||||||
|
|
||||||
|
// /geometry/setSmartless
|
||||||
|
fSmartlessCmd = new G4UIcmdWithADouble("/geometry/smartless", this);
|
||||||
|
fSmartlessCmd->SetGuidance("Set the 'smartless' parameter for the parameterised cloud.");
|
||||||
|
fSmartlessCmd->SetParameterName("smartless",false);
|
||||||
|
fSmartlessCmd->SetRange("smartless>0.");
|
||||||
|
fSmartlessCmd->SetDefaultValue(2.0);
|
||||||
|
fSmartlessCmd->AvailableForStates(G4State_PreInit);
|
||||||
|
|
||||||
|
// /geometry/cloudSeed
|
||||||
|
fCloudSeedCmd = new G4UIcmdWithAnInteger("/geometry/cloudSeed", this);
|
||||||
|
fCloudSeedCmd->SetGuidance("Base of the random seed for the cloud sphere positions.");
|
||||||
|
fCloudSeedCmd->SetParameterName("cloudSeed",false);
|
||||||
|
fCloudSeedCmd->SetDefaultValue(0);
|
||||||
|
fCloudSeedCmd->AvailableForStates(G4State_PreInit);
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectorConstructionMessenger::~DetectorConstructionMessenger()
|
||||||
|
{
|
||||||
|
delete fGeometryDirectory;
|
||||||
|
|
||||||
|
delete fStepLimCmd;
|
||||||
|
|
||||||
|
delete fDropletRCmd;
|
||||||
|
delete fDropletNumDensCmd;
|
||||||
|
|
||||||
|
delete fFastAerosolCloudCmd;
|
||||||
|
delete fParameterisedCloudCmd;
|
||||||
|
delete fSmoothCloudCmd;
|
||||||
|
|
||||||
|
delete fCloudShapeCmd;
|
||||||
|
delete fDropletShapeCmd;
|
||||||
|
delete fPrePopulateCmd;
|
||||||
|
delete fMinSpacingCmd;
|
||||||
|
//delete fGridPitchCmd;
|
||||||
|
|
||||||
|
delete fSmartlessCmd;
|
||||||
|
|
||||||
|
delete fCloudSeedCmd;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DetectorConstructionMessenger::SetNewValue( G4UIcommand* command, G4String newValue)
|
||||||
|
{
|
||||||
|
// Geometry Commands
|
||||||
|
|
||||||
|
if( command == fFastAerosolCloudCmd ) {
|
||||||
|
fDetector->fFastAerosolCloud = (fFastAerosolCloudCmd->GetNewBoolValue(newValue));
|
||||||
|
}
|
||||||
|
|
||||||
|
if( command == fStepLimCmd ) {
|
||||||
|
fDetector->fStepLim = (fStepLimCmd->GetNewDoubleValue(newValue));
|
||||||
|
}
|
||||||
|
|
||||||
|
if( command == fDropletRCmd ) {
|
||||||
|
fDetector->fDropletR = (fDropletRCmd->GetNewDoubleValue(newValue));
|
||||||
|
}
|
||||||
|
if( command == fDropletNumDensCmd ) {
|
||||||
|
fDetector->fDropletNumDens = (fDropletNumDensCmd->GetNewDoubleValue(newValue));
|
||||||
|
}
|
||||||
|
|
||||||
|
if( command == fParameterisedCloudCmd ) {
|
||||||
|
fDetector->fParameterisedCloud = (fParameterisedCloudCmd->GetNewBoolValue(newValue));
|
||||||
|
}
|
||||||
|
if( command == fSmoothCloudCmd ) {
|
||||||
|
fDetector->fSmoothCloud = (fSmoothCloudCmd->GetNewBoolValue(newValue));
|
||||||
|
}
|
||||||
|
if( command == fPrePopulateCmd ) {
|
||||||
|
fDetector->fPrePopulate = (fPrePopulateCmd->GetNewBoolValue(newValue));
|
||||||
|
}
|
||||||
|
|
||||||
|
if( command == fCloudShapeCmd ) {
|
||||||
|
fDetector->fCloudShapeStr = newValue;
|
||||||
|
}
|
||||||
|
if( command == fDropletShapeCmd ) {
|
||||||
|
fDetector->fDropletShapeStr = newValue;
|
||||||
|
}
|
||||||
|
if( command == fMinSpacingCmd ) {
|
||||||
|
fDetector->fMinSpacing = (fMinSpacingCmd->GetNewDoubleValue(newValue));
|
||||||
|
}
|
||||||
|
if( command == fSmartlessCmd ) {
|
||||||
|
fDetector->fSmartless = (fSmartlessCmd->GetNewDoubleValue(newValue));
|
||||||
|
}
|
||||||
|
if( command == fCloudSeedCmd ) {
|
||||||
|
fDetector->fCloudSeed = (fCloudSeedCmd->GetNewIntValue(newValue));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// (copied from B1EventAction)
|
||||||
|
|
||||||
|
#include "FAEventAction.hh"
|
||||||
|
#include "FARunAction.hh"
|
||||||
|
#include "G4Event.hh"
|
||||||
|
#include "G4RunManager.hh"
|
||||||
|
|
||||||
|
EventAction::EventAction(RunAction* runAction)
|
||||||
|
: G4UserEventAction(),
|
||||||
|
fRunAction(runAction),
|
||||||
|
fEdep(0.)
|
||||||
|
{}
|
||||||
|
|
||||||
|
EventAction::~EventAction()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void EventAction::BeginOfEventAction(const G4Event*)
|
||||||
|
{
|
||||||
|
fEdep = 0.;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EventAction::EndOfEventAction(const G4Event*)
|
||||||
|
{
|
||||||
|
// accumulate statistics in run action
|
||||||
|
fRunAction->AddEdep(fEdep);
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// (adapted from B1PrimaryGeneratorAction)
|
||||||
|
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||||
|
|
||||||
|
#include "FAPrimaryGeneratorAction.hh"
|
||||||
|
#include "G4LogicalVolumeStore.hh"
|
||||||
|
#include "G4LogicalVolume.hh"
|
||||||
|
#include "G4Box.hh"
|
||||||
|
#include "G4RunManager.hh"
|
||||||
|
#include "G4ParticleGun.hh"
|
||||||
|
#include "G4ParticleTable.hh"
|
||||||
|
#include "G4ParticleDefinition.hh"
|
||||||
|
#include "G4SystemOfUnits.hh"
|
||||||
|
#include "Randomize.hh"
|
||||||
|
|
||||||
|
PrimaryGeneratorAction::PrimaryGeneratorAction()
|
||||||
|
: G4VUserPrimaryGeneratorAction(),
|
||||||
|
fParticleGun(0),
|
||||||
|
fWorldBox(0)
|
||||||
|
{
|
||||||
|
G4int n_particle = 1;
|
||||||
|
fParticleGun = new G4ParticleGun(n_particle);
|
||||||
|
|
||||||
|
// default particle kinematic
|
||||||
|
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
|
||||||
|
G4String particleName;
|
||||||
|
G4ParticleDefinition* particle
|
||||||
|
= particleTable->FindParticle(particleName="proton");
|
||||||
|
fParticleGun->SetParticleDefinition(particle);
|
||||||
|
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
|
||||||
|
fParticleGun->SetParticleEnergy(50.*MeV);
|
||||||
|
}
|
||||||
|
|
||||||
|
PrimaryGeneratorAction::~PrimaryGeneratorAction()
|
||||||
|
{
|
||||||
|
delete fParticleGun;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||||
|
{
|
||||||
|
G4double worldSizeXY = 0;
|
||||||
|
G4double worldSizeZ = 0;
|
||||||
|
|
||||||
|
if (!fWorldBox)
|
||||||
|
{
|
||||||
|
G4LogicalVolume* worldLV
|
||||||
|
= G4LogicalVolumeStore::GetInstance()->GetVolume("World");
|
||||||
|
if ( worldLV ) fWorldBox = dynamic_cast<G4Box*>(worldLV->GetSolid());
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( fWorldBox ) {
|
||||||
|
worldSizeXY = fWorldBox->GetXHalfLength()*2.;
|
||||||
|
worldSizeZ = fWorldBox->GetZHalfLength()*2.;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
G4ExceptionDescription msg;
|
||||||
|
msg << "World volume of box shape not found.\n";
|
||||||
|
msg << "Perhaps you have changed geometry.\n";
|
||||||
|
msg << "The gun will be place at the center.";
|
||||||
|
G4Exception("PrimaryGeneratorAction::GeneratePrimaries()",
|
||||||
|
"MyCode0002",JustWarning,msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// shoot on XY disk centered on Z-axis behind the cloud
|
||||||
|
G4double sigma = worldSizeXY/10.0; // spread in x and y
|
||||||
|
G4double x0 = G4RandGauss::shoot(0,sigma);
|
||||||
|
G4double y0 = G4RandGauss::shoot(0,sigma);
|
||||||
|
G4double z0 = 0.95 * (-0.5) * worldSizeZ;
|
||||||
|
|
||||||
|
fParticleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
|
||||||
|
|
||||||
|
fParticleGun->GeneratePrimaryVertex(anEvent);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// (copied from B1RunAction)
|
||||||
|
|
||||||
|
#include "FARunAction.hh"
|
||||||
|
#include "FAPrimaryGeneratorAction.hh"
|
||||||
|
#include "FADetectorConstruction.hh"
|
||||||
|
|
||||||
|
#include "G4RunManager.hh"
|
||||||
|
#include "G4Run.hh"
|
||||||
|
#include "G4AccumulableManager.hh"
|
||||||
|
#include "G4LogicalVolumeStore.hh"
|
||||||
|
#include "G4LogicalVolume.hh"
|
||||||
|
#include "G4UnitsTable.hh"
|
||||||
|
#include "G4SystemOfUnits.hh"
|
||||||
|
|
||||||
|
RunAction::RunAction()
|
||||||
|
: G4UserRunAction(),
|
||||||
|
fEdep(0.),
|
||||||
|
fEdep2(0.)
|
||||||
|
{
|
||||||
|
// add new units for dose
|
||||||
|
//
|
||||||
|
const G4double milligray = 1.e-3*gray;
|
||||||
|
const G4double microgray = 1.e-6*gray;
|
||||||
|
const G4double nanogray = 1.e-9*gray;
|
||||||
|
const G4double picogray = 1.e-12*gray;
|
||||||
|
|
||||||
|
new G4UnitDefinition("milligray", "milliGy" , "Dose", milligray);
|
||||||
|
new G4UnitDefinition("microgray", "microGy" , "Dose", microgray);
|
||||||
|
new G4UnitDefinition("nanogray" , "nanoGy" , "Dose", nanogray);
|
||||||
|
new G4UnitDefinition("picogray" , "picoGy" , "Dose", picogray);
|
||||||
|
|
||||||
|
// Register accumulable to the accumulable manager
|
||||||
|
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
|
||||||
|
accumulableManager->RegisterAccumulable(fEdep);
|
||||||
|
accumulableManager->RegisterAccumulable(fEdep2);
|
||||||
|
}
|
||||||
|
|
||||||
|
RunAction::~RunAction()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void RunAction::BeginOfRunAction(const G4Run*)
|
||||||
|
{
|
||||||
|
// inform the runManager to save random number seed
|
||||||
|
G4RunManager::GetRunManager()->SetRandomNumberStore(false);
|
||||||
|
|
||||||
|
// reset accumulables to their initial values
|
||||||
|
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
|
||||||
|
accumulableManager->Reset();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void RunAction::EndOfRunAction(const G4Run* run)
|
||||||
|
{
|
||||||
|
G4int nofEvents = run->GetNumberOfEvent();
|
||||||
|
if (nofEvents == 0) return;
|
||||||
|
|
||||||
|
// Merge accumulables
|
||||||
|
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
|
||||||
|
accumulableManager->Merge();
|
||||||
|
|
||||||
|
// Compute dose = total energy deposit in a run and its variance
|
||||||
|
//
|
||||||
|
G4double edep = fEdep.GetValue();
|
||||||
|
G4double edep2 = fEdep2.GetValue();
|
||||||
|
|
||||||
|
G4double rms = edep2 - edep*edep/nofEvents;
|
||||||
|
if (rms > 0.) rms = std::sqrt(rms); else rms = 0.;
|
||||||
|
|
||||||
|
const DetectorConstruction* detectorConstruction
|
||||||
|
= static_cast<const DetectorConstruction*>
|
||||||
|
(G4RunManager::GetRunManager()->GetUserDetectorConstruction());
|
||||||
|
G4double mass = detectorConstruction->GetScoringVolume()->GetMass();
|
||||||
|
G4double dose = edep/mass;
|
||||||
|
G4double rmsDose = rms/mass;
|
||||||
|
|
||||||
|
// Run conditions
|
||||||
|
// note: There is no primary generator action object for "master"
|
||||||
|
// run manager for multi-threaded mode.
|
||||||
|
const PrimaryGeneratorAction* generatorAction
|
||||||
|
= static_cast<const PrimaryGeneratorAction*>
|
||||||
|
(G4RunManager::GetRunManager()->GetUserPrimaryGeneratorAction());
|
||||||
|
G4String runCondition;
|
||||||
|
if (generatorAction)
|
||||||
|
{
|
||||||
|
const G4ParticleGun* particleGun = generatorAction->GetParticleGun();
|
||||||
|
runCondition += particleGun->GetParticleDefinition()->GetParticleName();
|
||||||
|
runCondition += " of ";
|
||||||
|
G4double particleEnergy = particleGun->GetParticleEnergy();
|
||||||
|
runCondition += G4BestUnit(particleEnergy,"Energy");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Print
|
||||||
|
//
|
||||||
|
if (IsMaster()) {
|
||||||
|
G4cout
|
||||||
|
<< G4endl
|
||||||
|
<< "--------------------End of Global Run-----------------------";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
G4cout
|
||||||
|
<< G4endl
|
||||||
|
<< "--------------------End of Local Run------------------------";
|
||||||
|
}
|
||||||
|
|
||||||
|
G4cout
|
||||||
|
<< G4endl
|
||||||
|
<< " The run consists of " << nofEvents << " "<< runCondition
|
||||||
|
<< G4endl
|
||||||
|
<< " Cumulated dose per run, in scoring volume : "
|
||||||
|
<< G4BestUnit(dose,"Dose") << " rms = " << G4BestUnit(rmsDose,"Dose")
|
||||||
|
<< G4endl
|
||||||
|
<< "------------------------------------------------------------"
|
||||||
|
<< G4endl
|
||||||
|
<< G4endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RunAction::AddEdep(G4double edep)
|
||||||
|
{
|
||||||
|
fEdep += edep;
|
||||||
|
fEdep2 += edep*edep;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// (copied from B1SteppingAction)
|
||||||
|
|
||||||
|
#include "FASteppingAction.hh"
|
||||||
|
#include "FAEventAction.hh"
|
||||||
|
#include "FADetectorConstruction.hh"
|
||||||
|
|
||||||
|
#include "G4Step.hh"
|
||||||
|
#include "G4Event.hh"
|
||||||
|
#include "G4RunManager.hh"
|
||||||
|
#include "G4LogicalVolume.hh"
|
||||||
|
|
||||||
|
SteppingAction::SteppingAction(EventAction* eventAction)
|
||||||
|
: G4UserSteppingAction(),
|
||||||
|
fEventAction(eventAction),
|
||||||
|
fScoringVolume(0)
|
||||||
|
{}
|
||||||
|
|
||||||
|
SteppingAction::~SteppingAction()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void SteppingAction::UserSteppingAction(const G4Step* step)
|
||||||
|
{
|
||||||
|
if (!fScoringVolume) {
|
||||||
|
const DetectorConstruction* detectorConstruction
|
||||||
|
= static_cast<const DetectorConstruction*>
|
||||||
|
(G4RunManager::GetRunManager()->GetUserDetectorConstruction());
|
||||||
|
fScoringVolume = detectorConstruction->GetScoringVolume();
|
||||||
|
}
|
||||||
|
|
||||||
|
// get volume of the current step
|
||||||
|
G4LogicalVolume* volume
|
||||||
|
= step->GetPreStepPoint()->GetTouchableHandle()
|
||||||
|
->GetVolume()->GetLogicalVolume();
|
||||||
|
|
||||||
|
// check if we are in scoring volume
|
||||||
|
if (volume != fScoringVolume) return;
|
||||||
|
|
||||||
|
// collect energy deposited in this step
|
||||||
|
G4double edepStep = step->GetTotalEnergyDeposit();
|
||||||
|
fEventAction->AddEdep(edepStep);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,456 @@
|
|||||||
|
//
|
||||||
|
// ********************************************************************
|
||||||
|
// * 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. *
|
||||||
|
// ********************************************************************
|
||||||
|
//
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
// Implementation for FastAerosolSolid class
|
||||||
|
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include "FastAerosolSolid.hh"
|
||||||
|
|
||||||
|
#include "G4SystemOfUnits.hh"
|
||||||
|
|
||||||
|
// calculate extent
|
||||||
|
#include "G4BoundingEnvelope.hh"
|
||||||
|
#include "G4AffineTransform.hh"
|
||||||
|
#include "G4VoxelLimits.hh"
|
||||||
|
|
||||||
|
// visualization
|
||||||
|
#include "G4VGraphicsScene.hh"
|
||||||
|
#include "G4VisExtent.hh"
|
||||||
|
|
||||||
|
// polyhedron
|
||||||
|
#include "G4AutoLock.hh"
|
||||||
|
#include "G4Polyhedron.hh"
|
||||||
|
#include "HepPolyhedronProcessor.h"
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
G4Mutex polyhedronMutex = G4MUTEX_INITIALIZER;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Constructor
|
||||||
|
//
|
||||||
|
FastAerosolSolid::FastAerosolSolid(const G4String& pName,
|
||||||
|
FastAerosol* pCloud,
|
||||||
|
G4VSolid* pDroplet,
|
||||||
|
std::function<G4RotationMatrix (G4ThreeVector)> pRotation)
|
||||||
|
: G4VSolid(pName), fCloud(pCloud), fDroplet(pDroplet), fRotation(pRotation), fRebuildPolyhedron(false), fpPolyhedron(0)
|
||||||
|
{
|
||||||
|
// Get cloud size from fCloud
|
||||||
|
G4ThreeVector cloudPMin, cloudPMax;
|
||||||
|
fCloud->GetBoundingLimits(cloudPMin, cloudPMax);
|
||||||
|
|
||||||
|
fVisDx = cloudPMax.x();
|
||||||
|
fVisDy = cloudPMax.y();
|
||||||
|
fVisDz = cloudPMax.z();
|
||||||
|
|
||||||
|
// Check and set droplet radius
|
||||||
|
G4double pR = fCloud->GetRadius();
|
||||||
|
// would be nice to add a check to make sure pDroplet fits in sphere of radius pR
|
||||||
|
fR = pR;
|
||||||
|
|
||||||
|
fBulk = fCloud->GetBulk();
|
||||||
|
|
||||||
|
farFromCloudDist = fCloud->GetPreSphereR()*fR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Alternative constructor (constant rotation function)
|
||||||
|
//
|
||||||
|
FastAerosolSolid::FastAerosolSolid(const G4String& pName,
|
||||||
|
FastAerosol* pCloud,
|
||||||
|
G4VSolid* pDroplet):
|
||||||
|
FastAerosolSolid(pName, pCloud, pDroplet,
|
||||||
|
[](G4ThreeVector) {return G4RotationMatrix();})
|
||||||
|
{}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Fake default constructor - sets only member data and allocates memory
|
||||||
|
// for usage restricted to object persistency.
|
||||||
|
//
|
||||||
|
FastAerosolSolid::FastAerosolSolid( __void__& a )
|
||||||
|
: G4VSolid(a), fCloud(nullptr), fDroplet(nullptr),
|
||||||
|
fBulk(nullptr), fR(0.),
|
||||||
|
fVisDx(0.), fVisDy(0.), fVisDz(0.),
|
||||||
|
fCubicVolume(0.), fSurfaceArea(0.),
|
||||||
|
farFromCloudDist(0.),
|
||||||
|
fRotation([](G4ThreeVector) {return G4RotationMatrix();}),
|
||||||
|
fRebuildPolyhedron(false), fpPolyhedron(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Destructor
|
||||||
|
//
|
||||||
|
FastAerosolSolid::~FastAerosolSolid() {
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copy constructor
|
||||||
|
//
|
||||||
|
FastAerosolSolid::FastAerosolSolid(const FastAerosolSolid &rhs)
|
||||||
|
: G4VSolid(rhs), fCloud(rhs.fCloud), fDroplet(rhs.fDroplet),
|
||||||
|
fBulk(rhs.fBulk), fR(rhs.fR),
|
||||||
|
fVisDx(rhs.fVisDx), fVisDy(rhs.fVisDy), fVisDz(rhs.fVisDz),
|
||||||
|
fCubicVolume(rhs.fCubicVolume), fSurfaceArea(rhs.fSurfaceArea),
|
||||||
|
farFromCloudDist(rhs.farFromCloudDist),
|
||||||
|
fRotation(rhs.fRotation),
|
||||||
|
fRebuildPolyhedron(rhs.fRebuildPolyhedron), fpPolyhedron(rhs.fpPolyhedron)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Assignment operator
|
||||||
|
//
|
||||||
|
FastAerosolSolid &FastAerosolSolid::operator = (const FastAerosolSolid &rhs)
|
||||||
|
{
|
||||||
|
// Check assignment to self
|
||||||
|
//
|
||||||
|
if (this == &rhs)
|
||||||
|
{
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy base class data
|
||||||
|
//
|
||||||
|
G4VSolid::operator=(rhs);
|
||||||
|
|
||||||
|
// Copy data
|
||||||
|
//
|
||||||
|
fCloud = rhs.fCloud;
|
||||||
|
fDroplet = rhs.fDroplet;
|
||||||
|
fBulk = rhs.fBulk;
|
||||||
|
fR = rhs.fR;
|
||||||
|
fVisDx = rhs.fVisDx;
|
||||||
|
fVisDy = rhs.fVisDy;
|
||||||
|
fVisDz = rhs.fVisDz;
|
||||||
|
fCubicVolume = rhs.fCubicVolume;
|
||||||
|
fSurfaceArea = rhs.fSurfaceArea;
|
||||||
|
farFromCloudDist = rhs.farFromCloudDist;
|
||||||
|
fRotation = rhs.fRotation;
|
||||||
|
fRebuildPolyhedron = rhs.fRebuildPolyhedron;
|
||||||
|
fpPolyhedron = rhs.fpPolyhedron;
|
||||||
|
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Calculate extent under transform and specified limit
|
||||||
|
//
|
||||||
|
G4bool FastAerosolSolid::CalculateExtent(const EAxis pAxis,
|
||||||
|
const G4VoxelLimits &pVoxelLimit,
|
||||||
|
const G4AffineTransform &pTransform,
|
||||||
|
G4double &pMin, G4double &pMax) const
|
||||||
|
{
|
||||||
|
// Get smallest box to fully contain the cloud of objects, not just the centers
|
||||||
|
//
|
||||||
|
G4ThreeVector bmin, bmax;
|
||||||
|
fCloud->GetBoundingLimits(bmin, bmax);
|
||||||
|
|
||||||
|
// Find extent
|
||||||
|
//
|
||||||
|
G4BoundingEnvelope bbox(bmin, bmax);
|
||||||
|
return bbox.CalculateExtent(pAxis, pVoxelLimit, pTransform, pMin, pMax);
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Return whether point inside/outside/on surface
|
||||||
|
//
|
||||||
|
// This function assumes the cloud has at least 1 droplet
|
||||||
|
//
|
||||||
|
EInside FastAerosolSolid::Inside(const G4ThreeVector &p) const
|
||||||
|
{
|
||||||
|
G4ThreeVector center;
|
||||||
|
G4double closestDistance;
|
||||||
|
|
||||||
|
fCloud->GetNearestDroplet(p, center, closestDistance, fR, fDroplet, fRotation);
|
||||||
|
|
||||||
|
if (closestDistance==0.0)
|
||||||
|
{
|
||||||
|
G4RotationMatrix irotm = fRotation(center).inverse();
|
||||||
|
|
||||||
|
return fDroplet->Inside( irotm*(p - center) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return kOutside;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Return unit normal of surface closest to p
|
||||||
|
//
|
||||||
|
// This function assumes the cloud has at least 1 droplet
|
||||||
|
//
|
||||||
|
G4ThreeVector FastAerosolSolid::SurfaceNormal(const G4ThreeVector &p) const
|
||||||
|
{
|
||||||
|
G4ThreeVector center;
|
||||||
|
G4double closestDistance;
|
||||||
|
|
||||||
|
fCloud->GetNearestDroplet(p, center, closestDistance, DBL_MAX, fDroplet, fRotation);
|
||||||
|
|
||||||
|
G4RotationMatrix rotm = fRotation(center);
|
||||||
|
|
||||||
|
return rotm*( fDroplet->SurfaceNormal( rotm.inverse()*(p - center) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Calculate distance to shape from outside, along normalised vector
|
||||||
|
//
|
||||||
|
// This CANNOT be an underestimate
|
||||||
|
//
|
||||||
|
G4double FastAerosolSolid::DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
|
||||||
|
{
|
||||||
|
G4ThreeVector center;
|
||||||
|
G4double closestDistance;
|
||||||
|
|
||||||
|
if (fCloud->GetNearestDroplet(p, v, center, closestDistance, fStepLim, fDroplet, fRotation)) // if we found a droplet within fStepLim of query
|
||||||
|
{
|
||||||
|
return closestDistance;
|
||||||
|
}
|
||||||
|
else if (fCloud->DistanceToCloud(p,v)<DBL_MAX) // if there is cloud in front of us
|
||||||
|
{
|
||||||
|
return 1.1*fStepLim;
|
||||||
|
}
|
||||||
|
else // flying away from cloud
|
||||||
|
{
|
||||||
|
return kInfinity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Calculate distance (<= actual) to closest surface of shape from outside
|
||||||
|
//
|
||||||
|
// This function assumes the cloud has at least 1 droplet
|
||||||
|
//
|
||||||
|
// This can be an underestimate
|
||||||
|
//
|
||||||
|
G4double FastAerosolSolid::DistanceToIn(const G4ThreeVector &p) const
|
||||||
|
{
|
||||||
|
G4ThreeVector center;
|
||||||
|
G4double closestDistance;
|
||||||
|
|
||||||
|
G4double distanceToCloud = fBulk->DistanceToIn(p);
|
||||||
|
|
||||||
|
if (fBulk->Inside(p)==kOutside && distanceToCloud>=farFromCloudDist)
|
||||||
|
{
|
||||||
|
return distanceToCloud;
|
||||||
|
}
|
||||||
|
else if (fCloud->GetNearestDroplet(p, center, closestDistance, fStepLim, fDroplet, fRotation)) // if we found a droplet within fStepLim of query
|
||||||
|
{
|
||||||
|
return closestDistance;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 1.1*fStepLim;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Calculate distance (<= actual) to closest surface of shape from inside
|
||||||
|
//
|
||||||
|
// Despite being a vector distance, we find the absolutely closest
|
||||||
|
// droplet to our point since we assume that p is in a droplet and p
|
||||||
|
// could be past the center
|
||||||
|
//
|
||||||
|
// This CANNOT be an underestimate
|
||||||
|
//
|
||||||
|
G4double FastAerosolSolid::DistanceToOut(const G4ThreeVector &p,
|
||||||
|
const G4ThreeVector &v,
|
||||||
|
const G4bool calcNorm,
|
||||||
|
G4bool *validNorm,
|
||||||
|
G4ThreeVector *n) const
|
||||||
|
{
|
||||||
|
G4ThreeVector center;
|
||||||
|
G4double distanceToIn; // should be 0
|
||||||
|
|
||||||
|
fCloud->GetNearestDroplet(p, center, distanceToIn, fR, fDroplet, fRotation); // if we call this function, must be inside and thus must have a droplet within fR
|
||||||
|
|
||||||
|
G4RotationMatrix rotm = fRotation(center);
|
||||||
|
G4RotationMatrix irotm = rotm.inverse();
|
||||||
|
|
||||||
|
G4ThreeVector relPos = irotm*(p-center);
|
||||||
|
|
||||||
|
if (fDroplet->Inside(relPos) == kOutside) // something went wrong... we should be inside
|
||||||
|
{
|
||||||
|
std::ostringstream message;
|
||||||
|
message << std::setprecision(15) << "The particle at point p = " << p/mm << "mm"
|
||||||
|
<< std::setprecision(15) << " called DistanceToOut(p,v) and found the closest droplet to be at center = " << center/mm << "mm"
|
||||||
|
<< " but p is outside the droplet!";
|
||||||
|
G4Exception("FastAerosolSolid::DistanceToOut()", "GeomSolids0002",
|
||||||
|
FatalErrorInArgument, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
G4double dist = fDroplet->DistanceToOut(relPos, irotm*v, calcNorm, validNorm, n);
|
||||||
|
*n = rotm*(*n);
|
||||||
|
*validNorm = false; // even if droplet is convex, the aerosol isn't
|
||||||
|
|
||||||
|
return dist;
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Calculate distance (<=actual) to closest surface of shape from inside
|
||||||
|
//
|
||||||
|
// This can be an underestimate
|
||||||
|
//
|
||||||
|
G4double FastAerosolSolid::DistanceToOut(const G4ThreeVector &p) const
|
||||||
|
{
|
||||||
|
G4ThreeVector center;
|
||||||
|
G4double distanceToIn; // should be 0
|
||||||
|
|
||||||
|
fCloud->GetNearestDroplet(p, center, distanceToIn, fR, fDroplet, fRotation); // if we call this function, must be inside and thus must have a droplet within fR
|
||||||
|
|
||||||
|
G4RotationMatrix irotm = fRotation(center).inverse();
|
||||||
|
G4ThreeVector relPos = irotm*(p-center);
|
||||||
|
|
||||||
|
if (fDroplet->Inside(relPos) == kOutside) // something went wrong... we should be inside
|
||||||
|
{
|
||||||
|
std::ostringstream message;
|
||||||
|
message << "The particle at point p = " << p/mm << "mm"
|
||||||
|
<< " called DistanceToOut(p) and found the closest droplet to be at center = " << center/mm << "mm"
|
||||||
|
<< " but p is outside the droplet!";
|
||||||
|
G4Exception("FastAerosolSolid::DistanceToOut()", "GeomSolids0002",
|
||||||
|
FatalErrorInArgument, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return fDroplet->DistanceToOut(relPos);
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// G4EntityType
|
||||||
|
//
|
||||||
|
G4GeometryType FastAerosolSolid::GetEntityType() const
|
||||||
|
{
|
||||||
|
return G4String("FastAerosolSolid");
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// G4EntityType
|
||||||
|
//
|
||||||
|
G4VSolid* FastAerosolSolid::Clone() const
|
||||||
|
{
|
||||||
|
return new FastAerosolSolid(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Stream object contents to an output stream
|
||||||
|
//
|
||||||
|
std::ostream &FastAerosolSolid::StreamInfo(std::ostream &os) const
|
||||||
|
{
|
||||||
|
os << "-----------------------------------------------------------\n"
|
||||||
|
<< " *** Dump for solid - " << GetName() << " ***\n"
|
||||||
|
<< " ===================================================\n"
|
||||||
|
<< " Solid type: FastAerosolSolid\n"
|
||||||
|
<< " Parameters: \n"
|
||||||
|
<< " numDroplets: " << fCloud->GetNumDroplets() << "\n"
|
||||||
|
<< " fDroplet type: " << fDroplet->GetName() << "\n"
|
||||||
|
<< " fDroplet parameters: \n";
|
||||||
|
fDroplet->StreamInfo(os);
|
||||||
|
os << "-----------------------------------------------------------\n";
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// GetPointOnSurface
|
||||||
|
//
|
||||||
|
// Currently hardcoded to look at all droplets, not just the populated ones
|
||||||
|
//
|
||||||
|
G4ThreeVector FastAerosolSolid::GetPointOnSurface() const
|
||||||
|
{
|
||||||
|
G4ThreeVector center;
|
||||||
|
G4double closestDistance;
|
||||||
|
|
||||||
|
G4double fDx = fCloud->GetXHalfLength();
|
||||||
|
G4double fDy = fCloud->GetYHalfLength();
|
||||||
|
G4double fDz = fCloud->GetZHalfLength();
|
||||||
|
|
||||||
|
G4ThreeVector p(2.0*fDx*G4UniformRand(),2.0*fDy*G4UniformRand(),2.0*fDz*G4UniformRand());
|
||||||
|
p -= G4ThreeVector(fDx, fDy, fDz);
|
||||||
|
|
||||||
|
fCloud->GetNearestDroplet(p, center, closestDistance, DBL_MAX, fDroplet, fRotation);
|
||||||
|
|
||||||
|
return(center + fRotation(center)*fDroplet->GetPointOnSurface());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Methods for visualisation
|
||||||
|
//
|
||||||
|
void FastAerosolSolid::DescribeYourselfTo (G4VGraphicsScene& scene) const
|
||||||
|
{
|
||||||
|
scene.AddSolid(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
G4VisExtent FastAerosolSolid::GetExtent() const
|
||||||
|
{
|
||||||
|
return G4VisExtent (-fVisDx, fVisDx, -fVisDy, fVisDy, -fVisDz, fVisDz);
|
||||||
|
}
|
||||||
|
|
||||||
|
G4Polyhedron* FastAerosolSolid::CreatePolyhedron () const
|
||||||
|
{
|
||||||
|
return fBulk->CreatePolyhedron();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// copied from G4Ellipsoid
|
||||||
|
G4Polyhedron* FastAerosolSolid::GetPolyhedron () const
|
||||||
|
{
|
||||||
|
if (!fpPolyhedron ||
|
||||||
|
fRebuildPolyhedron ||
|
||||||
|
fpPolyhedron->GetNumberOfRotationStepsAtTimeOfCreation() !=
|
||||||
|
fpPolyhedron->GetNumberOfRotationSteps())
|
||||||
|
{
|
||||||
|
G4AutoLock l(&polyhedronMutex);
|
||||||
|
delete fpPolyhedron;
|
||||||
|
fpPolyhedron = CreatePolyhedron();
|
||||||
|
fRebuildPolyhedron = false;
|
||||||
|
l.unlock();
|
||||||
|
}
|
||||||
|
return fpPolyhedron;
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# ------------
|
||||||
|
# random setup
|
||||||
|
# ------------
|
||||||
|
/geometry/cloudSeed 1 # random seed
|
||||||
|
|
||||||
|
# ---------------------------
|
||||||
|
# geometry setup (unchanging)
|
||||||
|
# ---------------------------
|
||||||
|
/geometry/minSpacing 0.01 mm # minimum spacing between droplets
|
||||||
|
/geometry/dropletNumDens 0.0002 # droplet number density. Hardcoded units (1/mm3)
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# geometry setup (changing)
|
||||||
|
# ------------------------
|
||||||
|
|
||||||
|
# choose only one build type out of the following 3:
|
||||||
|
# smooth cloud - model aerosol as a single volume model with background and droplet material in proper mass fraction
|
||||||
|
# fastAerosol cloud - model aerosol with the fastAerosol class
|
||||||
|
# parameterised cloud - model aerosol with a parameterised solid
|
||||||
|
|
||||||
|
/geometry/smoothCloud false # build as a single volume
|
||||||
|
/geometry/parameterisedCloud false # build as droplets described by G4VPVParameterisation. Must first generate droplet centers in distribution_r?mm_n?mm-3.csv
|
||||||
|
/geometry/fastAerosolCloud true # build as droplets described by fastAerosol and fastAerosolSolid
|
||||||
|
|
||||||
|
/geometry/prePopulate false # whether to populate all droplets at the beginning or not for fastAerosol
|
||||||
|
|
||||||
|
/geometry/dropletR 1 mm # minimum bounding radius of individual droplets
|
||||||
|
|
||||||
|
/geometry/cloudShape box # bulk shape of the aerosol
|
||||||
|
/geometry/dropletShape sphere # droplet shape
|
||||||
|
|
||||||
|
|
||||||
|
# initialize
|
||||||
|
# ----------
|
||||||
|
/run/initialize
|
||||||
|
|
||||||
|
/control/verbose 2
|
||||||
|
/run/verbose 2
|
||||||
|
/event/verbose 0
|
||||||
|
/tracking/verbose 1
|
||||||
|
|
||||||
|
|
||||||
|
# gun setup
|
||||||
|
# ---------
|
||||||
|
/gun/particle proton
|
||||||
|
/gun/energy 50 MeV
|
||||||
|
|
||||||
|
|
||||||
|
# score
|
||||||
|
# -----
|
||||||
|
/score/create/boxMesh detectorMesh
|
||||||
|
/score/mesh/boxSize 250 250 25 mm
|
||||||
|
/score/mesh/translate/xyz 0.0 0.0 2625 mm
|
||||||
|
/score/mesh/nBin 20 20 1
|
||||||
|
|
||||||
|
/score/quantity/energyDeposit eDep
|
||||||
|
|
||||||
|
/score/close
|
||||||
|
|
||||||
|
# shoot
|
||||||
|
# -----
|
||||||
|
/run/beamOn 10
|
||||||
|
|
||||||
|
# save
|
||||||
|
# ----
|
||||||
|
/score/dumpQuantityToFile detectorMesh eDep eDep_fastAerosol_r1p0mm_n1E-3p7mm-3_bulkbox_dropletsphere.csv
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
# Use these open statements to open selected visualization
|
||||||
|
#
|
||||||
|
# Use this open statement to create an OpenGL view:
|
||||||
|
/vis/open OGL 600x600-0+0
|
||||||
|
#
|
||||||
|
# Use this open statement to create an OpenInventor view:
|
||||||
|
#/vis/open OI
|
||||||
|
#
|
||||||
|
# Use this open statement to create a .prim file suitable for
|
||||||
|
# viewing in DAWN:
|
||||||
|
#/vis/open DAWNFILE
|
||||||
|
#
|
||||||
|
# Use this open statement to create a .heprep file suitable for
|
||||||
|
# viewing in HepRApp:
|
||||||
|
#/vis/open HepRepFile
|
||||||
|
#
|
||||||
|
# Use this open statement to create a .wrl file suitable for
|
||||||
|
# viewing in a VRML viewer:
|
||||||
|
#/vis/open VRML2FILE
|
||||||
|
#
|
||||||
|
# Disable auto refresh and quieten vis messages whilst scene and
|
||||||
|
# trajectories are established:
|
||||||
|
/vis/viewer/set/autoRefresh false
|
||||||
|
/vis/verbose errors
|
||||||
|
#
|
||||||
|
# Draw geometry:
|
||||||
|
/vis/drawVolume
|
||||||
|
#
|
||||||
|
# Specify view angle:
|
||||||
|
/vis/viewer/set/viewpointVector -1 0 0
|
||||||
|
/vis/viewer/set/lightsVector -1 0 0
|
||||||
|
#
|
||||||
|
# Specify style (surface, wireframe, auxiliary edges,...)
|
||||||
|
/vis/viewer/set/style wireframe
|
||||||
|
/vis/viewer/set/auxiliaryEdge true
|
||||||
|
/vis/viewer/set/lineSegmentsPerCircle 100
|
||||||
|
#
|
||||||
|
# Draw smooth trajectories at end of event, showing trajectory points
|
||||||
|
# as markers 2 pixels wide:
|
||||||
|
/vis/scene/add/trajectories smooth
|
||||||
|
/vis/modeling/trajectories/create/drawByCharge
|
||||||
|
/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
|
||||||
|
/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
|
||||||
|
# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
|
||||||
|
#
|
||||||
|
# Draw hits at end of event:
|
||||||
|
#/vis/scene/add/hits
|
||||||
|
#
|
||||||
|
# To draw only gammas:
|
||||||
|
#/vis/filtering/trajectories/create/particleFilter
|
||||||
|
#/vis/filtering/trajectories/particleFilter-0/add gamma
|
||||||
|
#
|
||||||
|
# To invert the above, drawing all particles except gammas,
|
||||||
|
# keep the above two lines but also add:
|
||||||
|
#/vis/filtering/trajectories/particleFilter-0/invert true
|
||||||
|
#
|
||||||
|
# Many other options are available with /vis/modeling and /vis/filtering.
|
||||||
|
# For example, to select colour by particle ID:
|
||||||
|
#/vis/modeling/trajectories/create/drawByParticleID
|
||||||
|
#/vis/modeling/trajectories/drawByParticleID-0/default/setDrawStepPts true
|
||||||
|
# To select or override default colours (note: e+ is blue by default):
|
||||||
|
#/vis/modeling/trajectories/list
|
||||||
|
#/vis/modeling/trajectories/drawByParticleID-0/set e+ yellow
|
||||||
|
#
|
||||||
|
# To superimpose all of the events from a given run:
|
||||||
|
/vis/scene/endOfEventAction accumulate
|
||||||
|
#
|
||||||
|
# Decorations
|
||||||
|
# Name
|
||||||
|
/vis/set/textColour green
|
||||||
|
/vis/set/textLayout right
|
||||||
|
/vis/scene/add/text2D 0.9 -.9 24 ! ! fastAerosol
|
||||||
|
# or, if your system does not support right-adjustment
|
||||||
|
#/vis/scene/add/text2D 0 -.9 24 ! ! fastAerosol
|
||||||
|
/vis/set/textLayout # Revert to normal (left adjusted) layout
|
||||||
|
/vis/set/textColour # Revert to default text colour (blue)
|
||||||
|
#
|
||||||
|
# Axes, scale, etc.
|
||||||
|
/vis/scene/add/scale # Simple scale line
|
||||||
|
/vis/scene/add/axes # Simple axes: x=red, y=green, z=blue.
|
||||||
|
/vis/scene/add/eventID # Drawn at end of event
|
||||||
|
/vis/scene/add/date # Date stamp
|
||||||
|
/vis/scene/add/logo2D # Simple logo
|
||||||
|
/vis/scene/add/logo # 3D logo
|
||||||
|
#
|
||||||
|
# Frame
|
||||||
|
/vis/set/colour red
|
||||||
|
/vis/set/lineWidth 2
|
||||||
|
/vis/scene/add/frame # Simple frame around the view
|
||||||
|
/vis/set/colour # Revert to default colour (white)
|
||||||
|
/vis/set/lineWidth # Revert to default line width (1.)
|
||||||
|
#
|
||||||
|
# Attach text to one edge of Shape1, with a small, fixed offset
|
||||||
|
#/vis/scene/add/text 0 6 -4 cm 18 4 4 Shape1
|
||||||
|
# Attach text to one corner of Shape2, with a small, fixed offset
|
||||||
|
#/vis/scene/add/text 6 7 10 cm 18 4 4 Shape2
|
||||||
|
#
|
||||||
|
# To get nice view
|
||||||
|
# Make the "World" box invisible
|
||||||
|
/vis/geometry/set/visibility World 0 false
|
||||||
|
# "Envelope" is transparent blue to represent water
|
||||||
|
/vis/viewer/set/style surface
|
||||||
|
/vis/viewer/set/hiddenMarker true
|
||||||
|
/vis/viewer/set/viewpointThetaPhi 120 150
|
||||||
|
#
|
||||||
|
# Re-establish auto refreshing and verbosity:
|
||||||
|
/vis/viewer/set/autoRefresh true
|
||||||
|
/vis/verbose warnings
|
||||||
|
#
|
||||||
|
# For file-based drivers, use this to create an empty detector view:
|
||||||
|
#/vis/viewer/flush
|
||||||
+2235
-2233
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,10 @@
|
|||||||
History file
|
History file
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
26.02.2020 - V.Ivanchenko, Tag gammaraytel-V10-06-00
|
||||||
|
GammaRayTelHadronPhysics, GammaRayTelIonPhysics - fixed
|
||||||
|
compilation problems due to incorrect FTFP instantiation
|
||||||
|
|
||||||
31.01.2019 - I.Hrivnacova, Tag gammaraytel-V10-05-00
|
31.01.2019 - I.Hrivnacova, Tag gammaraytel-V10-05-00
|
||||||
Merged GitHub PR #4: all Boolean operators now return G4bool.
|
Merged GitHub PR #4: all Boolean operators now return G4bool.
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -105,9 +105,9 @@ class GammaRayTelHadronPhysics : public G4VPhysicsConstructor
|
|||||||
// This method will be invoked in the Construct() method.
|
// This method will be invoked in the Construct() method.
|
||||||
// each physics process will be instantiated and
|
// each physics process will be instantiated and
|
||||||
// registered to the process manager of each particle type
|
// registered to the process manager of each particle type
|
||||||
void ConstructProcess();
|
void ConstructProcess();
|
||||||
|
|
||||||
protected:
|
private:
|
||||||
// Elastic Process
|
// Elastic Process
|
||||||
G4HadronElasticProcess theElasticProcess;
|
G4HadronElasticProcess theElasticProcess;
|
||||||
G4HadronElastic* theElasticModel;
|
G4HadronElastic* theElasticModel;
|
||||||
@@ -124,15 +124,7 @@ class GammaRayTelHadronPhysics : public G4VPhysicsConstructor
|
|||||||
G4PiMinusAbsorptionBertini thePionMinusAbsorption;
|
G4PiMinusAbsorptionBertini thePionMinusAbsorption;
|
||||||
|
|
||||||
// pi+ and pi-
|
// pi+ and pi-
|
||||||
|
|
||||||
G4TheoFSGenerator* theModel;
|
|
||||||
G4ExcitationHandler theHandler;
|
|
||||||
G4PreCompoundModel * thePreEquilib;
|
|
||||||
G4GeneratorPrecompoundInterface* theCascade;
|
|
||||||
G4FTFModel* theStringModel;
|
|
||||||
G4QGSMFragmentation theFragmentation;
|
|
||||||
G4ExcitedStringDecay * theStringDecay;
|
|
||||||
|
|
||||||
// K +
|
// K +
|
||||||
G4KaonPlusInelasticProcess theKaonPlusInelastic;
|
G4KaonPlusInelasticProcess theKaonPlusInelastic;
|
||||||
G4hMultipleScattering theKaonPlusMult;
|
G4hMultipleScattering theKaonPlusMult;
|
||||||
@@ -169,8 +161,6 @@ class GammaRayTelHadronPhysics : public G4VPhysicsConstructor
|
|||||||
|
|
||||||
// anti-neutron
|
// anti-neutron
|
||||||
G4AntiNeutronInelasticProcess theAntiNeutronInelastic;
|
G4AntiNeutronInelasticProcess theAntiNeutronInelastic;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -34,19 +34,14 @@
|
|||||||
#include "G4SystemOfUnits.hh"
|
#include "G4SystemOfUnits.hh"
|
||||||
#include "G4ShortLivedConstructor.hh"
|
#include "G4ShortLivedConstructor.hh"
|
||||||
#include "G4HadronicParameters.hh"
|
#include "G4HadronicParameters.hh"
|
||||||
|
#include "G4ProcessManager.hh"
|
||||||
|
|
||||||
GammaRayTelHadronPhysics::GammaRayTelHadronPhysics(const G4String& name)
|
GammaRayTelHadronPhysics::GammaRayTelHadronPhysics(const G4String& name)
|
||||||
: G4VPhysicsConstructor(name)
|
: G4VPhysicsConstructor(name)
|
||||||
{;}
|
{;}
|
||||||
|
|
||||||
GammaRayTelHadronPhysics::~GammaRayTelHadronPhysics()
|
GammaRayTelHadronPhysics::~GammaRayTelHadronPhysics()
|
||||||
{
|
{}
|
||||||
delete theStringDecay;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include "G4ProcessManager.hh"
|
|
||||||
|
|
||||||
|
|
||||||
void GammaRayTelHadronPhysics::ConstructProcess()
|
void GammaRayTelHadronPhysics::ConstructProcess()
|
||||||
@@ -71,13 +66,12 @@ void GammaRayTelHadronPhysics::ConstructProcess()
|
|||||||
const G4double theFTFMin = 4.0*GeV;
|
const G4double theFTFMin = 4.0*GeV;
|
||||||
const G4double theFTFMax = G4HadronicParameters::Instance()->GetMaxEnergy();
|
const G4double theFTFMax = G4HadronicParameters::Instance()->GetMaxEnergy();
|
||||||
|
|
||||||
theStringModel = new G4FTFModel;
|
G4FTFModel* theStringModel = new G4FTFModel;
|
||||||
theStringDecay = new G4ExcitedStringDecay( new G4LundStringFragmentation );
|
G4ExcitedStringDecay* theStringDecay = new G4ExcitedStringDecay();
|
||||||
theStringModel->SetFragmentationModel( theStringDecay );
|
theStringModel->SetFragmentationModel( theStringDecay );
|
||||||
thePreEquilib = new G4PreCompoundModel( new G4ExcitationHandler );
|
G4GeneratorPrecompoundInterface* theCascade = new G4GeneratorPrecompoundInterface();
|
||||||
theCascade = new G4GeneratorPrecompoundInterface( thePreEquilib );
|
|
||||||
|
|
||||||
theModel = new G4TheoFSGenerator( "FTFP" );
|
G4TheoFSGenerator* theModel = new G4TheoFSGenerator( "FTFP" );
|
||||||
theModel->SetHighEnergyGenerator( theStringModel );
|
theModel->SetHighEnergyGenerator( theStringModel );
|
||||||
theModel->SetTransport( theCascade );
|
theModel->SetTransport( theCascade );
|
||||||
theModel->SetMinEnergy( theFTFMin );
|
theModel->SetMinEnergy( theFTFMin );
|
||||||
@@ -98,7 +92,6 @@ void GammaRayTelHadronPhysics::ConstructProcess()
|
|||||||
G4VCrossSectionDataSet * thePiData = new G4CrossSectionPairGG( new G4PiNuclearCrossSection, 91*GeV );
|
G4VCrossSectionDataSet * thePiData = new G4CrossSectionPairGG( new G4PiNuclearCrossSection, 91*GeV );
|
||||||
G4VCrossSectionDataSet * theAntiNucleonData = new G4CrossSectionInelastic( new G4ComponentAntiNuclNuclearXS );
|
G4VCrossSectionDataSet * theAntiNucleonData = new G4CrossSectionInelastic( new G4ComponentAntiNuclNuclearXS );
|
||||||
|
|
||||||
|
|
||||||
// PionPlus
|
// PionPlus
|
||||||
G4ParticleDefinition* pion = G4PionPlus::PionPlusDefinition();
|
G4ParticleDefinition* pion = G4PionPlus::PionPlusDefinition();
|
||||||
pManager = pion ->GetProcessManager();
|
pManager = pion ->GetProcessManager();
|
||||||
|
|||||||
@@ -61,10 +61,9 @@ void GammaRayTelIonPhysics::ConstructProcess()
|
|||||||
const G4double theFTFMax = G4HadronicParameters::Instance()->GetMaxEnergy();
|
const G4double theFTFMax = G4HadronicParameters::Instance()->GetMaxEnergy();
|
||||||
|
|
||||||
G4FTFModel* theStringModel = new G4FTFModel;
|
G4FTFModel* theStringModel = new G4FTFModel;
|
||||||
G4ExcitedStringDecay* theStringDecay = new G4ExcitedStringDecay( new G4LundStringFragmentation );
|
G4ExcitedStringDecay* theStringDecay = new G4ExcitedStringDecay();
|
||||||
theStringModel->SetFragmentationModel( theStringDecay );
|
theStringModel->SetFragmentationModel( theStringDecay );
|
||||||
G4PreCompoundModel* thePreEquilib = new G4PreCompoundModel( new G4ExcitationHandler );
|
G4GeneratorPrecompoundInterface* theCascade = new G4GeneratorPrecompoundInterface();
|
||||||
G4GeneratorPrecompoundInterface* theCascade = new G4GeneratorPrecompoundInterface( thePreEquilib );
|
|
||||||
|
|
||||||
G4TheoFSGenerator* theModel = new G4TheoFSGenerator( "FTFP" );
|
G4TheoFSGenerator* theModel = new G4TheoFSGenerator( "FTFP" );
|
||||||
theModel->SetHighEnergyGenerator( theStringModel );
|
theModel->SetHighEnergyGenerator( theStringModel );
|
||||||
|
|||||||
@@ -8,10 +8,14 @@ https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamplesHadrontherapy
|
|||||||
History file of the Hadrontherapy application
|
History file of the Hadrontherapy application
|
||||||
====================================================
|
====================================================
|
||||||
|
|
||||||
|
06.03.2020 G.A.P. Cirrone; Tag: hadrontherapy-V10-06-00
|
||||||
|
- Many osolete macro files were deleted
|
||||||
|
- Code cleaning; removed ROOT script folder, other cosmetics
|
||||||
|
|
||||||
19.11.2019 G. Folger Tag: hadrontherapy-V10-05-02
|
19.11.2019 G. Folger Tag: hadrontherapy-V10-05-02
|
||||||
- remove using namespace std from header files:
|
- remove using namespace std from header files:
|
||||||
HadrontherapyElectricTabulatedField3D.hh and HadrontherapyMagneticField3D.hh
|
HadrontherapyElectricTabulatedField3D.hh and HadrontherapyMagneticField3D.hh
|
||||||
put the using into the .cc file, and make use of endl consistent with g4cout or std::cout
|
put the using into the .cc file, and make use of endl consistent with g4cout or std::cout
|
||||||
|
|
||||||
30.10.2019, S. Guatelli, Tag: hadrontherapy-V10-05-01
|
30.10.2019, S. Guatelli, Tag: hadrontherapy-V10-05-01
|
||||||
- namespace std deleted
|
- namespace std deleted
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
The Root scripts (files with extension .C) contained in this directory, when executed with ROOT program
|
|
||||||
(with the command .x scriptName.C) perform a comparison beetween the experimental data files and simulation output.
|
|
||||||
Each subdirectory (proton, etc) contains a specific ROOT script.
|
|
||||||
|
|
||||||
--> proton/BraggPeak
|
|
||||||
comparison.C performs a comparison beetwen non modulated Bragg peaks
|
|
||||||
comparison_ascii.C performs a comparisin between non modulated Bragg peaks, reading simulated data from ASCII file
|
|
||||||
|
|
||||||
All the scripts in the iaeaBenchmark/ -directory apply to results produced using the IAEA geometry
|
|
||||||
-->iaeaBenchmark/braggPeak.C
|
|
||||||
carbon-12 bragg peak plot
|
|
||||||
|
|
||||||
--> iaeaBenchmark/checkBeam.C
|
|
||||||
Macro for checking beam FWHM
|
|
||||||
|
|
||||||
--> iaeaBenchmark/fragmentAngularDistribution.C
|
|
||||||
Produces a histogram of the angular distribution of a certain type of charged fragment (default Z=1) interactively
|
|
||||||
|
|
||||||
--> iaeaBenchmark/fragmentAngularDistributionGM.C
|
|
||||||
Produces a histogram of the angular distribution of a certain type of charged fragment (default Z=1) interactively
|
|
||||||
|
|
||||||
--> iaeaBenchmark/fragmentAngularDistributionHistogram.C
|
|
||||||
Produces a histogram of the angular distribution of a certain type of charged fragment (default Z=1) interactively
|
|
||||||
|
|
||||||
--> iaeaBenchmark/fragmentEnergy.C
|
|
||||||
Plot fragment energy distributions
|
|
||||||
|
|
||||||
--> iaeaBenchmark/fragmentEnergyDistributionDifferentAngles.C
|
|
||||||
Plot fragment energy distributions
|
|
||||||
|
|
||||||
--> iaeaBenchmark/fragmentYields.C
|
|
||||||
Produces the yield calculations for fragments below the angle of 10 degrees
|
|
||||||
|
|
||||||
--> iaeaBenchmark/fragmentYieldsPlot.C
|
|
||||||
Produces the yield calculations for fragments below the angle of 10 degrees and compares to data
|
|
||||||
|
|
||||||
--> iaeaBenchmark/readExfor.C
|
|
||||||
Example script for reading datafile
|
|
||||||
|
|
||||||
--> iaeaBenchmark/rootlogon.C
|
|
||||||
Plotting style definition
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
// G.A.P.Cirrone (2009)
|
|
||||||
|
|
||||||
// Comparison beetwen experimental and simulated non modulated Bragg Peak
|
|
||||||
// Remember to run this file only if simulation has been run with the
|
|
||||||
// proton_therapy.mac file
|
|
||||||
|
|
||||||
{
|
|
||||||
gROOT->Reset();
|
|
||||||
#include "Riostream.h"
|
|
||||||
|
|
||||||
ifstream in;
|
|
||||||
|
|
||||||
|
|
||||||
// LOAD THE EXPERIMENTAL DATA FILE
|
|
||||||
// CONTAINED IN THE DIRECTORY
|
|
||||||
// hadrontherapy/experimentalData/proton/BraggPeak
|
|
||||||
TFile *experimentalFile = new TFile("../../../experimentalData/proton/BraggPeak/62MeVInWater.root","READ");
|
|
||||||
|
|
||||||
// HERE THE ROOT FILE IS INTERPRETED AS A TREE
|
|
||||||
TTree *experimentalTree = (TTree*)experimentalFile -> Get("Experimental62MeVInWater");
|
|
||||||
|
|
||||||
Float_t depthExp, EdepExp;
|
|
||||||
experimentalTree -> SetBranchAddress("EdepExp", &EdepExp);
|
|
||||||
experimentalTree -> SetBranchAddress("depthExp", &depthExp);
|
|
||||||
|
|
||||||
|
|
||||||
// CREATION AND NORMALISATION TO THE FIRST POINT OF AN NTUPLE CONTAINING THE EXPERIMENTAL DATA
|
|
||||||
TNtuple *ntupleExperimental = new TNtuple("ntupleExperimental","Protons, exp. data", "depthExp:EdepExp");
|
|
||||||
Int_t nentries = (Int_t)experimentalTree -> GetEntries();
|
|
||||||
for (Int_t i = 0; i<nentries; i++)
|
|
||||||
{
|
|
||||||
experimentalTree -> GetEntry(0);
|
|
||||||
Float_t normFactor = EdepExp;
|
|
||||||
experimentalTree -> GetEntry(i);
|
|
||||||
ntupleExperimental -> Fill(depthExp, EdepExp/normFactor);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// LOAD THE SIMULATION RESULT FILE
|
|
||||||
// CONTAINED IN THE DIRECTORY
|
|
||||||
// hadrontherapy/simulationResults/proton/BraggPeak
|
|
||||||
TFile *simulationFile = new TFile("../../../SimulationOutputs/proton/BraggPeak/protonBraggPeak.root","READ");
|
|
||||||
|
|
||||||
// EXTRACTION, FROM THE SIMULATION FILE OF THE INTERESTING HISTOGRAMS
|
|
||||||
TH1D *simulatedPeak = (TH1D*) simulationFile -> Get("braggPeak");
|
|
||||||
|
|
||||||
Float_t simulationNormalisationFactor = simulatedPeak -> GetBinContent(1);
|
|
||||||
simulatedPeak -> Scale(1/simulationNormalisationFactor);
|
|
||||||
|
|
||||||
|
|
||||||
TCanvas *c1 = new TCanvas ("c1","c1",200,10,600,400);
|
|
||||||
|
|
||||||
// PLOT
|
|
||||||
ntupleExperimental -> SetMarkerStyle(4);
|
|
||||||
simulatedPeak -> SetMarkerSize(2);
|
|
||||||
|
|
||||||
ntupleExperimental -> Draw("EdepExp:depthExp");
|
|
||||||
simulatedPeak-> Draw("same");
|
|
||||||
|
|
||||||
// LEGEND
|
|
||||||
leg = new TLegend(0.50,0.60,0.20,0.70);
|
|
||||||
leg -> SetTextSize(0.035);
|
|
||||||
leg -> SetFillColor(0);
|
|
||||||
leg -> AddEntry(ntupleExperimental, "Experiment","P");
|
|
||||||
leg -> AddEntry(simulatedPeak, "Simulation");
|
|
||||||
leg -> Draw();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
{
|
|
||||||
#include <vector>
|
|
||||||
gROOT->Reset();
|
|
||||||
ifstream in;
|
|
||||||
TFile * file = new TFile("Dose.root","RECREATE");
|
|
||||||
// LOAD THE EXPERIMENTAL DATA FILE
|
|
||||||
// CONTAINED IN THE DIRECTORY
|
|
||||||
// hadrontherapy/experimentalData/proton/BraggPeak
|
|
||||||
|
|
||||||
|
|
||||||
TNtuple *ntupleExperimental = new TNtuple("ntupleExperimental","Protons, exp. data", "depthExp:EdepExp");
|
|
||||||
|
|
||||||
vector <Float_t> vec_dose, vec_iX;
|
|
||||||
|
|
||||||
TString doseFileExp = "../../../experimentalData/proton/BraggPeak/62MeVInWater.out";
|
|
||||||
|
|
||||||
cout << "Reading file \" " << doseFileExp << "\" ... ";
|
|
||||||
Long64_t nlines = ntupleExperimental -> ReadFile(doseFileExp, "depthExp:EdepExp");
|
|
||||||
if (nlines <=0){cout << "Error: Check file \"" << doseFileExp << "\"\n"; return;}
|
|
||||||
|
|
||||||
printf("%d Experimental points found\n", nlines);
|
|
||||||
|
|
||||||
Float_t depthExp, EdepExp;
|
|
||||||
ntupleExperimental -> SetBranchAddress("EdepExp", &EdepExp);
|
|
||||||
ntupleExperimental -> SetBranchAddress("depthExp", &depthExp);
|
|
||||||
|
|
||||||
|
|
||||||
// CREATION AND NORMALISATION TO THE FIRST POINT OF AN NTUPLE CONTAINING THE EXPERIMENTAL DATA
|
|
||||||
Int_t nentries = (Int_t)ntupleExperimental -> GetEntries();
|
|
||||||
ntupleExperimental -> GetEntry(0);
|
|
||||||
Float_t normFactor = EdepExp;
|
|
||||||
for (Int_t l = 0; l<nentries; l++)
|
|
||||||
{
|
|
||||||
ntupleExperimental -> GetEntry(l);
|
|
||||||
vec_dose.push_back(EdepExp);
|
|
||||||
vec_iX.push_back(depthExp);
|
|
||||||
}
|
|
||||||
|
|
||||||
ntupleExperimental->Reset();
|
|
||||||
|
|
||||||
for (Int_t l=0;l<vec_dose.size();l++)
|
|
||||||
{
|
|
||||||
depthExp = vec_iX[l];
|
|
||||||
EdepExp = vec_dose[l]/normFactor;
|
|
||||||
ntupleExperimental -> Fill(depthExp, EdepExp);
|
|
||||||
}
|
|
||||||
|
|
||||||
//*****************************************************************************
|
|
||||||
// Load Simulation file
|
|
||||||
TString doseFileSim = "../../../SimulationOutputs/proton/BraggPeak/Dose.out";
|
|
||||||
TNtuple *TNtupleSim = new TNtuple("SimTree","dose from ascii file", "iX:jY:kZ:dose");
|
|
||||||
|
|
||||||
in.open(doseFileSim);
|
|
||||||
if (!in.is_open()){cout << "Error: Check file \"" << doseFileSim << "\"\n"; return;}
|
|
||||||
Char_t n[5];
|
|
||||||
Float_t f1, f2, f3, f4;
|
|
||||||
nlines = 0;
|
|
||||||
cout << "Reading file \" " << doseFileSim << "\" ... ";
|
|
||||||
// Skip j,j,k,Dose strings
|
|
||||||
in >> n >> n >> n >> n;
|
|
||||||
do{
|
|
||||||
in >> f1 >> f2 >> f3 >> f4;
|
|
||||||
nlines++;
|
|
||||||
TNtupleSim -> Fill(f1, f2, f3, f4);
|
|
||||||
nlines++;}
|
|
||||||
while(in.good());
|
|
||||||
|
|
||||||
if (nlines <= 0){cout << "\nNo data found! Check file \"" << doseFileSim << "\"\n"; return;}
|
|
||||||
in.close();
|
|
||||||
|
|
||||||
Float_t iX, dose, sumDose = 0., norm = 0. ;
|
|
||||||
TNtupleSim -> SetBranchAddress("dose", &dose);
|
|
||||||
TNtupleSim -> SetBranchAddress("iX", &iX);
|
|
||||||
|
|
||||||
// Normalize data to 1 at the entry!
|
|
||||||
|
|
||||||
nentries = (Int_t)TNtupleSim -> GetEntries();
|
|
||||||
TNtupleSim -> GetEntry(0);
|
|
||||||
Int_t oldX = iX;
|
|
||||||
vec_iX.clear();
|
|
||||||
vec_dose.clear();
|
|
||||||
// Sum dose along X --> i
|
|
||||||
for (Int_t l = 0; l<nentries; l++)
|
|
||||||
{
|
|
||||||
TNtupleSim -> GetEntry(l);
|
|
||||||
if (iX==oldX){ sumDose+=dose;}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
vec_dose.push_back(sumDose);
|
|
||||||
vec_iX.push_back(oldX);
|
|
||||||
sumDose = dose;
|
|
||||||
oldX = iX;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
printf("%d Simulated points found\n", vec_iX.size());
|
|
||||||
// Mean over the first points
|
|
||||||
for (Int_t l=0; l<5; l++)
|
|
||||||
{
|
|
||||||
norm +=vec_dose[l];
|
|
||||||
}
|
|
||||||
norm /=l;
|
|
||||||
|
|
||||||
TNtupleSim -> Reset();
|
|
||||||
// Fill with normalized values. I suppose that slabs/voxel are 0.2 mm depth
|
|
||||||
for (Int_t l=0;l<vec_dose.size();l++)
|
|
||||||
{
|
|
||||||
// Slabs (voxels) are 0.2 mm depth
|
|
||||||
iX = 0.1 + (vec_iX[l]*0.2);
|
|
||||||
dose = vec_dose[l]/norm;
|
|
||||||
TNtupleSim -> Fill(iX, 0, 0, dose);
|
|
||||||
}
|
|
||||||
|
|
||||||
TCanvas *c1 = new TCanvas ("c1","c1",200,10,600,400);
|
|
||||||
// Triangle
|
|
||||||
TNtupleSim-> SetMarkerStyle(26);
|
|
||||||
TNtupleSim-> SetMarkerSize(0.8);
|
|
||||||
// Square
|
|
||||||
//TNtupleSim-> SetMarkerStyle(25);
|
|
||||||
// Star
|
|
||||||
//TNtupleSim-> SetMarkerStyle(3);
|
|
||||||
// circle
|
|
||||||
ntupleExperimental -> SetMarkerStyle(4);
|
|
||||||
ntupleExperimental -> SetMarkerColor(2);
|
|
||||||
ntupleExperimental -> SetMarkerSize(0.8);
|
|
||||||
|
|
||||||
ntupleExperimental -> Draw("EdepExp:depthExp");
|
|
||||||
TNtupleSim -> Draw("dose:iX","","same");
|
|
||||||
|
|
||||||
|
|
||||||
// LEGEND
|
|
||||||
leg = new TLegend(0.50,0.60,0.20,0.70);
|
|
||||||
leg -> SetTextSize(0.035);
|
|
||||||
leg -> SetFillColor(0);
|
|
||||||
leg -> AddEntry(ntupleExperimental, "Experiment", "P");
|
|
||||||
leg -> AddEntry(TNtupleSim, "Simulation", "P");
|
|
||||||
leg -> Draw();
|
|
||||||
|
|
||||||
|
|
||||||
//c1->SaveAs("braggPeakComparison.pdf");
|
|
||||||
}
|
|
||||||
@@ -1,203 +0,0 @@
|
|||||||
2.83000 1.19127052
|
|
||||||
3.13302 1.19605815
|
|
||||||
3.43223 1.20025793
|
|
||||||
3.73195 1.20083716
|
|
||||||
4.03218 1.20716685
|
|
||||||
4.33266 1.21503907
|
|
||||||
4.63289 1.21565336
|
|
||||||
4.93236 1.22036277
|
|
||||||
5.23233 1.22640181
|
|
||||||
5.53231 1.23277227
|
|
||||||
5.83279 1.23215461
|
|
||||||
6.13302 1.24313161
|
|
||||||
6.43248 1.24596279
|
|
||||||
6.73220 1.25513042
|
|
||||||
7.03294 1.26001301
|
|
||||||
7.33291 1.26463577
|
|
||||||
7.63289 1.27339981
|
|
||||||
7.93261 1.27515311
|
|
||||||
8.23283 1.28398706
|
|
||||||
8.53306 1.28821428
|
|
||||||
8.83278 1.30024836
|
|
||||||
9.13225 1.30344739
|
|
||||||
9.43248 1.31579891
|
|
||||||
9.73270 1.31956695
|
|
||||||
10.03268 1.32434253
|
|
||||||
10.33265 1.33155068
|
|
||||||
10.63288 1.33944766
|
|
||||||
10.93311 1.35157211
|
|
||||||
11.23283 1.35285381
|
|
||||||
11.53280 1.36276550
|
|
||||||
11.83303 1.36561297
|
|
||||||
12.13300 1.37302473
|
|
||||||
12.43298 1.38263799
|
|
||||||
12.73270 1.38867732
|
|
||||||
12.83252 1.38054150
|
|
||||||
13.03267 1.39479438
|
|
||||||
13.23308 1.40177768
|
|
||||||
13.43298 1.40642523
|
|
||||||
13.63287 1.41399200
|
|
||||||
13.83277 1.41480223
|
|
||||||
14.03267 1.42004773
|
|
||||||
14.23308 1.42990268
|
|
||||||
14.43272 1.42072265
|
|
||||||
14.63313 1.43836504
|
|
||||||
14.83277 1.44989982
|
|
||||||
15.03267 1.45164569
|
|
||||||
15.23282 1.46184596
|
|
||||||
15.43246 1.45760482
|
|
||||||
15.63287 1.46750956
|
|
||||||
15.83302 1.47462666
|
|
||||||
16.03317 1.48009552
|
|
||||||
16.23282 1.48796321
|
|
||||||
16.43297 1.49513778
|
|
||||||
16.63261 1.50246608
|
|
||||||
16.83302 1.51185142
|
|
||||||
17.03317 1.51802306
|
|
||||||
17.23307 1.52801534
|
|
||||||
17.43297 1.53525124
|
|
||||||
17.63287 1.54418982
|
|
||||||
17.83276 1.54492472
|
|
||||||
18.03317 1.56420970
|
|
||||||
18.23307 1.57171670
|
|
||||||
18.43297 1.57647357
|
|
||||||
18.63286 1.58998638
|
|
||||||
18.83276 1.59989980
|
|
||||||
19.03291 1.60548658
|
|
||||||
19.23281 1.61980560
|
|
||||||
19.43296 1.62816070
|
|
||||||
19.63312 1.62944882
|
|
||||||
19.83301 1.64849308
|
|
||||||
20.03317 1.64996817
|
|
||||||
20.23306 1.66863824
|
|
||||||
20.43271 1.67764099
|
|
||||||
20.63311 1.69094464
|
|
||||||
20.83301 1.69526655
|
|
||||||
21.03316 1.71848564
|
|
||||||
21.23306 1.72911076
|
|
||||||
21.43296 1.74527996
|
|
||||||
21.63311 1.75340963
|
|
||||||
21.83276 1.77348753
|
|
||||||
22.03316 1.79104759
|
|
||||||
22.23128 1.80249281
|
|
||||||
22.43296 1.82429050
|
|
||||||
22.63311 1.84183067
|
|
||||||
22.83250 1.85321256
|
|
||||||
22.93258 1.86545342
|
|
||||||
23.03316 1.87446186
|
|
||||||
23.13273 1.88472760
|
|
||||||
23.23280 1.89372611
|
|
||||||
23.33313 1.89757601
|
|
||||||
23.43296 1.90990539
|
|
||||||
23.53252 1.92118614
|
|
||||||
23.63311 1.93062526
|
|
||||||
23.73217 1.94360545
|
|
||||||
23.83301 1.95330159
|
|
||||||
23.93283 1.96520631
|
|
||||||
24.03290 1.97618096
|
|
||||||
24.13247 1.98479106
|
|
||||||
24.23229 2.00200671
|
|
||||||
24.33288 2.01672462
|
|
||||||
24.43270 2.02298059
|
|
||||||
24.53278 2.04096272
|
|
||||||
24.63311 2.05395612
|
|
||||||
24.73217 2.06500870
|
|
||||||
24.83275 2.07972031
|
|
||||||
24.93283 2.09309829
|
|
||||||
25.03290 2.10789938
|
|
||||||
25.13298 2.12531626
|
|
||||||
25.23204 2.13764160
|
|
||||||
25.33288 2.15467386
|
|
||||||
25.43244 2.17851852
|
|
||||||
25.53303 2.19319304
|
|
||||||
25.63260 2.21371490
|
|
||||||
25.73267 2.23175362
|
|
||||||
25.83275 2.24818581
|
|
||||||
25.93257 2.26679014
|
|
||||||
26.03290 2.28681139
|
|
||||||
26.13196 2.30670460
|
|
||||||
26.23254 2.32851515
|
|
||||||
26.33287 2.34634619
|
|
||||||
26.43270 2.36599401
|
|
||||||
26.53277 2.39151846
|
|
||||||
26.63310 2.41427921
|
|
||||||
26.73242 2.44757978
|
|
||||||
26.83275 2.47402597
|
|
||||||
26.93308 2.50065524
|
|
||||||
27.03315 2.52998366
|
|
||||||
27.13272 2.56235662
|
|
||||||
27.23229 2.59075696
|
|
||||||
27.33262 2.62659453
|
|
||||||
27.43295 2.66052686
|
|
||||||
27.53226 2.69742151
|
|
||||||
27.63158 2.73333509
|
|
||||||
27.73292 2.77261216
|
|
||||||
27.83249 2.81621375
|
|
||||||
27.93307 2.85576240
|
|
||||||
28.03290 2.90265440
|
|
||||||
28.13297 2.94925613
|
|
||||||
28.23279 2.99109855
|
|
||||||
28.33312 3.03626471
|
|
||||||
28.43218 3.08289835
|
|
||||||
28.53302 3.14701438
|
|
||||||
28.63284 3.21113110
|
|
||||||
28.73267 3.27978980
|
|
||||||
28.83223 3.35854342
|
|
||||||
28.93282 3.43154626
|
|
||||||
29.03289 3.52010630
|
|
||||||
29.13272 3.62501730
|
|
||||||
29.23254 3.74397380
|
|
||||||
29.33312 3.87054638
|
|
||||||
29.43269 4.01363438
|
|
||||||
29.53251 4.18010753
|
|
||||||
29.63284 4.35492033
|
|
||||||
29.73241 4.54544455
|
|
||||||
29.83299 4.74712893
|
|
||||||
29.93307 4.95624315
|
|
||||||
30.03238 5.16575517
|
|
||||||
30.13297 5.16691417
|
|
||||||
30.23279 5.18690693
|
|
||||||
30.33287 5.01038238
|
|
||||||
30.53302 4.81064279
|
|
||||||
30.63284 4.29339952
|
|
||||||
30.73266 3.71160520
|
|
||||||
30.83223 3.10374924
|
|
||||||
30.93281 2.46022989
|
|
||||||
31.03314 1.86821525
|
|
||||||
31.13271 1.31102022
|
|
||||||
31.23279 0.89458176
|
|
||||||
31.33286 0.54620642
|
|
||||||
31.43243 0.32023949
|
|
||||||
31.53200 0.17508132
|
|
||||||
31.63309 0.08822773
|
|
||||||
31.73317 0.04228641
|
|
||||||
31.83299 0.01774494
|
|
||||||
31.93281 0.00717772
|
|
||||||
32.03314 0.00287175
|
|
||||||
32.13271 0.00133736
|
|
||||||
32.23253 0.00002863
|
|
||||||
32.33235 0.00000000
|
|
||||||
32.43294 0.00000000
|
|
||||||
32.53251 0.00000000
|
|
||||||
32.63207 0.00000000
|
|
||||||
32.73215 0.00000000
|
|
||||||
32.83223 0.00000000
|
|
||||||
32.93281 0.00000000
|
|
||||||
33.03289 0.00000000
|
|
||||||
33.13271 0.00000000
|
|
||||||
33.23202 0.00000000
|
|
||||||
33.33286 -0.00002873
|
|
||||||
33.43192 -0.00002983
|
|
||||||
33.53276 0.00000000
|
|
||||||
33.63258 -0.00002894
|
|
||||||
33.73266 0.00000000
|
|
||||||
33.83299 0.00000000
|
|
||||||
33.93230 0.00000000
|
|
||||||
34.03263 0.00000000
|
|
||||||
34.13271 0.00000000
|
|
||||||
34.23278 0.00000000
|
|
||||||
34.33286 0.00000000
|
|
||||||
34.43293 0.00000000
|
|
||||||
34.53276 0.00000000
|
|
||||||
34.63283 0.00000000
|
|
||||||
34.73291 0.00000000
|
|
||||||
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user