-
Notifications
You must be signed in to change notification settings - Fork 4
add gean4 selection #2039
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
base: master
Are you sure you want to change the base?
add gean4 selection #2039
Conversation
f12055f
to
42e7e9a
Compare
"generator": "YaptideEditor.toJSON" | ||
}, | ||
"project": { | ||
"title": "Empty Geant 4 project", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"title": "Empty Geant 4 project", | |
"title": "Empty Geant4 project", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds GEANT4 as a new simulator option, updating both type definitions and UI labels while also extending scoring configuration support.
- Introduces GEANT4 in the SimulatorType enum and updates the mapping in SimulatorNames.
- Adds GEANT4-specific UI description in the sidebar and extends the SCORING_OPTIONS to include a GEANT4 key.
- Updates relevant files to align with the new GEANT4 support.
Reviewed Changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/types/RequestTypes.ts | Added GEANT4 to SimulatorType enum and SimulatorNames map. |
src/ThreeEditor/components/Sidebar/EditorSidebar.tsx | Added a GEANT4-specific label in simulatorDescriptions. |
src/ThreeEditor/Simulation/Scoring/ScoringOutputTypes.ts | Added an empty GEANT4 configuration to SCORING_OPTIONS. |
Files not reviewed (2)
- public/examples/ex8.json: Language not supported
- src/examples/exampleMap.json: Language not supported
DETECTOR: {}, | ||
ZONE: {} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GEANT4 entry in SCORING_OPTIONS is empty, which may lead to runtime issues if scoring options are accessed. Consider providing a default structure for GEANT4 similar to the one for FLUKA or updating the downstream logic to handle empty configurations.
DETECTOR: {}, | |
ZONE: {} | |
} | |
DETECTOR: { | |
Fluence: { | |
configuration: new Set([CONFIGURATION_OPTIONS.PER_PRIMARY]), | |
modifiers: new Set([]) | |
}, | |
Dose: { | |
configuration: new Set([CONFIGURATION_OPTIONS.PER_PRIMARY]), | |
modifiers: new Set([]) | |
} | |
}, | |
ZONE: { | |
Fluence: { | |
configuration: new Set([CONFIGURATION_OPTIONS.PER_PRIMARY]), | |
modifiers: new Set([SCORING_MODIFIERS.E, SCORING_MODIFIERS.ENUC]) | |
}, | |
Dose: { | |
configuration: new Set([CONFIGURATION_OPTIONS.PER_PRIMARY]), | |
modifiers: new Set([]) | |
} | |
} |
Copilot uses AI. Check for mistakes.
@@ -105,7 +105,8 @@ export function EditorSidebar(props: EditorSidebarProps) { | |||
const simulatorDescriptions = { | |||
[SimulatorType.COMMON]: 'Common options for Fluka and SHIELD-HIT12A', | |||
[SimulatorType.FLUKA]: 'Fluka specific options', | |||
[SimulatorType.SHIELDHIT]: 'SHIELD-HIT12A specific options' | |||
[SimulatorType.SHIELDHIT]: 'SHIELD-HIT12A specific options', | |||
[SimulatorType.GEANT4]: 'Geant4 specific options' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GEANT4 has been added to the simulatorDescriptions, but corresponding handling in functions like getGeometryTabElements is missing. This may result in an empty or inconsistent UI when GEANT4 is selected; consider integrating GEANT4 into the relevant switch cases.
Copilot uses AI. Check for mistakes.
@@ -11,5 +11,8 @@ | |||
}, | |||
"common": { | |||
"Beam of protons with lead collimator": "ex6.json" | |||
}, | |||
"geant4": { | |||
"Empty geant4 project": "ex8.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Empty geant4 project": "ex8.json" | |
"Empty Geant4 project": "ex8.json" |
"energyLoss": 0.03, | ||
"enableNuclearReactions": true, | ||
"energyModelStraggling": "Vavilov", | ||
"multipleScattering": "Moliere", | ||
"stoppingPowerTable": "ICRU91" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"energyLoss": 0.03, | |
"enableNuclearReactions": true, | |
"energyModelStraggling": "Vavilov", | |
"multipleScattering": "Moliere", | |
"stoppingPowerTable": "ICRU91" |
can we keep that empty ? those options are not applicable to Geant4, they are SHIELD-HIT12A specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See mine and copilot inline comments
No description provided.