01 -  Preheat oven to 350°F (175°C) and line a 12-cup muffin tin with paper liners. 
 02 -  Whisk flour, baking soda, baking powder, cinnamon, nutmeg, ginger, and salt together in a medium bowl. 
 03 -  In a large bowl, beat together granulated sugar, brown sugar, root beer, vegetable oil, eggs, pumpkin purée, and vanilla extract, ensuring the mixture is smooth. 
 04 -  Gradually fold the dry ingredients into the wet ingredients, mixing just until combined. Do not overmix. 
 05 -  Divide the batter evenly among cupcake liners, filling each about two-thirds full. 
 06 -  Bake for 20 to 22 minutes, or until a toothpick inserted in the center emerges clean. 
 07 -  Allow cupcakes to cool in the pan for 5 minutes, then transfer to a wire rack to cool fully. 
 08 -  Beat softened cream cheese and butter until creamy. Gradually add powdered sugar, mixing until smooth. Blend in vanilla and 1 tablespoon root beer, adding additional root beer as needed for flavor and consistency. 
 09 -  Frost cooled cupcakes using a piping bag or spatula. Optionally garnish with root beer candies or a sprinkle of cinnamon.