Effective g-factor tensor for carriers in IV-VI semiconductor quantum wells