function S = PsiT(K,m,n,T) S = 0; for t=1:T S = S + sum(K.*(K>0)); K = getK1(K,m,n-t+1); end return