Class CylindricalProjectionMap

Inheritance Relationships

Base Type

Class Documentation

class CylindricalProjectionMap : public Referenced

2D histogram of spherical coordinates in equal-area projection

Public Functions

CylindricalProjectionMap()
CylindricalProjectionMap(size_t nPhi, size_t nTheta)

constructur

Parameters:
  • nPhi – number of bins for phi (0-2pi)

  • nTheta – number of bins for theta (0-pi)

void fillBin(const Vector3d &direction, double weight = 1.)

Increment the bin value in direction by weight.

void fillBin(size_t bin, double weight = 1.)

Increment the bin value by weight.

Vector3d drawDirection() const

Draw a random vector from the distribution.

bool checkDirection(const Vector3d &direction) const

Check if the direction has a non zero propabiliy.

const std::vector<double> &getPdf() const
std::vector<double> &getPdf()
const std::vector<double> &getCdf() const
size_t getNPhi()
size_t getNTheta()
size_t binFromDirection(const Vector3d &direction) const

Calculate the bin from a direction

Vector3d directionFromBin(size_t bin) const

Calculate a random vector inside the bin boundaries

inline size_t addReference() const
inline size_t removeReference() const
inline int removeReferenceNoDelete() const
inline size_t getReferenceCount() const

Protected Attributes

mutable size_t _referenceCount