thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
QuarksToHadronsDecayer.h
1// -*- C++ -*-
2//
3// QuarksToHadronsDecayer.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_QuarksToHadronsDecayer_H
10#define THEPEG_QuarksToHadronsDecayer_H
11// This is the declaration of the QuarksToHadronsDecayer class.
12
13#include "ThePEG/PDT/Decayer.h"
14#include "ThePEG/Handlers/FlavourGenerator.h"
15
16namespace ThePEG {
17
19
36
37public:
38
43 : theFixedN(0), theMinN(2), theC1(4.5), theC2(0.7*GeV), theC3(0.0) {}
44
45public:
46
56 virtual bool accept(const DecayMode & dm) const;
57
64 virtual ParticleVector decay(const DecayMode & dm, const Particle & p) const;
66
72 virtual int getN(Energy m0, Energy summq, int Nq) const;
73
78 virtual PVector getHadrons(int Nh, tcPDVector quarks) const;
79
85 virtual void distribute(const Particle & parent, PVector & children) const;
86
92 virtual double reweight(const Particle & parent,
93 const PVector & children) const;
94
95public:
96
102 int fixedN() const { return theFixedN; }
103
107 int minN() const { return theMinN; }
108
113 double c1() const { return theC1; }
114
119 Energy c2() const { return theC2; }
120
125 double c3() const { return theC3; }
126
131
132public:
133
134
142
148 void persistentInput(PersistentIStream & is, int version);
150
154 static void Init();
155
156protected:
157
158
159protected:
160
167 virtual IBPtr clone() const;
168
173 virtual IBPtr fullclone() const;
175
176private:
177
183
188
192 double theC1;
197
201 double theC3;
202
208
209private:
210
215
220
221};
222
223}
224
225
226namespace ThePEG {
227
232template <>
233struct BaseClassTrait<QuarksToHadronsDecayer,1>: public ClassTraitsType {
235 typedef Decayer NthBase;
236};
237
241template <>
242struct ClassTraits<QuarksToHadronsDecayer>
243 : public ClassTraitsBase<QuarksToHadronsDecayer> {
245 static string className() { return "ThePEG::QuarksToHadronsDecayer"; }
249 static string library() { return "QuarksToHadronsDecayer.so"; }
250};
251
254}
255
256#endif /* THEPEG_QuarksToHadronsDecayer_H */
#define ThePEG_DECLARE_CLASS_POINTERS(full, abbrev)
This macro helps us to declare pointers and stuff to standard classes.
Definition: Pointers.h:58
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
The DecayMode class describes a decay channel of a particle.
Definition: DecayMode.h:87
Decayer is an abstract base class to specify objects modelling the decay of a particle.
Definition: Decayer.h:29
FlavourGenerator is an abstract base class to be used to implement models describing the quark conten...
The Particle class is used to describe an instance of a particle.
Definition: Particle.h:83
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
The QuarksToHadronsDecayer class inherits from Decayer and is able to decay particles to (2 or 4) qu...
virtual int getN(Energy m0, Energy summq, int Nq) const
Get the number of hadrons to be produced, given the mass of the decaying particle,...
int minN() const
Return the minimum number of hadrons to be produced.
virtual double reweight(const Particle &parent, const PVector &children) const
Called by distribute() to reweight the default flat phase spece.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual ParticleVector decay(const DecayMode &dm, const Particle &p) const
Perform a decay for a given DecayMode and a given Particle instance.
Energy c2() const
Return the parameter used for the multiplicity distriution.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
FlavGenPtr theFlavourGenerator
The object in charge of generating hadrons spieces from given quark flavours.
virtual void distribute(const Particle &parent, PVector &children) const
Distribute the produced children in phase space.
static void Init()
Standard Init function used to initialize the interfaces.
virtual PVector getHadrons(int Nh, tcPDVector quarks) const
Produce Nh hadrons from the specified quarks.
double c3() const
Return the parameter used for the multiplicity distriution.
virtual IBPtr clone() const
Make a simple clone of this object.
tcFlavGenPtr flavourGenerator() const
Return a pointer to the flavour generator to be used.
QuarksToHadronsDecayer()
Default constructor.
int theMinN
The minimum hadrons to be produced.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
static ClassDescription< QuarksToHadronsDecayer > initQuarksToHadronsDecayer
Describe a concrete class with persistent data.
double theC1
The parameter of the multiplicity distribution.
virtual bool accept(const DecayMode &dm) const
Check if this decayer can perfom the decay specified by the given decay mode.
double c1() const
Return the parameter used for the multiplicity distriution.
double theC3
The parameter of the multiplicity distribution.
int theFixedN
The fixed number of hadrons to be produced.
QuarksToHadronsDecayer & operator=(const QuarksToHadronsDecayer &)=delete
Private and non-existent assignment operator.
int fixedN() const
Return the fixed number of hadrons to be produced.
Energy theC2
The parameter of the multiplicity distribution.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
vector< PPtr > ParticleVector
A vector of pointers to Particle objects.
Definition: Containers.h:73
vector< PPtr > PVector
A vector of pointers to Particle objects.
Definition: Containers.h:76
vector< tcPDPtr > tcPDVector
A vector of transient pointers to const ParticleData objects.
Definition: Containers.h:42
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
static string library()
The name of a file containing the dynamic library where the class T is implemented.
Definition: ClassTraits.h:85