00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef ThePEG_Decayer_H
00010 #define ThePEG_Decayer_H
00011
00012
00013 #include "ThePEG/Config/ThePEG.h"
00014 #include "Decayer.fh"
00015 #include "ThePEG/Handlers/HandlerBase.h"
00016 #include "ThePEG/MatrixElement/Amplitude.h"
00017
00018 namespace ThePEG {
00019
00029 class Decayer: public HandlerBase {
00030
00031 public:
00032
00041 virtual bool accept(const DecayMode & dm) const = 0;
00042
00050 virtual bool needsFullStep() const;
00051
00058 virtual ParticleVector decay(const DecayMode & dm,
00059 const Particle & p) const = 0;
00060
00074 virtual ParticleVector decay(const DecayMode & dm, const Particle & p,
00075 Step & step) const;
00076
00084 virtual double brat(const DecayMode & dm, const ParticleData & pd,
00085 double oldbrat) const;
00086
00094 virtual double brat(const DecayMode & dm, const Particle & p,
00095 double oldbrat) const;
00096
00103 virtual ParticleVector getChildren(const DecayMode & dm,
00104 const Particle & parent) const;
00105
00111 virtual void finalBoost(const Particle & parent,
00112 const ParticleVector & children) const;
00113
00119 virtual void setScales(const Particle & parent,
00120 const ParticleVector & children) const;
00122
00127 Ptr<Amplitude>::pointer amplitude() const { return theAmplitude; }
00128
00136 static ParticleVector
00137 DecayParticle(tPPtr parent, Step & step, long maxtry = 1000);
00138
00142 struct DecayFailure: public Exception {};
00143
00144 public:
00145
00146
00153 void persistentOutput(PersistentOStream & os) const;
00154
00160 void persistentInput(PersistentIStream & is, int version);
00162
00166 static void Init();
00167
00168 private:
00169
00174 static AbstractNoPIOClassDescription<Decayer> initDecayer;
00175
00179 Decayer & operator=(const Decayer &);
00180
00185 Ptr<Amplitude>::pointer theAmplitude;
00186
00187 };
00188
00193 template <>
00194 struct BaseClassTrait<Decayer,1>: public ClassTraitsType {
00196 typedef HandlerBase NthBase;
00197 };
00198
00201 template <>
00202 struct ClassTraits<Decayer>: public ClassTraitsBase<Decayer> {
00204 static string className() { return "ThePEG::Decayer"; }
00205 };
00206
00209 }
00210
00211 #endif