Skip to content

Commit

Permalink
Merge branch 'key4hep:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
SwathiSasikumar authored Aug 9, 2024
2 parents 8824bac + a713f69 commit b80334d
Show file tree
Hide file tree
Showing 124 changed files with 4,541 additions and 250 deletions.
57 changes: 56 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)

option(BUILD_TESTING "Enable and build tests" ON)
option(INSTALL_COMPACT_FILES "Copy compact files to install area" OFF)
option(INSTALL_BEAMPIPE_STL_FILES "Download CAD files for building the detailed beampipe" OFF)

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand Down Expand Up @@ -68,6 +69,7 @@ endif()
file(GLOB sources
./detector/tracker/*.cpp
./detector/calorimeter/*.cpp
./detector/calorimeter/dual-readout/src/*.cpp
./detector/fcal/*.cpp
./detector/muonSystem/*.cpp
./detector/other/*.cpp
Expand Down Expand Up @@ -107,9 +109,15 @@ if(NOT DCH_INFO_H_EXIST)
message(WARNING "Subdetector ${FILES_DEPENDINGON_DCH_INFO_H} will not be built because header file DDRec/DCH_info.h was not found")
endif()

find_package(EDM4HEP)
file(GLOB G4sources
./plugins/TPCSDAction.cpp
./plugins/CaloPreShowerSDAction.cpp
./plugins/FiberDRCaloSDAction.h
./plugins/FiberDRCaloSDAction.cpp
./plugins/Geant4Output2EDM4hep_DRC.cpp
./plugins/DRCaloFastSimModel.cpp
./plugins/DRCaloFastSimModel.h
)

if(DD4HEP_USE_PYROOT)
Expand All @@ -125,8 +133,11 @@ add_library(lcgeo ALIAS k4geo)
target_include_directories(${PackageName} PRIVATE ${PROJECT_SOURCE_DIR}/detector/include )
target_include_directories(${PackageName}G4 PRIVATE ${PROJECT_SOURCE_DIR}/detector/include )

target_include_directories(${PackageName} PRIVATE ${PROJECT_SOURCE_DIR}/detector/calorimeter/dual-readout/include )
target_include_directories(${PackageName}G4 PRIVATE ${PROJECT_SOURCE_DIR}/detector/calorimeter/dual-readout/include )

target_link_libraries(${PackageName} DD4hep::DDCore DD4hep::DDRec DD4hep::DDParsers ROOT::Core detectorSegmentations)
target_link_libraries(${PackageName}G4 DD4hep::DDCore DD4hep::DDRec DD4hep::DDParsers DD4hep::DDG4 ROOT::Core ${Geant4_LIBRARIES})
target_link_libraries(${PackageName}G4 DD4hep::DDCore DD4hep::DDRec DD4hep::DDParsers DD4hep::DDG4 ROOT::Core EDM4HEP::edm4hep EDM4HEP::edm4hepDict podio::podio podio::podioDict podio::podioRootIO ${Geant4_LIBRARIES})

if(K4GEO_USE_LCIO)
target_link_libraries(${PackageName} LCIO::lcio)
Expand Down Expand Up @@ -184,3 +195,47 @@ write_basic_package_version_file(
install(FILES ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_CMAKEDIR}/k4geoConfig.cmake
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_CMAKEDIR}/k4geoConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_CMAKEDIR} )

if(INSTALL_BEAMPIPE_STL_FILES)

set(STL_FILES
"AlBeMet162_30042024.stl"
"Copper_pipe_28092023.stl"
"Gold_19042024.stl"
"Paraffine_19042024.stl"
"Tungsten_mask_02102023.stl"
"Water_30042024.stl"
)
# Set main FCC url
set(FCC_URL "https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco")
set(STL_PATH "MDI_o1_v01/stl_files/Pipe_240430")

# Set the output directory where the file will be placed
set(OUTPUT_DIR "${PROJECT_SOURCE_DIR}/FCCee/MDI/compact/${STL_PATH}")
file(MAKE_DIRECTORY ${OUTPUT_DIR})

foreach(STL_FILE ${STL_FILES})
set(FULL_URL "${FCC_URL}/MDI/${STL_PATH}/${STL_FILE}")
message(DEBUG "Downloading file ${FULL_URL}")
set(OUTPUT_FILE "${OUTPUT_DIR}/${STL_FILE}")

if(EXISTS "${OUTPUT_FILE}")
message(STATUS "File ${STL_FILE} already exists. Skipping download.")
else()
# Download the file
file(DOWNLOAD ${FULL_URL} ${OUTPUT_FILE}
SHOW_PROGRESS
STATUS download_status)

list(GET download_status 0 status_code)
if(NOT status_code EQUAL 0)
list(GET download_status 1 error_message)
message(FATAL_ERROR "Failed to download file: ${error_message}")
endif()
endif()
endforeach()

file(MAKE_DIRECTORY share/k4geo/FCCee)
INSTALL(DIRECTORY ${OUTPUT_DIR} DESTINATION share/k4geo/FCCee/MDI/compact/MDI_o1_v01/stl_files )

endif()
2 changes: 2 additions & 0 deletions FCCee/ALLEGRO/compact/ALLEGRO_o1_v03/ALLEGRO_o1_v03.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
<include ref="../../../MDI/compact/MDI_o1_v00/Beampipe_o4_v05.xml" />
<include ref="../../../MDI/compact/MDI_o1_v00/BeamInstrumentation_o1_v01.xml" />

<!-- In order to use the CAD beampipe, build k4geo with the following CMake option:
cmake -D INSTALL_BEAMPIPE_STL_FILES=ON which will download the files needed -->
<!-- engineered CAD model of the beam pipe -->
<!-- <include ref="../../../MDI/compact/MDI_o1_v01/Beampipe_CADimport_o1_v02.xml" /> -->
<!-- <include ref="../../../MDI/compact/MDI_o1_v01/BeamInstrumentation_o1_v01.xml"/> -->
Expand Down
6 changes: 3 additions & 3 deletions FCCee/CLD/compact/CLD_o2_v06/CLD_o2_v06.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd">

<info name="CLD_o2_v05"
title="FCCee detector model option 2 version 05 (updated Beampipe and VXD)"
<info name="CLD_o2_v06"
title="FCCee detector model option 2 version 06 (corrected LumiCal position)"
author="Andre Sailer"
url="http://ilcsoft.desy.de"
status="development"
version="5">
version="6">
<comment>The compact format for the FCCee Detector design</comment>
</info>

Expand Down
73 changes: 33 additions & 40 deletions FCCee/IDEA/compact/IDEA_o1_v03/DectDimensions_IDEA_o1_v03.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
<constant name="DetID_SiWrapper_Barrel" value=" 23"/>
<constant name="DetID_SiWrapper_Disks" value=" 24"/>

<constant name="DetID_muonSystem" value=" 25"/>
<!-- Fiber dual-readout calorimeter DetID -->
<constant name="DetID_FiberDRCalo" value=" 25"/>

<constant name="DetID_muonSystem" value=" 26"/>

<!-- BPW: Beam Pipe Width -->
<constant name="BPWWall" value="0.35*mm" />
Expand Down Expand Up @@ -107,45 +110,6 @@
<constant name="EndPlateAbsorber_outer_radius" value="2090*mm"/>
<constant name="EndPlateAbsorber_z_min" value="2490*mm"/>
<constant name="EndPlateAbsorber_z_half_length" value="4.209/2.0*mm"/>

<constant name="ECalBarrel_inner_radius" value="2150*mm"/>
<constant name="ECalBarrel_outer_radius" value="2352*mm"/>
<constant name="ECalBarrel_half_length" value="2210*mm"/>
<constant name="ECalBarrel_symmetry" value="12"/>

<constant name="ECalEndcap_inner_radius" value="340*mm"/>
<constant name="ECalEndcap_outer_radius" value="2350*mm"/>
<constant name="ECalEndcap_min_z" value="2307*mm"/>
<constant name="ECalEndcap_max_z" value="2509*mm"/>
<constant name="ECalEndcap_outer_symmetry" value="12"/>
<constant name="ECalEndcap_inner_symmetry" value="12"/>

<!-- ECal plug not used -->
<constant name="ECalPlug_inner_radius" value="260*mm"/>
<constant name="ECalPlug_outer_radius" value="380*mm"/>
<constant name="ECalPlug_min_z" value="2307*mm"/>
<constant name="ECalPlug_max_z" value="2509*mm"/>
<constant name="ECalPlug_outer_symmetry" value="12"/>
<constant name="ECalPlug_inner_symmetry" value="12"/>

<constant name="HCalBarrel_inner_radius" value="2400*mm"/>
<constant name="HCalBarrel_outer_radius" value="3566*mm"/>
<constant name="HCalBarrel_half_length" value="2210*mm"/>
<constant name="HCalBarrel_symmetry" value="12"/>

<constant name="HCalEndcap_inner_radius" value="340*mm"/>
<constant name="HCalEndcap_outer_radius" value="3566*mm"/>
<constant name="HCalEndcap_min_z" value="2539*mm"/>
<constant name="HCalEndcap_max_z" value="3705*mm"/>
<constant name="HCalEndcap_symmetry" value="12"/>
<constant name="HCalEndcap_zcutout" value="200*mm"/>
<constant name="HCalEndcap_rcutout" value="0*mm"/>

<constant name="HCalRing_inner_radius" value="2370*mm"/>
<constant name="HCalRing_outer_radius" value="HCalEndcap_outer_radius"/>
<constant name="HCalRing_min_z" value="2353.5*mm"/>
<constant name="HCalRing_max_z" value="HCalEndcap_min_z"/>
<constant name="HCalRing_symmetry" value="12"/>

<constant name="YokeBarrel_inner_radius" value="4479*mm"/>
<constant name="YokeBarrel_outer_radius" value="6000*mm"/>
Expand Down Expand Up @@ -217,6 +181,20 @@
<constant name="tracker_region_zmax" value="DCH_half_length_total"/>
<constant name="tracker_region_rmax" value="DCH_outer_cyl_R_total"/>

<!-- Fiber dual-readout calorimeter tower dim-->
<constant name="FiberDRCalo_world_outer_radius" value="4525.*mm"/>
<constant name="FiberDRCalo_world_inner_radius" value="252.*mm"/>
<constant name="FiberDRCalo_world_z_extent" value="4525.*mm"/>
<constant name="FiberDRCalo_barrel_tube_outer_radius" value="2475.*mm"/>
<constant name="FiberDRCalo_barrel_tube_inner_radius" value="252.*mm"/>
<constant name="FiberDRCalo_barrel_tube_z_extent" value="2475.*mm"/>
<constant name="FiberDRCalo_barrel_z_extent" value="2.*m"/>
<constant name="FiberDRCalo_barrel_z_start" value="2.5*m"/>
<constant name="FiberDRCalo_barrel_nphi" value="144"/>
<constant name="FiberDRCalo_endcap_z_extent" value="2.*m"/>
<constant name="FiberDRCalo_endcap_z_start" value="2.5*m"/>
<constant name="FiberDRCalo_endcap_nphi" value="144"/>

<!-- Muon System Parameters-->

<constant name = "numberOfSides" value = "8"/> <!-- The number of sides of the muon system e.g (Octagon, Hexagon, ...)-->
Expand All @@ -231,6 +209,7 @@

<!-- End of Muon system Parameters-->


</define>


Expand All @@ -247,6 +226,8 @@

<region name="SiWrapperBRegion"/>
<region name="SiWrapperDRegion"/>

<region name="FastSimOpFiberRegion"/>
</regions>


Expand Down Expand Up @@ -279,6 +260,18 @@
<vis name="GlueVis" alpha="1.0" r="1.0" g="0.75" b="0.79" showDaughters="true" visible="true"/>
<vis name="RohacellVis" alpha="1.0" r="1.0" g="1.0" b="1.0" showDaughters="true" visible="true"/>
<vis name="AirVis" alpha="0.1" r="0.1" g="0.1" b="1.0" showDaughters="false" visible="true"/>

<vis name="DRCInvisible" showDaughters="false" visible="false"/> <!-- For fiber-based dual-readout calorimeter -->
<vis name="DRCTowerVis" alpha="1." r="0.7" g="0.4" b="0.1" showDaughters="false" visible="true"/>
<vis name="DRCCerenVis" alpha="0.5" r="0.3" g="0.6" b="0.9" showDaughters="false" visible="false"/>
<vis name="DRCScintVis" alpha="0.5" r="1.0" g="0.8" b="0.1" showDaughters="false" visible="false"/>
<vis name="DRCCladVis" alpha="0.5" r="0.0" g="0.5" b="0.5" showDaughters="false" visible="false"/>
<vis name="DRCGenericVis" alpha="0.8" r="0.5" g="0.5" b="0.5" showDaughters="false" visible="false"/>
<vis name="DRCGlassVis" alpha="0.5" r="0.0" g="0.1" b="0.9" showDaughters="false" visible="false"/>
<vis name="DRCWaferVis" alpha="1." r="0.0" g="0.9" b="0.2" showDaughters="false" visible="false"/>

<vis name="DRCWorldVis" alpha="0.2" r="0.9" g="0.8" b="0.1" showDaughters="false" visible="false"/>

<vis name="yoke_vis" r="255/256" g="0/256" b="0/256" alpha="1.0" showDaughters="true" visible="true" />
<vis name="no_vis" showDaughters="true" visible="false" />
<vis name="G10_FR4_vis" r="0.6" g="0.4" b="0.2" alpha="1.0" showDaughters="true" visible="true" />
Expand Down
Loading

0 comments on commit b80334d

Please sign in to comment.