ThePEG  1.8.0
QuarksToHadronsDecayer.h
1 // -*- C++ -*-
2 //
3 // QuarksToHadronsDecayer.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_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 
16 namespace ThePEG {
17 
19 
36 
37 public:
38 
45  : theFixedN(0), theMinN(2), theC1(4.5), theC2(0.7*GeV), theC3(0.0) {}
46 
50  virtual ~QuarksToHadronsDecayer();
52 
53 public:
54 
64  virtual bool accept(const DecayMode & dm) const;
65 
72  virtual ParticleVector decay(const DecayMode & dm, const Particle & p) const;
74 
80  virtual int getN(Energy m0, Energy summq, int Nq) const;
81 
86  virtual PVector getHadrons(int Nh, tcPDVector quarks) const;
87 
93  virtual void distribute(const Particle & parent, PVector & children) const;
94 
100  virtual double reweight(const Particle & parent,
101  const PVector & children) const;
102 
103 public:
104 
110  int fixedN() const { return theFixedN; }
111 
115  int minN() const { return theMinN; }
116 
121  double c1() const { return theC1; }
122 
127  Energy c2() const { return theC2; }
128 
133  double c3() const { return theC3; }
134 
139 
140 public:
141 
142 
149  void persistentOutput(PersistentOStream & os) const;
150 
156  void persistentInput(PersistentIStream & is, int version);
158 
162  static void Init();
163 
164 protected:
165 
166 
167 protected:
168 
175  virtual IBPtr clone() const;
176 
181  virtual IBPtr fullclone() const;
183 
184 private:
185 
191 
195  int theMinN;
196 
200  double theC1;
205 
209  double theC3;
210 
216 
217 private:
218 
223 
228 
229 };
230 
231 }
232 
233 
234 namespace ThePEG {
235 
240 template <>
241 struct BaseClassTrait<QuarksToHadronsDecayer,1>: public ClassTraitsType {
243  typedef Decayer NthBase;
244 };
245 
249 template <>
250 struct ClassTraits<QuarksToHadronsDecayer>
251  : public ClassTraitsBase<QuarksToHadronsDecayer> {
253  static string className() { return "ThePEG::QuarksToHadronsDecayer"; }
257  static string library() { return "QuarksToHadronsDecayer.so"; }
258 };
259 
262 }
263 
264 #endif /* THEPEG_QuarksToHadronsDecayer_H */