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

Implement modular biasing options #92

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from
Draft

Conversation

lobis
Copy link
Member

@lobis lobis commented Dec 15, 2022

lobis Large: 524

This PR implements a generic gamma biasing option.

The configuration inside TRestGeant4Metadata is as follows:

<biasing type="split">
    <volume name="shieldingVolume"/>
    <parameter name="splittingFactor" value="2"/>
    <parameter name="center" value="(0,0,0)mm"/>
</biasing>
  1. User selects a biasing volume (typically the shielding) where the biasing takes place.
  2. The splitting factor is selected (> 1)
  3. A biasing center is selected (region of interest)

Currently only bremsstrahlung process is biased.

After each secondary gamma produced via bremsstrahlung the following is performed:

If the gamma points towards the point of interest (dot product is positive), then the gamma is multiplied by the split factor, and the weight is adjusted accordingly.

If otherwise the gamma points away from the point of interest, then the gamma will be killed with a probability of 1 - 1/splitFactor. If it survives the weight will be adjusted accordingly.

This weight is a property of Geant4 tracks and it is propagated correctly to secondaries.

This method will allocate more simulation time to gammas pointing towards the detector.

To compute the background rate, each contribution needs to be multiplied by the final weight in order to account for the increased number of events due to biasing.

The XML tag for this new biasing option is <biasing type="split"> and the default <biasing> tag is being kept in order to preserve backwards compatibility, the original biasing options remain untouched!

@lobis lobis added enhancement New feature or request development labels Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant