Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Pull Request Test Coverage Report for Build 18002889479Details
💛 - Coveralls |
|
@HenningSE Thanks a lot!
|
Hi @MasatoshiKobayashi, yes both of them are correct.
|
|
Sure, thanks. then the energy selection part looks fine for me. |
|
Thanks Masatoshi, the detector volumes are a little different different with this PR to better integrate with the energy selection. I will ask @ramirezdiego to take a look at this part. |
|
@HenningSE what's the difference between this and the energy used for cut? |
|
Hi @MasatoshiKobayashi these two energies are not identical and depend on the definition of an event. In |
|
Hi @HenningSE , thanks.
yes, this I understood -- we may have event without s1 or s2 due to CIV, below cathode, misidentification etc. However, once the event is recorded as an event, the truth energy should be more or less the same, no? |
|
By the way, another confirmation: |
This depends on the Geant4 simulation setting. In most cases I should be like this but you could also have e.g. a full U decay chain in one single Geant4 event. This would then lead to multiple straxen events that are ages apart from each other.
Hmm good point. I think with the method that is in this PR right now The energy deposits outside would still be included in the energy cut. There I would need to change the plugins in a way that we first evaluate the detector volumes and then the energy cut. |
|
@HenningSE |
* remove double version * refactor cuts logic * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * flake * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * child plugin * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
This pull request significantly refactors the microphysics volume selection and event selection logic in the codebase. The main changes include consolidating and modernizing the handling of detector volume properties, introducing a new system for per-volume cuts and selections, and removing legacy plugins and infrastructure. The update provides a more modular and extensible approach for defining and applying selection logic to clustered interactions.
Volume properties and selection refactor:
VolumePluginand volume-specific plugins (XENONnT_TPC,XENONnT_BelowCathode,XENONnT_GasPhase, etc.) with a unifiedVolumePropertiesplugin involume_properties.py. This new plugin annotates all clustered interactions with per-volume properties such asvol_id,xe_density, andcreate_S2, using a single pass and a newin_cylinderutility. [1] [2] [3] [4] [5] [6]volume_plugin.pyand legacy volume plugins, cleaning up imports and plugin registration. [1] [2] [3]New selection and cut system:
cuts_and_selectionspackage with plugins for applying boolean logic cuts to events, includingSelectionMerger,DefaultSimulation, andLowEnergySimulation, which allow flexible selection expressions over event fields. [1] [2]VolumeSelectionandEnergyCutplugins, enabling modular per-volume and energy-based event selection, using a newVOLUMES_IDSmapping for clarity and maintainability. [1] [2] [3]context.pyto use the new selection and volume property plugins, replacing the old volume-specific plugins.Supporting changes:
volume_properties_fieldsdtype todtypes.pyto standardize per-volume annotation fields.MergeClusterto reflect interface changes.