RIS-Aided Near-Field Localization and Channel Estimation for the Terahertz System | Synapse