An operational definition of quark and gluon jets