herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.5
MatchingHandler.h
1 // -*- C++ -*-
2 #ifndef Herwig_MatchingHandler_H
3 #define Herwig_MatchingHandler_H
4 //
5 // This is the declaration of the MatchingHandler class.
6 //
7 
8 #include "Herwig/Shower/QTilde/QTildeShowerHandler.h"
9 #include "ThePEG/MatrixElement/MEBase.h"
10 #include "Herwig/MatrixElement/HwMEBase.h"
11 #include "ThePEG/MatrixElement/DiagramBase.fh"
12 #include "ThePEG/PDF/PartonExtractor.h"
13 #include "Herwig/Shower/Core/Base/HardBranching.h"
14 #include "ProtoTree.h"
15 #include "PotentialTree.h"
16 
17 namespace Herwig {
18 
19 using namespace ThePEG;
20 
28 
29 public:
30 
34  MatchingHandler(bool reWeight = false);
35 
42  void persistentOutput(PersistentOStream & os) const;
43 
49  void persistentInput(PersistentIStream & is, int version);
51 
58  static void Init();
59 
60 protected:
61 
69  virtual void doinit();
71 
72 protected:
73 
77  MEPtr matrixElement() const {return matrixElement_;}
78 
82  HwMEBasePtr HWMatrixElement() const {return HWmatrixElement_;}
83 
87  PExtrPtr partonExtractor() { return partonExtractor_;}
88 
93  PartonPairVec partonBins() {return partonBins_;}
94 
99  void partonBins(PartonPairVec bins) {partonBins_ = bins;}
100 
104  CutsPtr & cuts() {return cuts_;}
105 
109  void initialiseMatching(int minMult, int maxMult);
110 
111 protected:
112 
116  ShowerAlphaPtr alphaS() {return alphaS_;}
117 
122  bool rejectNonAngularOrdered() {return rejectNonAO_;}
123 
128  bool rejectNoShowerHistory() {return rejectNOHistories_;}
129 
137  Energy2 sHat() const {return sHat_;}
138 
142  void sHat(Energy2 in) {sHat_ = in;}
143 
147  Energy pdfScale() const {return pdfScale_;}
148 
152  void pdfScale(Energy in) {pdfScale_ = in;}
153 
157  double alphaSMG() const {return alphaSMG_;}
158 
162  void alphaSMG(double in) {alphaSMG_ = in;}
163 
167  bool noShowerHistory() {return noShowerHists_;}
168 
172  bool highestMult() const {return highestMult_;}
173 
177  bool lowestMult() const {return lowestMult_;}
179 
187  set<ProtoBranchingPtr> & protoBranchings() {return protoBranchings_;}
188 
192  set< ProtoTreePtr > & protoTrees() {return protoTrees_;}
193 
197  PotentialTree & hardTree() {return hardTree_;}
198 
202  void hardTree(PotentialTree in) {hardTree_ = in;}
203 
207  CKKWTreePtr getCKKWTree() const {return hardTree_.tree();}
208 
212  vector< pair< PotentialTree, double > > & hardTrees() {
213  return hardTrees_;
214  }
215 
219  vector< pair< PotentialTree, double > > & nonOrderedTrees() {
220  return nonOrderedTrees_;
221  }
223 
227  double getDiagram(PotentialTree &);
228 
233  void fillProtoTrees( ProtoTreePtr );
234 
238  bool updateSubProcess();
239 
243  PotentialTree doClustering();
244 
248  virtual double sudakovWeight( CKKWTreePtr ) = 0;
249 
253  virtual PotentialTree chooseHardTree(double totalWeight,
254  double nonOrderedWeight) = 0;
255 
262  tProtoBranchingPtr getCluster( tProtoBranchingPtr, tProtoBranchingPtr );
263 
269  bool repeatProtoTree( ProtoTreePtr currentProtoTree );
270 
274  BranchingElement allowedFinalStateBranching( tProtoBranchingPtr &,
275  tProtoBranchingPtr &);
276 
280  BranchingElement allowedInitialStateBranching( tProtoBranchingPtr & ,
281  tProtoBranchingPtr &);
282 
286  void findDecayingParticles(PPtr parent);
287 
291  map<PPtr,ParticleVector>::const_iterator parent(PPtr parent);
292 
296  void addDecayProducts(SubProPtr subProcess, PPtr parent,
297  map<PPtr,ParticleVector>::const_iterator decay,
298  const LorentzRotation & boost) const;
299 
300 private:
301 
306  MatchingHandler & operator=(const MatchingHandler &) = delete;
307 
308 private:
309 
313  bool reWeight_;
314 
320 
326 
331 
336 
340  HwMEBasePtr HWmatrixElement_;
341 
346 
351  PartonPairVec partonBins_;
352 
356  CutsPtr cuts_;
357 
361  Energy2 sHat_;
362 
366  ShowerAlphaPtr alphaS_;
367 
371  Energy pdfScale_;
372 
376  double alphaSMG_;
377 
378 private:
379 
387  set<ProtoBranchingPtr> protoBranchings_;
388 
392  set< ProtoTreePtr > protoTrees_;
393 
398 
402  vector< pair< PotentialTree, double > > hardTrees_;
403 
407  vector< pair< PotentialTree, double > > nonOrderedTrees_;
408 
412  map<PPtr,ParticleVector> decayingParticles_;
413 
418 
423 
429 
437  map<pair<long,long>,pair<SudakovPtr,IdList> > allowedFinal_;
438 
442  multimap<long, pair<SudakovPtr,IdList> > allowedInitial_;
444 };
445 
446 }
447 
448 #endif /* Herwig_MatchingHandler_H */
ThePEG::Ptr< Particle >::pointer PPtr
typedef to pair the SudakovFormFactor and the particles in a branching
Definition: ShowerConfig.h:79
PExtrPtr partonExtractor_
The PartonExtractor object used to construct remnants.
ThePEG::Ptr< SubProcess >::pointer SubProPtr
Definition: expm-1.h:45
ShowerAlphaPtr alphaS()
Pointer to the object calculating the strong coupling.
vector< pair< PotentialTree, double > > nonOrderedTrees_
The possible shower configurations that are not angular-ordered.
PartonPairVec partonBins()
The pairs of PartonBin objects describing the partons which can be extracted by the PartonExtractor o...
ShowerAlphaPtr alphaS_
Pointer to the object calculating the strong coupling.
CutsPtr & cuts()
The Cuts object to be used for this reader.
Energy2 sHat_
Centre of mass energy.
bool rejectNonAngularOrdered()
whether to just reject event if there are no angular ordered histories (true) or to choose one of the...
CutsPtr cuts_
The Cuts object to be used for this reader.
map< pair< long, long >, pair< SudakovPtr, IdList > > allowedFinal_
Which branchings are allowed?
double alphaSMG() const
The fixed alphaS value that was used to generate parton configurations.
void partonBins(PartonPairVec bins)
The pairs of PartonBin objects describing the partons which can be extracted by the PartonExtractor o...
HwMEBasePtr HWMatrixElement() const
Access to the core Hw++ matrix element.
set< ProtoBranchingPtr > protoBranchings_
Storage of the potential shower interpretation.
bool noShowerHists_
Whether we are treating an event with no shower interpretation.
Energy pdfScale() const
The fixed factorization scale used in the MEs.
double alphaSMG_
The fixed alphaS value that was used to generate parton configurations.
void alphaSMG(double in)
The fixed alphaS value that was used to generate parton configurations.
map< PPtr, ParticleVector > decayingParticles_
Any decays.
set< ProtoTreePtr > protoTrees_
The ProtoTrees which will become CKKWTrees.
void hardTree(PotentialTree in)
Access to the select tree.
bool noShowerHistory()
Whether we are treating an event with no shower interpretation.
bool lowestMult() const
whether the current event is a lowest multiplicity event
vector< pair< PotentialTree, double > > & nonOrderedTrees()
The possible shower configurations that are not angular-ordered.
Energy pdfScale_
The fixed factorization scale used in the MEs.
set< ProtoBranchingPtr > & protoBranchings()
Storage of potential shower interpretations.
bool highestMult_
Whether we are treating the highest multiplicity contribution.
vector< pair< PotentialTree, double > > & hardTrees()
The possible shower configurations that are angular-ordered.
void sHat(Energy2 in)
Centre of mass energy.
void pdfScale(Energy in)
The fixed factorization scale used in the MEs.
bool reWeight_
Whether or not to reweight.
Here is the documentation of the MatchingHandler class.
PartonPairVec partonBins_
The pairs of PartonBin objects describing the partons which can be extracted by the PartonExtractor o...
PotentialTree & hardTree()
Access to the select tree.
bool rejectNonAO_
whether to just reject event if there are no angular ordered histories (true) or to choose one of the...
bool highestMult() const
whether the current event is a highest multiplicity event.
MEPtr matrixElement_
The matrix element for the core process.
-*- C++ -*-
CKKWTreePtr getCKKWTree() const
access to the hard tree object
PExtrPtr partonExtractor()
The PartonExtractor object used to construct remnants.
bool lowestMult_
Whether we are treating the lowest multiplicity contribution.
This class is the main driver of the shower: it is responsible for the proper handling of all other s...
Definition: ShowerHandler.h:40
MEPtr matrixElement() const
Access to the core matrix element.
ThePEG::Ptr< PartonExtractor >::pointer PExtrPtr
bool rejectNOHistories_
whether to reject events (true) for which there is no parton shower interpretation or just shower the...
bool includeDecays_
Include decaying particles.
Struct to store a potential CKKWTree.
Definition: PotentialTree.h:17
bool rejectNoShowerHistory()
whether to reject events (true) for which there is no parton shower interpretation or just shower the...
multimap< long, pair< SudakovPtr, IdList > > allowedInitial_
The allowed initial-state branchings.
Energy2 sHat() const
Access to basic info on the event.
HwMEBasePtr HWmatrixElement_
The cast matrix element.
PotentialTree hardTree_
The chosen hard tree.
set< ProtoTreePtr > & protoTrees()
The ProtoTrees which will become CKKWTrees.
vector< pair< PotentialTree, double > > hardTrees_
The possible shower configurations that are angular-ordered.