Sádde merkoša šleađgaboasttain: W ± -boson production in p–Pb collisions at s NN $$ \sqrt{s_{\textrm{NN}}} $$ = 8.16 TeV and Pb–Pb collisions at s NN $$ \sqrt{s_{\textrm{NN}}} $$ = 5.02 TeV