[gate-users] Re: How to input a history file

Giovanni Santin giovanni.santin at cern.ch
Tue Aug 9 12:49:12 CEST 2005


Dear all

if you need to develop a Primary Generator in GATE alternative to GPS for 
this, you can have a quick look at some already existing examples in 
Geant4 in which ASCII files are used to define the events. N04 is one of 
these, but it seems the HEPInterface they use does not define the vertex 
position.

There are other interesting classes in G4 such as G4HepMCInterface, and 
probably a question on this to other G4 collaborators + G4 users on the 
HyperNews would be the best option, as external event generation is a 
common issue in HEP physics.

Otherwise a possible direct contact person in Geant4 on how to use these 
classes could be Gunter Folger (Gunter.Folger at cern.ch).

Best regards,
-- 
Giovanni
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Giovanni Santin
Space Environments and Effects Analysis
ESA - ESTEC - TEC-EES
Keplerlaan 1, 2200 AG Noordwijk, Netherlands
e-mail: giovanni.santin at esa.int
Tel: +31 71 565 6267
Fax: +31 71 565 4999


On Tue, 2 Aug 2005, Chen, Yu wrote:

> Hi,
> 
> Thank Mikhail, David, Ross for bringing up this brilliant idea.
> 
> We have also considered how to implement such method into GATE. 
> 
> As mentioned by David, it is relevantly simple to generate a particle
> in Geant4 (or GATE). The GeneratePrimaryVertex only needs to know 
> three kinds of information: particle name, position, momentum.
> 
> If we have an input source file like:
> 
> Particle  PosX PosY PosZ px py pz
> ---------------------------------
> gamma      x    x     x   x  x  x
> 
> we can read it in and use GeneratePrimaryVertex or even use GPS 
> which GATE already implemented:
> 
> .../gps/particle gamma
> .../gps/position Posx PosY PosZ
> .../gps/direction px py pz
> .../gps/energy sqrt(px*px+py*py+pz*pz)
> 
> 
> But, how can we get such gamma distribution file from GATE, say, in the boundary 
> of defined phantom?
> 
> Looking at the GATE User's Guide, it seems that we can have three types of output:
> hits, singles, coincidences. Obviously none of them satisfies our input gamma distribution
> requirements since hits are steps in materials (same particle can have many hits) and single
> is simply the collection of hits.  
> 
> Mikhail, have you gotten any "history file" from GATE? and what does it look like?
> 
> In summary, to accomplish the new function in GATE
> 
> GATE gamma distribution output in phantom boundary --> input to GATE (random1)
>                                                    --> input to GATE (random2) 
>                                                    -->   ...
> 
> I think we need to:
> 
> 1) define an output/input format;
> 2) implement a method to output gamma distribution in phantom boundary;
> 3) implement a method to input such a file to generate, like what Mikhail wanted. 
> 
> What do I miss?
> 
> Best, Yu
> 
> 
> Yu Chen, Ph.D.
> University of Massachusetts Medical School
> Division of Nuclear Medicine
> 55 Lake Avenue North
> Worcester, MA 01655-0243
> Phone:  (508) 856-6123
> Fax:    (508) 856-4572
> 
> 
> 
> -----Original Message-----
> From: David Guez [mailto:dguez at cea.fr]
> Sent: Tue 8/2/2005 4:21 AM
> To: GATE feedback and helpline for Users
> Subject: Re: [gate-users] Re: How to input a history file
>  
> GUEZ David wrote:
> 
> > Hi,
> > the class GateGeneralParticleSource, and more precisely, its 
> > GeneratePrimaryVertex method is the concrete descendent of the
> > G4VPrimaryGenerator GEANT4 class which is the class to derive to the 
> > particle generation. It may be the point where to implement a parser 
> > from external generator and Geant4. I think that one should implement 
> > a new GateExternalXXXGenerator which derive from G4VPrimaryGenerator 
> > and which shoould be implemented, following the user request, instead 
> > of the GateGeneralParticleSource.
> >
> > I hope this will helps,
> >
> >    David
> >
> >
> 
> oups, I read again the Ross' message and realize that I misunderstood 
> your comment. I think we agree that an external generator have to 
> produce hits which will be import to the G4 particle gun (according to 
> what you said). I never worked with the GateGeneralParticleSource class, 
> do you think that it's the good place to commit the changes ?
> 
> By
> 
> 


More information about the Gate-users mailing list