Cosmic ray
Cosmic rays are energetic particles originating from space that impinge on Earth's atmosphere.  Almost 90% of all the incoming cosmic ray particles are protons, about 9% are helium nuclei (alpha particles) and about 1% are electrons (beta minus particles).  The term "ray" is a misnomer, as cosmic particles arrive individually, not in the form of a ray or beam of particles.
The variety of particle energies reflects the wide variety of sources. The origins of these particles range from energetic processes on the Sun all the way to as yet unknown events in the farthest reaches of the visible universe. Cosmic rays can have energies of over 1020 eV, far higher than the 1012 to 1013 eV that man-made particle accelerators can produce.  (See Ultra-high-energy cosmic rays for a description of the detection of a single particle with an energy of about 50 J, the same as a well-hit tennis ball at 42 m/s .) There has been interest in investigating cosmic rays of even greater energies.

# Cosmic ray sources
Most cosmic rays originate from extrasolar sources within our own galaxy such as rotating neutron stars, supernovae, and black holes. However, the fact that some cosmic rays have extremely high energies provides evidence that at least some must be of extra-galactic origin (e.g. radio galaxies and quasars); the local galactic magnetic field would not be able to contain particles with such a high energy. The origin of cosmic rays with energies up to 1014 eV can be accounted for in terms of shock-wave acceleration in supernova shells. The origin of cosmic rays with energy greater than 1014 eV remained unknown until recently, when a large collaborative experiment at the Pierre Auger Observatory appears to have answered this question.  In preliminary results announced in November 2007, they showed a strong correlation between their 27 most energetic events and active galactic nuclei .  These results demonstrated that there is only a small chance (less than 1/100) that the highest energy protons originated from outside the AGN.
Observations have shown that cosmic rays with an energy above 10 GeV (10 x 109 eV) approach the Earths surface isotropically (equally from all directions); it has been hypothesized that this is not due to an even distribution of cosmic ray sources, but instead is due to galactic magnetic fields causing cosmic rays to travel in spiral paths. This limits cosmic rays usefulness in positional astronomy as they carry no information of their direction of origin. At energies below 10 GeV there is a directional dependence, due to the interaction of the charged component of the cosmic rays with the Earth's magnetic field.

## Solar cosmic rays
Solar cosmic rays or solar energetic particles (SEP) are cosmic rays that originate from the Sun. The average composition is similar to that of the Sun itself. There exists no clear and sharp boundary between the phase spaces of the solar wind and SEP plasma particle populations.
The name solar cosmic ray itself is a misnomer because the term cosmic implies that the rays are from the cosmos and not the solar system, but it has stuck. The misnomer arose because there is continuity in the energy spectra, i.e., the flux of particles as a function of their energy, because the low-energy solar cosmic rays fade more or less smoothly into the galactic ones as one looks at increasingly higher energies. Until the mid-1960s the energy distributions were generally averaged over long time intervals, which also obscured the difference. Later, it was found that the solar cosmic rays vary widely in their intensity and spectrum, increasing in strength after some solar events such as solar flares. Further, an increase in the intensity of solar cosmic rays is followed by a decrease in all other cosmic rays, called the Forbush decrease after their discoverer, the physicist Scott Forbush. These decreases are due to the solar wind with its entrained magnetic field sweeping some of the galactic cosmic rays outwards, away from the Sun and Earth. The overall or average rate of Forbush decreases tends to follow the 11-year sunspot cycle, but individual events are tied to events on the Sun, as explained above.
There are further differences between cosmic rays of solar and galactic origin, mainly in that the galactic cosmic rays show an enhancement of heavy elements such as calcium, iron and gallium, as well as of cosmically rare light elements such as lithium and beryllium. The latter result from the cosmic ray spallation (fragmentation) of heavy nuclei due to collisions in transit from the distant sources to the solar system.

## Galactic cosmic rays
See Galactic cosmic ray.

## Extragalactic cosmic rays
See Extragalactic cosmic ray.

## Ultra-high-energy cosmic rays
See Ultra-high-energy cosmic ray.

## Anomalous cosmic rays
Anomalous cosmic rays (ACRs) are cosmic rays with unexpectedly low energies. They are thought to be created near the edge of our solar system, in the heliosheath, the border region between the heliosphere and the interstellar medium. When electrically neutral atoms are able to enter the heliosheath (being unaffected by its magnetic fields) subsequently become ionized, they are thought to be accelerated into low-energy cosmic rays by the solar wind's termination shock which marks the inner edge of the heliosheath. It is also possible that high energy galactic cosmic rays which hit the shock front of the solar wind near the heliopause might be decelerated, resulting in their transformation into lower-energy anomalous cosmic rays.
The Voyager 1 space probe crossed the termination shock on December 16, 2004, according to papers published in the journal Science. Readings showed particle acceleration, but not of the kind that generates ACRs. It is unclear at this stage (September 2005) if this is typical of the termination shock (requiring a major rethink of the origin of ACRs), or a localised feature of that part of the termination shock that Voyager 1 passed through. Voyager 2 is expected to cross the termination shock during or after 2008, which will provide more data.

# Composition
Cosmic rays may broadly be divided into two categories, primary and secondary. 
The cosmic rays that arise in extrasolar astrophysical sources are primary cosmic rays; these primary cosmic rays can interact with interstellar matter to create secondary cosmic rays. The sun also emits low energy cosmic rays associated with solar flares. The exact composition of primary cosmic rays, outside the Earth's atmosphere, is dependent on which part of the energy spectrum is observed. However, in general, almost 90% of all the incoming cosmic rays are protons, about 9% are helium nuclei (alpha particles) and about 1% are electrons. The remaining fraction is made up of the other heavier nuclei which are abundant end products of stars nuclear synthesis. Secondary cosmic rays consist of the other nuclei which are not abundant nuclear synthesis end products, or products of the Big Bang, primarily lithium, beryllium and boron. These light nuclei appear in cosmic rays in much greater abundance (about 1:100 particles) than in solar atmospheres, where their abundance is about 10-7 that of helium.
This abundance difference is a result of the way secondary cosmic rays are formed. When the heavy nuclei components of primary cosmic rays, namely the carbon and oxygen nuclei, collide with interstellar matter, they break up into lighter nuclei (in a process termed cosmic ray spallation), into lithium, beryllium and boron. It is found that the energy spectra of Li, Be and B falls off somewhat steeper than that of carbon or oxygen, indicating that less cosmic ray spallation occurs for the higher energy nuclei presumably due to their escape from the galactic magnetic field. Spallation is also responsible for the abundances of Sc, Ti, V and Mn elements in cosmic rays, which are produced by collisions of Fe and Ni nuclei with interstellar matter; see Environmental radioactivity#Naturals.
In the past, it was believed that the cosmic ray flux has remained fairly constant over time. Recent research has, however, produced evidence for 1.5 to 2-fold millennium-timescale changes in the cosmic ray flux in the past forty thousand years.

# Modulation
The flux (flow rate) of cosmic rays incident on the Earths upper atmosphere is modulated (varied) by two processes; the suns solar wind and the Earth's magnetic field. Solar wind is expanding magnetized plasma generated by the sun, which has the effect of decelerating the incoming particles as well as partially excluding some of the particles with energies below about 1 GeV. The amount of solar wind is not constant due to changes in solar activity over its regular eleven-year cycle. Hence the level of modulation varies in autocorrelation with solar activity. Also the Earth's magnetic field deflects some of the cosmic rays, which is confirmed by the fact that the intensity of cosmic radiation is dependent on latitude, longitude and azimuth. The cosmic flux varies from eastern and western directions due to the polarity of the Earths geomagnetic field and the positive charge dominance in primary cosmic rays; this is termed the east-west effect. The cosmic ray intensity at the equator is lower than at the poles as the geomagnetic cutoff value  is greatest at the equator. This can be understood by the fact that charged particle tend to move in the direction of field lines and not across them. This is the reason the Aurorae occur at the poles, since the field lines curve down towards the Earths surface there. Finally, the longitude dependence arises from the fact that the geomagnetic dipole axis is not parallel to the Earths rotation axis.
This modulation which describes the change in the interstellar intensities of cosmic rays as they propagate in the heliosphere is highly energy and spatial dependent, and it is described by the Parker's Transport Equation in the heliosphere. At large radial distances, far from the Sun ~ 94 AU, there exists the region where the solar wind undergoes a transition from supersonic to subsonic speeds called the solar wind termination shock. The region between the termination shock and the heliospause (the boundary marking the end of the heliosphere) is called the heliosheath. This region acts as a barrier to cosmic rays and it decreases their intensities at lower energies by about 90% indicating that it is not only the Earth's magnetic field that protect us from cosmic ray bombardment. For more on this topic and how the barrier effects occur the agile reader is referred to Mabedle Donald Ngobeni and Marius Potgieter (2007), and Mabedle Donald Ngobeni (2006).
From modelling point of view, there is a challenge in determining the Local Interstellar spectra (LIS) due to large adiabatic energy changes these particles experience owing to the diverging solar wind in the heliosphere. However, significant progress has been made in the field of cosmic ray studies with the development of an improved state-of-the-art 2D numerical model that includes the simulation of the solar wind termination shock, drifts and the heliosheath coupled with fresh descriptions of the diffusion tensor, see Langner et al. (2004). But challenges also exist because the structure of the solar wind and the turbulent magnetic field in the heliosheath is not well understood indicating the heliosheath as the region unknown beyond. With lack of knowledge of the diffusion coefficient perpendicular to the magnetic field our knowledge of the heliosphere and from the modelling point of view is far from complete. There exist promising theories like ab initio approaches, but the drawback is that such theories produce poor compatibility with observations (Minnie, 2006) indicating their failure in describing the mechanisms influencing the cosmic rays in the heliosphere.

# Detection
The nuclei that make up cosmic rays are able to travel from their distant sources to the Earth because of the low density of matter in space.  Nuclei interact strongly with other matter, so when the cosmic rays approach Earth they begin to collide with the nuclei of atmospheric gases.  These collisions, in a process known as a shower, result in the production of many pions and kaons, unstable mesons which quickly decay into muons.  Because muons do not interact strongly with the atmosphere and because of the relativistic effect of time dilation many of these muons are able to reach the surface of the Earth.  Muons are ionizing radiation, and may easily be detected by many types of particle detectors such as bubble chambers or scintillation detectors.  If several muons are observed by separated detectors at the same instant it is clear that they must have been produced in the same shower event.

## Detection by particle track-etch technique
Cosmic rays can also be detected directly when they pass through particle detectors flown aboard satellites or in high altitude balloons.  In a pioneering technique developed by P. Buford Price et al., sheets of clear plastic such as 1/4 mil Lexan polycarbonate can be stacked together and exposed directly to cosmic rays in space or high altitude.  When returned to the laboratory, the plastic sheets are "etched"  in warm caustic sodium hydroxide solution, which slowly removes the surface material at a slow, known rate.  Wherever a bare cosmic ray nucleus passes through the detector, the nuclear charge causes chemical bond breaking in the plastic.  The slower the particle, the more extensive is the bond-breaking along the path; and the higher the charge , the more extensive is the bond-breaking along the path.  The caustic sodium hydroxide dissolves at a faster rate along the path of the damage, but thereafter dissolves at the slower base-rate along the surface of the minute hole that was drilled.  The net result is a conical shaped pit in the plastic; typically with two pits per sheet .  The etch pits can be measured under a high power microscope , and the etch rate plotted as a function of the depth in the stack of plastic.  At the top of the stack, the ionization damage is less due to the higher speed.  As the speed decreases due to deceleration in the stack, the ionization damage increases along the path.  This generates a unique curve for each atomic nucleus of Z from 1 to 92, allowing identification of both the charge and energy  of the particle that traverses the stack.  This technique has been used with great success for detecting not only cosmic rays, but fission product nuclei for neutron detectors.

## Interaction with the Earth's atmosphere
When cosmic ray particles enter the Earth's atmosphere they collide with molecules, mainly oxygen and nitrogen, to produce a cascade of lighter particles, a so-called air shower. The general idea is shown in the figure which shows a cosmic ray shower produced by a high energy proton of cosmic ray origin striking an atmospheric molecule.
File:Atmospheric Collision.svg
This image is a simplified picture of an air shower: in reality, the number of particles created in an air shower event can reach in the billions, depending on the energy and chemical environment (i.e. atmospheric) of the primary particle. All of the produced particles stay within about one degree of the primary particle's path. Typical particles produced in such collisions are charged mesons (e.g. positive and negative pions and kaons); one common collision is:
p + \mathrm{O}^{16} \rightarrow n + \pi
Cosmic rays are also responsible for the continuous production of a number of unstable isotopes in the Earths atmosphere, such as carbon-14, via the reaction:
n + \mathrm{N}^{14} \rightarrow p + \mathrm{C}^{14}
Cosmic rays kept the level of carbon-14 in the atmosphere roughly constant (70 tons) for at least the past 100,000 years, until the beginning of aboveground nuclear weapons testing in the early 1950s. This is an important fact used in radiocarbon dating which is used in archaeology.

# Unusual cosmic rays
In 1975, a team of researchers headed by P. Buford Price at U.C. Berkeley announced the discovery of a cosmic ray track in a particle detector slung under a high-altitude balloon that was significantly different from all others ever measured.  Using the particle track-etch method pioneered by Price, et al., they discovered the track of a particle that had passed through 32 sheets of 1/4 mil Lexan plastic without any measurable change in ionization.  Yet, the Cerenkov detector admitted only of particles less than 2/3 c .  The charge was measured as being 137, the same as predicted by Paul Dirac who first predicted the theoretical existence of magnetic monopoles. The particle track preliminarily identified as having been caused by a magnetic monopole had been spotted by technical assistant Walter L. Wagner.
A possible alternative explanation was offered by Alvarez. In his paper it was demonstrated that the path of the cosmic ray event that was claimed to be due to a magnetic monopole could be reproduced by a path followed by a platinum nucleus fragmenting to osmium and then to tantalum.

# Research and experiments
There are a number of cosmic ray research initiatives.  These include, but are not limited to:
- CHICOS
- PAMELA
- Alpha Magnetic Spectrometer
- MARIACHI
- Pierre Auger Observatory
- Spaceship Earth

# History
After the discovery of radioactivity by Henri Becquerel in 1896, it was generally believed that atmospheric electricity (ionization of the air) was caused only by radiation from radioactive elements in the ground or the radioactive gases (isotopes of radon) they produce. Measurements of ionization rates at increasing heights above the ground during the decade from 1900 to 1910 showed a decrease that could be explained as due to absorption of the ionizing radiation by the intervening air. In 1912 Domenico Pacini observed simultaneous variations of the rate of ionization over a lake, and over the sea. Pacini concluded that a certain part of the ionization must be due to sources other than the radioactivity of the Earth or the air. Then, in 1912, Victor Hess carried three Wulf electrometers (a device to measure the rate of ion production inside a hermetically sealed container) to an altitude of 5300 meters in a free balloon flight. He found the ionization rate increased approximately fourfold over the rate at ground level. He concluded "The results of my observation are best explained by the assumption that a radiation of very great penetrating power enters our atmosphere from above." In 1913-14, Werner Kolhorster confirmed Victor Hess' results by measuring the increased ionization rate at an altitude of 9 km. Hess received the Nobel Prize in Physics in 1936 for his discovery of what came to be called "cosmic rays".
For many years it was generally believed that cosmic rays were high-energy photons (gamma rays) with some secondary electrons produced by Compton scattering of the gamma rays. Then, during the decade from 1927 to 1937 a wide variety of experimental investigations demonstrated that the primary cosmic rays are mostly positively charged particles, and the secondary radiation observed at ground level is composed primarily of a "soft component" of electrons and photons and a "hard component" of penetrating particles, muons. The muon was initially believed to be the unstable particle predicted by Hideki Yukawa in 1935 in his theory of the nuclear force. Experiments proved that the muon decays with a mean life of 2.2 microseconds into an electron and two neutrinos, but that it does not interact strongly with nuclei, so it could not be the Yukawa particle. The mystery was solved by the discovery in 1947 of the pion, which is produced directly in high-energy nuclear interactions. It decays into a muon and one neutrino with a mean life of 0.0026 microseconds. The pionmuonelectron decay sequence was observed directly in a microscopic examination of particle tracks in a special kind of photographic plate called a nuclear emulsion that had been exposed to cosmic rays at a high-altitude mountain station. In 1948, observations with nuclear emulsions carried by balloons to near the top of the atmosphere by Gottlieb and Van Allen showed that the primary cosmic particles are mostly protons with some helium nuclei (alpha particles) and a small fraction heavier nuclei.
In 1934 Bruno Rossi reported an observation of near-simultaneous discharges of two Geiger counters widely separated in a horizontal plane during a test of equipment he was using in a measurement of the so-called east-west effect. In his report on the experiment, Rossi wrote "...it seems that once in a while the recording equipment is struck by very extensive showers of particles, which causes coincidences between the counters, even placed at large distances from one another. Unfortunately, he did not have the time to study this phenomenon more closely." In 1937 Pierre Auger, unaware of Rossi's earlier report, detected the same phenomenon and investigated it in some detail.  He concluded that extensive particle showers are generated by high-energy primary cosmic-ray particles that interact with air nuclei high in the atmosphere, initiating a cascade of secondary interactions that ultimately yield a shower of electrons, photons, and muons that reach ground level.
Homi J. Bhabha derived an expression for the probability of scattering positrons by electrons, a process now known as Bhabha scattering. His classic paper, jointly with Warren Heitler, published in 1937 described how primary cosmic rays from space interact with the upper atmosphere to produce particles observed at the ground level. Bhabha and Heitler explained the cosmic ray shower formation by the cascade production of gamma rays and positive and negative electron pairs. In 1938 Bhabha concluded that observations of the properties of such particles would lead to the straightforward experimental verification of Albert Einstein's theory of relativity.
Measurements of the energy and arrival directions of the ultra-high-energy primary cosmic rays by the techniques of "density sampling" and "fast timing" of extensive air showers were first carried out in 1954 by members of the Rossi Cosmic Ray Group at the Massachusetts Institute of Technology. The experiment employed eleven scintillation detectors arranged within a circle 460 meters in diameter on the grounds of the Agassiz Station of the Harvard College Observatory. From that work, and from many other experiments carried out all over the world, the energy spectrum of the primary cosmic rays is now known to extend beyond 1020 eV (past the GZK cutoff, beyond which very few cosmic rays should be observed). A huge air shower experiment called the Auger Project is currently operated at a site on the pampas of Argentina by an international consortium of physicists. Their aim is to explore the properties and arrival directions of the very highest energy primary cosmic rays. The results are expected to have important implications for particle physics and cosmology.  In November, 2007 preliminary results were announced showing direction of origination of the 27 highest energy events were strongly correlated with the locations of active galactic nuclei , where bare protons are believed accelerated by strong magnetic fields associated with the large black holes at the AGN centers to energies of 1E20 eV and higher.
Three varieties of neutrino are produced when the unstable particles produced in cosmic ray showers decay. Since neutrinos interact only weakly with matter most of them simply pass through the Earth and exit the other side. They very occasionally interact, however, and these atmospheric neutrinos have been detected by several deep underground experiments. The Super-Kamiokande in Japan provided the first convincing evidence for neutrino oscillation in which one flavour of neutrino changes into another. The evidence was found in a difference in the ratio of electron neutrinos to muon neutrinos depending on the distance they have traveled through the air and earth.

# Effects

## Role in ambient radiation
Cosmic rays constitute a fraction of the annual radiation exposure of human beings on earth. For example, the average radiation exposure in Australia is 0.3 mSv due to cosmic rays, out of a total of 2.3 mSv.

## Effect on electronics
Cosmic rays have sufficient energy to alter the states of elements in electronic integrated circuits, causing transient errors to occur, such as corrupted data in memory, or incorrect behavior of a CPU.  This has been a problem in high-altitude electronics, such as in satellites, but as transistors become smaller it is becoming an increasing concern in ground-level equipment as well.
To alleviate this problem, Intel has proposed a cosmic ray detector which could be integrated into future high-density microprocessors, allowing the processor to repeat the last command following a cosmic ray event.

## Significance to space travel
Galactic cosmic rays are one of the most important barriers standing in the way of plans for interplanetary travel by crewed spacecraft. See Health threat from cosmic rays.

## Role in lightning
Cosmic rays have been implicated in the triggering of electrical breakdown in lightning.  It has been proposed that essentially all lightning is triggered through a relativistic process, "runaway breakdown", seeded by cosmic ray secondaries.  Subsequent development of the lightning discharge then occurs through "conventional breakdown" mechanisms.

## Role in climate change
Whether cosmic rays have any role in climate change is disputed.  Different groups have made different arguments regarding the role of cosmic ray forcing in climate change.
Shaviv et al. have argued that galactic cosmic ray (GCR) climate signals on geological time scales are attributable to changing positions of the galactic spiral arms of the Milky Way, and that cosmic ray flux variability is the dominant climate driver over these time periods. They also argue that GCR flux variability plays an important role in climate variability over shorter time scales, though the relative contribution of anthropogenic factors in relation to GCR flux presently is a matter of continued debate. Because of uncertainty about which GCR energies are the most important drivers of cloud cover variation (if any), and because of the paucity of historical data on cosmic ray flux at various ranges of energies, controversies remain.
Henrik Svensmark et al. have argued that solar variations modulate the cosmic ray signal seen at the earth and that this would affect cloud formation and hence climate. Cosmic rays have been experimentally determined to be able to produce ultra-small aerosol particles,  orders of magnitude smaller than cloud condensation nuclei (CCN). Whether this mechanism is relevant to the real atmosphere is unknown; in particular, the steps from this to modulation of cloud formation and thence climate have not been established. The analogy is with the Wilson cloud chamber, however acting on a global scale, where earth's atmosphere acts as the cloud chamber and the cosmic rays catalyze the production of CCN. But unlike a cloud chamber, where the air is carefully purified, the real atmosphere always has many CCN naturally. Various proposals have been made for the mechanism by which cosmic rays might affect clouds, including ion mediated nucleation, and indirect effects on current flow density in the global electric circuit (see Tinsley 2000, and F. Yu 1999). Claims have been made of identification of GCR climate signals in atmospheric parameters such as high latitude precipitation (Todd & Kniveton), and Svensmark's annual cloud cover variations, which were said to be correlated to GCR variation.
That Svensmark's work can be extrapolated to suggest any meaningful connection with global warming is disputed:
More recently a Lancaster University study produced further compelling evidence showing that modern-day climate change is not caused by changes in the Sun's activity.
See-also Global warming#Solar variation.

# Cosmic rays and fiction
Because of the metaphysical connotations of the word "cosmic", the very name of these particles enables their misinterpretation by the public, giving them an aura of mysterious powers. Were they merely referred to as "high-speed protons and atomic nuclei" this might not be so.
In fiction, cosmic rays have been used as a catchall, mostly in comics (notably the Marvel Comics group the Fantastic Four), as a source for mutation and therefore the powers gained by being bombarded with them.
Also, in the book Atlas Shrugged by author Ayn Rand, Dr. Robert Stadler's research of cosmic rays is said to have contributed to Project X: a weapon of mass destruction.