herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
SubtractionDipole.h
1// -*- C++ -*-
2//
3// SubtractionDipole.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_SubtractionDipole_H
10#define HERWIG_SubtractionDipole_H
11//
12// This is the declaration of the SubtractionDipole class.
13//
14
15#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.fh"
16#include "Herwig/MatrixElement/Matchbox/Phasespace/TildeKinematics.fh"
17#include "Herwig/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.fh"
18
19#include "ThePEG/MatrixElement/MEBase.h"
20#include "ThePEG/Handlers/StandardXComb.h"
21#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.h"
22#include "Herwig/MatrixElement/Matchbox/Matching/ShowerApproximation.h"
23#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.fh"
24
25namespace Herwig {
26
27using namespace ThePEG;
28
38 public MEBase, public LastMatchboxXCombInfo {
39
40public:
41
48
54
55public:
56
60 Ptr<MatchboxFactory>::tptr factory() const;
61
64
69 struct MergeInfo {
70
75
79 Ptr<Tree2toNDiagram>::ptr diagram;
80
84 map<int,int> mergeLegs;
85
86 };
87
92 virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const = 0;
93
98 virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const = 0;
99
104 virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const = 0;
105
110 virtual bool canHandle(const cPDVector& partons,
111 int emitter, int emission, int spectator) const = 0;
112
117 virtual bool isSymmetric() const { return false; }
118
123 virtual bool apply() const { return theApply; }
124
129
133 void setupBookkeeping(const map<Ptr<DiagramBase>::ptr,MergeInfo>& mergeInfo,bool slim);
134
140
147
152 virtual StdXCombPtr makeXComb(Energy newMaxEnergy, const cPDPair & inc,
153 tEHPtr newEventHandler,tSubHdlPtr newSubProcessHandler,
154 tPExtrPtr newExtractor, tCascHdlPtr newCKKW,
155 const PBPair & newPartonBins, tCutsPtr newCuts,
156 const DiagramVector & newDiagrams, bool mir,
157 const PartonPairVec& allPBins,
158 tStdXCombPtr newHead = tStdXCombPtr(),
159 tMEPtr newME = tMEPtr());
160
165 virtual StdXCombPtr makeXComb(tStdXCombPtr newHead,
166 const PBPair & newPartonBins,
167 const DiagramVector & newDiagrams,
168 tMEPtr newME = tMEPtr());
169
174 StdXCombPtr makeBornXComb(tStdXCombPtr realXC);
175
180 vector<StdXCombPtr> makeRealXCombs(tStdXCombPtr bornXC);
181
185 bool empty() const { return theSplittingMap.empty()&&theMergingMap.empty(); }
186
191 int realEmitter() const { return theRealEmitter; }
192
197 void realEmitter(int id) { theRealEmitter = id; }
198
203 int realEmission() const { return theRealEmission; }
204
209 void realEmission(int id) { theRealEmission = id; }
210
215 int realSpectator() const { return theRealSpectator; }
216
221 void realSpectator(int id) { theRealSpectator = id; }
222
227 int bornEmitter() const { return theBornEmitter; }
228
233 void bornEmitter(int id) { theBornEmitter = id; }
234
239 int bornSpectator() const { return theBornSpectator; }
240
245 void bornSpectator(int id) { theBornSpectator = id; }
246
250 typedef pair<pair<cPDVector,int>,pair<int,int> > RealEmissionKey;
251
256 int em, int emm, int sp) {
257 return make_pair(make_pair(proc,emm),make_pair(em,sp));
258 }
259
263 static const cPDVector& process(const RealEmissionKey& key) {
264 return key.first.first;
265 }
266
270 static int emission(const RealEmissionKey& key) {
271 return key.first.second;
272 }
273
277 static int emitter(const RealEmissionKey& key) {
278 return key.second.first;
279 }
280
284 static int spectator(const RealEmissionKey& key) {
285 return key.second.second;
286 }
287
291 typedef pair<cPDVector,pair<int,int> > UnderlyingBornKey;
292
297 int em, int sp) {
298 return make_pair(proc,make_pair(em,sp));
299 }
300
304 static const cPDVector& process(const UnderlyingBornKey& key) {
305 return key.first;
306 }
307
311 static int emitter(const UnderlyingBornKey& key) {
312 return key.second.first;
313 }
314
318 static int spectator(const UnderlyingBornKey& key) {
319 return key.second.second;
320 }
321
326 typedef pair<RealEmissionKey,map<int,int> > RealEmissionInfo;
327
332 typedef pair<UnderlyingBornKey,map<int,int> > UnderlyingBornInfo;
333
337 const map<RealEmissionKey,UnderlyingBornInfo>& mergingMap() const { return theMergingMap; }
338
342 const multimap<UnderlyingBornKey,RealEmissionInfo>& splittingMap() const { return theSplittingMap; }
343
349
353 tcDiagPtr underlyingBornDiagram(tcDiagPtr realDiag) const;
354
360
364 tcDiagPtr realEmissionDiagram(tcDiagPtr bornDiag) const;
365
369 virtual void getDiagrams() const;
370
378 virtual bool noMirror () const { return true; }
379
387
393 colourGeometries(tcDiagPtr diag) const;
394
400 virtual const ColourLines &
401 selectColourGeometry(tcDiagPtr diag) const;
402
407 virtual unsigned int orderInAlphaS() const { return realEmissionME()->orderInAlphaS(); }
408
413 virtual unsigned int orderInAlphaEW() const { return underlyingBornME()->orderInAlphaEW(); }
414
416
419
424 virtual void setXComb(tStdXCombPtr xc);
425
433 virtual void setKinematics();
434
443 virtual bool generateKinematics(const double * r);
444
449 virtual int nDim() const;
450
455 virtual bool wantCMS () const { return realEmissionME()->wantCMS(); }
456
461 virtual void clearKinematics();
462
467 virtual bool ignoreCuts() const { return theIgnoreCuts; }
468
472 void doIgnoreCuts(bool is = true) { theIgnoreCuts = is; }
473
475
478
482 Ptr<TildeKinematics>::tcptr tildeKinematics() const { return theTildeKinematics; }
483
487 void tildeKinematics(Ptr<TildeKinematics>::tptr);
488
496
500 Ptr<InvertedTildeKinematics>::tcptr invertedTildeKinematics() const { return theInvertedTildeKinematics; }
501
505 void invertedTildeKinematics(Ptr<InvertedTildeKinematics>::tptr);
506
514 virtual int nDimRadiation() const;
515
524 virtual bool generateRadiationKinematics(const double *);
525
529 void ptCut(Energy cut);
530
534 Energy lastDipoleScale() const {
536 }
537
541 Energy lastPt() const {
543 }
544
548 double lastZ() const {
550 }
551
555 bool splitting() const { return theSplitting; }
556
560 void doSplitting() { theSplitting = true; }
561
565 void doSubtraction() { theSplitting = false; }
566
570 const vector<double>& subtractionParameters() const { return theSubtractionParameters; }
571
576
580 Energy showerHardScale() const { return theShowerHardScale; }
581
585 void showerHardScale(Energy s) { theShowerHardScale = s; }
586
590 Energy showerScale() const { return theShowerScale; }
591
595 void showerScale(Energy s) { theShowerScale = s; }
596
600 const vector<double>& showerParameters() const { return theShowerParameters; }
601
605 vector<double>& showerParameters() { return theShowerParameters; }
606
611
616
620 bool isAboveCutoff() const { return theIsAboveCutoff; }
621
625 void isAboveCutoff(bool yes) { theIsAboveCutoff = yes; }
626
628
631
636
640 void doRealEmissionScales(bool on = true) { theRealEmissionScales = on; }
641
646 virtual Energy2 scale() const {
647 return realEmissionScales() ?
648 realEmissionME()->scale() :
649 underlyingBornME()->scale();
650 }
651
657 virtual double alphaS() const {
658 return realEmissionScales() ?
659 realEmissionME()->alphaS() :
660 underlyingBornME()->alphaS();
661 }
662
668 virtual double alphaEM() const {
669 return realEmissionScales() ?
670 realEmissionME()->alphaEM() :
671 underlyingBornME()->alphaEM();
672 }
673
678 virtual bool havePDFWeight1() const { return realEmissionME()->havePDFWeight1(); }
679
684 virtual bool havePDFWeight2() const { return realEmissionME()->havePDFWeight2(); }
685
694 virtual int samplingZ() const {return 4;}
696
699
703 Ptr<MatchboxMEBase>::tcptr realEmissionME() const {
704 return theRealEmissionME;
705 }
706
710 Ptr<MatchboxMEBase>::tptr realEmissionME() {
711 return theRealEmissionME;
712 }
713
717 void realEmissionME(Ptr<MatchboxMEBase>::tptr me) { theRealEmissionME = me; }
718
722 Ptr<MatchboxMEBase>::tcptr underlyingBornME() const {
723 return theUnderlyingBornME;
724 }
725
729 Ptr<MatchboxMEBase>::tptr underlyingBornME() {
730 return theUnderlyingBornME;
731 }
732
736 void underlyingBornME(Ptr<MatchboxMEBase>::tptr me) { theUnderlyingBornME = me; }
737
741 void partnerDipoles(const vector<Ptr<SubtractionDipole>::tptr>& p) {
742 thePartners = p;
743 }
744
748 const vector<Ptr<SubtractionDipole>::tptr>& partnerDipoles() const {
749 return thePartners;
750 }
751
755 virtual double me2Avg(double ccme2) const = 0;
756
761 virtual CrossSection dSigHatDR(Energy2 factorizationScale) const;
762
767 virtual CrossSection dSigHatDR() const { return dSigHatDR(ZERO); }
768
769
771 CrossSection prefactor(Energy2 factorizationScale)const;
772
777 CrossSection ps(Energy2 factorizationScale,Ptr<ColourBasis>::tptr largeNBasis) const;
778
783 CrossSection dip(Energy2 factorizationScale) const;
784
785
786
791 pair<CrossSection,CrossSection> dipandPs(Energy2 factorizationScale,Ptr<ColourBasis>::tptr largeNBasis) const;
792
794
797
801 void showerApproximation(Ptr<ShowerApproximation>::tptr app) {
803 }
804
808 Ptr<ShowerApproximation>::tptr showerApproximation() const { return theShowerApproximation; }
809
814
819
824
829
834
839
841
844
850 virtual void flushCaches();
851
856
860 bool testSubtraction() const { return theSubtractionTest; }
861
865 bool verbose() const { return realEmissionME()->verbose() || underlyingBornME()->verbose(); }
866
870 void print(ostream&) const;
871
875 virtual void printLastEvent(ostream&) const;
876
882
887 void logGenerateRadiationKinematics(const double * r) const;
888
893 void logME2() const;
894
899 void logDSigHatDR(double effectiveJac) const;
900
902
905
909 void addReweight(Ptr<MatchboxReweightBase>::ptr rw) { theReweights.push_back(rw); }
910
914 const vector<Ptr<MatchboxReweightBase>::ptr>& reweights() const { return theReweights; }
915
919 vector<Ptr<MatchboxReweightBase>::ptr>& reweights() { return theReweights; }
920
922
925
929 Ptr<SubtractionDipole>::ptr cloneMe() const {
930 return dynamic_ptr_cast<Ptr<SubtractionDipole>::ptr>(clone());
931 }
932
937 void cloneDependencies(const std::string& prefix = "", bool slim=false);
938
940
943
947 virtual void constructVertex(tSubProPtr sub);
948
952 virtual void constructVertex(tSubProPtr sub, const ColourLines* cl);
953
961 virtual void generateSubCollision(SubProcess & sub);
962
968 double alpha() const;
969
970 /*
971 * True if phase space point is above the alpha cut for this dipole.
972 */
973
974 bool aboveAlpha() const;
975
977
978public:
979
987
993 void persistentInput(PersistentIStream & is, int version);
995
1002 static void Init();
1003
1004protected:
1005
1008
1014 virtual void doinit();
1015
1020 virtual void doinitrun();
1022
1023private:
1024
1029
1034
1039
1044
1048 Ptr<MatchboxMEBase>::ptr theRealEmissionME;
1049
1053 Ptr<MatchboxMEBase>::ptr theUnderlyingBornME;
1054
1058 vector<Ptr<SubtractionDipole>::tptr> thePartners;
1059
1063 Ptr<TildeKinematics>::ptr theTildeKinematics;
1064
1068 Ptr<InvertedTildeKinematics>::ptr theInvertedTildeKinematics;
1069
1074 vector<Ptr<MatchboxReweightBase>::ptr> theReweights;
1075
1081
1087
1093
1098
1103 map<RealEmissionKey,UnderlyingBornInfo> theMergingMap;
1104
1109 multimap<UnderlyingBornKey,RealEmissionInfo> theSplittingMap;
1110
1114 map<cPDVector,pair<int,int> > theIndexMap;
1115
1119 map<cPDVector,DiagramVector> theUnderlyingBornDiagrams;
1120
1124 map<cPDVector,DiagramVector> theRealEmissionDiagrams;
1125
1129 map<tcDiagPtr,tcDiagPtr> theBornToRealDiagrams;
1130
1134 map<tcDiagPtr,tcDiagPtr> theRealToBornDiagrams;
1135
1140
1145
1149 multimap<UnderlyingBornKey,RealEmissionInfo>::const_iterator lastRealEmissionInfo;
1150
1156
1162
1167
1172
1177
1182
1187
1192
1196 Ptr<ShowerApproximation>::ptr theShowerApproximation;
1197
1202
1207
1212
1217
1222
1227
1231 vector<double> theShowerParameters;
1232
1237
1242
1243private:
1244
1250
1251};
1252
1253}
1254
1255#endif /* HERWIG_SubtractionDipole_H */
Provide easy access to MatchboxXComb XComb extensions.
SubtractionDipole represents a dipole subtraction term in the formalism of Catani and Seymour.
Ptr< InvertedTildeKinematics >::tcptr invertedTildeKinematics() const
Return the InvertedTildeKinematics object used.
static int emission(const RealEmissionKey &key)
Return the emission id of a real emission key.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
bool theVirtualShowerSubtraction
True, if the shower virtual contribution should be subtracted.
int bornEmitter() const
Return the emitter as referred to by the underlying Born process.
void invertedTildeKinematics(Ptr< InvertedTildeKinematics >::tptr)
Set the InvertedTildeKinematics object used.
static RealEmissionKey realEmissionKey(const cPDVector &proc, int em, int emm, int sp)
Create a real emission key.
virtual unsigned int orderInAlphaS() const
Return the order in in which this matrix element is given.
virtual double alphaS() const
Return the value of associated with the phase space point provided by the last call to setKinematics...
const vector< double > & subtractionParameters() const
Return the subtraction parameters.
void tildeKinematics(Ptr< TildeKinematics >::tptr)
Set the TildeKinematics object used.
virtual double me2Avg(double ccme2) const =0
Return the matrix element averaged over spin correlations.
void splittingBookkeeping()
Determine bookkeeping information for the underlying Born process supplied through the lastHeadXComb(...
void showerScale(Energy s)
Set the shower evolution scale encountered.
virtual bool apply() const
If this is a dependent matrix element in a ME group, return true, if it applies to the process set in...
virtual const ColourLines & selectColourGeometry(tcDiagPtr diag) const
Select a ColpurLines geometry.
void logGenerateRadiationKinematics(const double *r) const
Write out diagnostic information for generateRadiationKinematics.
multimap< UnderlyingBornKey, RealEmissionInfo > theSplittingMap
Map underlying Born diagrams and tilde emitter/spectator to real emission diagram containing the spli...
static int spectator(const UnderlyingBornKey &key)
Return the spectator id of a underlying Born key.
static int emitter(const RealEmissionKey &key)
Return the emitter id of a real emission key.
void setupBookkeeping(const map< Ptr< DiagramBase >::ptr, MergeInfo > &mergeInfo, bool slim)
Setup bookkeeping maps.
bool empty() const
Return true, if bookkeeping did not find a non-trivial setup.
bool theIsAboveCutoff
True, if this configuration is above the shower infrared cutoff.
int theRealEmission
The emission as referred to by the real emission matrix element.
CrossSection dip(Energy2 factorizationScale) const
Calculate the dipole with clusterfsafe flag.
virtual bool generateKinematics(const double *r)
Generate internal degrees of freedom given nDim() uniform random numbers in the interval ]0,...
bool realEmissionScales() const
Return true, if scales should be calculated from real emission kinematics.
vector< double > & subtractionParameters()
Access the subtraction parameters.
virtual void printLastEvent(ostream &) const
Print debug information on the last event.
bool virtualShowerSubtraction() const
Return true, if the shower virtual contribution should be subtracted.
void logME2() const
Write out diagnostic information for me2 evaluation.
virtual void doinitrun()
Initialize this object.
int theBornEmitter
The emitter as referred to by the underlying Born matrix element.
virtual double alphaEM() const
Return the value of associated with the phase space point provided by the last call to setKinematics...
pair< UnderlyingBornKey, map< int, int > > UnderlyingBornInfo
Define underlying Born key and index dictionary for partons not involved in the given dipole.
Ptr< TildeKinematics >::tcptr tildeKinematics() const
Return the TildeKinematics object used.
virtual bool generateRadiationKinematics(const double *)
Generate the real emission kinematics off the Born kinematics accessible through the XComb's head obj...
void subtractionBookkeeping()
Get bookkeeping information for the given real emission diagram.
bool theRealShowerSubtraction
True, if the shower real emission contribution should be subtracted.
static void Init()
The standard Init function used to initialize the interfaces.
int realEmitter() const
Return the emitter as referred to by the real emission matrix element.
virtual void generateSubCollision(SubProcess &sub)
Comlete a SubProcess object using the internal degrees of freedom generated in the last generateKinem...
void logDSigHatDR(double effectiveJac) const
Write out diagnostic information for dsigdr evaluation.
Ptr< SubtractionDipole >::ptr cloneMe() const
Clone this dipole.
void isInShowerPhasespace(bool yes)
Indicate whether this configuration is in the shower phase space.
Ptr< InvertedTildeKinematics >::ptr theInvertedTildeKinematics
The InvertedTildeKinematics to be used.
virtual bool ignoreCuts() const
If this is a dependent matrix element in a ME group, return true, if cuts should be ignored.
void ptCut(Energy cut)
Set a pt cut when splitting.
Energy showerScale() const
Return the shower evolution scale encountered.
Ptr< MatchboxMEBase >::ptr theRealEmissionME
The real emission matrix element to be considered.
static const cPDVector & process(const RealEmissionKey &key)
Return the diagram of a real emission key.
bool theApply
True, if should apply to process in the xcomb.
virtual bool noMirror() const
Return true, if this matrix element does not want to make use of mirroring processes; in this case al...
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
void showerHardScale(Energy s)
Set the shower hard scale encountered.
void logGenerateTildeKinematics() const
Write out diagnostic information for generateTildeKinematics.
int realSpectator() const
Return the spectator as referred to by the real emission matrix element.
virtual unsigned int orderInAlphaEW() const
Return the order in in which this matrix element is given.
void doVirtualShowerSubtraction()
Indicate that the shower virtual contribution should be subtracted.
void bornEmitter(int id)
Set the emitter as referred to by the underlying Born process.
virtual bool canHandleSplitting(const cPDVector &partons, int emitter, int emission) const =0
Return true, if this dipole can possibly handle the indicated splitting.
void realEmissionME(Ptr< MatchboxMEBase >::tptr me)
Set the real emission matrix element.
virtual bool isSymmetric() const
Return true, if this dipole is symmetric with respect to emitter and emission.
map< RealEmissionKey, UnderlyingBornInfo > theMergingMap
Map real emission diagrams to underlying Born diagrams and tilde emitter/spectator.
void print(ostream &) const
Dump the setup to an ostream.
void bornSpectator(int id)
Set the spectator as referred to by the underlying Born process.
bool splitting() const
Return true, if this dipole acts in splitting mode.
void doLoopSimSubtraction()
Indicate that the loopsim matched virtual contribution should be subtracted.
Ptr< MatchboxMEBase >::tptr underlyingBornME()
Return the underlying Born matrix element.
vector< Ptr< MatchboxReweightBase >::ptr > & reweights()
Access the reweight objects.
void doTestSubtraction()
Indicate that the subtraction is being tested.
Ptr< MatchboxMEBase >::tptr realEmissionME()
Return the real emission matrix element.
const vector< Ptr< SubtractionDipole >::tptr > & partnerDipoles() const
Return the dipoles which have been found along with this dipole.
SubtractionDipole()
The default constructor.
const vector< double > & showerParameters() const
Return the shower splitting variables encountered.
void doIgnoreCuts(bool is=true)
Indicate that cuts should be ignored.
StdXCombPtr makeBornXComb(tStdXCombPtr realXC)
Create a dependent xcomb object for the underlying Born process, given a XComb driving the real emiss...
map< tcDiagPtr, tcDiagPtr > theBornToRealDiagrams
Map underlying Born diagrams to real emission diagrams.
vector< double > & showerParameters()
Access the shower splitting variables encountered.
Energy theShowerScale
The shower evolution scale encountered.
vector< StdXCombPtr > makeRealXCombs(tStdXCombPtr bornXC)
Create dependent xcomb objects for the real emission process, given a XComb driving the underlying Bo...
void isAboveCutoff(bool yes)
Indicate whether this configuration is above the shower infrared cutoff.
vector< double > theSubtractionParameters
The subtraction parameters.
int bornSpectator() const
Return the spectator as referred to by the underlying Born process.
Energy lastDipoleScale() const
Return the relevant dipole scale.
const DiagramVector & realEmissionDiagrams(const cPDVector &born) const
Return the real emission diagrams to be considered for the given Born process.
SubtractionDipole & operator=(const SubtractionDipole &)=delete
The assignment operator is private and must never be called.
tcDiagPtr underlyingBornDiagram(tcDiagPtr realDiag) const
Find the underlying Born diagram for the given real emission diagram.
bool loopSimSubtraction() const
Return true, if the loopsim matched virtual contribution should be subtracted.
virtual bool havePDFWeight1() const
Return true, if this matrix element provides the PDF weight for the first incoming parton itself.
bool isAboveCutoff() const
Return true, if this configuration is above the shower infrared cutoff.
virtual void flushCaches()
Inform this matrix element that a new phase space point is about to be generated, so all caches shoul...
virtual void constructVertex(tSubProPtr sub)
construct the spin information for the interaction
static int emitter(const UnderlyingBornKey &key)
Return the emitter id of a underlying Born key.
bool theLoopSimSubtraction
True, if the loopsim matched virtual contribution should be subtracted.
const multimap< UnderlyingBornKey, RealEmissionInfo > & splittingMap() const
Return the splitting map.
Ptr< TildeKinematics >::ptr theTildeKinematics
The TildeKinematics to be used.
virtual bool canHandle(const cPDVector &partons, int emitter, int emission, int spectator) const =0
Return true, if this dipole applies to the selected configuration.
Energy theLastSplittingPt
The last pt as generated from the splitting mapping.
vector< Ptr< MatchboxReweightBase >::ptr > theReweights
A vector of reweight objects the sum of which should be applied to reweight this dipole.
void realEmission(int id)
Set the emission as referred to by the real emission matrix element.
void doRealShowerSubtraction()
Indicate that the shower real emission contribution should be subtracted.
static UnderlyingBornKey underlyingBornKey(const cPDVector &proc, int em, int sp)
Create a underlying Born key.
bool theIsInShowerPhasespace
True, if this configuration is in the shower phase space.
map< cPDVector, DiagramVector > theRealEmissionDiagrams
Map Born processes to real emission diagrams.
pair< CrossSection, CrossSection > dipandPs(Energy2 factorizationScale, Ptr< ColourBasis >::tptr largeNBasis) const
Calculate the dipole dSigDR and the parton shower approximation for this dipole.
Ptr< ShowerApproximation >::ptr theShowerApproximation
The shower approximation.
virtual bool generateTildeKinematics()
Generate the tilde kinematics from real emission kinematics accessible through the XComb's head objec...
void underlyingBornME(Ptr< MatchboxMEBase >::tptr me)
Set the underlying Born matrix element.
bool isInShowerPhasespace() const
Return true, if this configuration is in the shower phase space.
virtual void clearKinematics()
Clear the information previously provided by a call to setKinematics(...).
virtual bool canHandleEmitter(const cPDVector &partons, int emitter) const =0
Return true, if this dipole can possibly handle the indicated emitter.
map< tcDiagPtr, tcDiagPtr > theRealToBornDiagrams
Map real emission diagrams to underlying Born diagrams.
void partnerDipoles(const vector< Ptr< SubtractionDipole >::tptr > &p)
Set the dipoles which have been found along with this dipole.
int theBornSpectator
The spectator as referred to by the underlying Born matrix element.
double alpha() const
Alpha parameter as in Nagy (http://arxiv.org/pdf/hep-ph/0307268v2.pdf) to restrict dipole phase space...
bool realShowerSubtraction() const
Return true, if the shower real emission contribution should be subtracted.
RealEmissionKey lastRealEmissionKey
The last real emission key encountered.
Energy lastPt() const
Return the relevant pt.
static int spectator(const RealEmissionKey &key)
Return the spectator id of a real emission key.
virtual int nDim() const
The number of internal degreed of freedom used in the matrix element.
UnderlyingBornKey lastUnderlyingBornKey
The last underlying Born key encountered.
Energy theLastSubtractionPt
The last pt as generated from the tilde mapping.
bool theSubtractionTest
True, if the subtraction is being tested.
Energy theLastSplittingScale
The last scale as generated from the splitting mapping.
Energy showerHardScale() const
Return the shower hard scale encountered.
double theLastSubtractionZ
The last z as generated from the tilde mapping.
virtual StdXCombPtr makeXComb(tStdXCombPtr newHead, const PBPair &newPartonBins, const DiagramVector &newDiagrams, tMEPtr newME=tMEPtr())
For the given event generation setup return a dependent xcomb object appropriate to this matrix eleme...
int theRealSpectator
The spectator as referred to by the real emission matrix element.
bool verbose() const
Return true, if verbose.
void doSplitting()
Switch on splitting mode for this dipole.
virtual int samplingZ() const
How to sample the z-distribution.
multimap< UnderlyingBornKey, RealEmissionInfo >::const_iterator lastRealEmissionInfo
The last real emission info encountered.
int theRealEmitter
The emitter as referred to by the real emission matrix element.
Ptr< MatchboxFactory >::tptr factory() const
Return the factory which produced this matrix element.
virtual Energy2 scale() const
Return the scale associated with the phase space point provided by the last call to setKinematics().
void doRealEmissionScales(bool on=true)
Switch on or off that scales should be calculated from real emission kinematics.
void realEmitter(int id)
Set the emitter as referred to by the real emission matrix element.
pair< RealEmissionKey, map< int, int > > RealEmissionInfo
Define real emission key and index dictionary for partons not involved in the given dipole.
Ptr< ShowerApproximation >::tptr showerApproximation() const
Return the shower approximation.
bool theRealEmissionScales
True, if scales should be calculated from real emission kinematics.
void cloneDependencies(const std::string &prefix="", bool slim=false)
Clone the dependencies, using a given prefix.
virtual StdXCombPtr makeXComb(Energy newMaxEnergy, const cPDPair &inc, tEHPtr newEventHandler, tSubHdlPtr newSubProcessHandler, tPExtrPtr newExtractor, tCascHdlPtr newCKKW, const PBPair &newPartonBins, tCutsPtr newCuts, const DiagramVector &newDiagrams, bool mir, const PartonPairVec &allPBins, tStdXCombPtr newHead=tStdXCombPtr(), tMEPtr newME=tMEPtr())
For the given event generation setup return a xcomb object appropriate to this matrix element.
virtual ~SubtractionDipole()
The destructor.
virtual bool wantCMS() const
Return true, if this matrix element expects the incoming partons in their center-of-mass system.
CrossSection prefactor(Energy2 factorizationScale) const
calculate the general prefactor for merging.
virtual Selector< const ColourLines * > colourGeometries(tcDiagPtr diag) const
Return a Selector with possible colour geometries for the selected diagram weighted by their relative...
const DiagramVector & underlyingBornDiagrams(const cPDVector &real) const
Return the underlying Born diagrams to be considered for the given real emission process.
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
virtual void setKinematics()
Set the typed and momenta of the incoming and outgoing partons to be used in subsequent calls to me()...
virtual void constructVertex(tSubProPtr sub, const ColourLines *cl)
construct the spin information for the interaction
void clearBookkeeping()
Clear the bookkeeping.
pair< cPDVector, pair< int, int > > UnderlyingBornKey
Define the underlying Born key type.
CrossSection ps(Energy2 factorizationScale, Ptr< ColourBasis >::tptr largeNBasis) const
Calculate the parton shower approximation for this dipole.
virtual bool canHandleSpectator(const cPDVector &partons, int spectator) const =0
Return true, if this dipole can possibly handle the indicated spectator.
Ptr< MatchboxMEBase >::tcptr underlyingBornME() const
Return the underlying Born matrix element.
void addReweight(Ptr< MatchboxReweightBase >::ptr rw)
Insert a reweight object.
void realSpectator(int id)
Set the spectator as referred to by the real emission matrix element.
virtual bool havePDFWeight2() const
Return true, if this matrix element provides the PDF weight for the second incoming parton itself.
virtual void setXComb(tStdXCombPtr xc)
Set the XComb object to be used in the next call to generateKinematics() and dSigHatDR().
const map< RealEmissionKey, UnderlyingBornInfo > & mergingMap() const
Return the merging map.
tcDiagPtr realEmissionDiagram(tcDiagPtr bornDiag) const
Find the real emission diagram for the given underlying Born diagram.
virtual Selector< DiagramIndex > diagrams(const DiagramVector &dv) const
With the information previously supplied with the setKinematics(...) method, a derived class may opti...
double theLastSplittingZ
The last z as generated from the splitting mapping.
Energy theLastSubtractionScale
The last scale as generated from the tilde mapping.
virtual CrossSection dSigHatDR() const
Return the matrix element squared differential in the variables given by the last call to generateKin...
const vector< Ptr< MatchboxReweightBase >::ptr > & reweights() const
Return the reweight objects.
static const cPDVector & process(const UnderlyingBornKey &key)
Return the diagram of a underlying Born key.
Ptr< MatchboxMEBase >::tcptr realEmissionME() const
Return the real emission matrix element.
virtual void getDiagrams() const
Add all possible diagrams with the add() function.
vector< double > theShowerParameters
The shower splitting variables encountered.
pair< pair< cPDVector, int >, pair< int, int > > RealEmissionKey
Define the real emission key type.
map< cPDVector, pair< int, int > > theIndexMap
Map underlying Born diagrams to emitter/spectator pairs.
bool theIgnoreCuts
True if cuts should be ignored.
bool theSplitting
Wether or not this dipole acts in splitting mode.
virtual CrossSection dSigHatDR(Energy2 factorizationScale) const
Return the matrix element squared differential in the variables given by the last call to generateKin...
vector< Ptr< SubtractionDipole >::tptr > thePartners
The dipoles which have been found along with this dipole.
Ptr< MatchboxMEBase >::ptr theUnderlyingBornME
The underlying Born matrix element.
double lastZ() const
Return the relevant momentum fractions.
int realEmission() const
Return the emission as referred to by the real emission matrix element.
void doSubtraction()
Switch off splitting mode for this dipole.
virtual int nDimRadiation() const
Return the number of additional random numbers needed to generate real emission kinematics off the ti...
bool testSubtraction() const
Return true, if the subtraction is being tested.
void showerApproximation(Ptr< ShowerApproximation >::tptr app)
Set the shower approximation.
map< cPDVector, DiagramVector > theUnderlyingBornDiagrams
Map real emission processes to Born diagrams.
Energy theShowerHardScale
Return the shower hard scale encountered.
virtual IBPtr clone() const=0
vector< DiagPtr > DiagramVector
-*- C++ -*-
pair< cPDPtr, cPDPtr > cPDPair
ThePEG::Ptr< PartonExtractor >::transient_pointer tPExtrPtr
ThePEG::Ptr< SubProcess >::transient_pointer tSubProPtr
ThePEG::Ptr< CascadeHandler >::transient_pointer tCascHdlPtr
constexpr ZeroUnit ZERO
ThePEG::Ptr< EventHandler >::transient_pointer tEHPtr
vector< cPDPtr > cPDVector
A helpre struct to communicate diagram merging and remapping information.
Ptr< Tree2toNDiagram >::ptr diagram
The Born diagram.
map< int, int > mergeLegs
The merging map.