Skip to content
Snippets Groups Projects
Commit 54deeaf9 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

Spack v0.18.0

parent 5d44fb51
No related branches found
No related tags found
1 merge request!297Spack v0.18.0
...@@ -4,21 +4,15 @@ variables: ...@@ -4,21 +4,15 @@ variables:
## Application versions used for the main release ## Application versions used for the main release
## note: nightly builds will always use the master/main branch ## note: nightly builds will always use the master/main branch
JUGGLER_VERSION: "v7.0.0" JUGGLER_VERSION: "v7.0.0"
NPDET_VERSION: "v1.3.0" NPDET_VERSION: "v1.3.1"
EICD_VERSION: "v2.0.0" EICD_VERSION: "v2.0.0"
AFTERBURNER_VERSION: "v0.1.2" AFTERBURNER_VERSION: "v0.1.2"
## Spack github version ## Spack github version, v0.18.0
SPACK_VERSION: "e974b44e8673ded449ce4a3ed5844398b68e81a2" SPACK_VERSION: "4c6564f10aa516bc00c1d7dbfdeafe35128985fe"
## Space-separated list of spack cherry-picks ## Space-separated list of spack cherry-picks
SPACK_CHERRYPICKS: "0ab5828d0dfe2182ad108b7e7c56772303065f6e a294acfb73839c9782aff976953a969fb44e161e f181b6fef6da3b576b267799d9c47fa5c8ade67a 5f10562ad13c803bf5d22552a9f07c8c379fdd23 4c0f5f85c0dc27903280ba64d129c2e3d128573d 6610c50414cdb451c2073a28ffc4bc3c5fd7b721" SPACK_CHERRYPICKS: ""
## Ref: https://github.com/spack/spack/commit/[hash] ## Ref: https://github.com/spack/spack/commit/[hash]
## 0ab5828d0dfe2182ad108b7e7c56772303065f6e: gdk-pixbuf: Fix 2.42.2 and add 2.42.6
## a294acfb73839c9782aff976953a969fb44e161e: pythia8: bugfix for pythia8 +fastjet
## f181b6fef6da3b576b267799d9c47fa5c8ade67a: root: depends_on fcgi and re-enabled +http support
## 5f10562ad13c803bf5d22552a9f07c8c379fdd23: [geant4] new version geant4@10.7.3
## 4c0f5f85c0dc27903280ba64d129c2e3d128573d: EDM4hep version 0.4
## 6610c50414cdb451c2073a28ffc4bc3c5fd7b721: madx: new package, versions 5.07.00, 5.08.00, 5.08.01
## We need to enable Docker Buildkit to use cache mounts and better ## We need to enable Docker Buildkit to use cache mounts and better
## build performance overal ## build performance overal
......
spack: spack:
specs: specs:
- acts@19.0.0 +dd4hep +digitization +identification +json +tgeo +ipo +examples +fatras +geant4 - acts@19.1.0 +dd4hep +identification +json +tgeo +ipo +examples +fatras +geant4
- cairo@1.16.0 +fc+ft+X+pdf+gobject - cairo@1.16.0 +fc+ft+X+pdf+gobject
- clhep@2.4.4.0 cxxstd=17 - clhep@2.4.4.0 cxxstd=17
- cmake@3.21.4 - cmake@3.23.1
- cnpy@master - cnpy@master
- dawn@3_91a - dawn@3_91a
- dawncut@1_54a - dawncut@1_54a
- dd4hep@1.20.1 +geant4 -assimp +hepmc3 +ipo +lcio - dd4hep@1.20.2 +ddg4 -ddcad +hepmc3 +ipo +lcio
- edm4hep@0.4.1 cxxstd=17 -ipo - edm4hep@0.4.1 cxxstd=17 -ipo
- eigen@3.4.0 - eigen@3.4.0
- emacs@27.2 toolkit=athena - emacs@27.2 toolkit=athena
- fastjet@3.3.3 - fastjet@3.3.4
- fmt@8.0.1 +shared cxxstd=17 - fmt@8.1.1 +shared cxxstd=17
- gaudi@36.4 - gaudi@36.5
- geant4@10.7.3 cxxstd=17 +opengl +vecgeom +x11 +qt +threads - geant4@10.7.3 cxxstd=17 +opengl +vecgeom +x11 +qt +threads
- genfit@2.00.00 - genfit@2.00.00
- hepmc3@3.2.4 +python +rootio - hepmc3@3.2.4 +python +rootio
...@@ -21,27 +21,27 @@ spack: ...@@ -21,27 +21,27 @@ spack:
- igprof@5.9.16 - igprof@5.9.16
- imagemagick@7.0.8-7 - imagemagick@7.0.8-7
- madx@5.08.01 - madx@5.08.01
- mesa@21.2.3 swr=none +glx -llvm +opengl +opengles +osmesa - mesa@22.0.2 +glx -llvm +opengl +opengles +osmesa
- mesa-demos - nlohmann-json@3.10.5
- nlohmann-json@3.10.4 - opencascade@7.6.0
- opencascade@7.5.3
- pkg-config@0.29.2 - pkg-config@0.29.2
- podio@0.14.1 build_type=RelWithDebInfo - podio@0.14.1 build_type=RelWithDebInfo
- pythia8@8.306 +fastjet - pythia8@8.306 +fastjet
- python@3.9.7 - python@3.9.12
- py-numpy@1.21.3 - py-numpy@1.22.3
- py-pip@21.1.2 - py-pip@21.3.1
- py-setuptools@58.2.0 - py-setuptools@59.4.0
- py-wheel@0.36.2 - py-wheel@0.37.0
- qt@5.15.2 +opengl - qt@5.15.4 +opengl
- root@6.24.06 cxxstd=17 - root@6.26.02 cxxstd=17
+fftw +fortran +gdml +http +mlp +pythia8 +fftw +fortran +gdml +http +mlp +pythia8
+root7 +tmva +vc +xrootd +ssl +root7 +tmva +vc +xrootd +ssl
- spdlog@1.9.2 - spdlog@1.9.2
- stow@2.3.1 - stow@2.3.1
- tensorflow-lite@2.8.0 -xnnpack - tensorflow-lite@2.8.0 -xnnpack
- xrootd@5.1.0 cxxstd=17 +python - xrootd@5.3.2 cxxstd=17 +python
concretization: together concretizer:
unify: true
packages: packages:
all: all:
compiler: [gcc] compiler: [gcc]
......
from spack.pkg.builtin.acts import Acts as BuiltinActs from spack.pkg.builtin.acts import Acts as BuiltinActs
class Acts(BuiltinActs): class Acts(BuiltinActs):
version('19.0.0', commit='1ce9c583150060ba8388051685433899713d56d9', submodules=True) version('19.1.0', commit='82f42a2cc80d4259db251275c09b84ee97a7bd22', submodules=True)
version('18.0.0', commit='fe03b5af6ca2b092dec87c4cef77dd552bbbe719', submodules=True)
version('17.1.0', commit='0d9c3a6da022da48d6401e10c273896a1f775a9e', submodules=True)
version('17.0.0', commit='ccbf4c7d4ec3698bac4db9687fab2455a3f9c203', submodules=True)
version('16.0.0', commit='9bd86921155e708189417b5a8019add10fd5b273', submodules=True)
version('15.1.0', commit='a96e6db7de6075e85b6d5346bc89845eeb89b324', submodules=True)
version('15.0.0', commit='0fef9e0831a90e946745390882aac871b211eaac', submodules=True)
diff --git a/DDG4/src/Geant4IsotropeGenerator.cpp b/DDG4/src/Geant4IsotropeGenerator.cpp
index 54588aaf..f63b29b4 100644
--- a/DDG4/src/Geant4IsotropeGenerator.cpp
+++ b/DDG4/src/Geant4IsotropeGenerator.cpp
@@ -48,7 +48,6 @@ void Geant4IsotropeGenerator::getParticleDirectionUniform(int, ROOT::Math::XYZVe
double x3 = std::cos(theta);
direction.SetXYZ(x1,x2,x3);
- momentum = rnd.rndm()*momentum;
}
/// Particle distribution ~ cos(theta)
@@ -63,7 +62,6 @@ void Geant4IsotropeGenerator::getParticleDirectionCosTheta(int, ROOT::Math::XYZV
double x3 = cos_theta;
direction.SetXYZ(x1,x2,x3);
- momentum = rnd.rndm()*momentum;
}
/// Particle distribution flat in eta (pseudo rapidity)
@@ -84,7 +82,6 @@ void Geant4IsotropeGenerator::getParticleDirectionEta(int, ROOT::Math::XYZVector
double x3 = std::sinh(eta);
double r = std::sqrt(1.0+x3*x3);
direction.SetXYZ(x1/r,x2/r,x3/r);
- momentum = rnd.rndm()*momentum;
}
/// e+e- --> ffbar particle distribution ~ 1 + cos^2(theta)
@@ -110,7 +107,6 @@ void Geant4IsotropeGenerator::getParticleDirectionFFbar(int, ROOT::Math::XYZVect
double x2 = std::sin(theta)*std::sin(phi);
double x3 = std::cos(theta);
direction.SetXYZ(x1,x2,x3);
- momentum = rnd.rndm()*momentum;
return;
}
}
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 618812f7..8316ba67 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,6 +46,7 @@ ENDIF()
#############################################################
ENABLE_LANGUAGE(CXX)
+ENABLE_LANGUAGE(C)
# Set C++ standard
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard used for compiling")
diff --git a/DDCore/src/plugins/Compact2Objects.cpp b/DDCore/src/plugins/Compact2Objects.cpp
index fab6267f..581f535f 100644
--- a/DDCore/src/plugins/Compact2Objects.cpp
+++ b/DDCore/src/plugins/Compact2Objects.cpp
@@ -805,21 +805,48 @@ template <> void Converter<PropertyTable>::operator()(xml_h e) const {
}
#endif
-/** Convert compact visualization attribute to Detector visualization attribute
+/** Convert compact visualization attribute to Detector visualization attribute.
*
* <vis name="SiVertexBarrelModuleVis"
* alpha="1.0" r="1.0" g="0.75" b="0.76"
* drawingStyle="wireframe"
* showDaughters="false"
* visible="true"/>
+ *
+ * Optionally inherit an already defined VisAttr and override other properties.
+ *
+ * <vis name="SiVertexEndcapModuleVis"
+ * ref="SiVertexBarrelModuleVis"
+ * alpha="0.5"/>
*/
template <> void Converter<VisAttr>::operator()(xml_h e) const {
VisAttr attr(e.attr<string>(_U(name)));
+ float alpha = 1.0;
+ float red = 1.0;
+ float green = 1.0;
+ float blue = 1.0;
+ bool use_ref = false;
+ if(e.hasAttr(_U(ref))) {
+ use_ref = true;
+ auto refName = e.attr<string>(_U(ref));
+ const auto refAttr = description.visAttributes(refName);
+ if(!refAttr.isValid() ) {
+ throw runtime_error("reference VisAttr " + refName + " does not exist");
+ }
+ // Just copying things manually.
+ // I think a handle's copy constructor/assignment would reuse the underlying pointer... maybe?
+ refAttr.argb(alpha,red,green,blue);
+ attr.setColor(alpha,red,green,blue);
+ attr.setDrawingStyle( refAttr.drawingStyle());
+ attr.setLineStyle( refAttr.lineStyle());
+ attr.setShowDaughters(refAttr.showDaughters());
+ attr.setVisible(refAttr.visible());
+ }
xml_dim_t dim(e);
- float alpha = dim.alpha(1.0);
- float red = dim.r(1.0);
- float green = dim.g(1.0);
- float blue = dim.b(1.0);
+ alpha = dim.alpha(alpha);
+ red = dim.r(red );
+ green = dim.g(green);
+ blue = dim.b(blue );
printout(s_debug.visattr ? ALWAYS : DEBUG, "Compact",
"++ Converting VisAttr structure: %-16s. Alpha=%.2f R=%.3f G=%.3f B=%.3f",
@@ -835,7 +862,8 @@ template <> void Converter<VisAttr>::operator()(xml_h e) const {
attr.setLineStyle(VisAttr::DASHED);
}
else {
- attr.setLineStyle(VisAttr::SOLID);
+ if (!use_ref)
+ attr.setLineStyle(VisAttr::SOLID);
}
if (e.hasAttr(_U(drawingStyle))) {
string ds = e.attr<string>(_U(drawingStyle));
@@ -845,12 +873,15 @@ template <> void Converter<VisAttr>::operator()(xml_h e) const {
attr.setDrawingStyle(VisAttr::SOLID);
}
else {
- attr.setDrawingStyle(VisAttr::SOLID);
+ if (!use_ref)
+ attr.setDrawingStyle(VisAttr::SOLID);
}
if (e.hasAttr(_U(showDaughters)))
attr.setShowDaughters(e.attr<bool>(_U(showDaughters)));
- else
- attr.setShowDaughters(true);
+ else {
+ if (!use_ref)
+ attr.setShowDaughters(true);
+ }
description.addVisAttribute(attr);
}
diff --git a/DDG4/edm4hep/Geant4Output2EDM4hep.cpp b/DDG4/edm4hep/Geant4Output2EDM4hep.cpp
index 555e4e52..504fb8e4 100644
--- a/DDG4/edm4hep/Geant4Output2EDM4hep.cpp
+++ b/DDG4/edm4hep/Geant4Output2EDM4hep.cpp
@@ -20,6 +20,7 @@
#include "DDG4/Geant4HitCollection.h"
#include "DDG4/Geant4OutputAction.h"
#include "DDG4/Geant4SensDetAction.h"
+#include "DDG4/Geant4DataConversion.h"
#include "DDG4/EventParameters.h"
// Geant4 headers
@@ -563,16 +564,23 @@ void Geant4Output2EDM4hep::createCollections(OutputContext<G4Event>& ctxt){
continue ;
}
+ Geant4Sensitive* sd = coll->sensitive();
+ string sd_enc = dd4hep::sim::Geant4ConversionHelper::encoding(sd->sensitiveDetector());
+
if( typeid( Geant4Tracker::Hit ) == coll->type().type() ){
- m_store->create<edm4hep::SimTrackerHitCollection>(colName);
+ auto& sthc = m_store->create<edm4hep::SimTrackerHitCollection>(colName);
m_file->registerForWrite(colName);
+ auto& sthc_md = m_store->getCollectionMetaData( sthc.getID() );
+ sthc_md.setValue("CellIDEncodingString", sd_enc);
printout(DEBUG,"Geant4Output2EDM4hep","+++ created collection %s",colName.c_str() );
}
else if( typeid( Geant4Calorimeter::Hit ) == coll->type().type() ){
- m_store->create<edm4hep::SimCalorimeterHitCollection>(colName);
+ auto& schc = m_store->create<edm4hep::SimCalorimeterHitCollection>(colName);
m_file->registerForWrite(colName);
+ auto& schc_md = m_store->getCollectionMetaData( schc.getID() );
+ schc_md.setValue("CellIDEncodingString", sd_enc);
printout(DEBUG,"Geant4Output2EDM4hep","+++ created collection %s",colName.c_str() );
colName += "Contributions" ;
diff --git a/DDG4/src/Geant4ShapeConverter.cpp b/DDG4/src/Geant4ShapeConverter.cpp
index 2a79a69a..6f4af522 100644
--- a/DDG4/src/Geant4ShapeConverter.cpp
+++ b/DDG4/src/Geant4ShapeConverter.cpp
@@ -205,8 +205,9 @@ namespace dd4hep {
template <> G4VSolid* convertShape<TGeoSphere>(const TGeoShape* shape) {
const TGeoSphere* sh = (const TGeoSphere*) shape;
- return new G4Sphere(sh->GetName(), sh->GetRmin() * CM_2_MM, sh->GetRmax() * CM_2_MM, sh->GetPhi1() * DEGREE_2_RAD,
- sh->GetPhi2() * DEGREE_2_RAD, sh->GetTheta1() * DEGREE_2_RAD, sh->GetTheta2() * DEGREE_2_RAD);
+ return new G4Sphere(sh->GetName(), sh->GetRmin() * CM_2_MM, sh->GetRmax() * CM_2_MM,
+ sh->GetPhi1() * DEGREE_2_RAD, (sh->GetPhi2()-sh->GetPhi1()) * DEGREE_2_RAD,
+ sh->GetTheta1() * DEGREE_2_RAD, (sh->GetTheta2()- sh->GetTheta1()) * DEGREE_2_RAD);
}
template <> G4VSolid* convertShape<TGeoTorus>(const TGeoShape* shape) {
from spack import *
from spack.pkg.builtin.dd4hep import Dd4hep as BuiltinDd4hep
class Dd4hep(BuiltinDd4hep):
version('1.20.1', sha256='18c18a125583c39cb808c602e052cc2379aa3a8029aa78dbb40bcc31f1deb798')
version('1.20', sha256='cf6af0c486d5c84e8c8a8e40ea16cec54d4ed78bffcef295a0eeeaedf51cab59')
version('1.19', sha256='d2eccf5e8402ba7dab2e1d7236e12ee4db9b1c5e4253c40a140bf35580db1d9b')
patch('https://github.com/AIDASoft/DD4hep/pull/896.diff',
sha256='2d7e87824d324b8bd14cb2a8b441d2fc25a6d3474e6e041bd68c56439a9477cf',
when='@1.20:1.20.1')
diff --git a/DDG4/python/DDSim/Helper/Physics.py b/DDG4/python/DDSim/Helper/Physics.py
index 4ce65959..62eb05eb 100644
--- a/DDG4/python/DDSim/Helper/Physics.py
+++ b/DDG4/python/DDSim/Helper/Physics.py
@@ -17,7 +17,7 @@ class Physics(ConfigHelper):
self._list = "FTFP_BERT"
self._decays = False
self._pdgfile = None
- self._rejectPDGs = {1, 2, 3, 4, 5, 6, 21, 23, 24, 25}
+ self._rejectPDGs = {1, 2, 3, 4, 5, 6, 21, 23, 24, 25, 2101}
self._zeroTimePDGs = {11, 13, 15, 17}
self._userFunctions = []
diff --git a/DDG4/src/Geant4Particle.cpp b/DDG4/src/Geant4Particle.cpp
index 1db6105c..7f8d7482 100644
--- a/DDG4/src/Geant4Particle.cpp
+++ b/DDG4/src/Geant4Particle.cpp
@@ -57,7 +57,9 @@ Geant4Particle::~Geant4Particle() {
void Geant4Particle::release() {
//::printf("************ Release Geant4Particle[%p]: ID:%d pdgID %d ref:%d\n",(void*)this,id,pdgID,ref-1);
if ( --ref <= 0 ) {
+ if( (ref > -1) ) {
delete this;
+ }
}
}
from spack import *
from spack.pkg.builtin.edm4hep import Edm4hep as BuiltinEdm4hep
class Edm4hep(BuiltinEdm4hep):
version('0.4.1', sha256='122987fd5969b0f1639afa9668ac5181203746d00617ddb3bf8a2a9842758a63')
version('0.4', sha256='bcb729cd4a6f5917b8f073364fc950788111e178dd16b7e5218361f459c92a24')
from spack import * from spack import *
from spack.pkg.builtin.gaudi import Gaudi as BuiltinGaudi from spack.pkg.builtin.gaudi import Gaudi as BuiltinGaudi
class Gaudi(BuiltinGaudi): class Gaudi(BuiltinGaudi):
version('36.4', sha256='1a5c27cdc21ec136b47f5805406c92268163393c821107a24dbb47bd88e4b97d') patch('https://gitlab.cern.ch/gaudi/Gaudi/-/commit/03db151003d5207795ae8ec96aaf2f5f8a9ea008.diff',
version('36.3', sha256='9ac228d8609416afe4dea6445c6b3ccebac6fab1e46121fcc3a056e24a5d6640') sha256='e73f45f10ea4a143a05c53a468233ceaad1a8ec22dee9877d178a3c9ee46c70f',
version('36.2', sha256='a1b4bb597941a7a5b8d60382674f0b4ca5349c540471cd3d4454efbe7b9a09b9') when='@:36.5')
version('36.1', sha256='9f718c832313676249e5c3ac76ba4346978ee2328f8cdcb29176498b080402e9')
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 07a21a2..cf0d819 100755
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -13,8 +13,8 @@ endif()
# Remove SIO and ROOT related things from the core library
LIST(FILTER sources EXCLUDE REGEX SIO.*)
-LIST(FILTER sources EXCLUDE REGEX ROOT.*|PythonEventStore.*|root.* )
-LIST(FILTER root_sources INCLUDE REGEX ROOT.*|PythonEventStore.*|root.* )
+LIST(FILTER sources EXCLUDE REGEX ROOT.*|PythonEventStore.*|root[a-z|A-z|0-9].* )
+LIST(FILTER root_sources INCLUDE REGEX ROOT.*|PythonEventStore.*|root[a-z|A-z|0-9].* )
# Main Library, no external dependencies
add_library(podio SHARED ${sources})
from spack import *
from spack.pkg.builtin.podio import Podio as BuiltinPodio
class Podio(BuiltinPodio):
# issue with build breaking for spack as the search-and-replace for "root"
# erroneously selects the all files as the build happens under /tmp/root
patch('cmake.patch', when="@0.13.1:0.14.0")
version('0.14.1', sha256='361ac3f3ec6f5a4830729ab45f96c19f0f62e9415ff681f7c6cdb4ebdb796f72')
def setup_run_environment(self, env):
env.prepend_path('PYTHONPATH', self.prefix.python)
env.prepend_path('LD_LIBRARY_PATH', self.spec['podio'].libs.directories[0])
def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path('PYTHONPATH', self.prefix.python)
env.prepend_path('LD_LIBRARY_PATH', self.spec['podio'].libs.directories[0])
env.prepend_path('ROOT_INCLUDE_PATH', self.prefix.include)
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