herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
EtaPiPiGammaDecayer.h
1 // -*- C++ -*-
2 //
3 // EtaPiPiGammaDecayer.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_EtaPiPiGammaDecayer_H
10 #define HERWIG_EtaPiPiGammaDecayer_H
11 // This is the declaration of the EtaPiPiGammaDecayer class.
12 
13 #include "Herwig/Utilities/Kinematics.h"
14 #include "Herwig/Decay/DecayIntegrator.h"
15 #include "Herwig/Decay/DecayPhaseSpaceMode.h"
16 #include "Herwig/Utilities/Interpolator.h"
17 #include "ThePEG/Helicity/LorentzPolarizationVector.h"
18 
19 namespace Herwig {
20 using namespace ThePEG;
21 
57 
58 public:
59 
64 
71  virtual int modeNumber(bool & cc, tcPDPtr parent,
72  const tPDVector & children) const;
73 
82  double me2(const int ichan,const Particle & part,
83  const ParticleVector & decay, MEOption meopt) const;
84 
90  virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
91 
105  virtual double threeBodyMatrixElement(const int imode,const Energy2 q2,
106  const Energy2 s3,const Energy2 s2,
107  const Energy2 s1,const Energy m1,
108  const Energy m2,const Energy m3) const;
109 
115  virtual void dataBaseOutput(ofstream & os,bool header) const;
116 
117 public:
118 
125  void persistentOutput(PersistentOStream & os) const;
126 
132  void persistentInput(PersistentIStream & is, int version);
134 
138  static void Init();
139 
140 protected:
141 
148  virtual IBPtr clone() const {return new_ptr(*this);}
149 
154  virtual IBPtr fullclone() const {return new_ptr(*this);}
156 
157 protected:
158 
161 
167  virtual void doinit();
168 
172  virtual void doinitrun();
174 
175 private:
176 
180  EtaPiPiGammaDecayer & operator=(const EtaPiPiGammaDecayer &) = delete;
181 
182 private:
183 
189  Complex analyticOmnes(Energy2 s) const {
190  Energy2 mpi2(_mpi*_mpi),mrho2(_mrho*_mrho);
191  double root, pi2 = sqr(Constants::pi);
192  Complex f,ii(0.,1.);
193  double pre(mpi2/12./pi2/_fpi/_fpi);
194  if(s>4.*mpi2) {
195  // real piece
196  root=sqrt(1.-4.*mpi2/s);
197  f=(1.-0.25*s/mpi2)*root*log((root+1.)/(-root+1.))-2.;
198  f *=pre;
199  // imaginary piece
200  f += ii*s/mrho2*_rhoconst/8.*pow(root,3);
201  }
202  else {
203  root=sqrt(4.*mpi2/s-1.);
204  f=2.*(1.-0.25*s/mpi2)*root*atan2(1.,root)-2.;
205  f *=pre;
206  }
207  return 1.-s/mrho2-s/48./pi2/_fpi/_fpi*log(mrho2/mpi2)-f;
208  }
209 
215  Complex experimentalOmnes(Energy2 s) const {
216  if(!_oreal) {
217  _oreal = make_InterpolatorPtr(_omnesfunctionreal,_omnesenergy,3);
218  _oimag = make_InterpolatorPtr(_omnesfunctionimag,_omnesenergy,3);
219  }
220  Energy q(sqrt(s)); Complex ii(0.,1.);
221  return (*_oreal)(q)+ii*(*_oimag)(q);
222  }
223 
224 private:
225 
229  Energy _fpi;
230 
234  vector<int> _incoming;
235 
239  vector<double> _coupling;
240 
244  vector<double> _maxweight;
245 
249  vector<int> _option;
250 
254  InvEnergy2 _aconst;
255 
259  double _cconst;
260 
264  Energy _mrho;
265 
269  Energy _rhowidth;
270 
274  double _rhoconst;
275 
279  Energy _mpi;
280 
285 
289  vector<Energy> _energy;
290 
294  vector<double> _phase;
295 
299  vector<Energy> _omnesenergy;
300 
304  vector<double> _omnesfunctionreal;
305 
309  vector<double> _omnesfunctionimag;
310 
315 
319  unsigned int _npoints;
320 
329 
335 
339  Energy _epscut;
340 
344  unsigned int _nsizea;
345 
349  unsigned int _nsizeb;
350 
354  mutable RhoDMatrix _rho;
355 
359  mutable vector<Helicity::LorentzPolarizationVector> _vectors;
360 };
361 
367 
374  _interpolator=inter;
375  _precision=cut;
376  }
377 
381  void setScale(Energy2 in) { _s=in;}
382 
386  InvEnergy4 operator ()(Energy2 xpoint) const {
387  InvEnergy4 output = InvEnergy4();
388  Energy q(sqrt(xpoint));
389  if(abs(xpoint-_s)>_precision)
390  output= (*_interpolator)(q)/xpoint/(xpoint-_s);
391  return output;
392  }
394  typedef InvEnergy4 ValType;
396  typedef Energy2 ArgType;
397 
402 
406  Energy2 _s;
407 
411  Energy2 _precision;
412 };
413 }
414 
415 #endif /* HERWIG_EtaPiPiGammaDecayer_H */
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
void setScale(Energy2 in)
Set the scale.
Interpolator< double, Energy >::Ptr _oimag
The interpolator for the imaginary part.
vector< int > _option
The option for the energy dependence of the prefactor.
double sqrt(int x)
vector< Energy > _energy
Energy values for the experimental data on the phase shift.
std::complex< double > Complex
Interpolator< double, Energy >::Ptr _interpolator
The interpolator.
vector< double > _coupling
Coupling for the decay, .
constexpr double pow(double x, ExponentT p)
The EtaPiPiGammaDecayer class implements the decay of the or to using either a VMD type model or a...
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
constexpr auto sqr(const T &x) -> decltype(x *x)
vector< Energy > _omnesenergy
Energy values for the interpolation table for the Omnes function.
unsigned int _nsizea
Size of the vectors for the experimental data.
Interpolator< ValT, ArgT >::Ptr make_InterpolatorPtr(size_t size, const double f[], ValT funit, const double x[], ArgT xunit, unsigned int order)
helper function to create InterpolatorPtr easily from bare arrays (analogous to make_pair() ) ...
Definition: Interpolator.h:206
Complex analyticOmnes(Energy2 s) const
The analytic Omnes function, .
vector< Helicity::LorentzPolarizationVector > _vectors
Polarization vectors for the photon.
Energy _epscut
Cut-off parameter for the integral of the experimental function.
A simple struct to provide the integrand for the integral .
Energy2 ArgType
Argument type for the GaussianIntegrator.
MEOption
Enum for the matrix element option.
vector< double > _omnesfunctionimag
Imaginary part of the Omnes function for the interpolation table.
vector< double > _maxweight
The maximum weight.
virtual IBPtr clone() const
Make a simple clone of this object.
InvEnergy4 ValType
Return type for the GaussianIntegrator.
bool _initialize
set up of the interpolation table
vector< tPDPtr > tPDVector
OmnesIntegrand(Interpolator< double, Energy >::Ptr inter, Energy2 cut)
constructor with the interpolator and precision
unsigned int _npoints
Number of points for the intepolation of the experimental Omnes function.
Main class for Decayers implementing multi-channel phase space integration.
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
RhoDMatrix _rho
Spin densit matrix.
Complex experimentalOmnes(Energy2 s) const
The experimental Omnes function, .
vector< double > _phase
Experimental values of the phase shift.
vector< int > _incoming
the PDG code for the incoming particle
unsigned int _nsizeb
Size of the vectors for the interpolation tables.
InvEnergy2 _aconst
The constants for the omnes function form.
double _cconst
The constants for the Omnes function form.
-*- C++ -*-
Interpolator< double, Energy >::Ptr _oreal
Interpolators for the experimental Omnes function.
vector< PPtr > ParticleVector
double _rhoconst
Constant for the running width.
Energy _fpi
the pion decay constant, .
vector< double > _omnesfunctionreal
Real part of the Omnes function for the interpolation table.
bool _localparameters
Use local values of the parameters.
Energy2 _precision
The precision.