Brain death occurs when there is irreversible cessation of all functions of the entire brain, including the brain stem. It can be caused by conditions that lead to loss of oxygen to the brain like cerebral anoxia, hemorrhage or trauma. Diagnosing brain death involves assessing for the absence of brain stem reflexes and response to stimuli, as well as a positive apnea test where the patient fails to breathe independently with high carbon dioxide levels. Ancillary tests like EEG, angiography or PET scans may be used to confirm the diagnosis when clinical assessment is limited.