The rapid detection of sensory inputs is crucial for survival. Sensory detection explicitly requires the integration of incoming sensory information and the ability to distinguish between relevant information and ongoing neural activity. In this study, head-fixed rats were trained to detect the presence of a brief deflection of their whiskers resulting from a focused puff of air. The animals showed a monotonic increase in response probability and a decrease in reaction time with increased stimulus strength. High-speed video analysis of whisker motion revealed that animals were more likely to detect the stimulus during periods of reduced self-induced motion of the whiskers, thereby allowing the stimulus-induced whisker motion to exceed the ongoing noise. In parallel, we used voltage sensitive dye (VSD) imaging of barrel cortex in anesthetized rats receiving the same stimulus set as those in the behavioral portion of this study to assess candidate codes that make use of the full spatiotemporal representation and to compare variability in the trial-by-trial nature of the cortical response and the corresponding variability in the behavioral response. By application of an accumulating evidence framework to the population cortical activity measured in separate animals, a strong correspondence was made between the behavioral output and the neural signaling, in terms of both the response probabilities and the reaction times. Taken together, the results here provide evidence for detection performance that is strongly reliant on the relative strength of signal versus noise, with strong correspondence between behavior and parallel electrophysiological findings