Skip to content
Snippets Groups Projects
Commit f2a177d9 authored by Riccardo Maria Bianchi's avatar Riccardo Maria Bianchi :sunny:
Browse files

Merge branch 'master' of ssh://gitlab.cern.ch:7999/GeoModelDev/GeoModel into...

Merge branch 'master' of ssh://gitlab.cern.ch:7999/GeoModelDev/GeoModel into master-publish-xml-data
parents 24ee3385 67c36f3e
No related branches found
No related tags found
1 merge request!52Publish auxiliary data
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
# Find the header and source files.
file( GLOB SOURCES src/*.cxx )
......@@ -20,6 +20,19 @@ set_target_properties( GeoModelKernel PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR} )
# Code in this file makes heavy use of eigen and runs orders of magnitude
# more slowly without optimization. So force this to be optimized even
# in debug builds. If you need to debug it you might want to change this.
# Specifying optimization via an attribute on the particular
# function didn't work, because that still didn't allow inlining.
if ( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/src/GeoXF.cxx
PROPERTIES
COMPILE_FLAGS "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}"
COMPILE_DEFINITIONS "FLATTEN" )
endif()
# Set up an alias with the same name that you would get by "finding" a pre-built
# version of the library.
add_library( GeoModelCore::GeoModelKernel ALIAS GeoModelKernel )
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "GeoModelKernel/GeoXF.h"
......@@ -134,11 +134,23 @@ namespace GeoXF
return m_arg2->dimensionality ();
}
#if defined(FLATTEN) && defined(__GNUC__)
// We compile this package with optimization, even in debug builds; otherwise,
// the heavy use of Eigen makes it too slow. However, from here we may call
// to out-of-line Eigen code that is linked from other DSOs; in that case,
// it would not be optimized. Avoid this by forcing all Eigen code
// to be inlined here if possible.
__attribute__ ((flatten))
#endif
GeoTrf::Transform3D PreMult::operator () (double x) const
{
return m_arg1 * (*m_arg2) (x);
}
#if defined(FLATTEN) && defined(__GNUC__)
// See above.
__attribute__ ((flatten))
#endif
GeoTrf::Transform3D PreMult::operator () (const GeoGenfun::Argument & x) const
{
return m_arg1 * (*m_arg2) (x);
......@@ -181,11 +193,19 @@ namespace GeoXF
return m_arg1->dimensionality ();
}
#if defined(FLATTEN) && defined(__GNUC__)
// See above.
__attribute__ ((flatten))
#endif
GeoTrf::Transform3D PostMult::operator () (double x) const
{
return (*m_arg1) (x) * m_arg2;
}
#if defined(FLATTEN) && defined(__GNUC__)
// See above.
__attribute__ ((flatten))
#endif
GeoTrf::Transform3D PostMult::operator () (const GeoGenfun::Argument & x) const
{
return (*m_arg1) (x) * m_arg2;
......@@ -202,6 +222,10 @@ namespace GeoXF
delete m_function;
}
#if defined(FLATTEN) && defined(__GNUC__)
// See above.
__attribute__ ((flatten))
#endif
GeoTrf::Transform3D Pow::operator() (double x) const
{
//
......
......@@ -23,6 +23,9 @@ public:
Z=getAttributeAsInt("Z",explicitMaterial);
density=0;
StopLoop(true);
// clear fractionList for new material (D.Casper)
fractionList.clear();
xercesc::DOMNode *child;
for (child=XercesParser::GetCurrentElement()->getFirstChild();child!=0;child=child->getNextSibling())
......
*Coming soon*
......@@ -24,13 +24,13 @@ Install geomodel precompiled applications
```
sudo apt install geomodel-visualization # to get gmex (the geometry explorer)
sudo apt install fullsimlight # to get fullsimlight,gm2gdml,gmclash, gmgeantino
sudo apt install geomodeltools # to get gmcat, gdml2gm
sudo apt install geomodel-tools # to get gmcat, gdml2gm
```
Install the geomodel development kits (header files and precompiled libraries)
```
sudo apt install geomodelcore-dev
sudo apt install geomodeltools-dev
sudo apt install geomodelg4-dev
sudo apt install geomodel-core-dev
sudo apt install geomodel-tools-dev
sudo apt install geomodel-g4-dev
sudo apt install geomodel-visualization-dev
```
Get some example geometry input files:
......@@ -39,7 +39,7 @@ sudo apt install geometry-data
```
Geometry input files can then be found in /usr/share/geometry-data. You can visualize by typing
```
gmex /usr/share/geometry-data/geometry-ATLAS-R2-2016-01-00-01_wSPECIALSHAPE.db
gmex /usr/share/geometry/geometry-ATLAS-R2-2016-01-00-01_wSPECIALSHAPE.db
```
......
......@@ -11,17 +11,16 @@ theme:
nav:
- Home: 'index.md'
- Getting Started:
- 'Intro': 'start/index.md'
- 'Install Libraries & Tools': 'start/install.md'
- 'The Basic Concepts': 'start/basic_concepts.md'
- 'The Basic Building Blocks': 'start/basic_building_blocks.md'
- How To:
- 'Build a basic geometry': 'how/how_basic_geo_cpp.md'
- 'Build a simple detector': 'how/how_simple_detector_cpp.md'
- 'Dump the geometry with `dump-geo`': 'how/how_dump_geo.md'
- 'Load a geometry from a file': 'how/how_load_geo.md'
- 'Describe a geometry with a file': 'how/how_describe_geo_file.md'
#- Getting Started:
- 'Install Libraries & Tools': 'start/install.md'
# - 'The Basic Concepts': 'start/basic_concepts.md'
# - 'The Basic Building Blocks': 'start/basic_building_blocks.md'
#- How To:
# - 'Build a basic geometry': 'how/how_basic_geo_cpp.md'
# - 'Build a simple detector': 'how/how_simple_detector_cpp.md'
# - 'Dump the geometry with `dump-geo`': 'how/how_dump_geo.md'
# - 'Load a geometry from a file': 'how/how_load_geo.md'
# - 'Describe a geometry with a file': 'how/how_describe_geo_file.md'
- GeoModel Components:
- Kernel:
- 'Overview': 'components/kernel/overview/index.md'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment