GSI Forum - RDF feed https://forum.gsi.de/index.php PndBoxGenerator https://forum.gsi.de/index.phpindex.php?t=rview&goto=4298&th=1318#msg_4298 PndBoxGenerator.

PndBoxGenerator is like CbmBoxGenerator, but I put one function in order to set uniform distributions in cos(theta), and not in theta as it is done by default.

Example:

If you want to have a unifor distribution i theta, you have to type in your simulation macro:

PndBoxGenerator* boxGen = new PndBoxGenerator(13, 1);
boxGen->SetPRange(1.,1.); // GeV/c
boxGen->SetPhiRange(0., 360.); // Azimuth angle range [degree]
boxGen->SetThetaRange(0., 180.); // Polar angle in lab system range [degree]
boxGen->SetXYZ(0., 0., 0.); // vertex coordinates [cm]

IF you want to have a unifor distribution in cos(theta):

PndBoxGenerator* boxGen = new PndBoxGenerator(13, 1);
boxGen->SetPRange(1.,1.); // GeV/c
boxGen->SetPhiRange(0., 360.); // Azimuth angle range [degree]
boxGen->SetThetaRange(0., 180.); // Polar angle in lab system range [degree]
boxGen->SetCosTheta(); // Set uniform ditribution in cos(theta)
boxGen->SetXYZ(0., 0., 0.); // vertex coordinates [cm]

And that's all.
Enjoy...

Ste

]]>
StefanoSpataro 2007-05-22T16:59:16-00:00
Re: PndBoxGenerator -&gt; distributions uniform in cos(theta) https://forum.gsi.de/index.phpindex.php?t=rview&goto=4299&th=1318#msg_4299
Comparison plots with the two methods:
RED - uniform theta
BLUE - uniform cos(theta)

Theta distributions Cos(Thata) distributions Yes, it works!
]]>
StefanoSpataro 2007-05-22T17:11:57-00:00
Re: PndBoxGenerator -&gt; distributions uniform in 1/p https://forum.gsi.de/index.phpindex.php?t=rview&goto=4721&th=1318#msg_4721 I added in PndBoxGenerator a new option, in order to have distributions uniform in 1/p (sometimes is can be useful).

It works as the CosTheta function, so (example):

PndBoxGenerator* boxGen = new PndBoxGenerator(13, 1);
boxGen->SetPRange(0.1,15.);
boxGen->SetPhiRange(0., 360.);
boxGen->SetThetaRange(1., 12.);
boxGen->SetXYZ(0., 0., 0.);

generates particles with a uniform distribution opver p in the fixed range, while if you add the boxGen->SetInverseP() function:

PndBoxGenerator* boxGen = new PndBoxGenerator(13, 1);
boxGen->SetPRange(0.1,15.);
boxGen->SetInverseP();
boxGen->SetPhiRange(0., 360.);
boxGen->SetThetaRange(1., 12.);
boxGen->SetXYZ(0., 0., 0.);