thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
RemnantDecayer.h
1// -*- C++ -*-
2//
3// RemnantDecayer.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_RemnantDecayer_H
10#define THEPEG_RemnantDecayer_H
11//
12// This is the declaration of the RemnantDecayer class.
13//
14
15#include "ThePEG/PDT/Decayer.h"
16#include "RemnantDecayer.fh"
17#include "ThePEG/PDT/RemnantData.h"
18#include "ThePEG/EventRecord/RemnantParticle.h"
19#include "ThePEG/Handlers/PtGenerator.h"
20
21namespace ThePEG {
22
34class RemnantDecayer: public Decayer {
35
36public:
37
40
41public:
42
51 };
52
53public:
54
61
65 virtual ~RemnantDecayer();
67
68public:
69
78 virtual bool accept(const DecayMode & dm) const;
79
87 virtual bool needsFullStep() const;
88
102 virtual ParticleVector decay(const DecayMode & dm, const Particle & p,
103 Step & step) const = 0;
104
111 virtual ParticleVector decay(const DecayMode & dm, const Particle & p) const;
113
119
127 const LorentzMomentum & pnew) const;
128
133 virtual bool multiCapable() const;
134
140
146 int respectDISKinematics() const { return respectDIS; }
147
153
161 static tPVector decayRemnants(const tPVector & particles, Step & step);
162
163protected:
164
168 tRemPDPtr data(tcRemPPtr remnant) const { return remnant->remData; }
169
173 tcPPtr parent(tcRemPPtr remnant) const { return remnant->parent; }
174
178 const PVector & extracted(tcRemPPtr remnant) const {
179 return remnant->extracted();
180 }
181
185 virtual void fillSubSystem(tPPtr p, set<tPPtr> & sub) const;
186
194 virtual tPVector getSubSystem(tcPPtr parent, tPPtr parton) const;
195
205 const LorentzMomentum & p);
206
207public:
208
212 struct SubSystemFail: public Exception {};
213
214protected:
215
223 virtual void doinit();
224
229 virtual bool preInitialize() const;
231
232public:
233
241
247 void persistentInput(PersistentIStream & is, int version);
249
256 static void Init();
257
258protected:
264 mutable int respectDIS;
265
266private:
267
273
279
280private:
281
287
293
294};
295
296}
297
298#include "ThePEG/Utilities/ClassTraits.h"
299
300namespace ThePEG {
301
306template <>
307struct BaseClassTrait<RemnantDecayer,1> {
309 typedef Decayer NthBase;
310};
311
314template <>
315struct ClassTraits<RemnantDecayer>
316 : public ClassTraitsBase<RemnantDecayer> {
318 static string className() { return "ThePEG::RemnantDecayer"; }
319};
320
323}
324
325#endif /* THEPEG_RemnantDecayer_H */
A concreate implementation of ClassDescriptionBase describing an abstract class with persistent data.
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
Exception is the base class for all exceptions to be used in ThePEG.
Definition: Exception.h:44
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
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
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
The RemnantDecayer class is the base class to be used for all decayers capable of decaying a RemnantP...
virtual bool needsFullStep() const
Return true if this Decayer need to access the full current step when a particle is decayed.
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
static AbstractClassDescription< RemnantDecayer > initRemnantDecayer
The static object used to initialize the description of this class.
int respectDIS
If true, do not boost a scattered lepton (and possible radiated photons) in a DIS event,...
PtGPtr pTGenerator() const
An object capable of generating an intrinsic transverse momentum of the created remnants.
RecoilOption
Enumerate the options for how to distribute recoils in the hard subsystem when taking energy to produ...
@ copyFinal
Boost copies of final state particles in hard subsystem.
@ boostFinal
Boost only final state particles in hard subsystem.
@ boostAll
Boost all particles in the hard subsystem.
virtual bool checkExtract(tcPPtr parent, tcPPtr extracted, const LorentzMomentum &pnew) const
Return true if this decayer can handle the extraction of the extracted parton instance from the given...
RemnantDecayer & operator=(const RemnantDecayer &)=delete
The assignment operator is private and must never be called.
virtual bool preInitialize() const
Return true if this object needs to be initialized before all other objects because it needs to extra...
tRemPDPtr data(tcRemPPtr remnant) const
Access the RemnantData object of a remnant.
virtual ~RemnantDecayer()
The destructor.
virtual void fillSubSystem(tPPtr p, set< tPPtr > &sub) const
Recursively find all particles produced from an extracted parton.
Ptr< PtGenerator >::pointer PtGPtr
A pointer to a PtGenerator object.
RecoilOption theRecoilOption
The option for how to distribute recoils in the hard subsystem when taking energy to produce remnants...
virtual bool accept(const DecayMode &dm) const
Check if this decayer can perfom the decay specified by the given decay mode.
static tPVector decayRemnants(const tPVector &particles, Step &step)
Static function to decay al remnants among the given particles.
const PVector & extracted(tcRemPPtr remnant) const
Access the vector of extracted particles of a remnant.
static LorentzRotation getZBoost(const LorentzMomentum &p0, const LorentzMomentum &p)
Return a small boost along the z-axis.
int respectDISKinematics() const
If true, do not boost a scattered lepton (and possible radiated photons) in a DIS event,...
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
RemnantDecayer()
The default constructor.
static void Init()
The standard Init function used to initialize the interfaces.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual ParticleVector decay(const DecayMode &dm, const Particle &p, Step &step) const =0
Perform a decay for a given DecayMode and a given Particle instance.
virtual tPVector getSubSystem(tcPPtr parent, tPPtr parton) const
Return the system of particles from the hard subsystem which may be used to shuffle momenta to get th...
virtual bool multiCapable() const
Return true if this decayed can extract more than one parton from a particle.
virtual bool canHandle(tcPDPtr parent, tcPDPtr extracted) const
Return true if this decayer can handle the extraction of the extracted parton from the given particle...
virtual ParticleVector decay(const DecayMode &dm, const Particle &p) const
Perform a decay for a given DecayMode and a given Particle instance.
PtGPtr thePTGenerator
An object capable of generating an intrinsic transverse momentum of the created remnants.
RecoilOption recoilOption() const
The option for how to distribute recoils in the hard subsystem when taking energy to produce remnants...
tcPPtr parent(tcRemPPtr remnant) const
Access the parent of a remnant.
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< tPPtr > tPVector
A vector of transient pointers to Particle objects.
Definition: Containers.h:82
vector< PPtr > ParticleVector
A vector of pointers to Particle objects.
Definition: Containers.h:73
vector< PPtr > PVector
A vector of pointers to Particle objects.
Definition: Containers.h:76
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
Exception used if getSubSystem fails.