PMNS_Base.cxx
//......................................................................
///
/// Rotate the neutrino state by the angle theta_ij and phase delta_ij.
///
/// @param i,j - the indices of the rotation ij
///
Rotate the neutrino state by the angle theta_ij and phase delta_ij.
Rotate the neutrino state by the angle theta_ij and phase delta_ij .
void PMNS_Base::RotateState(int i, int j){
  if(fTheta[i][j]==0) return;
  double sij = sin(fTheta[i][j]);
  double cij = cos(fTheta[i][j]);
  complexD buffer;
  if(i+1==j || fDelta[i][j]==0){
    buffer      = cij*fNuState[i] + sij*fNuState[j];
    fNuState[j] = cij*fNuState[j] - sij*fNuState[i];
  }
  else {
    complexD eij = complexD(cos(fDelta[i][j]), -sin(fDelta[i][j]));
    buffer      = cij*fNuState[i] + sij*eij*fNuState[j];
    fNuState[j] = cij*fNuState[j] - sij*conj(eij)*fNuState[i];
  }
  fNuState[i] = buffer;
}
void PMNS_Base :: RotateState ( int i , int j ) { if ( fTheta [ i ] [ j ] == 0 ) return ; double sij = sin ( fTheta [ i ] [ j ] ) ; double cij = cos ( fTheta [ i ] [ j ] ) ; complexD buffer ; if ( i + 1 == j || fDelta [ i ] [ j ] == 0 ) { buffer = cij * fNuState [ i ] + sij * fNuState [ j ] ; fNuState [ j ] = cij * fNuState [ j ] - sij * fNuState [ i ] ; } else { complexD eij = complexD ( cos ( fDelta [ i ] [ j ] ) , - sin ( fDelta [ i ] [ j ] ) ) ; buffer = cij * fNuState [ i ] + sij * eij * fNuState [ j ] ; fNuState [ j ] = cij * fNuState [ j ] - sij * conj ( eij ) * fNuState [ i ] ; } fNuState [ i ] = buffer ; }
......................................................................
Rotate the neutrino state by the angle theta_ij and phase delta_ij.
...................................................................... Rotate the neutrino state by the angle theta_ij and phase delta_ij .
// Do nothing if angle is zero