Transport model calculations of deuteron production in relativistic hadron and heavy‐ion collisions