herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
WeakCurrent.h
1// -*- C++ -*-
2//
3// WeakCurrent.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_WeakCurrent_H
10#define HERWIG_WeakCurrent_H
11//
12// This is the declaration of the WeakCurrent class.
13//
14#include "ThePEG/Interface/Interfaced.h"
15#include "WeakCurrent.fh"
16#include "Herwig/Decay/DecayIntegrator.h"
17#include "Herwig/Decay/PhaseSpaceMode.h"
18#include "Herwig/Decay/PhaseSpaceChannel.h"
19#include "ThePEG/Helicity/LorentzPolarizationVector.h"
20#include "Herwig/Decay/IsoSpin.h"
21
22namespace Herwig {
23using namespace ThePEG;
26
59class WeakCurrent: public Interfaced {
60
61public:
62
67
68public:
69
90 virtual bool createMode(int icharge, tcPDPtr resonance,
91 FlavourInfo flavour,
92 unsigned int imode,PhaseSpaceModePtr mode,
93 unsigned int iloc,int ires,
94 PhaseSpaceChannel phase, Energy upp )=0;
95
105 virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia)=0;
107
111 unsigned int numberOfModes() const {return quark_.size();}
112
126 virtual vector<LorentzPolarizationVectorE>
127 current(tcPDPtr resonance,
128 FlavourInfo flavour,
129 const int imode, const int ichan,Energy & scale,
130 const tPDVector & outgoing,
131 const vector<Lorentz5Momentum> & momenta,
132 DecayIntegrator::MEOption meopt) const=0;
133
137 virtual void constructSpinInfo(ParticleVector decay) const;
138
145 virtual bool accept(vector<int> id)=0;
146
154 virtual unsigned int decayMode(vector<int> id)=0;
155
162 void decayModeInfo(unsigned int imode, int& iq, int& ia) const {
163 if(imode<quark_.size()) {
164 iq=quark_[imode];
165 ia=antiquark_[imode];
166 }
167 else {
168 iq=0;
169 ia=0;
170 }
171 }
172
179 virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
180
181public:
182
190
196 void persistentInput(PersistentIStream & is, int version);
198
202 static void Init();
203
204protected:
205
211 void addDecayMode(int iq,int ia) {
212 quark_.push_back(iq);
213 antiquark_.push_back(ia);
214 }
215
220 void setInitialModes(unsigned int nmodes) {numberModes_=nmodes;}
221
222private:
223
227 WeakCurrent & operator=(const WeakCurrent &) = delete;
228
229private:
230
234 vector<int> quark_;
235
239 vector<int> antiquark_;
240
244 unsigned int numberModes_;
245
246};
247
248}
249
250
251#endif /* HERWIG_WeakCurrent_H */
MEOption
Enum for the matrix element option.
This class is designed to store the information needed for a given phase-space channel for use by the...
The WeakCurrent class is the base class for the hadronic currents produced in weak decays.
Definition: WeakCurrent.h:59
vector< int > antiquark_
The PDG codes for the antiquarks contained in the current.
Definition: WeakCurrent.h:239
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
void addDecayMode(int iq, int ia)
Add a decay mode to the list.
Definition: WeakCurrent.h:211
unsigned int numberModes_
The initial number of modes.
Definition: WeakCurrent.h:244
WeakCurrent & operator=(const WeakCurrent &)=delete
Private and non-existent assignment operator.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
WeakCurrent()
Default constructor.
Definition: WeakCurrent.h:66
virtual bool accept(vector< int > id)=0
Accept the decay.
void decayModeInfo(unsigned int imode, int &iq, int &ia) const
Information on a decay mode.
Definition: WeakCurrent.h:162
virtual bool createMode(int icharge, tcPDPtr resonance, FlavourInfo flavour, unsigned int imode, PhaseSpaceModePtr mode, unsigned int iloc, int ires, PhaseSpaceChannel phase, Energy upp)=0
Complete the construction of the decay mode for integration.classes inheriting from this one.
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia)=0
The particles produced by the current.
virtual void dataBaseOutput(ofstream &os, bool header, bool create) const
Output the setup information for the particle database.
virtual void constructSpinInfo(ParticleVector decay) const
Construct the SpinInfo for the decay products.
virtual unsigned int decayMode(vector< int > id)=0
Return the decay mode number for a given set of particles in the current.
static void Init()
Standard Init function used to initialize the interfaces.
virtual vector< LorentzPolarizationVectorE > current(tcPDPtr resonance, FlavourInfo flavour, const int imode, const int ichan, Energy &scale, const tPDVector &outgoing, const vector< Lorentz5Momentum > &momenta, DecayIntegrator::MEOption meopt) const =0
Hadronic current.
unsigned int numberOfModes() const
Return the number of modes handled by this current.
Definition: WeakCurrent.h:111
void setInitialModes(unsigned int nmodes)
Set initial number of modes.
Definition: WeakCurrent.h:220
vector< int > quark_
The PDG codes for the quarks contained in the current.
Definition: WeakCurrent.h:234
-*- C++ -*-
vector< tPDPtr > tPDVector
vector< PPtr > ParticleVector
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr