Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added __init__.py
Empty file.
320 changes: 0 additions & 320 deletions converter/geant4/Geant4MacroGenerator.py

This file was deleted.

73 changes: 73 additions & 0 deletions converter/geant4/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
HEAVY_ION_PARTICLE_ID = 25

GEANT4_PARTICLE_MAP = {
1: {
"name": "neutron",
"allowed_units": ["MeV", "MeV/nucl"],
"target_unit": "MeV"
},
2: {
"name": "proton",
"allowed_units": ["MeV", "MeV/nucl"],
"target_unit": "MeV"
},
3: {
"name": "geantino",
"allowed_units": ["MeV"],
"target_unit": "MeV"
},
4: {
"name": "e-",
"allowed_units": ["MeV"],
"target_unit": "MeV"
},
5: {
"name": "e+",
"allowed_units": ["MeV"],
"target_unit": "MeV"
},
6: {
"name": "alpha",
"allowed_units": ["MeV", "MeV/nucl"],
"target_unit": "MeV"
},
7: {
"name": "mu-",
"allowed_units": ["MeV"],
"target_unit": "MeV"
},
8: {
"name": "mu+",
"allowed_units": ["MeV"],
"target_unit": "MeV"
},
9: {
"name": "pi-",
"allowed_units": ["MeV"],
"target_unit": "MeV"
},
10: {
"name": "pi+",
"allowed_units": ["MeV"],
"target_unit": "MeV"
},
11: {
"name": "geantino",
"allowed_units": ["MeV"],
"target_unit": "MeV"
},
Comment on lines +54 to +58
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

Particle IDs 3 and 11 both map to the same particle name "geantino" with identical configurations. This appears to be a duplicate entry that could cause confusion or unexpected behavior. If both IDs are intended to map to the same particle, consider adding a comment explaining why; otherwise, one entry may be incorrect.

Copilot uses AI. Check for mistakes.
HEAVY_ION_PARTICLE_ID: { # equivalent of HEAVYION in other simulators
"name": "ion",
"allowed_units": ["MeV", "MeV/nucl"],
"target_unit": "MeV"
}
}

GEANT4_QUANTITY_MAP = {
"DoseGy": "doseDeposit",
"Energy": "energyDeposit",
"Fluence": "cellFlux",
"KineticEnergySpectrum": "cellFlux",
}

GEANT4_KINETIC_ENERGY_SPECTRUM = "KineticEnergySpectrum"
Empty file.
Loading