Causal Effect Identification in Acyclic Directed Mixed Graphs and Gated Models