Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create DeepEcalProcessFilter #1288

Closed
tvami opened this issue Apr 22, 2024 · 3 comments · Fixed by #1289
Closed

Create DeepEcalProcessFilter #1288

tvami opened this issue Apr 22, 2024 · 3 comments · Fixed by #1289

Comments

@tvami
Copy link
Member

tvami commented Apr 22, 2024

Is your feature request related to a problem? Please describe.

We currently dont have a filter that would concentrate on having a brem in the deeper layers of ECAL

Describe the solution you'd like

Make DeepEcalProcessFilter that keeps events that undergo a conversion process in the Ecal-back (definition of that should be configurable)

Additional context

See @tylerhoroho-UVA 's talk at the SWAN meeting today:
https://indico.fnal.gov/event/64332/timetable/#16-late-showering-photon-backg

@tvami tvami self-assigned this Apr 22, 2024
@tomeichlersmith
Copy link
Member

I would suggest looking at the design of the EcalDarkBremFilter and similar filters I developed for the EaT analysis. They make use of the PartialEnergySorter user action which forces Geant4 to process all particles above a certain energy first. This is different from its default behavior of just processing the last particle that was created (unwinding a stack) and is much more performant when users need to make a "mid-shower" filtering decision.

The PartialEnergySorter, as a "stacking" action, defines two1 "stages" of the simulation. In the first stage, all of the particles above the input threshold are processed. In the second stage, the rest of the particles are processed. Geant4 has a callback for when stages are being changed NewStage which we allow actions to implement. This function is where you could make your check in the middle of a shower. Besides the EcalDarkBremFilter, the other mid-shower filters also rely on this behavior. You'll see all of them make the primary keep/abort decision within the NewStage function.

Since this is mainly position based rather than energy based, we could think about writing a new action similar to PartialEnergySorter which prefers processing particles that are deeper than others. However, this stack manipulation is complicated so if you can define an energy threshold that is both definitive for your sample (e.g. we only care about late conversions above X energy, conversions below this energy will be cut out by the analysis) and this threshold is significant relative to the beam energy, then the PartialEnergySorter will be helpful. (The second criterion is mainly there to ensure that the stack manipulation is actually helping improve performance. If the threshold is too low, too much of the shower will be processed in the first stage thus sacrificing any performance benefit that the sorter can help with.)

Footnotes

  1. To be pedantic, its technically at least two stages. There could be more stages if other filters/actions modify the stacking behavior. In addition, often Geant4 calls NewStage a second time right before it starts the third stage which has no particles. I don't know why this is although it is rather simple to code around this feature/bug.

@tvami
Copy link
Member Author

tvami commented Apr 22, 2024

Sounds good, thanks Tom! @tylerhoroho-UVA what's a good energy threshold to consider?

@horohoo
Copy link
Contributor

horohoo commented Apr 22, 2024

I think using a similar energy threshold to the one we use on the creation of a hard brem is reasonable. Maybe >2.4 GeV (for a 4 GeV beam)?

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

Successfully merging a pull request may close this issue.

4 participants