Cloudy & Associates

Commit bc057f9d authored by Marios Chatzikos's avatar Marios Chatzikos
Browse files

Use enum for doublets etc instead of literals

Bare numbers are used for multiplets in CSresolver and get_iso_statw.
Use of enums (ipDOUBLET, etc), instead, lends to more readable code.
parent 644a6799
......@@ -2540,17 +2540,18 @@ double CSresolver(long ipISO, long nHi,long lHi,long sHi,long nLo,
if (ipISO==ipH_LIKE)
{
S *= 4;
ASSERT( sLo == ipDOUBLET );
S *= pow2( ipDOUBLET );
}
else if(ipISO==ipHE_LIKE)
{
if( nLo == 1 )
{
ASSERT( sLo == ipSINGLET );
S *= sLo*sLo;
S *= pow2( ipSINGLET );
}
else
S *= 10; //(1*1 + 3*3)
S *= pow2( ipSINGLET ) + pow2( ipTRIPLET );
}
......
......@@ -19,7 +19,9 @@
inline double get_iso_statw( const long ipISO, const long n )
{
if( ipISO == ipH_LIKE )
return 2.*double( pow2(n) );
{
return ipDOUBLET * double( pow2(n) );
}
else if( ipISO == ipHE_LIKE )
{
if( n == 1 )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment