thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
SubProcess.h
1// -*- C++ -*-
2//
3// SubProcess.h is a part of ThePEG - Toolkit for HEP Event Generation
4// Copyright (C) 1999-2019 Leif Lonnblad
5// Copyright (C) 2009-2019 Simon Platzer
6//
7// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
8// Please respect the MCnet academic guidelines, see GUIDELINES for details.
9//
10#ifndef ThePEG_SubProcess_H
11#define ThePEG_SubProcess_H
12// This is the declaration of the SubProcess class.
13
14
15#include <vector>
16#include "ThePEG/EventRecord/Particle.h"
17
18namespace ThePEG {
19
20 class SubProcessGroup;
21
34
35public:
36
38 friend class Step;
40 friend class Collision;
42 friend class SubProcessGroup;
43
44public:
45
52 SubProcess(const PPair & newIncoming,
53 tCollPtr newCollision = tCollPtr(),
54 tcEventBasePtr newHandler = tcEventBasePtr(),
55 tSubProPtr newHead = tSubProPtr(),
56 double newGroupWeight = 1.0);
57
61 virtual ~SubProcess();
62
66 tcEventBasePtr handler() const { return theHandler; }
67
71 tCollPtr collision() const { return theCollision; }
72
76 const PPair & incoming() const { return theIncoming; }
77
81 const ParticleVector & intermediates() const { return theIntermediates; }
82
86 const ParticleVector & outgoing() const { return theOutgoing; }
87
91 template <class InputIterator>
92 void setOutgoing(InputIterator, InputIterator);
93
99 void addOutgoing(tPPtr p, bool fixrelations = true);
100
104 void changeIncoming(tPPtr pnew, tPPtr pold);
105
109 template <class InputIterator>
110 void setIntermediates(InputIterator, InputIterator);
111
117 void addIntermediate(tPPtr p, bool fixrelations = true);
118
123
127 virtual SubProPtr clone() const;
128
133 bool decayed() const { return isDecayed; }
134
139 void decayed(bool x) { isDecayed = x; }
140
147 tSubProPtr head() const { return theHead; }
148
152 void head(tSubProPtr newHead) { theHead = newHead; }
153
159 double groupWeight() const { return theGroupWeight; }
160
166 void groupWeight(double w) { theGroupWeight = w; }
167
168protected:
169
177 virtual void rebind(const EventTranslationMap & trans);
178
179
180public:
181
186 virtual void transform(const LorentzRotation &);
187
192 Energy2 shat() const {
193 return (incoming().first->momentum() + incoming().second->momentum()).m2();
194 }
195
201 Energy2 that() const {
202 return (incoming().first->momentum() - outgoing()[0]->momentum()).m2();
203 }
204
210 Energy2 uhat() const {
211 return (incoming().second->momentum() - outgoing()[0]->momentum()).m2();
212 }
213
214public:
215
220
225
229 static void Init();
230
231private:
232
237
242
247
252
257
262
270
277
278public:
279
284 virtual void debugme() const;
285
289 virtual void printMe(ostream&) const;
290
291private:
292
297
302
307 friend struct ClassTraits<SubProcess>;
308
312 SubProcess & operator=(const SubProcess &) = delete;
313
314};
315
317ostream & operator<<(ostream &, const SubProcess &);
318
319
324template <>
325struct BaseClassTrait<SubProcess,1>: public ClassTraitsType {
327 typedef EventRecordBase NthBase;
328};
329
332template <>
333struct ClassTraits<SubProcess>: public ClassTraitsBase<SubProcess> {
335 static string className() { return "ThePEG::SubProcess"; }
337 static TPtr create() { return TPtr::Create(SubProcess()); }
338};
339
342}
343
344#ifndef ThePEG_TEMPLATES_IN_CC_FILE
345#include "SubProcess.tcc"
346#endif
347
348#endif /* ThePEG_SubProcess_H */
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
This is the decalaration of the Collision class.
Definition: Collision.h:34
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
PersistentIStream is used to read persistent objects from a stream where they were previously written...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
static RCPtr Create()
Allocate and construct an object of class T and return a RCPtr to it.
Definition: RCPtr.h:120
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
Rebinder is a class associating pairs of pointers to objects.
Definition: Rebinder.h:27
The Step class contains information of all particles present after certain step in the event generati...
Definition: Step.h:34
A SubProcessGroup object represents a group of SubProcess objects in dependence of a head SubProcess ...
A SubProcess object represents a hard sub-process in a collision.
Definition: SubProcess.h:33
void changeIncoming(tPPtr pnew, tPPtr pold)
Change the incoming parton.
SubProcess()
Default constructor.
Definition: SubProcess.h:296
const PPair & incoming() const
The pair of incoming partons.
Definition: SubProcess.h:76
tcEventBasePtr handler() const
A pointer to the MEBase object which generated this SubProcess.
Definition: SubProcess.h:66
virtual void debugme() const
Print out debugging information for this object on std::cerr.
virtual void rebind(const EventTranslationMap &trans)
Rebind to cloned objects.
tCollPtr collision() const
A pointer to the collision to which this sub-process belongs.
Definition: SubProcess.h:71
Energy2 shat() const
Return the value of the Mandelstam variable in this SubProcess.
Definition: SubProcess.h:192
Energy2 that() const
Return the value of the Mandelstam variable in this SubProcess.
Definition: SubProcess.h:201
void setOutgoing(InputIterator, InputIterator)
Set the vector of outgoing particles.
SubProcess(const PPair &newIncoming, tCollPtr newCollision=tCollPtr(), tcEventBasePtr newHandler=tcEventBasePtr(), tSubProPtr newHead=tSubProPtr(), double newGroupWeight=1.0)
Standard constructor.
tcEventBasePtr theHandler
A pointer to the MEBase object which generated this sub-process.
Definition: SubProcess.h:236
void persistentOutput(PersistentOStream &) const
Standard function for writing to a persistent stream.
tCollPtr theCollision
A pointer to the collision to which this sub-process belongs.
Definition: SubProcess.h:241
PPair theIncoming
The pair of incoming particles.
Definition: SubProcess.h:246
void addOutgoing(tPPtr p, bool fixrelations=true)
Add a particle to the list of outgoing ones.
virtual void printMe(ostream &) const
Put to ostream.
virtual SubProPtr clone() const
Return a clone of this sub process.
bool isDecayed
True if a perturbative cascade has been applied to this sub process.
Definition: SubProcess.h:261
ParticleVector theIntermediates
The vector of intermediate particles,.
Definition: SubProcess.h:251
tSubProPtr theHead
The head SubProcess, if this SubProcess object belongs to a SubProcessGroup.
Definition: SubProcess.h:269
tSubProPtr head() const
Return the head SubProcess, if this SubProcess object belongs to a SubProcessGroup.
Definition: SubProcess.h:147
void setIntermediates(InputIterator, InputIterator)
Set the vector of intermediate particles.
Energy2 uhat() const
Return the value of the Mandelstam variable in this SubProcess.
Definition: SubProcess.h:210
double theGroupWeight
If this SubProcess belongs to a SubProcessGroup, this gives its relative weight w....
Definition: SubProcess.h:276
void groupWeight(double w)
If this SubProcess belongs to a SubProcessGroup, set its relative weight w.r.t.
Definition: SubProcess.h:166
ParticleVector theOutgoing
The vector of outgoing particles.
Definition: SubProcess.h:256
void removeEntry(tPPtr p)
Remove a particle entry from this sub-process.
virtual ~SubProcess()
Destructor.
virtual void transform(const LorentzRotation &)
Perform a LorentzTransformation of all particles in the sub process.
void addIntermediate(tPPtr p, bool fixrelations=true)
Add a particle to the list of intermediate ones.
void decayed(bool x)
Set to true if a perturbative cascade has been applied to this sub process.
Definition: SubProcess.h:139
double groupWeight() const
If this SubProcess belongs to a SubProcessGroup, return its relative weight w.r.t.
Definition: SubProcess.h:159
static void Init()
Standard Init function.
const ParticleVector & outgoing() const
A reference to the vector of outgoing particles.
Definition: SubProcess.h:86
bool decayed() const
True if a perturbative cascade has been applied to this sub process.
Definition: SubProcess.h:133
SubProcess & operator=(const SubProcess &)=delete
Assignment is forbidden.
void persistentInput(PersistentIStream &, int)
Standard function for reading from a persistent stream.
static ClassDescription< SubProcess > initSubProcess
Describe concrete class with persistent data.
Definition: SubProcess.h:301
const ParticleVector & intermediates() const
A reference to the vector of intermediate partons.
Definition: SubProcess.h:81
void head(tSubProPtr newHead)
Set the head SubProcess.
Definition: SubProcess.h:152
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
pair< PPtr, PPtr > PPair
A pair of pointers to Particle objects.
Definition: Containers.h:127
Ptr< EventRecordBase >::transient_const_pointer tcEventBasePtr
Alias for a transient pointer to const EventRecordBase.
Definition: EventConfig.h:49
ThePEG::Ptr< SubProcess >::transient_pointer tSubProPtr
Alias for a transient pointer to SubProcess .
Definition: Pointers.h:86
vector< T > & operator<<(vector< T > &tv, const U &u)
Overload the left shift operator for vector to push_back objects to a vector.
Definition: Containers.h:179
ThePEG::Ptr< Collision >::transient_pointer tCollPtr
Alias for a transient pointer to Collision .
Definition: Pointers.h:84
vector< PPtr > ParticleVector
A vector of pointers to Particle objects.
Definition: Containers.h:73
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
Define the base class from which all (polymorphic) classes in ThePEG are derived.
Definition: ThePEG.h:54
static string className()
Return the name of class T.
Definition: ClassTraits.h:66
static TPtr create()
Create a T object and return a smart pointer to it.
Definition: ClassTraits.h:60
ThePEG::Ptr< T >::pointer TPtr
Alias for a reference counted pointer to T .
Definition: ClassTraits.h:54
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134