herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.2.1
Decay
DecayPhaseSpaceChannel.h
1
// -*- C++ -*-
2
//
3
// DecayPhaseSpaceChannel.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_DecayPhaseSpaceChannel_H
10
#define HERWIG_DecayPhaseSpaceChannel_H
11
//
12
// This is the declaration of the DecayPhaseSpaceChannel class.
13
//
14
#include <ThePEG/Interface/Interfaced.h>
15
#include <ThePEG/PDT/ParticleData.h>
16
#include <ThePEG/EventRecord/Particle.h>
17
#include "DecayPhaseSpaceChannel.fh"
18
#include "DecayIntegrator.h"
19
#include "Herwig/Utilities/Kinematics.h"
20
#include "ThePEG/Repository/UseRandom.h"
21
#include "DecayPhaseSpaceMode.fh"
22
23
namespace
Herwig
{
24
using namespace
ThePEG
;
25
52
class
DecayPhaseSpaceChannel
:
public
Base
{
53
58
friend
ostream &
operator<<
(ostream &,
const
DecayPhaseSpaceChannel
&);
59
64
friend
class
DecayPhaseSpaceMode
;
65
66
public
:
67
73
DecayPhaseSpaceChannel
() {}
74
79
DecayPhaseSpaceChannel
(tcDecayPhaseSpaceModePtr);
81
82
public
:
83
102
void
addIntermediate
(
PDPtr
part,
int
jac,
double
power
,
int
dau1,
int
dau2) {
103
_intpart.push_back(part);
104
_jactype.push_back(jac);
105
_intpower.push_back(power);
106
_intdau1.push_back(dau1);
107
_intdau2.push_back(dau2);
108
}
109
119
void
resetIntermediate
(
tcPDPtr
part,Energy mass,Energy width) {
120
if
(!part)
return
;
121
int
idin=part->id();
122
for
(
unsigned
int
ix=0;ix<_intpart.size();++ix) {
123
if
(_intpart[ix] && _intpart[ix]->
id
()==idin) {
124
_intmass[ix] =mass;_intwidth[ix]=width;
125
_intmass2[ix]=mass*mass;_intmwidth[ix]=mass*width;
126
}
127
}
128
}
129
130
/*
131
* Reset the one of the daughters
132
* @param oldp The id of the particle being reset
133
* @param newp The id of the particle replacing it
134
*/
135
void
resetDaughter(
int
oldp,
int
newp) {
136
for
(
unsigned
int
ix=0;ix<_intdau1.size();++ix) {
137
if
(_intdau1[ix]==oldp) _intdau1[ix]=newp;
138
}
139
for
(
unsigned
int
ix=0;ix<_intdau2.size();++ix) {
140
if
(_intdau2[ix]==oldp) _intdau2[ix]=newp;
141
}
142
}
143
147
bool
checkKinematics();
149
150
protected
:
151
162
vector<Lorentz5Momentum> generateMomenta(
const
Lorentz5Momentum & pin,
163
const
vector<Energy> & massext);
164
172
double
generateWeight(
const
vector<Lorentz5Momentum> & output);
173
185
void
generateIntermediates(
bool
cc,
const
Particle
& in,
ParticleVector
& out);
186
196
void
twoBodyDecay(
const
Lorentz5Momentum & p,
197
const
Energy m1,
const
Energy m2,
198
Lorentz5Momentum & p1, Lorentz5Momentum & p2);
200
201
public
:
202
209
void
persistentOutput(
PersistentOStream
& os)
const
;
210
216
void
persistentInput(
PersistentIStream
& is,
int
version);
218
222
static
void
Init();
223
224
public
:
225
233
virtual
void
init();
234
239
virtual
void
initrun();
241
242
private
:
243
247
DecayPhaseSpaceChannel
& operator=(
const
DecayPhaseSpaceChannel
&) =
delete
;
248
249
private
:
250
259
Energy generateMass(
int
ires,Energy lower,Energy upper);
260
268
InvEnergy2 massWeight(
int
ires, Energy moff,Energy lower,Energy upper);
270
271
private
:
272
276
tcDecayPhaseSpaceModePtr
_mode
;
277
281
vector <PDPtr>
_intpart
;
282
286
vector <int>
_jactype
;
287
291
vector<Energy>
_intmass
;
292
296
vector<Energy>
_intwidth
;
297
301
vector<Energy2>
_intmass2
;
302
306
vector<Energy2>
_intmwidth
;
307
311
vector<double>
_intpower
;
312
316
vector<int>
_intdau1
;
317
321
vector<int>
_intdau2
;
322
326
vector< vector<int> >
_intext
;
327
333
double
atanhelper_(
int
ires, Energy limit);
334
};
335
336
340
ostream &
operator<<
(ostream &,
const
DecayPhaseSpaceChannel
&);
341
345
class
DecayPhaseSpaceError
:
public
Exception
{};
346
}
347
348
349
#endif
/* HERWIG_DecayPhaseSpaceChannel_H */
ThePEG::PersistentIStream
ThePEG::Particle
Herwig::DecayPhaseSpaceChannel::_mode
tcDecayPhaseSpaceModePtr _mode
pointer to the mode
Definition:
DecayPhaseSpaceChannel.h:276
ThePEG::Base
Herwig::DecayPhaseSpaceChannel::_intext
vector< vector< int > > _intext
The external particles that an intermediate particle final decays to.
Definition:
DecayPhaseSpaceChannel.h:326
Herwig::DecayPhaseSpaceMode
The DecayPhaseSpaceMode class is designed to store a group of phase-space channels for use by the Dec...
Definition:
DecayPhaseSpaceMode.h:43
Herwig::DecayPhaseSpaceChannel::_intpower
vector< double > _intpower
The power for the intermediate resonance.
Definition:
DecayPhaseSpaceChannel.h:311
Herwig::DecayPhaseSpaceChannel::_jactype
vector< int > _jactype
The type of jacobian to be used for the intermediates.
Definition:
DecayPhaseSpaceChannel.h:286
Herwig::DecayPhaseSpaceChannel::resetIntermediate
void resetIntermediate(tcPDPtr part, Energy mass, Energy width)
Reset the properties of an intermediate particle.
Definition:
DecayPhaseSpaceChannel.h:119
ThePEG::PersistentOStream
Herwig::DecayPhaseSpaceChannel::_intmwidth
vector< Energy2 > _intmwidth
The mass times the width for the intermediate particles.
Definition:
DecayPhaseSpaceChannel.h:306
Herwig::DecayPhaseSpaceError
exception for this class and those inheriting from it
Definition:
DecayPhaseSpaceChannel.h:345
ThePEG
Herwig::operator<<
ostream & operator<<(ostream &, const DecayIntegrator &)
Output information on the DecayIntegrator for debugging purposes.
Herwig::DecayPhaseSpaceChannel::_intdau1
vector< int > _intdau1
The first daughter of the intermediate resonance.
Definition:
DecayPhaseSpaceChannel.h:316
Herwig::DecayPhaseSpaceChannel::addIntermediate
void addIntermediate(PDPtr part, int jac, double power, int dau1, int dau2)
Add a new intermediate particle.
Definition:
DecayPhaseSpaceChannel.h:102
ThePEG::tcPDPtr
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
ThePEG::PDPtr
ThePEG::Ptr< ParticleData >::pointer PDPtr
ThePEG::Exception
Herwig::DecayPhaseSpaceChannel::DecayPhaseSpaceChannel
DecayPhaseSpaceChannel()
Default constructor.
Definition:
DecayPhaseSpaceChannel.h:73
Herwig::DecayPhaseSpaceChannel
This class is designed to store the information needed for a given phase-space channel for use by the...
Definition:
DecayPhaseSpaceChannel.h:52
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
Herwig::DecayPhaseSpaceChannel::_intmass2
vector< Energy2 > _intmass2
The mass squared of the intermediate particles.
Definition:
DecayPhaseSpaceChannel.h:301
Herwig::DecayPhaseSpaceChannel::_intmass
vector< Energy > _intmass
The mass of the intermediates.
Definition:
DecayPhaseSpaceChannel.h:291
Herwig::DecayPhaseSpaceChannel::_intwidth
vector< Energy > _intwidth
The width of the intermediates.
Definition:
DecayPhaseSpaceChannel.h:296
ThePEG::ParticleVector
vector< PPtr > ParticleVector
Herwig::RandomHelpers::power
Generator< Power > power(double z, double p, double lower, double upper)
Construct the density |(x-z)|^p.
Definition:
RandomHelpers.h:1213
Herwig::DecayPhaseSpaceChannel::_intpart
vector< PDPtr > _intpart
Pointers to the particle data objects of the intermediate particles.
Definition:
DecayPhaseSpaceChannel.h:281
Herwig::DecayPhaseSpaceChannel::_intdau2
vector< int > _intdau2
The second daughter of the intermediate resonance.
Definition:
DecayPhaseSpaceChannel.h:321
Generated on Sat Apr 11 2020 14:50:29 for Herwig by
1.8.13