herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
PowhegShowerHandler.h
1// -*- C++ -*-
2//
3// PowhegShowerHandler.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_PowhegShowerHandler_H
10#define HERWIG_PowhegShowerHandler_H
11//
12// This is the declaration of the PowhegShowerHandler class.
13//
14
15#include "Herwig/Shower/QTilde/QTildeShowerHandler.h"
16#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.h"
17#include "Herwig/MatrixElement/HwMEBase.h"
18#include "Herwig/Shower/QTilde/Base/HardBranching.h"
19
20#include "Herwig/Shower/QTilde/Matching/CKKWTree.h"
21#include "Herwig/Shower/QTilde/Matching/ProtoTree.h"
22#include "Herwig/Shower/QTilde/Matching/ProtoBranching.h"
23#include "Herwig/Shower/QTilde/Matching/PotentialTree.h"
24
25#include "ThePEG/MatrixElement/DiagramBase.fh"
26#include "ThePEG/MatrixElement/MEBase.h"
27#include "ThePEG/PDF/PartonExtractor.h"
28#include "Herwig/Shower/QTilde/Base/HardTree.h"
29
30// #include "Herwig/Shower/QTilde/SplittingFunctions/SplittingGenerator.h"
31// #include "Herwig/Shower/QTilde/Base/ShowerModel.h"
32// #include "ThePEG/PDF/BeamParticleData.h"
33// #include "Herwig/Shower/QTilde/Base/ShowerTree.h"
34// #include "Herwig/Shower/QTilde/Base/ShowerProgenitor.fh"
35// #include "Herwig/Shower/QTilde/QTildeShowerHandler.fh"
36// #include "Herwig/Shower/QTilde/Base/Branching.h"
37// #include "Herwig/Shower/QTilde/Base/ShowerVeto.h"
38// #include "ThePEG/Handlers/XComb.h"
39// #include "Herwig/Decay/HwDecayerBase.h"
40
41
42namespace Herwig {
43
44using namespace ThePEG;
45
47
48public:
49
55 forcePartners_(false),
57 {}
58
59public:
60
61 Ptr<MatchboxFactory>::tptr Factory() const{return MatchboxFactory::currentFactory();}
62
67 virtual bool canHandleMatchboxTrunc() const { return true; }
68
69protected:
70
74 virtual HardTreePtr generateCKKW(ShowerTreePtr tree) const;
75
76protected:
77
81 MEPtr matrixElement() const {return matrixElement_;}
82
86 PotentialTree doClustering(tSubProPtr sub,ShowerTreePtr showerTree) const;
87
92 const PotentialTree & hardTree() const {return hardTree_;}
93
97 void hardTree(PotentialTree in) const {hardTree_ = in;}
98
102 bool fuzzyEqual(Lorentz5Momentum a, Lorentz5Momentum b) const;
103
107 set<ProtoBranchingPtr> & protoBranchings() const {return protoBranchings_;}
108
112 set< ProtoTreePtr > & protoTrees() const {return protoTrees_;}
113
118 void fillProtoTrees( ProtoTreePtr , long id ) const;
119
126 tProtoBranchingPtr getCluster( tProtoBranchingPtr, tProtoBranchingPtr ) const;
127
133 bool repeatProtoTree( ProtoTreePtr currentProtoTree ) const;
134
139 tProtoBranchingPtr &) const;
140
145 tProtoBranchingPtr &) const;
146
150 bool checkDiagram(PotentialTree &,tcDiagPtr) const;
151
152 bool subtractionIntegral() const {return subtractionIntegral_;}
153
154 void setSubtractionIntegral(bool subInt) const { subtractionIntegral_=subInt;}
155
156
157private:
158
162 mutable MEPtr matrixElement_;
163
168
172 mutable set<ProtoBranchingPtr> protoBranchings_;
173
177 mutable set< ProtoTreePtr > protoTrees_;
178
182 mutable vector< pair< PotentialTree, double > > hardTrees_;
183
191 mutable map<pair<long,long>,BranchingElement > allowedFinal_;
192
196 mutable multimap<long, BranchingElement > allowedInitial_;
198
199public:
200
208
214 void persistentInput(PersistentIStream & is, int version);
216
223 static void Init();
224
225protected:
226
233 virtual IBPtr clone() const;
234
239 virtual IBPtr fullclone() const;
241
242protected:
243
251 virtual void doinit();
253
254private:
255
261
262private:
263
267 mutable int emitter_;
268
272 mutable int spectator_;
273
278
283
288
292 unsigned int decayRadiation_;
293
294};
295
296}
297
298#endif /* HERWIG_PowhegShowerHandler_H */
static const Ptr< MatchboxFactory >::tptr currentFactory()
Pointer to the current factory object.
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
void hardTree(PotentialTree in) const
Access to the select tree.
bool repeatProtoTree(ProtoTreePtr currentProtoTree) const
Checks whether a ProtoTree containing the same branchings already exists in protoTrees_ in which case...
BranchingElement allowedFinalStateBranching(tProtoBranchingPtr &, tProtoBranchingPtr &) const
Returns the branching element for an FS-FS clustering.
MEPtr matrixElement() const
Access to the core matrix element.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
int emitter_
Emitter particle from the original generation.
bool subtractionIntegral_
Whether or not a subtraction integral.
BranchingElement allowedInitialStateBranching(tProtoBranchingPtr &, tProtoBranchingPtr &) const
Returns the branching element for an IS-FS clustering.
vector< pair< PotentialTree, double > > hardTrees_
The possible shower configurations that are angular-ordered.
tProtoBranchingPtr getCluster(tProtoBranchingPtr, tProtoBranchingPtr) const
Function looks to see if a cluster of the branchings already exists in protoBranchings_ if so returns...
PotentialTree hardTree_
The chosen hard tree.
map< pair< long, long >, BranchingElement > allowedFinal_
Which branchings are allowed?
set< ProtoTreePtr > & protoTrees() const
The ProtoTrees which will become CKKWTrees.
bool fuzzyEqual(Lorentz5Momentum a, Lorentz5Momentum b) const
Check if two momenta are equal within 1%.
void fillProtoTrees(ProtoTreePtr, long id) const
Recursive function to find all possible clustered trees.
virtual IBPtr clone() const
Make a simple clone of this object.
virtual HardTreePtr generateCKKW(ShowerTreePtr tree) const
Generate hard emissions for CKKW etc.
virtual bool canHandleMatchboxTrunc() const
Return true, if the shower handler can generate a truncated shower for POWHEG style events generated ...
bool enforceColourConsistency_
Whether or not do enforce consistency of the Born and real colour flows.
PotentialTree doClustering(tSubProPtr sub, ShowerTreePtr showerTree) const
Creates all (ordered) cluster histories and selects one.
set< ProtoBranchingPtr > & protoBranchings() const
Access to the potential branchings.
int spectator_
Spectator particle from the original generation.
PowhegShowerHandler()
The default constructor.
multimap< long, BranchingElement > allowedInitial_
The allowed initial-state branchings.
static void Init()
The standard Init function used to initialize the interfaces.
set< ProtoBranchingPtr > protoBranchings_
All the Protobranchings used in finding the shower histories.
bool forcePartners_
Force emitter and spectator partners.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
bool checkDiagram(PotentialTree &, tcDiagPtr) const
Returns the diagram corresponding to the (leading-order) hardTree.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
set< ProtoTreePtr > protoTrees_
The ProtoTrees which will become CKKWTrees.
MEPtr matrixElement_
The matrix element for the core process.
PowhegShowerHandler & operator=(const PowhegShowerHandler &)=delete
The assignment operator is private and must never be called.
PotentialTree & hardTree()
Access to the select tree.
unsigned int decayRadiation_
Handling of radiation in decays.
The QTildeShowerHandler class.
-*- C++ -*-
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ThePEG::Ptr< SubProcess >::transient_pointer tSubProPtr
typedef to pair the SudakovFormFactor and the particles in a branching
Definition: ShowerConfig.h:81
Struct to store a potential CKKWTree.
Definition: PotentialTree.h:17