It is illegal to smoke marijuana while driving, so if you were smoking marijuana, it was an appropriate and legal ticket. Whether or not you were actually smoking marijuana or your hand-rolled organic cigarrettes is a factual issue that you can try to address at trial, if you pled not guilty: the state (i.e. the government) would have to prove (by convincing testimony of the ticketing officer, who would have to establish his experience or expertise or training in determining if marijuana is in use) that you were smoking marijuana, and you could present your evidence or testimony to the contrary, with the court then deciding whether you were or were not.