Celeritas  0.5.0-56+6b053cd
Todo List
Class celeritas::ActionSequence
Refactor action times as "aux data" and as an end-gather action so that this class can merge across states. Currently there's one sequence per stepper which isn't right.
Class celeritas::BeginRunActionInterface< P, S >
This is currently called once per each state on each CPU thread, and it would be more sensible to call a single with all cooperative states.
Member celeritas::BetheBlochEnergyDistribution::operator() (Engine &rng) -> Energy

Adjust rejection functions if particle has positive spin

For hadrons, suppress high energy delta ray production with the projectile form factor

Class celeritas::BIHTreeData< W, M >
move to orange/BihTreeData
Member celeritas::boost (Real3 const &v, FourVector *p)
: define a boost function that takes a second FourVector for reduced register usage
Member celeritas::BraggICRU73QOEnergyDistribution::BraggICRU73QOEnergyDistribution (ParticleTrackView const &particle, Energy electron_cutoff, Mass electron_mass)
Use proton mass from imported data instead of a constant
Member celeritas::calc_mean_energy_loss (ParticleTrackView const &particle, PhysicsTrackView const &physics, real_type step)
The geant3 manual makes the point that linear interpolation of energy loss rate results in a piecewise constant energy deposition curve, which is why they use spline interpolation. Investigate higher-order reconstruction of energy loss curve, e.g. through spline-based interpolation or log-log interpolation.
Member celeritas::calc_physics_step_limit (MaterialTrackView const &material, ParticleTrackView const &particle, PhysicsTrackView &physics, PhysicsStepView &pstep)
For particles with decay, macro XS calculation will incorporate decay probability, dividing decay constant by speed to become 1/len to compete with interactions.
Member celeritas::ChipsNeutronElasticInteractor::operator() (Engine &rng)
Create a secondary ion(Z, N) if recoil_energy > recoil_threshold with energy = recoil_energy and direction = lv.mom - nlv1.mom
Class celeritas::CombinedBremInteractor
: see if there's any occupancy/performance difference by defining the samplers inside the conditional on "is_relativistic".
Class celeritas::CoreState< M >
Encapsulate all the action management accessors in a helper class.
Class celeritas::CoreStateCounters
Drop the 'num' prefix since we know they're counters.
Class celeritas::CoreTrackView
Rename make_sim_view -> sim, etc.
Member celeritas::CoulombScatteringInteractor::CoulombScatteringInteractor (CoulombScatteringData const &shared, NativeCRef< WentzelOKVIData > const &wentzel, ParticleTrackView const &particle, Real3 const &inc_direction, MaterialView const &material, IsotopeView const &target, ElementId el_id, CutoffView const &cutoffs)
Use the proton production cutoff when the recoiled nucleus production is supported.
Member celeritas::CoulombScatteringInteractor::operator() (Engine &rng)
For high enough recoil energies, ions are produced
Class celeritas::DormandPrinceStepper< EquationT >
Rename DormandPrinceIntegrator
Class celeritas::ElementSelector
Refactor to use Selector.
Class celeritas::EnumArray< E, T >
The template parameters are reversed!!!
Class celeritas::EventReader
Define ImportPrimary with double precision.
Class celeritas::ExpNuclearFormFactor
Instead of using this coarse parameterization, we should add nuclear radius to the isotope properties for a more accurate treatment, and construct these classes directly from the atomic radius.
Class celeritas::ExtendFromPrimariesAction
Change "generate" step order to be at the end of the loop alongside create secondaries, and execute the action immediately after adding primaries.
Member celeritas::from_json (nlohmann::json const &j, RZMapFieldInput &inp)
Remove in 1.0
Class celeritas::GeoParamsSurfaceInterface
Remove this interface, use empty surface map instead
Member celeritas::GridIdFinder< KeyQuantity, ValueId >::GridIdFinder (SpanConstGrid, SpanConstValue)
Construct from reference to collections and ranges so we can benefit from __ldg as needed
Class celeritas::ImageLineView
Add template parameter to switch from vertical to horizontal direction.
Class celeritas::ImportIsotope
Rename ImportNuclide
Member celeritas::ImportModelClass
reorganize by physics list (major) and particle (minor) so that newly supported models are appended cleanly to the end of the list.
Class celeritas::ImportOpticalMaterial
boolean for enabling cerenkov in the material??
Class celeritas::ImportProcess
remove secondary_pdg , rename particle_pdg to just pdg, also in ImportMscModel
Member celeritas::ImportUnits
Rename to ImportUnit
Class celeritas::IsotopeRecord
Rename NuclideRecord?
Class celeritas::IsotopeView
This will be renamed to NuclideView.
Member celeritas::KernelRegistry::kernel (KernelId id) const
rename to get
Member celeritas::KernelRegistry::num_kernels () const
rename to size
Class celeritas::LocalTransporter
Rename LocalOffload or something?
Member celeritas::LocalTransporter::Flush ()
The signal handler is not thread safe. We may need to set an atomic/volatile bit so all local transporters abort.
Member celeritas::LocalTransporter::LocalTransporter (SetupOptions const &options, SharedParams &params)
Add support for Geant4 navigation wrapper, which requires calling state.ref().geometry.reset() on the local transporter thread due to thread-allocated navigator data.
Member celeritas::LocalTransporter::Push (G4Track const &)

Non-unit weights: see issue #1268

Maybe only run one iteration? But then make sure that Flush still transports active tracks to completion.

Eliminate event ID from primary.

Class celeritas::MaterialParams
Replace id_to_label etc. with direct access to LabelIdMultiMap
Member celeritas::MollerBhabhaModel::applicability () const final
Set lower energy bound based on (material-dependent) IonizationProcess lambda table energy grid to avoid invoking the interactor for tracks with energy below the interaction threshold.
Class celeritas::MscStep
Document and/or refactor into a class that hides details
  • alpha == small_step_alpha() ? "true path is very small" (true path scaling changes)
  • is_displaced == false ? limit_min is unchanged and alpha == small_step_alpha()
  • true_step >= geom_path
Member celeritas::MuIonizationProcess::build_models (ActionIdIter start_id) const final
Possibly get model limits from imported data?
Class celeritas::MutableActionInterface
Delete this to allow only stateless actions, since now we have aux data? This will reduce overhead for virtual inheritance classes too.
Member celeritas::no_intersection ()

There is probably a better place to put this since it's not a "type".

A value of zero might also work since zero-length steps are prohibited. But we'll need custom min and min_element in that case.

Member celeritas::operator<< (std::ostream &os, Label const &lab)
account for os.width .
Member celeritas::optical::CerenkovDndxCalculator::operator() (units::LightSpeed beta)
define a "generic grid extents" class for finding the lower/upper x/y coordinates on grid data. In the future we could cache these if the memory lookups result in too much indirection.
Class celeritas::optical::CoreState< M >
Encapsulate all the action management accessors in a helper class.
Member celeritas::optical::CoreTrackView::apply_errored ()
Add a tracking cut action? Currently the track is simply killed.
Member celeritas::optical::CoreTrackView::operator= (TrackInitializer const &)
Add physics view and clear physics state
Class celeritas::optical::LocateVacanciesAction

Create initializers from secondaries here once optical secondaries are produced.

Rename?

Class celeritas::OpticalCollector
Rename to OpticalOffload
Member celeritas::orangeinp::GenPrism::build (IntersectSurfaceBuilder &) const final
Use plane normal equality from SoftSurfaceEqual, or maybe soft equivalence on twist angle cosine?
Member celeritas::orangeinp::InfWedge::build (IntersectSurfaceBuilder &) const final
Restrict bounding boxes, at least eliminating two quadrants...
Member celeritas::orangeinp::PolyCone::build (VolumeBuilder &) const final
After adding short-circuit logic to evaluator, add "acceleration" structures here, e.g. "inside(inner cylinder) || [inside(outer cylinder) && (original union)]"
Member celeritas::orangeinp::PolyPrism::build (VolumeBuilder &) const final
After adding short-circuit logic to evaluator, add "acceleration" structures here, e.g. "inside(inner cylinder) || [inside(outer cylinder) && (original union)]"
Member celeritas::orangeinp::UnitProto::build (ProtoBuilder &) const final

"simple safety" flag is set inside "unit inserter": move here once we stop importing from SCALE via OrangeInput.

The nearest internal surface is probably not the safety distance, but it's better than nothing

Save material IDs as well

Member celeritas::orangeinp::UnitProto::build (Tol const &tol, BBox const &bbox) const
We can sometimes eliminate CSG surfaces and nodes that aren't used by the actual volumes>
Member celeritas::OrangeParams::find_volume (G4LogicalVolume const *volume) const final
Implement using g4org::Converter
Member celeritas::OrangeParams::id_to_pv (VolumeInstanceId vol_id) const final
Implement using g4org::Converter
Member celeritas::OrangeParamsOutput::output (JsonPimpl *) const final
Make universe metadata accessible from ORANGE, and write it
Member celeritas::OrangeTrackView::move_internal (Real3 const &pos)
Currently it's up to the caller to make sure that the position is "nearby". We should actually test this with an "is inside" call.
Member celeritas::OrangeTrackView::volume_instance_id () const
not implemented; VolumeId is already halfway between a "reusable volume" and a "volume instance" anyway...
Class celeritas::OutputInterface
Perhaps another output method for saving a schema?
Member celeritas::ParticleTrackView::beta_sq () const
For nonrelativistic particles (low kinetic energy) this expression may be inaccurate due to rounding error. It is however guaranteed to be in the exact range [0, 1].
Class celeritas::RungeKuttaStepper< EquationT >
Rename RungeKuttaIntegrator
Class celeritas::SBElementTableData
We could use way smaller integers for argmax, even i/j here, because these tables are so small.
Member celeritas::SeltzerBergerModel::applicability () const final
Set lower energy bound based on (material-dependent) BremsstrahlungProcess lambda table energy grid to avoid invoking the interactor for tracks with energy below the interaction threshold.
Class celeritas::SimpleCalo
Add a "begin run" interface to set up the stream store, rather than passing in number of streams at construction time.
Member celeritas::SimpleUnitTracker::initialize (LocalState const &state) const
This prohibition currently also extends to internal surfaces, even if both sides of that surface are "in" the current cell. We may need to relax that.
Member celeritas::SimpleUnitTracker::SimpleUnitTracker (ParamsRef const &params, SimpleUnitId id)
When adding multiple universes, this will calculate range of LocalVolumeIds that belong to this unit. For now we assume all volumes and surfaces belong to us.
Class celeritas::SlotDiagnostic
Instead of writing separate files, we should probably use a multi-stream output manager (not yet implemented) to save the result for the end.
Class celeritas::SortTracksAction
Keep weak pointer to actions? Use aux data?
Class celeritas::SplineXsCalculator
Currently this is hard-coded to use "cross section grid data" which have energy coordinates uniform in log space. This should be expanded to handle multiple parameterizations of the energy grid (e.g., arbitrary spacing needed for the Livermore sampling) and of the value interpolation (e.g. log interpolation). It might also make sense to get rid of the "prime energy" and just use log-log interpolation instead, or do a piecewise change in the interpolation instead of storing the cross section scaled by the energy.
Member celeritas::sqrt_tol ()
Move orange tolerance and related operations into corecel/math alongside this, revisit ArrayUtils soft comparisons.
Class celeritas::StackAllocator< T >
Instead of returning a pointer, return IdRange<T>. Rename StackAllocatorData to StackAllocation and have it look like a collection so that it will provide access to the data. Better yet, have a StackAllocation that can be a const_reference to the StackAllocatorData. Then the rule will be "you can't create a StackAllocator in the same kernel that you directly access a StackAllocation".
Member celeritas::StackAllocator< T >::operator() (size_type count)
It might be useful to set an "out of memory" flag to make it easier for host code to detect whether a failure occurred, rather than looping through primaries and testing for failure.
Class celeritas::StepCollector
The step collector serves two purposes: supporting "sensitive detectors" (mapping volume IDs to detector IDs and ignoring unmapped volumes) and supporting unfiltered output for "MC truth" . Right now only one or the other can be used, not both.
Class celeritas::StepStateData< W, M >
Refactor the step interface stuff so that we passing params alongside state data to the step interfaces, so that we don't have to keep a copy of the volume instance depth (and for better consistency with the rest of the code).
Class celeritas::StringEnumMapper< T >
If the size of the strings is short and there aren't a lot of them, it will be faster to use a fixed-size array and search over them.
Member celeritas::SurfaceClipper::operator() (Plane const &) const
Check for being in an axial plane and leave the orthogonal plane's extents intact.
Class celeritas::SurfaceSimplifier
Use a Tolerance object instead of a single tolerance, and compare implementations with SoftSurfaceEqual for consistency.
Class celeritas::SurfacesRecord
: change "types" and "data offsets" to be ItemMap taking local surface
Class celeritas::test::InteractorHostTestBase
Since this now uses Collection objects it's generally safe to use this to test Models as well as device code – think about renaming it.
Class celeritas::Tolerance< T >
Move this to a separate file.
Class celeritas::TrackExecutor< T >
Rename to ThreadExecutor. The template parameter, which must operate on a core track view, is a track executor.
Member celeritas::TwodGridCalculator::operator() (Point const &xy) const
We may need to add logic inside the axis loop to account for points outside the grid.
Class celeritas::UnitInput
Add a CsgTree object and vector<NodeId> volumes;
Namespace celeritas::units
If we're serious about supporting single-precision arithmetic, we should define a helper class that stores the constant as full precision but when multiplied by a single/double is truncated to that precision. Otherwise, if real_type is single-precision, then we lose accuracy in places like the GeantImporter where everything is double precision.
Member celeritas::VolumeRecord::Flags
For KENO geometry we will need zorder
Member celeritas::XorwowRngParams::host_ref () const final
Construct with a seed of 256 bytes (16-byte hex) or shasum string
Member celeritas::XorwowRngParamsData< W, M >::seed
Use full 256-bit seed to generate initial states for the RNGs For now, just 4 bytes (same as our existing cuda/hip interface)
File ThreadId.hh
Rename to corecel/Id.hh