thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
FlavourGenerator.h
1// -*- C++ -*-
2//
3// FlavourGenerator.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_FlavourGenerator_H
10#define ThePEG_FlavourGenerator_H
11// This is the declaration of the FlavourGenerator class.
12
14#include "ThePEG/Handlers/HandlerBase.h"
15
16namespace ThePEG {
17
40
41public:
42
56 virtual tcPDPair generateHadron(tcPDPtr quark) const = 0;
57
63
74 virtual tcPDPtr getHadron(tcPDPtr q1, tcPDPtr q2) const;
75
86 virtual tcPDPtr getHadron(long iq1, long iq2) const;
87
93
98 tcPDPtr alwaysGetHadron(long iq1, long iq2) const;
99
112 virtual tcPDPtr getBaryon(tcPDPtr q1, tcPDPtr q2, tcPDPtr q3) const;
113
126 virtual tcPDPtr getBaryon(long q1, long q2, long q3) const;
127
137 tcPDPtr alwaysGetBaryon(long q1, long q2, long q3) const;
138
142 virtual long selectQuark() const = 0;
143
147 virtual long selectFlavour() const = 0;
149
150public:
151
159
165 void persistentInput(PersistentIStream & is, int version);
167
171 static void Init();
172
173
174private:
175
180
185
186};
187
191class FlavourGeneratorException: public Exception {};
200template <>
201struct BaseClassTrait<FlavourGenerator,1>: public ClassTraitsType {
203 typedef HandlerBase NthBase;
204};
205
210template <>
211struct ClassTraits<FlavourGenerator>:
212 public ClassTraitsBase<FlavourGenerator> {
214 static string className() {
215 return "ThePEG::FlavourGenerator";
216 }
217};
218
221}
222
223#endif /* ThePEG_FlavourGenerator_H */
This is the main config header file for ThePEG.
A concreate implementation of ClassDescriptionBase describing an abstract class without persistent da...
Exception is the base class for all exceptions to be used in ThePEG.
Definition: Exception.h:44
FlavourGenerator is an abstract base class to be used to implement models describing the quark conten...
tcPDPtr alwaysGetBaryon(tcPDPtr q1, tcPDPtr q2, tcPDPtr q3) const
Same as getBaryon(tcPDPtr, tcPDPtr, tcPDPtr), but throws an exception if no baryon could be produced.
tcPDPtr alwaysGetBaryon(long q1, long q2, long q3) const
Same as getBaryon(long, long, long), but throws an exception if no baryon could be produced.
virtual tcPDPtr getBaryon(tcPDPtr q1, tcPDPtr q2, tcPDPtr q3) const
Return a baryon with the flavour content given by the (anti)quarks in the argument.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
static AbstractNoPIOClassDescription< FlavourGenerator > initFlavourGenerator
Describe aa abstract class without persistent data.
tcPDPtr alwaysGetHadron(tcPDPtr q1, tcPDPtr q2) const
Same as getHadron(tcPDPtr, tcPDPtr) but thows an exception if no hadron could be produced.
virtual tcPDPair generateHadron(tcPDPtr quark) const =0
Generate a hadron from a quark.
virtual tcPDPtr getHadron(tcPDPtr q1, tcPDPtr q2) const
Get hadron from flavours.
virtual tcPDPtr getHadron(long iq1, long iq2) const
Get hadron from flavours.
virtual long selectQuark() const =0
Generate a random quark flavour.
tcPDPtr alwaysGetHadron(long iq1, long iq2) const
Same as getHadron(long, long) but thows an exception if no hadron could be produced.
static void Init()
Standard Init function used to initialize the interface.
virtual long selectFlavour() const =0
Generate a random (di)quark flavour.
virtual tcPDPtr getBaryon(long q1, long q2, long q3) const
Return a baryon with the flavour content given by the (anti)quarks in the argument.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
tcPDPair alwaysGenerateHadron(tcPDPtr quark) const
Same as generateHadron(tcPDPtr), but throws an exception if no hadron could be produced.
FlavourGenerator & operator=(const FlavourGenerator &)=delete
Private and non-existent assignment operator.
HandlerBase is an abstract base class derived from the Interfaced class via the HandlerBaseT class ad...
Definition: HandlerBase.h:151
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...
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
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