Skip to content

Update - #12

Merged
jhajduga merged 38 commits into
Doccumentation-Update-for-Propouse-of-PhDfrom
develop
Jul 22, 2025
Merged

Update#12
jhajduga merged 38 commits into
Doccumentation-Update-for-Propouse-of-PhDfrom
develop

Conversation

@jhajduga

Copy link
Copy Markdown
Owner

No description provided.

barachwal and others added 30 commits April 3, 2025 10:37
Merge remote-tracking branch 'upstream/develop' into develop
Improved the way traces and doses are saved to files using multithreading.
* Create mdbook.yml

* Update

* Branch to documentation selected

* Update mdbook.yml

---------

Co-authored-by: Bartek Rachwał <brachwal@agh.edu.pl>
* Positiopning from CAD model.
Almost isocentre where it should be...
Almost.

* Positioning, renaming and if iba then X and Z in cell positioning are multiplied by -1

* put iba rotaion check directly in layer

* remove redundant code and tune naming

* WIP -> Iba update and naming in code.

TODO!
Change All Plans (Positioning from CSV move to to D3DDetector_Detector)
TopPositionInenv rename to TranslationInLocalFrame
TranslationInLocalFrame moved to Cell
Uptade fobs to incorporate that.

* WIP

* There were a doubled shift of the phantom. Partialy resolved.

TODO - update cell positioning to work properly...

* iba positioning - done!

* Updated - Positioning for IbaImRT Phantom

* Proper box positioning and plan.
Proper table rotation.
Proper box rotation.

* Static radiotherapy-ready setup for Iba ImRT Just Box.

* Updated - enable proper simplified MLC positioning.

* renamings

* Proper MLC positioning and orientation.

* fix d3dtray issue

* WIP.

TODO:
Incorporate it to word construction.

* works for StlDetectorWithPositioningFromCsv

* works for PositioningFromCsv

* WIP ComputeCellsPositioning

* Modular Detector should inherit from IPhysicalVolume and not VPatent
Todo - fix it

* Uptade - Geo creation from 3mf format (saved to db with vertexes in csv) is working almost properly.

Todo:
Deal with the problem in which some walls are “too small” to be considered valid.

fCarTolerance = myMaxExtent * 1e-11 * mm
This depends on the size of the world.
The larger the world, the larger you must have geometric elements in the simulation.

* Phantom Explosion state fixed.

* make it working for regular positioning

* remove Layer Pads export

* cleanup

* rm layer context from d3ddetector

* rmD3DMLayer from project

* WIP - for propouse of merging changes.

* Added tool to change Surface tolerance size.

TODO:

Check in ModularPhantom.cc ModularPhantom::Construct if the triangles are to small or degenerate - if they are - do not create them.

TODO: V2:  During exporting meshes to DB -> simplifie meshes in trimesh.

* Code that works well enough.  I am careful not to overcomplicate things.

Temporaly - fewer errors
when prouking geometry.
During simulation, more chance that a particle will get stuck because the few remaining damaged elements are more damaged.

* WIP - refac.

* temp data added

* GeometryBuilder and GeometryParser have been refactoured.
The directory structure has been revised.

TODO:
A lot of

* Wip - almost there...

* // TODO: Filtrowanie elementów, które chcemy usunąć z IbaImRT
    // TODO: Musi zostać stworzony jakiś modół który pozwoli pobrać ścieżkę do DB i do CSV z z PhantomWorld

Bouth - project them as generic mechanizm and then - implement them in IBA and ModularWP

* TODO:

- Rename Geometry Parser to GeometryDBReader.
- Inside GeometryDBReader -> build list of scintilator cells.
- if path to DB exist -> then then do stuff.
- read materials from DB && translate them to geant materials.
- move and rotate all nev elements inside patient world.
- set minimal patient world size based on GetExtent():
    // Get extents
    G4VisExtent ve = solid->GetExtent();
    G4double xmin = ve.GetXmin(), xmax = ve.GetXmax();
    G4double ymin = ve.GetYmin(), ymax = ve.GetYmax();
    G4double zmin = ve.GetZmin(), zmax = ve.GetZmax();

* WIP

* Cleaning - Bug:

label = D3DDetector_Cell_ON245  position: (58.7,47.95,59.45)
[INFO]:: IPhysicalVolume::Construct: No direct pv to link...
[INFO]:: Link logical D3DDetector_Cell_ON245 with G4PV: phmWorldPV
transformPosition: (58.7,47.95,59.45)...
 no physical volume found.
 no rotation.
 no rotation.

Looking for source of bug and wgy it was working elier...

* Almost done...

* Working code.
Python intrerpreter finalized properly.

* TODO def.

* Unnecessary double finalization of GeometryDBReader

* Working code.

* Add d3df-patients as submodule under submodules/g4rtd3df-patients

* Patient update

* Capping updated

* Submodule update.

* Submodule update

* Modular Water Phantom updated.

* WIP

* Excluding components from Toml -> Done.

* TODO:

 - Update README.md here and in the submodule.
 - Implement rotation of 3mf parts.

* README Uptade

* Submodule update

* Submodule uptaded

* Jobs for testbeam

* HDF5 old dependencies remopved, Annoying "make" warning about visability removed, UPdated - g4rt_env.yml to working wersion (also with tools to visualize phantom by trimesh).

* Pyglet and fretype update.

* Properly rotated 3mf geometry.

* PDD update

* update patient reference

* add some improvements

* fix and patient update

* update patient sumbmodule

* Cmake uptades - python path issue.

* Last needed changes.
(missing collon, GDML language (on polisk systems))

* 55 refactor volume calc for the analysis (Dose3D-Future#60)

* add volume for vpatient

* add extra cell volume logic

* fix CellInfo ctr issue

* remove ::SIZE usage

* refactor ::SIZE type

* rm obsolete scoring func

* touch gtest

* add cad export issue fix

* GeometryBuilder cleanup

---------

Co-authored-by: Bartek Rachwal <brachwal@agh.edu.pl>
* add tps test job and data

* add fsf test files

* add custom beam masks

* tuning the fsf definition

* exporting of metrics work

* add mterics calc

* add modified plans

* add srunet production data

* beam fix

* remove redundant method

* add merge fixes for new logic
* init app structure (wip)

* sim without final tld obj

* add tld creation (cubic)

* add vtk tweaks

* cleanup fsf

* asf pipeline added

* make asf working with ct data

* add production jobs

* update jobs names

* fix rotation for beam

* fix rotation issue

* tune priorities in TOML job config

* fix hashed scoring mapping

* tld cell scoring added

* voxel scoring added, fixed centre calc in ScoringVolume

* sync

* merge and fix issues with updated develop

* dev sync

* sync

* sync

* Material update.
GPS production in progress.

* GPS Updated and tuned.

* Showstoper - problem z kodowaniem STL... ;_; Again.

* Log massage removel and

* Naprawa meergowania developa into branch 19.

* Update. Incomporate changes from develop to branch 19.

* Add some example data to branch

* Rename ast to stl.

* The method of positioning TLD pastilles in the tray has been changed.

* GPS update

* GPS positioning update

* Updated STL files list

* add new material LiF:Cu,Mg,P

* Positiopning from CAD model.
Almost isocentre where it should be...
Almost.

* Positioning, renaming and if iba then X and Z in cell positioning are multiplied by -1

* remove redundant code and tune naming

* WIP -> Iba update and naming in code.

TODO!
Change All Plans (Positioning from CSV move to to D3DDetector_Detector)
TopPositionInenv rename to TranslationInLocalFrame
TranslationInLocalFrame moved to Cell
Uptade fobs to incorporate that.

* WIP

* There were a doubled shift of the phantom. Partialy resolved.

TODO - update cell positioning to work properly...

* iba positioning - done!

* Updated - Positioning for IbaImRT Phantom

* Proper box positioning and plan.
Proper table rotation.
Proper box rotation.

* Static radiotherapy-ready setup for Iba ImRT Just Box.

* Updated - enable proper simplified MLC positioning.

* Proper MLC positioning and orientation.

* renamings

* WIP.

TODO:
Incorporate it to word construction.

* Modular Detector should inherit from IPhysicalVolume and not VPatent
Todo - fix it

* Uptade - Geo creation from 3mf format (saved to db with vertexes in csv) is working almost properly.

Todo:
Deal with the problem in which some walls are “too small” to be considered valid.

fCarTolerance = myMaxExtent * 1e-11 * mm
This depends on the size of the world.
The larger the world, the larger you must have geometric elements in the simulation.

* Phantom Explosion state fixed.

* WIP - for propouse of merging changes.

* fix d3dtray issue

* works for StlDetectorWithPositioningFromCsv

* works for PositioningFromCsv

* WIP ComputeCellsPositioning

* make it working for regular positioning

* remove Layer Pads export

* cleanup

* rm layer context from d3ddetector

* Added tool to change Surface tolerance size.

TODO:

Check in ModularPhantom.cc ModularPhantom::Construct if the triangles are to small or degenerate - if they are - do not create them.

TODO: V2:  During exporting meshes to DB -> simplifie meshes in trimesh.

* Code that works well enough.  I am careful not to overcomplicate things.

Temporaly - fewer errors
when prouking geometry.
During simulation, more chance that a particle will get stuck because the few remaining damaged elements are more damaged.

* WIP - refac.

* temp data added

* GeometryBuilder and GeometryParser have been refactoured.
The directory structure has been revised.

TODO:
A lot of

* Wip - almost there...

* // TODO: Filtrowanie elementów, które chcemy usunąć z IbaImRT
    // TODO: Musi zostać stworzony jakiś modół który pozwoli pobrać ścieżkę do DB i do CSV z z PhantomWorld

Bouth - project them as generic mechanizm and then - implement them in IBA and ModularWP

* TODO:

- Rename Geometry Parser to GeometryDBReader.
- Inside GeometryDBReader -> build list of scintilator cells.
- if path to DB exist -> then then do stuff.
- read materials from DB && translate them to geant materials.
- move and rotate all nev elements inside patient world.
- set minimal patient world size based on GetExtent():
    // Get extents
    G4VisExtent ve = solid->GetExtent();
    G4double xmin = ve.GetXmin(), xmax = ve.GetXmax();
    G4double ymin = ve.GetYmin(), ymax = ve.GetYmax();
    G4double zmin = ve.GetZmin(), zmax = ve.GetZmax();

* WIP

* Cleaning - Bug:

label = D3DDetector_Cell_ON245  position: (58.7,47.95,59.45)
[INFO]:: IPhysicalVolume::Construct: No direct pv to link...
[INFO]:: Link logical D3DDetector_Cell_ON245 with G4PV: phmWorldPV
transformPosition: (58.7,47.95,59.45)...
 no physical volume found.
 no rotation.
 no rotation.

Looking for source of bug and wgy it was working elier...

* Almost done...

* Working code.
Python intrerpreter finalized properly.

* TODO def.

* Unnecessary double finalization of GeometryDBReader

* Working code.

* Add d3df-patients as submodule under submodules/g4rtd3df-patients

* Patient update

* Capping updated

* Submodule update.

* Submodule update

* Modular Water Phantom updated.

* WIP

* Excluding components from Toml -> Done.

* TODO:

 - Update README.md here and in the submodule.
 - Implement rotation of 3mf parts.

* Submodule update

* Jobs for testbeam

* HDF5 old dependencies remopved, Annoying "make" warning about visability removed, UPdated - g4rt_env.yml to working wersion (also with tools to visualize phantom by trimesh).

* Pyglet and fretype update.

* Properly rotated 3mf geometry.

* PDD update

* add some improvements

* fix and patient update

* Cmake uptades - python path issue.

* Last needed changes.
(missing collon, GDML language (on polisk systems))

* 55 refactor volume calc for the analysis (Dose3D-Future#60)

* add volume for vpatient

* add extra cell volume logic

* fix CellInfo ctr issue

* remove ::SIZE usage

* refactor ::SIZE type

* update CMakeLists with extra flags

* Al changes requested by Maja and Aleksandra are done.

* Finalizing rebase.

* Last improvements.

---------

Co-authored-by: Bartek Rachwal <brachwal@agh.edu.pl>
More extensive list of processes to save within NTuple.
Added ability to record electron origin within NTuple.
…s and reactions taking place inside the scintillator.
…izm tej ifologi gotowe -> zostało tylko wprowadzić te ify odpowiednio i wprowadzić zmiany proponowane przez bartka.
Analysis flag redoo.
Proposed changes implemented.

TODO:
- Usage of flags in "Scoring" eg:
  TracksAnalysis = true -> StoreTracks=true
  MinimalMode=true
  Itp.
- Rename func name in VoxelHit.
TODO:
- Rename methods in Voxel Hit.
- Enable/Disable flags on basic of job definition.
TODO's for future defined.

Before merge TODO:
  - Enable/Disable flags on basic of job definition.
In new jobs U need to add flags
StoreTracks= true
StorePositions= true
StoreEnergies = true
StorePrimaries = true
StoreRunInfo= true
MinimalMode= false

In RunSvc to run full NtupleAnalisys
jhajduga and others added 8 commits July 2, 2025 15:26
…ording-the-type-of-physical-event-in-g4

51 the process of recording the type of physical event in g4
…to matrix format with CSV, pickle, and PNG output options.
* The old LogService has been removed.
The logg macros have temporarily been replaced by the std::cout << "Temp" << "\n" expression;

Todo:
- Introduce new logService.
- Introduce G4cout and G4err message capture
- Introduce callback triggers.

* Working Logger.

* Probably ready to merge.

For the future - update readme (slightly).
And add logs whereever U want.

* Setting the log level from the CLI -> Done

* TODO List Uptaded

* TODO english

* Update TODO.md

* TODO extended

* Fix D3DDetector config parsing and update RunSvc geometry initialization order

* Refactor main function: reorganize logger initialization
In order to capture G4cout and G4err before the kernel launch G4UImanager i need to initialize logSession.
(Otherwise, G4cout is only captured from the start of the simulation)

* SRUNET -> Działa.
TEASTBEAM -> Działa.

95% zmian proponowanych w review - wprowadzono.

* Działa na Testbeam, na SRUNET i na WaterPhantom. Wszystkie (poza submodułem) proponowane zmiany zostały wprowadzone.

* Job Update
@coderabbitai

coderabbitai Bot commented Jul 22, 2025

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jhajduga
jhajduga merged commit d6c408e into Doccumentation-Update-for-Propouse-of-PhD Jul 22, 2025
1 of 2 checks passed
jhajduga added a commit that referenced this pull request Jul 22, 2025
…se-of-PhD

Merge pull request #12 from jhajduga/develop
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.

2 participants