herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
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 "WeakDecayCurrent.h"
16 #include "Herwig/Utilities/Kinematics.h"
17 
18 namespace Herwig {
19 
20 using namespace ThePEG;
21 
29 
30 public:
31 
35  KPiCurrent();
36 
37 
55  virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
56  unsigned int iloc,unsigned int ires,
57  DecayPhaseSpaceChannelPtr phase,Energy upp);
58 
68  virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
70 
80  virtual vector<LorentzPolarizationVectorE>
81  current(const int imode,const int ichan,Energy & scale,
82  const ParticleVector & decay, DecayIntegrator::MEOption meopt) const;
83 
89  virtual bool accept(vector<int> id);
90 
96  virtual unsigned int decayMode(vector<int> id);
97 
104  virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
105 
106 public:
107 
114  void persistentOutput(PersistentOStream & os) const;
115 
121  void persistentInput(PersistentIStream & is, int version);
123 
130  static void Init();
131 
132 protected:
133 
143  Complex sWaveBreitWigner(Energy2 q2,unsigned int ires) const {
144  Energy q=sqrt(q2),gam(ZERO);
145  Energy2 m2=sqr(_scamass[ires]);
146  if(q>_mK+_mpi) {
147  Energy pX=Kinematics::pstarTwoBodyDecay(_scamass[ires],_mK,_mpi);
148  Energy p =Kinematics::pstarTwoBodyDecay( q ,_mK,_mpi);
149  gam = _scawidth[ires]*m2/q2*p/pX;
150  }
151  return m2/(m2-q2-Complex(0.,1.)*q*gam);
152  }
153 
159  Complex pWaveBreitWigner(Energy2 q2,unsigned int ires) const {
160  Energy q=sqrt(q2),gam(ZERO);
161  Energy2 m2=sqr(_vecmass[ires]);
162  if(q>_mK+_mpi) {
163  Energy pX=Kinematics::pstarTwoBodyDecay(_vecmass[ires],_mK,_mpi);
164  Energy p =Kinematics::pstarTwoBodyDecay( q ,_mK,_mpi);
165  double ratio=p/pX;
166  gam = _vecwidth[ires]*m2/q2*ratio*sqr(ratio);
167  }
168  return m2/(m2-q2-Complex(0.,1.)*q*gam);
169  }
171 
172 protected:
173 
180  virtual IBPtr clone() const {return new_ptr(*this);}
181 
186  virtual IBPtr fullclone() const {return new_ptr(*this);}
188 
189 protected:
190 
193 
199  virtual void doinit();
201 
202 private:
203 
208  KPiCurrent & operator=(const KPiCurrent &) = delete;
209 
210 private:
211 
216 
221 
229  double _cV;
230 
234  double _cS;
236 
244  vector<double> _vecmag;
245 
249  vector<double> _vecphase;
250 
254  vector<Complex> _vecwgt;
255 
259  vector<Energy> _vecmass;
260 
264  vector<Energy> _vecwidth;
266 
274  vector<double> _scamag;
275 
279  vector<double> _scaphase;
280 
284  vector<Complex> _scawgt;
285 
289  vector<Energy> _scamass;
290 
294  vector<Energy> _scawidth;
296 
304  Energy _mpi;
305 
309  Energy _mK;
311 
315  vector<int> _resmap;
316 };
317 
318 }
319 
320 #endif /* HERWIG_KPiCurrent_H */
Energy _mpi
Masses for calculating the running widths.
Definition: KPiCurrent.h:304
Complex pWaveBreitWigner(Energy2 q2, unsigned int ires) const
p-wave Breit-Wigner for the vector resonances
Definition: KPiCurrent.h:159
The WeakDecayCurrent class is the base class for the hadronic currents produced in weak decays...
double sqrt(int x)
std::complex< double > Complex
vector< int > _resmap
Map for the resonances.
Definition: KPiCurrent.h:315
bool _localparameters
Use local value of the parameters not those from the ParticleData objects.
Definition: KPiCurrent.h:215
vector< double > _vecphase
Phase of the vector weights.
Definition: KPiCurrent.h:249
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
vector< double > _scamag
Parameters for the scalar resonances.
Definition: KPiCurrent.h:274
constexpr auto sqr(const T &x) -> decltype(x *x)
vector< Energy > _vecwidth
Widths of the vector resonances.
Definition: KPiCurrent.h:264
vector< Energy > _vecmass
Masses of the vector resonances.
Definition: KPiCurrent.h:259
double _cV
Normalizations of the vector and scalar pieces.
Definition: KPiCurrent.h:229
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Definition: KPiCurrent.h:186
MEOption
Enum for the matrix element option.
vector< Complex > _vecwgt
Weights for the vector resonaces.
Definition: KPiCurrent.h:254
Energy _mK
The kaon mass.
Definition: KPiCurrent.h:309
vector< tPDPtr > tPDVector
vector< double > _scaphase
Phase of the scalar weights.
Definition: KPiCurrent.h:279
Here is the documentation of the KPiCurrent class.
Definition: KPiCurrent.h:28
vector< Energy > _scamass
Masses of the scalar resonances.
Definition: KPiCurrent.h:289
vector< Complex > _scawgt
Weights for the scalar resonances.
Definition: KPiCurrent.h:284
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
vector< Energy > _scawidth
Widths of the scalar resonances.
Definition: KPiCurrent.h:294
-*- C++ -*-
vector< double > _vecmag
Parameters for the vector resonances.
Definition: KPiCurrent.h:244
bool _transverse
Whether to use or in the projection operator.
Definition: KPiCurrent.h:220
vector< PPtr > ParticleVector
double _cS
, normalization of the scalar piece
Definition: KPiCurrent.h:234
constexpr ZeroUnit ZERO
Complex sWaveBreitWigner(Energy2 q2, unsigned int ires) const
Breit-Wigner distributions.
Definition: KPiCurrent.h:143
virtual IBPtr clone() const
Make a simple clone of this object.
Definition: KPiCurrent.h:180