Celeritas 0.7+4eea2c0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::GeantStepPointView Class Reference

Access and modify step point data from Geant4 with Celeritas units. More...

#include <GeantStepPointView.hh>

Public Types

Type aliases
using Energy = units::ClhepEnergy
 
using Length = lengthunits::ClhepLength
 
using Time = units::ClhepTime
 
using real_type = double
 

Public Member Functions

 GeantStepPointView (G4StepPoint &step_point)
 
G4StepPointstep_point ()
 Access underlying G4 object.
 
Accessors
Array< Length, 3 > pos () const
 Get position in native Celeritas length units.
 
Array< double, 3 > dir () const
 Get momentum direction.
 
Energy energy () const
 Get kinetic energy in MeV.
 
Time time () const
 Get global time in native Celeritas time units.
 
real_type weight () const
 Statistical weight.
 
Mutators
void pos (Array< Length, 3 > const &position)
 Set position in native Celeritas length units.
 
void dir (Array< double, 3 > const &direction)
 Set momentum direction.
 
void energy (Energy kinetic_energy)
 Set kinetic energy in MeV.
 
void time (Time global_time)
 Set global time in native Celeritas time units.
 
void weight (real_type w)
 Set position in native Celeritas length units.
 
void update_from_volume (G4LogicalVolume const &lv)
 Update attributes from logical volume.
 
void update_from_volume ()
 Update attributes from the touchable's logical volume if possible.
 
void update_from_particle (GeantParticleView const &particle)
 Update mass and charge from particle definition.
 
void clear_unsupported ()
 Clear unsupported attributes to invalid sentinel values.
 

Detailed Description

Access and modify step point data from Geant4 with Celeritas units.

This provides a uniform interface to G4StepPoint data using Celeritas types and units. Geant4 data are all in double precision.

Member Function Documentation

◆ clear_unsupported()

void celeritas::GeantStepPointView::clear_unsupported ( )

Clear unsupported attributes to invalid sentinel values.

This sets attributes that Celeritas does not currently track to sentinel values to indicate they are unavailable to sensitive detectors.

◆ update_from_volume()

void celeritas::GeantStepPointView::update_from_volume ( )

Update attributes from the touchable's logical volume if possible.

If the step point has an associated touchable, and that touchable is inside the geometry, it updates. Otherwise, it clears the corresponding attributes.


The documentation for this class was generated from the following files: