|
Jpp 19.3.0-rc.3
the software that should make you happy
|
Implementation of the JGenerator interface. More...
#include <JMarkovGenerator.hh>
Public Member Functions | |
| JSphereGenerator (const JPosition3D &_x0, double _r=0, TH2 *_h=NULL) | |
| Constructor. | |
| ~JSphereGenerator () | |
| JPosition3D | getPosition () |
| Return a randomly generated position. | |
| double | getWeight (JPosition3D pos) |
| return the weight (=probability density dP/dV) for the given position. | |
Public Attributes | |
| JPosition3D | x0 |
| double | r |
| TH2 * | h |
Implementation of the JGenerator interface.
Generates positions on a sphere of radius _r centered at _x0 by sampling from a 2D histogram of cosTheta vs phi.
When r=0, it simply returns the position x0.
Definition at line 586 of file JMarkovGenerator.hh.
|
inline |
Constructor.
The histogram is cloned and automatically normalized. The x-axis is assumed to be cos(theta), and the y-axis is assumed to be phi in radians. Empty bins should be avoided!
Definition at line 596 of file JMarkovGenerator.hh.
|
inline |
Definition at line 621 of file JMarkovGenerator.hh.
|
inlinevirtual |
Return a randomly generated position.
Implements JMARKOV::JGenerator.
Definition at line 625 of file JMarkovGenerator.hh.
|
inlinevirtual |
return the weight (=probability density dP/dV) for the given position.
When the generator is properly normalized, the integral of this quantity over the whole space is 1.
Implements JMARKOV::JGenerator.
Definition at line 637 of file JMarkovGenerator.hh.
| JPosition3D JMARKOV::JSphereGenerator::x0 |
Definition at line 661 of file JMarkovGenerator.hh.
| double JMARKOV::JSphereGenerator::r |
Definition at line 662 of file JMarkovGenerator.hh.
| TH2* JMARKOV::JSphereGenerator::h |
Definition at line 663 of file JMarkovGenerator.hh.