Electromagnetic characterization of the crystal primary collimators for the HL-LHC