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

Flux Class Reference

The class holding the interface with FluxMgr, EventSource, and FluxSource of the flux package. Flux is used to get the actual information(energy, name, etc) about the current particle, and to generate new ones, through this interface. More...

#include <Flux.h>

Inheritance diagram for Flux::

IFlux List of all members.

Public Methods

 Flux (std::string name)
 ctor, select the name. More...

virtual ~Flux ()
virtual std::string name () const
 name of the flux. More...

virtual std::string title () const
 full title of the flux. More...

virtual void generate ()
 generate a new entry trajectory. More...

virtual std::string particleName () const
 the particle generated. More...

virtual double energy () const
 its kinetic energy. More...

virtual HepPoint3D launchPoint () const
 starting point. More...

virtual HepVector3D launchDir () const
 direction. More...

virtual double time () const
 return the time. More...

virtual void pass (double t)
 pass a specific amount of time. More...

double gpsTime () const
 Get the time as held by GPS. More...

virtual double rate () const
 rate ( /mm**2 /s). More...

virtual void setTargetArea (double area)
 set the area of the target. More...

double targetArea () const
 retrieve the area (a static, same for all fluxes). More...

virtual std::string findSource () const
 find which spectrum created the current particle. More...

virtual int numSource () const
 return a unique number correcponding to that spectrum. More...

virtual void addFactory (std::string name, const ISpectrumFactory *factory)
virtual Rotation CELTransform (double time) const
 get the transformation matrix due to orientation of the Galaxy. More...

virtual Rotation orientTransform (double time) const
 get the transformation matrix due to orientation of the spacecraft. More...

HepRotation Flux::transformGlastToGalactic (double time) const
 this transforms glast-local (cartesian) vectors into galactic (cartesian) vectors. More...

EventSourcecurrentEvent ()
FluxSourcecurrentFlux ()
void writeSourceCharacteristic (std::ostream &out)
 write the characteristics of the current source distribution to a stream. More...


Static Public Methods

void mgr (FluxMgr *)
 set the static pointer. More...


Private Attributes

EventSourcem_event
double m_time
FluxSourcem_flux

Static Private Attributes

FluxMgrs_mgr = 0

Detailed Description

The class holding the interface with FluxMgr, EventSource, and FluxSource of the flux package. Flux is used to get the actual information(energy, name, etc) about the current particle, and to generate new ones, through this interface.

Author:
Toby Burnett
$Header $

Definition at line 26 of file Flux.h.


Constructor & Destructor Documentation

Flux::Flux std::string    name
 

ctor, select the name.

Definition at line 12 of file Flux.cxx.

References m_event, name(), s_mgr, and FluxMgr::source().

00013 : m_time(0)
00014 , m_flux(0)
00015 {
00016     m_event = s_mgr->source(name);
00017 }

Flux::~Flux   [virtual]
 

Definition at line 18 of file Flux.cxx.

References m_flux.

00019 {
00020     delete m_flux;
00021 }


Member Function Documentation

void Flux::addFactory std::string    name,
const ISpectrumFactory   factory
[virtual]
 

Reimplemented from IFlux.

Definition at line 128 of file Flux.cxx.

References SpectrumFactoryTable::addFactory(), SpectrumFactoryTable::instance(), and name().

00128                                                                       {
00129     SpectrumFactoryTable::instance()->addFactory(name,factory);
00130 }

Rotation Flux::CELTransform double    time const [virtual]
 

get the transformation matrix due to orientation of the Galaxy.

Reimplemented from IFlux.

Definition at line 133 of file Flux.cxx.

00133                                            {
00134     return s_mgr->CELTransform(time);
00135 }

EventSource* Flux::currentEvent   [inline, virtual]
 

Reimplemented from IFlux.

Definition at line 98 of file Flux.h.

References m_event.

00098 {return m_event;}

FluxSource* Flux::currentFlux   [inline, virtual]
 

Reimplemented from IFlux.

Definition at line 100 of file Flux.h.

References m_flux.

00100 {return m_flux;}

double Flux::energy   const [virtual]
 

its kinetic energy.

Reimplemented from IFlux.

Definition at line 57 of file Flux.cxx.

00058 {
00059     return m_flux->energy();
00060 }

std::string Flux::findSource   const [virtual]
 

find which spectrum created the current particle.

Reimplemented from IFlux.

Definition at line 110 of file Flux.cxx.

00111 {
00112     return m_event->findSource();
00113 }

HepRotation Flux::Flux::transformGlastToGalactic double    time const
 

this transforms glast-local (cartesian) vectors into galactic (cartesian) vectors.

void Flux::generate   [virtual]
 

generate a new entry trajectory.

Reimplemented from IFlux.

Definition at line 39 of file Flux.cxx.

References EventSource::event(), EventSource::interval(), m_event, m_flux, m_time, pass(), and time().

00040 {
00041     // Purpose and Method: generate a new entry trajectory, set FluxSource, increment local time
00042     // Inputs  - none
00043     // Outputs - none
00044     
00045     m_flux = m_event->event(time());
00046     double timepass = m_event->interval(time());
00047     m_time+= timepass;
00048     pass(timepass);
00049 }

double Flux::gpsTime   const [virtual]
 

Get the time as held by GPS.

Reimplemented from IFlux.

Definition at line 80 of file Flux.cxx.

References s_mgr, and FluxMgr::time().

00080                                              {
00081 return s_mgr->time();
00082 }

HepVector3D Flux::launchDir   const [virtual]
 

direction.

Reimplemented from IFlux.

Definition at line 86 of file Flux.cxx.

00087 {
00088     return m_flux->launchDir();
00089 }

HepPoint3D Flux::launchPoint   const [virtual]
 

starting point.

Reimplemented from IFlux.

Definition at line 63 of file Flux.cxx.

00064 {
00065     return m_flux->launchPoint();
00066 }

void Flux::mgr FluxMgr   m [static]
 

set the static pointer.

Definition at line 25 of file Flux.cxx.

References s_mgr.

Referenced by FluxSvc::initialize().

00025 { s_mgr=m;}

std::string Flux::name   const [virtual]
 

name of the flux.

Reimplemented from IFlux.

Definition at line 27 of file Flux.cxx.

References m_flux, and EventSource::name().

Referenced by addFactory(), and Flux().

00028 {
00029     return m_flux->name();
00030 }

int Flux::numSource   const [virtual]
 

return a unique number correcponding to that spectrum.

Reimplemented from IFlux.

Definition at line 116 of file Flux.cxx.

00117 {
00118     return m_event->numSource();
00119     
00120 }

Rotation Flux::orientTransform double    time const [virtual]
 

get the transformation matrix due to orientation of the spacecraft.

Reimplemented from IFlux.

Definition at line 137 of file Flux.cxx.

00137                                               {
00138     return s_mgr->orientTransform(time);
00139 }

std::string Flux::particleName   const [virtual]
 

the particle generated.

Reimplemented from IFlux.

Definition at line 52 of file Flux.cxx.

00052                                  {
00053     return std::string(m_flux->spectrum()->particleName());
00054 }

void Flux::pass double    t [virtual]
 

pass a specific amount of time.

Reimplemented from IFlux.

Definition at line 75 of file Flux.cxx.

References FluxMgr::pass(), and s_mgr.

Referenced by generate().

00075                          {
00076     s_mgr->pass(t);
00077 }

double Flux::rate   const [virtual]
 

rate ( /mm**2 /s).

Reimplemented from IFlux.

Definition at line 92 of file Flux.cxx.

00093 {
00094     return m_event->rate(time());
00095 }

void Flux::setTargetArea double    area [virtual]
 

set the area of the target.

Reimplemented from IFlux.

Definition at line 98 of file Flux.cxx.

References m_event, and EventSource::totalArea().

00099 {
00100     m_event->totalArea(area);
00101 }

double Flux::targetArea   const [virtual]
 

retrieve the area (a static, same for all fluxes).

Reimplemented from IFlux.

Definition at line 103 of file Flux.cxx.

00104 {
00105     return m_event->totalArea();
00106 }

double Flux::time   const [virtual]
 

return the time.

Reimplemented from IFlux.

Definition at line 68 of file Flux.cxx.

Referenced by generate().

00069 {
00070     return m_time ;
00071 }

std::string Flux::title   const [virtual]
 

full title of the flux.

Reimplemented from IFlux.

Definition at line 33 of file Flux.cxx.

00034 {
00035     return m_event->fullTitle();
00036 }

void Flux::writeSourceCharacteristic std::ostream &    out [virtual]
 

write the characteristics of the current source distribution to a stream.

Reimplemented from IFlux.

Definition at line 146 of file Flux.cxx.

References m_event, and EventSource::writeSourceCharacteristic().

00146                                                    {
00147     m_event->writeSourceCharacteristic(out);
00148 }


Member Data Documentation

EventSource* Flux::m_event [private]
 

Definition at line 107 of file Flux.h.

Referenced by currentEvent(), Flux(), generate(), setTargetArea(), and writeSourceCharacteristic().

FluxSource* Flux::m_flux [private]
 

Definition at line 109 of file Flux.h.

Referenced by currentFlux(), generate(), name(), and ~Flux().

double Flux::m_time [private]
 

Definition at line 108 of file Flux.h.

Referenced by generate().

FluxMgr * Flux::s_mgr = 0 [static, private]
 

Definition at line 23 of file Flux.cxx.

Referenced by Flux(), gpsTime(), mgr(), and pass().


The documentation for this class was generated from the following files:
Generated on Wed Oct 16 14:01:32 2002 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001