Fill a large dutch oven with the presoaked beans, and 10 cups of water. Place the dutch oven over medium heat and bring to a boil. Reduce the heat to low, cover and let the beans simmer for two hours.
When the beans have simmered for two hours, turn off the heat and remove the lid.
Add the chorizo to a saute pan over medium high heat. Crumble chorizo in the pan while it cooks down and gets slightly crispy. Using a slotted spoon, remove the chorizo from the pan and set aside.
Add the onion and jalapeno to the pan. Move them around the pan and cook for three minutes till they start to soften, then add the garlic and cook for another 30 seconds, moving it around constantly.
Add the spices, sugar, diced tomatoes and optional ham to the pan and mix together. Cook for five minutes, the remove from heat.
Drain the beans of all but two cups of the water. Add the ingredients from the saute pan to the dutch oven, along with the beer. Place over medium heat for 30 minutes or until the beans are tender. Adjust salt as required.
Serve the beans topped with chopped cilantro and cotija cheese.