Skip to content

Commit

Permalink
Adapt precision type of G4JLApplication to Simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
fhagemann committed Nov 20, 2024
1 parent 6347354 commit 9c53c69
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ext/SolidStateDetectorsGeant4Ext.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,10 @@ function Geant4.G4JLApplication(
kwargs...
)

T = sim isa SolidStateDetectors.Simulation ? SolidStateDetectors.get_precision_type(sim) : Float32

SensitiveDetector = G4JLSensitiveDetector(
"SensitiveDetector", SDData{Float32}(); # SD name and associated data are mandatory
"SensitiveDetector", SDData{T}(); # SD name and associated data are mandatory
processhits_method=_processHits, # process hist method (also mandatory)
initialize_method=_initialize, # intialize method
endofevent_method=_endOfEvent # end of event method
Expand Down

0 comments on commit 9c53c69

Please sign in to comment.