Kariba
Loading...
Searching...
No Matches
Radiation.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include <gsl/gsl_spline.h>
7
8namespace kariba {
9
12 double nu;
13 double b;
14 gsl_spline* syn;
15 gsl_interp_accel* acc_syn;
16 gsl_spline* eldis;
17 gsl_interp_accel* acc_eldis;
18};
19
22 double nu;
23 double b;
24 gsl_spline* syn;
25 gsl_interp_accel* acc_syn;
26 gsl_spline* derivs;
27 gsl_interp_accel* acc_derivs;
28};
29
32 double eph;
33 double ephmin;
34 double ephmax;
35 gsl_spline* eldis;
36 gsl_interp_accel* acc_eldis;
37 gsl_spline* phodis;
38 gsl_interp_accel* acc_phodis;
39};
40
43 double game;
44 double e1;
45 gsl_spline* phodis;
46 gsl_interp_accel* acc_phodis;
47};
48
51 double tin;
52 double rin;
53 double nu;
54};
55
58 double gamma;
59 double beta;
60 double tin;
61 double rin;
62 double rout;
63 double h;
64 double z;
65 double nu;
66};
67
69class Radiation {
70 protected:
71 std::vector<double> en_phot;
72 std::vector<double> num_phot;
73 std::vector<double> en_phot_obs;
74 std::vector<double> num_phot_obs;
75
76 double r, z;
77 double vol;
78 double beta;
79 double dopfac, angle;
80 double dopnum;
82 std::string geometry;
83
84 public:
85 Radiation(size_t size);
86
87 const std::vector<double>& get_energy() const { return en_phot; }
88
89 const std::vector<double>& get_nphot() const { return num_phot; }
90
91 const std::vector<double>& get_energy_obs() const { return en_phot_obs; }
92
93 const std::vector<double>& get_nphot_obs() const { return num_phot_obs; }
94
95 size_t get_size() const { return en_phot.size(); }
96
97 double get_volume() const { return vol; }
98
99 double integrated_luminosity(double numin, double numax);
100
101 void set_beaming(double theta, double speed, double doppler);
102 void set_inclination(double theta);
103 void set_geometry(const std::string& geom, double l1, double l2);
104 void set_geometry(const std::string& geom, double l1);
105
106 void set_counterjet(bool flag);
107 void test_arrays();
108};
109} // namespace kariba
Base class for photon/neutrino distributions.
Definition Radiation.hpp:69
const std::vector< double > & get_nphot_obs() const
Definition Radiation.hpp:93
std::vector< double > en_phot_obs
same as above but in observer frame
Definition Radiation.hpp:73
std::string geometry
string to track geometry of emitting region
Definition Radiation.hpp:82
double angle
Viewing angle/Doppler factor of emitting region.
Definition Radiation.hpp:79
double integrated_luminosity(double numin, double numax)
Definition Radiation.cpp:74
double vol
Volume of emitting region.
Definition Radiation.hpp:77
double dopfac
Definition Radiation.hpp:79
double z
Dimensions of emitting region.
Definition Radiation.hpp:76
void test_arrays()
Simple method to check arrays; only meant for debugging.
Definition Radiation.cpp:92
double get_volume() const
Definition Radiation.hpp:97
const std::vector< double > & get_energy_obs() const
Definition Radiation.hpp:91
double r
Definition Radiation.hpp:76
std::vector< double > num_phot
array of number of photons in units of erg/s/Hz
Definition Radiation.hpp:72
size_t get_size() const
Definition Radiation.hpp:95
void set_beaming(double theta, double speed, double doppler)
Methods to set viewing angle, beaming and geometry of emission region.
Definition Radiation.cpp:13
const std::vector< double > & get_nphot() const
Definition Radiation.hpp:89
void set_geometry(const std::string &geom, double l1, double l2)
Definition Radiation.cpp:21
bool counterjet
boolean switch if user wants to include counterjet emission
Definition Radiation.hpp:81
const std::vector< double > & get_energy() const
Definition Radiation.hpp:87
double dopnum
Doppler boosting exponent, depends on geometry.
Definition Radiation.hpp:80
std::vector< double > en_phot
array of photon energies
Definition Radiation.hpp:71
double beta
speed of the emitting region
Definition Radiation.hpp:78
void set_counterjet(bool flag)
Method to include a counterjet in cyclosycnchrotron/Compton classes.
Definition Radiation.cpp:89
std::vector< double > num_phot_obs
same as above but in observer frame
Definition Radiation.hpp:74
void set_inclination(double theta)
Definition Radiation.cpp:19
Definition BBody.hpp:5
Structure used for GSL integration.
Definition Radiation.hpp:42
gsl_spline * phodis
Definition Radiation.hpp:45
gsl_interp_accel * acc_phodis
Definition Radiation.hpp:46
double e1
Definition Radiation.hpp:44
double game
Definition Radiation.hpp:43
Structure used for GSL integration.
Definition Radiation.hpp:31
gsl_spline * phodis
Definition Radiation.hpp:37
gsl_interp_accel * acc_phodis
Definition Radiation.hpp:38
double ephmin
Definition Radiation.hpp:33
gsl_spline * eldis
Definition Radiation.hpp:35
double ephmax
Definition Radiation.hpp:34
double eph
Definition Radiation.hpp:32
gsl_interp_accel * acc_eldis
Definition Radiation.hpp:36
Structure used for GSL integration.
Definition Radiation.hpp:21
gsl_spline * derivs
Definition Radiation.hpp:26
gsl_interp_accel * acc_syn
Definition Radiation.hpp:25
gsl_interp_accel * acc_derivs
Definition Radiation.hpp:27
gsl_spline * syn
Definition Radiation.hpp:24
double nu
Definition Radiation.hpp:22
double b
Definition Radiation.hpp:23
Structure used for GSL integration.
Definition Radiation.hpp:11
gsl_spline * syn
Definition Radiation.hpp:14
gsl_spline * eldis
Definition Radiation.hpp:16
gsl_interp_accel * acc_syn
Definition Radiation.hpp:15
double nu
Definition Radiation.hpp:12
double b
Definition Radiation.hpp:13
gsl_interp_accel * acc_eldis
Definition Radiation.hpp:17
Structure used for GSL integration.
Definition Radiation.hpp:57
double tin
Definition Radiation.hpp:60
double z
Definition Radiation.hpp:64
double beta
Definition Radiation.hpp:59
double rout
Definition Radiation.hpp:62
double gamma
Definition Radiation.hpp:58
double nu
Definition Radiation.hpp:65
double h
Definition Radiation.hpp:63
double rin
Definition Radiation.hpp:61
Structure used for GSL integration.
Definition Radiation.hpp:50
double nu
Definition Radiation.hpp:53
double tin
Definition Radiation.hpp:51
double rin
Definition Radiation.hpp:52