herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.2.1
Shower
QTilde
Base
ShowerTree.h
1
// -*- C++ -*-
2
//
3
// ShowerTree.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_ShowerTree_H
10
#define HERWIG_ShowerTree_H
11
12
#include "
ThePEG/Config/ThePEG.h
"
13
#include "Herwig/Shower/ShowerHandler.fh"
14
#include "Herwig/Shower/PerturbativeProcess.h"
15
#include "Herwig/Shower/RealEmissionProcess.h"
16
#include "Herwig/Shower/ShowerEventRecord.h"
17
#include "Herwig/Shower/QTilde/ShowerConfig.h"
18
#include "Herwig/Shower/QTilde/Base/ShowerParticle.h"
19
#include "Herwig/Shower/QTilde/Base/ShowerProgenitor.h"
20
#include "ThePEG/EventRecord/Step.h"
21
#include <cassert>
22
#include "ShowerTree.fh"
23
24
namespace
Herwig
{
25
29
typedef
multimap<Energy,ShowerTreePtr,std::greater<Energy> >
ShowerDecayMap
;
30
31
using namespace
ThePEG
;
32
40
class
ShowerTree
:
public
ShowerEventRecord
{
41
42
friend
class
QTildeShowerHandler
;
43
44
public
:
45
50
ShowerTree
(PerturbativeProcessPtr process);
51
56
static
Lorentz5Distance spaceTimeDistance(
tPPtr
particle);
57
65
static
void
constructTrees(ShowerTreePtr & hardTree,
66
ShowerDecayMap & decayTrees,
67
PerturbativeProcessPtr hard,
68
DecayProcessMap
decay);
69
70
public
:
71
78
void
fillEventRecord
(
StepPtr
pstep,
bool
ISR,
bool
FSR) {
79
if
(_wasHard)
80
insertHard (pstep,ISR,FSR);
81
else
82
insertDecay(pstep,ISR,FSR);
83
}
84
85
90
void
setParents();
91
99
bool
isHard
()
const
{
return
_wasHard; }
100
101
105
bool
isDecay
()
const
{
return
!_wasHard; }
107
111
map<ShowerProgenitorPtr,ShowerParticlePtr> &
incomingLines
() {
112
return
_incomingLines;
113
}
114
118
map<ShowerProgenitorPtr,tShowerParticlePtr> &
outgoingLines
() {
119
return
_outgoingLines;
120
}
121
125
void
updateFinalStateShowerProduct(ShowerProgenitorPtr progenitor,
126
ShowerParticlePtr parent,
127
const
ShowerParticleVector
& children);
128
132
void
updateInitialStateShowerProduct(ShowerProgenitorPtr progenitor,
133
ShowerParticlePtr newParent);
134
138
tShowerParticlePtr
getFinalStateShowerProduct
(ShowerProgenitorPtr progenitor) {
139
return
_outgoingLines.find(progenitor)==_outgoingLines.end()
140
? tShowerParticlePtr() : _outgoingLines[progenitor];
141
}
142
149
void
addFinalStateBranching(ShowerParticlePtr parent,
150
const
ShowerParticleVector
& children);
151
160
void
addInitialStateBranching(ShowerParticlePtr oldParent,
161
ShowerParticlePtr newParent,
162
ShowerParticlePtr otherChild);
163
164
// /**
165
// * Member called at the end of the shower of a tree to perform a number of
166
// * updates.
167
// * @param decay The map of widths and ShowerTrees for the decays so that
168
// * any unstable decay products can be added.
169
// */
170
void
updateAfterShower(ShowerDecayMap & decay);
171
179
bool
hasShowered
()
const
{
return
_hasShowered; }
180
184
void
hasShowered
(
bool
in) { _hasShowered=in; }
186
190
ShowerTreePtr
parent
()
const
{
return
_parent; }
191
196
void
clear();
197
202
void
resetShowerProducts();
203
207
void
setVetoes(
const
map<ShowerInteraction,Energy> & pTs,
208
unsigned
int
type);
209
213
vector<ShowerProgenitorPtr> extractProgenitors();
214
218
const
set<tShowerParticlePtr> &
forwardParticles
()
const
{
return
_forward; }
219
224
const
map<tShowerTreePtr,pair<tShowerProgenitorPtr,tShowerParticlePtr> > &
225
treelinks
()
const
{
return
_treelinks;}
226
230
void
updateLink
(tShowerTreePtr tree,
231
pair<tShowerProgenitorPtr,tShowerParticlePtr> in) {
232
_treelinks[tree] = in;
233
}
234
238
void
transform(
const
LorentzRotation
& rot,
bool
applyNow);
239
243
void
applyTransforms();
244
248
void
clearTransforms();
249
253
const
LorentzRotation
&
transform
() {
return
_transforms;}
254
258
vector<ShowerParticlePtr> extractProgenitorParticles();
259
263
void
checkMomenta();
264
268
void
update(PerturbativeProcessPtr newProcess);
269
273
RealEmissionProcessPtr perturbativeProcess();
274
275
protected
:
276
287
void
insertHard(
StepPtr
pstep,
bool
ISR,
bool
FSR);
288
295
void
insertDecay(
StepPtr
pstep,
bool
ISR,
bool
FSR);
296
302
void
addFinalStateShower(
PPtr
particle,
StepPtr
step);
303
311
void
addInitialStateShower(
PPtr
particle,
PPtr
hadron,
312
StepPtr
step,
bool
addchildren=
true
);
314
320
void
fixColour(tShowerParticlePtr part);
321
322
private
:
326
PPair
_incoming
;
327
333
map<ShowerProgenitorPtr,ShowerParticlePtr>
_incomingLines
;
334
340
map<ShowerProgenitorPtr,tShowerParticlePtr>
_outgoingLines
;
341
345
set<tShowerParticlePtr>
_forward
;
346
350
bool
_wasHard
;
351
356
map<tShowerTreePtr,pair<tShowerProgenitorPtr,tShowerParticlePtr> >
_treelinks
;
357
361
tShowerTreePtr
_parent
;
362
366
bool
_hasShowered
;
367
371
LorentzRotation
_transforms
;
372
373
private
:
374
378
static
bool
_spaceTime
;
379
383
static
Energy2
_vmin2
;
384
385
};
386
}
387
388
#endif
ThePEG::PPtr
ThePEG::Ptr< Particle >::pointer PPtr
Herwig::ShowerDecayMap
multimap< Energy, ShowerTreePtr, std::greater< Energy > > ShowerDecayMap
Typedef for map of ShowerTrees for decays.
Definition:
ShowerTree.h:29
Herwig::ShowerTree::isDecay
bool isDecay() const
Whether or not this is a decay.
Definition:
ShowerTree.h:105
Herwig::ShowerParticleVector
vector< ShowerParticlePtr > ShowerParticleVector
A Vector of ShowerParticle pointers.
Definition:
ShowerConfig.h:54
Herwig::ShowerTree::isHard
bool isHard() const
Access methods for the type of interaction.
Definition:
ShowerTree.h:99
Herwig::ShowerTree::transform
const LorentzRotation & transform()
Transform which needs to be applied.
Definition:
ShowerTree.h:253
Herwig::ShowerTree::parent
ShowerTreePtr parent() const
Access the parent tree.
Definition:
ShowerTree.h:190
Herwig::ShowerTree
The ShowerTree class stores the basic information needed for each hard interaction, either a scattering process or decay, which needs to be showered.
Definition:
ShowerTree.h:40
Herwig::ShowerTree::forwardParticles
const set< tShowerParticlePtr > & forwardParticles() const
Access to the outgoing particles.
Definition:
ShowerTree.h:218
Herwig::QTildeShowerHandler
The QTildeShowerHandler class.
Definition:
QTildeShowerHandler.h:36
Herwig::ShowerTree::_vmin2
static Energy2 _vmin2
Minimum virtuality for the space-time model.
Definition:
ShowerTree.h:383
ThePEG::LorentzRotation
Herwig::ShowerTree::_incoming
PPair _incoming
Incoming partons for the hard process.
Definition:
ShowerTree.h:326
ThePEG
ThePEG.h
Herwig::ShowerTree::hasShowered
void hasShowered(bool in)
Set the flag.
Definition:
ShowerTree.h:184
Herwig::ShowerTree::_incomingLines
map< ShowerProgenitorPtr, ShowerParticlePtr > _incomingLines
The incoming ShowerParticles connected to the interaction as the index of a map with the particle the...
Definition:
ShowerTree.h:333
Herwig::ShowerTree::updateLink
void updateLink(tShowerTreePtr tree, pair< tShowerProgenitorPtr, tShowerParticlePtr > in)
Update the link between shower particle and tree.
Definition:
ShowerTree.h:230
Herwig::ShowerTree::hasShowered
bool hasShowered() const
Access and set the flag for whether this tree has been showered.
Definition:
ShowerTree.h:179
Herwig::ShowerTree::getFinalStateShowerProduct
tShowerParticlePtr getFinalStateShowerProduct(ShowerProgenitorPtr progenitor)
Get the current final shower product for a final-state particle.
Definition:
ShowerTree.h:138
Herwig::ShowerTree::_spaceTime
static bool _spaceTime
Whether or not to include space-time distances.
Definition:
ShowerTree.h:378
Herwig::ShowerTree::_parent
tShowerTreePtr _parent
The parent tree.
Definition:
ShowerTree.h:361
Herwig::ShowerTree::_forward
set< tShowerParticlePtr > _forward
The outgoing ShowerParticles at the end of the final-state shower.
Definition:
ShowerTree.h:345
ThePEG::PPair
pair< PPtr, PPtr > PPair
ThePEG::tPPtr
ThePEG::Ptr< Particle >::transient_pointer tPPtr
Herwig::ShowerTree::incomingLines
map< ShowerProgenitorPtr, ShowerParticlePtr > & incomingLines()
Get the incoming shower particles.
Definition:
ShowerTree.h:111
Herwig::ShowerEventRecord
Here is the documentation of the ShowerEventRecord class.
Definition:
ShowerEventRecord.h:20
Herwig::ShowerTree::_transforms
LorentzRotation _transforms
The transforms which still need to be applied.
Definition:
ShowerTree.h:371
Herwig::ShowerTree::fillEventRecord
void fillEventRecord(StepPtr pstep, bool ISR, bool FSR)
Insert the tree into the event record.
Definition:
ShowerTree.h:78
Herwig::ShowerTree::treelinks
const map< tShowerTreePtr, pair< tShowerProgenitorPtr, tShowerParticlePtr > > & treelinks() const
Map of particles in this Tree which are the initial particles in other trees.
Definition:
ShowerTree.h:225
Herwig::ShowerTree::_outgoingLines
map< ShowerProgenitorPtr, tShowerParticlePtr > _outgoingLines
The outgoing ShowerParticles connected to the interaction as the index of a map with the particle the...
Definition:
ShowerTree.h:340
Herwig::ShowerTree::_hasShowered
bool _hasShowered
Has this tree showered.
Definition:
ShowerTree.h:366
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
Herwig::DecayProcessMap
multimap< Energy, PerturbativeProcessPtr, std::greater< Energy > > DecayProcessMap
Typedef for map of PerturbativeProcess for decays.
Definition:
PerturbativeProcess.h:69
Herwig::ShowerTree::outgoingLines
map< ShowerProgenitorPtr, tShowerParticlePtr > & outgoingLines()
Get the outgoing shower particles.
Definition:
ShowerTree.h:118
Herwig::ShowerTree::_treelinks
map< tShowerTreePtr, pair< tShowerProgenitorPtr, tShowerParticlePtr > > _treelinks
Map of particles in this Tree which are the initial particles in other trees.
Definition:
ShowerTree.h:356
ThePEG::StepPtr
ThePEG::Ptr< Step >::pointer StepPtr
Herwig::ShowerTree::_wasHard
bool _wasHard
Was this a scattering process or a decay.
Definition:
ShowerTree.h:350
Generated on Sat Apr 11 2020 14:50:31 for Herwig by
1.8.13