Skip to content

Rework the DD4hep and Gaudi tutorials - #24

Open
jbeirer wants to merge 3 commits into
DRDCalo:mainfrom
jbeirer:main-reworkTutorial
Open

Rework the DD4hep and Gaudi tutorials#24
jbeirer wants to merge 3 commits into
DRDCalo:mainfrom
jbeirer:main-reworkTutorial

Conversation

@jbeirer

@jbeirer jbeirer commented Aug 26, 2026

Copy link
Copy Markdown

Summary

This PR reworks the DD4hep and Gaudi tutorials while keeping the existing exercises and learning goals unchanged.

The main changes are:

  • modernize the DD4hep analysis workflow and move the analysis exercises to Jupyter notebooks
  • add a small bundled EDM4hep sample so the tutorials can run directly after cloning
  • make input/output paths independent of the current working directory
  • improve the setup for VS Code/Jupyter environments
  • make the simplecalo2 cell geometry follow the dimensions defined in the compact XML
  • fix and clarify the custom sensitive detector implementation and EDM4hep units
  • clean up and expand the tutorial documentation

The conceptual flow of the tutorials remains the same. In particular, the six Hands-on 6 questions still cover the same topics: cell ID decoding, accessing the calorimeter hit collection, energy distributions, longitudinal and lateral shower profiles, and hit contributions.

Hands-on 6 is now implemented as a Python/Jupyter exercise instead of the previous C++ ROOT macro.

Testing

  • existing Gaudi tutorial examples are covered by CTest
  • added a multithreaded EventStats test
  • solution notebooks are executed in CI against the bundled sample
  • notebooks are checked for valid Python syntax and notebook structure

@s6anloes

Copy link
Copy Markdown
Collaborator

Hi @jbeirer ,
thanks for the PR, I disagree with some of the changes though. We should discuss quickly, so we can move forward:

  1. I'm opposed to having the setup script. Part of the tutorials target is to teach the development workflows. The compilation/installation instructions and the k4_local_repo command are deliberately the same as if you were to work on k4RecTracker or k4geo. If we just provide a script that also does a bunch of other stuff, this does not teach the students how to develop in key4hep.
  2. Also related to my opposition against the setup script is the additional dependencies required for the jupyter notebooks. It is indeed a pain that they are not native to key4hep, and I imagine that some students will ask about this. But in favour of simplicity, I would restrict ourselves to normal python scripts only.

I did not yet have time to look at the other stuff, will get to it soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants