herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.5
WeakDecayCurrent.h
1 // -*- C++ -*-
2 //
3 // WeakDecayCurrent.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2017 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_WeakDecayCurrent_H
10 #define HERWIG_WeakDecayCurrent_H
11 //
12 // This is the declaration of the WeakDecayCurrent class.
13 //
14 #include "ThePEG/Interface/Interfaced.h"
15 #include "WeakDecayCurrent.fh"
16 #include "Herwig/Decay/DecayPhaseSpaceMode.h"
17 #include "Herwig/Decay/DecayPhaseSpaceChannel.h"
18 #include "ThePEG/Helicity/LorentzPolarizationVector.h"
19 
20 namespace Herwig {
21 using namespace ThePEG;
24 
58 
59 public:
60 
64  WeakDecayCurrent() : _numbermodes(0) {}
65 
66 public:
67 
86  virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
87  unsigned int iloc,unsigned int ires,
88  DecayPhaseSpaceChannelPtr phase,Energy upp)=0;
89 
99  virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia)=0;
101 
105  unsigned int numberOfModes() const {return _quark.size();}
106 
117  virtual vector<LorentzPolarizationVectorE>
118  current(const int imode, const int ichan,Energy & scale,
119  const ParticleVector & decay, DecayIntegrator::MEOption meopt) const=0;
120 
127  virtual bool accept(vector<int> id)=0;
128 
136  virtual unsigned int decayMode(vector<int> id)=0;
137 
144  void decayModeInfo(unsigned int imode, int& iq, int& ia) const {
145  if(imode<_quark.size()) {
146  iq=_quark[imode];
147  ia=_antiquark[imode];
148  }
149  else {
150  iq=0;
151  ia=0;
152  }
153  }
154 
161  virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
162 
163 public:
164 
171  void persistentOutput(PersistentOStream & os) const;
172 
178  void persistentInput(PersistentIStream & is, int version);
180 
184  static void Init();
185 
186 protected:
187 
193  void addDecayMode(int iq,int ia) {
194  _quark.push_back(iq);
195  _antiquark.push_back(ia);
196  }
197 
202  void setInitialModes(unsigned int nmodes) {_numbermodes=nmodes;}
203 
204 private:
205 
210 
214  WeakDecayCurrent & operator=(const WeakDecayCurrent &) = delete;
215 
216 private:
217 
221  vector<int> _quark;
222 
226  vector<int> _antiquark;
227 
231  unsigned int _numbermodes;
232 
233 };
234 
235 }
236 
237 
238 #include "ThePEG/Utilities/ClassTraits.h"
239 
240 namespace ThePEG {
241 
248 template <>
249 struct BaseClassTrait<Herwig::WeakDecayCurrent,1> {
251  typedef Interfaced NthBase;
252 };
253 
258 template <>
259 struct ClassTraits<Herwig::WeakDecayCurrent>
260  : public ClassTraitsBase<Herwig::WeakDecayCurrent> {
262  static string className() { return "Herwig::WeakDecayCurrent"; }
263 };
264 
267 }
268 
269 #endif /* HERWIG_WeakDecayCurrent_H */
vector< int > _quark
The PDG codes for the quarks contained in the current.
The WeakDecayCurrent class is the base class for the hadronic currents produced in weak decays...
unsigned int numberOfModes() const
Return the number of modes handled by this current.
WeakDecayCurrent()
Default constructor.
static AbstractClassDescription< WeakDecayCurrent > initWeakDecayCurrent
Describe an abstract base class with persistent data.
void decayModeInfo(unsigned int imode, int &iq, int &ia) const
Information on a decay mode.
vector< int > _antiquark
The PDG codes for the antiquarks contained in the current.
MEOption
Enum for the matrix element option.
unsigned int _numbermodes
The initial number of modes.
vector< tPDPtr > tPDVector
void addDecayMode(int iq, int ia)
Add a decay mode to the list.
LorentzVector< complex< Energy > > LorentzPolarizationVectorE
-*- C++ -*-
void setInitialModes(unsigned int nmodes)
Set initial number of modes.
LorentzVector< complex< double > > LorentzPolarizationVector
vector< PPtr > ParticleVector