herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
Decay
General
GeneralTwoBodyDecayer.h
1
// -*- C++ -*-
2
//
3
// GeneralTwoBodyDecayer.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_GeneralTwoBodyDecayer_H
10
#define HERWIG_GeneralTwoBodyDecayer_H
11
//
12
// This is the declaration of the GeneralTwoBodyDecayer class.
13
//
14
15
#include "Herwig/Decay/PerturbativeDecayer.h"
16
#include "Herwig/Decay/PhaseSpaceMode.h"
17
#include "ThePEG/Helicity/Vertex/VertexBase.h"
18
#include "GeneralTwoBodyDecayer.fh"
19
20
namespace
Herwig
{
21
using namespace
ThePEG
;
22
using
Helicity::VertexBasePtr;
23
38
class
GeneralTwoBodyDecayer
:
public
PerturbativeDecayer
{
39
40
public
:
41
43
typedef
pair<tcPDPtr, Energy>
PMPair
;
44
45
public
:
46
50
GeneralTwoBodyDecayer
() :
maxWeight_
(1.),
colour_
(1,
DVector
(1,1.))
51
{}
52
53
62
virtual
ParticleVector
decay
(
const
Particle
& parent,
63
const
tPDVector
& children)
const
;
64
71
virtual
int
modeNumber
(
bool
& cc,
tcPDPtr
parent,
const
tPDVector
& children)
const
;
72
79
virtual
Energy
partialWidth
(
PMPair
inpart,
PMPair
outa,
80
PMPair
outb)
const
;
81
92
virtual
bool
twoBodyMEcode
(
const
DecayMode
& dm,
int
& mecode,
93
double
& coupling)
const
;
94
102
virtual
double
brat
(
const
DecayMode
& dm,
const
Particle
& p,
103
double
oldbrat)
const
;
105
109
virtual
void
setDecayInfo
(
PDPtr
incoming
,
PDPair
outgoing
,
110
vector<VertexBasePtr>,
111
map<ShowerInteraction,VertexBasePtr> &,
112
const
vector<map<ShowerInteraction,VertexBasePtr> > &,
113
map<ShowerInteraction,VertexBasePtr>) =0;
114
115
protected
:
116
123
void
setWeight
(
double
wgt) {
maxWeight_
= wgt; }
124
131
void
colourConnections
(
const
Particle
& parent,
132
const
ParticleVector
& out)
const
;
133
137
double
colourFactor
(
tcPDPtr
in,
tcPDPtr
out1,
tcPDPtr
out2)
const
;
138
142
double
matrixElementRatio
(
const
Particle
& inpart,
const
ParticleVector
& decay2,
143
const
ParticleVector
& decay3,
MEOption
meopt,
144
ShowerInteraction
inter);
145
149
void
decayInfo
(
PDPtr
incoming
,
PDPair
outgoing
);
151
152
public
:
153
160
void
persistentOutput
(
PersistentOStream
& os)
const
;
161
167
void
persistentInput
(
PersistentIStream
& is,
int
version);
169
176
static
void
Init
();
177
178
protected
:
179
187
virtual
void
doinit
();
188
193
virtual
void
doinitrun
();
195
196
protected
:
197
205
typedef
vector<pair<int,double > >
CFlowPairVec
;
206
typedef
vector<CFlowPairVec> CFlow;
207
208
const
vector<DVector> & getColourFactors(
const
Particle
& inpart,
209
const
ParticleVector
&
decay
,
210
unsigned
int
& nflow);
211
212
const
CFlow & colourFlows(
const
Particle
& inpart,
213
const
ParticleVector
&
decay
);
214
218
virtual
double
threeBodyME
(
const
int
,
const
Particle
& inpart,
219
const
ParticleVector
&
decay
,
220
ShowerInteraction
inter,
MEOption
meopt);
221
223
224
private
:
225
230
GeneralTwoBodyDecayer
&
operator=
(
const
GeneralTwoBodyDecayer
&) =
delete
;
231
232
private
:
233
237
PDPtr
incoming_
;
238
242
vector<PDPtr>
outgoing_
;
243
247
double
maxWeight_
;
248
252
vector<DVector>
colour_
;
253
254
};
255
256
260
template
<
typename
T,
typename
Cmp,
typename
A>
261
inline
PersistentOStream
&
operator<<
(
PersistentOStream
& os,
262
const
map<ShowerInteraction,T,Cmp,A> & m) {
263
os << m.size();
264
if
(m.find(ShowerInteraction::QCD)!=m.end()) {
265
os << 0 << m.at(ShowerInteraction::QCD);
266
}
267
if
(m.find(ShowerInteraction::QED)!=m.end()) {
268
os << 1 << m.at(ShowerInteraction::QED);
269
}
270
return
os;
271
}
272
276
template
<
typename
T,
typename
Cmp,
typename
A>
277
inline
PersistentIStream
&
operator>>
(
PersistentIStream
& is, map<ShowerInteraction,T,Cmp,A> & m) {
278
m.clear();
279
long
size;
280
int
k;
281
is >> size;
282
while
( size-- && is ) {
283
is >> k;
284
if
(k==0)
285
is >> m[ShowerInteraction::QCD];
286
else
if
(k==1)
287
is >> m[ShowerInteraction::QED];
288
else
289
assert(
false
);
290
}
291
return
is;
292
}
293
}
294
295
#endif
/* HERWIG_GeneralTwoBodyDecayer_H */
Herwig::DecayIntegrator::MEOption
MEOption
Enum for the matrix element option.
Definition:
DecayIntegrator.h:72
Herwig::GeneralTwoBodyDecayer
The GeneralTwoBodyDecayer class is designed to be the base class for 2 body decays for some general m...
Definition:
GeneralTwoBodyDecayer.h:38
Herwig::GeneralTwoBodyDecayer::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
Herwig::GeneralTwoBodyDecayer::partialWidth
virtual Energy partialWidth(PMPair inpart, PMPair outa, PMPair outb) const
Function to return partial Width.
Herwig::GeneralTwoBodyDecayer::decay
virtual ParticleVector decay(const Particle &parent, const tPDVector &children) const
For a given decay mode and a given particle instance, perform the decay and return the decay products...
Herwig::GeneralTwoBodyDecayer::incoming_
PDPtr incoming_
Store the incoming particle.
Definition:
GeneralTwoBodyDecayer.h:237
Herwig::GeneralTwoBodyDecayer::colourConnections
void colourConnections(const Particle &parent, const ParticleVector &out) const
Set colour connections.
Herwig::GeneralTwoBodyDecayer::doinitrun
virtual void doinitrun()
Initialize this object.
Herwig::GeneralTwoBodyDecayer::CFlowPairVec
vector< pair< int, double > > CFlowPairVec
Member for the generation of additional hard radiation.
Definition:
GeneralTwoBodyDecayer.h:205
Herwig::GeneralTwoBodyDecayer::twoBodyMEcode
virtual bool twoBodyMEcode(const DecayMode &dm, int &mecode, double &coupling) const
Specify the matrix element to be used in the running width calculation.
Herwig::GeneralTwoBodyDecayer::PMPair
pair< tcPDPtr, Energy > PMPair
A ParticleData ptr and (possible) mass pair.
Definition:
GeneralTwoBodyDecayer.h:43
Herwig::GeneralTwoBodyDecayer::doinit
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
Herwig::GeneralTwoBodyDecayer::threeBodyME
virtual double threeBodyME(const int, const Particle &inpart, const ParticleVector &decay, ShowerInteraction inter, MEOption meopt)
Three-body matrix element including additional QCD radiation.
Herwig::GeneralTwoBodyDecayer::brat
virtual double brat(const DecayMode &dm, const Particle &p, double oldbrat) const
An overidden member to calculate a branching ratio for a certain particle instance.
Herwig::GeneralTwoBodyDecayer::setWeight
void setWeight(double wgt)
Set integration weight.
Definition:
GeneralTwoBodyDecayer.h:123
Herwig::GeneralTwoBodyDecayer::colour_
vector< DVector > colour_
Store colour factors for ME calc.
Definition:
GeneralTwoBodyDecayer.h:252
Herwig::GeneralTwoBodyDecayer::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Herwig::GeneralTwoBodyDecayer::setDecayInfo
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing, vector< VertexBasePtr >, map< ShowerInteraction, VertexBasePtr > &, const vector< map< ShowerInteraction, VertexBasePtr > > &, map< ShowerInteraction, VertexBasePtr >)=0
Set the information on the decay.
Herwig::GeneralTwoBodyDecayer::colourFactor
double colourFactor(tcPDPtr in, tcPDPtr out1, tcPDPtr out2) const
Compute the spin and colour factor.
Herwig::GeneralTwoBodyDecayer::operator=
GeneralTwoBodyDecayer & operator=(const GeneralTwoBodyDecayer &)=delete
The assignment operator is private and must never be called.
Herwig::GeneralTwoBodyDecayer::maxWeight_
double maxWeight_
Maximum weight for integration.
Definition:
GeneralTwoBodyDecayer.h:247
Herwig::GeneralTwoBodyDecayer::Init
static void Init()
The standard Init function used to initialize the interfaces.
Herwig::GeneralTwoBodyDecayer::decayInfo
void decayInfo(PDPtr incoming, PDPair outgoing)
Set the information on the decay.
Herwig::GeneralTwoBodyDecayer::outgoing_
vector< PDPtr > outgoing_
Outgoing particles.
Definition:
GeneralTwoBodyDecayer.h:242
Herwig::GeneralTwoBodyDecayer::modeNumber
virtual int modeNumber(bool &cc, tcPDPtr parent, const tPDVector &children) const
Which of the possible decays is required.
Herwig::GeneralTwoBodyDecayer::GeneralTwoBodyDecayer
GeneralTwoBodyDecayer()
The default constructor.
Definition:
GeneralTwoBodyDecayer.h:50
Herwig::GeneralTwoBodyDecayer::matrixElementRatio
double matrixElementRatio(const Particle &inpart, const ParticleVector &decay2, const ParticleVector &decay3, MEOption meopt, ShowerInteraction inter)
Calculate matrix element ratio R/B.
Herwig::PerturbativeDecayer
The PerturbativeDecayer class is the base class for perturbative decays in Herwig and implements the ...
Definition:
PerturbativeDecayer.h:23
ThePEG::DecayMode
ThePEG::Particle
ThePEG::PersistentIStream
ThePEG::PersistentOStream
Herwig::ShowerInteraction
ShowerInteraction
Handy header file to be included in all Shower classes.
Definition:
ShowerInteraction.h:23
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
ThePEG::Helicity::outgoing
outgoing
ThePEG::Helicity::incoming
incoming
ThePEG
ThePEG::operator>>
PersistentIStream & operator>>(PersistentIStream &is, HandlerGroup< HDLR > &hg)
ThePEG::tPDVector
vector< tPDPtr > tPDVector
ThePEG::ParticleVector
vector< PPtr > ParticleVector
ThePEG::DVector
vector< double > DVector
ThePEG::tcPDPtr
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
ThePEG::PDPtr
ThePEG::Ptr< ParticleData >::pointer PDPtr
ThePEG::operator<<
ostream & operator<<(ostream &, const Collision &)
ThePEG::PDPair
pair< PDPtr, PDPtr > PDPair
Generated on Thu Jun 20 2024 17:50:52 for Herwig by
1.9.6