Baryon pasting algorithm: halo-based and particle-based pasting methods | Synapse