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

SpectObj Class Reference

This class describe the Spectrum Object. More...

#include <SpectObj.h>

List of all members.

Public Methods

 SpectObj ()
 SpectObj (double enmin, double enmax,double enstep)
 SpectObj (std::map< double, double >::const_iterator start, std::map< double, double >::const_iterator end)
 ~SpectObj ()
double integrated_E_Flux (double enmin, double enmax)
double integrated_Flux (double enmin, double enmax)
double binSize (std::map< double, double >::const_iterator it)
double size ()
void clear ()
double getBinContent (double index)
double getBinValue (double index)
SpectObj operator+ (const SpectObj inputObj)
 adds a spectrum object.

SpectObj operator+= (const SpectObj inputObj)
SpectObj operator * (const double value)
 scales the spectrum values.

SpectObj operator *= (const double value)
SpectObj operator/ (const double value)
 divide a spectrum object for a value.

SpectObj operator/= (const double value)
std::vector< double > getEnergyVector (const double value=1.)
std::vector< double > getBinVector (const double value=1.)
std::vector< double > getSpectrumVector (const double value=1.)
SpectObj extractSub (std::map< double, double >::const_iterator start, std::map< double, double >::const_iterator end)
SpectObj SetSpectrum (double energy, double spectrum)
SpectObj SetSpectrum (std::vector< double > energy, std::vector< double > spectrum)


Detailed Description

This class describe the Spectrum Object.

A Spectrum Object is basically a map containing in the first entry the energy and in the second entry the value of the spectrum. The spectrum is in

Author:
Nicola Omodei nicola.omodei@pi.infn.it , Johann Cohen-Tanugi johann.cohen@pi.infn.it


Constructor & Destructor Documentation

SpectObj::SpectObj double    enmin,
double    enmax,
double    enstep
 

Constructor using values for defining the set of energies in logarithmic scale

Parameters:
enmin  minimal energy
enmax  maximal energy
enstep  number of steps from enmin to enmax

SpectObj::SpectObj std::map< double, double >::const_iterator    start,
std::map< double, double >::const_iterator    end
 

Constructor using an already existing map <energy,value>

Parameters:
start  const_iterator pointing to the desired start
end  const_iterator pointing to the desired end


Member Function Documentation

double SpectObj::binSize std::map< double, double >::const_iterator    it
 

returns the size value of the bin starting at it

Parameters:
it  const iterator pointing to the min energy of the bin
Return values:
eV 

void SpectObj::clear   [inline]
 

It empties the values of the spectrum, not the energy vector!

SpectObj SpectObj::extractSub std::map< double, double >::const_iterator    start,
std::map< double, double >::const_iterator    end
 

creates a new SpectObj with energy range [start,end]

Parameters:
start  const iterator positioned at the min of the energy range
end  const iterator positioned at the max of the energy range

double SpectObj::getBinContent double    index [inline]
 

returns the spectrum in the i-th energy value

Parameters:
index  is the position in the map of the desired energy
Return values:
eV  /MeV/s

double SpectObj::getBinValue double    index [inline]
 

returns the i-th energy value

Parameters:
index  is the position in the map of the desired energy
Return values:
eV 

std::vector<double> SpectObj::getBinVector const double    value = 1.
 

returns vector of bins, aka of values

Parameters:
value  scale factor

std::vector<double> SpectObj::getEnergyVector const double    value = 1.
 

returns vector of bins, aka of values

Parameters:
value  scale factor

std::vector<double> SpectObj::getSpectrumVector const double    value = 1.
 

returns a vector containing the values of the flux

Parameters:
value  scale factor

double SpectObj::integrated_E_Flux double    enmin,
double    enmax
 

Computes , where is the spectrum value at energy and is the bin size of the bin starting at

Parameters:
enmin  minimal energy
enmax  maximal energy
Return values:
eV  /s

double SpectObj::integrated_Flux double    enmin,
double    enmax
 

computes , where is the spectrum value at energy and is the bin size of the bin starting at

Parameters:
enmin  minimal energy
enmax  maximal energy
Return values:
ph  /s

SpectObj SpectObj::SetSpectrum std::vector< double >    energy,
std::vector< double >    spectrum
 

Loads this SpectObj instance with energy and spectrum vectors

Parameters:
energy  vector of energy values
spectrum  vector of spectral values

SpectObj SpectObj::SetSpectrum double    energy,
double    spectrum
 

Changes one spectral value

Parameters:
energy  position of value to be changed
spectrum  new value

double SpectObj::size   [inline]
 

returns the size of the map, aka the number of values points on the spectrum


The documentation for this class was generated from the following file:
Generated on Mon Jan 27 11:43:33 2003 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001