Correction of CDetectorTest. Not final yet.

Many errors corrected. Not final release yet.