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

EventSource Class Reference

Interface to the EventSource class. Provides a generic interface to what Glastsim uses as a data source. This can constitute GISMO based event generation, reading in from a file, etc... More...

#include <EventSource.h>

Inheritance diagram for EventSource:

CompositeSource FluxSource List of all members.

Public Methods

 EventSource (double aFlux = 1.0, unsigned acode = 0)
 ctor/dtor. More...

 EventSource (const DOM_Element& xelem)
virtual ~EventSource ()
GPStime interval ()
 a randomized interval to the next event - default is 1/rate(). More...

virtual double rate ( double solid_angle, double flux )
 calculate the rate for a given flux/solid angle integral (NOTE: integral of solid angle). More...

virtual double rate () const
virtual void rate ( double )
virtual FluxSourceevent () = 0
 abstract method - create an event.

virtual std::string fullTitle () const
 UI titles - used for tuple header (verbose) or window title (display). More...

virtual std::string displayTitle () const
virtual double flux () const
 flux for this source in (p/(m^2*sr*sec)). More...

virtual void flux (double value)
void disable ()
 disable/enable, test this particular source. More...

void enable ()
bool enabled () const
virtual double solidAngle () const
 integral of solid angle over which flux is incident. More...

void solidAngle ( double )
const std::string& name () const
 name of this flux source - for UI. More...

void name (const std::string& value)
unsigned code () const
 code - for monte-carlo study. More...

virtual void code ( unsigned )
virtual OrbitmakeOrbit () const
 makeOrbit - creates an orbit appropriate for this source. More...

virtual int eventNumber () const
 virtual event number: should be filled in by subclass. More...

virtual std::string findSource () const
 say which source created the current particle. More...

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


Static Public Methods

double totalArea ()
 area. More...

void totalArea ( double value )

Private Attributes

bool m_enabled
double m_flux
double m_solid_angle
std::string m_name
unsigned m_code

Static Private Attributes

unsigned int s_id = 0
double s_total_area = 6.

Detailed Description

Interface to the EventSource class. Provides a generic interface to what Glastsim uses as a data source. This can constitute GISMO based event generation, reading in from a file, etc...

Definition at line 19 of file EventSource.h.


Constructor & Destructor Documentation

EventSource::EventSource ( double aFlux = 1.0,
unsigned acode = 0 )
 

ctor/dtor.

Definition at line 16 of file EventSource.cxx.

EventSource::EventSource ( const DOM_Element & xelem )
 

Definition at line 28 of file EventSource.cxx.

EventSource::~EventSource ( ) [virtual]
 

Definition at line 58 of file EventSource.cxx.


Member Function Documentation

void EventSource::code ( unsigned c ) [inline, virtual]
 

Definition at line 103 of file EventSource.h.

unsigned EventSource::code ( ) const [inline]
 

code - for monte-carlo study.

Definition at line 102 of file EventSource.h.

Referenced by EventSource().

void EventSource::disable ( ) [inline]
 

disable/enable, test this particular source.

Definition at line 47 of file EventSource.h.

std::string EventSource::displayTitle ( ) const [virtual]
 

Reimplemented in CompositeSource, and FluxSource.

Definition at line 111 of file EventSource.cxx.

Referenced by CompositeSource::displayTitle().

void EventSource::enable ( ) [inline]
 

Definition at line 48 of file EventSource.h.

bool EventSource::enabled ( ) const [inline]
 

Definition at line 49 of file EventSource.h.

Referenced by FluxSource::flux().

FluxSource * EventSource::event ( ) [pure virtual]
 

abstract method - create an event.

Reimplemented in CompositeSource, and FluxSource.

Referenced by CompositeSource::event(), and FluxMgr::test().

int EventSource::eventNumber ( ) const [inline, virtual]
 

virtual event number: should be filled in by subclass.

Reimplemented in FluxSource.

Definition at line 71 of file EventSource.h.

std::string EventSource::findSource ( ) const [inline, virtual]
 

say which source created the current particle.

Reimplemented in CompositeSource.

Definition at line 74 of file EventSource.h.

void EventSource::flux ( double value ) [virtual]
 

Definition at line 66 of file EventSource.cxx.

double EventSource::flux ( ) const [virtual]
 

flux for this source in (p/(m^2*sr*sec)).

Reimplemented in CompositeSource, and FluxSource.

Definition at line 61 of file EventSource.cxx.

Referenced by CompositeSource::addSource(), FluxSource::flux(), rate(), and CompositeSource::rmvSource().

std::string EventSource::fullTitle ( ) const [virtual]
 

UI titles - used for tuple header (verbose) or window title (display).

Reimplemented in CompositeSource, and FluxSource.

Definition at line 109 of file EventSource.cxx.

Referenced by FluxMgr::test().

GPStime EventSource::interval ( )
 

a randomized interval to the next event - default is 1/rate().

Definition at line 70 of file EventSource.cxx.

Orbit * EventSource::makeOrbit ( ) const [virtual]
 

makeOrbit - creates an orbit appropriate for this source.

Definition at line 101 of file EventSource.cxx.

void EventSource::name ( const std::string & value ) [inline]
 

Definition at line 97 of file EventSource.h.

const std::string & EventSource::name ( ) const [inline]
 

name of this flux source - for UI.

Definition at line 96 of file EventSource.h.

int EventSource::numSource ( ) const [inline, virtual]
 

return a unique number correcponding to that spectrum.

Reimplemented in CompositeSource.

Definition at line 78 of file EventSource.h.

void EventSource::rate ( double value ) [virtual]
 

Reimplemented in CompositeSource.

Definition at line 96 of file EventSource.cxx.

double EventSource::rate ( ) const [virtual]
 

Reimplemented in CompositeSource.

Definition at line 91 of file EventSource.cxx.

Referenced by CompositeSource::flux(), interval(), CompositeSource::rate(), and FluxMgr::test().

double EventSource::rate ( double solid_angle,
double fluxval ) [virtual]
 

calculate the rate for a given flux/solid angle integral (NOTE: integral of solid angle).

Definition at line 81 of file EventSource.cxx.

void EventSource::solidAngle ( double value ) [inline]
 

Definition at line 94 of file EventSource.h.

double EventSource::solidAngle ( ) const [inline, virtual]
 

integral of solid angle over which flux is incident.

Reimplemented in FluxSource.

Definition at line 93 of file EventSource.h.

Referenced by FluxSource::setAcceptance(), and FluxSource::solidAngle().

void EventSource::totalArea ( double value ) [inline, static]
 

Definition at line 100 of file EventSource.h.

double EventSource::totalArea ( ) [inline, static]
 

area.

Definition at line 99 of file EventSource.h.

Referenced by CompositeSource::flux(), FluxSource::setAcceptance(), and FluxMgr::test().


Member Data Documentation

unsigned EventSource::m_code [private]
 

Definition at line 85 of file EventSource.h.

bool EventSource::m_enabled [private]
 

Definition at line 81 of file EventSource.h.

double EventSource::m_flux [private]
 

Definition at line 82 of file EventSource.h.

std::string EventSource::m_name [private]
 

Definition at line 84 of file EventSource.h.

double EventSource::m_solid_angle [private]
 

Definition at line 83 of file EventSource.h.

unsigned int EventSource::s_id = 0 [static, private]
 

Definition at line 13 of file EventSource.cxx.

double EventSource::s_total_area = 6. [static, private]
 

Definition at line 14 of file EventSource.cxx.


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