herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
Shower
Dipole
Merging
Node.h
1
// -*- C++ -*-
2
#ifndef Herwig_Node_H
3
#define Herwig_Node_H
4
//
5
// This is the declaration of the Node class.
6
//
7
#include "Node.fh"
8
#include "MergingFactory.fh"
9
#include "Merger.h"
10
11
12
13
#include "
ThePEG/Config/ThePEG.h
"
14
#include "
ThePEG/Config/std.h
"
15
#include "ThePEG/Interface/Interfaced.h"
16
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.fh"
17
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.fh"
18
#include "Herwig/Shower/Dipole/Base/DipoleEventRecord.h"
19
#include "ThePEG/MatrixElement/MEBase.h"
20
21
#include <vector>
22
23
24
25
namespace
Herwig
{
26
27
28
using namespace
ThePEG
;
29
45
class
Node
:
public
Interfaced
{
46
public
:
47
50
51
Node
(){};
52
53
// constructor for first nodes
54
Node
(MatchboxMEBasePtr nodeME ,
int
cutstage , MergerPtr mh );
55
// another constructor for underlying nodes
56
Node
(NodePtr deephead,
57
NodePtr head,
58
SubtractionDipolePtr dipol,
59
MatchboxMEBasePtr nodeME,
60
int
cutstage);
62
63
public
:
64
// get children from vector<MatchboxMEBasePtr>
65
void
birth(
const
vector<MatchboxMEBasePtr> & vec);
68
void
setXComb
(tStdXCombPtr xc);
70
pair<CrossSection, CrossSection>
calcDipandPS
(Energy scale)
const
;
72
CrossSection
calcPs
(Energy scale)
const
;
74
CrossSection
calcDip
(Energy scale)
const
;
76
void
flushCaches
();
78
void
clearKinematics
();
80
void
setKinematics
();
82
bool
generateKinematics
(
const
double
*r,
bool
directCut);
84
bool
firstgenerateKinematics
(
const
double
*r,
bool
directCut);
85
//return the ME
86
const
MatchboxMEBasePtr nodeME()
const
;
87
//return the node ME
88
MatchboxMEBasePtr nodeME();
89
//return the parent Node
90
NodePtr parent()
const
{
return
theparent
;}
92
vector< NodePtr >
children
()
const
{
return
thechildren
;}
93
//pick a random child (flat)
94
NodePtr randomChild();
96
bool
allAbove
(Energy pt);
98
Energy
maxChildPt
();
100
bool
isInHistoryOf
(NodePtr other);
102
int
legsize
()
const
;
104
void
deepHead
(NodePtr deephead) {
theDeepHead
= deephead;}
106
NodePtr
deepHead
()
const
{
return
theDeepHead
;}
108
SubtractionDipolePtr
dipole
()
const
;
110
StdXCombPtr
xcomb
()
const
;
112
StdXCombPtr
xcomb
() ;
114
Energy
runningPt
()
const
{
return
theRunningPt
; }
116
void
runningPt
(Energy x) {
theRunningPt
=x; }
118
int
cutStage
()
const
{
return
theCutStage
; }
120
vector<NodePtr>
getNextOrderedNodes
(
bool
normal=
true
,
double
hardscalefactor=1.)
const
;
121
//true if the node is in shower history for a given pt
122
bool
inShowerPS(Energy hardpt)
const
;
123
//get the history
124
NodePtr getHistory(
bool
normal=
true
,
double
hardscalefactor=1.);
125
//true if node correspond to a subtracted real.
126
bool
subtractedReal()
const
{
return
theSubtractedReal
;}
128
void
subtractedReal
(
bool
x) {
theSubtractedReal
= x;}
129
//true if node correspond to a virtual contribution.
130
bool
virtualContribution()
const
{
return
theVirtualContribution
;}
132
void
virtualContribution
(
bool
x) {
theVirtualContribution
= x;}
133
//pointer to the merging helper
134
MergerPtr MH()
const
{
return
theMergingHelper
;}
136
void
MH
(MergerPtr a){
theMergingHelper
=a;}
138
Energy
pT
()
const
{
return
dipole
()->lastPt();}
140
pair<PVector , PVector>
getInOut
();
141
142
private
:
144
MatchboxMEBasePtr
thenodeMEPtr
;
147
SubtractionDipolePtr
thedipol
;
149
NodePtr
theparent
;
151
NodePtr
theDeepHead
;
158
int
theCutStage
;
160
bool
theSubtractedReal
;
162
bool
theVirtualContribution
;
164
MergerPtr
theMergingHelper
;
165
//the xcomb of the node
166
StdXCombPtr thexcomb;
168
vector< NodePtr >
thechildren
;
170
Energy
theRunningPt
;
172
NodePtr
theProjector
;
174
bool
didflush
=
false
;
175
176
public
:
183
void
persistentOutput
(
PersistentOStream
& os)
const
;
184
190
void
persistentInput
(
PersistentIStream
& is,
int
version);
192
199
static
void
Init
();
200
201
202
protected
:
209
virtual
IBPtr
clone
()
const
;
210
215
virtual
IBPtr
fullclone
()
const
;
217
218
219
// If needed, insert declarations of virtual function defined in the
220
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
221
222
223
224
private
:
229
Node
&
operator=
(
const
Node
&) =
delete
;
230
231
};
232
233
}
234
235
#endif
/* Herwig_Node_H */
236
237
238
239
240
ThePEG.h
Herwig::Node
The Node class represents a part of the shower history in the merging procedure.
Definition:
Node.h:45
Herwig::Node::runningPt
void runningPt(Energy x)
set the current running pt
Definition:
Node.h:116
Herwig::Node::clone
virtual IBPtr clone() const
Make a simple clone of this object.
Herwig::Node::Init
static void Init()
The standard Init function used to initialize the interfaces.
Herwig::Node::theparent
NodePtr theparent
the parent node
Definition:
Node.h:149
Herwig::Node::legsize
int legsize() const
legsize of the node ME
Herwig::Node::isInHistoryOf
bool isInHistoryOf(NodePtr other)
true if the node is in the history of other.
Herwig::Node::theMergingHelper
MergerPtr theMergingHelper
the merging helper (should be static)
Definition:
Node.h:164
Herwig::Node::calcDip
CrossSection calcDip(Energy scale) const
calculate the dipole
Herwig::Node::dipole
SubtractionDipolePtr dipole() const
returns the dipol of the node.
Herwig::Node::calcPs
CrossSection calcPs(Energy scale) const
calculate the ps approximation
Herwig::Node::firstgenerateKinematics
bool firstgenerateKinematics(const double *r, bool directCut)
generate the kinamatics of the first node
Herwig::Node::MH
void MH(MergerPtr a)
set the merging helper
Definition:
Node.h:136
Herwig::Node::children
vector< NodePtr > children() const
vector of children nodes created in birth
Definition:
Node.h:92
Herwig::Node::theProjector
NodePtr theProjector
The nodes of the projection stage.
Definition:
Node.h:172
Herwig::Node::maxChildPt
Energy maxChildPt()
return maximum of all child pts.
Herwig::Node::theCutStage
int theCutStage
The CutStage is number of clusterings which are possible without introducing a merging scale to cut a...
Definition:
Node.h:158
Herwig::Node::thedipol
SubtractionDipolePtr thedipol
the dipol used to substract and generate kinematics using tilde kinematics
Definition:
Node.h:147
Herwig::Node::getNextOrderedNodes
vector< NodePtr > getNextOrderedNodes(bool normal=true, double hardscalefactor=1.) const
get a vector of the next nodes, ordered in pt (and in parton shower phace space)
Herwig::Node::allAbove
bool allAbove(Energy pt)
true if all children show scales above pt
Herwig::Node::theDeepHead
NodePtr theDeepHead
The godfather node of whole tree.(Firstnode)
Definition:
Node.h:151
Herwig::Node::theVirtualContribution
bool theVirtualContribution
flag to tell if node is virtual contribution
Definition:
Node.h:162
Herwig::Node::didflush
bool didflush
flag not to enter infinite loop. (There should be a better solution...)
Definition:
Node.h:174
Herwig::Node::clearKinematics
void clearKinematics()
recursive clearKinematics
Herwig::Node::thenodeMEPtr
MatchboxMEBasePtr thenodeMEPtr
the Matrixelement representing this node.
Definition:
Node.h:144
Herwig::Node::getInOut
pair< PVector, PVector > getInOut()
get incoming and outgoing particles (TODO: expensive)
Herwig::Node::deepHead
NodePtr deepHead() const
return the first node
Definition:
Node.h:106
Herwig::Node::runningPt
Energy runningPt() const
return the current running pt
Definition:
Node.h:114
Herwig::Node::calcDipandPS
pair< CrossSection, CrossSection > calcDipandPS(Energy scale) const
calculate the dipole and ps approximation
Herwig::Node::operator=
Node & operator=(const Node &)=delete
The assignment operator is private and must never be called.
Herwig::Node::cutStage
int cutStage() const
return the cut stage to cut on merging pt in generate kinematics
Definition:
Node.h:118
Herwig::Node::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
Herwig::Node::subtractedReal
void subtractedReal(bool x)
set if node correspont to a subtracted real.
Definition:
Node.h:128
Herwig::Node::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Herwig::Node::setKinematics
void setKinematics()
recursive setKinematics
Herwig::Node::virtualContribution
void virtualContribution(bool x)
set if node correspont to a virtual contribution.
Definition:
Node.h:132
Herwig::Node::flushCaches
void flushCaches()
recursive flush caches and clean up XCombs.
Herwig::Node::xcomb
StdXCombPtr xcomb()
return the xcomb (if not created, create one from head)
Herwig::Node::deepHead
void deepHead(NodePtr deephead)
set the first node (first men). only use in factory
Definition:
Node.h:104
Herwig::Node::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Herwig::Node::setXComb
void setXComb(tStdXCombPtr xc)
recursive setXComb.
Herwig::Node::xcomb
StdXCombPtr xcomb() const
return the xcomb
Herwig::Node::theSubtractedReal
bool theSubtractedReal
flag to tell if node is subtracted real
Definition:
Node.h:160
Herwig::Node::thechildren
vector< NodePtr > thechildren
vector of the children node
Definition:
Node.h:168
Herwig::Node::theRunningPt
Energy theRunningPt
the current running pt
Definition:
Node.h:170
Herwig::Node::generateKinematics
bool generateKinematics(const double *r, bool directCut)
recursive generateKinematics using tilde kinematics of the dipoles
Herwig::Node::pT
Energy pT() const
pT of the dipole
Definition:
Node.h:138
ThePEG::Interfaced
ThePEG::PersistentIStream
ThePEG::PersistentOStream
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
ThePEG
ThePEG::IBPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
std.h
Generated on Thu Jun 20 2024 17:50:53 for Herwig by
1.9.6