Public API
Documentation for Geant4.jl
public interface.
Index - Types
Geant4.G4JLApplication
Geant4.G4JLDetectorGDML
Geant4.G4JLMagneticField
Geant4.G4JLMagneticField
Geant4.G4JLPrimaryGenerator
Geant4.G4JLScoringMesh
Geant4.G4JLSensitiveDetector
Index - Functions
Geant4.GetVolume
Geant4.GetWorldVolume
Geant4.beamOn
Geant4.configure
Geant4.getSDdata
Geant4.getSIMdata
Geant4.getfield
Geant4.initialize
Geant4.move!
Geant4.reinitialize
Types
Geant4.G4JLApplication
— MethodG4JLApplication(<keyword arguments>)
Initialize a G4JLApplication with its associated tyopes and methods.
Arguments
detector::G4JLDetector
: detector description objectsimdata=G4JLNoData()
: simulation data objectgenerator=G4JLParticleGun()
: primary particle generatorfield=nothing
: magnetic fieldevtdisplay=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 typebuilder_type=G4JLDetectorConstruction
: detector builder type (the default should be fine most cases)physics_type=FTFP_BERT
: physics list typestepaction_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 pairslv::String => sd::G4JLSensitiveDetector
to associate logical volumes to sensitive detectorscorers::Vector{}=[]
: vector ofG4JLScoringMesh
s
Geant4.G4JLDetectorGDML
— MethodG4JLDetectorGDML(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.
Geant4.G4JLMagneticField
— TypeCustom Magnetic Field
Geant4.G4JLMagneticField
— MethodG4JLMagneticField(name::String, data::DATA; <keyword arguments>) where DATA<:G4JLGeneratorData
Create a G4JLMagneticField with its name and associated DATA structure
Arguments
Geant4.G4JLPrimaryGenerator
— MethodG4JLPrimaryGenerator(name::String, data::DATA; <keyword arguments>) where DATA<:G4JLGeneratorData
Creatre a G4JLPrimaryGenerator with its name and associated DATA structure
Arguments
Geant4.G4JLScoringMesh
— MethodG4JLScoringMesh(name, mesh; <keyword arguments>)
Create a scoring mesh to be added to the Geant4 application.
Arguments
name::String
: scoring mech namemesh::AbstractMesh
: mesh instance. Either aBoxMesh
orCylinderMesh
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
)
Geant4.G4JLSensitiveDetector
— MethodG4JLSensitiveDetector(name::String, data::DATA; <keyword arguments>) where DATA<:G4JLSDData
Initialize a G4JLSensitiveDetector with its name and associated DATA structure.
Arguments
name::String
: Sensitive detector namedata::DATA
: Data structure associted to the sensitive detectorprocesshits_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
Functions
Geant4.GetVolume
— MethodGetVolume(name::String)
Get the the G4LogicalVolume with this name.
Geant4.GetWorldVolume
— MethodGetWorldVolume()
Get the world volume of the currently instantiated detector geometry.
Geant4.beamOn
— MethodbeamOn(app::G4JLApplication, nevents::Int)
Start a new run with nevents
events.
Geant4.configure
— Methodconfigure(app::G4JLApplication)
Configure the Geant4 application. It sets the declared user actions, event generator, and physcis list.
Geant4.getSDdata
— MethodgetSDdata(app::G4JLApplication, name::String)
Get the data associated to the Sentitive Detector with a given name taking into account the current worker thread ID
Geant4.getSIMdata
— MethodgetSIMdata(app::G4JLApplication)
Get the Simulation Data taking into account the current worker thread ID
Geant4.getfield
— Methodgetfield(pos::G4ThreeVector, bfield::G4JLMagneticField)
Function to exercise a custom magnetic field
Geant4.initialize
— Methodinitialize(app::G4JLApplication)
Initialize the Geant4 application. It initializes the RunManager, which constructs the detector geometry, and sets the declared sensitive detectors.
Geant4.move!
— Methodmove!(o)
Move ownerhip of C++ object to receiver. The object cannot not be used anymore after this call.
Geant4.reinitialize
— Methodreinitialize(app::G4JLApplication, det::G4JLDetector)
Re-initialize the Geant4 application with a new detector defintion.