herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
ThreePionDefaultCurrent.h
1// -*- C++ -*-
2//
3// ThreePionDefaultCurrent.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_ThreePionDefaultCurrent_H
10#define HERWIG_ThreePionDefaultCurrent_H
11//
12// This is the declaration of the ThreePionDefaultCurrent 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;
180protected:
181
188 virtual IBPtr clone() const {return new_ptr(*this);}
189
194 virtual IBPtr fullclone() const {return new_ptr(*this);}
196
197protected:
198
206 virtual void doinit();
207
211 virtual void doinitrun();
212
216 virtual void doupdate();
218
219private:
220
225
226private:
227
234 Complex BrhoF123(Energy2 q2,int ires) const {
235 if(ires>=int(_rhoF123wgts.size())) return 0.;
236 Complex output(0.);
237 Complex norm = std::accumulate(_rhoF123wgts.begin(),
238 _rhoF123wgts.end(),Complex(0.));
239 unsigned int imin=0,imax=_rhoF123wgts.size();
240 if(ires>0) {
241 imin=ires;
242 imax=imin+1;
243 }
244 for(unsigned int ix=imin;ix<imax;++ix)
245 output+=_rhoF123wgts[ix]*Resonance::BreitWignerPWave(q2,_rhoF123masses[ix],
247 return output/norm;
248 }
249
255 Complex a1BreitWigner(Energy2 q2) const {
256 if(!_a1opt)
257 return Resonance::BreitWignera1(q2,_a1mass,_a1width);
258 Complex ii(0.,1.);
259 Energy2 m2(_a1mass*_a1mass);
260 Energy q(sqrt(q2));
261 Energy width = (*_a1runinter)(q2);
262 return m2/(m2-q2-ii*q*width);
263 }
264
269 void inita1Width(int iopt);
270
271private:
272
277 vector<double> _rhoF123wgts;
278
282 vector<Energy> _a1runwidth;
283
287 vector<Energy2> _a1runq2;
288
293
298
302 Energy _a1mass;
303
307 Energy _a1width;
308
312 Energy _fpi;
313
317 Energy _mpi;
318
322 vector<Energy> _rhoF123masses;
323
327 vector<Energy> _rhoF123widths;
328
332 bool _a1opt;
333
337 Energy _maxmass;
338
342 Energy _maxcalc;
343
344};
345
346}
347
348#endif /* HERWIG_ThreePionDefaultCurrent_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 ThreePionDefaultCurrent class implements the currents from Z.Phys.C58:445 (1992),...
virtual void doinit()
Initialize this object after the setup phase before saving and EventGenerator to disk.
ThreePionDefaultCurrent & operator=(const ThreePionDefaultCurrent &)=delete
Private and non-existent assignment operator.
Energy _fpi
The pion decay constant, .
vector< double > _rhoF123wgts
Parameters for the Breit-Wigner in the form factors.
Energy _a1width
The width of the resonances.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
vector< Energy > _a1runwidth
The width for the running width calculation.
virtual IBPtr clone() const
Make a simple clone of this object.
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.
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
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.
virtual void doinitrun()
Initialize this object to the begining of the run phase.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
Energy _maxcalc
The maximum mass when the running width was calculated.
Energy _maxmass
The maximum mass of the hadronic system.
Complex BrhoF123(Energy2 q2, int ires) const
The Breit-Wigner for the form factors.
Complex a1BreitWigner(Energy2 q2) const
Breit-Wigner
virtual void dataBaseOutput(ofstream &os, bool header, bool create) const
Output the setup information for the particle database.
vector< Energy > _rhoF123widths
The widths for the form factors.
vector< Energy > _rhoF123masses
The masses for the form factors.
bool _initializea1
Initialize the running width.
Energy _a1mass
The mass of the resonances.
static void Init()
Standard Init function used to initialize the interfaces.
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia)
The particles produced by the current.
friend class Defaulta1MatrixElement
The matrix element for the running width is a friend to keep some members private.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
virtual unsigned int decayMode(vector< int > id)
Return the decay mode number for a given set of particles in the current.
virtual bool accept(vector< int > id)
Accept the decay.
ThreePionDefaultCurrent()
Default constructor.
vector< Energy2 > _a1runq2
The for the running width calculation.
Interpolator< Energy, Energy2 >::Ptr _a1runinter
The interpolator for the running width calculation.
virtual void doupdate()
Check sanity of the object during the setup phase.
void inita1Width(int iopt)
Initialize the running width.
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