thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
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 
21 namespace ThePEG {
22 
34 class RemnantDecayer: public Decayer {
35 
36 public:
37 
40 
41 public:
42 
47  enum RecoilOption {
51  };
52 
53 public:
54 
61 
65  virtual ~RemnantDecayer();
67 
68 public:
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 
118  virtual bool canHandle(tcPDPtr parent, tcPDPtr extracted) const;
119 
126  virtual bool checkExtract(tcPPtr parent, tcPPtr extracted,
127  const LorentzMomentum & pnew) const;
128 
133  virtual bool multiCapable() const;
134 
140 
146  int respectDISKinematics() const { return respectDIS; }
147 
152  PtGPtr pTGenerator() const { return thePTGenerator; }
153 
161  static tPVector decayRemnants(const tPVector & particles, Step & step);
162 
163 protected:
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 
204  static LorentzRotation getZBoost(const LorentzMomentum & p0,
205  const LorentzMomentum & p);
206 
207 public:
208 
212  struct SubSystemFail: public Exception {};
213 
214 protected:
215 
223  virtual void doinit();
224 
229  virtual bool preInitialize() const;
231 
232 public:
233 
240  void persistentOutput(PersistentOStream & os) const;
241 
247  void persistentInput(PersistentIStream & is, int version);
249 
256  static void Init();
257 
258 protected:
264  mutable int respectDIS;
265 
266 private:
267 
273 
279 
280 private:
281 
287 
292  RemnantDecayer & operator=(const RemnantDecayer &) = delete;
293 
294 };
295 
296 }
297 
298 #include "ThePEG/Utilities/ClassTraits.h"
299 
300 namespace ThePEG {
301 
306 template <>
307 struct BaseClassTrait<RemnantDecayer,1> {
309  typedef Decayer NthBase;
310 };
311 
314 template <>
315 struct ClassTraits<RemnantDecayer>
316  : public ClassTraitsBase<RemnantDecayer> {
318  static string className() { return "ThePEG::RemnantDecayer"; }
319 };
320 
323 }
324 
325 #endif /* THEPEG_RemnantDecayer_H */
PersistentIStream is used to read persistent objects from a stream where they were previously written...
Ptr< PtGenerator >::pointer PtGPtr
A pointer to a PtGenerator object.
RecoilOption recoilOption() const
The option for how to distribute recoils in the hard subsystem when taking energy to produce remnants...
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 bool accept(const DecayMode &dm) const
Check if this decayer can perfom the decay specified by the given decay mode.
The Particle class is used to describe an instance of a particle.
Definition: Particle.h:83
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
tcPPtr parent(tcRemPPtr remnant) const
Access the parent of a remnant.
static LorentzRotation getZBoost(const LorentzMomentum &p0, const LorentzMomentum &p)
Return a small boost along the z-axis.
static AbstractClassDescription< RemnantDecayer > initRemnantDecayer
The static object used to initialize the description of this class.
RecoilOption theRecoilOption
The option for how to distribute recoils in the hard subsystem when taking energy to produce remnants...
tRemPDPtr data(tcRemPPtr remnant) const
Access the RemnantData object of a remnant.
const Exception & operator=(const Exception &ex)
Assignment.
Definition: Exception.h:104
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
A concreate implementation of ClassDescriptionBase describing an abstract class with persistent data...
virtual void fillSubSystem(tPPtr p, set< tPPtr > &sub) const
Recursively find all particles produced from an extracted parton.
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
RecoilOption
Enumerate the options for how to distribute recoils in the hard subsystem when taking energy to produ...
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
virtual bool needsFullStep() const
Return true if this Decayer need to access the full current step when a particle is decayed...
Boost copies of final state particles in hard subsystem.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
The RemnantDecayer class is the base class to be used for all decayers capable of decaying a RemnantP...
int respectDISKinematics() const
If true, do not boost a scattered lepton (and possible radiated photons) in a DIS event...
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
Boost only final state particles in hard subsystem.
Exception used if getSubSystem fails.
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...
PtGPtr thePTGenerator
An object capable of generating an intrinsic transverse momentum of the created remnants.
static void Init()
The standard Init function used to initialize the interfaces.
Boost all particles in the hard subsystem.
virtual bool multiCapable() const
Return true if this decayed can extract more than one parton from a particle.
int respectDIS
If true, do not boost a scattered lepton (and possible radiated photons) in a DIS event...
RemnantDecayer()
The default constructor.
virtual ~RemnantDecayer()
The destructor.
Exception is the base class for all exceptions to be used in ThePEG.
Definition: Exception.h:44
static tPVector decayRemnants(const tPVector &particles, Step &step)
Static function to decay al remnants among the given particles.
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.
Ptr is a templated class to provide typedefs for pointers types ThePEG should use for a given type...
Definition: Ptr.h:35
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
The DecayMode class describes a decay channel of a particle.
Definition: DecayMode.h:87
PtGPtr pTGenerator() const
An object capable of generating an intrinsic transverse momentum of the created remnants.
vector< tPPtr > tPVector
A vector of transient pointers to Particle objects.
Definition: Containers.h:82
Decayer is an abstract base class to specify objects modelling the decay of a particle.
Definition: Decayer.h:29
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
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...
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
virtual bool preInitialize() const
Return true if this object needs to be initialized before all other objects because it needs to extra...
const PVector & extracted(tcRemPPtr remnant) const
Access the vector of extracted particles of a remnant.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52
The Step class contains information of all particles present after certain step in the event generati...
Definition: Step.h:34