  We examine the potential for gamma-ray conversion to electron-positron pairs,
either in the field of a nucleus or of an electron of a detector, to measure
the fraction P of linear polarization of cosmic gamma sources. For this purpose
we implement, validate and use an event generator based on the HELAS amplitude
calculator and on the SPRING event generator.
  We characterize several ways to measure P. Past proposals to increase the
polarization sensitivity by the selection of a fraction of the events in a
subset of the available phase space are found to be inefficient, due to the
loss in statistics. The use of an optimal variable that includes the full 5D
probability density function is found to improve the precision of the
measurement of P of a factor of approximately 2.
  We then study the dilution of the asymmetry that parametrize the degradation
of the precision due to experimental effects such as multiple scattering. In a
detector made with a succession of converter slabs and tracker foils, the
dependance of the dilution is found to be different from that predicted
assuming a given (the most probable) value of the pair opening angle. The
limitations of a slab detector are avoided by the use of an active target, in
which conversion and tracking are performed by the same device, in which case
the dilution of the measurement of P is found to be manageable. Based on a
realistic sizing of the detector, and for an effective exposure of 1 year, we
estimate the precision for a Crab-like source on the full energy range to be
approximately 1.4 %.
