herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
MatchboxMEBase.h
1// -*- C++ -*-
2//
3// MatchboxMEBase.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_MatchboxMEBase_H
10#define HERWIG_MatchboxMEBase_H
11//
12// This is the declaration of the MatchboxMEBase class.
13//
14
15#include "ThePEG/MatrixElement/MEBase.h"
16#include "Herwig/MatrixElement/Matchbox/Utility/SpinCorrelationTensor.h"
17#include "Herwig/MatrixElement/Matchbox/Utility/Tree2toNGenerator.h"
18#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
19#include "Herwig/MatrixElement/Matchbox/Utility/ProcessData.h"
20#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
21#include "Herwig/MatrixElement/Matchbox/Base/MatchboxReweightBase.h"
22#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.fh"
23#include "Herwig/MatrixElement/Matchbox/Base/MergerBase.h"
24#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.fh"
25#include "Herwig/MatrixElement/Matchbox/InsertionOperators/MatchboxInsertionOperator.h"
26#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.fh"
27#include "Herwig/MatrixElement/Matchbox/Utility/LastMatchboxXCombInfo.h"
28#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxXComb.h"
29
30namespace Herwig {
31
32using namespace ThePEG;
33
45 public MEBase, public LastMatchboxXCombInfo {
46
47public:
48
53
54public:
55
59 Ptr<MatchboxFactory>::tptr factory() const;
60
63
67 const Process& subProcess() const { return theSubprocess; }
68
73
77 Ptr<Tree2toNGenerator>::tptr diagramGenerator() const;
78
82 Ptr<ProcessData>::tptr processData() const;
83
91 virtual bool noMirror () const { return true; }
92
96 virtual void getDiagrams() const;
98
106 using MEBase::diagrams;
107
113 colourGeometries(tcDiagPtr diag) const;
114
119 virtual bool canFillRhoMatrix() const {
120 if ( matchboxAmplitude() )
121 return matchboxAmplitude()->canFillRhoMatrix();
122 return false;
123 }
124
129
133 virtual void constructVertex(tSubProPtr sub, const ColourLines* cl);
134
139 virtual unsigned int orderInAlphaS() const;
141
146 virtual unsigned int orderInAlphaEW() const;
148
153 virtual bool hasInitialAverage() const {
154 return matchboxAmplitude() ? matchboxAmplitude()->hasInitialAverage() : false;
155 }
156
161 virtual bool hasFinalStateSymmetry() const {
162 return matchboxAmplitude() ? matchboxAmplitude()->hasFinalStateSymmetry() : false;
163 }
164
165
170 virtual unsigned int getNLight() const;
171
177 virtual vector<long> getNLightJetVec() const;
178
184 virtual vector<long> getNHeavyJetVec() const;
185
191 virtual vector<long> getNLightProtonVec() const;
192
196 virtual bool isOLPTree() const {
197 return matchboxAmplitude() ? matchboxAmplitude()->isOLPTree() : false;
198 }
199
203 virtual bool isOLPLoop() const {
204 return matchboxAmplitude() ? matchboxAmplitude()->isOLPLoop() : false;
205 }
206
211 virtual bool needsOLPCorrelators() const {
212 return matchboxAmplitude() ? matchboxAmplitude()->needsOLPCorrelators() : true;
213 }
214
218 const vector<int>& olpProcess() const { return theOLPProcess; }
219
223 void olpProcess(int pType, int id) {
224 if ( theOLPProcess.empty() )
225 theOLPProcess.resize(5,0);
226 theOLPProcess[pType] = id;
227 }
228
233 bool noCorrelations() const {
234 return theNoCorrelations;
235 }
236
242 theNoCorrelations = true;
243 }
244
250 theNoCorrelations = false;
251 }
252
254
257
261 Ptr<MatchboxPhasespace>::tptr phasespace() const { return thePhasespace; }
262
266 void phasespace(Ptr<MatchboxPhasespace>::ptr ps) { thePhasespace = ps; }
267
272 virtual void setXComb(tStdXCombPtr xc);
273
279 virtual bool keepRandomNumbers() const { return true; }
280
289 double generateIncomingPartons(const double* r1, const double* r2);
290
301 virtual bool generateKinematics(const double * r);
302
310 virtual void setKinematics();
311
316 virtual void clearKinematics();
317
322 virtual int nDim() const;
323
328 virtual int nDimBorn() const;
329
338 virtual bool haveX1X2() const {
339 return
340 (phasespace() ? phasespace()->haveX1X2() : false) ||
341 diagrams().front()->partons().size() == 3;
342 }
343
348 virtual bool wantCMS() const {
349 return
350 (phasespace() ? phasespace()->wantCMS() : true) &&
351 diagrams().front()->partons().size() != 3; }
352
357 const vector<Lorentz5Momentum>& lastMEMomenta() const { return meMomenta(); }
358
362 vector<Lorentz5Momentum>& lastMEMomenta() { return meMomenta(); }
363
364
369 int legsize() const {return int(meMomenta().size());}
370
372
375
379 void scaleChoice(Ptr<MatchboxScaleChoice>::ptr sc) { theScaleChoice = sc; }
380
384 Ptr<MatchboxScaleChoice>::tptr scaleChoice() const { return theScaleChoice; }
385
389 void setScale(Energy2 ren=ZERO,Energy2 fac=ZERO) const;
390
394 virtual bool hasRunningAlphaS() const {
395 if ( matchboxAmplitude() )
396 return matchboxAmplitude()->hasRunningAlphaS();
397 return false;
398 }
399
403 virtual bool hasRunningAlphaEW() const {
404 if ( matchboxAmplitude() )
405 return matchboxAmplitude()->hasRunningAlphaEW();
406 return false;
407 }
408
413 virtual Energy2 scale() const { return lastScale(); }
414
418 virtual Energy2 factorizationScale() const;
419
423 virtual double factorizationScaleFactor() const;
424
425
429 virtual double facFac() const{return factorizationScaleFactor();}
430
434 virtual Energy2 renormalizationScale() const;
435
439 virtual double renormalizationScaleFactor() const;
440
441
445 virtual double renFac() const{return renormalizationScaleFactor();}
446
450 virtual Energy2 renormalizationScaleQED() const;
451
455 virtual Energy2 showerScale() const;
456
462 virtual void setVetoScales(tSubProPtr) const;
463
467 bool fixedCouplings() const;
468
472 bool fixedQEDCouplings() const;
473
479 virtual double alphaS() const { return lastAlphaS(); }
480
486 virtual double alphaEM() const { return lastAlphaEM(); }
487
492 virtual bool havePDFWeight1() const;
493
498 virtual bool havePDFWeight2() const;
499
503 void getPDFWeight(Energy2 factorizationScale = ZERO) const;
504
508 double pdf1(Energy2 factorizationScale = ZERO,
509 double xEx = 1., double xFactor = 1.) const;
510
514 double pdf2(Energy2 factorizationScale = ZERO,
515 double xEx = 1., double xFactor = 1.) const;
516
518
521
525 Ptr<MatchboxAmplitude>::tptr matchboxAmplitude() const { return theAmplitude; }
526
530 void matchboxAmplitude(Ptr<MatchboxAmplitude>::ptr amp) { theAmplitude = amp; }
531
537 virtual double me2() const;
538
544 virtual double largeNME2(Ptr<ColourBasis>::tptr largeNBasis) const;
545
549 virtual double finalStateSymmetry() const;
550
555 double me2Norm(unsigned int addAlphaS = 0) const;
556
561 virtual CrossSection dSigHatDR() const;
562
566 CrossSection prefactor()const;
567
571 CrossSection dSigHatDRB() const ;
572
576 CrossSection dSigHatDRV() const ;
577
581 CrossSection dSigHatDRI() const ;
582
588 CrossSection dSigHatDRAlphaDiff(double alpha) const ;
589
590
592
595
599 virtual double oneLoopInterference() const;
600
605 virtual bool haveOneLoop() const;
606
611 virtual bool onlyOneLoop() const;
612
617 virtual bool isDRbar() const;
618
625 virtual bool isDR() const;
626
631 virtual bool isCS() const;
632
637 virtual bool isBDK() const;
638
643 virtual bool isExpanded() const;
644
650 virtual Energy2 mu2() const;
651
655 virtual double oneLoopDoublePole() const;
656
660 virtual double oneLoopSinglePole() const;
661
665 bool checkPoles() const;
666
671
675 double lower;
676
680 double upper;
681
685 map<double,double> bins;
686
690 unsigned long sameSign;
691
695 unsigned long oppositeSign;
696
700 unsigned long nans;
701
705 unsigned long overflow;
706
710 unsigned long underflow;
711
715 AccuracyHistogram(double low = -40.,
716 double up = 0.,
717 unsigned int nbins = 80);
718
722 void book(double a, double b);
723
727 void dump(const std::string& folder, const std::string& prefix,
728 const cPDVector& proc) const;
729
734
739
740 };
741
745 void logPoles() const;
746
750 const vector<Ptr<MatchboxInsertionOperator>::ptr>& virtuals() const {
751 return theVirtuals;
752 }
753
757 vector<Ptr<MatchboxInsertionOperator>::ptr>& virtuals() {
758 return theVirtuals;
759 }
760
764 void doOneLoop() { theOneLoop = true; }
765
770 void noOneLoop() { theOneLoop = false; }
771
775 bool oneLoop() const { return theOneLoop; }
776
781 void doOneLoopNoBorn() { theOneLoop = true; theOneLoopNoBorn = true; }
782
783 void noOneLoopNoBorn() { theOneLoop = false; theOneLoopNoBorn = false; }
784
789 bool oneLoopNoBorn() const { return theOneLoopNoBorn || onlyOneLoop(); }
790
796
801 bool oneLoopNoLoops() const { return theOneLoopNoLoops; }
802
804
807
815 vector<Ptr<SubtractionDipole>::ptr>
816 getDipoles(const vector<Ptr<SubtractionDipole>::ptr>&,
817 const vector<Ptr<MatchboxMEBase>::ptr>&,bool slim=false) const;
818
819
827 virtual bool noDipole(int,int,int) const { return false; }
828
836 virtual bool noDipole(int,int) const { return false; }
837
843 virtual double colourCorrelatedME2(pair<int,int>) const;
844
851 virtual double largeNColourCorrelatedME2(pair<int,int> ij,
852 Ptr<ColourBasis>::tptr largeNBasis) const;
853
859 virtual double spinColourCorrelatedME2(pair<int,int> emitterSpectator,
860 const SpinCorrelationTensor& c) const;
861
867 virtual double spinCorrelatedME2(pair<int,int> emitterSpectator,
868 const SpinCorrelationTensor& c) const;
869
871
874
880 virtual void flushCaches();
881
885 bool verbose() const;
886
890 bool initVerbose() const;
891
895 void print(ostream&) const;
896
900 virtual void printLastEvent(ostream&) const;
901
906 void logGenerateKinematics(const double * r) const;
907
912 void logSetScale() const;
913
918 void logPDFWeight() const;
919
924 void logME2() const;
925
930 void logDSigHatDR() const;
931
933
936
940 void addReweight(Ptr<MatchboxReweightBase>::ptr rw) { theReweights.push_back(rw); }
941
945 const vector<Ptr<MatchboxReweightBase>::ptr>& reweights() const { return theReweights; }
946
950 vector<Ptr<MatchboxReweightBase>::ptr>& reweights() { return theReweights; }
951
955 const MergerBasePtr merger() const;
956
960 MergerBasePtr merger() ;
961
965 void merger(MergerBasePtr v);
966
968
971
978 virtual bool preInitialize() const { return true; }
979
983 Ptr<MatchboxMEBase>::ptr cloneMe() const {
984 return dynamic_ptr_cast<Ptr<MatchboxMEBase>::ptr>(clone());
985 }
986
990 void cloneDependencies(const std::string& prefix = "",bool slim = false );
991
996
1001 virtual StdXCombPtr makeXComb(Energy newMaxEnergy, const cPDPair & inc,
1002 tEHPtr newEventHandler,tSubHdlPtr newSubProcessHandler,
1003 tPExtrPtr newExtractor, tCascHdlPtr newCKKW,
1004 const PBPair & newPartonBins, tCutsPtr newCuts,
1005 const DiagramVector & newDiagrams, bool mir,
1006 const PartonPairVec& allPBins,
1007 tStdXCombPtr newHead = tStdXCombPtr(),
1008 tMEPtr newME = tMEPtr());
1009
1014 virtual StdXCombPtr makeXComb(tStdXCombPtr newHead,
1015 const PBPair & newPartonBins,
1016 const DiagramVector & newDiagrams,
1017 tMEPtr newME = tMEPtr());
1018
1020
1021public:
1022
1030
1036 void persistentInput(PersistentIStream & is, int version);
1038
1045 static void Init();
1046
1047protected:
1048
1055 virtual IBPtr clone() const;
1056
1061 virtual IBPtr fullclone() const;
1063
1064protected:
1065
1073 virtual void doinit();
1074
1079 virtual void doinitrun();
1080
1085 virtual void dofinish();
1087
1088private:
1089
1093 Ptr<MatchboxPhasespace>::ptr thePhasespace;
1094
1098 Ptr<MatchboxAmplitude>::ptr theAmplitude;
1099
1103 Ptr<MatchboxScaleChoice>::ptr theScaleChoice;
1104
1108 vector<Ptr<MatchboxInsertionOperator>::ptr> theVirtuals;
1109
1114 vector<Ptr<MatchboxReweightBase>::ptr> theReweights;
1115
1116private:
1117
1122
1127
1133
1139
1143 vector<int> theOLPProcess;
1144
1148 mutable map<cPDVector,AccuracyHistogram> epsilonSquarePoleHistograms;
1149
1153 mutable map<cPDVector,AccuracyHistogram> epsilonPoleHistograms;
1154
1160
1164 mutable pair<bool,bool> theHavePDFs;
1165
1169 mutable bool checkedPDFs;
1170
1176 MergerBasePtr theMerger;
1177
1178
1179private:
1180
1186
1187};
1188
1191 h.persistentOutput(os);
1192 return os;
1193}
1194
1196 MatchboxMEBase::AccuracyHistogram& h) {
1197 h.persistentInput(is);
1198 return is;
1199}
1200
1201}
1202
1203#endif /* HERWIG_MatchboxMEBase_H */
Provide easy access to MatchboxXComb XComb extensions.
MatchboxMEBase is the base class for matrix elements in the context of the matchbox NLO interface.
virtual void getDiagrams() const
Add all possible diagrams with the add() function.
bool theOneLoopNoLoops
True, if this matrix element includes one-loop corrections but no actual loop contributions (e....
void doOneLoopNoLoops()
Instruct this matrix element to include one-loop corrections but no actual loop contributions.
void setScale(Energy2 ren=ZERO, Energy2 fac=ZERO) const
Set scales and alphaS.
CrossSection dSigHatDRV() const
Virtual corrections of the cross section.
virtual unsigned int orderInAlphaEW() const
Return the order in in which this matrix element is given.
virtual unsigned int getNLight() const
Return the number of light flavours, this matrix element is calculated for.
CrossSection dSigHatDRAlphaDiff(double alpha) const
If diffAlpha is not 1 and the matrix element has insertion operators this routine adds the difference...
virtual double oneLoopInterference() const
Return the one-loop/tree interference.
bool initVerbose() const
Return true, if verbose.
bool fixedCouplings() const
Return true, if fixed couplings are used.
Ptr< Tree2toNGenerator >::tptr diagramGenerator() const
Return the diagram generator.
virtual void flushCaches()
Inform this matrix element that a new phase space point is about to be generated, so all caches shoul...
virtual void setKinematics()
Set the typed and momenta of the incoming and outgoing partons to be used in subsequent calls to me()...
bool oneLoopNoLoops() const
Return true, if this matrix element includes one-loop corrections but no actual loop contributions.
virtual double alphaEM() const
Return the value of associated with the phase space point provided by the last call to setKinematics...
vector< Lorentz5Momentum > & lastMEMomenta()
Access the meMomenta.
virtual void setVetoScales(tSubProPtr) const
Set veto scales on the particles at the given SubProcess which has been generated using this matrix e...
void logSetScale() const
Write out diagnostic information for setting scales.
virtual unsigned int orderInAlphaS() const
Return the order in in which this matrix element is given.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
bool verbose() const
Return true, if verbose.
vector< Ptr< MatchboxInsertionOperator >::ptr > & virtuals()
Return the virtual corrections.
void cloneDependencies(const std::string &prefix="", bool slim=false)
Clone the dependencies, using a given prefix.
bool fixedQEDCouplings() const
Return true, if fixed couplings are used.
const Process & subProcess() const
Return the subprocess.
virtual void constructVertex(tSubProPtr sub, const ColourLines *cl)
construct the spin information for the interaction
virtual Selector< const ColourLines * > colourGeometries(tcDiagPtr diag) const
Return a Selector with possible colour geometries for the selected diagram weighted by their relative...
virtual bool preInitialize() const
Return true if this object needs to be initialized before all other objects (except those for which t...
virtual double alphaS() const
Return the value of associated with the phase space point provided by the last call to setKinematics...
virtual bool isDRbar() const
Return true, if the amplitude is DRbar renormalized, otherwise MSbar is assumed.
virtual bool hasFinalStateSymmetry() const
Return true, if this amplitude already includes symmetry factors for identical outgoing particles.
void olpProcess(int pType, int id)
Set the process index, if this is an OLP handled matrix element.
virtual double oneLoopSinglePole() const
If defined, return the coefficient of the pole in epsilon.
virtual bool hasInitialAverage() const
Return true, if this amplitude already includes averaging over incoming parton's quantum numbers.
virtual Energy2 showerScale() const
Return the shower scale for the last generated phasespace point.
virtual bool needsOLPCorrelators() const
Return true, if colour and spin correlated matrix elements should be ordered from the OLP.
virtual bool noMirror() const
Return true, if this matrix element does not want to make use of mirroring processes; in this case al...
virtual vector< long > getNHeavyJetVec() const
Return the vector that contains the PDG ids of the heavy flavours, which are contained in the jet par...
Ptr< MatchboxScaleChoice >::ptr theScaleChoice
The scale choice object.
virtual bool isDR() const
Return true, if one loop corrections have been calculated in dimensional reduction.
void print(ostream &) const
Dump the setup to an ostream.
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
virtual double largeNME2(Ptr< ColourBasis >::tptr largeNBasis) const
Return the matrix element for the kinematical configuation previously provided by the last call to se...
virtual bool keepRandomNumbers() const
Return true, if the XComb steering this matrix element should keep track of the random numbers used t...
bool theOneLoop
True, if this matrix element includes one-loop corrections.
void logDSigHatDR() const
Write out diagnostic information for dsigdr evaluation.
virtual double largeNColourCorrelatedME2(pair< int, int > ij, Ptr< ColourBasis >::tptr largeNBasis) const
Return the colour correlated matrix element squared in the large-N approximation with respect to the ...
virtual Selector< DiagramIndex > diagrams(const DiagramVector &) const
With the information previously supplied with the setKinematics(...) method, a derived class may opti...
virtual double renormalizationScaleFactor() const
Get the renormalization scale factor.
virtual vector< long > getNLightJetVec() const
Return the vector that contains the PDG ids of the light flavours, which are contained in the jet par...
void doOneLoop()
Instruct this matrix element to include one-loop corrections.
Process & subProcess()
Access the subprocess.
Ptr< MatchboxAmplitude >::tptr matchboxAmplitude() const
Return the amplitude.
Ptr< MatchboxMEBase >::ptr cloneMe() const
Clone this matrix element.
virtual bool isBDK() const
Return true, if one loop corrections are given in the conventions of BDK.
bool noCorrelations() const
Return true, if this is a real emission matrix element which does not require colour correlators.
void doOneLoopNoBorn()
Instruct this matrix element to include one-loop corrections but no Born contributions.
Ptr< MatchboxPhasespace >::tptr phasespace() const
Return the phase space generator to be used.
bool theNoCorrelations
True, if this is a real emission matrix element which does not require colour correlators.
virtual bool canFillRhoMatrix() const
Return true, if this amplitude is capable of consistently filling the rho matrices for the spin corre...
const vector< Ptr< MatchboxReweightBase >::ptr > & reweights() const
Return the reweights.
virtual Energy2 renormalizationScaleQED() const
Return the QED renormalization scale for the last generated phasespace point.
const vector< Lorentz5Momentum > & lastMEMomenta() const
Return the meMomenta as generated at the last phase space point.
virtual int nDim() const
The number of internal degreed of freedom used in the matrix element.
void logGenerateKinematics(const double *r) const
Write out diagnostic information for generateKinematics.
virtual bool generateKinematics(const double *r)
Generate internal degrees of freedom given nDim() uniform random numbers in the interval ]0,...
CrossSection dSigHatDRI() const
Insertion operators of the cross section.
virtual double oneLoopDoublePole() const
If defined, return the coefficient of the pole in epsilon^2.
virtual void printLastEvent(ostream &) const
Print debug information on the last event.
virtual double finalStateSymmetry() const
Return the symmetry factor for identical final state particles.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
virtual bool isCS() const
Return true, if one loop corrections are given in the conventions of the integrated dipoles.
virtual Energy2 scale() const
Return the scale associated with the phase space point provided by the last call to setKinematics().
virtual Energy2 factorizationScale() const
Return the renormalization scale for the last generated phasespace point.
virtual double spinColourCorrelatedME2(pair< int, int > emitterSpectator, const SpinCorrelationTensor &c) const
Return the colour and spin correlated matrix element squared for the gluon indexed by the first argum...
MergerBasePtr theMerger
The merging helper to be used.
int legsize() const
leg size
virtual bool hasRunningAlphaS() const
Indicate that this matrix element is running alphas by itself.
map< cPDVector, AccuracyHistogram > epsilonPoleHistograms
Histograms of epsilon pole cancellation.
void matchboxAmplitude(Ptr< MatchboxAmplitude >::ptr amp)
Set the amplitude.
virtual double renFac() const
Get the renormalization scale factor.
virtual bool isExpanded() const
Return true, if one loop corrections are given in the conventions of everything expanded.
virtual double facFac() const
Get the factorization scale factor.
virtual vector< long > getNLightProtonVec() const
Return the vector that contains the PDG ids of the light flavours, which are contained in the proton ...
virtual void setXComb(tStdXCombPtr xc)
Set the XComb object to be used in the next call to generateKinematics() and dSigHatDR().
virtual int nDimBorn() const
The number of internal degrees of freedom used in the matrix element for generating a Born phase spac...
MatchboxMEBase & operator=(const MatchboxMEBase &)=delete
The assignment operator is private and must never be called.
virtual double spinCorrelatedME2(pair< int, int > emitterSpectator, const SpinCorrelationTensor &c) const
Return the spin correlated matrix element squared for the vector boson indexed by the first argument ...
virtual bool noDipole(int, int, int) const
If this matrix element is considered a real emission matrix element, but actually neglecting a subcla...
void merger(MergerBasePtr v)
Set the theMerger.
virtual bool havePDFWeight2() const
Return true, if this matrix element provides the PDF weight for the second incoming parton itself.
virtual IBPtr clone() const
Make a simple clone of this object.
void addReweight(Ptr< MatchboxReweightBase >::ptr rw)
Insert a reweight object.
virtual bool isOLPLoop() const
Return true, if this matrix element is handled by a BLHA one-loop provider.
MatchboxMEBase()
The default constructor.
bool oneLoop() const
Return true, if this matrix element includes one-loop corrections.
const vector< Ptr< MatchboxInsertionOperator >::ptr > & virtuals() const
Return the virtual corrections.
virtual void doinitrun()
Initialize this object.
virtual bool haveX1X2() const
Return true, if this matrix element will generate momenta for the incoming partons itself.
double me2Norm(unsigned int addAlphaS=0) const
Return the normalizing factor for the matrix element averaged over quantum numbers and including runn...
virtual bool onlyOneLoop() const
Return true, if this matrix element only provides one-loop (QCD) corrections.
pair< bool, bool > theHavePDFs
Flag which pdfs should be included.
CrossSection prefactor() const
Same prefactor for all dSigHat.
double generateIncomingPartons(const double *r1, const double *r2)
Generate incoming parton momenta.
Ptr< MatchboxFactory >::tptr factory() const
Return the factory which produced this matrix element.
map< cPDVector, AccuracyHistogram > epsilonSquarePoleHistograms
Histograms of epsilon^2 pole cancellation.
virtual double factorizationScaleFactor() const
Get the factorization scale factor.
bool oneLoopNoBorn() const
Return true, if this matrix element includes one-loop corrections but no Born contributions.
void scaleChoice(Ptr< MatchboxScaleChoice >::ptr sc)
Set the scale choice object.
virtual void constructVertex(tSubProPtr)
construct the spin information for the interaction
virtual double me2() const
Return the matrix element for the kinematical configuation previously provided by the last call to se...
vector< Ptr< SubtractionDipole >::ptr > getDipoles(const vector< Ptr< SubtractionDipole >::ptr > &, const vector< Ptr< MatchboxMEBase >::ptr > &, bool slim=false) const
If this matrix element is considered a real emission matrix element, return all subtraction dipoles n...
void needsCorrelations()
Indicate that this is a virtual matrix element which does require colour correlators.
double pdf1(Energy2 factorizationScale=ZERO, double xEx=1., double xFactor=1.) const
Supply the PDF weight for the first incoming parton.
void prepareXComb(MatchboxXCombData &) const
Prepare an xcomb.
virtual bool noDipole(int, int) const
If this matrix element is considered an underlying Born matrix element in the context of a subtracted...
Ptr< MatchboxPhasespace >::ptr thePhasespace
The phase space generator to be used.
Ptr< MatchboxAmplitude >::ptr theAmplitude
The amplitude to be used.
virtual Energy2 renormalizationScale() const
Return the (QCD) renormalization scale for the last generated phasespace point.
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...
void needsNoCorrelations()
Indicate that this is a real emission matrix element which does not require colour correlators.
virtual bool havePDFWeight1() const
Return true, if this matrix element provides the PDF weight for the first incoming parton itself.
virtual CrossSection dSigHatDR() const
Return the matrix element squared differential in the variables given by the last call to generateKin...
virtual bool wantCMS() const
Return true, if this matrix element expects the incoming partons in their center-of-mass system.
virtual void clearKinematics()
Clear the information previously provided by a call to setKinematics(...).
static void Init()
The standard Init function used to initialize the interfaces.
virtual bool haveOneLoop() const
Return true, if this matrix element is capable of calculating one-loop (QCD) corrections.
CrossSection dSigHatDRB() const
Born part of the cross section.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
bool checkedPDFs
True, if already checked for which PDFs to include.
MergerBasePtr merger()
Return the theMerger.
const MergerBasePtr merger() const
Return the theMerger.
vector< int > theOLPProcess
The process index, if this is an OLP handled matrix element.
void noOneLoop()
Instruct this matrix element not to include one-loop corrections.
virtual bool hasRunningAlphaEW() const
Indicate that this matrix element is running alphaew by itself.
vector< Ptr< MatchboxReweightBase >::ptr > & reweights()
Access the reweights.
virtual double colourCorrelatedME2(pair< int, int >) const
Return the colour correlated matrix element squared with respect to the given two partons as appearin...
void phasespace(Ptr< MatchboxPhasespace >::ptr ps)
Set the phase space generator to be used.
virtual void dofinish()
Finalize this object.
const vector< int > & olpProcess() const
Return the process index, if this is an OLP handled matrix element.
virtual bool isOLPTree() const
Return true, if this matrix element is handled by a BLHA one-loop provider.
Ptr< MatchboxScaleChoice >::tptr scaleChoice() const
Return the scale choice object.
vector< Ptr< MatchboxInsertionOperator >::ptr > theVirtuals
The virtual corrections.
void logPDFWeight() const
Write out diagnostic information for pdf evaluation.
virtual Energy2 mu2() const
Return the value of the dimensional regularization parameter.
void getPDFWeight(Energy2 factorizationScale=ZERO) const
Set the PDF weight.
Ptr< ProcessData >::tptr processData() const
Return the process data.
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.
bool theOneLoopNoBorn
True, if this matrix element includes one-loop corrections but no Born contributions.
void logME2() const
Write out diagnostic information for me2 evaluation.
double pdf2(Energy2 factorizationScale=ZERO, double xEx=1., double xFactor=1.) const
Supply the PDF weight for the second incoming parton.
void logPoles() const
Perform the check of epsilon pole cancellation.
bool checkPoles() const
Return true, if cancellationn of epsilon poles should be checked.
vector< Ptr< MatchboxReweightBase >::ptr > theReweights
A vector of reweight objects the sum of which should be applied to reweight this matrix element.
Process theSubprocess
The subprocess to be considered.
Matchbox extensions to StandardXComb.
SpinCorrelationTensor represents a spin correlation tensor of the form.
virtual unsigned int orderInAlphaEW() const=0
vector< Lorentz5Momentum > & meMomenta()
const DiagramVector & diagrams() const
virtual unsigned int orderInAlphaS() const=0
virtual void getDiagrams() const=0
vector< DiagPtr > DiagramVector
-*- C++ -*-
PersistentIStream & operator>>(PersistentIStream &is, HandlerGroup< HDLR > &hg)
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
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
ostream & operator<<(ostream &, const Collision &)
ThePEG::Ptr< EventHandler >::transient_pointer tEHPtr
vector< cPDPtr > cPDVector
Simple histogram for accuracy checks.
void persistentInput(PersistentIStream &)
Read from persistent istream.
void persistentOutput(PersistentOStream &) const
Write to persistent ostream.
unsigned long oppositeSign
The number of points of opposite sign.
void book(double a, double b)
Book two values to be checked for numerical compatibility.
map< double, double > bins
The bins, indexed by upper bound.
unsigned long sameSign
The number of points of same sign.
AccuracyHistogram(double low=-40., double up=0., unsigned int nbins=80)
Constructor.
unsigned long underflow
The underflow.
unsigned long nans
The number of points being nan or inf.
void dump(const std::string &folder, const std::string &prefix, const cPDVector &proc) const
Write to file.
Process information with coupling order.