Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.

Conversation

@EinarElen
Copy link
Contributor

@EinarElen EinarElen commented Feb 23, 2023

This PR does two things primarily and resolves #86, see some details on the motivation there

  • Makes the hadronic process used in Geant4 for photonuclear reactions configurable, including using processes defined outside of SimCore/LDMX-sw (e.g. for licensing reasons). The configuration is based on the same kind of dynamic loading scheme as we use for e.g. sensitive detectors: https://github.com/LDMX-Software/SimCore/blob/iss86PNModels/include/SimCore/PhotoNuclearModel.h
  • Adds a set of such models that both do useful things and demonstrate how the feature can be used for more complicated tasks
    • Bertini (default): This model does what we currently do inside of GammaPhysics but doesn't actually change the hadronic process. So default LDMX simulations should be unchanged
    • A set of models that force the PN reaction to produce a particular kind of final state. Included here are a model for producing nothing hard events, single neutron events, and "at least N" of a particular set of particles similar to what the photonuclear products filter. All of these are based on an an ABC that makes designing these kinds of models trivial, called an EventTopologyProcess (naming suggestions more than welcome). To use it, you just need to override a function looking at the particle change object to see if it matches what you want. There are corresponding filters to be added in Biasing.

The other changes in SimCore are mostly in GammaPhysics, which has had its features moved into the PhotoNuclearModel functionality as well passing along the parameters from the runmanager.

I'm planning on documenting how to use these models and adding new ones over on the github pages later. There are some things one has to be careful about, but this PR gives you the tools you need to explore them. For example, to generate nothing hard events you want to only apply the model when interacting with heavy nuclei (at least copper), it is hard to make a nothing hard reaction from a smaller nucleus. Single neutron reactions on the other hand generally come from the primary collision they are relatively independent between different nuclei.

The toolset has been tested quite extensively by now, both from myself relying on it for the analysis that I showed at the CM & Lund focus talk, but I've also looked at some DQM figures e.g.

*
**/

virtual void incrementEventWeight(int N) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: Would love some thoughts on this from others

Copy link
Member

Choose a reason for hiding this comment

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

I think this is a reasonable approach, its what I do with my signal stuff when only getting X events after N tries.

Copy link
Member

@tomeichlersmith tomeichlersmith left a comment

Choose a reason for hiding this comment

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

We chatted in the sw-dev meeting about my only thoughts on this and our conclusion means that nothing needs to change here. I'm unsure if there are physics changes, but I think we can allow the ldmx-sw GitHub actions to check that for us after LDMX-Software/ldmx-sw#1160 is merged and new golden histograms are created with those (more helpful) histos.

So basically, I see

  • merge this
  • open PR in ldmx-sw updating SimCore after we update those histograms
  • see if we need any patches
  • make SimCore release if no more patches for this Hcal+PN stuff you've done
  • update ldmx-sw with this work

@EinarElen
Copy link
Contributor Author

Sounds reasonable to me. I'm going to sneak in a getKineticEnergy to SimParticle unless anyone protests.

@EinarElen EinarElen merged commit 2e40938 into trunk May 17, 2023
@EinarElen EinarElen deleted the iss86PNModels branch May 17, 2023 19:32
@tomeichlersmith
Copy link
Member

whoops, I got too excited and immediately after clicking the "make release" button I realized we had planned to do this after checking that it doesn't change anything.

Whoops! I think I'll just plan to bump the patch number here in SimCore if we need to.

@EinarElen
Copy link
Contributor Author

For future reference, the feature is documented here:
https://ldmx-software.github.io/docs/Alternative-Photo-Nuclear-Models.html

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alternative PN models

4 participants