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
aciarma authored Jan 31, 2025
2 parents d961353 + 8bd7462 commit 1941082
Show file tree
Hide file tree
Showing 77 changed files with 10,169 additions and 693 deletions.
19 changes: 10 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ file(GLOB sources
./detector/tracker/*.cpp
./detector/calorimeter/*.cpp
./detector/calorimeter/dual-readout/src/*.cpp
./detector/calorimeter/dual-readout-tubes/src/*.cpp
./detector/fcal/*.cpp
./detector/muonSystem/*.cpp
./detector/other/*.cpp
Expand Down Expand Up @@ -96,15 +97,10 @@ if(NOT K4GEO_USE_LCIO)
message(STATUS "Use of LCIO is DISABLED, some detectors that depend on LCIO will not be built: ${lcio_sources}")
endif()

include(CheckIncludeFileCXX)
set(CMAKE_REQUIRED_LIBRARIES DD4hep::DDRec)
CHECK_INCLUDE_FILE_CXX(DDRec/DCH_info.h DCH_INFO_H_EXIST)
set(CMAKE_REQUIRED_LIBRARIES)
set(FILES_DEPENDINGON_DCH_INFO_H "DriftChamber_o1_v02.cpp" )

if(NOT DCH_INFO_H_EXIST)
list(FILTER sources EXCLUDE REGEX "${FILES_DEPENDINGON_DCH_INFO_H}")
message(WARNING "Subdetector ${FILES_DEPENDINGON_DCH_INFO_H} will not be built because header file DDRec/DCH_info.h was not found")
if(${DD4hep_VERSION} VERSION_LESS 1.29)
set(FILES_DEPENDINGON_DCH_INFO_H "DriftChamber_o1_v02.cpp" )
list(FILTER sources EXCLUDE REGEX "${FILES_DEPENDINGON_DCH_INFO_H}")
message(WARNING "Subdetector ${FILES_DEPENDINGON_DCH_INFO_H} will not be built because the current version of DD4hep does not ship with the header file DDRec/DCH_info.h")
endif()

find_package(EDM4HEP)
Expand All @@ -116,6 +112,8 @@ file(GLOB G4sources
./plugins/Geant4Output2EDM4hep_DRC.cpp
./plugins/DRCaloFastSimModel.cpp
./plugins/DRCaloFastSimModel.h
./plugins/DRTubesSDAction.hh
./plugins/DRTubesSDAction.cpp
)

if(DD4HEP_USE_PYROOT)
Expand All @@ -134,6 +132,9 @@ target_include_directories(${PackageName}G4 PRIVATE ${PROJECT_SOURCE_DIR}/detect
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_include_directories(${PackageName} PRIVATE ${PROJECT_SOURCE_DIR}/detector/calorimeter/dual-readout-tubes/include )
target_include_directories(${PackageName}G4 PRIVATE ${PROJECT_SOURCE_DIR}/detector/calorimeter/dual-readout-tubes/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 podio::podioRootIO EDM4HEP::edm4hep ${Geant4_LIBRARIES})

Expand Down
4 changes: 2 additions & 2 deletions FCCee/ALLEGRO/compact/ALLEGRO_o1_v03/ALLEGRO_o1_v03.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
<include ref="DriftChamber_o1_v02.xml"/> <!-- symbolic link to ../../../IDEA/compact/IDEA_o1_v03/DriftChamber_o1_v02.xml -->
<include ref="SiliconWrapper_o1_v03.xml"/> <!-- symbolic link to ../../../IDEA/compact/IDEA_o1_v03/SiliconWrapper_o1_v03.xml -->
<include ref="ECalBarrel_thetamodulemerged.xml"/> <!-- if you remove the ECalBarrel, you also have to remove or update the "GlobalSolenoid" field (it depends on ECAL dimensions) -->
<include ref="HCalBarrel_TileCal_v02.xml"/>
<include ref="HCalBarrel_TileCal_v03.xml"/>
<include ref="ECalEndcaps_Turbine.xml"/>
<include ref="HCalEndcaps_ThreeParts_TileCal_v02.xml"/>
<include ref="HCalEndcaps_ThreeParts_TileCal_v03.xml"/>
<include ref="MuonTagger.xml"/>

<fields>
Expand Down
183 changes: 183 additions & 0 deletions FCCee/ALLEGRO/compact/ALLEGRO_o1_v03/HCalBarrel_TileCal_v03.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
<?xml version="1.0" encoding="UTF-8"?>
<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd">
<info name="FCCee_HCalBarrel_TileCal"
title="Barrel Calorimeter"
author="C. Solans, J. Lingemann"
url="no"
status="development"
version="1.0">
<comment>The first FCCee HCal layout based on ATLAS HCal, not optimised yet</comment>
<comment>1. Nov 2022, J. Faltova: update material and radial segmentation for FCCee </comment>
</info>
<define>
<constant name="BarHCal_zOff" value="0"/>
<!-- dimensions in R / rho of actual detector modules (face-plate is placed inside)-->
<!-- tile dimensions -->
<constant name="BarHCal_n_phi_modules" value="256"/>
<constant name="BarHCAL_module_spacing_phi" value="1*mm"/>
<!-- component dimensions -->
<constant name="BarHCal_master_plate_thickness" value="5*mm" />
<constant name="BarHCal_spacer_plate_thickness" value="4*mm" />
<constant name="BarHCal_air_space_thickness" value="0.5*mm" />
<constant name="BarHCal_scintillator_thickness" value="3*mm" />
<!-- face and end-plate dimensions -->
<constant name="BarHCal_steel_support_thickness" value="212*mm" />
<constant name="BarHCal_end_plate_thickness" value="5*mm" />
<constant name="BarHCal_face_plate_thickness" value="10*mm" />
<constant name="BarHCal_plate_space" value="0.5*mm" />
<!-- different sizes of the layers -->
<constant name="layer_size1" value="50*mm" />
<constant name="layer_size2" value="100*mm" />
<constant name="layer_size3" value="200*mm" />
</define>

<display>
<vis name="hcal_steel_vis" r="0.5" g="0.5" b="0.5" alpha="1" showDaughters="true" visible="true" drawingStyle="solid" />
<vis name="hcal_master_vis" r="0.6" g="0.6" b="0.6" alpha="1" showDaughters="true" visible="true" drawingStyle="solid" />
<vis name="hcal_support_vis" r="0.8" g="0.3" b="0.3" alpha="1" showDaughters="true" visible="true" drawingStyle="solid" />
<vis name="hcal_face_plate_vis" r="0.8" g="0.3" b="0.3" alpha="1" showDaughters="true" visible="true" drawingStyle="solid" />
<vis name="hcal_end_plate_vis" r="0.8" g="0.3" b="0.3" alpha="1" showDaughters="true" visible="true" drawingStyle="solid" />
<vis name="hcal_polystyrene_vis" r="0.0" g="0.6" b="0.3" alpha="0.8" showDaughters="true" visible="true" />
<vis name="hcal_envelope" r="0.6" g="0.8" b="0.6" alpha="1" showDaughers="true" visible="true" />
<vis name="hcal_barrel_seq1_vis" r="0.1" g="0.8" b="0.6" alpha="1" showDaughers="true" visible="true" />
<vis name="hcal_barrel_seq2_vis" r="0.1" g="0.6" b="0.8" alpha="1" showDaughers="true" visible="true" />
<vis name="hcal_barrel_layer_vis" r="0.1" g="0.6" b="0.8" alpha="1" showDaughers="true" visible="true" />
<vis name="hcal_air_vis" r="1" g="1" b="1" alpha="1" showDaughers="true" visible="true" />
</display>

<readouts>
<readout name="HCalBarrelReadout">
<!-- Description of the variables:
detLayout - variable to determine if it's a Barrel(=0) or Endcap(=1).
offset_z - middle position in z of the Barrel, which is zero.
width_z - z length of the Barrel.
offset_r - inner radius of the Barrel (first layer).
numLayers - takes N numbers: N is the number of different sizes of the layers;
1st value is the number of layers with the dR/thickness equal to the 1st element of dRlayer variable;
N-th value is the number of layers with the dR/thickness equal to the N-th element of dRlayer variable.
dRlayer - all different dRs/thicknesses used to form the layers.
grid_size_theta - granularity in theta which is followed to define cells;
the center of each cell approximately matches to the center of the theta bin with the size defined in this variable.
phi_bins - number of bins in phi
offset_theta - offset in theta to start theta binning; it is the center of the first theta bin that is outside the theta range of the Barrel.
offset_phi - center of the first phi bin.
-->
<segmentation type="FCCSWHCalPhiTheta_k4geo"
detLayout="0"
offset_z="0"
width_z="BarHCal_dz*2"
offset_r="BarHCal_rmin+BarHCal_face_plate_thickness+BarHCal_plate_space"
numLayers="4 6 3"
dRlayer="layer_size1 layer_size2 layer_size3"
grid_size_theta="0.022180"
phi_bins="BarHCal_n_phi_modules"
offset_theta="0.783406"
offset_phi="-pi+(pi/BarHCal_n_phi_modules)"/>
<id>system:4,layer:5,row:9,theta:9,phi:10</id>
</readout>
<readout name="HCalBarrelReadoutPhiRow">
<!-- Description of the variables:
detLayout - variable to determine if it's a Barrel(=0) or Endcap(=1).
offset_z - middle position in z of the Barrel, which is zero.
width_z - z length of the sensitive" part of the Barrel.
offset_r - inner radius of the Barrel (first layer).
numLayers - takes N numbers: N is the number of different sizes of the layers;
1st value is the number of layers with the dR/thickness equal to the 1st element of dRlayer variable;
N-th value is the number of layers with the dR/thickness equal to the N-th element of dRlayer variable.
dRlayer - all different dRs/thicknesses used to form the layers.
grid_size_row - takes 13 numbers which equals to the number of layers in the Barrel;
each value is the number of rows/scintillators grouped in a cell in each layer.
dz_row - size of the row consisting of 2 * Master plate + 1 * Spacer plate + 1 * Scintillator + Air.
phi_bins - number of bins in phi
offset_phi - center of the first phi bin.
-->
<segmentation type="FCCSWHCalPhiRow_k4geo"
detLayout="0"
offset_z="0"
width_z="2795.5*2*mm"
offset_r="BarHCal_rmin+BarHCal_face_plate_thickness+BarHCal_plate_space"
numLayers="4 6 3"
dRlayer="layer_size1 layer_size2 layer_size3"
grid_size_row="1 1 1 1 1 1 1 1 1 1 1 1 1"
dz_row="2*BarHCal_master_plate_thickness + BarHCal_spacer_plate_thickness + BarHCal_scintillator_thickness + 2*BarHCal_air_space_thickness"
phi_bins="BarHCal_n_phi_modules"
offset_phi="-pi+(pi/BarHCal_n_phi_modules)"/>
<id>system:4,layer:5,row:9,phi:10</id>
</readout>
</readouts>

<detectors>
<detector id="BarHCal_id" name="HCalBarrel" type="HCalTileBarrel_o1_v02" readout="HCalBarrelReadout">
<type_flags type="DetType_CALORIMETER + DetType_HADRONIC + DetType_BARREL"/>
<dimensions rmin="BarHCal_rmin" rmax="BarHCal_rmax" dz="BarHCal_dz" vis="hcal_envelope" />
<sensitive type="BirksLawCalorimeterSD"/>
<end_plate name="end_plate" thickness="BarHCal_end_plate_thickness" material="Fe" sensitive="false" vis="hcal_end_plate_vis" />
<face_plate name="face_plate" thickness="BarHCal_face_plate_thickness" material="Fe" sensitive="false" vis="hcal_face_plate_vis" />
<plate_space name="plate_space" thickness="BarHCal_plate_space" material="Air" sensitive="false" vis="hcal_air_vis" />
<steel_support name="steel_support" thickness="BarHCal_steel_support_thickness" material="Steel235" sensitive="false" vis="hcal_steel_support_vis" />
<layers>
<layer id="0" name="type_1" material="Air" vis="hcal_barrel_layer_vis">
<dimensions
dr="layer_size1"
nModules="4"
/>
</layer>
<layer id="1" name="type_2" material="Air" vis="hcal_barrel_layer_vis">
<dimensions
dr="layer_size2"
nModules="6"
/>
</layer>
<layer id="2" name="type_3" material="Air" vis="hcal_barrel_layer_vis">
<dimensions
dr="layer_size3"
nModules="3"
/>
</layer>
</layers>

<sequence_a id="3" name="sequence_1" material="Air" vis="hcal_barrel_seq1_vis">
<dimensions
dz="2*BarHCal_master_plate_thickness + BarHCal_spacer_plate_thickness + BarHCal_scintillator_thickness + 2*BarHCal_air_space_thickness"
phiBins="BarHCal_n_phi_modules"
x="BarHCAL_module_spacing_phi"
/>
<!-- Master plate -->
<module_component name="master" thickness="BarHCal_master_plate_thickness" y_offset="0" material="Fe" sensitive="false" vis="hcal_steel_master_vis" />
<!-- Spacer plate -->
<module_component name="spacer" thickness="BarHCal_spacer_plate_thickness" y_offset="0" material="Fe" sensitive="false" vis="hcal_steel_vis" />
<!-- Master plate -->
<module_component name="master" thickness="BarHCal_master_plate_thickness" y_offset="0" material="Fe" sensitive="false" vis="hcal_steel_master_vis" />
<!-- Air -->
<module_component name="airspacer" thickness="BarHCal_air_space_thickness" y_offset="0" material="Air" sensitive="false" vis="hcal_air_vis" />
<!-- Scintillator plate -->
<module_component name="scintillator" thickness="BarHCal_scintillator_thickness" y_offset="0" material="Polystyrene" sensitive="true" vis="hcal_polystyrene_vis" />
<!-- Air -->
<module_component name="airspacer" thickness="BarHCal_air_space_thickness" y_offset="0" material="Air" sensitive="false" vis="hcal_air_vis" />
</sequence_a>
<sequence_b id="4" name="sequence_2" material="Air" vis="hcal_barrel_seq2_vis">
<dimensions
dz="2*BarHCal_master_plate_thickness + BarHCal_spacer_plate_thickness + BarHCal_scintillator_thickness + 2*BarHCal_air_space_thickness"
phiBins="BarHCal_n_phi_modules"
x="BarHCAL_module_spacing_phi"
/>
<!-- Master plate -->
<module_component name="master" thickness="BarHCal_master_plate_thickness" y_offset="0" material="Fe" sensitive="false" vis="hcal_steel_master_vis" />
<!-- Air -->
<module_component name="airspacer" thickness="BarHCal_air_space_thickness" y_offset="0" material="Air" sensitive="false" vis="hcal_air_vis" />
<!-- Scintillator plate -->
<module_component name="scintillator" thickness="BarHCal_scintillator_thickness" y_offset="0" material="Polystyrene" sensitive="true" vis="hcal_polystyrene_vis" />
<!-- Air -->
<module_component name="airspacer" thickness="BarHCal_air_space_thickness" y_offset="0" material="Air" sensitive="false" vis="hcal_air_vis" />
<!-- Master plate -->
<module_component name="master" thickness="BarHCal_master_plate_thickness" y_offset="0" material="Fe" sensitive="false" vis="hcal_steel_master_vis" />
<!-- Spacer plate -->
<module_component name="spacer" thickness="BarHCal_spacer_plate_thickness" y_offset="0" material="Fe" sensitive="false" vis="hcal_steel_vis" />
</sequence_b>

</detector>
</detectors>

</lccdd>
Loading

0 comments on commit 1941082

Please sign in to comment.