herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
TwoKaonOnePionDefaultCurrent.h
1// -*- C++ -*-
2//
3// TwoKaonOnePionDefaultCurrent.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_TwoKaonOnePionDefaultCurrent_H
10#define HERWIG_TwoKaonOnePionDefaultCurrent_H
11//
12// This is the declaration of the TwoKaonOnePionDefaultCurrent class.
13//
14#include "WeakCurrent.h"
15#include "Herwig/Utilities/Interpolator.h"
16#include "Herwig/Utilities/Kinematics.h"
17#include "ThePEG/StandardModel/StandardModelBase.h"
18#include "Herwig/Decay/ResonanceHelpers.h"
19#include <numeric>
20
21namespace Herwig {
22using namespace ThePEG;
23
44
50
51public:
52
57
71 virtual vector<LorentzPolarizationVectorE>
72 current(tcPDPtr resonance,
73 FlavourInfo flavour,
74 const int imode, const int ichan,Energy & scale,
75 const tPDVector & outgoing,
76 const vector<Lorentz5Momentum> & momenta,
77 DecayIntegrator::MEOption meopt) const;
78
84 virtual bool accept(vector<int> id);
85
92 virtual unsigned int decayMode(vector<int> id);
93
102 virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
103
104public:
105
113
119 void persistentInput(PersistentIStream & is, int version);
121
125 static void Init();
126
127public:
128
149 virtual bool createMode(int icharge, tcPDPtr resonance,
150 FlavourInfo flavour,
151 unsigned int imode,PhaseSpaceModePtr mode,
152 unsigned int iloc,int ires,
153 PhaseSpaceChannel phase, Energy upp );
155
162 virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
163
176 double threeBodyMatrixElement(const int imode, const Energy2 q2,
177 const Energy2 s3, const Energy2 s2,
178 const Energy2 s1, const Energy m1,
179 const Energy m2, const Energy m3) const;
180
181protected:
182
189 virtual IBPtr clone() const {return new_ptr(*this);}
190
195 virtual IBPtr fullclone() const {return new_ptr(*this);}
197
198protected:
199
207 virtual void doinit();
208
212 virtual void doinitrun();
213
217 virtual void doupdate();
219
220private:
221
226
227private:
228
235 Complex BrhoF123(Energy2 q2,int ires) const {
236 if(ires>=int(_rhoF123wgts.size())) return 0.;
237 Complex output(0.);
238 Complex norm = std::accumulate(_rhoF123wgts.begin(),
239 _rhoF123wgts.end(),Complex(0.));
240 unsigned int imin=0,imax=_rhoF123wgts.size();
241 if(ires>0) {
242 imin=ires;
243 imax=imin+1;
244 }
245 for(unsigned int ix=imin;ix<imax;++ix)
246 output+=_rhoF123wgts[ix]*Resonance::BreitWignerPWave(q2,_rhoF123masses[ix],
248 return output/norm;
249 }
250
257 Complex BrhoF5(Energy2 q2,int ires) const {
258 if(ires>=int(_rhoF5wgts.size())) return 0.;
259 Complex output(0.);
260 Complex norm = std::accumulate(_rhoF5wgts.begin(),
261 _rhoF5wgts.end(),Complex(0.));
262 unsigned int imin=0,imax=_rhoF5wgts.size();
263 if(ires>0) {
264 imin=ires;
265 imax=imin+1;
266 }
267 for(unsigned int ix=imin;ix<imax;++ix)
268 output+=_rhoF5wgts[ix]*Resonance::BreitWignerPWave(q2,_rhoF5masses[ix],
270 return output/norm;
271 }
272
279 Complex BKstarF123(Energy2 q2,int ires) const {
280 if(ires>=int(_kstarF123wgts.size())) return 0.;
281 Complex output(0.);
282 Complex norm = std::accumulate(_kstarF123wgts.begin(),
283 _kstarF123wgts.end(),Complex(0.));
284 unsigned int imin=0,imax=_kstarF123wgts.size();
285 if(ires>0) {
286 imin=ires;
287 imax=imin+1;
288 }
289 assert(imax<=_kstarF123wgts.size());
290 for(unsigned int ix=imin;ix<imax;++ix)
291 output+=_kstarF123wgts[ix]*Resonance::BreitWignerPWave(q2,_kstarF123masses[ix],
293 return output/norm;
294 }
295
303 Complex FKrho(Energy2 si,Energy2 sj,int ires) const {
304 Complex output;
305 if(ires<0)
306 output = _rhoKstarwgt*BKstarF123(si,-1)+BrhoF123(sj,-1);
307 else if(ires%2==0)
308 output= _rhoKstarwgt*BKstarF123(si,ires/2);
309 else if(ires%2==1)
310 output=BrhoF123(sj,ires/2);
311 return output/(1.+_rhoKstarwgt);
312 }
313
319 Complex a1BreitWigner(Energy2 q2) const {
320 if(!_a1opt)
321 return Resonance::BreitWignera1(q2,_a1mass,_a1width);
322 Complex ii(0.,1.);
323 Energy2 m2(_a1mass*_a1mass);
324 Energy q(sqrt(q2));
325 Energy width = (*_a1runinter)(q2);
326 return m2/(m2-q2-ii*q*width);
327 }
328
333 void inita1Width(int iopt);
334
335private:
336
341 vector<double> _rhoF123wgts;
342
347 vector<double> _kstarF123wgts;
348
353 vector<double> _rhoF5wgts;
354
359
363 vector<Energy> _a1runwidth;
364
368 vector<Energy2> _a1runq2;
369
374
379
383 Energy _a1mass;
384
388 Energy _a1width;
389
393 Energy _fpi;
394
398 Energy _mpi;
399
403 Energy _mK;
404
408 vector<Energy> _rhoF123masses;
409
413 vector<Energy> _rhoF5masses;
414
418 vector<Energy> _rhoF123widths;
419
423 vector<Energy> _rhoF5widths;
424
428 vector<Energy> _kstarF123masses;
429
433 vector<Energy> _kstarF123widths;
434
438 bool _a1opt;
439
443 Energy _maxmass;
444
448 Energy _maxcalc;
449
450};
451
452}
453
454#endif /* HERWIG_TwoKaonOnePionDefaultCurrent_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 TwoKaonOnePionDefaultCurrent class implements the currents from Z.Phys.C58:445 (1992),...
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.
vector< Energy2 > _a1runq2
The for the running width calculation.
vector< Energy > _rhoF123widths
The widths for the form factors.
Complex a1BreitWigner(Energy2 q2) const
Breit-Wigner
Energy _a1mass
The mass of the resonances.
vector< Energy > _rhoF123masses
The masses for the form factors.
Complex BrhoF123(Energy2 q2, int ires) const
The Breit-Wigner for the form factors.
bool _initializea1
Initialize the running width.
static void Init()
Standard Init function used to initialize the interfaces.
virtual IBPtr clone() const
Make a simple clone of this object.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Energy _a1width
The width of the resonances.
vector< Energy > _kstarF123widths
The widths for the form factors.
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
Energy _maxcalc
The maximum mass when the running width was calculated.
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.
vector< double > _rhoF123wgts
Parameters for the Breit-Wigner in the form factors.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
vector< Energy > _kstarF123masses
The masses for the form factors.
virtual void dataBaseOutput(ofstream &os, bool header, bool create) const
Output the setup information for the particle database.
vector< Energy > _a1runwidth
The width for the running width calculation.
Complex BrhoF5(Energy2 q2, int ires) const
The Breit-Wigner for the form factors.
Complex BKstarF123(Energy2 q2, int ires) const
The Breit-Wigner for the form factors.
virtual void doupdate()
Check sanity of the object during the setup phase.
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia)
The particles produced by the current.
vector< Energy > _rhoF5widths
The widths for the form factors.
virtual bool accept(vector< int > id)
Accept the decay.
virtual void doinitrun()
Initialize this object to the begining of the run phase.
virtual unsigned int decayMode(vector< int > id)
Return the decay mode number for a given set of particles in the current.
TwoKaonOnePionDefaultCurrent & operator=(const TwoKaonOnePionDefaultCurrent &)=delete
Private and non-existent assignment operator.
Energy _maxmass
The maximum mass of the hadronic system.
TwoKaonOnePionDefaultCurrent()
Default constructor.
Interpolator< Energy, Energy2 >::Ptr _a1runinter
The interpolator for the running width calculation.
friend class Defaulta1MatrixElement
The matrix element for the running width is a friend to keep some members private.
virtual void doinit()
Initialize this object after the setup phase before saving and EventGenerator to disk.
void inita1Width(int iopt)
Initialize the running width.
double _rhoKstarwgt
The relative weight of the and where needed.
vector< double > _kstarF123wgts
Parameters for the Breit-Wigner in the form factors.
vector< Energy > _rhoF5masses
The masses for the form factors.
vector< double > _rhoF5wgts
Parameters for the Breit-Wigner in the form factors.
Complex FKrho(Energy2 si, Energy2 sj, int ires) const
Mixed Breit Wigner for the form factor.
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