herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
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
23namespace Herwig {
24using namespace ThePEG;
35class IFDipole: public Interfaced {
36
37public:
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(),
49 _mode(1), _maxtry(500), _energyopt(1), _betaopt(1)
50 {}
52
53public:
54
62
63public:
64
72
78 void persistentInput(PersistentIStream & is, int version);
80
87 static void Init();
88
89protected:
90
97 virtual IBPtr clone() const {return new_ptr(*this);}
98
103 virtual IBPtr fullclone() const {return new_ptr(*this);}
105
106protected:
107
115 virtual void doinit();
117
118protected:
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
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
207private:
208
213 IFDipole & operator=(const IFDipole &) = delete;
214
215private:
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
319
323 double _yfswgt;
324
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 */
The IFDipole class generates radiation from a final-final dipole for the generation of photons in dec...
Definition: IFDipole.h:35
virtual IBPtr clone() const
Make a simple clone of this object.
Definition: IFDipole.h:97
vector< Lorentz5Momentum > _llab
Momenta of the photons in the lab frame.
Definition: IFDipole.h:301
vector< int > _map
Map from arguments of lists such that _q???[_map[0]] is the charged child and _q??...
Definition: IFDipole.h:242
double exactYFSFormFactor(double beta1, double ombeta1, double beta2, double ombeta2)
The exact YFS form factor for calculating the weight.
LorentzRotation solveBoost(const Lorentz5Momentum &q, const Lorentz5Momentum &p) const
Compute a Lorentz transform from p to q.
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
double _yfswgt
Reweighting factor for the YFS form-factor.
Definition: IFDipole.h:323
double exactDipoleWeight(double beta1, double ombeta1, unsigned int iphot)
Calculate the exact weight for the dipole.
Definition: IFDipole.h:147
unsigned int _multiplicity
Photon multiplicity being generated.
Definition: IFDipole.h:235
double _alpha
the fine structure constant at $q^2=0$
Definition: IFDipole.h:220
vector< Lorentz5Momentum > _qlab
Momentum of the particles in the lab frame.
Definition: IFDipole.h:291
vector< Energy > _m
Masses of the particles involved.
Definition: IFDipole.h:247
double meWeight(ParticleVector children)
Matrix element weight.
vector< Lorentz5Momentum > _qnewprf
Momenta of the charged particles in the parent's rest frame after radiation.
Definition: IFDipole.h:271
vector< Lorentz5Momentum > _qprf
Momentum of the particles in the parent's rest frame.
Definition: IFDipole.h:266
IFDipole()
The default constructor.
Definition: IFDipole.h:44
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Definition: IFDipole.h:103
unsigned int _energyopt
Option for the energy cut-off.
Definition: IFDipole.h:370
double _maxwgt
Maximum weight.
Definition: IFDipole.h:338
double _mewgt
Reweighting factor due to matrix element corrections.
Definition: IFDipole.h:333
unsigned int _maxtry
Maximum number of attempts to generate a result.
Definition: IFDipole.h:365
vector< double > _cosphot
Angles of the photons with respect to the first charged particle which are stored for numerical accur...
Definition: IFDipole.h:349
double jacobianWeight()
Jacobian factor for the weight.
double _chrg2
charge of the (charged) child particle
Definition: IFDipole.h:257
virtual ParticleVector generatePhotons(const Particle &p, ParticleVector children)
Member to generate the photons from the dipole.
unsigned int _betaopt
Option for the inclusion of higher order corrections.
Definition: IFDipole.h:375
static void Init()
The standard Init function used to initialize the interfaces.
double makePhotons(Boost boost, ParticleVector children)
Member which generates the photons.
double _chrg1
charge of the parent particle
Definition: IFDipole.h:252
Lorentz5Momentum _bigLlab
Total momentum of the photons in the lab frame.
Definition: IFDipole.h:306
Energy _emin
The minimum photon energy.
Definition: IFDipole.h:225
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
unsigned int _mode
Type of unweighting to perform.
Definition: IFDipole.h:360
IFDipole & operator=(const IFDipole &)=delete
The assignment operator is private and must never be called.
vector< Lorentz5Momentum > _lprf
Momenta of the photons in the parent rest frame.
Definition: IFDipole.h:276
double _jacobianwgt
Reweighting factor due to phase space.
Definition: IFDipole.h:328
Energy _emax
The maximum photon energy.
Definition: IFDipole.h:230
double crudeYFSFormFactor(double b, double omb)
The crude YFS form factor for calculating the weight.
Definition: IFDipole.h:165
double photon(double beta1, double ombeta1)
Generate the momentum of a photon.
vector< Lorentz5Momentum > _qnewlab
Momenta of the charged particles in the lab frame after radiation.
Definition: IFDipole.h:296
Lorentz5Momentum _bigLprf
Total momentum of the photons in the parent rest frame.
Definition: IFDipole.h:281
double _dipolewgt
Reweighting factors due to differences between the true and crude distributions.
Definition: IFDipole.h:318
vector< double > _sinphot
Sine of the photon angles.
Definition: IFDipole.h:354
double nbar(double beta1, double ombeta1)
Average crude photon multiplicity.
Definition: IFDipole.h:126
-*- C++ -*-
constexpr double pi
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
vector< PPtr > ParticleVector
constexpr auto sqr(const T &x) -> decltype(x *x)