Message: Arbitrary Position Distribution With G4GeneralParticleSource Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Arbitrary Position Distribution With G4GeneralParticleSource 

Forum: Event and Track Management
Date: 21 Apr, 2015
From: <herr_apa>

Hi,

I have a particle source that I'd like to implement using the G4GeneralParticleSource class. I have managed to get the energy and angular distributions right. The problem is the particle position. The source is shaped like a disc, but the emission probability is not uniform across that disc (see attached). Is there any way to bias the position accordingly? Looking at the code, the position is generated by drawing two random numbers (x and y) and then making sure that the corresponding position is within the radius of the disc. The x and y values can be biased separately, but this is not enough to construct an arbitrary 2D pattern.

If I were to employ a G4ParticleGun instead, I could get the desired behavior by using my 2D distribution to generate the position at random in the GeneratePrimaries function. This does not seem to work for G4GeneralParticleSource. Unless I use one of the predefined shapes, it defaults to emitting particles from the origin.

Is there any way to make G4GeneralParticleSource generate positions from an arbitrary 2D distribution?

// Anders

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2015/04/21/07.48-99458-intensityProfile.png

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Arbitrary Position Distribution With G4GeneralParticleSource   (Andrew Green - 22 Apr, 2015)
1 None: Re: Arbitrary Position Distribution With G4GeneralParticleSource   (herr_apa - 23 Apr, 2015)
2 None: Re: Arbitrary Position Distribution With G4GeneralParticleSource   (Marc Verderi - 23 Apr, 2015)
1 None: Re: Arbitrary Position Distribution With G4GeneralParticleSource   (herr_apa - 23 Apr, 2015)
1 None: Re: Arbitrary Position Distribution With G4GeneralParticleSource   (Marc Verderi - 23 Apr, 2015)
2 None: Re: Arbitrary Position Distribution With G4GeneralParticleSource   (michel maire - 23 Apr, 2015)
 Add Message Add Message
to: "Arbitrary Position Distribution With G4GeneralParticleSource"

 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 ]