herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
Hw64Decayer.h
1 // -*- C++ -*-
2 //
3 // Hw64Decayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2019 The Herwig Collaboration
5 //
6 // Herwig 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 HERWIG_Hw64Decayer_H
10 #define HERWIG_Hw64Decayer_H
11 //
12 // This is the declaration of the Hw64Decayer class.
13 //
14 #include <ThePEG/Config/ThePEG.h>
15 #include <HwDecayerBase.h>
16 #include <ThePEG/Interface/Interfaced.h>
17 #include <ThePEG/PDT/DecayMode.h>
18 #include <ThePEG/Repository/Strategy.fh>
19 #include <fstream>
20 
21 namespace Herwig {
22 
23 using namespace ThePEG;
24 
44 class Hw64Decayer: public HwDecayerBase {
45 
46 public:
47 
51  Hw64Decayer() : MECode(0),_masstry(50) {}
52 
57  virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
58 
63  virtual ParticleVector decay(const Particle & parent,
64  const tPDVector & children) const;
65 
71  virtual void dataBaseOutput(ofstream & os,bool header) const;
72 
73 public:
74 
78  static void Init();
79 
86  void persistentOutput(PersistentOStream & os) const;
87 
93  void persistentInput(PersistentIStream & is, int version);
95 
96 protected:
97 
104  virtual IBPtr clone() const {return new_ptr(*this);}
105 
110  virtual IBPtr fullclone() const {return new_ptr(*this);}
112 
113 private:
114 
118  static double VAWt(Energy2 t0, Energy2 t1, Energy2 t2, InvEnergy4 t3);
119 
126  void setParticleMomentum(ParticleVector & out, const cPDVector & particles,
127  const vector<Lorentz5Momentum> & moms) const {
128  unsigned int numProds = particles.size();
129  for(unsigned int ix=0;ix<numProds;++ix)
130  out.push_back(particles[ix]->produceParticle(moms[ix]));
131  }
132 
133 private:
134 
138  const Hw64Decayer & operator=(const Hw64Decayer &) = delete;
139 
140 private:
141 
145  int MECode;
146 
150  unsigned int _masstry;
151 };
152 
153 }
154 
155 #endif /* HERWIG_Hw64Decayer_H */
int MECode
The code for the matrix element being used.
Definition: Hw64Decayer.h:145
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
Hw64Decayer is a class that defines all the general routines used in HERWIG++ to imitate the HERWIG 6...
Definition: Hw64Decayer.h:44
void setParticleMomentum(ParticleVector &out, const cPDVector &particles, const vector< Lorentz5Momentum > &moms) const
Take an array of momenta and set the momentum member of the particles.
Definition: Hw64Decayer.h:126
vector< tPDPtr > tPDVector
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
vector< cPDPtr > cPDVector
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Definition: Hw64Decayer.h:110
The HwDecayerBase class is the base class for Decayers in Herwig.
Definition: HwDecayerBase.h:37
-*- C++ -*-
virtual IBPtr clone() const
Make a simple clone of this object.
Definition: Hw64Decayer.h:104
unsigned int _masstry
Maximum number of attempts to generate the off-shell masses.
Definition: Hw64Decayer.h:150
vector< PPtr > ParticleVector
Hw64Decayer()
Default constructor.
Definition: Hw64Decayer.h:51