[Gate-users] reading source from a file
Sebastien JAN
sebastien.jan at cea.fr
Thu Aug 23 14:38:02 CEST 2007
Hi Ahmet,
You need to develop your specific method in GateGeneralParticleSource
and GateGeneralParticleSourceMessenger (if you want to develop a
messenger interface).
The method GateGeneralParticleSource::GeneratePointsInBeam() could be
used as an example.
Finally, your method will return the "particle_position" variable which
will called by
GateGeneralParticleSource::CreatePrimaryParticles(G4PrimaryVertex* vertex).
Hope this help
Cheers
Sebastien
>Hello All,
>I have the following problem:
>I would like to read the position, energy and the direction of a
>primary particle from a file and use this to set my "PrimaryVertex".
>In geant4, this could be done in "PrimaryGeneratorAction" as
>
>particleGun->SetParticleDefinition(particle);
>particleGun->SetParticleEnergy(energy);
>particleGun->SetParticleMomentumDirection(G4ThreeVector(x,y,z));
>particleGun->SetParticlePosition(rdnm_position);
>particleGun->GeneratePrimaryVertex(anEvent);
>
>Is there a way to do such a thing in Gate?
>I would appreciate ant suggestions/comments.
>Thank you very much,
>Ahmet.
>
>
>
More information about the Gate-users
mailing list