Is there a better way to rewrite this ugly switch and if statement combination?
I think you can move nearly everything into a simple table and get away with a single table lookup. I haven't studied your conditions in detail, but it looks like something like this will do the job just fine:
// fill the following table in advance using your existing function, or hard-code the
// values if you know they will never change:
ScatterType hitTable[60][60];
ScatterType EventBuffer::checkDoubleHit(int det)
{
// read the crystal Nums once:
unsigned a = evList[cryList[0]].crystalNum;
unsigned b = evList[cryList[1]].crystalNum;
switch(det)
{
case 10:
case 11:
case 13:
case 14:
// better safe than sorry:
assert (a < 60);
assert (b < 60);
return hitTable[a][b];
break;
default:
throw string("made it to default case in checkDoubleHit switch statement, something is wrong");
break;
}
}