Study of magnetic field effects in drift tubes for the barrel muon chambers of the CMS detector at the LHC