herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.5
TwoPionPhotonCurrent.h
1 // -*- C++ -*-
2 //
3 // TwoPionPhotonCurrent.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2017 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 
197 
201  TwoPionPhotonCurrent & operator=(const TwoPionPhotonCurrent &) = delete;
202 
203 private:
204 
210  complex<InvEnergy> FFunction(Energy2 q2) const {
211  complex<InvEnergy2> output(ZERO);
212  for(unsigned int ix=0, N=_resweights.size(); ix<N && ix <3;++ix) {
213  output -= _resweights[ix]*BreitWigner(q2,ix);
214  }
215  return output*_grho*_grhoomegapi*sqrt(2.);
216  }
217 
225  complex<InvEnergy2> BreitWigner(Energy2 q2,unsigned int ires) const {
226  static const Complex ii(0.,1.);
227  complex<Energy2> denom;
228  if(ires<_rhomasses.size()) {
229  denom = q2-_rhomasses[ires]*_rhomasses[ires]+ii*_rhomasses[ires]*_rhowidths[ires];
230  }
231  else if(ires==10) {
232  denom = q2-_omegamass*_omegamass+ii*_omegamass*_omegawidth;
233  }
234  else assert(false);
235  return 1./denom;
236  }
237 
238 private:
239 
243  Energy2 _grho;
244 
248  InvEnergy _grhoomegapi;
249 
253  vector<double> _resweights;
254 
260 
264  vector<Energy> _rhomasses;
265 
269  vector<Energy> _rhowidths;
270 
275 
279  Energy _omegamass;
280 
284  Energy _omegawidth;
285 
290  Energy _intmass;
291 
296  Energy _intwidth;
297 
298 };
299 
300 }
301 
302 
303 #include "ThePEG/Utilities/ClassTraits.h"
304 
305 namespace ThePEG {
306 
313 template <>
314  struct BaseClassTrait<Herwig::TwoPionPhotonCurrent,1> {
316  typedef Herwig::WeakDecayCurrent NthBase;
317 };
318 
323 template <>
324 struct ClassTraits<Herwig::TwoPionPhotonCurrent>
325  : public ClassTraitsBase<Herwig::TwoPionPhotonCurrent> {
327  static string className() { return "Herwig::TwoPionPhotonCurrent"; }
333  static string library() { return "HwWeakCurrents.so"; }
334 
335 };
336 
339 }
340 
341 #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.
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...
std::complex< double > Complex
static ClassDescription< TwoPionPhotonCurrent > initTwoPionPhotonCurrent
Describe a concrete class with persistent data.
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