PMNS_Base.cxx
//......................................................................
///
/// Build Hms = H*2E, where H is the Hamiltonian in vacuum on flavour basis
/// and E is the neutrino energy in eV. Hms is effectively the matrix of
/// masses squared.
///
/// This is a hermitian matrix, so only the
/// upper triangular part needs to be filled
///
/// The construction of the Hamiltonian avoids computing terms that
/// are simply zero. This has a big impact in the computation time.
///
Build Hms = H*2E, where H is the Hamiltonian in vacuum on flavour basis
and E is the neutrino energy in eV. Hms is effectively the matrix of
masses squared.

This is a hermitian matrix, so only the
upper triangular part needs to be filled

The construction of the Hamiltonian avoids computing terms that
are simply zero. This has a big impact in the computation time.
Build Hms = H * 2E where H is the Hamiltonian in vacuum on flavour basis and E is the neutrino energy in eV . Hms is effectively the matrix of masses squared . This is a hermitian matrix so only the upper triangular part needs to be filled The construction of the Hamiltonian avoids computing terms that are simply zero . This has a big impact in the computation time .
void PMNS_Base::BuildHms()
{
  if(fBuiltHms) return;
  fGotES = false;
  for(int j=0; j<fNumNus; j++){
    fHms[j][j] = fDm[j];
    for(int i=0; i<j; i++){
      fHms[i][j] = 0;
    }
    for(int i=0; i<j; i++){
      RotateH(i,j,fHms);
    }
  }
  ClearCache();
  fBuiltHms = true;
}
void PMNS_Base :: BuildHms ( ) { if ( fBuiltHms ) return ; fGotES = false ; for ( int j = 0 ; j < fNumNus ; j ++ ) { fHms [ j ] [ j ] = fDm [ j ] ; for ( int i = 0 ; i < j ; i ++ ) { fHms [ i ] [ j ] = 0 ; } for ( int i = 0 ; i < j ; i ++ ) { RotateH ( i , j , fHms ) ; } } ClearCache ( ) ; fBuiltHms = true ; }
......................................................................
......................................................................
// Check if anything changed // Tag to recompute eigensystem // Set mass splitting // Reset off-diagonal elements // Rotate j neutrinos // Tag as built