-
Notifications
You must be signed in to change notification settings - Fork 3
/
block.h
executable file
·58 lines (53 loc) · 1.23 KB
/
block.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
#include <cstring>
#include <gsl/gsl_matrix.h>
#define cellDiv 200
double E_to_l(double );
class EulerAngles{
public:
double ct,st,cp,sp;
double sp0,cp0,ct0;
//double theta,phi;
EulerAngles();
EulerAngles(double);
EulerAngles(double,double);
void addTo(EulerAngles);
double get_theta(),get_phi();
};
class Coordinates{
public:
double x,y,z;
Coordinates();
Coordinates(double,double,double);
Coordinates(double,double);
Coordinates(EulerAngles);
double normxy();
void addTo(Coordinates);
};
Coordinates operator *(double ,Coordinates );
Coordinates operator +(Coordinates ,Coordinates );
EulerAngles operator +(EulerAngles , EulerAngles );
class photon{
private:
double r0,cp0,sp0;
public:
double muPE,muC,muTotal,imuTotal;
double rstep,R2;
int compton_ratio;
//double travel;
//unsigned int scattered;
double sampleL,muPEdr,muCdr;
unsigned int scattered;
Coordinates r;
EulerAngles o;
photon();
photon(double);
int init();
int propagate(double);
int initRef(double);
int initRefBuried(double);
int initGixos();
int propagateRef(double);
int propagatePass(double);
int propagateGixos(double);
int initPass();
};