herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
TwoKaonOnePionCurrent.h
1// -*- C++ -*-
2//
3// TwoKaonOnePionCurrent.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_TwoKaonOnePionCurrent_H
10#define HERWIG_TwoKaonOnePionCurrent_H
11//
12// This is the declaration of the TwoKaonOnePionCurrent class.
13//
14
15#include "WeakCurrent.h"
16
17namespace Herwig {
18
19using namespace ThePEG;
20
68
69public:
70
75
96 virtual bool createMode(int icharge, tcPDPtr resonance,
97 FlavourInfo flavour,
98 unsigned int imode,PhaseSpaceModePtr mode,
99 unsigned int iloc,int ires,
100 PhaseSpaceChannel phase, Energy upp );
102
103
117 virtual vector<LorentzPolarizationVectorE>
118 current(tcPDPtr resonance,
119 FlavourInfo flavour,
120 const int imode, const int ichan,Energy & scale,
121 const tPDVector & outgoing,
122 const vector<Lorentz5Momentum> & momenta,
123 DecayIntegrator::MEOption meopt) const;
124
130 virtual bool accept(vector<int> id);
131
138 virtual unsigned int decayMode(vector<int> id);
139
148 virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
149
156 virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
157
170 double threeBodyMatrixElement(const int imode, const Energy2 q2,
171 const Energy2 s3, const Energy2 s2,
172 const Energy2 s1, const Energy m1,
173 const Energy m2, const Energy m3) const;
174
175public:
176
184
190 void persistentInput(PersistentIStream & is, int version);
192
199 static void Init();
200
201protected:
202
209 virtual IBPtr clone() const;
210
215 virtual IBPtr fullclone() const;
217
218protected:
219
227 virtual void doinit();
228
232 virtual void doinitrun();
233
237 virtual void doupdate();
239
240private:
241
247
248private:
249
255 Complex Trho1(Energy2 q2,int ires) const {
256 if(ires>=int(_rho1wgts.size())) return 0.;
257 double norm = std::accumulate(_rho1wgts.begin(),_rho1wgts.end(),0.);
258 unsigned int imin=0,imax=_rho1wgts.size();
259 if(ires>0) {
260 imin=ires;
261 imax=imin+1;
262 }
263 Complex output(0.);
264 for(unsigned int ix=imin;ix<imax;++ix)
265 output+=_rho1wgts[ix]*
266 Resonance::BreitWignerPWave(q2,_rho1mass[ix],_rho1width[ix],_mpi,_mpi);
267 return output/norm;
268 }
269
275 Complex Trho2(Energy2 q2,int ires) const {
276 if(ires>=int(_rho2wgts.size())) return 0.;
277 double norm = std::accumulate(_rho2wgts.begin(),_rho2wgts.end(),0.);
278 unsigned int imin=0,imax=_rho2wgts.size();
279 if(ires>0) {
280 imin=ires;
281 imax=imin+1;
282 }
283 Complex output(0.);
284 for(unsigned int ix=imin;ix<imax;++ix)
285 output+=_rho2wgts[ix]*
286 Resonance::BreitWignerPWave(q2,_rho2mass[ix],_rho2width[ix],_mpi,_mpi);
287 return output/norm;
288 }
289
295 Complex TKstar1(Energy2 q2,int ires) const {
296 if(ires>=int(_kstar1wgts.size())) return 0.;
297 double norm = std::accumulate(_kstar1wgts.begin(),_kstar1wgts.end(),0.);
298 unsigned int imin=0,imax=_kstar1wgts.size();
299 if(ires>0) {
300 imin=ires;
301 imax=imin+1;
302 }
303 Complex output(0.);
304 for(unsigned int ix=imin;ix<imax;++ix)
305 output+=_kstar1wgts[ix]*
306 Resonance::BreitWignerPWave(q2,_kstar1mass[ix],_kstar1width[ix],_mK,_mpi);
307 return output/norm;
308 }
309
315 Complex a1BreitWigner(Energy2 q2) const {
316 Complex ii(0.,1.);
317 Energy2 m2(_a1mass*_a1mass);
318 Energy q(sqrt(q2));
319 Energy gamma = !_a1opt ?
320 _a1mass*_a1width*Resonance::ga1(q2)/Resonance::ga1(_a1mass*_a1mass)/sqrt(q2) : (*_a1runinter)(q2);
321 return m2/(m2-q2-ii*q*gamma);
322 }
323
328 void inita1Width(int iopt);
329
335 Complex Tomega(Energy2 q2, int ires) const;
336
342 Complex OmegaPhiBreitWigner(Energy2 q2, unsigned int ires) const {
343 Energy2 m2,mg;
344 if(ires==0) {
345 m2=sqr(_omegamass);
347 }
348 else {
349 m2=sqr(_phimass);
351 }
352 return (-m2+Complex(0.,1.)*mg)/(q2-m2+Complex(0.,1.)*mg);
353 }
354
362 Complex TOmegaKStar(Energy2 s1,Energy2 s2,int ires) const;
363
364private:
365
373 vector<double> _rho1wgts;
374
378 vector<Energy> _rho1mass;
379
383 vector<Energy> _rho1width;
385
393 vector<double> _rho2wgts;
394
398 vector<Energy> _rho2mass;
399
403 vector<Energy> _rho2width;
405
413 vector<double> _kstar1wgts;
414
418 vector<Energy> _kstar1mass;
419
423 vector<Energy> _kstar1width;
425
433 Energy _a1mass;
434
438 Energy _a1width;
439
443 vector<Energy> _a1runwidth;
444
448 vector<Energy2> _a1runq2;
449
455
463 double _epsomega;
464
469
474
478 Energy _phimass;
479
483 Energy _phiwidth;
485
490
494 Energy _fpi;
495
499 Energy _mpi;
500
504 Energy _mK;
505
514
518 bool _a1opt;
520
524 Energy _maxmass;
525
529 Energy _maxcalc;
530};
531
532}
533
534#endif /* HERWIG_TwoKaonOnePionCurrent_H */
MEOption
Enum for the matrix element option.
Ptr< Interpolator< ValT, ArgT > >::pointer Ptr
Pointer to an Interpolator.
Definition: Interpolator.h:38
This class is designed to store the information needed for a given phase-space channel for use by the...
The TwoKaonOnePionCurrent class implements the model of M.
Energy _fpi
The pion decay constant, .
virtual unsigned int decayMode(vector< int > id)
Return the decay mode number for a given set of particles in the current.
virtual void doupdate()
Check sanity of the object during the setup phase.
vector< double > _rho1wgts
Parameters for the in the axial-vector terms.
Energy _a1mass
Parameters for the three meson resonances.
Energy _maxcalc
The maximum mass when the running width was calculated.
vector< double > _kstar1wgts
Parameters for the in the axial-vector terms.
vector< Energy > _rho1mass
Masses.
TwoKaonOnePionCurrent & operator=(const TwoKaonOnePionCurrent &)=delete
The assignment operator is private and must never be called.
double threeBodyMatrixElement(const int imode, const Energy2 q2, const Energy2 s3, const Energy2 s2, const Energy2 s1, const Energy m1, const Energy m2, const Energy m3) const
the matrix element for the decay to calculate the running width
bool _initializea1
Initialization switches.
vector< Energy > _rho1width
Widths.
vector< Energy > _kstar1width
Widths.
vector< Energy > _rho2width
Widths.
bool _a1opt
Option for the width.
vector< Energy > _a1runwidth
The width for the running width calculation.
virtual void doinit()
Initialize this object after the setup phase before saving and EventGenerator to disk.
Complex OmegaPhiBreitWigner(Energy2 q2, unsigned int ires) const
The and Breit-Wigner.
Complex TKstar1(Energy2 q2, int ires) const
The lineshape for the axial-vector terms.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
vector< Energy2 > _a1runq2
The for the running width calculation.
Complex Trho2(Energy2 q2, int ires) const
The lineshape for the vector terms.
vector< double > _rho2wgts
Parameters for the in the vector terms.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
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.
Complex Tomega(Energy2 q2, int ires) const
The function.
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.
Energy _a1width
The width of the resonances.
virtual void dataBaseOutput(ofstream &os, bool header, bool create) const
Output the setup information for the particle database.
Complex a1BreitWigner(Energy2 q2) const
Breit-Wigner
double _omegaKstarwgt
The relative weight of the and where needed.
vector< Energy > _kstar1mass
Masses.
double _epsomega
Parameters for the function.
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia)
The particles produced by the current.
virtual void doinitrun()
Initialize this object to the begining of the run phase.
Complex Trho1(Energy2 q2, int ires) const
The lineshape for the axial-vector terms.
void inita1Width(int iopt)
Initialize the running width.
TwoKaonOnePionCurrent()
The default constructor.
virtual bool accept(vector< int > id)
Accept the decay.
Complex TOmegaKStar(Energy2 s1, Energy2 s2, int ires) const
The form-factor for the form-factor.
Energy _maxmass
The maximum mass of the hadronic system.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Interpolator< Energy, Energy2 >::Ptr _a1runinter
The interpolator for the running width calculation.
vector< Energy > _rho2mass
Masses.
virtual IBPtr clone() const
Make a simple clone of this object.
static void Init()
The standard Init function used to initialize the interfaces.
The WeakCurrent class is the base class for the hadronic currents produced in weak decays.
Definition: WeakCurrent.h:59
-*- C++ -*-
double sqrt(int x)
std::complex< double > Complex
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
vector< tPDPtr > tPDVector
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
constexpr auto sqr(const T &x) -> decltype(x *x)