herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
PDT
GenericWidthGenerator.h
1
// -*- C++ -*-
2
//
3
// GenericWidthGenerator.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_GenericWidthGenerator_H
10
#define HERWIG_GenericWidthGenerator_H
11
//
12
// This is the declaration of the GenericWidthGenerator class.
13
//
14
#include "ThePEG/PDT/WidthGenerator.h"
15
#include "ThePEG/PDT/ParticleData.h"
16
#include "ThePEG/PDT/DecayMode.h"
17
#include "GenericWidthGenerator.fh"
18
#include "Herwig/Decay/DecayIntegrator.h"
19
#include "Herwig/Decay/PhaseSpaceMode.h"
20
#include "Herwig/Utilities/Interpolator.h"
21
#include "GenericMassGenerator.h"
22
#include <iostream>
23
24
namespace
Herwig
{
25
using namespace
ThePEG
;
26
30
class
ModelGenerator;
31
35
typedef
Selector<tDMPtr>
DecayMap
;
36
37
51
class
GenericWidthGenerator
:
public
WidthGenerator
{
52
56
friend
class
ModelGenerator
;
57
58
public
:
59
63
friend
class
TwoBodyAllOnCalculator
;
64
65
public
:
66
70
GenericWidthGenerator
()
71
:
mass_
(),
prefactor_
(1.),
initialize_
(false),
output_
(false),
72
BRnorm_
(true),
npoints_
(50),
73
BRminimum_
(0.01),
intOrder_
(1),
twoBodyOnly_
(false)
74
{}
75
82
void
persistentOutput
(
PersistentOStream
& os)
const
;
83
89
void
persistentInput
(
PersistentIStream
& is,
int
version);
91
95
static
void
Init
();
96
97
public
:
98
104
virtual
bool
accept
(
const
ParticleData
& part)
const
{
105
if
(!
particle_
)
return
false
;
106
return
part.
id
() ==
particle_
->id() ||
107
( part.
CC
() && part.
CC
()->id() ==
particle_
->id() );
108
}
109
118
virtual
Energy
width
(
const
ParticleData
& part, Energy m)
const
;
119
125
virtual
DecayMap
rate
(
const
ParticleData
& part)
const
{
126
return
part.
decaySelector
();
127
}
128
135
virtual
DecayMap
rate
(
const
Particle
& part);
136
143
virtual
Energy
partialWidth
(
int
iloc,Energy m)
const
;
144
149
virtual
pair<Energy,Energy>
width
(Energy,
const
ParticleData
&)
const
;
151
157
virtual
void
dataBaseOutput
(ofstream &
output
,
bool
header=
true
);
158
163
virtual
Length
lifeTime
(
const
ParticleData
&, Energy m, Energy w)
const
;
164
165
protected
:
166
173
Energy
partial2BodyWidth
(
int
iloc,Energy q)
const
{
174
return
partial2BodyWidth
(iloc,q,
MEmass1_
[iloc],
MEmass2_
[iloc]);
175
}
176
185
virtual
Energy
partial2BodyWidth
(
int
iloc,Energy m0,Energy m1,Energy m2)
const
;
186
193
virtual
void
setupMode
(
tcDMPtr
mode, tDecayIntegratorPtr decayer,
unsigned
int
imode);
194
198
tPDPtr
particle
()
const
{
return
particle_
;}
199
203
void
particle
(
tPDPtr
in) {
particle_
= in;}
204
205
protected
:
206
213
virtual
IBPtr
clone
()
const
{
return
new_ptr(*
this
);}
214
219
virtual
IBPtr
fullclone
()
const
{
return
new_ptr(*
this
);}
221
222
protected
:
223
231
virtual
void
doinit
();
232
237
virtual
void
dofinish
();
238
248
virtual
void
rebind
(
const
TranslationMap
& trans)
249
;
250
256
virtual
IVector
getReferences
();
258
263
int
MEcode
(
int
imode)
const
{
return
MEcode_
[imode];}
264
269
double
MEcoupling
(
int
imode)
const
{
return
MEcoupling_
[imode];}
270
271
275
Energy
mass
()
const
{
return
mass_
;}
276
284
bool
initialize
()
const
{
return
initialize_
;}
285
289
bool
output
()
const
{
return
output_
;}
290
294
vector<tDMPtr>
decayModes
()
const
{
return
decayModes_
;}
295
296
private
:
297
301
void
setParticle
(
string
);
302
306
string
getParticle
()
const
;
307
308
private
:
309
313
GenericWidthGenerator
&
operator=
(
const
GenericWidthGenerator
&) =
delete
;
314
315
private
:
316
320
tPDPtr
particle_
;
321
325
vector<tDMPtr>
decayModes_
;
326
330
vector<string>
decayTags_
;
331
335
vector<Energy>
minMass_
;
336
340
Energy
mass_
;
341
345
double
prefactor_
;
346
350
vector<int>
MEtype_
;
351
355
vector<int>
MEcode_
;
356
360
vector<Energy>
MEmass1_
;
364
vector<Energy>
MEmass2_
;
365
369
vector<double>
MEcoupling_
;
370
374
vector<bool>
modeOn_
;
375
379
vector<Energy>
interMasses_
;
380
384
vector<Energy>
interWidths_
;
385
389
vector<int>
noOfEntries_
;
390
394
bool
initialize_
;
395
399
bool
output_
;
400
404
bool
BRnorm_
;
405
409
int
npoints_
;
410
414
vector<Interpolator<Energy,Energy>::Ptr>
interpolators_
;
415
419
double
BRminimum_
;
420
424
unsigned
int
intOrder_
;
425
430
bool
twoBodyOnly_
;
431
};
432
433
}
434
435
#endif
/* HERWIG_GenericWidthGenerator_H */
Herwig::GenericWidthGenerator
The GenericWidthGenerator class is designed to automatically calculate the running width for a given ...
Definition:
GenericWidthGenerator.h:51
Herwig::GenericWidthGenerator::twoBodyOnly_
bool twoBodyOnly_
Whether or not to only include 2 body modes in the running width calculation, higher modes flat.
Definition:
GenericWidthGenerator.h:430
Herwig::GenericWidthGenerator::partial2BodyWidth
virtual Energy partial2BodyWidth(int iloc, Energy m0, Energy m1, Energy m2) const
The width for outgoing particles which can be off-shell.
Herwig::GenericWidthGenerator::lifeTime
virtual Length lifeTime(const ParticleData &, Energy m, Energy w) const
Given a particle type and a mass and a width of an instance of that particle type,...
Herwig::GenericWidthGenerator::output_
bool output_
Output the parameters.
Definition:
GenericWidthGenerator.h:399
Herwig::GenericWidthGenerator::BRnorm_
bool BRnorm_
normalise the terms so that the partial widths for an on-shell particle are correct
Definition:
GenericWidthGenerator.h:404
Herwig::GenericWidthGenerator::interMasses_
vector< Energy > interMasses_
storage of the massesto set up the interpolation tables
Definition:
GenericWidthGenerator.h:379
Herwig::GenericWidthGenerator::output
bool output() const
Output option for use by the inheriting classes.
Definition:
GenericWidthGenerator.h:289
Herwig::GenericWidthGenerator::clone
virtual IBPtr clone() const
Make a simple clone of this object.
Definition:
GenericWidthGenerator.h:213
Herwig::GenericWidthGenerator::partialWidth
virtual Energy partialWidth(int iloc, Energy m) const
The partial width for a given mode.
Herwig::GenericWidthGenerator::noOfEntries_
vector< int > noOfEntries_
the number of entries in the decay table for a particular mode
Definition:
GenericWidthGenerator.h:389
Herwig::GenericWidthGenerator::accept
virtual bool accept(const ParticleData &part) const
Return true if this width generator can handle the given particle type.
Definition:
GenericWidthGenerator.h:104
Herwig::GenericWidthGenerator::minMass_
vector< Energy > minMass_
The minimum mass of the decaying particle for which this decay mode is possible.
Definition:
GenericWidthGenerator.h:335
Herwig::GenericWidthGenerator::rebind
virtual void rebind(const TranslationMap &trans)
Rebind pointer to other Interfaced objects.
Herwig::GenericWidthGenerator::MEcode_
vector< int > MEcode_
The code for the matrix element.
Definition:
GenericWidthGenerator.h:355
Herwig::GenericWidthGenerator::MEcoupling
double MEcoupling(int imode) const
Coupling for a given mode.
Definition:
GenericWidthGenerator.h:269
Herwig::GenericWidthGenerator::mass
Energy mass() const
The on-shell mass of the particle.
Definition:
GenericWidthGenerator.h:275
Herwig::GenericWidthGenerator::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
Herwig::GenericWidthGenerator::particle
void particle(tPDPtr in)
Set the particle.
Definition:
GenericWidthGenerator.h:203
Herwig::GenericWidthGenerator::MEcode
int MEcode(int imode) const
Matrix element code for a given mode.
Definition:
GenericWidthGenerator.h:263
Herwig::GenericWidthGenerator::mass_
Energy mass_
The on-shell mass of the particle.
Definition:
GenericWidthGenerator.h:340
Herwig::GenericWidthGenerator::decayModes
vector< tDMPtr > decayModes() const
Access to the DecayModes.
Definition:
GenericWidthGenerator.h:294
Herwig::GenericWidthGenerator::doinit
virtual void doinit()
Initialize this object after the setup phase before saving and EventGenerator to disk.
Herwig::GenericWidthGenerator::partial2BodyWidth
Energy partial2BodyWidth(int iloc, Energy q) const
The width for on-shell particles.
Definition:
GenericWidthGenerator.h:173
Herwig::GenericWidthGenerator::GenericWidthGenerator
GenericWidthGenerator()
Default constructor.
Definition:
GenericWidthGenerator.h:70
Herwig::GenericWidthGenerator::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Definition:
GenericWidthGenerator.h:219
Herwig::GenericWidthGenerator::getParticle
string getParticle() const
Helper function for the interface.
Herwig::GenericWidthGenerator::operator=
GenericWidthGenerator & operator=(const GenericWidthGenerator &)=delete
Private and non-existent assignment operator.
Herwig::GenericWidthGenerator::initialize
bool initialize() const
Access to the decay modes.
Definition:
GenericWidthGenerator.h:284
Herwig::GenericWidthGenerator::MEtype_
vector< int > MEtype_
The type of ME, whether it is fixed, calculated by this class or interpolation.
Definition:
GenericWidthGenerator.h:350
Herwig::GenericWidthGenerator::MEmass1_
vector< Energy > MEmass1_
Mass of the first outgoing particle for the simple ME's.
Definition:
GenericWidthGenerator.h:360
Herwig::GenericWidthGenerator::decayModes_
vector< tDMPtr > decayModes_
The decaymodes.
Definition:
GenericWidthGenerator.h:325
Herwig::GenericWidthGenerator::modeOn_
vector< bool > modeOn_
is this mode used for the running width
Definition:
GenericWidthGenerator.h:374
Herwig::GenericWidthGenerator::interpolators_
vector< Interpolator< Energy, Energy >::Ptr > interpolators_
intepolators for the running width
Definition:
GenericWidthGenerator.h:414
Herwig::GenericWidthGenerator::npoints_
int npoints_
number of points to use for interpolation tables
Definition:
GenericWidthGenerator.h:409
Herwig::GenericWidthGenerator::width
virtual pair< Energy, Energy > width(Energy, const ParticleData &) const
Return the total width and the sum of the partial widths for modes which are used.
Herwig::GenericWidthGenerator::interWidths_
vector< Energy > interWidths_
storage of the widths to set up the interpolation tables
Definition:
GenericWidthGenerator.h:384
Herwig::GenericWidthGenerator::intOrder_
unsigned int intOrder_
Order of the interpolation for the tables.
Definition:
GenericWidthGenerator.h:424
Herwig::GenericWidthGenerator::setParticle
void setParticle(string)
Helper function for the interface.
Herwig::GenericWidthGenerator::rate
virtual DecayMap rate(const Particle &part)
Return a decay map for a given particle instance.
Herwig::GenericWidthGenerator::prefactor_
double prefactor_
Prefactor to get the on-shell width.
Definition:
GenericWidthGenerator.h:345
Herwig::GenericWidthGenerator::BRminimum_
double BRminimum_
minimum branching ratio for the inclusion in the total running width
Definition:
GenericWidthGenerator.h:419
Herwig::GenericWidthGenerator::dataBaseOutput
virtual void dataBaseOutput(ofstream &output, bool header=true)
Output the initialisation info for the database.
Herwig::GenericWidthGenerator::Init
static void Init()
Standard Init function used to initialize the interfaces.
Herwig::GenericWidthGenerator::MEcoupling_
vector< double > MEcoupling_
the coupling for a given me
Definition:
GenericWidthGenerator.h:369
Herwig::GenericWidthGenerator::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Herwig::GenericWidthGenerator::MEmass2_
vector< Energy > MEmass2_
Mass of the second outgoing particle for the simple ME's.
Definition:
GenericWidthGenerator.h:364
Herwig::GenericWidthGenerator::width
virtual Energy width(const ParticleData &part, Energy m) const
Calculate the width.
Herwig::GenericWidthGenerator::rate
virtual DecayMap rate(const ParticleData &part) const
Initialize the given decay map for the given particle type.
Definition:
GenericWidthGenerator.h:125
Herwig::GenericWidthGenerator::initialize_
bool initialize_
initialize the generator using the particle data object
Definition:
GenericWidthGenerator.h:394
Herwig::GenericWidthGenerator::decayTags_
vector< string > decayTags_
The tags for the DecayMode s.
Definition:
GenericWidthGenerator.h:330
Herwig::GenericWidthGenerator::particle
tPDPtr particle() const
Access to the particle dat for inheriting classes.
Definition:
GenericWidthGenerator.h:198
Herwig::GenericWidthGenerator::particle_
tPDPtr particle_
The pointer to the ParticleData object for the particle for this width generator.
Definition:
GenericWidthGenerator.h:320
Herwig::GenericWidthGenerator::setupMode
virtual void setupMode(tcDMPtr mode, tDecayIntegratorPtr decayer, unsigned int imode)
Perform the set up for a mode in classes inheriting from this one.
Herwig::GenericWidthGenerator::getReferences
virtual IVector getReferences()
Return a vector of all pointers to Interfaced objects used in this object.
Herwig::GenericWidthGenerator::dofinish
virtual void dofinish()
Finalize this object.
Herwig::ModelGenerator
This class is designed to store the particles in some model and then call the appropriate function to...
Definition:
ModelGenerator.h:31
Herwig::TwoBodyAllOnCalculator
The TwoBodyAllOnCalculator class is a wrapped around the the simple two body decay matrix elements in...
Definition:
TwoBodyAllOnCalculator.h:30
ThePEG::ParticleData
ThePEG::ParticleData::decaySelector
const DecaySelector & decaySelector() const
ThePEG::ParticleData::CC
tPDPtr CC() const
ThePEG::ParticleData::id
long id() const
ThePEG::Particle
ThePEG::PersistentIStream
ThePEG::PersistentOStream
ThePEG::Rebinder
ThePEG::Selector
ThePEG::WidthGenerator
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
Herwig::DecayMap
Selector< tDMPtr > DecayMap
Typedef to define a DecayMoap.
Definition:
GenericWidthGenerator.h:35
ThePEG
ThePEG::tPDPtr
ThePEG::Ptr< ParticleData >::transient_pointer tPDPtr
ThePEG::tcDMPtr
ThePEG::Ptr< DecayMode >::transient_const_pointer tcDMPtr
ThePEG::IBPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ThePEG::IVector
vector< IBPtr > IVector
Generated on Thu Jun 20 2024 17:50:53 for Herwig by
1.9.6