ThePEG  1.8.0
FlavourGenerator.h
1 // -*- C++ -*-
2 //
3 // FlavourGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2011 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 2 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 
13 #include "ThePEG/Config/ThePEG.h"
14 #include "ThePEG/Handlers/HandlerBase.h"
15 
16 namespace ThePEG {
17 
40 
41 public:
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 
92  tcPDPtr alwaysGetHadron(tcPDPtr q1, tcPDPtr q2) const;
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 
132  tcPDPtr alwaysGetBaryon(tcPDPtr q1, tcPDPtr q2, tcPDPtr q3) const;
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 
150 public:
151 
158  void persistentOutput(PersistentOStream & os) const;
159 
165  void persistentInput(PersistentIStream & is, int version);
167 
171  static void Init();
172 
173 
174 private:
175 
180 
185 
186 };
187 
191 class FlavourGeneratorException: public Exception {};
200 template <>
201 struct BaseClassTrait<FlavourGenerator,1>: public ClassTraitsType {
203  typedef HandlerBase NthBase;
204 };
205 
210 template <>
211 struct ClassTraits<FlavourGenerator>:
212  public ClassTraitsBase<FlavourGenerator> {
214  static string className() {
215  return "ThePEG::FlavourGenerator";
216  }
217 };
218 
221 }
222 
223 #endif /* ThePEG_FlavourGenerator_H */