next-exp / next-exp/IC

EventMixer code in IC

Open
#641 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement question
Dominant language
Python
Stars
11
Forks
77
PR merge metrics
No merged PRs in 30d

Description

For MC physics studies, we mix several input streams into a single output stream through the EventMixer python code. The same code also tells us the effective exposure (in years) of a certain number of MC events above some visible energy threshold.

This mixing is necessary because:

  • we mix close to 100 background sources, where each source is a given (isotope, Geant4 volume) combination, so the process is cumbersome and relies on detailed activity and detection efficiency assumptions for each (isotope, Geant4 volume) combination
  • we want analysers to use a consistent event mix assumption in each analysis cycle, so that results can be easily compared

Background info:

What we want to change, after discussions with @paolafer and Pau:

  • Code currently mixes nexus output files in GATE format. After mixing, all subsequent processing steps starting from the CPU-consuming detsim one are made only for this mixed output stream
  • There are scenarios where we want to change normalisation assumptions for the ~100 background sources relatively frequently, yet keeping control of what analysers are using. Reprocessing everything from the detsim stage can be a pain, and the detsim, diomira, irene steps are fairly stable
  • The plan would therefore to allow the possibility to mix irene output files in hdf5 format, rather than nexus output files in GATE format. Apart from that, the code would look similar to existing one, specifying input streams, activities and detection efficiencies for each in a long configuration file. However, it would not make sense for this code to be stand-alone anymore, as it would use IC output. So, it should most likely live in IC. In this new scheme, all ~100 background sources would be separately processed all the way through irene, then mixed in correct proportions after irene and before penthesilea.

This issue is about receiving guidance from the experts on how to structure this piece of code in IC:

  • Should this be a stand-alone IC city? Something else?
  • Is irene the right stage where to mix input streams?
  • Should the code be made general to allow for mixing at different stages of event processing, at least within IC part of processing? eg, after diomira, irene, penthesilea, esmeralda, and not just after irene. Unclear to me how much extra work this generalization is, perhaps using existing IC writers this is not so painful. But not obvious to me we really need this, perhaps allowing only post-irene mixing is all we need.

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading PyToNE/EventMixer.py and the EventMixer_NEW_DepletedXe.job example, then inspect IC's existing writers and the irene, penthesilea, diomira, and esmeralda stages. The issue is complete when the project has agreed where this mixer belongs, which processing stage it targets, and whether mixing should support additional stages.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.