Cparams matrix and ApplyDetector final version