herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
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.h
Herwig::QTildeShowerHandler
The QTildeShowerHandler class.
Definition:
QTildeShowerHandler.h:36
Herwig::ShowerEventRecord
Here is the documentation of the ShowerEventRecord class.
Definition:
ShowerEventRecord.h:20
Herwig::ShowerTree
The ShowerTree class stores the basic information needed for each hard interaction,...
Definition:
ShowerTree.h:40
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::_spaceTime
static bool _spaceTime
Whether or not to include space-time distances.
Definition:
ShowerTree.h:378
Herwig::ShowerTree::constructTrees
static void constructTrees(ShowerTreePtr &hardTree, ShowerDecayMap &decayTrees, PerturbativeProcessPtr hard, DecayProcessMap decay)
Construct the trees from the hard process.
Herwig::ShowerTree::_parent
tShowerTreePtr _parent
The parent tree.
Definition:
ShowerTree.h:361
Herwig::ShowerTree::hasShowered
void hasShowered(bool in)
Set the flag.
Definition:
ShowerTree.h:184
Herwig::ShowerTree::fixColour
void fixColour(tShowerParticlePtr part)
After the creatation of a ShowerParticle make sure it is properly attached to its ColourLine.
Herwig::ShowerTree::_incoming
PPair _incoming
Incoming partons for the hard process.
Definition:
ShowerTree.h:326
Herwig::ShowerTree::hasShowered
bool hasShowered() const
Access and set the flag for whether this tree has been showered.
Definition:
ShowerTree.h:179
Herwig::ShowerTree::clearTransforms
void clearTransforms()
Clear any postphoned transformations.
Herwig::ShowerTree::extractProgenitorParticles
vector< ShowerParticlePtr > extractProgenitorParticles()
Get all the progenitors.
Herwig::ShowerTree::isHard
bool isHard() const
Access methods for the type of interaction.
Definition:
ShowerTree.h:99
Herwig::ShowerTree::outgoingLines
map< ShowerProgenitorPtr, tShowerParticlePtr > & outgoingLines()
Get the outgoing shower particles.
Definition:
ShowerTree.h:118
Herwig::ShowerTree::_wasHard
bool _wasHard
Was this a scattering process or a decay.
Definition:
ShowerTree.h:350
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
Herwig::ShowerTree::update
void update(PerturbativeProcessPtr newProcess)
Update tree after the parent has been decayed.
Herwig::ShowerTree::isDecay
bool isDecay() const
Whether or not this is a decay.
Definition:
ShowerTree.h:105
Herwig::ShowerTree::getFinalStateShowerProduct
tShowerParticlePtr getFinalStateShowerProduct(ShowerProgenitorPtr progenitor)
Get the current final shower product for a final-state particle.
Definition:
ShowerTree.h:138
Herwig::ShowerTree::insertHard
void insertHard(StepPtr pstep, bool ISR, bool FSR)
Functions to add the shower to the event record.
Herwig::ShowerTree::spaceTimeDistance
static Lorentz5Distance spaceTimeDistance(tPPtr particle)
Calculate the space-time displacement.
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::parent
ShowerTreePtr parent() const
Access the parent tree.
Definition:
ShowerTree.h:190
Herwig::ShowerTree::checkMomenta
void checkMomenta()
Check the momentum conservation in the tree.
Herwig::ShowerTree::perturbativeProcess
RealEmissionProcessPtr perturbativeProcess()
The perturbative process.
Herwig::ShowerTree::_forward
set< tShowerParticlePtr > _forward
The outgoing ShowerParticles at the end of the final-state shower.
Definition:
ShowerTree.h:345
Herwig::ShowerTree::resetShowerProducts
void resetShowerProducts()
Reset the particles resulting from the shower to those which started the shower.
Herwig::ShowerTree::transform
void transform(const LorentzRotation &rot, bool applyNow)
Transform the tree.
Herwig::ShowerTree::setVetoes
void setVetoes(const map< ShowerInteraction, Energy > &pTs, unsigned int type)
Set maximum Emission scales.
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::incomingLines
map< ShowerProgenitorPtr, ShowerParticlePtr > & incomingLines()
Get the incoming shower particles.
Definition:
ShowerTree.h:111
Herwig::ShowerTree::_hasShowered
bool _hasShowered
Has this tree showered.
Definition:
ShowerTree.h:366
Herwig::ShowerTree::addFinalStateShower
void addFinalStateShower(PPtr particle, StepPtr step)
Recursively add the final-state shower from the particle to the event record.
Herwig::ShowerTree::extractProgenitors
vector< ShowerProgenitorPtr > extractProgenitors()
Extract the progenitors for the reconstruction.
Herwig::ShowerTree::addInitialStateShower
void addInitialStateShower(PPtr particle, PPtr hadron, StepPtr step, bool addchildren=true)
Add the initial-state shwoer from the particle to the step.
Herwig::ShowerTree::_transforms
LorentzRotation _transforms
The transforms which still need to be applied.
Definition:
ShowerTree.h:371
Herwig::ShowerTree::forwardParticles
const set< tShowerParticlePtr > & forwardParticles() const
Access to the outgoing particles.
Definition:
ShowerTree.h:218
Herwig::ShowerTree::updateFinalStateShowerProduct
void updateFinalStateShowerProduct(ShowerProgenitorPtr progenitor, ShowerParticlePtr parent, const ShowerParticleVector &children)
Update the shower product for a final-state particle.
Herwig::ShowerTree::addInitialStateBranching
void addInitialStateBranching(ShowerParticlePtr oldParent, ShowerParticlePtr newParent, ShowerParticlePtr otherChild)
Add an initial-state branching.
Herwig::ShowerTree::clear
void clear()
Clear all the shower products so that the event can be reshowered if the first attempt fail.
Herwig::ShowerTree::fillEventRecord
void fillEventRecord(StepPtr pstep, bool ISR, bool FSR)
Insert the tree into the event record.
Definition:
ShowerTree.h:78
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::updateInitialStateShowerProduct
void updateInitialStateShowerProduct(ShowerProgenitorPtr progenitor, ShowerParticlePtr newParent)
Update the shower product for an initial-state particle.
Herwig::ShowerTree::applyTransforms
void applyTransforms()
Apply any postphoned transformations.
Herwig::ShowerTree::addFinalStateBranching
void addFinalStateBranching(ShowerParticlePtr parent, const ShowerParticleVector &children)
Add a final-state branching.
Herwig::ShowerTree::ShowerTree
ShowerTree(PerturbativeProcessPtr process)
Constructor from a perturbative process.
Herwig::ShowerTree::_vmin2
static Energy2 _vmin2
Minimum virtuality for the space-time model.
Definition:
ShowerTree.h:383
Herwig::ShowerTree::transform
const LorentzRotation & transform()
Transform which needs to be applied.
Definition:
ShowerTree.h:253
Herwig::ShowerTree::insertDecay
void insertDecay(StepPtr pstep, bool ISR, bool FSR)
Insert a decay process.
Herwig::ShowerTree::setParents
void setParents()
Set the parent tree to this tree for trees which come from this one.
ThePEG::LorentzRotation
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
Herwig::ShowerParticleVector
vector< ShowerParticlePtr > ShowerParticleVector
A Vector of ShowerParticle pointers.
Definition:
ShowerConfig.h:54
Herwig::DecayProcessMap
multimap< Energy, PerturbativeProcessPtr, std::greater< Energy > > DecayProcessMap
Typedef for map of PerturbativeProcess for decays.
Definition:
PerturbativeProcess.h:69
Herwig::ShowerDecayMap
multimap< Energy, ShowerTreePtr, std::greater< Energy > > ShowerDecayMap
Typedef for map of ShowerTrees for decays.
Definition:
ShowerTree.h:29
ThePEG
ThePEG::tPPtr
ThePEG::Ptr< Particle >::transient_pointer tPPtr
ThePEG::PPair
pair< PPtr, PPtr > PPair
ThePEG::StepPtr
ThePEG::Ptr< Step >::pointer StepPtr
ThePEG::PPtr
ThePEG::Ptr< Particle >::pointer PPtr
Generated on Thu Jun 20 2024 17:50:53 for Herwig by
1.9.6