ThePEG  1.8.0
RemnantDecayer.h
1 // -*- C++ -*-
2 //
3 // RemnantDecayer.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_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 
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 */