You will need to discuss the full facts with a lawyer. There is no way we can analyze your situation based upon such a skeletal, incomplete set of facts.

You are actually identifying two separate incidents -- whatever it was that led to your arrest and pretrial incarceration (odds are there's no case, but the details matter) and your being "roughed up" for no reason after your release (if you can substantiate that, it's a possible case).