herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
KPiCurrent.h
1// -*- C++ -*-
2//
3// KPiCurrent.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_KPiCurrent_H
10#define HERWIG_KPiCurrent_H
11//
12// This is the declaration of the KPiCurrent class.
13//
14
15#include "WeakCurrent.h"
16#include "Herwig/Utilities/Kinematics.h"
17
18namespace Herwig {
19
20using namespace ThePEG;
21
28class KPiCurrent: public WeakCurrent {
29
30public:
31
36
37
58 virtual bool createMode(int icharge, tcPDPtr resonance,
59 FlavourInfo flavour,
60 unsigned int imode,PhaseSpaceModePtr mode,
61 unsigned int iloc,int ires,
62 PhaseSpaceChannel phase, Energy upp );
63
73 virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
75
76
90 virtual vector<LorentzPolarizationVectorE>
91 current(tcPDPtr resonance,
92 FlavourInfo flavour,
93 const int imode, const int ichan,Energy & scale,
94 const tPDVector & outgoing,
95 const vector<Lorentz5Momentum> & momenta,
96 DecayIntegrator::MEOption meopt) const;
97
103 virtual bool accept(vector<int> id);
104
110 virtual unsigned int decayMode(vector<int> id);
111
118 virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
119
120public:
121
129
135 void persistentInput(PersistentIStream & is, int version);
137
144 static void Init();
145
146protected:
147
157 Complex sWaveBreitWigner(Energy2 q2,unsigned int ires) const {
158 Energy q=sqrt(q2),gam(ZERO);
159 Energy2 m2=sqr(_scamass[ires]);
160 if(q>_mK+_mpi) {
163 gam = _scawidth[ires]*m2/q2*p/pX;
164 }
165 return m2/(m2-q2-Complex(0.,1.)*q*gam);
166 }
167
173 Complex pWaveBreitWigner(Energy2 q2,unsigned int ires) const {
174 Energy q=sqrt(q2),gam(ZERO);
175 Energy2 m2=sqr(_vecmass[ires]);
176 if(q>_mK+_mpi) {
179 double ratio=p/pX;
180 gam = _vecwidth[ires]*m2/q2*ratio*sqr(ratio);
181 }
182 return m2/(m2-q2-Complex(0.,1.)*q*gam);
183 }
185
186protected:
187
194 virtual IBPtr clone() const {return new_ptr(*this);}
195
200 virtual IBPtr fullclone() const {return new_ptr(*this);}
202
203protected:
204
207
213 virtual void doinit();
215
216private:
217
222 KPiCurrent & operator=(const KPiCurrent &) = delete;
223
224private:
225
230
235
243 double _cV;
244
248 double _cS;
250
258 vector<double> _vecmag;
259
263 vector<double> _vecphase;
264
268 vector<Complex> _vecwgt;
269
273 vector<Energy> _vecmass;
274
278 vector<Energy> _vecwidth;
280
288 vector<double> _scamag;
289
293 vector<double> _scaphase;
294
298 vector<Complex> _scawgt;
299
303 vector<Energy> _scamass;
304
308 vector<Energy> _scawidth;
310
318 Energy _mpi;
319
323 Energy _mK;
325
329 vector<int> _resmap;
330};
331
332}
333
334#endif /* HERWIG_KPiCurrent_H */
MEOption
Enum for the matrix element option.
Here is the documentation of the KPiCurrent class.
Definition: KPiCurrent.h:28
bool _transverse
Whether to use or in the projection operator.
Definition: KPiCurrent.h:234
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
Hadronic current.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
Energy _mpi
Masses for calculating the running widths.
Definition: KPiCurrent.h:318
virtual bool createMode(int icharge, tcPDPtr resonance, FlavourInfo flavour, unsigned int imode, PhaseSpaceModePtr mode, unsigned int iloc, int ires, PhaseSpaceChannel phase, Energy upp)
Complete the construction of the decay mode for integration.classes inheriting from this one.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Energy _mK
The kaon mass.
Definition: KPiCurrent.h:323
double _cS
, normalization of the scalar piece
Definition: KPiCurrent.h:248
virtual unsigned int decayMode(vector< int > id)
Return the decay mode number for a given set of particles in the current.
virtual IBPtr clone() const
Make a simple clone of this object.
Definition: KPiCurrent.h:194
vector< Energy > _scamass
Masses of the scalar resonances.
Definition: KPiCurrent.h:303
virtual void doinit()
Initialize this object after the setup phase before saving and EventGenerator to disk.
vector< double > _vecmag
Parameters for the vector resonances.
Definition: KPiCurrent.h:258
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Definition: KPiCurrent.h:200
vector< double > _scaphase
Phase of the scalar weights.
Definition: KPiCurrent.h:293
double _cV
Normalizations of the vector and scalar pieces.
Definition: KPiCurrent.h:243
Complex pWaveBreitWigner(Energy2 q2, unsigned int ires) const
p-wave Breit-Wigner for the vector resonances
Definition: KPiCurrent.h:173
vector< Energy > _scawidth
Widths of the scalar resonances.
Definition: KPiCurrent.h:308
bool _localparameters
Use local value of the parameters not those from the ParticleData objects.
Definition: KPiCurrent.h:229
vector< Energy > _vecwidth
Widths of the vector resonances.
Definition: KPiCurrent.h:278
vector< Energy > _vecmass
Masses of the vector resonances.
Definition: KPiCurrent.h:273
vector< double > _vecphase
Phase of the vector weights.
Definition: KPiCurrent.h:263
static void Init()
The standard Init function used to initialize the interfaces.
KPiCurrent()
The default constructor.
Complex sWaveBreitWigner(Energy2 q2, unsigned int ires) const
Breit-Wigner distributions.
Definition: KPiCurrent.h:157
virtual bool accept(vector< int > id)
Accept the decay.
vector< Complex > _vecwgt
Weights for the vector resonaces.
Definition: KPiCurrent.h:268
vector< double > _scamag
Parameters for the scalar resonances.
Definition: KPiCurrent.h:288
vector< Complex > _scawgt
Weights for the scalar resonances.
Definition: KPiCurrent.h:298
KPiCurrent & operator=(const KPiCurrent &)=delete
The assignment operator is private and must never be called.
virtual void dataBaseOutput(ofstream &os, bool header, bool create) const
Output the setup information for the particle database.
vector< int > _resmap
Map for the resonances.
Definition: KPiCurrent.h:329
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia)
The particles produced by the current.
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
Energy pstarTwoBodyDecay(const Energy M, const Energy m1, const Energy m2)
For the two body decay M -> m1 + m2 it gives the module of the 3-momentum of the decay product in the...
Definition: Kinematics.h:93
-*- C++ -*-
double sqrt(int x)
std::complex< double > Complex
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
vector< tPDPtr > tPDVector
constexpr ZeroUnit ZERO
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
constexpr auto sqr(const T &x) -> decltype(x *x)