Proton radiography is a widely used method to diagnose the electromagnetic field of plasma. When protons pass through the electromagnetic field of plasma, they are deflected by Lorentz force and redistributed on the recorder. How to reconstruct electromagnetic field from the experimental result is an open problem. In this paper, we take the laser-driven capacitor-coil target for example to introduce and compare particle tracing and flux analysis, which are two widely used methods in proton radiography experiment to reconstruct the magnetic field. The capacitor-coil target is an important method to generate strong magnetic field in laser plasma experiment, where the strong current flows in the coil and its producing magnetic field may be larger than kilotesla. Firstly, the theoretical magnetic fields of capacitor-coil target are calculated with current being 10 kA and 50 kA. Secondly, the Geant4 is used to simulate the proton radiographs, where protons with 7.5 MeV pass through the target and the theoretical magnetic field is recorded. Thirdly, the theoretical proton radiographs are analyzed by the flux analysis method, and two magnetic fields are reconstructed. Finally, the theoretical magnetic fields are compared with the reconstructed ones, and the advantages and disadvantages of these two methods are analyzed. Particle tracing rebuilds the geometry distribution of proton source, plasma magnetic field and recorder in experiment, and it needs few assumptions. However, it strongly relies on accurate calculation of theoretical magnetic field and proton trajectory, and it requires to change the magnetic field over and over to achieve a closest result to the experimental proton radiograph. Meanwhile, particle tracing method consumes a lot of computation sources. The flux analysis directly reconstructs the magnetic field from experimental proton radiograph. However, it is only applicable to the case of weak magnetic field, and the error becomes larger for the case of stronger magnetic field. A dimensionless parameter
μis used to estimate the deflection of proton in the magnetic field, which measures the amount of deflection per unit length in the interaction region. The flux analysis method is applicable to the
$\mu\ll 1$
regime. Additionally, the target may absorb the proton when the energy of proton is low and produces shadow on the proton radiograph, which leads to some difference between the original magnetic field and the reconstructed result.