Cortical and thalamic contributions to response dynamics across layers of the primary somatosensory cortex during tactile discrimination.