PMNS_Fast.cxx
//......................................................................
///
/// Build the full Hamiltonian in matter.
///
/// Here we divide the mass squared matrix Hms by the 2E
/// to obtain the vacuum Hamiltonian in eV. Then, the matter
/// potential is added to the electron component.
///
Build the full Hamiltonian in matter.

Here we divide the mass squared matrix Hms by the 2E
to obtain the vacuum Hamiltonian in eV. Then, the matter
potential is added to the electron component.
Build the full Hamiltonian in matter . Here we divide the mass squared matrix Hms by the 2E to obtain the vacuum Hamiltonian in eV . Then the matter potential is added to the electron component .
void PMNS_Fast::UpdateHam()
{
  double lv = 2 * kGeV2eV*fEnergy;     
  double kr2GNe = kK2*M_SQRT2*kGf;
  kr2GNe *= fPath.density * fPath.zoa; 
  for(int i=0;i<fNumNus;i++){
    fHam[i][i] = fHms[i][i]/lv;
    for(int j=i+1;j<fNumNus;j++){
      if(!fIsNuBar) fHam[i][j] = fHms[i][j]/lv;
      else          fHam[i][j] = conj(fHms[i][j])/lv;
    }
  }
  if(!fIsNuBar) fHam[0][0] += kr2GNe;
  else          fHam[0][0] -= kr2GNe;
}
void PMNS_Fast :: UpdateHam ( ) { double lv = 2 * kGeV2eV * fEnergy ; double kr2GNe = kK2 * M_SQRT2 * kGf ; kr2GNe *= fPath . density * fPath . zoa ; for ( int i = 0 ; i < fNumNus ; i ++ ) { fHam [ i ] [ i ] = fHms [ i ] [ i ] / lv ; for ( int j = i + 1 ; j < fNumNus ; j ++ ) { if ( ! fIsNuBar ) fHam [ i ] [ j ] = fHms [ i ] [ j ] / lv ; else fHam [ i ] [ j ] = conj ( fHms [ i ] [ j ] ) / lv ; } } if ( ! fIsNuBar ) fHam [ 0 ] [ 0 ] += kr2GNe ; else fHam [ 0 ] [ 0 ] -= kr2GNe ; }
......................................................................
......................................................................
// 2E in eV  // Matter potential in eV // Finish building Hamiltonian in matter with dimension of eV