Skip to content

Conversation

@peter-mckeown
Copy link
Collaborator

@peter-mckeown peter-mckeown commented Jun 3, 2025

(Copied from Original Repo MR! 26
This merge request adds two features:

  1. The possibility to configure models for hadronic shower simulation (including placement in ECAL + HCAL). So far testing has been performed for single particle events loaded from HDF5 - Now split into MR! 5

  2. The option to record information about the particle which triggers fast sim at the calorimeter face (including PiD, Energy, position, direction).

This is achieved via Run/Event actions. It is configurable via ccmake, with the output being stored in a ROOT file.

Copy link
Member

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this potentially be split into two separate PRs? It looks a bit like the actions are somewhat orthogonal to the HDF5 loading functionality changes.

Comment on lines +52 to +53
std::vector<unsigned long long> m_dimsOut{}; // This is a hot fix for older HDF5 versions!
//std::vector<unsigned long> m_dimsOut{};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we solve this with pre-processor checks? I suppose HDF5 exposes that somehow. Alternatively figure out the minimum version for hdf5 to go with the original version so that we can put this into the dependencies properly.

Comment on lines +28 to +35
/// begin-of-run callback
void begin(const G4Run*) override;
/// End-of-run callback
void end(const G4Run*) override;
/// begin-of-event callback
void beginEvent(const G4Event*) ;
/// End-of-event callback
void endEvent(const G4Event*) ;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to above, only need to declare those that are actually implemented


option(INSTRUMENT_MODEL "Instrument the steps of the showerModel call" OFF)

option(RECORD_CALO_IMPACT "Record properties of particle that triggers modelShower call" OFF)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a runtime option rather than a compile time option? Looking at the code below where it is used, it looks like the simple runtime check for this is effectively free compared to the rest of work that is done.

peter-mckeown and others added 3 commits June 4, 2025 11:00
Co-authored-by: Thomas Madlener <thomas.madlener@desy.de>
Co-authored-by: Thomas Madlener <thomas.madlener@desy.de>
Co-authored-by: Thomas Madlener <thomas.madlener@desy.de>
@peter-mckeown peter-mckeown mentioned this pull request Nov 14, 2025
@peter-mckeown
Copy link
Collaborator Author

Can this potentially be split into two separate PRs? It looks a bit like the actions are somewhat orthogonal to the HDF5 loading functionality changes.

Yes good idea- I've split the hadron shower functionality into MR! 5. Let's come back to this once that is merged

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.

3 participants