-
Notifications
You must be signed in to change notification settings - Fork 0
/
FermiModelOptions.h
60 lines (52 loc) · 1.51 KB
/
FermiModelOptions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef _FermiModelOptions_
#define _FermiModelOptions_
#include "MyRJObject.h"
#include "MyDistribution.h"
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include <boost/foreach.hpp>
using boost::property_tree::ptree;
class FermiModelOptions
{
private:
// if fixed: nmax is number of sources
// else: nmax is max number of sources
int nmax;
bool fixed;
// lower flux limit (ph cm^-2 s^-1)
double fluxlo;
// lower bound on upper flux limit (ph cm^-2 s^-1)
double fluxhi_min;
// flux where norm = dN/dlogF defined
double fluxnorm;
// bounds on norm
double norm_min, norm_max;
// which bin to apply lower flux limit to
int midbin;
// bounds on PSF radii (in radians)
double smin, smax;
// bound on PSF evaluation
std::vector<double> slim;
// bounds on background (ph cm^-2 s^-1 sr^-1)
double bg_min, bg_max;
// bounds on templates
std::vector<double> tem_min;
std::vector<double> tem_max;
public:
FermiModelOptions();
void load(ptree pt);
MyRJObject<MyDistribution> objects();
double get_smin() { return smin; }
double get_smax() { return smax; }
std::vector<double>& get_slim() { return slim; }
double get_bg_min() { return bg_min; }
double get_bg_max() { return bg_max; }
std::vector<double>& get_tem_min() { return tem_min; }
std::vector<double>& get_tem_max() { return tem_max; }
// Singleton
private:
static FermiModelOptions instance;
public:
static FermiModelOptions& get_instance() { return instance; }
};
#endif