Affiliated Institution
How you would respond to towards the question, answers there are so many factors that influence whether a criminal transgression will be tried by the state or federally, and it can get somewhat confusing. I hope everyone reads your post because you were able to put it in a way that anyone could understand it - I tried, but I was all over the place in my attempt.
There are many reasons as to why a criminal case can be tried in a federal court and not a state court; one of the main reasons is the magnitude of the crime. This is because the courts are constitutionally given a particular jurisdiction when it comes to trying cases. For instance a criminal case involves embezzlement of tax payers money in millions and billions of dollars is tried by the federal court because the state court does not have the jurisdiction to deal with it.
A criminal case that also involves murder of a civil servant is also tried in a federal court regardless of whether it was tried in a state court. This means that any crime against the government is tried by the federal court. Small crimes that require small sentences are within the jurisdiction of the state courts.
An election petition most of the time is also dealt with at the federal court because the state courts lack the jurisdiction to declare an election as not fair. This is because the federal court is the only court mandated with the power to declare whether an election into a public office was fairly won and contested or not. The court has the power to declare a rerun but only under special circumstances clearly stated in the constitution.