thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
CascadeHandler.h
1 // -*- C++ -*-
2 //
3 // CascadeHandler.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_CascadeHandler_H
10 #define ThePEG_CascadeHandler_H
11 // This is the declaration of the CascadeHandler class.
12 
13 #include "StepHandler.h"
14 #include "ThePEG/Handlers/LastXCombInfo.h"
15 #include "ThePEG/PDF/PDF.h"
16 
17 namespace ThePEG {
18 
19 
33 class CascadeHandler: public StepHandler, public LastXCombInfo<> {
34 
35 public:
36 
42  virtual ~CascadeHandler();
44 
45 public:
46 
63  virtual void handle(EventHandler & eh, const tPVector & tagged,
64  const Hint & hint);
66 
72  virtual void cascade() = 0;
73 
91  virtual double reweightCKKW(int minMult, int maxMult);
92 
93 public:
94 
102  const tPVector & tagged() const { return *theTagged; }
103 
107  const Hint & hint() const { return *theHint; }
108 
112  const PDF & firstPDF() const { return pdfs().first; }
113 
117  const PDF & secondPDF() const { return pdfs().second; }
118 
122  const pair<PDF,PDF> & pdfs() const { return thePDFs; }
123 
127  void resetPDFs(const pair<tcPDFPtr,tcPDFPtr> & pdfpair);
128 
132  void resetPDFs(const pair<tcPDFPtr,tcPDFPtr> & pdfpair, PBPair ppair);
133 
138  void setXComb(tXCombPtr xc);
139 
144  virtual bool isReshuffling() const { return false; }
145 
150  bool didRunCascade() const {return theDidRunCascade;}
151 
155  static void setDidRunCascade(bool c){theDidRunCascade=c;}
156 
158 
159 public:
160 
164  static void Init();
165 
166 private:
167 
172 
176  const Hint * theHint;
177 
181  pair<PDF,PDF> thePDFs;
182 
187  static bool theDidRunCascade;
188 
189 
190 private:
191 
197 
201  CascadeHandler & operator=(const CascadeHandler &) = delete;
202 
203 };
204 
209 template <>
212  typedef StepHandler NthBase;
213 };
214 
217 template <>
218 struct ClassTraits<CascadeHandler>: public ClassTraitsBase<CascadeHandler> {
220  static string className() { return "ThePEG::CascadeHandler"; }
221 };
222 
225 }
226 
227 #endif /* ThePEG_CascadeHandler_H */
const Hint & hint() const
Return the int provided in the current call to handle().
void resetPDFs(const pair< tcPDFPtr, tcPDFPtr > &pdfpair)
Set alternative PDFBase objects to be used for cascade.
const tPVector * theTagged
Store the tagged argument given to handle().
The EventHandler is the base class used to implement event handlers in ThePEG.
Definition: EventHandler.h:63
bool didRunCascade() const
For multiple cascade calls, this flag tells if cascade was called before.
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
static AbstractNoPIOClassDescription< CascadeHandler > initCascadeHandler
The static object used to initialize the description of this class.
LastXCombInfo is a templated class giving easy access to the information in an XComb object...
Definition: LastXCombInfo.h:32
PDF is a simple wrapper class with normal copy-semantics which holds a PDFBase object and a ParticleD...
Definition: PDF.h:22
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
const Hint * theHint
Store the Hint arguments given to handle().
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
pair< PDF, PDF > thePDFs
The pdfs used to extract the incoming partons.
const pair< PDF, PDF > & pdfs() const
Return references to the currently used PDF&#39;s.
StepHandler is the base class for implementing any model for a step in the event generation chain...
Definition: StepHandler.h:41
virtual bool isReshuffling() const
Return true, if this cascade handler will perform reshuffling from hard process masses.
CascadeHandler & operator=(const CascadeHandler &)=delete
Private and non-existent assignment operator.
A concreate implementation of ClassDescriptionBase describing an abstract class without persistent da...
Hint is a base class to be used to pass information between StepHandler s, which cannot be convayed t...
Definition: Hint.h:48
static bool theDidRunCascade
If there are multiple cascade calls, this flag tells if cascade was called before.
virtual double reweightCKKW(int minMult, int maxMult)
The CascadeHandler can be used inside the process generation to do so-called CKKW reweighting of the ...
const PDF & secondPDF() const
Return references to the PDF used by the first incoming particle.
virtual void cascade()=0
The main function to be overwritten by sub-classes.
virtual void handle(EventHandler &eh, const tPVector &tagged, const Hint &hint)
The main function called by the EventHandler class to perform a step.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
static void setDidRunCascade(bool c)
Set the flag to inform if prior cascades had been called.
const PDF & firstPDF() const
Return references to the PDF used by the first incoming particle.
The CascadeHandler is the base class of all handlers implementing perturbative partonic cascade model...
void setXComb(tXCombPtr xc)
Set the XComb object with information about the sub-process generation.
vector< tPPtr > tPVector
A vector of transient pointers to Particle objects.
Definition: Containers.h:82
const tPVector & tagged() const
Return the vector of tagged particles which should be showered.
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
virtual ~CascadeHandler()
The destructor.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52
static void Init()
Standard Init function used to initialize the interface.