ThePEG  1.8.0
SubProcessHandler.h
1 // -*- C++ -*-
2 //
3 // SubProcessHandler.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2011 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 2 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 
195 
200 
205 
210 
215 
220 
225 
230 
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 
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 */