We determine the fraction of events with double parton (DP) scattering in a single ppbar collision at sqrt{s}=1.96 TeV in samples of photon + 3 jet and photon + b/c jet + 2 jet events collected with the D0 detector and corresponding to an integrated luminosity of about 8.7 fb^{-1}. The DP fractions and effective cross sections (sigma_eff) are measured for both event samples using the same kinematic selections. The measured DP fractions range from 0.21 to 0.17, with effective cross sections in the photon + 3 jet and photon + b/c jet + 2 jet samples of sigma_eff^incl = 12.7 +- 0.2 (stat) +- 1.3 (syst) mb and sigma_eff^HF = 14.6 +- 0.6 (stat) +- 3.2 (syst) mb, respectively.