[Gate-users] reading source from a file

ayanas at mail.med.upenn.edu ayanas at mail.med.upenn.edu
Wed Aug 22 15:30:05 CEST 2007


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.

-- 
Ahmet Sedat Ayan, Ph.D

Department of Radiology
University of Pennsylvania
Philadelphia, PA 19104

Voice      : (++ 1 215) 349-5751 (W) (GMT-5)




More information about the Gate-users mailing list