Detecting each of up to 16 different things

GoForSmoke:
I don't know these guys but it looks like a ready hardware part of the solution:
IR Reflective Sensor 5mm - 1102_0 - Phidgets

OTOH, knowing that black and white reflect differently you can try making your own sensor and yes, tape a bar code under each car.

Consider using white stripes (more reflective) for data and black stripes as reference widths. A zero would be a narrow white stripe and a one would be 3x as wide a white strip. The black stripes would all be narrow. You would be reading perhaps 10,000x a second, keep count of how many reads the last black stripe was and if the next white strip is less than 1.5x as many then it's a zero bit but if 2.5x or more then it's a one bit.
Then start your data sector with an attention section of 8 narrow b/w stripes followed by a wide black stripe, the next white stripe begins your data.

The boffo setup would read the same no matter which direction the train is going, attention section at both ends and each car's ID being symmetric. You could get away with 2 number / 4 white stripe codes that would read 0000 0000, 0001 1000, 0010 0100, etc.

I was thinking of making my own detector by mounting the IR LED and IR detector in 5mm ID brass tubes with the tops of the tubes level with the track bed and the LED and detector some way down the tubes (think optical rangefinder). That way, I can make the detector more sensitive and focused on a narrow area.

I wouldn't use tape to stick the B&W labels, as tape is reflective. Better to use glue of some sort.

I was thinking of some sort of lead-in (attention strip as you call it) but didn't know how to implement it.

And yes, I was thinking of making the labels symetrical, given enough space. Remembering that the old British 4 wheel wagons were much shorter than the US bogie types.

Thanks for your reply. It's given me food for thought and an avenue to explore.