I assumed you were talking about Dispatcher events. D20 signals are basically a category of those. S_Spell_Cast is called inside the perform function of D20A_CAST_SPELL (d20.cpp, line 2808). It comes after the spell has been successfully registered and target list compiled, but before the action frame callback and the python begin_spell script. It's sent to caster and spell targets.