An undercover police operation zeroing in on a Chelmsford man with a criminal history and several active warrants culminated in his arrest for drug trafficking and firearm offenses.