If there is an option to "plead down" to a lesser charge, do it. If not, pay the ticket and thank God you were not in the path of an oncoming train.
The "I had no choice" claim is not true. Unless the car behind you physically pushed you onto the train tracks (in which case they would have been ticketed, or even arrested, by the observing officer), you had a choice not to move onto the tracks.
Take your punishment like a man. If you are a moral person, do the right thing: admit your guilt and pay your fine.
“When all Americans are treated as equal, no matter who they are or whom they love, we are all more free.” -Pres. Obama
"A great democracy does not make it harder to vote than to buy an assault weapon." -Pres. Clinton