OscProb
NuPath.h
Go to the documentation of this file.
1
12
26
27#ifndef NUPATH_H
28#define NUPATH_H
29
30#include <vector>
31
32namespace OscProb {
33
34 struct NuPath {
51 NuPath(double l = 0, double d = 0, double z = 0.5, int ly = 0)
52 {
53 SetPath(l, d, z, ly);
54 }
55
70 void SetPath(double l = 0, double d = 0, double z = 0.5, int ly = 0)
71 {
72 length = l;
73 density = d;
74 zoa = z;
75 layer = ly;
76 }
77
78 double length;
79 double density;
80 double zoa;
81 int layer;
82 };
83
84 struct PremLayer {
101 PremLayer(double r = 0, double d = 0, double z = 0.5, int ly = 0)
102 {
103 SetLayer(r, d, z, ly);
104 }
105
120 void SetLayer(double r = 0, double d = 0, double z = 0.5, int ly = 0)
121 {
122 radius = r;
123 density = d;
124 zoa = z;
125 layer = ly;
126 }
127
128 double radius;
129 double density;
130 double zoa;
131 int layer;
132
137 {
138 return rhs.density == density && rhs.zoa == zoa && rhs.layer == layer;
139 }
140 };
141
142 NuPath AvgPath(NuPath& p1, NuPath& p2);
143 NuPath AvgPath(
144 std::vector<NuPath>& pv);
145 std::vector<NuPath> MergePaths(std::vector<NuPath>& inputPath, int j,
146 int k);
147
148} // namespace OscProb
149
150#endif
Some useful general definitions.
Definition: Absorption.h:6
std::vector< NuPath > MergePaths(std::vector< NuPath > &inputPath, int j, int k)
Merge paths j and k in vector.
Definition: NuPath.cxx:89
NuPath AvgPath(NuPath &p1, NuPath &p2)
Get the average of two paths.
Definition: NuPath.cxx:27
A struct representing a neutrino path segment.
Definition: NuPath.h:34
NuPath(double l=0, double d=0, double z=0.5, int ly=0)
Constructor.
Definition: NuPath.h:51
int layer
An index to identify the matter type.
Definition: NuPath.h:81
double density
The density of the path segment in g/cm^3.
Definition: NuPath.h:79
double length
The length of the path segment in km.
Definition: NuPath.h:78
double zoa
The effective Z/A value of the path segment.
Definition: NuPath.h:80
void SetPath(double l=0, double d=0, double z=0.5, int ly=0)
Set the properties of the neutrino path.
Definition: NuPath.h:70
A struct representing a spherical shell of matter for earth models.
Definition: NuPath.h:84
bool operator==(PremLayer &rhs)
Definition: NuPath.h:136
double radius
The outer radius of the layer in km.
Definition: NuPath.h:128
double zoa
The effective Z/A value of the layer.
Definition: NuPath.h:130
void SetLayer(double r=0, double d=0, double z=0.5, int ly=0)
Set the properties of the layer.
Definition: NuPath.h:120
double density
The density of the layer in g/cm^3.
Definition: NuPath.h:129
PremLayer(double r=0, double d=0, double z=0.5, int ly=0)
Constructor.
Definition: NuPath.h:101
int layer
An index to identify the matter type.
Definition: NuPath.h:131