-
Notifications
You must be signed in to change notification settings - Fork 0
/
FSRQ.h
63 lines (49 loc) · 1.63 KB
/
FSRQ.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
61
62
63
#ifndef FSRQ_H
#define FSRQ_H
#include "AstrophysicalSource.h"
#include "Constants.h"
#include <cmath>
#include <algorithm>
/* This class models Flat Spectrum Radio Quasars
*/
class FSRQ : public AstrophysicalSource
{
protected:
const double E_cut;
const double E_0 = 1._GeV;
public:
FSRQ(std::shared_ptr<CosmologyModel> _CM, std::shared_ptr<EBLAbsorbtionCoefficient> tau, double E_cut = 6._GeV) : AstrophysicalSource(_CM, tau, std::string("FSRQ")), E_cut(E_cut)
{
zBounds.first = 0; zBounds.second = 6;
GammaBounds.first = 2.44 - 2*0.18; GammaBounds.second = 2.44 + 2*0.18;
}
double kCorrection(const double E, const double z, const double Gamma) override
{
return pow(1 + z, 2 - Gamma) * exp(-(sqrt(E*(1+z)) - E) / sqrt(E_cut));
}
double literal_F(const double E, const double z, const double Gamma) override
{
return pow(E/E_0, -Gamma) * exp(- sqrt(E/ E_cut));
}
double GammaDistribution(const double Gamma) override
{
return 1./sqrt(2.*M_PI*0.18*0.18) * exp(-pow((Gamma - 2.44), 2)/(2.*0.18*0.18));
}
double LuminosityFunction(const double L, const double z) override
{
//defining parameters of the best fit model
const double A = 3.06e-9/pow(1._Mpc,3)*1e48_ergpers;
const double gamma_1 = 0.21;
const double L_s = 0.84e48_ergpers;
const double gamma_2 = 1.58;
const double z_c_s = 1.47;
const double alpha = 0.21;
const double p_1 = 7.35;
const double p_2 = -6.51;
double z_c = z_c_s*pow(L/1e48_ergpers, alpha);
double evo = 1./(pow((1.+z)/(1+z_c),p_1)+pow((1.+z)/(1.+z_c),p_2));
double phi_bare = A/(log(10.)*L*(pow(L/L_s,gamma_1)+pow(L/L_s,gamma_2)));
return phi_bare*evo;
}
};
#endif