diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9827a4fc95fddd517b4d8828a19525720a0b4969..8a8aaa15f24652352afb055bebfd560ae6d59bc7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,14 +6,29 @@ default: - build/ stages: - # - build + - build - docker_build - docker_push - run +compile: + stage: build + rules: + - if: '$CI_COMMIT_BRANCH != "master"' + tags: + - silicon + script: + - export homedir=$(pwd) && pwd && cd /tmp && git clone --depth=1 https://eicweb.phy.anl.gov/EIC/NPDet.git && mkdir build && cd build && cmake ../NPDet/. && make -j20 install + - cd /tmp && git clone --depth=1 https://eicweb.phy.anl.gov/EIC/eicd.git && mkdir eicd_build && cd eicd_build && cmake ../eicd/. && make -j20 install + - cd $homedir && ls -lrth && mkdir build && cd build && cmake .. && make -j10 + docker_image: image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest stage: docker_build + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: never + # - if: '$CI_COMMIT_BRANCH == "master"' tags: - silicon script: @@ -23,6 +38,12 @@ docker_image: docker_image_push: image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest stage: docker_push + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: never + - if: '$CI_COMMIT_BRANCH != "master"' + when: never + - when: on_success tags: - silicon script: diff --git a/JugReco/src/components/EMCalReconstruction.cpp b/JugReco/src/components/EMCalReconstruction.cpp index 0d9b0812ec93935452b0a1149c2bdffc9bc2796f..032c2860867e73ea0b2489eef9866cac24688cfe 100644 --- a/JugReco/src/components/EMCalReconstruction.cpp +++ b/JugReco/src/components/EMCalReconstruction.cpp @@ -11,6 +11,7 @@ #include "DDRec/CellIDPositionConverter.h" #include "DDRec/SurfaceManager.h" #include "DDRec/Surface.h" +#include "DD4hep/DD4hepUnits.h" // FCCSW #include "JugBase/DataHandle.h" @@ -76,7 +77,7 @@ namespace Jug::Reco { // cell dimension auto dim = m_geoSvc->cellIDPositionConverter()->cellDimensions(id); hits.push_back(eic::CalorimeterHit{ - id, energy, time, {gpos.x(), gpos.y(), gpos.z()}, {pos.x(), pos.y(), pos.z()}, {dim[0], dim[1], 0.0}, 0}); + id, energy, time, {gpos.x()/dd4hep::mm, gpos.y()/dd4hep::mm, gpos.z()/dd4hep::mm}, {pos.x()/dd4hep::mm, pos.y()/dd4hep::mm, pos.z()/dd4hep::mm}, {dim[0]/dd4hep::mm, dim[1]/dd4hep::mm, 0.0}, 0}); } } diff --git a/JugReco/src/components/TrackerHitReconstruction.cpp b/JugReco/src/components/TrackerHitReconstruction.cpp index a84776f0be3c934c47c96fd1a2f8c8f0c8992166..0705f57e1f3e12983c3397dbb01a0d5e733cc3f5 100644 --- a/JugReco/src/components/TrackerHitReconstruction.cpp +++ b/JugReco/src/components/TrackerHitReconstruction.cpp @@ -11,6 +11,7 @@ #include "DDRec/CellIDPositionConverter.h" #include "DDRec/SurfaceManager.h" #include "DDRec/Surface.h" +#include "DD4hep/DD4hepUnits.h" #include "JugBase/DataHandle.h" #include "JugBase/IGeoSvc.h" @@ -81,11 +82,11 @@ namespace Jug { //std::array<double,3> dimarr; dim.GetCoordinates(posarr); //eic::TrackerHit hit; eic::TrackerHit hit((long long)ahit.cellID(), - (long long)ahit.time()/1000, // ps - (float)ahit.charge() / 1000.0, // MeV + (float)ahit.time()/1000, // ps + (float)ahit.charge()/ 1.0e6, // MeV (float)0.0, - {{pos.x()/dd4hep::mm, pos.y()/dd4hep::mm,pos.z()/dd4hep::mm}}, - {{dim[0]/dd4hep::mm,dim[1]/dd4hep::mm,0.0}}); + {pos.x()/dd4hep::mm, pos.y()/dd4hep::mm,pos.z()/dd4hep::mm}, + {dim[0],dim[1],0.0}); rec_hits->push_back(hit); } return StatusCode::SUCCESS; diff --git a/JugReco/src/components/TrackerSourceLinker.cpp b/JugReco/src/components/TrackerSourceLinker.cpp index a30d0b35e6eb48cf705e4576f79f9eedabcad8b1..12ecebdf2dee5b25bae0aac6bbf07b86fb33015f 100644 --- a/JugReco/src/components/TrackerSourceLinker.cpp +++ b/JugReco/src/components/TrackerSourceLinker.cpp @@ -95,8 +95,8 @@ namespace Jug::Reco { for(const auto& ahit : *hits) { Acts::BoundMatrix cov = Acts::BoundMatrix::Zero(); - cov(Acts::eBoundLoc0, Acts::eBoundLoc0) = ahit.covMatrix(0)*Acts::UnitConstants::mm*ahit.covMatrix(0)*Acts::UnitConstants::mm; - cov(Acts::eBoundLoc1, Acts::eBoundLoc1) = ahit.covMatrix(1)*Acts::UnitConstants::mm*ahit.covMatrix(1)*Acts::UnitConstants::mm; + cov(Acts::eBoundLoc0, Acts::eBoundLoc0) = ahit.covsym_xx()*Acts::UnitConstants::mm*ahit.covsym_xx()*Acts::UnitConstants::mm; + cov(Acts::eBoundLoc1, Acts::eBoundLoc1) = ahit.covsym_yy()*Acts::UnitConstants::mm*ahit.covsym_yy()*Acts::UnitConstants::mm; auto vol_ctx = m_geoSvc->cellIDPositionConverter()->findContext(ahit.cellID()); auto vol_id = vol_ctx->identifier; @@ -117,7 +117,7 @@ namespace Jug::Reco { // transform global position into local coordinates Acts::Vector2D pos(0, 0); // geometry context contains nothing here - pos = surface->globalToLocal(Acts::GeometryContext(), {ahit.position(0), ahit.position(1), ahit.position(2)}, {0, 0, 0}).value();//, pos); + pos = surface->globalToLocal(Acts::GeometryContext(), {ahit.x(), ahit.y(), ahit.z()}, {0, 0, 0}).value();//, pos); //// smear truth to create local measurement Acts::BoundVector loc = Acts::BoundVector::Zero(); diff --git a/containers/docker/Dockerfile b/containers/docker/Dockerfile index bb924406f05db1b2db57e7c9737c740969aab672..12da657e76c2ef3b9674acb94bd70461271cc843 100644 --- a/containers/docker/Dockerfile +++ b/containers/docker/Dockerfile @@ -11,21 +11,21 @@ LABEL maintainer="Whitney Armstrong <warmstrong@anl.gov>" \ RUN cd /tmp \ && git clone https://eicweb.phy.anl.gov/EIC/NPDet.git \ && mkdir -p NPDet/build && cd NPDet/build \ - && cmake ../. -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=/usr/local \ + && cmake ../. -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=/usr/local \ && make -j30 && make -j4 install \ && cd /tmp && rm -rf /tmp/NPDet RUN cd /tmp \ && git clone https://eicweb.phy.anl.gov/EIC/eicd.git \ && mkdir -p eicd/build && cd eicd/build \ - && cmake ../. -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=/usr/local \ + && cmake ../. -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=/usr/local \ && make -j30 && make -j4 install \ && cd /tmp && rm -rf /tmp/eicd RUN cd /tmp \ && git clone https://eicweb.phy.anl.gov/EIC/juggler.git \ && mkdir -p juggler/build && cd juggler/build \ - && cmake ../. -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=/usr/local \ + && cmake ../. -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=/usr/local \ && make -j30 && make -j4 install \ && cd /tmp && rm -rf /tmp/juggler