Public API

Documentation for Geant4.jl public interface.

Index - Types

Index - Functions

Types

Geant4.G4JLApplicationMethod
G4JLApplication(<keyword arguments>)

Initialize a G4JLApplication with its associated tyopes and methods.

Arguments

  • detector::G4JLDetector: detector description object
  • simdata=G4JLNoData(): simulation data object
  • generator=G4JLParticleGun(): primary particle generator
  • field=nothing: magnetic field
  • evtdisplay=nothing: event display (visualization)
  • nthreads=0: number of Geant4 worker threads ( >0 implies MT)
  • verbose=0 : default verbority level (physics, ...)
  • runmanager_type=G4RunManager: run manager type
  • builder_type=G4JLDetectorConstruction: detector builder type (the default should be fine most cases)
  • physics_type=FTFP_BERT: physics list type
  • stepaction_type=G4JLSteppingAction: stepping action type (the default should be fine most cases)
  • trackaction_type=G4JLTrackingAction: rtacking action type (the default should be fine most cases)
  • runaction_type=G4JLRunAction: run action type (the default should be fine most cases)
  • eventaction_type=G4JLEventAction: event action type (the default should be fine most cases)
  • stepaction_method=nothing: stepping action method with signature (::G4Step, ::G4JLApplication)::Nothing
  • pretrackaction_method=nothing: pre-tracking action method with signature (::G4Track, ::G4JLApplication)::Nothing
  • posttrackaction_method=nothing: post-tracking action method with signature (::G4Track, ::G4JLApplication)::Nothing
  • beginrunaction_method=nothing: begin run action method with signature (::G4Run, ::G4JLApplication)::Nothing
  • endrunaction_method=nothing: end run action method with signature (::G4Run, ::G4JLApplication)::Nothing
  • begineventaction_method=nothing: begin event action method with signature (::G4Event, ::G4JLApplication)::Nothing
  • endeventaction_method=nothing: end event action method with signature (::G4Event, ::G4JLApplication)::Nothing
  • stackaction_method=nothing: stacking classification of new track with signature (::G4Track, ::G4JLApplication)::G4ClassificationOfNewTrack
  • statechange_method=nothing: state change notifycation method with signature (from::G4ApplicationState, to::G4ApplicationState, ::G4JLApplication)::Bool
  • sdetectors::Vector{}=[]: vector of pairs lv::String => sd::G4JLSensitiveDetector to associate logical volumes to sensitive detector
  • scorers::Vector{}=[]: vector of G4JLScoringMeshs
source
Geant4.G4JLDetectorGDMLMethod
G4JLDetectorGDML(gdmlfile::String; check_overlap::Bool, validate_schema::Bool, init_method::Union{Function,Nothing})

Initialize a G4JLDetector from a GDML file. The GDML file is parsed at this moment.

source
Geant4.G4JLMagneticFieldMethod
G4JLMagneticField(name::String, data::DATA; <keyword arguments>) where DATA<:G4JLGeneratorData

Create a G4JLMagneticField with its name and associated DATA structure

Arguments

source
Geant4.G4JLPrimaryGeneratorMethod
G4JLPrimaryGenerator(name::String, data::DATA; <keyword arguments>) where DATA<:G4JLGeneratorData

Creatre a G4JLPrimaryGenerator with its name and associated DATA structure

Arguments

source
Geant4.G4JLScoringMeshMethod
G4JLScoringMesh(name, mesh; <keyword arguments>)

Create a scoring mesh to be added to the Geant4 application.

Arguments

  • name::String: scoring mech name
  • mesh::AbstractMesh: mesh instance. Either a BoxMesh or CylinderMesh
  • bins::Tuple: tuple with number on bins in x, y, z (default 30, 30, 30)
  • translation::Tuple: position (x,y,z) with respect the mesh respect to the world volume. Default is (0,0,0).
  • rotation::Tuple: rotation of the mesh with respect the world volume. Default (0,0,0)
  • quantities::Vector: vector of quanties to be scored (e.g. energyDeposit, doseDeposit, nOfStep)
source
Geant4.G4JLSensitiveDetectorMethod
G4JLSensitiveDetector(name::String, data::DATA; <keyword arguments>) where DATA<:G4JLSDData

Initialize a G4JLSensitiveDetector with its name and associated DATA structure.

Arguments

  • name::String: Sensitive detector name
  • data::DATA: Data structure associted to the sensitive detector
  • processhits_method=nothing: processHit function with signature: (data::DATA, step::G4Step, ::G4TouchableHistory)::Bool
  • initialize_method=nothing: intialize function with signature: (data::DATA, ::G4HCofThisEvent)::Nothing
  • endofevent_method=nothing: endOfEvent function with signature: (data::DATA, ::G4HCofThisEvent)::Nothing
source

Functions

Geant4.beamOnMethod
beamOn(app::G4JLApplication, nevents::Int)

Start a new run with nevents events.

source
Geant4.configureMethod
configure(app::G4JLApplication)

Configure the Geant4 application. It sets the declared user actions, event generator, and physcis list.

source
Geant4.getSDdataMethod
getSDdata(app::G4JLApplication, name::String)

Get the data associated to the Sentitive Detector with a given name taking into account the current worker thread ID

source
Geant4.getSIMdataMethod
getSIMdata(app::G4JLApplication)

Get the Simulation Data taking into account the current worker thread ID

source
Geant4.getfieldMethod
getfield(pos::G4ThreeVector, bfield::G4JLMagneticField)

Function to exercise a custom magnetic field

source
Geant4.initializeMethod
initialize(app::G4JLApplication)

Initialize the Geant4 application. It initializes the RunManager, which constructs the detector geometry, and sets the declared sensitive detectors.

source
Geant4.move!Method
move!(o)

Move ownerhip of C++ object to receiver. The object cannot not be used anymore after this call.

source
Geant4.reinitializeMethod
reinitialize(app::G4JLApplication, det::G4JLDetector)

Re-initialize the Geant4 application with a new detector defintion.

source