Q:

Single photon polarization measurement setup

I am studying experiments testing local realism through the violation of Bell's inequality. In particular, I am trying to understand the setup of the so called loophole-free experiment carried out in 2015 (Ref: M. Giustina et al., Phys. Rev. Lett. 115, 250401 (2015)).
I'll go directly to my problem. Two entangled photons are emitted from a source and are delivered to two measuring stations, where a measurement of polarization takes place. Studying the inequality and the experiment, I imagined the measurement as something like this:

The photon arrives at the polarizer and it can pass, or not, with a probability deending on its polarization state and predictable with quantum mechanics. The detector is there only to count the times the photon passes the polarizer. This is clearly an idealization and must be translated in a true experimental setup.
Now, in the cited article, the proposed setup looks like this:

The photon first meets an half-wave plate, so its polarization is rotated of 90°. Then, an electro optical modulator which is used to choose the direction of polarization measurement. Finally, a polarized beam splitter, in which one of the two output channels is closed, while in the other a detector waits.
What I think to have understood until now is this: in a setup like the first picture, the polarizer's orientation is changed when choosing a specific measurement, while the approaching photon polarization is fixed. In the second picture, instead, the polarization of the photon is modified through the EOM, while the PBS is clearly fixed. The two methods should give the same results. 
Now my questions: did I understand the functioning of the setup correctly? And if it is so, what is the function of the HWP (Half-wave plate)? 
Furthermore, there is one more complication. In the other measuring station, the other entangled photon faces the same setup, also its polarization is changed, but of a different angle. How can entanglement be preserved in this way?

A:

You've understood the configuration correctly. Both setups are basically optically equivalent, with two core changes:

Using a polarizing beam splitter instead of a linear polarizer allows you to do a projective measurement on both polarization outcomes instead of discarding one of the two.
More importantly, the second configuration allows you to choose which angle you want to measure by re-tuning the voltages on the electro-optical modulator, instead of by mechanically moving a polarizer. In loophole-free Bell-inequality measurements, time is of the essence (as you need to pull off the entire protocol in spacelike-separated events) and mechanical changes are just too slow. Instead, you use the HWP-plus-EOM combination, which is much faster.

As for this,

In the other measuring station, the other entangled photon faces the same setup, also its polarization is changed, but of a different angle. How can entanglement be preserved in this way?

that's not a a concern. Local unitaries do not destroy entanglement, so long as they are strictly controlled and you know exactly what their effect is. They will change which precise entangled state you have, but they will not reduce the amount of entanglement.

