Message: Getting GPS parameters programatically Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Getting GPS parameters programatically 

Forum: Documentation and Examples
Date: 17 Nov, 2017
From: Tim Fulcher <Tim Fulcher>

Hi all

in the B1 example Gabriele Cosmo gives a hint that the gun/gps parameters can be accessed programmatically like so:

const G4GeneralParticleSource* particleGun = generatorAction->GetParticleGun();
		runCondition += particleGun->GetParticleDefinition()->GetParticleName();
		runCondition += " of ";
		G4double particleEnergy = particleGun->GetParticleEnergy();
		runCondition += G4BestUnit(particleEnergy, "Energy");

(OK I swapped Gun for GPS in my code)

But I want to get hold of parameters such as radius and sigma_r (/gps/pos/radius 0. mm and /gps/pos/sigma_r 15. mm) from the code too. I've tried all sorts of permutations and Googled the class structure to death but can't find out how to get them.

Any clues?

 Add Message Add Message
to: "Getting GPS parameters programatically"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]