thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
Repository
EventGenerator.h
1
// -*- C++ -*-
2
//
3
// EventGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 1999-2019 Leif Lonnblad
5
//
6
// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef ThePEG_EventGenerator_H
10
#define ThePEG_EventGenerator_H
11
// This is the declaration of the EventGenerator class.
12
13
#include "
ThePEG/Config/ThePEG.h
"
14
#include "ThePEG/Utilities/Named.h"
15
#include "EventGenerator.fh"
16
#include "RandomGenerator.h"
17
#include "ThePEG/Repository/UseRandom.h"
18
#include "ThePEG/Repository/Strategy.h"
19
#include "ThePEG/Repository/CurrentGenerator.fh"
20
#include "ThePEG/Utilities/ClassDescription.h"
21
#include "ThePEG/Handlers/EventHandler.fh"
22
#include "ThePEG/Analysis/FactoryBase.fh"
23
#include <fstream>
24
#include "EventGenerator.xh"
25
26
namespace
ThePEG
{
27
68
class
EventGenerator
:
public
Interfaced
{
69
71
friend
class
Repository
;
72
73
public
:
74
77
//typedef map<const type_info *, int> ExceptionMap;
78
//typedef map<Exception, int, ExceptionComparison > ExceptionMap;
79
typedef
map<pair<string, Exception::Severity>,
int
>
ExceptionMap
;
80
81
public
:
82
88
EventGenerator
();
89
93
EventGenerator
(
const
EventGenerator
&);
94
98
virtual
~EventGenerator
();
100
101
public
:
102
108
tSMPtr
standardModel
()
const
{
return
theStandardModel
; }
109
114
tStrategyPtr
strategy
()
const
{
return
theStrategy
; }
115
119
tEHPtr
currentEventHandler
()
const
{
return
theCurrentEventHandler
; }
120
124
void
currentEventHandler
(
tEHPtr
eh) {
theCurrentEventHandler
= eh; }
125
129
tStepHdlPtr
currentStepHandler
()
const
{
return
theCurrentStepHandler
; }
130
134
void
currentStepHandler
(
tStepHdlPtr
sh) {
theCurrentStepHandler
= sh; }
135
139
tEHPtr
eventHandler
()
const
{
return
theEventHandler
; }
140
144
AnalysisVector
&
analysisHandlers
() {
return
theAnalysisHandlers
; }
145
150
tHistFacPtr
histogramFactory
()
const
{
return
theHistogramFactory
; }
151
155
tEvtManipPtr
manipulator
()
const
{
return
theEventManipulator
; }
157
158
public
:
159
166
void
initialize
(
bool
initOnly =
false
);
167
180
void
go
(
long
next = 1,
long
maxevent = -1,
bool
tics =
false
);
181
185
EventPtr
shoot
();
186
192
EventPtr
generateEvent
(
Event
& event);
193
199
EventPtr
generateEvent
(
Step
& step);
200
206
void
finalize
();
207
214
bool
loadMain
(
string
file);
215
221
virtual
Energy
maximumCMEnergy
()
const
;
222
226
long
currentEventNumber
()
const
{
return
ieve
; }
227
231
tcEventPtr
currentEvent
()
const
;
232
237
virtual
void
dump
()
const
;
238
243
void
use
(
const
Interfaced
& i);
244
249
void
setSeed
(
long
seed);
250
254
void
logWarning
(
const
Exception
&);
255
259
long
N
()
const
{
return
theNumberOfEvents
; }
260
266
CrossSection
histogramScale
()
const
;
267
272
CrossSection
integratedXSec
()
const
;
273
278
CrossSection
integratedXSecErr
()
const
;
279
283
double
sumWeights
()
const
{
return
weightSum
; }
285
297
string
filename
()
const
{
return
path
() +
"/"
+
runName
(); }
298
303
string
runName
()
const
{
return
theRunName
.size()?
theRunName
:
name
(); }
304
308
string
path
()
const
{
return
thePath
; }
309
314
bool
useStdOut
()
const
{
return
useStdout
; }
315
319
void
openOutputFiles
();
320
324
void
flushOutputFile
();
325
329
void
closeOutputFiles
();
330
334
ofstream &
outfile
() {
return
theOutfile
; }
335
339
ofstream &
logfile
() {
return
theLogfile
; }
340
346
ofstream &
reffile
() {
return
theReffile
; }
347
356
ostream &
out
();
357
363
ostream &
log
();
364
370
ostream &
misc
() {
371
return
theMiscStream
;
372
}
373
379
ostream &
ref
();
381
387
const
ObjectSet &
objects
()
const
{
return
theObjects
; }
388
389
393
const
ObjectMap &
objectMap
()
const
{
return
theObjectMap
; }
394
400
template
<
typename
T>
401
typename
Ptr<T>::pointer
getPtr
(
const
T &)
const
;
402
407
IBPtr
getPointer
(
string
name
)
const
;
408
415
template
<
typename
T>
416
typename
Ptr<T>::pointer
getObject
(
string
name
)
const
{
417
return
dynamic_ptr_cast<typename Ptr<T>::pointer>(
getPointer
(
name
));
418
}
419
424
template
<
typename
T>
425
typename
Ptr<T>::pointer
getDefault
()
const
;
426
431
PPtr
getParticle
(
PID
id
)
const
;
432
437
PDPtr
getParticleData
(
PID
id
)
const
;
438
443
const
MatcherSet &
matchers
()
const
{
return
theMatchers
; }
444
449
const
ParticleMap &
particles
()
const
{
return
theParticles
; }
450
455
const
ObjectSet &
used
()
const
{
return
usedObjects
; }
457
458
protected
:
459
464
void
checkSignalState
();
465
470
RandomGenerator
&
random
()
const
{
return
*
theRandom
; }
471
477
void
setup
(
string
newRunName, ObjectSet & newObjects,
478
ParticleMap & newParticles, MatcherSet & newMatchers);
479
485
virtual
void
doGo
(
long
next,
long
maxevent,
bool
tics);
486
490
virtual
void
doInitialize
(
bool
initOnly =
false
);
491
495
virtual
EventPtr
doShoot
();
496
501
void
tic
(
long
currev = 0,
long
totev = 0)
const
;
502
507
virtual
EventPtr
doGenerateEvent
(
tEventPtr
);
508
513
virtual
EventPtr
doGenerateEvent
(
tStepPtr
);
515
519
void
printException
(
const
Exception
&);
520
524
bool
logException
(
const
Exception
&,
tcEventPtr
);
525
529
void
N
(
long
n) {
theNumberOfEvents
= n; }
530
534
void
runName
(
string
f) {
theRunName
= f; }
535
536
public
:
537
542
virtual
void
addTag
(
string
tag) {
543
runName
(
runName
() + tag);
544
}
545
546
private
:
547
551
const
vector<IPtr> &
defaultObjects
()
const
{
return
theDefaultObjects
; }
552
557
ParticleMap &
localParticles
() {
return
theLocalParticles
; }
558
563
const
ParticleMap &
localParticles
()
const
{
return
theLocalParticles
; }
564
568
void
path
(
string
f) {
thePath
= f; }
569
574
void
strategy
(
StrategyPtr
);
575
579
string
doSaveRun
(
string
);
580
584
string
doMakeRun
(
string
);
585
586
public
:
587
610
bool
preinitRegister
(
IPtr
obj,
string
fullname);
611
630
IPtr
preinitCreate
(
string
classname,
string
fullname,
string
libraries =
""
);
631
632
649
string
preinitInterface
(
string
fullname,
string
ifcname,
string
cmd,
650
string
value);
651
672
string
preinitInterface
(
string
fullname,
string
ifcname,
int
index,
673
string
cmd,
string
value);
674
690
string
preinitInterface
(
IPtr
obj,
string
ifcname,
string
cmd,
string
value);
691
711
string
preinitInterface
(
IPtr
obj,
string
ifcname,
int
index,
712
string
cmd,
string
value);
713
717
bool
preinitRemove
(
IPtr
obj);
718
723
tDMPtr
findDecayMode
(
string
tag)
const
;
724
729
tDMPtr
preinitCreateDecayMode
(
string
tag);
730
735
tPDPtr
findParticle
(
string
pdgname)
const
;
736
741
tPMPtr
findMatcher
(
string
name
)
const
;
742
743
private
:
744
748
DMPtr
constructDecayMode
(
string
& tag);
749
751
752
public
:
753
754
761
void
persistentOutput
(
PersistentOStream
& os)
const
;
762
768
void
persistentInput
(
PersistentIStream
& is,
int
version);
769
773
const
vector<string> &
globalLibraries
()
const
{
774
return
theGlobalLibraries
;
775
}
776
778
782
static
void
Init
();
783
784
protected
:
785
792
virtual
IBPtr
clone
()
const
;
793
798
virtual
IBPtr
fullclone
()
const
;
800
801
protected
:
802
810
virtual
void
doinit
();
811
816
virtual
void
doinitrun
();
817
822
virtual
void
dofinish
();
823
828
void
finally
();
829
831
835
ObjectSet &
objects
() {
return
theObjects
; }
836
841
ObjectMap &
objectMap
() {
return
theObjectMap
; }
842
847
void
generateReferences
();
848
852
int
count
(
const
Exception
&);
853
854
private
:
855
856
860
vector<IPtr>
theDefaultObjects
;
861
865
ParticleMap
theLocalParticles
;
866
870
SMPtr
theStandardModel
;
871
876
StrategyPtr
theStrategy
;
877
881
RanGenPtr
theRandom
;
882
887
EHPtr
theEventHandler
;
888
892
AnalysisVector
theAnalysisHandlers
;
893
898
HistFacPtr
theHistogramFactory
;
899
903
EvtManipPtr
theEventManipulator
;
904
908
string
thePath
;
909
913
string
theRunName
;
914
918
ofstream
theOutfile
;
919
923
ofstream
theLogfile
;
924
928
ofstream
theReffile
;
929
935
ostringstream
theMiscStream
;
936
944
ostringstream
theOutStream
;
945
950
string
theOutFileName
;
951
955
long
theNumberOfEvents
;
956
960
ObjectSet
theObjects
;
961
965
ObjectMap
theObjectMap
;
966
971
ParticleMap
theParticles
;
977
PDVector
theQuickParticles
;
978
983
long
theQuickSize
;
984
990
bool
preinitializing
;
991
995
MatcherSet
theMatchers
;
996
1000
ObjectSet
usedObjects
;
1001
1002
protected
:
1003
1007
long
ieve
;
1008
1012
double
weightSum
;
1013
1017
int
theDebugLevel
;
1018
1019
private
:
1020
1026
int
logNonDefault
;
1027
1032
int
printEvent
;
1033
1040
long
dumpPeriod
;
1041
1046
bool
keepAllDumps
;
1047
1052
long
debugEvent
;
1053
1059
int
maxWarnings
;
1060
1066
int
maxErrors
;
1067
1073
ExceptionMap
theExceptions
;
1074
1075
private
:
1076
1080
void
setLocalParticles
(
PDPtr
pd,
int
);
1081
1085
void
insLocalParticles
(
PDPtr
pd,
int
);
1086
1090
void
delLocalParticles
(
int
place);
1091
1095
vector<PDPtr>
getLocalParticles
()
const
;
1096
1100
void
setPath
(
string
newPath);
1101
1105
string
defPath
()
const
;
1106
1113
UseRandom
*
theCurrentRandom
;
1114
1121
CurrentGenerator
*
theCurrentGenerator
;
1122
1126
tEHPtr
theCurrentEventHandler
;
1127
1131
tStepHdlPtr
theCurrentStepHandler
;
1132
1133
1137
bool
useStdout
;
1138
1142
bool
theIntermediateOutput
;
1143
1147
vector<string>
theGlobalLibraries
;
1148
1149
private
:
1150
1154
static
ClassDescription<EventGenerator>
initEventGenerator
;
1155
1159
EventGenerator
&
operator=
(
const
EventGenerator
&) =
delete
;
1160
1161
};
1162
1167
template
<>
1168
struct
BaseClassTrait
<
EventGenerator
,1>:
public
ClassTraitsType
{
1170
typedef
Interfaced
NthBase
;
1171
};
1172
1175
template
<>
1176
struct
ClassTraits<EventGenerator>:
public
ClassTraitsBase<EventGenerator> {
1178
static
string
className
() {
return
"ThePEG::EventGenerator"
; }
1179
};
1180
1183
}
1184
1185
#ifndef ThePEG_TEMPLATES_IN_CC_FILE
1186
#include "EventGenerator.tcc"
1187
#endif
1188
1189
#endif
/* ThePEG_EventGenerator_H */
ThePEG.h
This is the main config header file for ThePEG.
ThePEG::ClassDescription
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
Definition:
ClassDescription.h:333
ThePEG::CurrentGenerator
This CurrentGenerator class keeps a static stack of EventGenerators which can be used anywhere by any...
Definition:
CurrentGenerator.h:33
ThePEG::EventGenerator
The EventGenerator class manages a whole event generator run.
Definition:
EventGenerator.h:68
ThePEG::EventGenerator::theGlobalLibraries
vector< string > theGlobalLibraries
The global libraries needed for objects used in this EventGenerator.
Definition:
EventGenerator.h:1147
ThePEG::EventGenerator::flushOutputFile
void flushOutputFile()
Flush the content of the internal output string stream to the .out file.
ThePEG::EventGenerator::N
long N() const
The number of events to be generated in this run.
Definition:
EventGenerator.h:259
ThePEG::EventGenerator::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
ThePEG::EventGenerator::theStandardModel
SMPtr theStandardModel
Pointer to an object containing standard model parameters.
Definition:
EventGenerator.h:870
ThePEG::EventGenerator::theMatchers
MatcherSet theMatchers
The set of all matchers to be used in this run.
Definition:
EventGenerator.h:995
ThePEG::EventGenerator::clone
virtual IBPtr clone() const
Make a simple clone of this object.
ThePEG::EventGenerator::theDebugLevel
int theDebugLevel
The debug level.
Definition:
EventGenerator.h:1017
ThePEG::EventGenerator::theRunName
string theRunName
The name of this run.
Definition:
EventGenerator.h:913
ThePEG::EventGenerator::findMatcher
tPMPtr findMatcher(string name) const
Find a matcher in this run given its name.
ThePEG::EventGenerator::initEventGenerator
static ClassDescription< EventGenerator > initEventGenerator
Describe an abstract class with persistent data.
Definition:
EventGenerator.h:1154
ThePEG::EventGenerator::used
const ObjectSet & used() const
Return a reference to the set of objects which have been registered as used during the current run.
Definition:
EventGenerator.h:455
ThePEG::EventGenerator::openOutputFiles
void openOutputFiles()
Open all ouput files.
ThePEG::EventGenerator::generateReferences
void generateReferences()
Print out the .tex file with descriptions of and references to all models used in the run.
ThePEG::EventGenerator::theEventHandler
EHPtr theEventHandler
Pointer to the event handler used to generate the indivudual events.
Definition:
EventGenerator.h:887
ThePEG::EventGenerator::getPtr
Ptr< T >::pointer getPtr(const T &) const
Return a garbage collected pointer to a given object.
ThePEG::EventGenerator::theCurrentRandom
UseRandom * theCurrentRandom
The UseRandom object constructed for the duration of an EventGenerator run so that the default random...
Definition:
EventGenerator.h:1113
ThePEG::EventGenerator::theLogfile
ofstream theLogfile
A reference to the log file stream.
Definition:
EventGenerator.h:923
ThePEG::EventGenerator::runName
string runName() const
Return the name assigned to this run.
Definition:
EventGenerator.h:303
ThePEG::EventGenerator::currentEventHandler
tEHPtr currentEventHandler() const
Get the currently active EventHandler.
Definition:
EventGenerator.h:119
ThePEG::EventGenerator::theDefaultObjects
vector< IPtr > theDefaultObjects
A vector of default objects.
Definition:
EventGenerator.h:860
ThePEG::EventGenerator::shoot
EventPtr shoot()
Generate one event.
ThePEG::EventGenerator::theReffile
ofstream theReffile
A reference to the reference file stream.
Definition:
EventGenerator.h:928
ThePEG::EventGenerator::operator=
EventGenerator & operator=(const EventGenerator &)=delete
Private and non-existent assignment operator.
ThePEG::EventGenerator::doSaveRun
string doSaveRun(string)
Isolate, initialize and save this generator to a file.
ThePEG::EventGenerator::ExceptionMap
map< pair< string, Exception::Severity >, int > ExceptionMap
A map of integers giving the number of times an exception of the key type has been thrown.
Definition:
EventGenerator.h:79
ThePEG::EventGenerator::theEventManipulator
EvtManipPtr theEventManipulator
A pointer to an optional event manipulator object.
Definition:
EventGenerator.h:903
ThePEG::EventGenerator::useStdOut
bool useStdOut() const
Has the generator been asked to redirect everything to standard output?
Definition:
EventGenerator.h:314
ThePEG::EventGenerator::theParticles
ParticleMap theParticles
The map of all particles to be used in this run, indexed by the id number.
Definition:
EventGenerator.h:971
ThePEG::EventGenerator::theMiscStream
ostringstream theMiscStream
A stream to be used to redirect cout for external modules which prints out messages there.
Definition:
EventGenerator.h:935
ThePEG::EventGenerator::doGenerateEvent
virtual EventPtr doGenerateEvent(tEventPtr)
Finish generating an event constructed from the outside.
ThePEG::EventGenerator::constructDecayMode
DMPtr constructDecayMode(string &tag)
Used internally by preinitCreateDecayMode();.
ThePEG::EventGenerator::currentStepHandler
tStepHdlPtr currentStepHandler() const
Get the currently active step handler.
Definition:
EventGenerator.h:129
ThePEG::EventGenerator::theCurrentStepHandler
tStepHdlPtr theCurrentStepHandler
The currently active step handler.
Definition:
EventGenerator.h:1131
ThePEG::EventGenerator::defaultObjects
const vector< IPtr > & defaultObjects() const
Return the vector of default objects.
Definition:
EventGenerator.h:551
ThePEG::EventGenerator::usedObjects
ObjectSet usedObjects
The set of objects which have actually been used in this run.
Definition:
EventGenerator.h:1000
ThePEG::EventGenerator::finalize
void finalize()
Indicate that the run has ended and call finish() for all objects including this one.
ThePEG::EventGenerator::preinitCreateDecayMode
tDMPtr preinitCreateDecayMode(string tag)
Create a decay mode according to the given tag.
ThePEG::EventGenerator::particles
const ParticleMap & particles() const
Return a reference to the complete map of particle data objects in this generator,...
Definition:
EventGenerator.h:449
ThePEG::EventGenerator::random
RandomGenerator & random() const
Return a reference to the default RandomGenerator object in this run.
Definition:
EventGenerator.h:470
ThePEG::EventGenerator::currentEventHandler
void currentEventHandler(tEHPtr eh)
Set the currently active EventHandler.
Definition:
EventGenerator.h:124
ThePEG::EventGenerator::theNumberOfEvents
long theNumberOfEvents
Number of events to be generated in this run.
Definition:
EventGenerator.h:955
ThePEG::EventGenerator::filename
string filename() const
The base filename used in this run.
Definition:
EventGenerator.h:297
ThePEG::EventGenerator::doGo
virtual void doGo(long next, long maxevent, bool tics)
Run this EventGenerator session.
ThePEG::EventGenerator::logNonDefault
int logNonDefault
List all modified interfaces in the log file.
Definition:
EventGenerator.h:1026
ThePEG::EventGenerator::findParticle
tPDPtr findParticle(string pdgname) const
Find a particle in this run, using its PDG name.
ThePEG::EventGenerator::go
void go(long next=1, long maxevent=-1, bool tics=false)
Run this EventGenerator session.
ThePEG::EventGenerator::theQuickSize
long theQuickSize
Only particles with id number less than theQuickSize are available in theQuickParticles.
Definition:
EventGenerator.h:983
ThePEG::EventGenerator::path
void path(string f)
Set the directory where the output files will be stored.
Definition:
EventGenerator.h:568
ThePEG::EventGenerator::theObjectMap
ObjectMap theObjectMap
All objects to be used in this run mapped to their name.
Definition:
EventGenerator.h:965
ThePEG::EventGenerator::useStdout
bool useStdout
Whether to use files or stdout for logging and output.
Definition:
EventGenerator.h:1137
ThePEG::EventGenerator::defPath
string defPath() const
Utility function for the interface.
ThePEG::EventGenerator::dump
virtual void dump() const
Dump the full state of the current run - including the number of generated events,...
ThePEG::EventGenerator::setLocalParticles
void setLocalParticles(PDPtr pd, int)
Utility function for the interface.
ThePEG::EventGenerator::theExceptions
ExceptionMap theExceptions
A map of all Exceptions which have been caught by the event generator and the number of time each exc...
Definition:
EventGenerator.h:1073
ThePEG::EventGenerator::preinitInterface
string preinitInterface(string fullname, string ifcname, string cmd, string value)
Manipulate an interface of an Interfaced object.
ThePEG::EventGenerator::logException
bool logException(const Exception &, tcEventPtr)
Log a given exception.
ThePEG::EventGenerator::setSeed
void setSeed(long seed)
Set the random seed for the global random number generator.
ThePEG::EventGenerator::doinitrun
virtual void doinitrun()
Initialize this object.
ThePEG::EventGenerator::sumWeights
double sumWeights() const
The sum of all weight of the events generated so far.
Definition:
EventGenerator.h:283
ThePEG::EventGenerator::N
void N(long n)
Set number of events to be generated.
Definition:
EventGenerator.h:529
ThePEG::EventGenerator::~EventGenerator
virtual ~EventGenerator()
Destructor.
ThePEG::EventGenerator::runName
void runName(string f)
Set the name of this run.
Definition:
EventGenerator.h:534
ThePEG::EventGenerator::preinitInterface
string preinitInterface(string fullname, string ifcname, int index, string cmd, string value)
Manipulate an interface of vector type (RefVector or ParVector) of an Interfaced object.
ThePEG::EventGenerator::delLocalParticles
void delLocalParticles(int place)
Utility function for the interface.
ThePEG::EventGenerator::EventGenerator
EventGenerator()
Default constructor.
ThePEG::EventGenerator::getLocalParticles
vector< PDPtr > getLocalParticles() const
Utility function for the interface.
ThePEG::EventGenerator::getObject
Ptr< T >::pointer getObject(string name) const
Return a pointer to an object of type T present in this run given its full name.
Definition:
EventGenerator.h:416
ThePEG::EventGenerator::maxWarnings
int maxWarnings
The maximum number of warnings reported of each type.
Definition:
EventGenerator.h:1059
ThePEG::EventGenerator::tic
void tic(long currev=0, long totev=0) const
Write out the number of events generated and the elapsed time in suitable periods.
ThePEG::EventGenerator::eventHandler
tEHPtr eventHandler() const
Return a pointer to the EventHandler.
Definition:
EventGenerator.h:139
ThePEG::EventGenerator::theHistogramFactory
HistFacPtr theHistogramFactory
A pointer to an associated factory objects for handling histograms to be used by AnalysisHandlers.
Definition:
EventGenerator.h:898
ThePEG::EventGenerator::out
ostream & out()
This stream should be used for output of information and statistics of an EventGenerator run in the f...
ThePEG::EventGenerator::preinitInterface
string preinitInterface(IPtr obj, string ifcname, int index, string cmd, string value)
Manipulate an interface of vector type (RefVector or ParVector) of an Interfaced object.
ThePEG::EventGenerator::ref
ostream & ref()
Return a reference to the stream connected to the filea for references from used objects.
ThePEG::EventGenerator::maxErrors
int maxErrors
The maximum number of warnings and errors reported of each type.
Definition:
EventGenerator.h:1066
ThePEG::EventGenerator::manipulator
tEvtManipPtr manipulator() const
Return the EventManipulator used in the run.
Definition:
EventGenerator.h:155
ThePEG::EventGenerator::strategy
tStrategyPtr strategy() const
Return a pointer to the strategy object containing a set of non-default particles to use.
Definition:
EventGenerator.h:114
ThePEG::EventGenerator::addTag
virtual void addTag(string tag)
Append a tag to the run name.
Definition:
EventGenerator.h:542
ThePEG::EventGenerator::dofinish
virtual void dofinish()
Finalize this object.
ThePEG::EventGenerator::preinitRemove
bool preinitRemove(IPtr obj)
Remove the object.
ThePEG::EventGenerator::getParticle
PPtr getParticle(PID id) const
Create a particle instance corresponding to the given id number.
ThePEG::EventGenerator::histogramScale
CrossSection histogramScale() const
Histogram scale.
ThePEG::EventGenerator::objects
const ObjectSet & objects() const
Return the set of objects used in this run.
Definition:
EventGenerator.h:387
ThePEG::EventGenerator::generateEvent
EventPtr generateEvent(Step &step)
Finish generating an event starting from a step which has already been partially constructed from the...
ThePEG::EventGenerator::getPointer
IBPtr getPointer(string name) const
Return a pointer to an object present in this run given its full name.
ThePEG::EventGenerator::currentStepHandler
void currentStepHandler(tStepHdlPtr sh)
Set the currently active step handler.
Definition:
EventGenerator.h:134
ThePEG::EventGenerator::objectMap
ObjectMap & objectMap()
Return the map of all objects to be used in this run indexed by their name.
Definition:
EventGenerator.h:841
ThePEG::EventGenerator::misc
ostream & misc()
Return a reference to a stream to be used to redirect cout for external modules which prints out mess...
Definition:
EventGenerator.h:370
ThePEG::EventGenerator::theObjects
ObjectSet theObjects
The set of all objects to be used in this run.
Definition:
EventGenerator.h:960
ThePEG::EventGenerator::preinitCreate
IPtr preinitCreate(string classname, string fullname, string libraries="")
Create a new Interfaced object to be used in the run being initialized.
ThePEG::EventGenerator::insLocalParticles
void insLocalParticles(PDPtr pd, int)
Utility function for the interface.
ThePEG::EventGenerator::matchers
const MatcherSet & matchers() const
Return a reference to the complete list of matchers in this generator.
Definition:
EventGenerator.h:443
ThePEG::EventGenerator::outfile
ofstream & outfile()
Return a reference to the output file stream.
Definition:
EventGenerator.h:334
ThePEG::EventGenerator::theOutStream
ostringstream theOutStream
A string stream used as a buffer for messages written to the .out file.
Definition:
EventGenerator.h:944
ThePEG::EventGenerator::standardModel
tSMPtr standardModel() const
Return a pointer to the standard model parameters.
Definition:
EventGenerator.h:108
ThePEG::EventGenerator::strategy
void strategy(StrategyPtr)
Set a pointer to the strategy object containing a set of non-default particles to use.
ThePEG::EventGenerator::getDefault
Ptr< T >::pointer getDefault() const
Return the default object for class T.
ThePEG::EventGenerator::localParticles
ParticleMap & localParticles()
Access the special particles used in this generator.
Definition:
EventGenerator.h:557
ThePEG::EventGenerator::reffile
ofstream & reffile()
Return a reference to the reference file stream.
Definition:
EventGenerator.h:346
ThePEG::EventGenerator::keepAllDumps
bool keepAllDumps
If this flag is true, keep all dump files of the run, labelled by event number.
Definition:
EventGenerator.h:1046
ThePEG::EventGenerator::weightSum
double weightSum
The sum of the weights of the events produced so far.
Definition:
EventGenerator.h:1012
ThePEG::EventGenerator::objectMap
const ObjectMap & objectMap() const
Return the map of objects used in this run indexed by their name.
Definition:
EventGenerator.h:393
ThePEG::EventGenerator::doGenerateEvent
virtual EventPtr doGenerateEvent(tStepPtr)
Finish generating an event starting from a Step constructed from the outside.
ThePEG::EventGenerator::analysisHandlers
AnalysisVector & analysisHandlers()
Return the vector of analysis objects to be used in the run.
Definition:
EventGenerator.h:144
ThePEG::EventGenerator::theAnalysisHandlers
AnalysisVector theAnalysisHandlers
A vector of all analysis handlers to be called after each event.
Definition:
EventGenerator.h:892
ThePEG::EventGenerator::use
void use(const Interfaced &i)
Register a given object as used.
ThePEG::EventGenerator::getParticleData
PDPtr getParticleData(PID id) const
Return a pointer to the ParticleData object corresponding to the given id number.
ThePEG::EventGenerator::loadMain
bool loadMain(string file)
Dynamically load the Main class in the given file, making it run its Init() method where it may use t...
ThePEG::EventGenerator::initialize
void initialize(bool initOnly=false)
Initialize this generator.
ThePEG::EventGenerator::doInitialize
virtual void doInitialize(bool initOnly=false)
Initialize this generator.
ThePEG::EventGenerator::theOutFileName
string theOutFileName
Remember the name of the file where the output should be sent.
Definition:
EventGenerator.h:950
ThePEG::EventGenerator::maximumCMEnergy
virtual Energy maximumCMEnergy() const
Return the maximum center of mass energy possible for an event.
ThePEG::EventGenerator::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
ThePEG::EventGenerator::Init
static void Init()
Standard Init function used to initialize the interface.
ThePEG::EventGenerator::doinit
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
ThePEG::EventGenerator::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
ThePEG::EventGenerator::thePath
string thePath
The directory where the input and output files resides.
Definition:
EventGenerator.h:908
ThePEG::EventGenerator::findDecayMode
tDMPtr findDecayMode(string tag) const
Find a decaymode given a decay tag.
ThePEG::EventGenerator::preinitializing
bool preinitializing
A flag to tell if we are in the pre-initialization phase where objects with preInitialize() functions...
Definition:
EventGenerator.h:990
ThePEG::EventGenerator::count
int count(const Exception &)
Increase and return the count for the given exception.
ThePEG::EventGenerator::theCurrentEventHandler
tEHPtr theCurrentEventHandler
The currently active EventHandler.
Definition:
EventGenerator.h:1126
ThePEG::EventGenerator::currentEventNumber
long currentEventNumber() const
The number of the event currently being generated.
Definition:
EventGenerator.h:226
ThePEG::EventGenerator::debugEvent
long debugEvent
If the debug level is higher than 0, step up to the highest debug level just before the event with nu...
Definition:
EventGenerator.h:1052
ThePEG::EventGenerator::integratedXSec
CrossSection integratedXSec() const
The total integrated cross section of the processes generated in this run.
ThePEG::EventGenerator::preinitRegister
bool preinitRegister(IPtr obj, string fullname)
Register a new object to be included in the run currently being initialized.
ThePEG::EventGenerator::theLocalParticles
ParticleMap theLocalParticles
Map of non-default particles used in this EventGenerator.
Definition:
EventGenerator.h:865
ThePEG::EventGenerator::theIntermediateOutput
bool theIntermediateOutput
Whether to use a modified event number count.
Definition:
EventGenerator.h:1142
ThePEG::EventGenerator::printException
void printException(const Exception &)
Print the message of an exception to the log file.
ThePEG::EventGenerator::theQuickParticles
PDVector theQuickParticles
A vector of particles indexed by the id number for quick access.
Definition:
EventGenerator.h:977
ThePEG::EventGenerator::checkSignalState
void checkSignalState()
Check if there has been an interrupt signal from the OS.
ThePEG::EventGenerator::integratedXSecErr
CrossSection integratedXSecErr() const
The error estimate for the total integrated cross section of the processes generated in this run.
ThePEG::EventGenerator::doMakeRun
string doMakeRun(string)
Isolate and initialize this generator.
ThePEG::EventGenerator::globalLibraries
const vector< string > & globalLibraries() const
The global libraries needed for objects used in this EventGenerator.
Definition:
EventGenerator.h:773
ThePEG::EventGenerator::EventGenerator
EventGenerator(const EventGenerator &)
Copy-constructor.
ThePEG::EventGenerator::theCurrentGenerator
CurrentGenerator * theCurrentGenerator
The CurrentGenerator object constructed for the duration of an EventGenerator run so that the default...
Definition:
EventGenerator.h:1121
ThePEG::EventGenerator::objects
ObjectSet & objects()
Return the set of all objects to be used in this run.
Definition:
EventGenerator.h:835
ThePEG::EventGenerator::printEvent
int printEvent
If the debug level is higher than 0, print the first 'printEvent' events to the logfile.
Definition:
EventGenerator.h:1032
ThePEG::EventGenerator::localParticles
const ParticleMap & localParticles() const
Access the special particles used in this generator.
Definition:
EventGenerator.h:563
ThePEG::EventGenerator::log
ostream & log()
Return a reference to the stream connected to the file for logging information.
ThePEG::EventGenerator::doShoot
virtual EventPtr doShoot()
Generate one event.
ThePEG::EventGenerator::generateEvent
EventPtr generateEvent(Event &event)
Finish generating an event which has already been partially constructed from the outside.
ThePEG::EventGenerator::setup
void setup(string newRunName, ObjectSet &newObjects, ParticleMap &newParticles, MatcherSet &newMatchers)
Finish the setup of an event generator run.
ThePEG::EventGenerator::setPath
void setPath(string newPath)
Utility function for the interface.
ThePEG::EventGenerator::logWarning
void logWarning(const Exception &)
Log a given exception.
ThePEG::EventGenerator::closeOutputFiles
void closeOutputFiles()
Close all ouput files.
ThePEG::EventGenerator::dumpPeriod
long dumpPeriod
If the debug level is higher than 0, dump the complete state of this run to the default dump file eve...
Definition:
EventGenerator.h:1040
ThePEG::EventGenerator::ieve
long ieve
The current event number;.
Definition:
EventGenerator.h:1007
ThePEG::EventGenerator::preinitInterface
string preinitInterface(IPtr obj, string ifcname, string cmd, string value)
Manipulate an interface of an Interfaced object.
ThePEG::EventGenerator::currentEvent
tcEventPtr currentEvent() const
Return the event being generated.
ThePEG::EventGenerator::logfile
ofstream & logfile()
Return a reference to the log file stream.
Definition:
EventGenerator.h:339
ThePEG::EventGenerator::theOutfile
ofstream theOutfile
A reference to the output file stream.
Definition:
EventGenerator.h:918
ThePEG::EventGenerator::theStrategy
StrategyPtr theStrategy
Pointer to a strategy object with other non-default particles to be used in this EventGenerator.
Definition:
EventGenerator.h:876
ThePEG::EventGenerator::path
string path() const
The directory in which the filename() is located.
Definition:
EventGenerator.h:308
ThePEG::EventGenerator::theRandom
RanGenPtr theRandom
Pointer to the default RandomGenerator to be used in this run.
Definition:
EventGenerator.h:881
ThePEG::EventGenerator::histogramFactory
tHistFacPtr histogramFactory() const
Return a pointer to an associated factory objects for handling histograms to be used by AnalysisHandl...
Definition:
EventGenerator.h:150
ThePEG::Event
The Event class contains all Particles produced in the generation of an event.
Definition:
Event.h:37
ThePEG::Exception
Exception is the base class for all exceptions to be used in ThePEG.
Definition:
Exception.h:44
ThePEG::InterfacedBase::name
string name() const
Returns the name of this object, without the path.
Definition:
InterfacedBase.h:88
ThePEG::Interfaced
The Interfaced class is derived from the InterfacedBase class adding a couple of things particular to...
Definition:
Interfaced.h:38
ThePEG::PID
PID is a helper class implementing the type of PDG particle ids.
Definition:
PID.h:23
ThePEG::PersistentIStream
PersistentIStream is used to read persistent objects from a stream where they were previously written...
Definition:
PersistentIStream.h:48
ThePEG::PersistentOStream
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
Definition:
PersistentOStream.h:51
ThePEG::Pointer::RCPtr
RCPtr is a reference counted (smart) pointer.
Definition:
RCPtr.h:60
ThePEG::Pointer::TransientConstRCPtr
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition:
RCPtr.h:696
ThePEG::Pointer::TransientRCPtr
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition:
RCPtr.h:519
ThePEG::Qty< std::ratio< L, DL >, std::ratio< E, DE >, std::ratio< Q, DQ > >
Definition:
PhysicalQty.h:77
ThePEG::Qty< 0, 1, 0 >
ThePEG::RandomGenerator
RandomGenerator is an interface to the CLHEP::RandomEngine classes.
Definition:
RandomGenerator.h:37
ThePEG::Repository
Repository inherits from the BaseRepository class.
Definition:
Repository.h:45
ThePEG::Step
The Step class contains information of all particles present after certain step in the event generati...
Definition:
Step.h:34
ThePEG::UseRandom
This UseRandom class keeps a static stack of RandomGenerator objects which can be used anywhere by an...
Definition:
UseRandom.h:33
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::PDVector
vector< PDPtr > PDVector
A vector of pointers to ParticleData objects.
Definition:
Containers.h:33
ThePEG::AnalysisVector
vector< AnaPtr > AnalysisVector
A vector of pointers to AnalysisHandler objects.
Definition:
Containers.h:112
ThePEG::BaseClassTrait
BaseClassTraits describes the base classes of the templated class.
Definition:
ClassTraits.h:156
ThePEG::BaseClassTrait::NthBase
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition:
ClassTraits.h:161
ThePEG::ClassTraitsBase::className
static string className()
Return the name of class T.
Definition:
ClassTraits.h:66
ThePEG::ClassTraitsType
ClassTraitsType is an empty, non-polymorphic, base class.
Definition:
ClassTraits.h:30
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6