sfof
zbin_class.hpp
Go to the documentation of this file.
1 
7 #ifndef ZBIN_CLASS_H
8 #define ZBIN_CLASS_H
9 
18 #include "cosmo.hpp"
19 #include "exceptions.hpp"
20 
21 class Zbin { // Class structure for redshift bin properties.
22 
23 public:
24 
26  int num;
27 
29  int count;
30 
32  double z;
33 
35  double dz;
36 
38  double da;
39 
41  double dvdz;
42 
44  double dndz;
45 
47  double dndv;
48 
50  double link_r;
51 
53  double rfriend;
54 
61  Zbin(int num_val, double z_val, double z_bin_size) {
63  if (z_val <= 0)
64  throw BadArgumentException("Zbin", "z_val", "> 0.0");
65  if (z_bin_size <= 0)
66  throw BadArgumentException("Zbin", "z_bin_size", "> 0.0");
67  num = num_val;
68  z = z_val;
69  dz = z_bin_size;
70  count = 0;
71  da = 0;
72  dvdz = 0;
73  dndz = 0;
74  dndv = 0;
75  link_r = 0;
76  rfriend = 0;
77  };
78 
87  void assign_dist (double, double, double, double);
88 
94  void assign_rfriend (double);
95 
101  void assign_fixed_rfriend (double);
102 
103 private:
104 
107 
108 };
109 
110 #endif // ZBIN_CLASS_H
exceptions.hpp
Zbin::da
double da
Angular diameter distance of Zbin instance.
Definition: zbin_class.hpp:38
Zbin
Class for storing redshift bin properties.
Definition: zbin_class.hpp:21
Zbin::cosmo
Cosmo cosmo
Include Cosmo class.
Definition: zbin_class.hpp:106
Zbin::link_r
double link_r
Corrected transverse linking parameter value of Zbin instance.
Definition: zbin_class.hpp:50
Zbin::dndv
double dndv
Volume number density of Zbin instance.
Definition: zbin_class.hpp:47
Zbin::num
int num
Number associated to Zbin instance.
Definition: zbin_class.hpp:26
Zbin::assign_rfriend
void assign_rfriend(double)
This method scales transverse lining parameter value to the redshift of the Zbin instance.
Definition: zbin_class.cpp:18
cosmo.hpp
Zbin::dndz
double dndz
Surface number density of Zbin instance.
Definition: zbin_class.hpp:44
Cosmo
Class containing basic functions required for Cosmology.
Definition: cosmo.hpp:19
Zbin::Zbin
Zbin(int num_val, double z_val, double z_bin_size)
Initialise Zbin instance.
Definition: zbin_class.hpp:61
Zbin::rfriend
double rfriend
Transverse linking radius of Zbin instance.
Definition: zbin_class.hpp:53
Zbin::assign_fixed_rfriend
void assign_fixed_rfriend(double)
This method sets a fixed transverse lining parameter value for the Zbin instance.
Definition: zbin_class.cpp:37
Zbin::dz
double dz
Redshift bin size of Zbin instance.
Definition: zbin_class.hpp:35
BadArgumentException
Class for bad argument exceptions.
Definition: exceptions.hpp:9
Zbin::assign_dist
void assign_dist(double, double, double, double)
This method calculates the angular diameter distance of a Zbin instance for a given cosmology.
Definition: zbin_class.cpp:6
Zbin::dvdz
double dvdz
Differential comoving volume of Zbin instance.
Definition: zbin_class.hpp:41
Zbin::z
double z
Redshift of Zbin instance.
Definition: zbin_class.hpp:32
Zbin::count
int count
Number of Galaxy instances corresponding to Zbin instance.
Definition: zbin_class.hpp:29