thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
SubProcessHandler.h
1 // -*- C++ -*-
2 //
3 // SubProcessHandler.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_SubProcessHandler_H
10 #define ThePEG_SubProcessHandler_H
11 // This is the declaration of the SubProcessHandler class.
12 
13 #include "ThePEG/Config/ThePEG.h"
14 #include "ThePEG/Utilities/Interval.h"
15 #include "ThePEG/Handlers/HandlerGroup.h"
16 #include "ThePEG/Handlers/HandlerBase.h"
17 #include "ThePEG/MatrixElement/MEBase.fh"
18 #include "ThePEG/Cuts/Cuts.fh"
19 #include "SubProcessHandler.fh"
20 
21 namespace ThePEG {
22 
50 
51 public:
52 
54  typedef vector<HandlerGroupBase *> GroupVector;
55 
57  typedef vector<ReweightPtr> ReweightVector;
58 
59 public:
60 
67 
72 
76  virtual ~SubProcessHandler();
78 
79 public:
80 
87 
91  const MEVector & MEs() const { return theMEs; }
92 
96  tCutsPtr cuts() const { return theCuts; }
97 
102  tCascHdlPtr CKKWHandler() const;
103 
108 
112  const GroupVector & groups() const { return theGroups; }
113 
117  MEVector & MEs() { return theMEs; }
119 
120 public:
121 
128  void persistentOutput(PersistentOStream & os) const;
129 
135  void persistentInput(PersistentIStream & is, int version);
137 
141  static void Init();
142 
143 protected:
144 
151  virtual IBPtr clone() const;
152 
157  virtual IBPtr fullclone() const;
159 
162 
168  virtual void doinit();
169 
174  virtual void doinitrun();
176 
177 private:
178 
182  void setupGroups();
183 
184 private:
185 
190 
194  MEVector theMEs;
195 
199  CutsPtr theCuts;
200 
205 
210 
215 
220 
225 
229  GroupVector theGroups;
230 
235  ReweightVector reweights;
240  ReweightVector preweights;
241 
242 private:
243 
244  ThePEG_DECLARE_PREPOST_GROUP(SubProcessHandler,Post);
245  ThePEG_DECLARE_GROUPINTERFACE(CascadeHandler,CascHdlPtr);
246  ThePEG_DECLARE_GROUPINTERFACE(MultipleInteractionHandler,MIHdlPtr);
247  ThePEG_DECLARE_GROUPINTERFACE(HadronizationHandler,HadrHdlPtr);
248  ThePEG_DECLARE_GROUPINTERFACE(DecayHandler,DecayHdlPtr);
249 
254 
255 private:
256 
260  const SubProcessHandler & operator=(const SubProcessHandler &) = delete;
261 
262 };
263 
268 template <>
271  typedef HandlerBase NthBase;
272 };
273 
276 template <>
277 struct ClassTraits<SubProcessHandler>:
278  public ClassTraitsBase<SubProcessHandler> {
280  static string className() { return "ThePEG::SubProcessHandler"; }
281 };
282 
285 }
286 
287 #endif /* ThePEG_SubProcessHandler_H */
virtual void doinitrun()
Initialize this object.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
const GroupVector & groups() const
Access the step handler groups.
The SubProcessHandler class is used to handle a set of MEBase objects together with a PartonExtractor...
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
HandlerGroup< SubProcessHandler > theSubprocessGroup
The SubProcessHandler group.
MEVector theMEs
The vector of partonic matrix elements to be used.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
tCutsPtr cuts() const
Return a pointer to the kinematical cuts used.
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
void setupGroups()
Setup the step handler groups.
PExtrPtr thePartonExtractor
The pointer to the parton extractor used.
CutsPtr theCuts
The pointer to the kinematical cuts used.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
This is the main config header file for ThePEG.
vector< HandlerGroupBase * > GroupVector
A vector of HandlerGroup pointers.
The HadronizationHandler is the base class of all handlers implementing models for hadronization of c...
HandlerGroup< DecayHandler > theDecayGroup
The DecayHandler group.
The DecayHandler is the base class of all handlers implementing the administration of decays of unsta...
Definition: DecayHandler.h:31
HandlerGroupBase is the base class for the templated HandlerGroup utility class to manage a group of ...
Definition: HandlerGroup.h:44
HandlerGroup< MultipleInteractionHandler > theMultiGroup
The MultipleInteractionHandler group.
tPExtrPtr pExtractor() const
Return a pointer to the parton extractor used.
ReweightVector preweights
The pre- and re-weight objects modifying all matrix element in this sub-process hander.
HandlerGroup< CascadeHandler > theCascadeGroup
The CascadeHandler group.
tCascHdlPtr CKKWHandler() const
Return a pointer (possibly null) to the assigned main CascadeHandler to be used as CKKW-reweighter...
The MultipleInteractionHandler is the base class of all handlers implementing models for multiple int...
Handler
Enumeration for the type of HandlerGroups.
Definition: HandlerGroup.h:433
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
const SubProcessHandler & operator=(const SubProcessHandler &)=delete
Private and non-existent assignment operator.
static void Init()
Standard Init function used to initialize the interface.
HandlerBase is an abstract base class derived from the Interfaced class via the HandlerBaseT class ad...
Definition: HandlerBase.h:151
vector< ReweightPtr > ReweightVector
A vector of ReweightBase pointers.
ReweightVector reweights
The pre- and re-weight objects modifying all matrix element in this sub-process hander.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
HandlerGroup is a templated utility class to manage a group of StepHandlers.
Definition: HandlerGroup.h:321
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
HandlerGroup< HadronizationHandler > theHadronizationGroup
The HadronizationHandler group.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
The CascadeHandler is the base class of all handlers implementing perturbative partonic cascade model...
SubProcessHandler()
Default constructor.
MEVector & MEs()
Return a reference to the vector of parton matrix elements used.
const HandlerGroupBase & handlerGroup(Group::Handler) const
Access a step handler group.
GroupVector theGroups
The step handler groups.
static ClassDescription< SubProcessHandler > initSubProcessHandler
Describe a concreta class with persistent data.
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
const MEVector & MEs() const
Return a reference to the vector of parton matrix elements used.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52
virtual ~SubProcessHandler()
Default destructor.
virtual IBPtr clone() const
Make a simple clone of this object.