GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » EMC » Uniform particle generation in solid angle
Uniform particle generation in solid angle [message #11678] Mon, 18 April 2011 09:07 Go to next message
HosseinMoeini is currently offline  HosseinMoeini
Messages: 10
Registered: May 2007
Location: KVI Groningen
occasional visitor

From: *KVI.nl
Dear all,

I was wondering if there's an easy way to generate particles along a unit 3-vector. As I noticed, the box generator in emc_complete.c doesn't do this. Apparently, it draws a random number within the specified ranges of theta and phi. What I need is something like G4RandomDirection function. I hit the problem when I roughly calculated the solid angle coverage of the full EMC to be about 92%. Whereas, the efficiency calculation using the box generator gives me something around 85% which indicates a bigger probability for particle generation at the poles (entrance and exit holes of the EMC)! Am I missing something here or there is other alternative to the box generator?

Best regards
Re: Uniform particle generation in solid angle [message #11680 is a reply to message #11678] Mon, 18 April 2011 11:53 Go to previous messageGo to next message
Dima Melnychuk is currently offline  Dima Melnychuk
Messages: 213
Registered: April 2004
Location: National Centre for Nucle...
first-grade participant
From: *fuw.edu.pl
Hi Hossein,

I suppose you should use the option
boxGen->SetCosTheta();
in box generator to have particles uniformly distributed in solid angle.

See the following post for details:

http://forum.gsi.de/index.php?t=tree&th=1318&start=0&rid=78& amp;S=2fcdba1e0ae8f392cb61ca826979c23a#page_top

Dima
Re: Uniform particle generation in solid angle [message #11681 is a reply to message #11680] Mon, 18 April 2011 14:10 Go to previous message
HosseinMoeini is currently offline  HosseinMoeini
Messages: 10
Registered: May 2007
Location: KVI Groningen
occasional visitor

From: *KVI.nl
Hi Dima,

Many thanks to you Smile

Hossein
Previous Topic: EmcDigiPositionDepth for Shashlyk
Next Topic: Access to clusters properties
Goto Forum:
  


Current Time: Fri Nov 22 21:34:42 CET 2024

Total time taken to generate the page: 0.00522 seconds