Prior to Prop 47, the state made a decision allow those with qualifying offenses and backgrounds to serve state prison terms in county jail facilities. Penal Code Section 1170(h).
Persons ineligible to serve their terms in county jail have prior/current serious or violent felony convictions, if the defendant has been required to register as a sex offender under Penal Code Section 290, or in the rare case the defendant has a gang related enhancement to a theft crime. Also, if a statute requires serving custody time in state prison a defendant would also be unavailable to serve his or term in county jail. And as always, there are exceptions to exceptions.
I will help you through this process. Together we will work to devise an outcome that makes sense to you. No cases are built alike, however, but rest assured that you will understand everything you are facing.