Yes and no. Of course there are no raycasts, except to determine distance to the ground and to simulate ground clutter. But the DCS radar does simulate many workings of a real one.
For RWS and TWS, the DCS radar simulates an antenna search cone, which is quite narrow. In simple terms, the radar does "know" where all the other aircrafts are in relation to your own. But the radar algorithms filter out those who are not in the antenna search cone and keep in memory those who are not "seen" but were detected a few seconds ago.
All DCS aircraft also have parameters like RCS and then there are other algorithms to simulate notching and jamming. Factors that are used by the radar filtering algorithms in determining if the aircraft can be "seen". Terrain in the radar search cone is also interrogated in order to check if the angles in relation to the radar beam can create a "mask".
For STT, the DCS radar behaves differently. It no longer simulates antenna movement, which is why the bug does not affect it. It creates a search cone that is as big as the radar antenna mechanical limits allow. Of course, it clears all contacts except for the locked one, so it will be tracked for as long as it remains within the search cone. All other filtering parameters still work of course.