OscProb
OscProb Namespace Reference

Some useful general definitions. More...

Classes

class  Absorption
 
struct  EarthBin
 
class  EarthModelBase
 Base class for implementing an earth model. More...
 
class  EarthModelBinned
 Implements an earth model with depth/latitude/longitude bins. More...
 
struct  EigenPoint
 Struct to organise eigensystems for caching. More...
 
struct  IdxCompare
 An index sorting comparator. More...
 
struct  NuPath
 A struct representing a neutrino path segment. More...
 
class  PMNS_Base
 Base class implementing general functions for computing neutrino oscillations. More...
 
class  PMNS_Decay
 Implementation of neutrino decay in a three-neutrino framework. More...
 
class  PMNS_Deco
 Implementation of oscillations of neutrinos in matter in a three-neutrino framework with decoherence. More...
 
class  PMNS_Fast
 Implementation of oscillations of neutrinos in matter in a three-neutrino framework. More...
 
class  PMNS_Iter
 Implementation of oscillations of neutrinos in matter in a three-neutrino framework. More...
 
class  PMNS_LIV
 Implements oscillations with LIV as modelled by SME. More...
 
class  PMNS_NSI
 Implementation of oscillations of neutrinos in matter in a three-neutrino framework with NSI. More...
 
class  PMNS_NUNM
 Implementation of oscillations of neutrinos in matter in a three-neutrino framework with Non unitary Neutrino Mixing (NUNM). More...
 
class  PMNS_SNSI
 Implementation of oscillations of neutrinos in matter in a three-neutrino framework with scalar NSI. More...
 
class  PMNS_Sterile
 Implementation of oscillations of neutrinos in matter in a N-neutrino framework. More...
 
struct  PremLayer
 A struct representing a spherical shell of matter for earth models. More...
 
class  PremModel
 Implements an earth model with spherical shells. More...
 
struct  TrajConstants
 A struct holding useful combinations of trajectory variables. More...
 

Typedefs

typedef std::vector< int > vectorI
 
typedef std::vector< double > vectorD
 
typedef std::vector< vectorDmatrixD
 
typedef std::complex< double > complexD
 
typedef std::vector< complexDvectorC
 
typedef std::vector< vectorCmatrixC
 

Functions

NuPath AvgPath (NuPath &p1, NuPath &p2)
 Get the average of two paths. More...
 
NuPath AvgPath (std::vector< NuPath > &pv)
 Get the average of a vector of paths. More...
 
std::vector< NuPathMergePaths (std::vector< NuPath > &inputPath, int j, int k)
 Merge paths j and k in vector. More...
 

Detailed Description

Author
Joao Coelho - jcoelho@apc.in2p3.fr

Typedef Documentation

◆ complexD

typedef std::complex<double> OscProb::complexD

Definition at line 21 of file Definitions.h.

◆ matrixC

typedef std::vector<vectorC> OscProb::matrixC

Definition at line 23 of file Definitions.h.

◆ matrixD

typedef std::vector<vectorD> OscProb::matrixD

Definition at line 19 of file Definitions.h.

◆ vectorC

typedef std::vector<complexD> OscProb::vectorC

Definition at line 22 of file Definitions.h.

◆ vectorD

typedef std::vector<double> OscProb::vectorD

Definition at line 18 of file Definitions.h.

◆ vectorI

typedef std::vector<int> OscProb::vectorI

Definition at line 16 of file Definitions.h.

Function Documentation

◆ AvgPath() [1/2]

NuPath OscProb::AvgPath ( NuPath p1,
NuPath p2 
)

Get the merged average of two paths

This method will merge two paths and take their average density weighted by Z/A and path length.

The Z/A will be the average weighted by path length

Parameters
p1- The first path to merge
p2- The second path to merge
Returns
The merged path

Definition at line 27 of file NuPath.cxx.

28{
29 // Start with the first path
30 NuPath mergedPath = p1;
31
32 // Add the second length
33 mergedPath.length += p2.length;
34
35 // Compute weighted average of Z/A
36 mergedPath.zoa =
37 (p1.zoa * p1.length + p2.zoa * p2.length) / (p1.length + p2.length);
38
39 // Compute weighted average of density
40 mergedPath.density =
41 (p1.density * p1.zoa * p1.length + p2.density * p2.zoa * p2.length) /
42 (p1.zoa * p1.length + p2.zoa * p2.length);
43
44 // return merged path
45 return mergedPath;
46}
A struct representing a neutrino path segment.
Definition: NuPath.h:34
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

References OscProb::NuPath::density, OscProb::NuPath::length, and OscProb::NuPath::zoa.

Referenced by AvgPath(), OscProb::PMNS_Base::AvgProbLoE(), OscProb::PMNS_Base::AvgProbMatrixLoE(), OscProb::PMNS_Base::AvgProbVectorLoE(), OscProb::PMNS_Base::ConvertEtoLoE(), OscProb::EarthModelBase::GetMergedPaths(), and MergePaths().

◆ AvgPath() [2/2]

NuPath OscProb::AvgPath ( std::vector< NuPath > &  pv)

Get the merged average of a vector of paths

This method will merge a set of paths and take their average density weighted by Z/A and path length.

The Z/A will be the average weighted by path length

Parameters
pv- vector of paths to merge
Returns
The merged path

Definition at line 60 of file NuPath.cxx.

61{
62 // Get size of vector
63 int np = pv.size();
64
65 // Start with the first path
66 NuPath mergedPath;
67
68 // If vector is not empty, start on first path
69 if (np > 0)
70 mergedPath = pv[0];
71 else
72 return mergedPath;
73
74 // Merge each of the following paths
75 for (int i = 1; i < np; i++) { mergedPath = AvgPath(mergedPath, pv[i]); }
76
77 // return merged path
78 return mergedPath;
79}
NuPath AvgPath(NuPath &p1, NuPath &p2)
Get the average of two paths.
Definition: NuPath.cxx:27

References AvgPath().

◆ MergePaths()

vector< NuPath > OscProb::MergePaths ( std::vector< NuPath > &  inputPath,
int  j,
int  k 
)

Merge two specific paths by their indices in a path vector

Parameters
inputPath- The original vector of paths to merge
j,k- The indices of the two paths to merge
Returns
The merged vector of paths

Definition at line 89 of file NuPath.cxx.

90{
91 // Output vector
92 vector<NuPath> mergedPath;
93
94 // Loop over input paths
95 for (int i = 0; i < inputPath.size(); i++) {
96 // If first index, merge the paths j and k
97 if (i == j) mergedPath.push_back(AvgPath(inputPath[j], inputPath[k]));
98 // If not second index add the path as is
99 else if (i != k)
100 mergedPath.push_back(inputPath[i]);
101
102 } // End of loop
103
104 // return merged vector
105 return mergedPath;
106}

References AvgPath().

Referenced by OscProb::EarthModelBase::GetMergedPaths().