2021-08-23 10:00:36 -04:00
|
|
|
#ifndef ANGULARDISTRIBUTION_H
|
|
|
|
#define ANGULARDISTRIBUTION_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2021-09-03 17:03:41 -04:00
|
|
|
#include <random>
|
2021-08-23 10:00:36 -04:00
|
|
|
|
2021-09-06 16:18:49 -04:00
|
|
|
namespace Mask {
|
2021-08-23 10:00:36 -04:00
|
|
|
|
2021-09-06 16:18:49 -04:00
|
|
|
class AngularDistribution {
|
|
|
|
public:
|
|
|
|
AngularDistribution();
|
|
|
|
AngularDistribution(const std::string& file);
|
|
|
|
~AngularDistribution();
|
|
|
|
void ReadDistributionFile(const std::string& file);
|
|
|
|
double GetRandomCosTheta();
|
|
|
|
inline int GetL() { return L; }
|
|
|
|
inline double GetBranchingRatio() { return branchingRatio; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
inline bool IsIsotropic() { return isoFlag; }
|
2021-09-06 17:06:02 -04:00
|
|
|
|
2021-09-06 16:18:49 -04:00
|
|
|
std::uniform_real_distribution<double> uniform_cosine_dist;
|
|
|
|
std::uniform_real_distribution<double> uniform_prob_dist;
|
|
|
|
|
|
|
|
double branchingRatio;
|
|
|
|
int L;
|
|
|
|
std::vector<double> constants;
|
|
|
|
bool isoFlag;
|
|
|
|
};
|
2021-08-23 10:00:36 -04:00
|
|
|
|
2021-09-06 16:18:49 -04:00
|
|
|
}
|
2021-08-23 10:00:36 -04:00
|
|
|
|
|
|
|
#endif
|