We obtain a family of polynomials defined by vanishing conditions and associated to tangles. We study more specifically the case where they are related to a O(n) loop model. We conjecture that their specializations at z i = 1 are positive in n. At n = 1, they coincide with the the Razumov-Stroganov integers counting alternating sign matrices.We derive the CFT modular invariant partition functions labelled by CoxeterDynkin diagrams using the representation theory of the affine Hecke algebras.