thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
ClusterCollapser.h
1// -*- C++ -*-
2//
3// ClusterCollapser.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_ClusterCollapser_H
10#define ThePEG_ClusterCollapser_H
11// This is the declaration of the ClusterCollapser class.
12
13#include "ThePEG/Handlers/StepHandler.h"
14#include "ThePEG/Handlers/FlavourGenerator.h"
15#include "ThePEG/EventRecord/ColourSinglet.h"
16#include "ClusterCollapser.fh"
17// #include "ClusterCollapser.xh"
18
19
20namespace ThePEG {
21
36
37public:
38
41
43 typedef multimap<Energy,ColourSinglet> SingletMap;
44
45public:
46
53 : theEnergyCut(1.0*GeV), theNTry2(2), errorlevel(Exception::eventerror),
54 pStrange(1.0/3.0) {}
55
61
62public:
63
79 virtual void handle(EventHandler & eh, const tPVector & tagged,
80 const Hint & hint);
82
86 virtual vector<ColourSinglet> collapse(tPVector tagged,
87 tStepPtr newstep);
88
94 virtual SingletMap getSinglets(const tPVector & tagged) const;
95
101 tStepPtr newStep) const;
102
108 tStepPtr newStep) const;
109
114 static bool diQuarkJunction(const ColourSinglet & cs);
115
120 static bool diDiQuark(const ColourSinglet & cs);
121
127 Energy cut() const { return theEnergyCut; }
128
133 int nTry2() const { return theNTry2; }
134
139 static Energy mass(const ColourSinglet & cl);
140
144 static void insert(SingletMap & mmap, const ColourSinglet & cl);
145
150 virtual tcPDPtr pickFlavour() const;
151
152protected:
153
160 virtual void collapse(tStepPtr newStep, const ColourSinglet & cs,
161 const tPVector & tagged) const;
169 virtual bool collapse2(tStepPtr newStep, const ColourSinglet & cs) const;
170
179 const tPVector & tagged,
180 tStepPtr newStep) const;
181
185 virtual tcPDPtr getHadron(const ColourSinglet & cs) const;
186
190 virtual tcPDPair getHadrons(const ColourSinglet & cs) const;
191
196 void updateTagged(tPVector & tagged) const;
197
198public:
199
207
213 void persistentInput(PersistentIStream & is, int version);
215
219 static void Init();
220
221protected:
222
229 virtual IBPtr clone() const;
230
235 virtual IBPtr fullclone() const;
237
240 class ClusterException: public Exception {
241 public:
243 ClusterException(const ClusterCollapser & cc) {
244 theMessage << "In ClusterCollapser '" << cc.name() << "': ";
245 }
246 };
249private:
250
257
263
269
270protected:
271
279
284 double pStrange;
285
286private:
287
292
297
298};
299
300}
301
302
303namespace ThePEG {
304
311template <>
312struct BaseClassTrait<ClusterCollapser,1>: public ClassTraitsType {
314 typedef StepHandler NthBase;
315};
316
322template <>
323struct ClassTraits<ClusterCollapser>:
324 public ClassTraitsBase<ClusterCollapser> {
328 static string className() { return "ThePEG::ClusterCollapser"; }
329
330};
331
334}
335
336#endif /* ThePEG_ClusterCollapser_H */
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
ClusterCollapser is a general StepHandler which can be called anywhere in the event generation (typic...
double pStrange
The relative probability to produce a s-sbar pair in a split as compared to a u-ubar or d-dbar pair.
virtual void collapse(tStepPtr newStep, const ColourSinglet &cs, const tPVector &tagged) const
Perform the actual collapse of a cluster into one hadron.
void updateTagged(tPVector &tagged) const
Uptate the vector of particles and remove partons which have already collapsed and insert their child...
virtual vector< ColourSinglet > collapse(tPVector tagged, tStepPtr newstep)
Perform all necessary collapses.
virtual SingletMap getSinglets(const tPVector &tagged) const
Go through the tagged partons and extract all colour singlet combination of partons.
virtual ~ClusterCollapser()
The destructor.
int nTry2() const
The number of attempts to collapse a cluster into two particles, before it is collapsed into one part...
static ClassDescription< ClusterCollapser > initClusterCollapser
Describe a concrete class with persistent data.
static void Init()
Standard Init function used to initialize the interfaces.
virtual ColourSinglet splitDiDiQuark(ColourSinglet &cs, tStepPtr newStep) const
If a singlet contains a simple string with diquarks in both ends, split them into quarks and split of...
Ptr< FlavourGenerator >::pointer FlavGenPtr
Declare a pointer to a FlavourGenerator object.
Energy cut() const
If the invariant mass of a cluster, minus the constituent masses of its partons is below this cut,...
ClusterCollapser & operator=(const ClusterCollapser &)=delete
Private and non-existent assignment operator.
Energy theEnergyCut
Energy cut.
virtual bool collapse2(tStepPtr newStep, const ColourSinglet &cs) const
Perform the actual collapse of a cluster into two hadrons.
Exception::Severity errorlevel
How should we respond to errors? 0 means do nothing, ie.
virtual ColourSinglet splitDiQuarkJunction(ColourSinglet &cs, tStepPtr newStep) const
If a singlet contains at least one diquark and a junction, split the diquark and split off a new colo...
virtual void handle(EventHandler &eh, const tPVector &tagged, const Hint &hint)
The main function called by the EventHandler class to perform a step.
virtual tcPDPair getHadrons(const ColourSinglet &cs) const
Return a pair of hadrons into which the given cluster may collapse.
ClusterCollapser()
The default constructor.
virtual tPVector getCompensators(Energy mh, const ColourSinglet &cs, const tPVector &tagged, tStepPtr newStep) const
Get particles for compensation.
virtual tcPDPtr getHadron(const ColourSinglet &cs) const
Return a hadron into which the given cluster may collapse.
static Energy mass(const ColourSinglet &cl)
Return the invariant mass of a cluster minus the constituent masses of its partons.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
virtual IBPtr clone() const
Make a simple clone of this object.
static bool diDiQuark(const ColourSinglet &cs)
Returns true iff the given singlet contains one string piece with diquarks in both ends.
static void insert(SingletMap &mmap, const ColourSinglet &cl)
Insert a ColourSinglet object in a SingletMap.
FlavGenPtr flavGen
The flavour generator object to use to combine quarks and diqurks into hadrons.
virtual tcPDPtr pickFlavour() const
Pick a random flavour.
int theNTry2
The number of attempts to collapse a cluster into two particles, before it is collapsed into one part...
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
static bool diQuarkJunction(const ColourSinglet &cs)
Returns true iff the given singlet contains a junction and at least one diquark.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
multimap< Energy, ColourSinglet > SingletMap
Declare a multimap of singlets indexed by their mass.
A ColourSinglet object represents a set of colour-connected partons in a total colour-singlet state.
Definition: ColourSinglet.h:31
The EventHandler is the base class used to implement event handlers in ThePEG.
Definition: EventHandler.h:63
Exception is the base class for all exceptions to be used in ThePEG.
Definition: Exception.h:44
Severity
The levels of severity.
Definition: Exception.h:51
Hint is a base class to be used to pass information between StepHandler s, which cannot be convayed t...
Definition: Hint.h:48
string name() const
Returns the name of this object, without the path.
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
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
StepHandler is the base class for implementing any model for a step in the event generation chain.
Definition: StepHandler.h:41
tStepPtr newStep()
Return a pointer to a new step.
Definition: StepHandler.h:93
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
vector< tPPtr > tPVector
A vector of transient pointers to Particle objects.
Definition: Containers.h:82
pair< tcPDPtr, tcPDPtr > tcPDPair
A pair of transient pointers to const ParticleData objects.
Definition: Containers.h:124
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
static string className()
Return the name of class T.
Definition: ClassTraits.h:66