Message: Re: gps sphere source Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: gps sphere source  

Forum: Space Applications
Re: Question gps sphere source (Daniel Braun)
Date: 10 Oct, 2008
From: Giovanni Santin <Giovanni Santin>

Hello Daniel,

> I need to use a sphere as a particle source with the gps class.
> 
> and I want the particles to shoot just in the inside of the sphere

GPS is indeed a good choice, it will make your life easy.
For generating particles on the surface of a sphere, you can insert this in your macro:

/gps/pos/type Surface
/gps/pos/shape Sphere
/gps/pos/radius 2.0 m
/gps/pos/centre 0. 0. 0. cm

> They also should be distributed even on the surface of the sphere.

The vertices will be automatically uniformly distributed on the surface.

For the angular distribution:
During the run, for each point, randomly generated on the surface, GPS orients +z of the "generation frame" as normal to the surface, directed towards inside.

Normally, then, for generating particles inside the sphere to reproduce an isotropic angular distribution, one has to specify a "cosine law" biasing, and let the theta go from 0 to 90 degrees:

/gps/ang/type cos
/gps/ang/mintheta 0 deg
/gps/ang/maxtheta 90 deg

I am not sure what you mean with 

> maximally tangential to the sphere. 

If you really want the particles to only start parallel to the surface, you can just modify the mintheta to 90 degrees:

/gps/ang/mintheta 90 deg
/gps/ang/maxtheta 90 deg

If instead you mean only normal to the surface (i.e. directed to the centre of the generation sphere) you set maxtheta to 0 degrees.

/gps/ang/mintheta 0 deg
/gps/ang/maxtheta 0 deg

I hope this helps
Kind regards,
Giovanni

ESA / ESTEC
Space Environments and Effects
e-mail: Giovanni.Santin@esa.int

 Add Message Add Message
to: "Re: gps sphere source "

 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 ]