Re: PndBoxGenerator -> distributions uniform in 1/p [message #4721 is a reply to message #4299] |
Fri, 20 July 2007 13:59  |
StefanoSpataro
Messages: 2736 Registered: June 2005 Location: Torino
|
first-grade participant |
 From: *physik.uni-giessen.de
|
|
Hello,
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.);
primGen->AddGenerator(boxGen);
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.);
primGen->AddGenerator(boxGen);
you will have a distribution in the same range BUT uniform in 1/p. It works even with pt range (so uniform in 1/pt).
Enjoy.
P.S. meanwhile I corrected a missing initialization in the constructor, ad sone for CbmBoxGenerator.
|
|
|