Arecibo Pulsar Survey Using Alfa. Iv. Mock Spectrometer Data Analysis, Survey Sensitivity, and the Discovery of 40 Pulsars | Synapse