Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

HeSpectrum Class Reference

Calculate the cosmic ray 4He spectrum in low earth orbit. Uses data produced by CHIME, assuming 600 km circular orbit at solar minimum (worst case). Patrick Nolan, Stanford University, 1998. More...

#include <HeSpectrum.h>

Inheritance diagram for HeSpectrum:

Spectrum List of all members.

Public Types

typedef std::pair<int,float> Intrp

Public Methods

 HeSpectrum (const std::string& params)
virtual double calculate_rate (double old_rate)
virtual double flux () const
 calculate flux for the current cutoff. More...

virtual double solidAngle () const
 calcualte effective solid angle for the given energy. More...

float flux (float cut) const
 Total flux in nuclei / m^2 sec ster Interpolate in table if possible, otherwise assume power law tail at high energy. More...

virtual float operator() (float) const
float cutoff () const
virtual void setPosition (double lat, double lon)
int askGPS ()
 this one asks the GPS for position. More...

float findCutoff (float rflux) const
 determine the cutoff value which will produce the desired flux. More...

float findCutoff (float lat, float lon) const
 determine the cutoff value at a geographical location. More...

virtual std::pair<float,float> dir (float energy) const
 return solid angle pair (costh, phi) for the given energy. More...

virtual std::string title () const
 return a title describing the spectrum. More...

virtual const char* particleName () const
 subclasses need to specify correct particle type. More...

const char* nameOf () const
void setParticleName (std::string name)
 set the particle name. (default is "alpha"). More...


Private Methods

double flux (double lat, double lon) const
void init (float lat, float lon)
float rad2 () const
float exposure (float E) const
float cosomega (float E) const

Private Attributes

InterpVec m_en
InterpVec m_fl
InterpVec m_fluxes
float m_expo
float m_normfact
float m_tot
float m_upper
float m_etop
float m_cutoff
float m_coscutoff
float m_fluxTbl [73][13]
float m_flux
std::string m_particle_name
ObserverAdapter< HeSpectrum > m_observer

Static Private Attributes

const float m_rearth = 6371.f
const float m_altitude = 600.f

Detailed Description

Calculate the cosmic ray 4He spectrum in low earth orbit. Uses data produced by CHIME, assuming 600 km circular orbit at solar minimum (worst case). Patrick Nolan, Stanford University, 1998.

Interface: The constructor arguments specify the satellite position (latitude, longitude) in degrees. The position can be changed by use of the setPosition() member. The total flux in nuclei/(m^2 sec ster) is returned by the flux() member. There are 3 ways to call flux(): With no arguments it uses the current cutoff energy. If there is one argument, it is assumed to be a cutoff. Two arguments are assumed to be latitude and longitude, and the corresponding cutoff is looked up. The stored current value is not changed. Cutoff energies are returned by FindCutoff(). With no arguments, it returns the stored current value. Two arguments are assumed to be latitude and longitude, and the corresponding cutoff is looked up. The operator() function returns a sampled energy value. The argument must be a float value between 0 and 1. The dir() member returns a sampled particle's energy and direction. The argument is a value between 0 and 1, which is used to produce the energy, as in operator(). The direction is based on simple Stormer cone theory. The first component of the direction is the zenith direction cosine: +1 for particles moving downward. The second component of the direction is the earth azimuth angle: 0 from the east, +pi/2 from the north, -pi/2 from the south. At energies near the cutoff, particles come mainly from the west.

Definition at line 44 of file HeSpectrum.h.


Member Typedef Documentation

typedef std::pair<int,float> HeSpectrum::Intrp
 

Definition at line 90 of file HeSpectrum.h.

Referenced by HeSpectrum::InterpVec::search().


Constructor & Destructor Documentation

HeSpectrum::HeSpectrum ( const std::string & paramstring )
 

Definition at line 115 of file HeSpectrum.cxx.


Member Function Documentation

int HeSpectrum::askGPS ( )
 

this one asks the GPS for position.

Definition at line 190 of file HeSpectrum.cxx.

double HeSpectrum::calculate_rate ( double old_rate ) [virtual]
 

Definition at line 239 of file HeSpectrum.cxx.

float HeSpectrum::cosomega ( float E ) const [private]
 

Definition at line 259 of file HeSpectrum.cxx.

Referenced by exposure().

float HeSpectrum::cutoff ( ) const [inline]
 

Definition at line 66 of file HeSpectrum.h.

std::pair< float,float > HeSpectrum::dir ( float energy ) const [virtual]
 

return solid angle pair (costh, phi) for the given energy.

Reimplemented from Spectrum.

Definition at line 291 of file HeSpectrum.cxx.

float HeSpectrum::exposure ( float E ) const [private]
 

Definition at line 284 of file HeSpectrum.cxx.

Referenced by setPosition().

float HeSpectrum::findCutoff ( float lat,
float lon ) const
 

determine the cutoff value at a geographical location.

Definition at line 231 of file HeSpectrum.cxx.

float HeSpectrum::findCutoff ( float rflux ) const
 

determine the cutoff value which will produce the desired flux.

Definition at line 224 of file HeSpectrum.cxx.

Referenced by findCutoff(), and setPosition().

double HeSpectrum::flux ( double lat,
double lon ) const [private]
 

Definition at line 165 of file HeSpectrum.cxx.

float HeSpectrum::flux ( float cut ) const
 

Total flux in nuclei / m^2 sec ster Interpolate in table if possible, otherwise assume power law tail at high energy.

Definition at line 140 of file HeSpectrum.cxx.

double HeSpectrum::flux ( ) const [virtual]
 

calculate flux for the current cutoff.

Reimplemented from Spectrum.

Definition at line 150 of file HeSpectrum.cxx.

Referenced by calculate_rate(), findCutoff(), and setPosition().

void HeSpectrum::init ( float lat,
float lon ) [private]
 

Definition at line 64 of file HeSpectrum.cxx.

Referenced by HeSpectrum().

const char * HeSpectrum::nameOf ( ) const [inline]
 

Definition at line 84 of file HeSpectrum.h.

float HeSpectrum::operator() ( float x ) const [virtual]
 

Reimplemented from Spectrum.

Definition at line 180 of file HeSpectrum.cxx.

const char * HeSpectrum::particleName ( ) const [virtual]
 

subclasses need to specify correct particle type.

Reimplemented from Spectrum.

Definition at line 130 of file HeSpectrum.cxx.

float HeSpectrum::rad2 ( ) const [private]
 

Definition at line 246 of file HeSpectrum.cxx.

Referenced by cosomega().

void HeSpectrum::setParticleName ( std::string name )
 

set the particle name. (default is "alpha").

Definition at line 133 of file HeSpectrum.cxx.

void HeSpectrum::setPosition ( double lat,
double lon ) [virtual]
 

Definition at line 196 of file HeSpectrum.cxx.

Referenced by askGPS(), and init().

double HeSpectrum::solidAngle ( ) const [virtual]
 

calcualte effective solid angle for the given energy.

Reimplemented from Spectrum.

Definition at line 157 of file HeSpectrum.cxx.

std::string HeSpectrum::title ( ) const [virtual]
 

return a title describing the spectrum.

Reimplemented from Spectrum.

Definition at line 126 of file HeSpectrum.cxx.


Member Data Documentation

const float HeSpectrum::m_altitude = 600.f [static, private]
 

Definition at line 61 of file HeSpectrum.cxx.

float HeSpectrum::m_coscutoff [private]
 

Definition at line 113 of file HeSpectrum.h.

float HeSpectrum::m_cutoff [private]
 

Definition at line 112 of file HeSpectrum.h.

InterpVec HeSpectrum::m_en [private]
 

Definition at line 104 of file HeSpectrum.h.

float HeSpectrum::m_etop [private]
 

Definition at line 111 of file HeSpectrum.h.

float HeSpectrum::m_expo [private]
 

Definition at line 107 of file HeSpectrum.h.

InterpVec HeSpectrum::m_fl [private]
 

Definition at line 105 of file HeSpectrum.h.

float HeSpectrum::m_flux [private]
 

Definition at line 115 of file HeSpectrum.h.

float HeSpectrum::m_fluxTbl[73][13] [private]
 

Definition at line 114 of file HeSpectrum.h.

InterpVec HeSpectrum::m_fluxes [private]
 

Definition at line 106 of file HeSpectrum.h.

float HeSpectrum::m_normfact [private]
 

Definition at line 108 of file HeSpectrum.h.

ObserverAdapter< HeSpectrum > HeSpectrum::m_observer [private]
 

Definition at line 124 of file HeSpectrum.h.

std::string HeSpectrum::m_particle_name [private]
 

Definition at line 123 of file HeSpectrum.h.

const float HeSpectrum::m_rearth = 6371.f [static, private]
 

Definition at line 60 of file HeSpectrum.cxx.

float HeSpectrum::m_tot [private]
 

Definition at line 109 of file HeSpectrum.h.

float HeSpectrum::m_upper [private]
 

Definition at line 110 of file HeSpectrum.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:20:36 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000