10 #define ThePEG_Event_H 15 #include "SubProcess.h" 16 #include "ThePEG/Utilities/Named.h" 66 string newName =
"",
long newNumber = -1,
double weight = 1.0);
102 template <
class OutputIterator>
110 template <
class OutputIterator>
120 template <
class Container>
252 long newNumber,
double weight);
269 template <
class Iterator>
410 Event() : theNumber(-1), theWeight(1.0), theParticleNumber(0) {}
446 static string className() {
return "ThePEG::Event"; }
448 static TPtr create() {
return TPtr::Create(
Event()); }
455 #include "Collision.h" 463 template <
class OutputIterator>
466 for ( CollisionVector::const_iterator it =
theCollisions.begin();
PersistentIStream is used to read persistent objects from a stream where they were previously written...
void addStep(tStepPtr s)
Add a new Step to this Collision.
void removeParticle(tPPtr)
Remove the given Particle from the Collision.
The EventHandler is the base class used to implement event handlers in ThePEG.
ParticleSet allParticles
A set of all particles in this Event.
Define the base class from which all (polymorphic) classes in ThePEG are derived. ...
ClassTraitsType is an empty, non-polymorphic, base class.
The Event class contains all Particles produced in the generation of an event.
Classes derived from the SelectorBase class are used to extract particles from an Event with Event::s...
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
void getFinalState(Container &c) const
Extract all final state particles in this Event.
void persistentOutput(PersistentOStream &) const
Standard function for writing to a persistent stream.
void printGraphviz() const
Print this Event in Graphviz format on the standard output.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
int colourLineIndex(tcColinePtr) const
Return the index of the given colour line.
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Ptr< EventRecordBase >::transient_const_pointer tcEventBasePtr
Alias for a transient pointer to const EventRecordBase.
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
void removeDecay(tPPtr)
Remove (recursively) the decay products from a given Particle and add the particle to the list of fin...
long theNumber
The number assigned to this Event.
Rebinder is a class associating pairs of pointers to objects.
void addSubProcess(tSubProPtr p)
Add a new SubProcess to this Event.
long theParticleNumber
Counter to keep track of particle numbering.
static void Init()
Standard Init function.
This is the main namespace within which all identifiers in ThePEG are declared.
The Named class is a simple concrete base class to used by classes of objects with a name...
std::insert_iterator< Cont > inserter(Cont &c)
Return an insert iterator for a given container.
const string & name() const
Return name.
double theWeight
The weight associated with this event.
EventPtr clone() const
Returns a full clone of this Event.
tPVector getFinalState() const
Extract all final state particles in this Event.
Event & operator=(const Event &)
The assignment operator is private and not implemented.
StepSet allSteps
A set of all particles in this Event.
void selectFinalState(OutputIterator r) const
Extract all final state particles in this Event.
tCollPtr primaryCollision() const
Return a pointer to the primary Collision in this Event.
void weight(double w)
Set the weight associated with this event.
void cleanSteps()
Remove all steps which have no new particles introduced in them.
set< PPtr, less< PPtr > > ParticleSet
A set of pointers to Particle.
map< tcColinePtr, int > ColourLineMap
Map colour lines to indices.
CollisionVector theCollisions
A vector of collisions in this Event.
PPair theIncoming
The pair of colliding particles.
void persistentInput(PersistentIStream &, int)
Standard functions for reading from a persistent stream.
ThePEG::Ptr< SubProcess >::transient_pointer tSubProPtr
Alias for a transient pointer to SubProcess .
virtual void debugme() const
Print out debugging information for this object on std::cerr.
ColourLineMap theColourLines
Map of all registered colour lines to their index numbers.
pair< PPtr, PPtr > PPair
A pair of pointers to Particle objects.
const CollisionVector & collisions() const
Return a possibly empty list of collisions in this Event.
RCPtr is a reference counted (smart) pointer.
void removeEntry(tPPtr p)
Remove a given Particle entry.
long number() const
Return the number assigned to this Event.
Event()
Private default constructor must only be used by the PersistentIStream class via the ClassTraits<Even...
map< string, double > & optionalWeights()
Access the optional named weights associated to this event.
void transform(const LorentzRotation &)
Transform all particles in this Event.
const PPair & incoming() const
Return a reference to the pair of colliding particles in the primary Collision of this Event...
tcEventBasePtr theHandler
A pointer to the EventHandler which performed the generation of this Event.
void setInfo(tcEventBasePtr newHandler, string newName, long newNumber, double weight)
Set event info.
ThePEG::Ptr< Collision >::transient_pointer tCollPtr
Alias for a transient pointer to Collision .
This is the decalaration of the Collision class.
vector< CollPtr > CollisionVector
A vector of pointers to Collision.
void addCollision(tCollPtr c)
Add a collision to this Event.
SubProcessSet allSubProcesses
A set of all sub-processes in this Event.
tSubProPtr primarySubProcess() const
Return a pointer to the primary SubProcess in the prinmary Collision in this Event.
void addParticles(Iterator first, Iterator last)
Add a range of particles to this Collision.
double optionalWeight(const string &name) const
Return an optional named weight associated to this event.
The default concrete implementation of ClassTraitsBase.
void select(OutputIterator r, const SelectorBase &s) const
Extract particles from this event which satisfies the requirements given by an object of the Selector...
vector< T > & operator<<(vector< T > &tv, const U &u)
Overload the left shift operator for vector to push_back objects to a vector.
static ClassDescription< Event > initEvent
Describe concrete class with persistent data.
tStepPtr newStep()
Create a new Step in the current Collision, which is a copy of the last Step (if any) and return a po...
tCollPtr newCollision()
Create a new Collision in this event and return a pointer to it.
map< string, double > theOptionalWeights
Optional named weights.
vector< tPPtr > tPVector
A vector of transient pointers to Particle objects.
This file contains declarations of standard selector classes.
set< StepPtr, less< StepPtr > > StepSet
A set of pointers to Step.
const map< string, double > & optionalWeights() const
Return the optional named weights associated to this event.
void rebind(const EventTranslationMap &trans)
Rebind to cloned objects.
tcEventBasePtr handler() const
Return a pointer to the EventHandler which produced this Event.
BaseClassTraits describes the base classes of the templated class.
ParticleSelector< FinalStateSelector > SelectFinalState
Typedef to declare a selector used to extract all final state particles from an event.
double weight() const
Return the weight associated with this event.
void removeSubProcess(tSubProPtr p)
Remove a SubProcess from this Event.
void addParticle(tPPtr p)
Add a particle to this Collision.
virtual bool allCollisions() const
Return ture if all collisions should be considered.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
set< SubProPtr, less< SubProPtr > > SubProcessSet
A set of pointers to SubProcess.