-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
74 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" ?> | ||
<gdml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd"> | ||
<define/> | ||
<materials/> | ||
<solids> | ||
<box name="world" x="2" y="2" z="2" lunit="m"/> | ||
</solids> | ||
<structure> | ||
<volume name="world"> | ||
<materialref ref="G4_lAr"/> | ||
<solidref ref="world"/> | ||
</volume> | ||
</structure> | ||
<setup name="Default" version="1.0"> | ||
<world ref="world"/> | ||
</setup> | ||
</gdml> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/RMG/Geometry/GDMLDisableOverlapCheck true | ||
|
||
/RMG/Output/ActivateOutputScheme Track | ||
|
||
/run/initialize | ||
|
||
# /RMG/Output/Track/AddProcessFilter Radioactivation | ||
# /RMG/Output/Track/SetEnergyFilter 0.01 MeV | ||
|
||
/RMG/Generator/Confine UnConfined | ||
|
||
/RMG/Generator/Select GPS | ||
/gps/position 0 0 0 | ||
/gps/particle ion | ||
/gps/ion 90 228 | ||
/gps/energy 0 keV | ||
/gps/ang/type iso | ||
|
||
/run/beamOn 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/env python3 | ||
|
||
import subprocess | ||
import sys | ||
|
||
from lgdo import lh5 | ||
|
||
rmg = sys.argv[1] | ||
macro = "macros/th228-chain.mac" | ||
output_lh5 = "th228-chain.lh5" | ||
|
||
# run remage, produce lh5 output. | ||
subprocess.run([rmg, "-g", "gdml/geometry-box.gdml", "-o", output_lh5, "-w", "--", macro]) | ||
|
||
# check that we get to stable isotopes. | ||
tracks = lh5.read("stp/tracks", output_lh5).view_as("pd") | ||
particle_numbers = tracks["particle"].value_counts() | ||
assert particle_numbers[1000902280] == 10 # primaries. | ||
assert particle_numbers[1000822080] == 10 # we should always get to Pb208. | ||
|
||
# check that we had some common processes. | ||
processes = lh5.read("stp/processes", output_lh5)["name"].view_as("np") | ||
print(processes) | ||
assert b"Radioactivation" in processes | ||
assert b"eBrem" in processes | ||
assert b"eIoni" in processes | ||
assert b"phot" in processes | ||
assert b"compt" in processes |