Message: Re: G4GeneralParticleSource: spherical source radiating inwards?? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: G4GeneralParticleSource: spherical source radiating inwards?? 

Forum: Event and Track Management
Re: None G4GeneralParticleSource: spherical source radiating inwards?? (Constantin Athanassas)
Re: None Re: G4GeneralParticleSource: spherical source radiating inwards?? (Youming Yang)
Re: None Re: G4GeneralParticleSource: spherical source radiating inwards?? (Constantin Athanassas)
Re: None Re: G4GeneralParticleSource: spherical source radiating inwards?? (Constantin Athanassas)
Date: 23 Aug, 2016
From: Constantin Athanassas <Constantin Athanassas>

However, the challenge is to focus the beams onto a single point (i.e. the center of the sphere) AND append a cosine-law based angular distribution as a function of the polar angle. Any suggestions on how to control that using the macro commands?

Alternatively, could someone replace the spherical volume by an ellipsoid? That would mimic the cosine angular distribution of the rays, as the radius from the center of an ellipsoid is a function of the solid angle 'theta'.

Any comments?

Thanks in advance, Constantin.

On Sun, 21 Aug 2016 12:44:08 GMT, Constantin Athanassas wrote:

> I think I found the answer:
> 
> http://hypernews.slac.stanford.edu/HyperNews/geant4/get/particles/494/2.html
> 
> This should be the solution I suppose.
> 
> Constantin
> 
> On Sun, 21 Aug 2016 10:54:07 GMT, Constantin Athanassas wrote:
> 
> > Thanks, Ming. It's working now. However how can I define the theta angle
> > so that the rays come only from the half of the sphere (i.e. 2-pi solid
> > angle)? Would the following macro syntax help?
> > 
> > /gps/ang/mintheta 0 rad /gps/ang/maxtheta 1.57 rad # i.e. pi/2.
> > 
> > Also, when I insert the radius as:
> > 
> > /gps/radius 6 cm
> > 
> > I get the following warning:
> > 
> > "G4GeneralParticleSourceMessenger - Warning: The command is obsolete and
> > will be removed soon. Please try to use the new structured commands!"
> > What does it mean?
> > 
> > Thanks in advance. Best, Constantin
> > 
> > On Sat, 20 Aug 2016 07:26:28 GMT, Youming Yang wrote:
> > 
> > > Hello,
> > > 
> > > Perhaps you may want to try 
> > >   /ang/type focused
> > > rather than
> > >   /ang/type cos
> > > 
> > > you can see what it does in the file 
> > >   <G4sourcedir>\source\event\src\G4SPSAngDistribution.cc
> > > 
> > > in line 301:
> > > 
> > >  void G4SPSAngDistribution::GenerateFocusedFlux(G4ParticleMomentum& mom)
> > >  {  mom = (FocusPoint - posDist->GetParticlePos()).unit();
> > >     ...
> > >  }
> > > 
> > > where the particle momentum will basically be set as wherever the
> > > particle is, minus the "focus" point (which you can set as origin), so
> > > that wherever the particle gets generated, it will point towards the
> > > focus point and fly back.
> > > 
> > > best, Ming
> > > 
> > > On Fri, 19 Aug 2016 18:42:25 GMT, Constantin Athanassas wrote:
> > > 
> > > > Hello,
> > > > 
> > > > I am working on extended example: extended/eventgenerator/exgps. I am
> > > > trying to replicate the example macro at the end of the link:
> > > > 
> > > > https://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/ch02s07.html#eqn.GPScosine
> > > > 
> > > > but I want to use a spherical source radiating inwards, towards the SiO2
> > > > sphere at the center, not outwards. I am using the following macro:
> > > > 
> > > > /gps/particle gamma
> > > > 
> > > > /gps/pos/type Surface
> > > > 
> > > > /gps/pos/shape Sphere
> > > > 
> > > > /gps/pos/centre 0 0 0 cm
> > > > 
> > > > /gps/radius 6 cm
> > > > 
> > > > /gps/ang/type cos
> > > > 
> > > > /gps/ene/type Lin
> > > > 
> > > > /gps/ene/min 2 MeV
> > > > 
> > > > /gps/ene/max 10 MeV
> > > > 
> > > > /gps/ene/gradient 1
> > > > 
> > > > /gps/ene/intercept 1
> > > > 
> > > > /run/beamOn 100
> > > > 
> > > > but the flux always seems to be directed outwards, either from the
> > > > center of the SiO2 sphere or on the 6-cm-wide shell, depending on the
> > > > combination of values assigned to:
> > > > 
> > > > /gps/ang/mintheta and
> > > > 
> > > > /gps/ang/maxtheta
> > > > 
> > > > but never towards the center of the setup, which is the wanted.
> > > > 
> > > > I followed the steps shown in thread:
> > > > http://hypernews.slac.stanford.edu/HyperNews/geant4/get/space_app/79/2/1.html
> > > > 
> > > > but, still, the model does not cooperate.
> > > > 
> > > > Can someone help?
> > > > 
> > > > Thanks in advance,
> > > > 
> > > > Constantin Athanassas, NTUA.
> > > > 
> > > 
> > 
> 

 Add Message Add Message
to: "Re: G4GeneralParticleSource: spherical source radiating inwards??"

 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 ]