Rename gain to effective_gain