(I don't know if you originally wrote this comment, but since you're already adjusting this code you can change the comment too)

getFacedObject is an expensive raycast and should not be adapted. All you need here is to compare the actor's facing orientation with the vector from the actor to the door. Calculate an angle from that and if that angle is small enough, the actor is facing this door.
You can find some example code in mwmechanics/combat.hpp, which checks if an attacker is behind another actor's back. Pretty similar.