here's some from Writer Sag

Energy cannot be destroyed, just channelled or converted. Ergo, what happens when energy, objects, and life forms decay? The energy is transformed into ectoplasm.

When a person or animal dies, a primal, instinctive part of their soul rejects their death. Those who reject the most fiercly release an aura that ectoplasm attaches and changes into a ghost. Ghosts are obsessive, instinctive, and chaotic because that's all they are; whether they are chaotic good or bad is up to them.

Danny and Vlad were able to survive and become halfas because they were injected with ectoplasm directly into them before their deaths, and then followed the normal procedure to become a ghost. Danny and Vlad only experienced a "clinical" death instead of a full death resulting in them becoming a human and a ghost. Since becoming a ghost is rare, halfas are not easily to replicate even under the same procedure.