Home · Overview · Users Guide · Reference Guide |
EventGeneratorSettings holds Sartre's run and configuration parameters. More...
#include "EventGeneratorSettings.h"
Inherits from virtual class Settings.
static EventGeneratorSettings* | instance() |
void | setVerbose(bool) |
bool | verbose() const |
void | setVerboseLevel(int) |
int | verboseLevel() const |
void | setNumberOfEvents(unsigned long) |
unsigned long | numberOfEvents() const |
void | setTimesToShow(unsigned int) |
unsigned int | timesToShow() const |
void | setQ2min(double) |
double | Q2min() const |
double | Qmin() const |
void | setQ2max(double) |
double | Q2max() const |
double | Qmax() const |
void | setWmin(double) |
void | setW2min(double) |
double | Wmin() const |
double | W2min() const |
void | setWmax(double) |
void | setW2max(double) |
double | Wmax() const |
double | W2max() const |
int | vectorMesonId() const |
void | setVectorMesonId(int) |
double | electronBeamEnergy() const |
void | setElectronBeamEnergy(double) |
double | hadronBeamEnergy() const |
void | setHadronBeamEnergy(double) |
TLorentzVector | eBeam() const |
TLorentzVector | hBeam() const |
string | dipoleModelName() const |
DipoleModelType | dipoleModelType() const |
void | setDipoleModelType(DipoleModelType) |
string | rootfile() const |
void | setRootfile(const char*) |
unsigned int | A() const |
void | setA(unsigned int) |
bool | correctForRealAmplitude() const |
void | setCorrectForRealAmplitude(bool) |
bool | correctSkewedness() const |
void | setCorrectSkewedness(bool) |
bool | enableNuclearBreakup() const |
void | setEnableNuclearBreakup(bool) |
double | maxNuclearExcitationEnergy() const |
void | setMaxNuclearExcitationEnergy(double) |
double | maxLambdaUsedInCorrections() const |
void | setMaxLambdaUsedInCorrections(double) |
bool | applyPhotonFlux() const |
void | setApplyPhotonFlux(bool) |
bool | UPC() const |
void | setUPC(bool) |
unsigned int | UPCA() const |
void | setUPCA(unsigned int) |
bool | readSettingsFromFile(const char*) |
virtual bool | list(ostream& = cout) |
TParticlePDG* | lookupPDG(int) const |
string | particleName(int pdgID) |
static TRandom3* | randomGenerator() |
unsigned int | seed() const |
void | setSeed(unsigned int) |
int | userInt() const |
double | userDouble() const |
string | userString() const |
void | setUserInt(int) |
void | setUserDouble(double) |
void | setUserString(const string&) |
The main API for event generation is class Sartre. However, Sartre does not handle its settings parameters at all but defers that job to the "Settings" classes. These classes are not only simple containers for parameters but provide lots of functionality to load, print, and manage parameters and also provide some particle lookup features. The basic functionality is provided by the Settings class, inherited by the EventGeneratorSettings class. For creating the amplitude table a separate class needs to be used (TableGeneratorSettings), EventGeneratorSettings only deals with the parameter needed for generating events and/or calculating cross-sections.
EventGeneratorSettings is a singleton class, i.e., only one instance exist at any time. One can always obtain the actual instance using the static instance() method. For example:
// somewhere in your code EventGeneratorSettings* mySettings = EventGeneratorSettings::instance();
The more conventional (and preferred) way of obtaining the actual instance is through your instance of Sartre.
Sartre mySartre; EventGeneratorSettings* mySettings = mySartre::runSettings();
EventGeneratorSettings (via Settings) also provides the "runcard" mechanism, that is the possibility to store all parameters to run Sartre in a text file (the runcard) and read them in (see Sartre::init() for details).
Parameters managed by EventGeneratorSettings can be set and used via access functions. Each access function has an equivalent runcard name. For more on see the detailed documentation on the Sartre class page where also the default values for all parameters are listed.
Several of the parameters listed here are strictly not mandatory to run Sartre. The are only provided for convenience to allow the user to control his program through a runcard allowing multiple runs with different parameters without the need to recompile. Two examples are the "number of events" and the "times to show" parameter. Here is an example on how to make effective use of them:
int nPrint; if (settings->timesToShow()) nPrint = settings->numberOfEvents()/settings->timesToShow(); else nPrint = 0; for (unsigned long iEvent = 0; iEvent < settings->numberOfEvents(); iEvent++) { // // Generate one event // Event *event = sartre.generateEvent(); if (nPrint && iEvent%nPrint == 0 && iEvent != 0) { cout << "processed " << iEvent << " events" << endl; } // you code here }
If the timesToShow parameter was set to 20, the status is printed out exactly 20 times independent of the number of events. The number of events to process can be controlled through the runcard.
Note that parameters should not be changed after the call to Sartre::init().
Static method returning a pointer to self. Note, that there is no public constructor for EventGeneratorSettings. The only way to get an instance is through this method.
Switches verbosity on or off. Equivalent runcard entry is verbose.
Returns verbosity flag.
Sets the verbosity level to value. Higher values than 1 or 2 are for debugging purposes only. If > 0 automatically sets the verbose flag (see above) to true. Equivalent runcard entry is verboseLevel.
Returns the verbosity level (0,1,2,...).
Set number of events to generate to value. Equivalent runcard entry
is numberOfEvents.
Note that this is a user parameter and is only added for convenience since
it allows to set the number of events to generate through a runcard. See
example program sartreMain.cpp
for how to use.
Returns the number of events to generate. See setNumberOfEvents().
Defines how many times the current status (number of events generated so
far) should be printed. Equivalent runcard entry
is timesToShow.
Note that this is a user parameter and is only added for convenience since
it allows to set this useful parameter through a runcard. See
example program sartreMain.cpp
for how to use, or example above.
Returns user parameter meant to control status-printouts. See setTimesToShow().
Sets the minimum Q2 in GeV2 to generate to value.
If Q2min > Q2max
then the largest available range is used, either given by kinematics or the
range of the available tables. Equivalent runcard entry
is Q2min.
Returns minimum Q2 to generate (in GeV2). See also setQ2min(). Note that this is the parameter set by the user and is not necessarily the actual value used (see here for details).
Returns minimum Q to generate (in GeV). See also setQ2min() and Q2min(). Alternative form to above using Q not Q2. Note that this is the parameter set by the user and is not necessarily the actual value used (see here for details).
Sets the maximum Q2 in GeV2 to generate to value.
If Q2min > Q2max then the largest available range is used, either given
by kinematics or the range of the available tables. Equivalent runcard entry
is Q2max.
Returns maximum Q2 to generate (in GeV2). See also setQ2max(). Note that this is the parameter set by the user and is not necessarily the actual value used (see here for details).
Returns maximum Q to generate (in GeV). Alternative form to above using Q not Q2. See also setQ2max() and Q2max(). Note that this is the parameter set by the user and is not necessarily the actual value used (see here for details).
Sets the minimum W to generate (in GeV) to value.
If Wmin > Wmax then the largest available range is used, either given
by kinematics or the range of the available tables. Equivalent runcard entry
is Wmin.
Alternative form to above using W2 not W. No runcard equivalent.
Returns minimum W to generate (in GeV). Note that this is the parameter set by the user and is not necessarily the actual value used (see here for details).
Returns minimum W2 to generate (in GeV2). See also setW2min() and Wmin(). Note that this is the parameter set by the user and is not necessarily the actual value used (see here for details).
Sets the maximum W to generate (in GeV) to value. If
Wmin > Wmax then the largest available range is used, either given by
kinematics or the range of the available tables. Equivalent runcard entry
is Wmax.
Alternative form to above using W2 not W. No equivalent runcard. See also setWmax().
Returns maximum W to generate (in GeV). Note that this is the parameter set by the user and is not necessarily the actual value used (see here for details).
Returns maximum W2 to generate (in GeV2). Note that this is the parameter set by the user and is not necessarily the actual value used (see here for details).
Returns PDG value of vector meson to be generated.
Sets ID of vector meson to generate. Mesons are given using
their PDG values. Equivalent runcard entry
is vectorMesonId.
Electron beam energy in GeV.
Sets electron beam energy to E (in GeV). Equivalent runcard entry
is eBeamEnergy.
Hadron beam energy on GeV.
Sets electron beam energy to E (in GeV). Equivalent runcard entry
is hBeamEnergy.
Returns electron beam 4-vector. See ROOT documentation for TLorentzVector.
Returns hadron beam 4-vector. See ROOT documentation for TLorentzVector.
Returns name of dipole Model used.
Returns dipole model used.
Sets dipole model to be used. Equivalent runcard entry
is dipoleModel.
Returns name of root file (or any output file name). See also setRootfile().
Sets name of root file (or any output file name). Note that this is a user
parameter and is only added for convenience since it allows to set the name
of the output file via runcards. See example program sartreMain.cpp
on
how to use. Equivalent runcard entry
is rootfile.
Returns the (integer) mass of the hadron beam particle.
Returns the mass of the hadron beam particle to value (1=proton
beam). Not that not all nuclei are implemented (see class Nuclei for
details). Equivalent runcard entry
is A.
Whether the correction for the missing real amplitude is switched on or off.
Switch correction for real amplitude not being taken into account or or off.
Equivalent runcard entry is correctForRealAmplitude.
Whether the skewedness correction switched on or off.
Switch skewedness on or off. Equivalent runcard entry is correctSkewedness.
Returns if nuclear break up for incoherent events is switched on or off.
Switch nuclear break up for incoherent events on or off. Equivalent runcard
entry is enableNuclearBreakup.
Note
that switching nuclear breakup on slows event generation down significantly.
Maximum excitation energy of nuclei in incoherent events.
Sets the maximum excitation energy of nuclei in incoherent events to E (in
GeV). This is necessary since the underlying evaporation engine (Gemini)
cannot handle too large energies. Equivalent runcard
entry is maxNuclearExcitationEnergy.
Maximum log derivate of the amplitude used in corrections.
Sets the maximum log derivate of the amplitude used in corrections. See setCorrectSkewedness() and setCorrectForRealAmplitude().
Equivalent runcard entry is maxLambdaUsedInCorrections.
Returns flag that controls if the photon flux is applied to the cross-section or not.
Sets flag to control if the photon flux is applied in the cross-section calculation
or not. This should be always on in generator mode. There are few cases (see
example program heraCompare.cpp
) when Sartre is used to calculate cross-sections
only, where this might be useful. For experts only. Equivalent runcard entry
is applyPhotonFlux.
Returns flag that controls weather to use UPC.
Set flag to tell the program to simulate ultra peripheral collisions by using
a photon flux from a proton or a nucleus, depending on the value of UPCA.
Default value is false
.
Returns the atomic number of the beam-particle that emits a (virtual) photon
in UPC events. If UPC=false
, this variable has no effect.
Sets the atomic number of the beam-particle that emits a (virtual) photon in a UPC event.
Last Update: January 11, 2013 |