thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
Decayer.h
1// -*- C++ -*-
2//
3// Decayer.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_Decayer_H
10#define ThePEG_Decayer_H
11// This is the declaration of the Decayer class.
12
14#include "Decayer.fh"
15#include "ThePEG/Handlers/HandlerBase.h"
16#include "ThePEG/MatrixElement/Amplitude.h"
17
18namespace ThePEG {
19
29class Decayer: public HandlerBase {
30
31public:
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
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
144public:
145
146
154
160 void persistentInput(PersistentIStream & is, int version);
162
166 static void Init();
167
168private:
169
175
179 Decayer & operator=(const Decayer &) = delete;
180
186
187};
188
193template <>
194struct BaseClassTrait<Decayer,1>: public ClassTraitsType {
196 typedef HandlerBase NthBase;
197};
198
201template <>
202struct ClassTraits<Decayer>: public ClassTraitsBase<Decayer> {
204 static string className() { return "ThePEG::Decayer"; }
205};
206
209}
210
211#endif /* ThePEG_Decayer_H */
This is the main config header file for ThePEG.
A concreate implementation of ClassDescriptionBase describing an abstract class without persistent da...
The DecayMode class describes a decay channel of a particle.
Definition: DecayMode.h:87
Decayer is an abstract base class to specify objects modelling the decay of a particle.
Definition: Decayer.h:29
Ptr< Amplitude >::pointer amplitude() const
Return an amplitude associated with this decay matrix element.
Definition: Decayer.h:127
static ParticleVector DecayParticle(tPPtr parent, Step &step, long maxtry=1000)
Static function to administer the decay of a particle.
virtual ParticleVector getChildren(const DecayMode &dm, const Particle &parent) const
Produce the children.
virtual double brat(const DecayMode &dm, const Particle &p, double oldbrat) const
Calculate branching ratio.
static void Init()
Standard Init function used to initialize the interfaces.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual void finalBoost(const Particle &parent, const ParticleVector &children) const
Boost the decay products.
virtual double brat(const DecayMode &dm, const ParticleData &pd, double oldbrat) const
Calculate branching ratio.
virtual bool accept(const DecayMode &dm) const =0
Check if this decayer can perfom the decay specified by the given decay mode.
virtual void setScales(const Particle &parent, const ParticleVector &children) const
Set the scales.
virtual bool needsFullStep() const
Return true if this Decayer need to access the full current step when a particle is decayed.
virtual ParticleVector decay(const DecayMode &dm, const Particle &p, Step &step) const
Perform a decay for a given DecayMode and a given Particle instance.
Decayer & operator=(const Decayer &)=delete
Private and non-existent assignment operator.
static AbstractNoPIOClassDescription< Decayer > initDecayer
The static object used to initialize the description of this class.
Definition: Decayer.h:174
Ptr< Amplitude >::pointer theAmplitude
A possible null pointer to an amplitude associated with this matrix element.
Definition: Decayer.h:185
virtual ParticleVector decay(const DecayMode &dm, const Particle &p) const =0
Perform a decay for a given DecayMode and a given Particle instance.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
Exception is the base class for all exceptions to be used in ThePEG.
Definition: Exception.h:44
HandlerBase is an abstract base class derived from the Interfaced class via the HandlerBaseT class ad...
Definition: HandlerBase.h:151
ParticleData inherits from InterfacedBase and represents the properties of a particle type.
Definition: ParticleData.h:36
The Particle class is used to describe an instance of a particle.
Definition: Particle.h:83
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...
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
The Step class contains information of all particles present after certain step in the event generati...
Definition: Step.h:34
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
vector< PPtr > ParticleVector
A vector of pointers to Particle objects.
Definition: Containers.h:73
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
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
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
Exception class used if something goes wrong in DecayParticle().
Definition: Decayer.h:142