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
mahmoudali2 authored Feb 20, 2025
2 parents 6213bac + 91e5123 commit f5d7088
Show file tree
Hide file tree
Showing 57 changed files with 1,637 additions and 753 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/key4hep-build.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Do not edit this file, it will be overwritten!
# The template file can be found in
# https://github.com/key4hep/key4hep-actions/blob/main/workflows/key4hep-build.yaml
name: Key4hep build

name: Key4hep build
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
schedule:
- cron: '16 5 * * *'
- cron: '16 4 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -22,6 +22,11 @@ jobs:
matrix:
build_type: ["release", "nightly"]
image: ["alma9", "ubuntu22"]
stack: ["key4hep"]
include:
- build_type: nightly
image: ubuntu24
stack: key4hep
fail-fast: false
runs-on: ubuntu-latest
steps:
Expand All @@ -30,3 +35,4 @@ jobs:
with:
build_type: ${{ matrix.build_type }}
image: ${{ matrix.image }}
stack: ${{ matrix.stack }}
16 changes: 7 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
set( PackageName k4geo )
#---------------------------

project(${PackageName})
project(${PackageName} LANGUAGES CXX)

# project version
SET( ${PackageName}_VERSION_MAJOR 0 )
Expand Down Expand Up @@ -97,15 +97,13 @@ 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(${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")
else()
set(DCH_INFO_H_EXIST "TRUE" CACHE STRING "Indicates whether the drift chamber data extension header file was found (TRUE if found, non set otherwise).")

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")
endif()

find_package(EDM4HEP)
Expand Down
2 changes: 1 addition & 1 deletion FCCee/ALLEGRO/compact/ALLEGRO_o1_v03/ALLEGRO_o1_v03.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<include ref="HCalBarrel_TileCal_v03.xml"/>
<include ref="ECalEndcaps_Turbine.xml"/>
<include ref="HCalEndcaps_ThreeParts_TileCal_v03.xml"/>
<include ref="MuonTagger.xml"/>
<include ref="MuonTaggerPhiTheta.xml"/>

<fields>
<!-- FIXME this is a place holder to get a reasonable magnetic field, it should be a real MAP obtained from FEM tools taking into account HCAL return yoke -->
Expand Down
74 changes: 74 additions & 0 deletions FCCee/ALLEGRO/compact/ALLEGRO_o1_v03/MuonTaggerPhiTheta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?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="FCCeeMuonTagger"
title="Muon Tagger for ALLEGRO, with phi-theta segmentation"
author="Created by A. Duglishvili from MuonTagger.xml, moving from eta to theta segmentation. Further mods by G. Marchiori to allow longitudinal layers"
url="no"
status="development"
version="1.0">
<comment>
Simple muon tagger with phi-theta segmentation - barrel and endcaps. The detector is a simple cylinder of plastic scintillator.
</comment>
</info>

<define>
<!-- define here the number of radial (barrel) or longitudinal, z (endcap) layers into which the overall cylinder(s) will be segmented -->
<constant name="MuonTaggerBarrelLayers" value="2"/>
<constant name="MuonTaggerEndcapLayers" value="2"/>
</define>

<display>
<vis name="muon_vis" r="1.0" g="0.1" b="0.1" showDaughters="true" visible="true" />
</display>

<readouts>
<readout name="MuonTaggerBarrelPhiTheta">
<!-- the phi binning is the same as in MuonTagger.xml -->
<!-- the theta offset (which sets the acceptance of the readout) was initially calculated from the eta offset of MuonTagger.xml -->
<!-- and slightly rounded so that the number of theta bins is integer. The theta width was set to 0.5 degrees giving a total of
336 bins (for MuonTagger it was 582 bins of delta_eta = 0.01). As this is not more than a "toy" muon detector this should be
OK for the moment - more refined geometry models and segmentations will be implemented when ready -->
<segmentation type="FCCSWGridPhiTheta_k4geo" phi_bins="704" offset_phi="-pi+(pi/704.)" grid_size_theta="0.0087266" offset_theta="0.1047277"/>
<id>system:4,subsystem:1,layer:5,theta:10,phi:10</id>
</readout>
<readout name="MuonTaggerEndcapPhiTheta">
<segmentation type="FCCSWGridPhiTheta_k4geo" phi_bins="704" offset_phi="-pi+(pi/704.)" grid_size_theta="0.0087266" offset_theta="0.1047277"/>
<id>system:4,subsystem:1,layer:5,theta:10,phi:10</id>
</readout>
</readouts>

<detectors>
<!-- barrel -->
<detector id="DetID_Muon_Barrel" name="MuonTaggerBarrel" type="SimpleCylinder_o1_v02" sensitive="true" vis="muon_vis" readout="MuonTaggerBarrelPhiTheta">
<!-- added for Pandora -->
<type_flags type="DetType_CALORIMETER + DetType_MUON + DetType_BARREL"/>
<!-- end -->
<!-- sensitive type="SimpleTrackerSD"/ -->
<!-- use calorimeter sensitive detector for scintillator - this is needed since PandoraPFA expects muon sim hits to be of type SimCaloHit -->
<sensitive type="BirksLawCalorimeterSD"/>
<dimensions rmin="MuonTagger_inner_radius" rmax="MuonTagger_outer_radius"
dz="MuonTagger_half_length" z_offset = "0" material="Polystyrene" phi0="0" deltaphi="360*deg" vis="muon_vis"/>
<layers>
<layer thickness="(MuonTagger_outer_radius - MuonTagger_inner_radius)/MuonTaggerBarrelLayers" repeat="MuonTaggerBarrelLayers"/>
</layers>
</detector>

<!-- endcaps -->
<detector id="DetID_Muon_Endcap_1" name="MuonTaggerEndcap" type="SimpleCylinder_o1_v02" sensitive="true" vis="muon_vis" readout="MuonTaggerEndcapPhiTheta">
<!-- added for Pandora -->
<type_flags type="DetType_CALORIMETER + DetType_MUON + DetType_ENDCAP"/>
<!-- end -->
<sensitive type="SimpleTrackerSD"/>
<dimensions rmin="MuonTaggerEndcap_inner_radius" rmax="MuonTaggerEndcap_outer_radius"
dz="(MuonTaggerEndcap_max_z - MuonTaggerEndcap_min_z)*0.5" z_offset = "MuonTaggerEndcap_min_z + (MuonTaggerEndcap_max_z - MuonTaggerEndcap_min_z)*0.5" material="Polystyrene" phi0="0" deltaphi="360*deg" vis="muon_vis"/>
<layers>
<layer thickness="(MuonTaggerEndcap_max_z - MuonTaggerEndcap_min_z)/MuonTaggerEndcapLayers" repeat="MuonTaggerEndcapLayers"/>
</layers>
</detector>

</detectors>

</lccdd>
2 changes: 1 addition & 1 deletion FCCee/ALLEGRO/compact/ALLEGRO_o1_v04/ALLEGRO_o1_v04.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<include ref="HCalBarrel_TileCal_v03.xml"/>
<include ref="ECalEndcaps_Turbine.xml"/>
<include ref="HCalEndcaps_ThreeParts_TileCal_v03.xml"/>
<include ref="MuonTagger.xml"/>
<include ref="MuonTaggerPhiTheta.xml"/>

<fields>
<!-- FIXME this is a place holder to get a reasonable magnetic field, it should be a real MAP obtained from FEM tools taking into account HCAL return yoke -->
Expand Down
3 changes: 2 additions & 1 deletion FCCee/ALLEGRO/compact/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The vertex detector and drift chamber are now taken directly from IDEA_o1_v03, t
Magnetic fields (solenoid + MDI) have been added.
Added "turbine-style" endcap ecal, and invoke this in the top-level xml (replacing the coneCyro geometry).
Added HCalBarrel_TileCal_v02.xml which uses HCalTileBarrel_o1_v02_geo.cpp and removed unused readout BarHCal_Readout_phi.
Added HCalEndcaps_ThreeParts_TileCal_v02.xml which uses HCalThreePartsEndcap_o1_v02_geo.cpp. Additionally, wrt v02 the readout was migrated to the theta-phi segmentation; unused readout *Readout_phi was removed; radial dimensions of layers were modified, so the outer radius of all three cylinders is the same.
Added HCalEndcaps_ThreeParts_TileCal_v02.xml which uses HCalThreePartsEndcap_o1_v02_geo.cpp. Additionally, wrt v02 the readout was migrated to the theta-phi segmentation; unused readout *Readout_phi was removed; radial dimensions of layers were modified, so the outer radius of all three cylinders is the same.
For the muon tagger, switched from eta-phi to theta-phi segmentation.

ALLEGRO_o1_v04: same as v03, but material in inner part of absorber in first layer of ECAL is configurable and set by default to G10
7 changes: 7 additions & 0 deletions FCCee/CLD/compact/CLD_o4_v05/materials.xml
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,11 @@
<fraction n="0.156851578703752" ref="O"/>
</material>

<!-- Default material to use in DDCAD import of CAD models (see CheckShape.xml in DD4hep) -->
<material name="DefaultMaterial">
<D value="7.85" unit="g/cm3"/>
<fraction n="0.998" ref="Fe"/>
<fraction n=".002" ref="C"/>
</material>

</materials>
Loading

0 comments on commit f5d7088

Please sign in to comment.