herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
IFDipole.h
1 // -*- C++ -*-
2 //
3 // IFDipole.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_IFDipole_H
10 #define HERWIG_IFDipole_H
11 //
12 // This is the declaration of the IFDipole class.
13 //
14 
15 #include "ThePEG/Repository/EventGenerator.h"
16 #include "Herwig/Utilities/Kinematics.h"
17 #include "Herwig/Utilities/Maths.h"
18 #include "ThePEG/StandardModel/StandardModelBase.h"
19 #include "ThePEG/Vectors/Lorentz5Vector.h"
20 #include "ThePEG/Interface/Interfaced.h"
21 #include "IFDipole.fh"
22 
23 namespace Herwig {
24 using namespace ThePEG;
35 class IFDipole: public Interfaced {
36 
37 public:
38 
45  _alpha(), _emin(1.0*MeV), _emax(), _multiplicity(),
46  _map(2,0), _m(3), _chrg1(), _chrg2(), _qprf(2), _qnewprf(2),
47  _lprf(), _bigLprf(), _qlab(2), _qnewlab(2), _llab(), _bigLlab(),
48  _dipolewgt(), _yfswgt(), _jacobianwgt(), _mewgt(), _maxwgt(2.0),
49  _mode(1), _maxtry(500), _energyopt(1), _betaopt(1)
50  {}
52 
53 public:
54 
61  virtual ParticleVector generatePhotons(const Particle & p,ParticleVector children);
62 
63 public:
64 
71  void persistentOutput(PersistentOStream & os) const;
72 
78  void persistentInput(PersistentIStream & is, int version);
80 
87  static void Init();
88 
89 protected:
90 
97  virtual IBPtr clone() const {return new_ptr(*this);}
98 
103  virtual IBPtr fullclone() const {return new_ptr(*this);}
105 
106 protected:
107 
115  virtual void doinit();
117 
118 protected:
119 
126  double nbar(double beta1,double ombeta1) {
127  return _alpha/pi*_chrg1*_chrg2/beta1*
128  log((1.+beta1)/ombeta1)*log(_emax/_emin);
129  }
130 
138  double photon(double beta1,double ombeta1);
139 
147  double exactDipoleWeight(double beta1,double ombeta1,
148  unsigned int iphot) {
149  double ombc;
150  // if cos is greater than zero use result accurate as cos->1
151  if(_cosphot[iphot]>0.0)
152  ombc=ombeta1+beta1*sqr(_sinphot[iphot])/(1.+_cosphot[iphot]);
153  // if cos is less than zero use result accurate as cos->-1
154  else
155  ombc=1.-beta1*_cosphot[iphot];
156  return 1.0*sqr(beta1*_sinphot[iphot]/ombc);
157  }
158 
165  double crudeYFSFormFactor(double b,double omb) {
166  double Y =-_alpha/pi*_chrg1*_chrg2 / b * log((1.+b)/omb) * log(_m[0]/(2.*_emin));
167  return exp(Y);
168  }
169 
178  double exactYFSFormFactor(double beta1,double ombeta1,
179  double beta2,double ombeta2);
180 
184  double jacobianWeight();
185 
189  double meWeight(ParticleVector children);
190 
197  double makePhotons(Boost boost,ParticleVector children);
198 
204  LorentzRotation solveBoost(const Lorentz5Momentum & q,
205  const Lorentz5Momentum & p ) const;
206 
207 private:
208 
213  IFDipole & operator=(const IFDipole &) = delete;
214 
215 private:
216 
220  double _alpha;
221 
225  Energy _emin;
226 
230  Energy _emax;
231 
235  unsigned int _multiplicity;
236 
242  vector<int> _map;
243 
247  vector<Energy> _m;
248 
252  double _chrg1;
253 
257  double _chrg2;
258 
266  vector<Lorentz5Momentum> _qprf;
267 
271  vector<Lorentz5Momentum> _qnewprf;
272 
276  vector<Lorentz5Momentum> _lprf;
277 
281  Lorentz5Momentum _bigLprf;
283 
291  vector<Lorentz5Momentum> _qlab;
292 
296  vector<Lorentz5Momentum> _qnewlab;
297 
301  vector<Lorentz5Momentum> _llab;
302 
306  Lorentz5Momentum _bigLlab;
308 
309 
318  double _dipolewgt;
319 
323  double _yfswgt;
324 
328  double _jacobianwgt;
329 
333  double _mewgt;
334 
338  double _maxwgt;
340 
349  vector<double> _cosphot;
350 
354  vector<double> _sinphot;
356 
360  unsigned int _mode;
361 
365  unsigned int _maxtry;
366 
370  unsigned int _energyopt;
371 
375  unsigned int _betaopt;
376 
377 };
378 
379 }
380 
381 #endif /* HERWIG_IFDipole_H */
unsigned int _multiplicity
Photon multiplicity being generated.
Definition: IFDipole.h:235
double _chrg1
charge of the parent particle
Definition: IFDipole.h:252
double crudeYFSFormFactor(double b, double omb)
The crude YFS form factor for calculating the weight.
Definition: IFDipole.h:165
unsigned int _mode
Type of unweighting to perform.
Definition: IFDipole.h:360
Definition: expm-1.h:45
vector< Lorentz5Momentum > _qprf
Momentum of the particles in the parent&#39;s rest frame.
Definition: IFDipole.h:266
vector< double > _sinphot
Sine of the photon angles.
Definition: IFDipole.h:354
double _dipolewgt
Reweighting factors due to differences between the true and crude distributions.
Definition: IFDipole.h:318
Energy _emax
The maximum photon energy.
Definition: IFDipole.h:230
double _alpha
the fine structure constant at $q^2=0$
Definition: IFDipole.h:220
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
double _maxwgt
Maximum weight.
Definition: IFDipole.h:338
constexpr double pi
double nbar(double beta1, double ombeta1)
Average crude photon multiplicity.
Definition: IFDipole.h:126
constexpr auto sqr(const T &x) -> decltype(x *x)
vector< Lorentz5Momentum > _qnewprf
Momenta of the charged particles in the parent&#39;s rest frame after radiation.
Definition: IFDipole.h:271
vector< Lorentz5Momentum > _qnewlab
Momenta of the charged particles in the lab frame after radiation.
Definition: IFDipole.h:296
Lorentz5Momentum _bigLlab
Total momentum of the photons in the lab frame.
Definition: IFDipole.h:306
The IFDipole class generates radiation from a final-final dipole for the generation of photons in dec...
Definition: IFDipole.h:35
vector< Lorentz5Momentum > _lprf
Momenta of the photons in the parent rest frame.
Definition: IFDipole.h:276
Energy _emin
The minimum photon energy.
Definition: IFDipole.h:225
unsigned int _maxtry
Maximum number of attempts to generate a result.
Definition: IFDipole.h:365
unsigned int _energyopt
Option for the energy cut-off.
Definition: IFDipole.h:370
vector< Lorentz5Momentum > _llab
Momenta of the photons in the lab frame.
Definition: IFDipole.h:301
double _chrg2
charge of the (charged) child particle
Definition: IFDipole.h:257
vector< Lorentz5Momentum > _qlab
Momentum of the particles in the lab frame.
Definition: IFDipole.h:291
double _yfswgt
Reweighting factor for the YFS form-factor.
Definition: IFDipole.h:323
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Definition: IFDipole.h:103
IFDipole()
The default constructor.
Definition: IFDipole.h:44
vector< double > _cosphot
Angles of the photons with respect to the first charged particle which are stored for numerical accur...
Definition: IFDipole.h:349
Lorentz5Momentum _bigLprf
Total momentum of the photons in the parent rest frame.
Definition: IFDipole.h:281
virtual IBPtr clone() const
Make a simple clone of this object.
Definition: IFDipole.h:97
-*- C++ -*-
double _mewgt
Reweighting factor due to matrix element corrections.
Definition: IFDipole.h:333
vector< int > _map
Map from arguments of lists such that _q???[_map[0]] is the charged child and _q???[_map[1]] is the neutral child.
Definition: IFDipole.h:242
unsigned int _betaopt
Option for the inclusion of higher order corrections.
Definition: IFDipole.h:375
double exactDipoleWeight(double beta1, double ombeta1, unsigned int iphot)
Calculate the exact weight for the dipole.
Definition: IFDipole.h:147
vector< PPtr > ParticleVector
double _jacobianwgt
Reweighting factor due to phase space.
Definition: IFDipole.h:328
vector< Energy > _m
Masses of the particles involved.
Definition: IFDipole.h:247