Currently, the Structure Tree (structree) doesn't take into account any of the civbonus/penalties or the unit promotion techs when calculating the values it displays.
As the civbonuses/penalties and unit promotion techs are in-place from game-start and do not require a player to research them, the effects should be taken into account.
To minimise unnecessary repetition, code from the in-game TechnologyManager component has been relocated into globalscripts and adapted so that both the simulation and the structree can use it.
Originally reported on trac, #3747 and #3801.