Skip to content

Comments

Pulse height does not score over whole geometry when no cell filter present.#3821

Open
GuySten wants to merge 1 commit intoopenmc-dev:developfrom
GuySten:pht-cell-filter-check
Open

Pulse height does not score over whole geometry when no cell filter present.#3821
GuySten wants to merge 1 commit intoopenmc-dev:developfrom
GuySten:pht-cell-filter-check

Conversation

@GuySten
Copy link
Contributor

@GuySten GuySten commented Feb 18, 2026

Description

Currently when no CellFilter is specified, pulse height tally results are always 0.
This PR fix that and now when no cell filter is specified, all the geometry is scored to.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@cfichtlscherer
Copy link
Contributor

Thanks for your work again. I am not sure if we need this. Why would you want to know the pulse-height over the entire geometry when no CellFilter is provided?

@GuySten
Copy link
Contributor Author

GuySten commented Feb 18, 2026

I discovered this unexpected behavior while trying to test a simple example containing one cell.

This can be useful for example when you have a model of one cell that is the detector vacuum boundary conditions and a fixed source.
You should be able to tally the pulse spectrum over the whole geometry (the detector) and you can model the difference between large and small detectors by changing the cell dimensions.

Now you have to specifiy a cell filter with that one cell as a workaround.

@vitmog
Copy link
Contributor

vitmog commented Feb 19, 2026

Each filter must have the default "neutral" form $f(x) \equiv 1$. Otherwise, it would be necessary to define all available filters for each detector.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants