Skip to content

Commit

Permalink
PEN: add resolutionscale
Browse files Browse the repository at this point in the history
Without this Geant4 will abort when trying to scintillate in a PEN volume.
  • Loading branch information
ManuelHu committed May 7, 2024
1 parent eede31f commit 78b6cc4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/legendoptics/pen.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ def pyg4_pen_attach_scintillation(mat, reg) -> None:

mat.addConstPropertyPint("SCINTILLATIONTIMECONSTANT1", pen_scint_timeconstant())

# We do not know the PEN fano factor. Geant4 calculates σ = RESOLUTIONSCALE × √mean,
# so we set it to 1; otherwise Geant4 will crash.
mat.addConstPropertyPint("RESOLUTIONSCALE", 1)

# setup scintillation response just for electrons.
scint_config = ScintConfig(
flat_top=pen_scint_light_yield(),
Expand Down

0 comments on commit 78b6cc4

Please sign in to comment.