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

Fix ORANGE docs and ccache-clearing cron job #1284

Merged
merged 4 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
14 changes: 11 additions & 3 deletions .github/workflows/clear-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,19 @@ jobs:
with:
script: |
console.log("Getting action cache")
const caches = await github.rest.actions.getActionsCacheList({
const parameters = {
owner: context.repo.owner,
repo: context.repo.repo,
})
for (const cache of caches.data.actions_caches) {
per_page: 100,
direction: "asc",
sort: "created_at",
}
const caches = await github.paginate(
github.rest.actions.getActionsCacheList,
parameters,
(response) => response.data,
)
for (const cache of caches) {
if (cache.key.startsWith("ccache-")) {
console.log("Deleting cache entry", cache)
github.rest.actions.deleteActionsCacheById({
Expand Down
51 changes: 29 additions & 22 deletions doc/main/api/orange.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Runtime interfaces
Geometry creation
-----------------

ORANGE geometry can (TODO: not yet, but eventually) be constructed from
multiple geometry representations, including Geant4 HEP geometry.
ORANGE geometry can be constructed from multiple geometry representations,
including Geant4 HEP geometry.

CSG unit
^^^^^^^^
Expand All @@ -36,17 +36,18 @@ implementations and relationships, and specifying which of them are volumes.
The Object interface is implemented by:

Shape
A convex, finite region of space defined by the intersection of multiple
quadric surfaces. The Shape is implemented using a single ConvexRegion,
A finite (and usually convex) region of space defined by the intersection of
multiple quadric surfaces. The Shape is implemented using a single
IntersectRegion,
which is an implementation that builds the underlying surfaces and bounding
boxes. Shapes should be as simple as possible, aligned along and centered on
the Z axis.
Solid
A shape that's hollowed out and/or has a slice removed. It is equivalent to
a CSG operation on two shapes of the same type and an azimuthal wedge.
ExtrudedSolid
NOT YET IMPLEMENTED: a union of transformed solids along the Z axis, which
can also be hollowed and sliced.
PolySolid
A union of transformed solids along the Z axis, which can also be hollowed
and sliced azimuthally.
Transformed
Applies a transform to another CSG object.
AnyObjects, AllObjects, and NegatedObject
Expand All @@ -60,6 +61,8 @@ be reused in multiple locations.

.. doxygenclass:: celeritas::orangeinp::Solid

.. doxygenclass:: celeritas::orangeinp::PolyCone

.. doxygenclass:: celeritas::orangeinp::Transformed

.. doxygenclass:: celeritas::orangeinp::NegatedObject
Expand Down Expand Up @@ -90,22 +93,22 @@ be reused in multiple locations.
Transformed *-- Object

class ShapeBase {
#ConvexRegion const& interior()*
#IntersectRegion const& interior()*
}
<<Abstract>> ShapeBase

class Shape {
-string label;
-ConvexRegion region;
-IntersectRegion region;
}
Shape *-- ConvexRegion
Shape *-- IntersectRegion

class ConvexRegion {
+void build(ConvexSurfaceBuilder&)*
class IntersectRegion {
+void build(IntersectSurfaceBuilder&)*
}
<<Interface>> ConvexRegion
ConvexRegion <|-- Box
ConvexRegion <|-- Sphere
<<Interface>> IntersectRegion
IntersectRegion <|-- Box
IntersectRegion <|-- Sphere

class Box {
-Real3 halfwidths
Expand Down Expand Up @@ -144,7 +147,7 @@ Geant4 geometry translation
^^^^^^^^^^^^^^^^^^^^^^^^^^^

The Geant4 geometry is a hierarchy of "logical volumes" comprised of solids.
Deeper ("daughter") volumes are "placed" into a parent ("mother") volume after
Child ("daughter") volumes are "placed" into a parent ("mother") volume after
applying a transformation (translation, rotation, reflection, or a
combination), displacing the material in the parent volume. Besides this
displacement, no overlap is allowed.
Expand All @@ -155,12 +158,16 @@ always convex. See the `Geant4 documentation`_ for descriptions of all the
predefined solids.

A logical volume can be referenced multiple times, i.e., placed multiple times in
multiple different volumes. The Geant4-ORANGE converter decomposes (TODO: not
yet implemented) the graph of logical volume relationships into subgraphs that
each become a CSG unit. The decomposition should minimize the number of
subgraphs while minimizing (eliminating even?) the number of interior nodes
with multiple incoming edges, i.e., the number of solids that have to be
duplicated *within* a unit.
multiple different volumes. The Geant4-ORANGE converter decomposes the graph of
logical volume relationships into subgraphs that
each become a CSG unit. This decomposition is currently tuned so that:

- Volumes with no children are directly placed as "material" leaf nodes into a
unit
- Logical volumes placed in a singular location without transforms are also
placed as materials with child volumes explicitly subtracted out
- Union or poly volumes (for now!) must be placed as materials even if they are
used multiple times and have daughter volumes.

.. _Geant4 documentation: https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/index.html

106 changes: 0 additions & 106 deletions scripts/user/gdml-to-dot.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/celeritas/io/ImportParameters.hh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct ImportEmParameters
double msc_safety_factor{0.6};
//! MSC lambda limit [length]
double msc_lambda_limit{1 * units::millimeter};
//! Polar angle limii between single and multiple Coulomb scattering
//! Polar angle limit between single and multiple Coulomb scattering
double msc_theta_limit{constants::pi};
//! Kill secondaries below production cut
bool apply_cuts{false};
Expand Down
Loading