thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
RemnantHandler.h
1 // -*- C++ -*-
2 //
3 // RemnantHandler.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_RemnantHandler_H
10 #define ThePEG_RemnantHandler_H
11 // This is the declaration of the RemnantHandler class.
12 
13 #include "ThePEG/Handlers/HandlerBase.h"
14 #include "ThePEG/PDF/PartonBin.h"
15 #include "ThePEG/PDF/PartonBinInstance.h"
16 #include "ThePEG/Vectors/Transverse.h"
17 #include "RemnantHandler.xh"
18 
19 namespace ThePEG {
20 
31 class RemnantHandler: public HandlerBase {
32 
33 public:
34 
41  RemnantHandler(bool multi = false);
43 
44 public:
45 
52  virtual bool canHandle(tcPDPtr particle,
53  const cPDVector & partons) const = 0;
54 
65  virtual int nDim(const PartonBin & pb, bool doScale) const;
66 
79  virtual Lorentz5Momentum generate(PartonBinInstance & pb, const double * r,
80  Energy2 scale,
81  const LorentzMomentum & parent,
82  bool fixedPartonMomentum = false) const = 0;
83 
98  virtual Lorentz5Momentum generate(PartonBinInstance & pb, const double * r,
99  Energy2 scale, Energy2 shat,
100  const LorentzMomentum & parent,
101  bool fixedPartonMomentum = false) const = 0;
102 
107  virtual void boostRemnants(PartonBinInstance & pb) const;
108 
117  virtual bool recreateRemnants(PartonBinInstance & pb, tPPtr oldp, tPPtr newp,
118  double newl, Energy2 scale,
119  const LorentzMomentum & p,
120  const PVector & prev = PVector()) const;
133  virtual bool recreateRemnants(PartonBinInstance & pb, tPPtr oldp, tPPtr newp,
134  double newl, Energy2 scale,
135  Energy2 shat, const LorentzMomentum & p,
136  const PVector & prev = PVector()) const;
138 
143  bool multiCapable() const { return isMultiCapable; }
144 
145 public:
146 
153  void persistentOutput(PersistentOStream & os) const;
154 
160  void persistentInput(PersistentIStream & is, int version);
162 
166  static void Init();
167 
168 protected:
169 
175 
176 private:
177 
183 
187  RemnantHandler & operator=(const RemnantHandler &) = delete;
188 
189 };
190 
195 template <>
198  typedef HandlerBase NthBase;
199 };
200 
203 template <>
204 struct ClassTraits<RemnantHandler>: public ClassTraitsBase<RemnantHandler> {
206  static string className() { return "ThePEG::RemnantHandler"; }
207 };
208 
211 }
212 
213 #endif /* ThePEG_RemnantHandler_H */
PersistentIStream is used to read persistent objects from a stream where they were previously written...
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
RemnantHandler & operator=(const RemnantHandler &)=delete
Private and non-existent assignment operator.
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...
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
RemnantHandler is an abstract base class for implementing classes used to generate remnants when part...
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
bool isMultiCapable
True if this handler can generate remnants also if several partons have been extracted.
virtual bool recreateRemnants(PartonBinInstance &pb, tPPtr oldp, tPPtr newp, double newl, Energy2 scale, const LorentzMomentum &p, const PVector &prev=PVector()) const
Redo the remnant generation for the given particle bin, pb.
static AbstractClassDescription< RemnantHandler > initRemnantHandler
The static object used to initialize the description of this class.
bool multiCapable() const
Return true if this remnant handler is able to handle multiple extractions of partons from the same p...
virtual int nDim(const PartonBin &pb, bool doScale) const
If the generation of remnants is expected to influence the actual cross section of the hard sub proce...
The PartonBin class is used by the PartonExtractor class to store information about the extraction of...
Definition: PartonBin.h:38
RemnantHandler(bool multi=false)
Default constructor.
vector< cPDPtr > cPDVector
A vector of pointers to const ParticleData objects.
Definition: Containers.h:36
PartonBinInstance is used to store information about the generation of a given parton extraction for ...
HandlerBase is an abstract base class derived from the Interfaced class via the HandlerBaseT class ad...
Definition: HandlerBase.h:151
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual void boostRemnants(PartonBinInstance &pb) const
Boost the generated remnants to the proper momentum given the information in the parton bin...
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual bool canHandle(tcPDPtr particle, const cPDVector &partons) const =0
Return true if this remnant handler can handle extracting all specified partons from the given partic...
virtual Lorentz5Momentum generate(PartonBinInstance &pb, const double *r, Energy2 scale, const LorentzMomentum &parent, bool fixedPartonMomentum=false) const =0
Generate the momentum of the extracted parton with the parent momentum given by the last argument...
vector< PPtr > PVector
A vector of pointers to Particle objects.
Definition: Containers.h:76
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
static void Init()
Standard Init function used to initialize the interface.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52