herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
MatchboxHybridAmplitude.h
1// -*- C++ -*-
2//
3// MatchboxHybridAmplitude.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_MatchboxHybridAmplitude_H
10#define Herwig_MatchboxHybridAmplitude_H
11//
12// This is the declaration of the MatchboxHybridAmplitude class.
13//
14
15#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
16
17namespace Herwig {
18
19using namespace ThePEG;
20
32
33public:
34
39
40public:
41
45 Ptr<MatchboxAmplitude>::tptr treeLevelAmplitude() const { return theTreeLevelAmplitude; }
46
50 void treeLevelAmplitude(Ptr<MatchboxAmplitude>::tptr amp) { theTreeLevelAmplitude = amp; }
51
55 virtual Ptr<MatchboxAmplitude>::tptr oneLoopAmplitude() const { return theOneLoopAmplitude; }
56
60 void oneLoopAmplitude(Ptr<MatchboxAmplitude>::tptr amp) { theOneLoopAmplitude = amp; }
61
66 bool isConsistent() const;
67
68public:
69
72
76 virtual bool canHandle(const PDVector& p,
77 Ptr<MatchboxFactory>::tptr f,
78 bool virt) const;
79
84 virtual int nDimAdditional() const {
85 if ( !oneLoopAmplitude() )
86 return treeLevelAmplitude()->nDimAdditional();
87 return
88 treeLevelAmplitude()->nDimAdditional() ?
89 treeLevelAmplitude()->nDimAdditional() :
90 oneLoopAmplitude()->nDimAdditional();
91 }
92
97 virtual Ptr<MatchboxMEBase>::ptr makeME(const PDVector& p) const {
98 return treeLevelAmplitude()->makeME(p);
99 }
100
105 virtual void orderInGs(unsigned int n) {
106 treeLevelAmplitude()->orderInGs(n);
107 if ( oneLoopAmplitude() )
108 oneLoopAmplitude()->orderInGs(n);
109 }
110
115 virtual unsigned int orderInGs() const {
116 return treeLevelAmplitude()->orderInGs();
117 }
118
123 virtual void orderInGem(unsigned int n) {
124 treeLevelAmplitude()->orderInGem(n);
125 if ( oneLoopAmplitude() )
126 oneLoopAmplitude()->orderInGem(n);
127 }
128
133 virtual unsigned int orderInGem() const {
134 return treeLevelAmplitude()->orderInGem();
135 }
136
141 virtual bool hasInitialAverage() const {
142 return treeLevelAmplitude()->hasInitialAverage();
143 }
144
149 virtual bool hasFinalStateSymmetry() const {
150 return treeLevelAmplitude()->hasFinalStateSymmetry();
151 }
152
156 virtual bool isOLPTree() const { return false; }
157
161 virtual bool isOLPLoop() const {
162 if ( !oneLoopAmplitude() )
163 return false;
164 return oneLoopAmplitude()->isOLPLoop();
165 }
166
171 virtual bool needsOLPCorrelators() const {
173 }
174
179 virtual bool startOLP(const map<pair<Process,int>,int>& procs) {
180 assert(oneLoopAmplitude());
181 return oneLoopAmplitude()->startOLP(procs);
182 }
183
188 virtual bool isExternal() const {
189 return treeLevelAmplitude()->isExternal();
190 }
191
195 virtual bool initializeExternal() {
196 return treeLevelAmplitude()->initializeExternal();
197 }
198
202 virtual int externalId(const cPDVector& proc) {
203 return treeLevelAmplitude()->externalId(proc);
204 }
205
207
210
214 virtual Ptr<ColourBasis>::tptr colourBasis() const {
215 return treeLevelAmplitude()->colourBasis();
216 }
217
222 virtual bool haveColourFlows() const {
223 return treeLevelAmplitude()->haveColourFlows();
224 }
225
230 virtual Selector<const ColourLines *> colourGeometries(tcDiagPtr diag) const {
231 return treeLevelAmplitude()->colourGeometries(diag);
232 }
233
235
238
242 virtual void setXComb(tStdXCombPtr xc) {
243 treeLevelAmplitude()->setXComb(xc);
244 if ( oneLoopAmplitude() )
245 oneLoopAmplitude()->setXComb(xc);
247 }
248
255 virtual void fillCrossingMap(size_t shift = 0) {
256 treeLevelAmplitude()->fillCrossingMap(shift);
257 }
258
260
263
268 virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
269
273 virtual double me2() const {
274 return treeLevelAmplitude()->me2();
275 }
276
280 virtual double largeNME2(Ptr<ColourBasis>::tptr largeNBasis) const {
281 return treeLevelAmplitude()->largeNME2(largeNBasis);
282 }
283
287 virtual double colourCorrelatedME2(pair<int,int> ij) const {
288 return
290 oneLoopAmplitude()->colourCorrelatedME2(ij) :
291 treeLevelAmplitude()->colourCorrelatedME2(ij);
292 }
293
297 virtual double largeNColourCorrelatedME2(pair<int,int> ij,
298 Ptr<ColourBasis>::tptr largeNBasis) const {
299 return treeLevelAmplitude()->largeNColourCorrelatedME2(ij,largeNBasis);
300 }
301
307 virtual LorentzVector<Complex> plusPolarization(const Lorentz5Momentum& p,
308 const Lorentz5Momentum& n,
309 int id = -1) const {
310 return
312 oneLoopAmplitude()->plusPolarization(p,n,id) :
313 treeLevelAmplitude()->plusPolarization(p,n,id);
314 }
315
319 virtual double spinColourCorrelatedME2(pair<int,int> emitterSpectator,
320 const SpinCorrelationTensor& c) const {
321 return
323 oneLoopAmplitude()->spinColourCorrelatedME2(emitterSpectator,c) :
324 treeLevelAmplitude()->spinColourCorrelatedME2(emitterSpectator,c);
325 }
326
330 virtual double spinCorrelatedME2(pair<int,int> emitterSpectator,
331 const SpinCorrelationTensor& c) const {
332 return
334 oneLoopAmplitude()->spinCorrelatedME2(emitterSpectator,c) :
335 treeLevelAmplitude()->spinCorrelatedME2(emitterSpectator,c);
336 }
337
342 virtual bool canFillRhoMatrix() const {
343 return treeLevelAmplitude()->canFillRhoMatrix();
344 }
345
350 virtual vector<unsigned int> physicalHelicities(const vector<int>& hel) const {
351 return treeLevelAmplitude()->physicalHelicities(hel);
352 }
353
357 virtual bool treeAmplitudes() const {
358 return treeLevelAmplitude()->treeAmplitudes();
359 }
360
365 virtual Complex evaluate(size_t a, const vector<int>& hel, Complex& largeN) {
366 return treeLevelAmplitude()->evaluate(a,hel,largeN);
367 }
368
370
373
377 virtual void disableOneLoop() { oneLoopAmplitude(Ptr<MatchboxAmplitude>::ptr()); }
378
383 virtual bool haveOneLoop() const { return oneLoopAmplitude(); }
384
389 virtual bool onlyOneLoop() const { return false; }
390
394 virtual bool oneLoopAmplitudes() const {
395 assert(oneLoopAmplitude());
396 return oneLoopAmplitude()->oneLoopAmplitudes();
397 }
398
403 virtual bool isDRbar() const {
404 assert(oneLoopAmplitude());
405 return oneLoopAmplitude()->isDRbar();
406 }
407
414 virtual bool isDR() const {
415 assert(oneLoopAmplitude());
416 return oneLoopAmplitude()->isDR();
417 }
418
423 virtual bool isCS() const {
424 assert(oneLoopAmplitude());
425 return oneLoopAmplitude()->isCS();
426 }
427
432 virtual bool isBDK() const {
433 assert(oneLoopAmplitude());
434 return oneLoopAmplitude()->isBDK();
435 }
436
441 virtual bool isExpanded() const {
442 assert(oneLoopAmplitude());
443 return oneLoopAmplitude()->isExpanded();
444 }
445
451 virtual Energy2 mu2() const {
452 assert(oneLoopAmplitude());
453 return oneLoopAmplitude()->mu2();
454 }
455
460 double symmetryRatio() const;
461
465 virtual bool hasRunningAlphaS() const {
466 return treeLevelAmplitude()->hasRunningAlphaS();
467 }
468
472 virtual bool hasRunningAlphaEW() const {
473 return treeLevelAmplitude()->hasRunningAlphaEW();
474 }
475
479 virtual double oneLoopDoublePole() const {
480 assert(oneLoopAmplitude());
481 return symmetryRatio()*oneLoopAmplitude()->oneLoopDoublePole();
482 }
483
487 virtual double oneLoopSinglePole() const {
488 assert(oneLoopAmplitude());
489 return symmetryRatio()*oneLoopAmplitude()->oneLoopSinglePole();
490 }
491
496 virtual void prepareOneLoopAmplitudes(Ptr<MatchboxMEBase>::tcptr);
497
501 virtual double oneLoopInterference() const {
502 assert(oneLoopAmplitude());
503 return symmetryRatio()*oneLoopAmplitude()->oneLoopInterference();
504 }
505
510 virtual Complex evaluateOneLoop(size_t a, const vector<int>& hel) {
511 assert(oneLoopAmplitude());
512 return oneLoopAmplitude()->evaluateOneLoop(a,hel);
513 }
514
516
519
523 virtual void flushCaches() {
524 treeLevelAmplitude()->flushCaches();
525 if ( oneLoopAmplitude() )
526 oneLoopAmplitude()->flushCaches();
527 }
528
532 virtual void cloneDependencies(const std::string& prefix= "" , bool slim=false);
534
535protected:
536
539
545 virtual void doinit();
546
551 virtual void doinitrun();
553
554public:
555
563
569 void persistentInput(PersistentIStream & is, int version);
571
578 static void Init();
579
580protected:
581
588 virtual IBPtr clone() const;
589
594 virtual IBPtr fullclone() const;
596
597
598// If needed, insert declarations of virtual function defined in the
599// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
600
601
602private:
603
607 Ptr<MatchboxAmplitude>::ptr theTreeLevelAmplitude;
608
612 Ptr<MatchboxAmplitude>::ptr theOneLoopAmplitude;
613
618
624
625};
626
627}
628
629#endif /* Herwig_MatchboxHybridAmplitude_H */
MatchboxXCombData * lastMatchboxXComb() const
Return a pointer to the last selected XComb.
MatchboxAmplitude is the base class for amplitude implementations inside Matchbox.
MatchboxHybridAmplitude unifies two amplitude objects to provide tree and one-loop matrix elements.
virtual Energy2 mu2() const
Return the value of the dimensional regularization parameter.
virtual double spinCorrelatedME2(pair< int, int > emitterSpectator, const SpinCorrelationTensor &c) const
Return the spin correlated matrix element.
virtual void prepareOneLoopAmplitudes(Ptr< MatchboxMEBase >::tcptr)
Calculate the one-loop amplitudes for the phasespace point stored in lastXComb, if provided.
Ptr< MatchboxAmplitude >::tptr treeLevelAmplitude() const
Return the amplitude object to provide tree-level amplitudes.
virtual double oneLoopSinglePole() const
If defined, return the coefficient of the pole in epsilon.
virtual double oneLoopDoublePole() const
If defined, return the coefficient of the pole in epsilon^2.
virtual bool isExpanded() const
Return true, if one loop corrections are given in the conventions of everything expanded.
virtual double oneLoopInterference() const
Return the one-loop/tree interference.
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 oneLoopAmplitudes() const
Return true, if one-loop contributions will be evaluated at amplitude level.
virtual bool haveColourFlows() const
Return true, if the colour basis is capable of assigning colour flows.
virtual void fillCrossingMap(size_t shift=0)
Perform a normal ordering of external legs and fill the crossing information as.
virtual int nDimAdditional() const
Return the number of random numbers required to evaluate this amplitude at a fixed phase space point.
virtual Ptr< MatchboxMEBase >::ptr makeME(const PDVector &p) const
Return a ME instance appropriate for this amplitude and the given subprocesses.
virtual bool isDRbar() const
Return true, if the amplitude is DRbar renormalized, otherwise MSbar is assumed.
virtual void orderInGem(unsigned int n)
Set the (tree-level) order in in which this matrix element should be evaluated.
virtual void flushCaches()
Flush all cashes.
virtual bool hasFinalStateSymmetry() const
Return true, if this amplitude already includes symmetry factors for identical outgoing particles.
virtual double spinColourCorrelatedME2(pair< int, int > emitterSpectator, const SpinCorrelationTensor &c) const
Return the colour and spin correlated matrix element.
virtual void prepareAmplitudes(Ptr< MatchboxMEBase >::tcptr)
Calculate the tree level amplitudes for the phasespace point stored in lastXComb.
virtual void doinitrun()
Initialize this object.
virtual unsigned int orderInGs() const
Return the (tree-level) order in in which this matrix element is given.
virtual bool startOLP(const map< pair< Process, int >, int > &procs)
Start the one loop provider, if appropriate.
virtual bool initializeExternal()
Initialize this amplitude.
virtual IBPtr clone() const
Make a simple clone of this object.
MatchboxHybridAmplitude()
The default constructor.
virtual Complex evaluate(size_t a, const vector< int > &hel, Complex &largeN)
Evaluate the amplitude for the given colour tensor id and helicity assignment.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual Ptr< ColourBasis >::tptr colourBasis() const
Return the colour basis.
virtual bool isCS() const
Return true, if one loop corrections are given in the conventions of the integrated dipoles.
virtual unsigned int orderInGem() const
Return the (tree-level) order in in which this matrix element is given.
virtual double largeNColourCorrelatedME2(pair< int, int > ij, Ptr< ColourBasis >::tptr largeNBasis) const
Return the large-N colour correlated matrix element.
virtual void disableOneLoop()
Diasble one-loop functionality if not needed.
virtual LorentzVector< Complex > plusPolarization(const Lorentz5Momentum &p, const Lorentz5Momentum &n, int id=-1) const
Return a positive helicity polarization vector for a gluon of momentum p (with reference vector n) to...
static void Init()
The standard Init function used to initialize the interfaces.
virtual bool isBDK() const
Return true, if one loop corrections are given in the conventions of BDK.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
MatchboxHybridAmplitude & operator=(const MatchboxHybridAmplitude &)=delete
The assignment operator is private and must never be called.
virtual Ptr< MatchboxAmplitude >::tptr oneLoopAmplitude() const
Return the amplitude object to provide one-loop amplitudes.
virtual vector< unsigned int > physicalHelicities(const vector< int > &hel) const
Return the helicity combination of the physical process in the conventions used by the spin correlati...
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
virtual bool canHandle(const PDVector &p, Ptr< MatchboxFactory >::tptr f, bool virt) const
Return true, if this amplitude can handle the given process.
virtual bool onlyOneLoop() const
Return true, if this amplitude only provides one-loop (QCD) corrections.
double symmetryRatio() const
Adjust the virtual symmetry factor conventions to the tree level one.
void oneLoopAmplitude(Ptr< MatchboxAmplitude >::tptr amp)
Set the amplitude object to provide one-loop amplitudes.
virtual bool hasInitialAverage() const
Return true, if this amplitude already includes averaging over incoming parton's quantum numbers.
bool theUseOLPCorrelators
True, if correlators should be used from the OLP amplitude.
virtual double me2() const
Return the matrix element squared.
virtual bool haveOneLoop() const
Return true, if this amplitude is capable of calculating one-loop (QCD) corrections.
virtual bool treeAmplitudes() const
Return true, if tree-level contributions will be evaluated at amplitude level.
bool isConsistent() const
Return true, if the two amplitude objects can be used in a consistent way.
virtual void cloneDependencies(const std::string &prefix="", bool slim=false)
Clone the dependencies, using a given prefix.
virtual int externalId(const cPDVector &proc)
Return a generic process id for the given process.
virtual bool canFillRhoMatrix() const
Return true, if this amplitude is capable of consistently filling the rho matrices for the spin corre...
virtual bool hasRunningAlphaS() const
Indicate that this amplitude is running alphas by itself.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual double largeNME2(Ptr< ColourBasis >::tptr largeNBasis) const
Return the largeN matrix element squared.
virtual bool isExternal() const
Return true, if this amplitude needs to initialize an external code.
virtual bool needsOLPCorrelators() const
Return true, if colour and spin correlated matrix elements should be ordered from the OLP.
virtual bool isOLPTree() const
Return true, if this amplitude is handled by a BLHA one-loop provider.
virtual bool hasRunningAlphaEW() const
Indicate that this amplitude is running alphaew by itself.
virtual bool isDR() const
Return true, if one loop corrections have been calculated in dimensional reduction.
virtual void setXComb(tStdXCombPtr xc)
Set the xcomb object.
void treeLevelAmplitude(Ptr< MatchboxAmplitude >::tptr amp)
Set the amplitude object to provide tree-level amplitudes.
virtual bool isOLPLoop() const
Return true, if this amplitude is handled by a BLHA one-loop provider.
Ptr< MatchboxAmplitude >::ptr theTreeLevelAmplitude
The amplitude object to provide tree-level amplitudes.
virtual void orderInGs(unsigned int n)
Set the (tree-level) order in in which this matrix element should be evaluated.
virtual Complex evaluateOneLoop(size_t a, const vector< int > &hel)
Evaluate the amplitude for the given colour tensor id and helicity assignment.
Ptr< MatchboxAmplitude >::ptr theOneLoopAmplitude
The amplitude object to provide one-loop amplitudes.
virtual double colourCorrelatedME2(pair< int, int > ij) const
Return the colour correlated matrix element.
SpinCorrelationTensor represents a spin correlation tensor of the form.
-*- C++ -*-
vector< PDPtr > PDVector
std::complex< double > Complex
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
vector< cPDPtr > cPDVector