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

Select zone as scoring object. #1906

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

jagodek
Copy link
Contributor

@jagodek jagodek commented Dec 15, 2024

This pull request includes several changes to improve the scoring functionality in the ThreeEditor module, particularly focusing on the ScoringOutput class and related components. The changes introduce new features such as handling different scoring types (detector and zone) and updating the UI components to reflect these changes.

Enhancements to Scoring Functionality:

  • src/ThreeEditor/Simulation/Scoring/ScoringOutput.ts:

    • Added new properties zoneUuid and scoringType to ScoringOutputJSON and corresponding private fields _zone and _scoringType to the ScoringOutput class. [1] [2]
    • Implemented getter and setter methods for zone, scoringType, and detector.
    • Updated the toJSON and fromJSON methods to include the new properties. [1] [2]
    • Added a method removeAllQuantities to clear all quantities from the scoring output.
  • src/ThreeEditor/Simulation/Scoring/ScoringManager.ts:

    • Added a method getOutputByQuantityUuid to retrieve a scoring output by a quantity UUID.

UI and Component Updates:

  • src/ThreeEditor/components/Dialog/ChangeScoringTypeDialog.tsx:

    • Created a new dialog component to handle changing the scoring type, with options to clear existing quantities.
  • src/ThreeEditor/components/Sidebar/properties/category/OutputConfiguration.tsx:

    • Added a toggle button group to switch between detector and zone scoring types, and updated the UI to show relevant fields based on the selected scoring type. [1] [2] [3] [4]
  • src/ThreeEditor/components/Sidebar/properties/category/ObjectInfo.tsx:

    • Displayed the scoring type for scoring quantities in the properties panel. [1] [2] [3]

Additional Changes:

  • src/ThreeEditor/Simulation/Scoring/ScoringOutputTypes.ts:

    • Added new constants for FLUKA zone keyword and modifier options.
  • src/ThreeEditor/Simulation/Zones/ZoneManager.ts:

    • Added a method getZoneOptionsForScoring to retrieve zone options formatted for scoring.

These changes collectively enhance the flexibility and functionality of the scoring system, allowing for more precise and varied simulation configurations.

@jagodek jagodek linked an issue Dec 15, 2024 that may be closed by this pull request
@jagodek jagodek self-assigned this Dec 15, 2024
@jagodek jagodek marked this pull request as ready for review December 28, 2024 23:41
@jagodek jagodek requested a review from grzanka December 28, 2024 23:41
@grzanka
Copy link
Contributor

grzanka commented Dec 30, 2024

I've started to add new zone-based quantity to an Fluka example.

The popup was somehow misleading. Why yaptide wanted to remove quantites ?
There were none added to my output at that moment.

image

@grzanka
Copy link
Contributor

grzanka commented Dec 30, 2024

It seems that the converter functionality is still missing to handle Zone scoring for Fluka:

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select Zone in sidebar for scoring
2 participants