In this paper, we discuss the measurement of charge collection in irradiated silicon pixel sensors and the comparison with a detailed simulation. The simulation implements a model of radiation damage by including two defect levels with opposite charge states and trapping of charge carriers. The modeling proves that a doubly peaked electric field generated by the two defect levels is necessary to describe the data and excludes a description based on acceptor defects uniformly distributed across the sensor bulk. In addition, the dependence of trap concentrations upon fluence is established by comparing the measured and simulated profiles at several fluences and bias voltages. r