ThePEG  1.8.0
Decayer.h
1 // -*- C++ -*-
2 //
3 // Decayer.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_Decayer_H
10 #define ThePEG_Decayer_H
11 // This is the declaration of the Decayer class.
12 
13 #include "ThePEG/Config/ThePEG.h"
14 #include "Decayer.fh"
15 #include "ThePEG/Handlers/HandlerBase.h"
16 #include "ThePEG/MatrixElement/Amplitude.h"
17 
18 namespace ThePEG {
19 
29 class Decayer: public HandlerBase {
30 
31 public:
32 
41  virtual bool accept(const DecayMode & dm) const = 0;
42 
50  virtual bool needsFullStep() const;
51 
58  virtual ParticleVector decay(const DecayMode & dm,
59  const Particle & p) const = 0;
60 
74  virtual ParticleVector decay(const DecayMode & dm, const Particle & p,
75  Step & step) const;
76 
84  virtual double brat(const DecayMode & dm, const ParticleData & pd,
85  double oldbrat) const;
86 
94  virtual double brat(const DecayMode & dm, const Particle & p,
95  double oldbrat) const;
96 
103  virtual ParticleVector getChildren(const DecayMode & dm,
104  const Particle & parent) const;
105 
111  virtual void finalBoost(const Particle & parent,
112  const ParticleVector & children) const;
113 
119  virtual void setScales(const Particle & parent,
120  const ParticleVector & children) const;
122 
128 
136  static ParticleVector
137  DecayParticle(tPPtr parent, Step & step, long maxtry = 1000);
138 
142  struct DecayFailure: public Exception {};
143 
144 public:
145 
146 
153  void persistentOutput(PersistentOStream & os) const;
154 
160  void persistentInput(PersistentIStream & is, int version);
162 
166  static void Init();
167 
168 private:
169 
175 
179  Decayer & operator=(const Decayer &);
180 
186 
187 };
188 
193 template <>
194 struct BaseClassTrait<Decayer,1>: public ClassTraitsType {
196  typedef HandlerBase NthBase;
197 };
198 
201 template <>
202 struct ClassTraits<Decayer>: public ClassTraitsBase<Decayer> {
204  static string className() { return "ThePEG::Decayer"; }
205 };
206 
209 }
210 
211 #endif /* ThePEG_Decayer_H */