herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
FFDipole.h
1// -*- C++ -*-
2//
3// FFDipole.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_FFDipole_H
10#define HERWIG_FFDipole_H
11//
12// This is the declaration of the FFDipole class.
13//
14
15#include "ThePEG/Repository/EventGenerator.h"
16#include "Herwig/Decay/DecayIntegrator.fh"
17#include "Herwig/Utilities/Kinematics.h"
18#include "Herwig/Utilities/Maths.h"
19#include "ThePEG/StandardModel/StandardModelBase.h"
20#include "ThePEG/Vectors/Lorentz5Vector.h"
21#include "ThePEG/Interface/Interfaced.h"
22#include "FFDipole.fh"
23
24namespace Herwig {
25using namespace ThePEG;
27
38class FFDipole: public Interfaced {
39
40public:
41
46 _emin(1.e-6*MeV), _eminrest(100*MeV), _eminlab(100*MeV), _emax(),
47 _multiplicity(), _m(3), _charge(), _qdrf(2),
48 _qnewdrf(2), _qprf(2), _qnewprf(2), _qlab(2), _qnewlab(2), _dipolewgt(),
49 _yfswgt(), _jacobianwgt(), _mewgt(), _maxwgt(7.0), _mode(1), _maxtry(500),
50 _energyopt(1), _betaopt(4), _dipoleopt(), _nweight(0), _wgtsum(0.), _wgtsq(0.),
51 _weightOutput(false) {}
52
53public:
54
63 ParticleVector children,
64 tDecayIntegratorPtr decayer);
65
66public:
67
75
81 void persistentInput(PersistentIStream & is, int version);
83
90 static void Init();
91
92protected:
93
100 virtual IBPtr clone() const {return new_ptr(*this);}
101
106 virtual IBPtr fullclone() const {return new_ptr(*this);}
108
109protected:
110
121 double photon(double beta1,double ombeta1, double beta2, double ombeta2);
122
132 double exactDipoleWeight(double beta1,double ombeta1,
133 double beta2,double ombeta2,unsigned int iphot) {
134 double opbc,ombc;
135 // if cos is greater than zero use result accurate as cos->1
136 if(_cosphot[iphot]>0) {
137 opbc=1.+beta2*_cosphot[iphot];
138 ombc=ombeta1+beta1*sqr(_sinphot[iphot])/(1.+_cosphot[iphot]);
139 }
140 // if cos is less than zero use result accurate as cos->-1
141 else {
142 opbc=ombeta2+beta2*sqr(_sinphot[iphot])/(1.-_cosphot[iphot]);
143 ombc=1.-beta1*_cosphot[iphot];
144 }
145 return 0.5/(opbc*ombc)*(1.+beta1*beta2
146 -0.5*ombeta1*(1.+beta1)*opbc/ombc
147 -0.5*ombeta2*(1.+beta2)*ombc/opbc);
148 }
149
153 double jacobianWeight() {
154 Energy pcm1=Kinematics::pstarTwoBodyDecay(_m[0],_m[1],_m[2]);
155 Energy m12 =sqrt((_qnewdrf[0]+_qnewdrf[1]).m2()) ;
156 Energy pcm2=Kinematics::pstarTwoBodyDecay(m12,_m[1],_m[2]) ;
157 double betaprobeta = pcm2*_m[0]/pcm1/m12 ;
158 double spros = sqr(m12/_m[0]) ;
159 double deltafn = m12/(m12+_bigLdrf.e());
160 return betaprobeta*spros*deltafn ;
161 }
162
166 double meWeight(const ParticleVector & children);
167
174 double makePhotons(const Boost & boost,
175 const ParticleVector & children);
176
183 bool boostMomenta(const Boost & boost);
184
189 unsigned int removePhotons();
190
194 double collinearWeight(const ParticleVector & children);
195
199 double virtualWeight(const ParticleVector & children);
200
201protected:
202
209 virtual void dofinish();
211
212private:
213
218 FFDipole & operator=(const FFDipole &) = delete;
219
220private:
221
225 void printDebugInfo(const Particle & p,
226 const ParticleVector & children,
227 double wgt) const;
228
229private:
230
234 Energy _emin;
235
239 Energy _eminrest;
240
244 Energy _eminlab;
245
249 Energy _emax;
250
254 unsigned int _multiplicity;
255
259 vector<Energy> _m;
260
264 double _charge;
265
273 vector<Lorentz5Momentum> _qdrf;
274
277 vector<Lorentz5Momentum> _qnewdrf;
278
282 vector<Lorentz5Momentum> _ldrf;
283
287 Lorentz5Momentum _bigLdrf;
289
297 vector<Lorentz5Momentum> _qprf;
298
302 vector<Lorentz5Momentum> _qnewprf;
303
307 vector<Lorentz5Momentum> _lprf;
308
312 Lorentz5Momentum _bigLprf;
314
322 vector<Lorentz5Momentum> _qlab;
323
327 vector<Lorentz5Momentum> _qnewlab;
328
332 vector<Lorentz5Momentum> _llab;
333
337 Lorentz5Momentum _bigLlab;
339
340
350
354 double _yfswgt;
355
360
364 double _mewgt;
365
369 double _maxwgt;
371
380 vector<double> _cosphot;
381
385 vector<double> _sinphot;
387
391 vector<double> _photonwgt;
392
396 vector<bool> _photcut;
397
401 unsigned int _mode;
402
406 unsigned int _maxtry;
407
411 unsigned int _energyopt;
412
416 unsigned int _betaopt;
417
421 unsigned int _dipoleopt;
422
426 tDecayIntegratorPtr _decayer;
427
432
440 unsigned int _nweight;
441
445 double _wgtsum;
446
450 double _wgtsq;
451
457};
458
459}
460
461#endif /* HERWIG_FFDipole_H */
The FFDipole class generates radiation from a final-final dipole for the generation of photons in dec...
Definition: FFDipole.h:38
bool boostMomenta(const Boost &boost)
Boost all the momenta from the dipole rest frame via the parent rest frame to the lab.
vector< Lorentz5Momentum > _qlab
Momentum of the particles in the lab frame.
Definition: FFDipole.h:322
vector< double > _sinphot
Sine of the photon angles.
Definition: FFDipole.h:385
bool _weightOutput
Whether or not to output the averages.
Definition: FFDipole.h:455
double _charge
Produce of the particles charges.
Definition: FFDipole.h:264
double photon(double beta1, double ombeta1, double beta2, double ombeta2)
Generate the momentum of a photon.
double collinearWeight(const ParticleVector &children)
The real emission weight in the collinear limit.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual IBPtr clone() const
Make a simple clone of this object.
Definition: FFDipole.h:100
double _maxwgt
Maximum weight.
Definition: FFDipole.h:369
unsigned int _dipoleopt
Option for the form of the primary distribution.
Definition: FFDipole.h:421
unsigned int _betaopt
Option for the inclusion of higher order corrections.
Definition: FFDipole.h:416
void printDebugInfo(const Particle &p, const ParticleVector &children, double wgt) const
Debug output.
vector< Lorentz5Momentum > _qprf
Momentum of the particles in the parent's rest frame.
Definition: FFDipole.h:297
double _jacobianwgt
Reweighting factor due to phase space.
Definition: FFDipole.h:359
Energy _eminlab
The minimum photon energy in the lab frame.
Definition: FFDipole.h:244
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Definition: FFDipole.h:106
unsigned int _mode
Type of unweighting to perform.
Definition: FFDipole.h:401
vector< Lorentz5Momentum > _qdrf
Momenta of the particles in the dipole rest frame.
Definition: FFDipole.h:273
FFDipole & operator=(const FFDipole &)=delete
The assignment operator is private and must never be called.
unsigned int _nweight
Storage of averages etc for testing.
Definition: FFDipole.h:440
vector< bool > _photcut
Whether a given photon passes the energy cut.
Definition: FFDipole.h:396
unsigned int removePhotons()
Remove any photons which fail the energy cuts.
double _wgtsq
Sum of squares of weights.
Definition: FFDipole.h:450
virtual ParticleVector generatePhotons(const Particle &p, ParticleVector children, tDecayIntegratorPtr decayer)
Member to generate the photons from the dipole.
Lorentz5Momentum _bigLlab
Total momentum of the photons in the lab frame.
Definition: FFDipole.h:337
Energy _eminrest
The minimum photon energy in the rest frame.
Definition: FFDipole.h:239
vector< Energy > _m
Masses of the particles involved.
Definition: FFDipole.h:259
vector< Lorentz5Momentum > _lprf
Momenta of the photons in the parent rest frame.
Definition: FFDipole.h:307
tDecayIntegratorPtr _decayer
The decayer.
Definition: FFDipole.h:426
vector< double > _cosphot
Angles of the photons with respect to the first charged particle which are stored for numerical accur...
Definition: FFDipole.h:380
double _wgtsum
Sum of weights.
Definition: FFDipole.h:445
unsigned int _multiplicity
Photon multiplicity being generated.
Definition: FFDipole.h:254
FFDipole()
The default constructor.
Definition: FFDipole.h:45
vector< Lorentz5Momentum > _llab
Momenta of the photons in the lab frame.
Definition: FFDipole.h:332
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
double exactDipoleWeight(double beta1, double ombeta1, double beta2, double ombeta2, unsigned int iphot)
Calculate the exact weight for the dipole.
Definition: FFDipole.h:132
virtual void dofinish()
Finalize this object.
vector< Lorentz5Momentum > _qnewlab
Momenta of the charged particles in the lab frame after radiation.
Definition: FFDipole.h:327
static void Init()
The standard Init function used to initialize the interfaces.
double _dipolewgt
Reweighting factors due to differences between the true and crude distributions.
Definition: FFDipole.h:349
Energy _emax
The maximum photon energy.
Definition: FFDipole.h:249
double makePhotons(const Boost &boost, const ParticleVector &children)
Member which generates the photons.
double virtualWeight(const ParticleVector &children)
The vrtiual correction weight.
vector< Lorentz5Momentum > _qnewprf
Momenta of the charged particles in the parent's rest frame after radiation.
Definition: FFDipole.h:302
Lorentz5Momentum _bigLdrf
Total momentum of the photons in the dipole rest frame.
Definition: FFDipole.h:287
Lorentz5Momentum _bigLprf
Total momentum of the photons in the parent rest frame.
Definition: FFDipole.h:312
vector< Lorentz5Momentum > _ldrf
Momenta of the photons in the dipole rest frame.
Definition: FFDipole.h:282
double _yfswgt
Reweighting factor for the YFS form-factor.
Definition: FFDipole.h:354
double jacobianWeight()
Jacobian factor for the weight.
Definition: FFDipole.h:153
unsigned int _energyopt
Option for the energy cut-off.
Definition: FFDipole.h:411
double _mewgt
Reweighting factor due to matrix element corrections.
Definition: FFDipole.h:364
double meWeight(const ParticleVector &children)
Matrix element weight.
vector< double > _photonwgt
Weights for the individual photons.
Definition: FFDipole.h:391
Energy _emin
The minimum photon energy in the boosted frame.
Definition: FFDipole.h:234
tPPtr _parent
The decaying particle.
Definition: FFDipole.h:431
unsigned int _maxtry
Maximum number of attempts to generate a result.
Definition: FFDipole.h:406
vector< Lorentz5Momentum > _qnewdrf
Definition: FFDipole.h:277
Energy pstarTwoBodyDecay(const Energy M, const Energy m1, const Energy m2)
For the two body decay M -> m1 + m2 it gives the module of the 3-momentum of the decay product in the...
Definition: Kinematics.h:93
-*- C++ -*-
constexpr double pi
ThePEG::Ptr< Particle >::transient_pointer tPPtr
double sqrt(int x)
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
vector< PPtr > ParticleVector
constexpr auto sqr(const T &x) -> decltype(x *x)