|
Celeritas 0.7-develop+980877a
|
Access and modify step data from Geant4 with Celeritas units. More...
#include <GeantStepView.hh>
Public Types | |
Type aliases | |
| using | real_type = double |
| using | Energy = units::ClhepEnergy |
| using | Length = lengthunits::ClhepLength |
Public Member Functions | |
| GeantStepView (G4Step &step) | |
Accessors | |
| Energy | energy_deposition () const |
| Get total energy deposited during step in MeV. | |
| Length | step_length () const |
| Get step length in CLHEP length units (mm). | |
| GeantStepPointView | pre_step () const |
| Get pre-step point. | |
| GeantStepPointView | post_step () const |
| Get post-step point. | |
| bool | has_step_point (StepPoint sp) const |
| Whether the step point is valid (not null). | |
| GeantStepPointView | step_point (StepPoint sp) const |
| Get step point by enum. | |
Mutators | |
| void | energy_deposition (Energy edep) |
| Set total energy deposited during step in MeV. | |
| void | step_length (Length length) |
| Set step length in native Celeritas length units. | |
| void | update_track () |
| Update track from step data. | |
| void | delete_step_point (StepPoint sp) |
| Delete a step point. | |
Access and modify step data from Geant4 with Celeritas units.
This provides a uniform, lossless interface to G4Step data using Celeritas type and unit helper classes.
Since Geant4 uses exclusively double precision with the CLHEP, the quantities in this class differ from the regular Celeritas quantities (unless using CELERITAS_REAL_TYPE=double with CELERITAS_UNITS=CLHEP). To convert the result to Celeritas native quantities and floating point types consistently and easily, use native_value_from .
Delete a step point.
This sets the step point to null if supported by the Geant4 version, otherwise does nothing (no reset available before v11.0.3).
| void celeritas::GeantStepView::update_track | ( | ) |
Update track from step data.
Copies step length and step point data to the track. This is similar to G4Step::UpdateTrack but applies only to attributes we know about and safely handles null pointers.