Quantum soft filtering for the improved security analysis of the coherent one-way quantum-key-distribution protocol