herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
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 
42 namespace Herwig {
43 
44 using namespace ThePEG;
45 
47 
48 public:
49 
53  PowhegShowerHandler() : subtractionIntegral_(false),
54  enforceColourConsistency_(false),
55  forcePartners_(false),
56  decayRadiation_(0)
57  {}
58 
59 public:
60 
61  Ptr<MatchboxFactory>::tptr Factory() const{return MatchboxFactory::currentFactory();}
62 
67  virtual bool canHandleMatchboxTrunc() const { return true; }
68 
69 protected:
70 
74  virtual HardTreePtr generateCKKW(ShowerTreePtr tree) const;
75 
76 protected:
77 
81  MEPtr matrixElement() const {return matrixElement_;}
82 
86  PotentialTree doClustering(tSubProPtr sub,ShowerTreePtr showerTree) const;
87 
91  PotentialTree & hardTree() {return hardTree_;}
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 
138  BranchingElement allowedFinalStateBranching( tProtoBranchingPtr &,
139  tProtoBranchingPtr &) const;
140 
144  BranchingElement allowedInitialStateBranching( tProtoBranchingPtr & ,
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 
157 private:
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 
199 public:
200 
207  void persistentOutput(PersistentOStream & os) const;
208 
214  void persistentInput(PersistentIStream & is, int version);
216 
223  static void Init();
224 
225 protected:
226 
233  virtual IBPtr clone() const;
234 
239  virtual IBPtr fullclone() const;
241 
242 protected:
243 
251  virtual void doinit();
253 
254 private:
255 
260  PowhegShowerHandler & operator=(const PowhegShowerHandler &) = delete;
261 
262 private:
263 
267  mutable int emitter_;
268 
272  mutable int spectator_;
273 
277  mutable bool subtractionIntegral_;
278 
283 
288 
292  unsigned int decayRadiation_;
293 
294 };
295 
296 }
297 
298 #endif /* HERWIG_PowhegShowerHandler_H */
int emitter_
Emitter particle from the original generation.
typedef to pair the SudakovFormFactor and the particles in a branching
Definition: ShowerConfig.h:79
PowhegShowerHandler()
The default constructor.
PotentialTree hardTree_
The chosen hard tree.
static const Ptr< MatchboxFactory >::tptr currentFactory()
Pointer to the current factory object.
The QTildeShowerHandler class.
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
bool subtractionIntegral_
Whether or not a subtraction integral.
map< pair< long, long >, BranchingElement > allowedFinal_
Which branchings are allowed?
set< ProtoBranchingPtr > protoBranchings_
All the Protobranchings used in finding the shower histories.
set< ProtoTreePtr > protoTrees_
The ProtoTrees which will become CKKWTrees.
void hardTree(PotentialTree in) const
Access to the select tree.
MEPtr matrixElement_
The matrix element for the core process.
int spectator_
Spectator particle from the original generation.
PotentialTree & hardTree()
Access to the select tree.
ThePEG::Ptr< SubProcess >::transient_pointer tSubProPtr
unsigned int decayRadiation_
Handling of radiation in decays.
set< ProtoBranchingPtr > & protoBranchings() const
Access to the potential branchings.
MEPtr matrixElement() const
Access to the core matrix element.
set< ProtoTreePtr > & protoTrees() const
The ProtoTrees which will become CKKWTrees.
bool enforceColourConsistency_
Whether or not do enforce consistency of the Born and real colour flows.
-*- C++ -*-
vector< pair< PotentialTree, double > > hardTrees_
The possible shower configurations that are angular-ordered.
Struct to store a potential CKKWTree.
Definition: PotentialTree.h:17
multimap< long, BranchingElement > allowedInitial_
The allowed initial-state branchings.
virtual bool canHandleMatchboxTrunc() const
Return true, if the shower handler can generate a truncated shower for POWHEG style events generated ...
bool forcePartners_
Force emitter and spectator partners.