agile is hosted by Hepforge, IPPP Durham

GeneratorState Class Reference

#include <GeneratorState.hh>

Collaboration diagram for GeneratorState:

List of all members.

Public Member Functions

 GeneratorState ()
template<typename T >
const GeneratorStatesetParam (const string &name, const T &value)
const GeneratorStatesetParam (const string &name, const string &value)
const GeneratorStateaddSeed (const int &seed)
const vector< int > & getSeeds () const
const bool setCrossSection (const double xs)
const double getCrossSection () const
const int getNEvents () const
const GeneratorStateaddEvent ()
const GeneratorStatesetBeams (const Beam beam1, const Beam beam2)
const void addPDF (PDF pdf)
const GeneratorStatesetName (const string &name)
const void setVersion (const string &ver)
const string version () const
const string & name () const
const vector< Beam > & getBeams () const
const PDFgetPDF (PdgCode pid) const

Private Attributes

vector< Beam_beams
int _nEvents
double _luminosity
double _crossSection
string _genName
string _genVersion
map< PdgCode, PDF_pDFs
vector< int > _seeds
map< string, string > _stringParams

Detailed Description

Definition at line 25 of file GeneratorState.hh.


Constructor & Destructor Documentation

GeneratorState (  )  [inline]

Definition at line 28 of file GeneratorState.hh.

References GeneratorState::_crossSection, and GeneratorState::_nEvents.

00028                      {
00029       _nEvents = 0;
00030       _crossSection = 0.0;
00031     }


Member Function Documentation

const GeneratorState& addEvent (  )  [inline]

Definition at line 76 of file GeneratorState.hh.

References GeneratorState::_nEvents.

Referenced by Generator::makeEvent().

00076                                      {
00077       ++_nEvents;
00078       return *this;
00079     }

const void addPDF ( PDF  pdf  )  [inline]

Definition at line 91 of file GeneratorState.hh.

References GeneratorState::_pDFs, and PDF::particleId.

Referenced by Generator::getState().

00091                                {
00092       _pDFs[pdf.particleId] = pdf;
00093     }

const GeneratorState& addSeed ( const int &  seed  )  [inline]

Definition at line 48 of file GeneratorState.hh.

References GeneratorState::_seeds.

Referenced by Generator::setSeed().

00048                                                    {
00049       _seeds.push_back(seed);
00050       return *this;
00051     }

const vector<Beam>& getBeams (  )  const [inline]

Definition at line 117 of file GeneratorState.hh.

References GeneratorState::_beams.

Referenced by Generator::getState(), and AGILe::operator<<().

00117                                          {
00118       return _beams;
00119     }

const double getCrossSection (  )  const [inline]

Definition at line 66 of file GeneratorState.hh.

References GeneratorState::_crossSection.

Referenced by AGILe::operator<<().

00066                                          {
00067       return _crossSection;
00068     }

const int getNEvents (  )  const [inline]

Definition at line 71 of file GeneratorState.hh.

References GeneratorState::_nEvents.

Referenced by AGILe::operator<<().

00071                                 {
00072       return _nEvents;
00073     }

const PDF& getPDF ( PdgCode  pid  )  const [inline]

Definition at line 122 of file GeneratorState.hh.

References GeneratorState::_pDFs.

Referenced by AGILe::operator<<().

00122                                          {
00123       map<PdgCode, PDF>::const_iterator pdfIt = _pDFs.find(pid);
00124       if (pdfIt!=_pDFs.end()) {
00125         return pdfIt->second;
00126       }
00127       throw runtime_error("PDF unknown for PDG code "+ pid);
00128     }

const vector<int>& getSeeds (  )  const [inline]

Definition at line 54 of file GeneratorState.hh.

References GeneratorState::_seeds.

Referenced by AGILe::operator<<().

00054                                         {
00055       return _seeds;
00056     }

const string& name (  )  const [inline]

Definition at line 112 of file GeneratorState.hh.

References GeneratorState::_genName.

Referenced by AGILe::operator<<().

00112                                {
00113       return _genName;
00114     }

const GeneratorState& setBeams ( const Beam  beam1,
const Beam  beam2 
) [inline]

Definition at line 82 of file GeneratorState.hh.

References GeneratorState::_beams.

Referenced by Generator::setInitialState().

00083                                                      {
00084       _beams.clear();
00085       _beams.push_back(beam1);
00086       _beams.push_back(beam2);
00087       return *this;
00088     }

const bool setCrossSection ( const double  xs  )  [inline]
Todo:
Why not return self?

Definition at line 60 of file GeneratorState.hh.

References GeneratorState::_crossSection.

Referenced by Generator::getState().

00060                                                 {
00061       _crossSection = xs;
00062       return true;
00063     }

const GeneratorState& setName ( const string &  name  )  [inline]

Definition at line 96 of file GeneratorState.hh.

References GeneratorState::_genName.

Referenced by Generator::getState().

00096                                                       {
00097       _genName = name;
00098       return *this;
00099     }

const GeneratorState& setParam ( const string &  name,
const string &  value 
) [inline]

Definition at line 42 of file GeneratorState.hh.

References GeneratorState::_stringParams.

00042                                                                              {
00043       _stringParams[name] = value;
00044       return *this;
00045     }

const GeneratorState& setParam ( const string &  name,
const T &  value 
) [inline]

Definition at line 35 of file GeneratorState.hh.

Referenced by Generator::setParam().

00035                                                                        {
00036       stringstream s;
00037       s << value;
00038       return setParam(name, s.str());
00039     }

const void setVersion ( const string &  ver  )  [inline]

Definition at line 102 of file GeneratorState.hh.

References GeneratorState::_genVersion.

Referenced by Generator::getState().

00102                                              {
00103       _genVersion = ver;
00104     }

const string version (  )  const [inline]

Definition at line 107 of file GeneratorState.hh.

References GeneratorState::_genVersion.

Referenced by AGILe::operator<<().

00107                                  {
00108       return _genVersion;
00109     }


Member Data Documentation

vector<Beam> _beams [private]

Definition at line 133 of file GeneratorState.hh.

Referenced by GeneratorState::getBeams(), and GeneratorState::setBeams().

string _genName [private]

Definition at line 139 of file GeneratorState.hh.

Referenced by GeneratorState::name(), and GeneratorState::setName().

string _genVersion [private]

Definition at line 140 of file GeneratorState.hh.

Referenced by GeneratorState::setVersion(), and GeneratorState::version().

double _luminosity [private]

Definition at line 136 of file GeneratorState.hh.

map<PdgCode, PDF> _pDFs [private]

Definition at line 142 of file GeneratorState.hh.

Referenced by GeneratorState::addPDF(), and GeneratorState::getPDF().

vector<int> _seeds [private]

Definition at line 144 of file GeneratorState.hh.

Referenced by GeneratorState::addSeed(), and GeneratorState::getSeeds().

map<string, string> _stringParams [private]

Definition at line 145 of file GeneratorState.hh.

Referenced by GeneratorState::setParam().


The documentation for this class was generated from the following file:
Generated on Tue Mar 6 10:39:41 2012 for AGILe - A Generator Interface Library (+ executable) by  doxygen 1.6.3