herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
TwoPionPhotonCurrent.h
1 // -*- C++ -*-
2 //
3 // TwoPionPhotonCurrent.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_TwoPionPhotonCurrent_H
10 #define HERWIG_TwoPionPhotonCurrent_H
11 //
12 // This is the declaration of the TwoPionPhotonCurrent class.
13 //
14 #include "WeakDecayCurrent.h"
15 
16 namespace Herwig {
17 using namespace ThePEG;
18 
61 
62 public:
63 
68 
75  void persistentOutput(PersistentOStream & os) const;
76 
82  void persistentInput(PersistentIStream & is, int version);
84 
88  static void Init();
89 
90 public:
91 
92 
110  virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
111  unsigned int iloc,unsigned int ires,
112  DecayPhaseSpaceChannelPtr phase,Energy upp);
113 
123  virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
125 
135  virtual vector<LorentzPolarizationVectorE>
136  current(const int imode,const int ichan,Energy & scale,
137  const ParticleVector & decay,DecayIntegrator::MEOption meopt) const;
138 
144  virtual bool accept(vector<int> id);
145 
152  virtual unsigned int decayMode(vector<int> id);
153 
160  virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
161 
162 protected:
163 
170  virtual IBPtr clone() const {return new_ptr(*this);}
171 
176  virtual IBPtr fullclone() const {return new_ptr(*this);}
178 
179 protected:
180 
188  virtual void doinit();
190 
191 private:
192 
196  TwoPionPhotonCurrent & operator=(const TwoPionPhotonCurrent &) = delete;
197 
198 private:
199 
205  complex<InvEnergy> FFunction(Energy2 q2) const {
206  complex<InvEnergy2> output(ZERO);
207  for(unsigned int ix=0, N=_resweights.size(); ix<N && ix <3;++ix) {
208  output -= _resweights[ix]*BreitWigner(q2,ix);
209  }
210  return output*_grho*_grhoomegapi*sqrt(2.);
211  }
212 
220  complex<InvEnergy2> BreitWigner(Energy2 q2,unsigned int ires) const {
221  static const Complex ii(0.,1.);
222  complex<Energy2> denom;
223  if(ires<_rhomasses.size()) {
224  denom = q2-_rhomasses[ires]*_rhomasses[ires]+ii*_rhomasses[ires]*_rhowidths[ires];
225  }
226  else if(ires==10) {
227  denom = q2-_omegamass*_omegamass+ii*_omegamass*_omegawidth;
228  }
229  else assert(false);
230  return 1./denom;
231  }
232 
233 private:
234 
238  Energy2 _grho;
239 
243  InvEnergy _grhoomegapi;
244 
248  vector<double> _resweights;
249 
255 
259  vector<Energy> _rhomasses;
260 
264  vector<Energy> _rhowidths;
265 
270 
274  Energy _omegamass;
275 
279  Energy _omegawidth;
280 
285  Energy _intmass;
286 
291  Energy _intwidth;
292 
293 };
294 
295 }
296 
297 
298 #endif /* HERWIG_TwoPionPhotonCurrent_H */
The WeakDecayCurrent class is the base class for the hadronic currents produced in weak decays...
double sqrt(int x)
complex< InvEnergy2 > BreitWigner(Energy2 q2, unsigned int ires) const
Fixed width Breit wigner.
std::complex< double > Complex
bool _rhoparameters
Use local parameters for the rho resonances rather than from the particle data objects.
Energy2 _grho
Coupling of the rho to the photon, .
Energy _intwidth
Width for the intermediate in the phase-space, this is a technical parameter to improve the phase-spa...
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
virtual IBPtr clone() const
Make a simple clone of this object.
This class implements the decay current for via an intermediate .
MEOption
Enum for the matrix element option.
Energy _intmass
Mass for the intermediate in the phase-space, this is a technical parameter to improve the phase-spac...
vector< tPDPtr > tPDVector
bool _omegaparameters
use local parameters for the omega rather than from the particle data objects
vector< double > _resweights
Weights of the different rho resonances in the current.
vector< Energy > _rhomasses
Masses of the resonances.
InvEnergy _grhoomegapi
Coupling of the rho to the omega and a pion, .
-*- C++ -*-
complex< InvEnergy > FFunction(Energy2 q2) const
Calculate the function at a given scale.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
vector< PPtr > ParticleVector
vector< Energy > _rhowidths
Widths of the resonances.
constexpr ZeroUnit ZERO