CIM has the concept of a types (GRID Constant) of tracks and variation for tracks. The type defines roughly how the thing is handled by building. (Generally the opposite, the build cursor selects the right types and variation). The track builder selects the object by the connection map. However you can only build one piece of tram track into a street. How the collision is handled I asked with some question in the "Question to the Devs" topic but haven't seen a real answer yet. The track builder tries to connect variants.
Examples: My underground tram tracks are variations of underground metro tracks modified to be handled as tram paths.
Monorail, overground metro, modified to be tram tracks, Vehicles are trams. All tram vehicles get an invalid -1 type, Monorail vehicles get tram type.
Trolley bus USA, different tram track objects loaded. (the avenue ones are commented out). Same type changing while starting.
There are two ways:
Simple load the tracks without variation, means the actually replace trams. (The object names are the same too)
Load the the tracks with variation X, both variants can be (theoretical) build on the same map by simply loading the objects.*
A path (where a vehicle travels) can only be road/tram/railroad and is bound to the object type. However GSystem allows to convert any type to a tram path. (it's possible since a patch, so tokyo dlc works)
* I would prefer this variant for a DLC as the different tram tracks can be build on the same map, without changing object names. However as soon as you connect tram and trolley tracks, a line will use both to get to the destination. (Still better then having certain new tranport typs only in DLC maps.