PMNS_Base.cxx
//......................................................................
///
/// Get the effective mass-splitting dm_j1 in matter in eV^2
///
/// Requires that j>1. Will notify you if input is wrong.
///
/// @param j    - the index of dm_j1
///
Get the effective mass-splitting dm_j1 in matter in eV^2

Requires that j>1. Will notify you if input is wrong.
Get the effective mass - splitting dm_j1 in matter in eV^2 Requires that j > 1 . Will notify you if input is wrong .
double PMNS_Base::GetDmEff(int j)
{
  if(j<2 || j>fNumNus){
    cout << "ERROR: Dm" << j << "1 not valid for " << fNumNus;
    cout << " neutrinos. Returning zero." << endl;
    return 0;
  }
  SolveHam();
  vector<int> TrueIdx(fNumNus, 0);
  vector<double> TrueVals(fNumNus, 0);
  vector<int> EffIdx(fNumNus, 0);
  for(int i=0; i<fNumNus; i++){
    TrueIdx[i] = i;
    EffIdx[i] = i;
  }
  sort(TrueIdx.begin(), TrueIdx.end(), IdxCompare(fDm));
  for(int i=0; i<fNumNus; i++) TrueVals[i] = TrueIdx[i];
  sort(TrueIdx.begin(), TrueIdx.end(), IdxCompare(TrueVals));
  sort(EffIdx.begin(), EffIdx.end(), IdxCompare(fEval));
  return (fEval[EffIdx[TrueIdx[j-1]]] - fEval[EffIdx[TrueIdx[0]]]) * fEnergy * 2e9;
}
double PMNS_Base :: GetDmEff ( int j ) { if ( j < 2 || j > fNumNus ) { cout << " " << j << " " << fNumNus ; cout << " " << endl ; return 0 ; } SolveHam ( ) ; vector < int > TrueIdx ( fNumNus , 0 ) ; vector < double > TrueVals ( fNumNus , 0 ) ; vector < int > EffIdx ( fNumNus , 0 ) ; for ( int i = 0 ; i < fNumNus ; i ++ ) { TrueIdx [ i ] = i ; EffIdx [ i ] = i ; } sort ( TrueIdx . begin ( ) , TrueIdx . end ( ) , IdxCompare ( fDm ) ) ; for ( int i = 0 ; i < fNumNus ; i ++ ) TrueVals [ i ] = TrueIdx [ i ] ; sort ( TrueIdx . begin ( ) , TrueIdx . end ( ) , IdxCompare ( TrueVals ) ) ; sort ( EffIdx . begin ( ) , EffIdx . end ( ) , IdxCompare ( fEval ) ) ; return ( fEval [ EffIdx [ TrueIdx [ j - 1 ] ] ] - fEval [ EffIdx [ TrueIdx [ 0 ] ] ] ) * fEnergy * 2e9 ; }
......................................................................
Get the effective mass-splitting dm_j1 in matter in eV^2
...................................................................... Get the effective mass - splitting dm_j1 in matter in eV^2
// Solve the Hamiltonian to update eigenvalues // Sort eigenvalues in same order as vacuum Dm^2 // Return eigenvalues * 2E