OscProb
EigenPoint.cxx
Go to the documentation of this file.
1
2//
3// Struct to organise eigensystems for caching
4//
5//.................................................
6//
7// jcoelho\@apc.in2p3.fr
9
10#include "EigenPoint.h"
11
12using namespace OscProb;
13
14//.............................................................................
25EigenPoint::EigenPoint(int numNus, double e, NuPath p, bool n)
26 : fEval(numNus, 0), fEvec(numNus, vectorC(numNus, 0))
27{
28 SetVars(e, p, n);
29}
30
31//.............................................................................
39void EigenPoint::SetVars(double e, NuPath p, bool n)
40{
41 fEnergy = e;
42 fPath = p;
43 fNubar = n;
44 SetNE();
45}
46
47//.............................................................................
52{
54 if (fNE < 1e-12) fNE = 1e-12;
55 if (fNubar) fNE = -fNE;
56}
57
58//.............................................................................
62bool EigenPoint::operator<(const EigenPoint& rhs) const
63{
64 if (fNE == rhs.fNE) return fPath.zoa < rhs.fPath.zoa;
65 return fNE < rhs.fNE;
66}
67
68//.............................................................................
72bool EigenPoint::operator==(const EigenPoint& rhs) const
73{
74 return (fNE == rhs.fNE) && (fPath.zoa == rhs.fPath.zoa);
75}
Some useful general definitions.
Definition: Absorption.h:6
std::vector< complexD > vectorC
Definition: Definitions.h:22
Struct to organise eigensystems for caching.
Definition: EigenPoint.h:20
NuPath fPath
Neutrino path.
Definition: EigenPoint.h:29
void SetVars(double e=0, NuPath p=NuPath(0, 0), bool n=false)
Set eigensystem parameters.
Definition: EigenPoint.cxx:39
void SetNE()
Set energy-density.
Definition: EigenPoint.cxx:51
bool fNubar
Nu-Nubar flag.
Definition: EigenPoint.h:30
double fEnergy
Neutrino energy.
Definition: EigenPoint.h:28
bool operator==(const EigenPoint &rhs) const
Identity operator.
Definition: EigenPoint.cxx:72
bool operator<(const EigenPoint &rhs) const
Comparison operator.
Definition: EigenPoint.cxx:62
double fNE
Energy-density.
Definition: EigenPoint.h:31
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 zoa
The effective Z/A value of the path segment.
Definition: NuPath.h:80