Import Geant4 11.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2021-12-12 17:16:06 +01:00
parent 80e2389dd8
commit 84f33a068c
593 changed files with 68589 additions and 1 deletions
@@ -0,0 +1,24 @@
///\file "persistency/gdml/.README.txt"
///\brief Examples gdml README page
/*! \page Examples_gdml Category "persistency/gdml"
This directory contains a set of examples showing the usage of the GDML
plugin module in Geant4.
- \link ExampleG01 G01 \endlink Simple example for importing and exporting simple GDML files.
- \link ExampleG02 G02 \endlink Sample application showing how to import/export different
geometry setups, including STEP Tools files and structures
integrating them in a real simulation application.
- \link ExampleG03 G03 \endlink Simple example showing how to import extensions to the GDML
schema.
- \link ExampleG04 G04 \endlink Simple example showing how to associate detector sensitivity
to a logical-volume, making use of the auxiliary-information.
See the README file inside each example for more detail.
*/
@@ -0,0 +1,58 @@
///\file "persistency/gdml/G01/.README.txt"
///\brief Example G01 README page
/*! \page ExampleG01 Example G01
\section G01_s1 GDML READ/WRITE
This example demonstrates the usage of the GDML reader and writer. It allows
to export geometry descriptions in an application independent format (GDML,
Geometry Description Markup Language).
The GDML files can be then used to interchange geometries between different
applications and users.
The detector construction consists of a call to GDMLProcessor which parses a
GDML file and returns the pointer to the world volume. The user can also write
her/his own GDML file and use it as the primary input format for her/his Geant4
application.
Several simple GDML files are provided:
- axes.gdml, showing loading and orientation of Cartesian axes;
- solids.gdml, list of all supported solids with placement;
- scale.gdml, a simple diamond structure made of extruded solids;
- divisionvol.gdml, a divided box;
- parameterized.gdml, a parameterised box;
- pTube.gdml, a parameterised tube;
- auxiliary.gdml, showing association of volume with auxiliary information;
- etc...
\section G01_s2 HOW TO BUILD THE EXAMPLE ?
- You need to have built the persistency/gdml module by having
set the -DGEANT4_USE_GDML=ON flag during the CMAKE configuration step,
as well as the -DXERCESC_ROOT_DIR=path_to_xercesc flag pointing to
the path where the XercesC XML parser package is installed in your system.
- Compile and link to generate the executable (in your CMAKE build directory):
\verbatim
make
\endverbatim
- Execute the application.
- For reading and visualize interactively a GDML file:
\verbatim
load_gdml [GDML-file-in].gdml
\endverbatim
- For reading, writing and visualize interactively a GDML file:
\verbatim
load_gdml [GDML-file-in].gdml [GDML-file-out].gdml
\endverbatim
- For reading, writing a GDML file and running in batch a macro:
\verbatim
load_gdml [GDML-file-in].gdml [GDML-file-out].gdml [macro].in
\endverbatim
*/
@@ -0,0 +1,49 @@
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
GDML read/write
---------------
This example demonstrates the usage of the GDML reader and writer. It allows
to export geometry descriptions in an application independent format (GDML,
Geometry Description Markup Language).
The GDML files can be then used to interchange geometries between different
applications and users.
The detector construction consists of a call to GDMLProcessor which parses a
GDML file and returns the pointer to the world volume. The user can also write
her/his own GDML file and use it as the primary input format for her/his Geant4
application.
Several simple GDML files are provided:
- axes.gdml, showing loading and orientation of Cartesian axes;
- solids.gdml, list of all supported solids with placement;
- scale.gdml, a simple diamond structure made of extruded solids;
- divisionvol.gdml, a divided box;
- parameterized.gdml, a parameterised box;
- pTube.gdml, a parameterised tube;
- auxiliary.gdml, showing association of volume with auxiliary information;
- etc...
HOW TO BUILD THE EXAMPLE ?
- You need to have built the persistency/gdml module by having
set the -DGEANT4_USE_GDML=ON flag during the CMAKE configuration step,
as well as the -DXERCESC_ROOT_DIR=<path_to_xercesc> flag pointing to
the path where the XercesC XML parser package is installed in your system.
- Compile and link to generate the executable (in your CMAKE build directory):
% make
- Execute the application.
o For reading and visualize interactively a GDML file:
% load_gdml [GDML-file-in].gdml
o For reading, writing and visualize interactively a GDML file:
% load_gdml [GDML-file-in].gdml [GDML-file-out].gdml
o For reading, writing a GDML file and running in batch a macro:
% load_gdml [GDML-file-in].gdml [GDML-file-out].gdml [macro].in
@@ -0,0 +1,57 @@
///\file "persistency/gdml/G02/.README.txt"
///\brief Example G02 README page
/*! \page ExampleG02 Example G02
\section G02_s1 EXAMPLE OF USE GDML READER/WRITER IN DETECTOR CONSTRUCTION
In this directory you can find a example showing how to use GDML module for
reading and writing. It is also shown how to Read STEP Tools files.
In this example the DetectorConstruction consists of a Simple Detector, then
this Detector is filled/written in GDML.
The different options for writing and reading GDML files are shown in the
Detector Construction: writing modular files, using different schema location,
setting parameters for names in GDML file, etc.
For more information, please, refer to the GDML Documentation.
The Geometry is a Simple Detector Box with 4 Subdetectors.
This setup shows how to use Reflection Factory, Assembly of Volumes and
Parameterisation.
Using commands or macros it possible to read or write GDML file.
\section G02_s2 HOW TO BUILD THE EXAMPLE ?
- You need to have built the persistency/gdml module by having
set the -DGEANT4_USE_GDML=ON flag during the CMAKE configuration step,
as well as the -DXERCESC_ROOT_DIR=path_to_xercesc flag pointing to
the path where the XercesC XML parser package is installed in your system.
- Compile and link to generate the executable (in your CMAKE build directory):
\verbatim
% make
\endverbatim
- Execute the application:
\verbatim
% geotest [macro-file].mac
\endverbatim
You can run this application with the following macro file:
- write_gdml.mac : This macro will write the Geometry defined in file
"test.gdml" and output to a new file wtest.gdml
To change this name you can use command :
/mydet/writeFile FileName.gdml
- read_gdml.mac : This macro will read the Geometry from file "test.gdml"
To change this name you can use command :
/mydet/readFile FileName.gdml
- read_step.mac : This macro will read the STEP Tool files "mbb.geom" and
"mbb.tree" and load them in memory.
To change this name you can use command :
/mydet/StepFile FileName
*/
@@ -0,0 +1,47 @@
-------------------------------------------------------------------
Example of use GDML reader/writer in Detector Construction
-----------------------------------------------------------
In this directory you can find a example showing how to use GDML module for
reading and writing. It is also shown how to Read STEP Tools files.
In this example the DetectorConstruction consists of a Simple Detector, then
this Detector is filled/written in GDML.
The different options for writing and reading GDML files are shown in the
Detector Construction: writing modular files, using different schema location,
setting parameters for names in GDML file, etc.
For more information, please, refer to the GDML Documentation.
The Geometry is a Simple Detector Box with 4 Subdetectors.
This setup shows how to use Reflection Factory, Assembly of Volumes and
Parameterisation.
Using commands or macros it possible to read or write GDML file.
HOW TO BUILD THE EXAMPLE ?
- You need to have built the persistency/gdml module by having
set the -DGEANT4_USE_GDML=ON flag during the CMAKE configuration step,
as well as the -DXERCESC_ROOT_DIR=<path_to_xercesc> flag pointing to
the path where the XercesC XML parser package is installed in your system.
- Compile and link to generate the executable (in your CMAKE build directory):
% make
- Execute the application:
% geotest [macro-file].mac
You can run this application with the following macro file:
write_gdml.mac : This macro will write the Geometry defined in file
"test.gdml" and output to a new file wtest.gdml
To change this name you can use command :
/mydet/writeFile FileName.gdml
read_gdml.mac : This macro will read the Geometry from file "test.gdml"
To change this name you can use command :
/mydet/readFile FileName.gdml
read_step.mac : This macro will read the STEP Tool files "mbb.geom" and
"mbb.tree" and load them in memory.
To change this name you can use command :
/mydet/StepFile FileName
@@ -0,0 +1,49 @@
///\file "persistency/gdml/G03/.README.txt"
///\brief Example G03 README page
/*! \page ExampleG03 Example G03
\section G03_s1 EXAMPLE OF DEFINITION OF A GDML EXTENSION WITH ASSOCIATED READER AND WRITER
In this directory you can find an example showing how to extend the GDML
schema and plug-in a custom reader and writer to the system for handling
the extension.
For more information, please, refer to the GDML Documentation.
The Geometry is a Simple Box to which it is assigned a color as
visualization attribute.
The entity "color" is defined as part of the "extension" tag and properly
implemented in the GDML schema extension placed inside the directory
SimpleExtensionSchema.
The GDML file implenting the geometry with colors extension is
color_extension.gdml, in which the standard "gdml" tag has been replaced
by the "gdml_simple_extension" tag, with relative location for the new schema.
The GDML file is automatically loaded by the program.
It is also possible to use UI commands or macros as arguments to read any
standard GDML file.
\section G03_s2 HOW TO BUILD THE EXAMPLE ?
- You need to have built the persistency/gdml module by having
set the -DGEANT4_USE_GDML=ON flag during the CMAKE configuration step,
as well as the -DXERCESC_ROOT_DIR=path_to_xercesc flag pointing to
the path where the XercesC XML parser package is installed in your system.
- Compile and link to generate the executable (in your CMAKE build directory):
\verbatim
% make
\endverbatim
- Execute the application for reading and visualizing the setup:
\verbatim
% gdml_ext read_ext.mac
\endverbatim
- Execute the application for also writing the setup:
\verbatim
% gdml_ext [write_ext.mac]
\endverbatim
*/
@@ -0,0 +1,37 @@
-------------------------------------------------------------------
Example of definition of a GDML extension with associated reader and writer
---------------------------------------------------------------------------
In this directory you can find an example showing how to extend the GDML
schema and plug-in a custom reader and writer to the system for handling
the extension.
For more information, please, refer to the GDML Documentation.
The Geometry is a Simple Box to which it is assigned a color as
visualization attribute.
The entity "color" is defined as part of the "extension" tag and properly
implemented in the GDML schema extension placed inside the directory
SimpleExtensionSchema.
The GDML file implenting the geometry with colors extension is
color_extension.gdml, in which the standard "gdml" tag has been replaced
by the "gdml_simple_extension" tag, with relative location for the new schema.
The GDML file is automatically loaded by the program.
It is also possible to use UI commands or macros as arguments to read any
standard GDML file.
HOW TO BUILD THE EXAMPLE ?
- You need to have built the persistency/gdml module by having
set the -DGEANT4_USE_GDML=ON flag during the CMAKE configuration step,
as well as the -DXERCESC_ROOT_DIR=<path_to_xercesc> flag pointing to
the path where the XercesC XML parser package is installed in your system.
- Compile and link to generate the executable (in your CMAKE build directory):
% make
- Execute the application for reading and visualizing the setup:
% gdml_ext read_ext.mac
- Execute the application for also writing the setup:
% gdml_ext [write_ext.mac]
@@ -0,0 +1,39 @@
///\file "persistency/gdml/G04/.README.txt"
///\brief Example G04 README page
/*! \page ExampleG04 Example G04
\section G04_s1 GDML DETECTOR SENSITIVITY
This example demonstrates the usage of the GDML auxiliary information for
associating a sensitive detector to a volume.
The detector construction consists of a call to GDMLProcessor which parses a
GDML file and returns the pointer to the world volume. The user can also write
her/his own GDML file and use it as the primary input format for her/his Geant4
application.
A simple GDML files is provided:
- auxiliary.gdml, showing association of a volume with the auxiliary
information, related to the sensitive detector.
\section G04_s2 HOW TO BUILD THE EXAMPLE ?
- You need to have built the persistency/gdml module by having
set the -DGEANT4_USE_GDML=ON flag during the CMAKE configuration step,
as well as the -DXERCESC_ROOT_DIR=path_to_xercesc flag pointing to
the path where the XercesC XML parser package is installed in your system.
- Compile and link to generate the executable (in your CMAKE build directory):
\verbatim
% make
\endverbatim
- Execute the application for parsing interactively the GDML file:
\verbatim
% gdml_det auxiliary.gdml
\endverbatim
*/
@@ -0,0 +1,34 @@
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
GDML detector sensitivity
-------------------------
This example demonstrates the usage of the GDML auxiliary information for
associating a sensitive detector to a volume.
The detector construction consists of a call to GDMLProcessor which parses a
GDML file and returns the pointer to the world volume. The user can also write
her/his own GDML file and use it as the primary input format for her/his Geant4
application.
A simple GDML files is provided:
- auxiliary.gdml, showing association of a volume with the auxiliary
information, related to the sensitive detector.
HOW TO BUILD THE EXAMPLE ?
- You need to have built the persistency/gdml module by having
set the -DGEANT4_USE_GDML=ON flag during the CMAKE configuration step,
as well as the -DXERCESC_ROOT_DIR=<path_to_xercesc> flag pointing to
the path where the XercesC XML parser package is installed in your system.
- Compile and link to generate the executable (in your CMAKE build directory):
% make
- Execute the application.
o For parsing interactively the GDML file:
% gdml_det auxiliary.gdml
+17
View File
@@ -0,0 +1,17 @@
Geant4 GDML Examples
====================
This directory contains a set of examples showing the usage of the GDML
plugin module in Geant4.
G01 Simple example for importing and exporting simple GDML files.
G02 Sample application showing how to import/export different
geometry setups, including STEP Tools files and structures
integrating them in a real simulation application.
G03 Simple example showing how to import extensions to the GDML
schema.
G04 Simple example showing how to associate detector sensitivity
to a logical-volume, making use of the auxiliary-information.
See the README file inside each example for more detail.