Two-cocycle and transformation law of the current