-
Notifications
You must be signed in to change notification settings - Fork 3
Added SBT and SST in addition to calo #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
3612caf
f757f1c
745bcdd
094d135
ee17385
cbe3d9b
c204872
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ target_link_libraries( | |
| Target | ||
| MuonShield | ||
| DecayVolume | ||
| SBT | ||
| UpstreamTagger | ||
| Trackers | ||
| Magnet | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ add_subdirectory(Target) | |
| add_subdirectory(MuonShield) | ||
| add_subdirectory(Magnet) | ||
| add_subdirectory(DecayVolume) | ||
| add_subdirectory(SBT) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wire in This line currently breaks configure: CI reports 🧰 Tools🪛 GitHub Actions: Build and Test[error] 10-10: CMake error: add_subdirectory given source "SBT" which is not an existing directory. 🤖 Prompt for AI Agents |
||
| add_subdirectory(Trackers) | ||
| add_subdirectory(Calorimeter) | ||
| add_subdirectory(UpstreamTagger) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,26 @@ | ||
| # SPDX-License-Identifier: LGPL-3.0-or-later | ||
| # Copyright (C) CERN for the benefit of the SHiP Collaboration | ||
|
|
||
| add_library(Calorimeter src/CalorimeterFactory.cpp) | ||
| # Stage calo.cfg into the build directory so tests running from there find it. | ||
| configure_file( | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/calo.cfg | ||
| ${CMAKE_CURRENT_BINARY_DIR}/calo.cfg | ||
| COPYONLY | ||
| ) | ||
| # Also stage into the top-level build dir for test_builder and OverlapCheck. | ||
| configure_file( | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/calo.cfg | ||
| ${CMAKE_BINARY_DIR}/calo.cfg | ||
| COPYONLY | ||
| ) | ||
|
|
||
| add_library( | ||
| Calorimeter | ||
| src/CalorimeterFactory.cpp | ||
| src/CalorimeterConfig.cpp | ||
| src/CaloBarLayer.cpp | ||
| src/CaloFibreHPLayer.cpp | ||
| ) | ||
|
|
||
| target_include_directories( | ||
| Calorimeter | ||
|
|
@@ -13,12 +32,31 @@ target_include_directories( | |
|
|
||
| target_link_libraries(Calorimeter PUBLIC GeoModelCore::GeoModelKernel) | ||
|
|
||
| # Bake the absolute source-tree path as a compile-time fallback so the factory | ||
| # can always find calo.cfg even when CWD doesn't contain it. | ||
| target_compile_definitions( | ||
| Calorimeter | ||
| PRIVATE | ||
| # Source-tree fallback (always valid during development and CI builds). | ||
| CALO_CFG_DEFAULT_PATH="${CMAKE_CURRENT_SOURCE_DIR}/calo.cfg" | ||
| # Install-time fallback: set to the installed data directory so that | ||
| # deployed builds (where the source tree is absent) can find calo.cfg. | ||
| CALO_CFG_INSTALL_PATH="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/SHiPGeometry/calo.cfg" | ||
| ) | ||
|
|
||
| install( | ||
| FILES ${CMAKE_CURRENT_SOURCE_DIR}/calo.cfg | ||
| DESTINATION ${CMAKE_INSTALL_DATADIR}/SHiPGeometry | ||
| ) | ||
|
Comment on lines
+37
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In the root
The fix is to hoist 🛠️ Proposed fix in `CMakeLists.txt` (root) find_package(SQLite3 REQUIRED)
+include(GNUInstallDirs)
+include(CMakePackageConfigHelpers)
+
# Testing
include(CTest)
...
# ----------------------------------------------------------------------------
# Installation
# ----------------------------------------------------------------------------
-include(GNUInstallDirs)
-include(CMakePackageConfigHelpers)🤖 Prompt for AI Agents |
||
|
|
||
| if(BUILD_TESTING) | ||
| include(Catch) | ||
| add_executable(test_calorimeter test_calorimeter.cpp) | ||
| target_link_libraries( | ||
| test_calorimeter | ||
| PRIVATE Calorimeter SHiPGeometry Catch2::Catch2WithMain | ||
| ) | ||
| catch_discover_tests(test_calorimeter) | ||
| catch_discover_tests(test_calorimeter | ||
| WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
| ) | ||
| endif() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| plate_xy_mm = 2160 | ||
| lead_thickness_mm = 3 | ||
| scint_thickness_mm = 10 | ||
| pvt_thickness_mm = 10 | ||
|
|
||
| #How many calo modules in the x and y directions? | ||
| module_nx = 2 | ||
| module_ny = 3 | ||
|
|
||
| module_pitch_x_mm = 0.0 | ||
| module_pitch_y_mm = 0.0 | ||
|
|
||
| tol_x_mm = 10 | ||
| tol_y_mm = 10 | ||
| tol_z_mm = 10 | ||
|
|
||
| # Layer codes: 1=WidePVT, 3=ThinPS, 5 HPL, 7=Lead, 8 split, maybe there is a better way to input these codes? | ||
| layers = 7,1,7,2,7,3,7,4,7,1,7,2,7,3,7,4,7,1,7,2,5,6,8,7,3,7,4,7,1,7,2,5,6,7,3,7,4,7,1,7,2,7,3,7,4,7,1,7,2,5,6,7,3,7,4,7,1,7,2,7,3,7,4,7,1,7,2,7,3,7,4,7,1,7,2,7,3,7,4,7,1,7,2,7,3,7,4 | ||
|
|
||
| #HPLs | ||
| hpl_thickness_mm = 10 | ||
| fiber_diameter_mm = 1.2 | ||
| fiber_core_diameter_mm = 1.0 | ||
|
|
||
|
|
||
| airgap_mm = 1000 | ||
|
|
||
|
|
||
| #HCAL section | ||
|
|
||
| gap_ecal_hcal_mm = 100; | ||
| #Layer codes are identical to above. 7 is iron though | ||
| layers2 = 7,1,7,2,7,1,7,2,7,1 | ||
| iron_thickness_mm = 170 | ||
|
|
||
| detector_offset_z_mm = 96970.0 | ||
| detector_offset_x_mm = 0.0 | ||
| detector_offset_y_mm = 0.0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| // SPDX-License-Identifier: LGPL-3.0-or-later | ||
| // Copyright (C) CERN for the benefit of the SHiP Collaboration | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <string> | ||
|
|
||
| class GeoVPhysVol; | ||
| class GeoLogVol; | ||
|
|
||
| namespace SHiPGeometry { | ||
|
|
||
| /// Which transverse axis the bars are replicated along. | ||
| enum class BarAxis { AlongX, AlongY }; | ||
|
|
||
| /** | ||
| * @brief Places an array of identical scintillator bars into a mother volume. | ||
| * | ||
| * Bars share a single GeoLogVol (reuse). They are spaced at @p pitch_mm | ||
| * centre-to-centre, centred on the mother origin in the transverse plane, | ||
| * and all placed at @p zCenter_mm along Z (local coordinates). | ||
| */ | ||
| class CaloBarLayer { | ||
| public: | ||
| static void place(GeoVPhysVol* mother, GeoLogVol* barLog, double pitch_mm, int nBars, | ||
| double zCenter_mm, const char* tagPrefix, int layerIndex, BarAxis axis, | ||
| const std::string& nameSuffix = ""); | ||
| }; | ||
|
|
||
| } // namespace SHiPGeometry |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| // SPDX-License-Identifier: LGPL-3.0-or-later | ||
| // Copyright (C) CERN for the benefit of the SHiP Collaboration | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <string> | ||
|
|
||
| class GeoVPhysVol; | ||
| class GeoMaterial; | ||
|
|
||
| namespace SHiPGeometry { | ||
|
|
||
| /** | ||
| * @brief Builds one Hadronic Pre-shower Layer (HPL) of scintillating fibres. | ||
| * | ||
| * The layer consists of an aluminium casing filled with three sublayers of | ||
| * cylindrical fibres (cladding + core). Fibres run along Y when | ||
| * @p fibresAlongY is true, along X otherwise. | ||
| */ | ||
| class CaloFibreHPLayer { | ||
| public: | ||
| static void build(GeoVPhysVol* mother, GeoMaterial* aluminiumMat, GeoMaterial* fibreMat, | ||
| const std::string& layerTag, double zCenter_mm, int layerIndex, | ||
| double casingXY_mm, double casingZ_mm, double fiberDiam_mm, | ||
| double fiberCoreDiam_mm, bool fibresAlongY, const std::string& nameSuffix); | ||
| }; | ||
|
|
||
| } // namespace SHiPGeometry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing
subsystems/SBT/directory blocks the entire build.Both pipeline errors —
add_subdirectory given source "SBT" which is not an existing directory(insubsystems/CMakeLists.txt) andinstall TARGETS given target "SBT" which does not exist(here) — cascade from the same root cause: theSBTsubsystem source tree was not committed. TheSBTFactory.hinclude and the link insrc/CMakeLists.txtare also blocked.The
subsystems/SBT/directory with at minimum aCMakeLists.txt, theSBTFactoryheader/source, and itsGeoPhysVol* build()implementation must be added before this PR can merge.Also applies to: 82-82
🤖 Prompt for AI Agents