thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
MEGroup.h
1// -*- C++ -*-
2//
3// MEGroup.h is a part of ThePEG - Toolkit for HEP Event Generation
4// Copyright (C) 1999-2019 Leif Lonnblad
5// Copyright (C) 2009-2019 Simon Platzer
6//
7// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
8// Please respect the MCnet academic guidelines, see GUIDELINES for details.
9//
10#ifndef ThePEG_MEGroup_H
11#define ThePEG_MEGroup_H
12// This is the declaration of the MEGroup class.
13
14#include "ThePEG/MatrixElement/MEBase.h"
15#include "ThePEG/Cuts/Cuts.fh"
16#include "MEGroup.fh"
17
18namespace ThePEG {
19
30class MEGroup: public MEBase {
31
32public:
33
40
44 virtual ~MEGroup();
46
47public:
48
55 virtual unsigned int orderInAlphaS() const { return head()->orderInAlphaS(); }
56
61 virtual unsigned int orderInAlphaEW() const { return head()->orderInAlphaEW(); }
62
68 virtual double me2() const { return head()->me2(); }
69
74 virtual Energy2 scale() const { return head()->scale(); }
75
81 virtual double alphaS() const { return head()->alphaS(); }
82
88 virtual double alphaEM() const { return head()->alphaEM(); }
89
97 virtual void setKinematics() {
99 head()->setKinematics();
100 }
101
105 virtual void constructVertex(tSubProPtr sub) { head()->constructVertex(sub); }
106
110 virtual void constructVertex(tSubProPtr sub, const ColourLines* cl) {
111 head()->constructVertex(sub,cl);
112 }
113
118 virtual int nDim() const { return theNDim; }
119
128 virtual bool generateKinematics(const double * r);
129
134 virtual bool wantCMS () const { return head()->wantCMS(); }
135
140 virtual CrossSection dSigHatDR() const { return head()->dSigHatDR(); }
141
150 virtual bool haveX1X2() const { return head()->haveX1X2(); }
151
156 virtual bool havePDFWeight1 () const { return head()->havePDFWeight1(); }
157
162 virtual bool havePDFWeight2 () const { return head()->havePDFWeight2(); }
163
169 virtual bool keepRandomNumbers() const { return head()->keepRandomNumbers(); }
170
178 virtual void generateSubCollision(SubProcess & sub) { head()->generateSubCollision(sub); }
179
184 virtual void clearKinematics();
185
189 virtual void getDiagrams() const {
190 head()->diagrams();
191 useDiagrams(head());
192 }
193
201 virtual bool noMirror () const { return head()->noMirror(); }
202
208 colourGeometries(tcDiagPtr diag) const { return head()->colourGeometries(diag); }
209
215 virtual const ColourLines &
216 selectColourGeometry(tcDiagPtr diag) const { return head()->selectColourGeometry(diag); }
217
224 virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const {
225 return head()->diagrams(dv);
226 }
227
234 virtual DiagramIndex diagram(const DiagramVector & dv) const {
235 DiagramIndex res = head()->diagram(dv);
236 return res;
237 }
238
243 virtual void setXComb(tStdXCombPtr xc) {
245 head()->setXComb(xc);
246 }
247
254 virtual int maxMultCKKW() const { return head()->maxMultCKKW(); }
255
262 virtual int minMultCKKW() const { return head()->minMultCKKW(); }
263
270 virtual void maxMultCKKW(int mult) { head()->maxMultCKKW(mult); }
271
278 virtual void minMultCKKW(int mult) { head()->minMultCKKW(mult); }
279
285 virtual void flushCaches() { head()->flushCaches(); }
286
293 virtual void lastEventStatistics() {}
294
301 virtual bool discard(const CrossSection&, const CrossSection&) const { return false; }
303
304public:
305
309 tMEPtr head() const { return theHead; }
310
314 const MEVector& dependent() const { return theDependent; }
315
319 void head(tMEPtr me) { theHead = me; }
320
324 MEVector& dependent() { return theDependent; }
325
331 int dependentOffset(tMEPtr dep) const;
332
337 virtual StdXCombPtr makeXComb(Energy newMaxEnergy, const cPDPair & inc,
338 tEHPtr newEventHandler,tSubHdlPtr newSubProcessHandler,
339 tPExtrPtr newExtractor, tCascHdlPtr newCKKW,
340 const PBPair & newPartonBins, tCutsPtr newCuts,
341 const DiagramVector & newDiagrams, bool mir,
342 const PartonPairVec& allPBins,
343 tStdXCombPtr newHead = tStdXCombPtr(),
344 tMEPtr newME = tMEPtr());
345
351 virtual vector<StdXCombPtr> makeDependentXCombs(tStdXCombPtr xcHead,
352 const cPDVector& proc,
353 tMEPtr depME,
354 const PartonPairVec& allPBins) const;
355
360 virtual void fillProjectors() { head()->fillProjectors(); }
361
365 virtual bool willProject() const { return false; }
366
371 virtual bool groupReweighted() const { return false; }
372
376 virtual double reweightHead(const vector<tStdXCombPtr>&) { return 1.; }
377
381 virtual double reweightDependent(tStdXCombPtr, const vector<tStdXCombPtr>&) { return 1.; }
382
389 virtual bool subProcessGroups() const { return true; }
390
391public:
392
398 virtual bool uniformAdditional() const = 0;
399
406 tMEPtr depME) const = 0;
407
408public:
409
417
423 void persistentInput(PersistentIStream & is, int version);
425
429 static void Init();
430
431protected:
432
440 virtual void doinit();
441
446 virtual void doinitrun();
447
457 virtual void rebind(const TranslationMap & trans);
458
466
467private:
468
472 MEPtr theHead;
473
477 MEVector theDependent;
478
483 map<tMEPtr,int> theNDimMap;
484
489
490private:
491
496
500 MEGroup & operator=(const MEGroup &) = delete;
501
502};
503
504}
505
506
507namespace ThePEG {
508
515template <>
516struct BaseClassTrait<MEGroup,1> {
518 typedef MEBase NthBase;
519};
520
525template <>
526struct ClassTraits<MEGroup>: public ClassTraitsBase<MEGroup> {
528 static string className() { return "ThePEG::MEGroup"; }
529};
530
533}
534
535#endif /* ThePEG_MEGroup_H */
A concreate implementation of ClassDescriptionBase describing an abstract class with persistent data.
The ColourLines class defines the colour flow in a SubProcess.
Definition: ColourLines.h:23
The MEBase class is the base class of all objects representing hard matrix elements in ThePEG.
Definition: MEBase.h:72
DiagramVector::size_type DiagramIndex
The size_type used in the DiagramVector.
Definition: MEBase.h:79
void useDiagrams(tcMEPtr other) const
Initialize the diagrams from another MEBase object.
virtual void setKinematics()
Set the typed and momenta of the incoming and outgoing partons to be used in subsequent calls to me()...
Definition: MEBase.h:154
vector< DiagPtr > DiagramVector
A vector of pointers to DiagramBase objects.
Definition: MEBase.h:77
virtual void setXComb(tStdXCombPtr)
Set the XComb object to be used in the next call to generateKinematics() and dSigHatDR().
The MEGroup class represents a 'head' matrix element in association with a group of dependent matrix ...
Definition: MEGroup.h:30
virtual int minMultCKKW() const
If this matrix element is to be used together with others for CKKW reweighting and veto,...
Definition: MEGroup.h:262
MEGroup & operator=(const MEGroup &)=delete
Private and non-existent assignment operator.
virtual double me2() const
Return the matrix element for the kinematical configuation previously provided by the last call to se...
Definition: MEGroup.h:68
virtual void rebind(const TranslationMap &trans)
Rebind pointer to other Interfaced objects.
virtual bool groupReweighted() const
Return true, if this MEGroup will reweight the contributing cross sections.
Definition: MEGroup.h:371
virtual ~MEGroup()
Destructor.
virtual Energy2 scale() const
Return the scale associated with the phase space point provided by the last call to setKinematics().
Definition: MEGroup.h:74
virtual bool willProject() const
Return true, if projectors will be used.
Definition: MEGroup.h:365
virtual bool uniformAdditional() const =0
Return true, if the same additional random numbers should be presented to any of the dependent matrix...
virtual bool haveX1X2() const
Return true, if this matrix element will generate momenta for the incoming partons itself.
Definition: MEGroup.h:150
virtual double alphaS() const
Return the value of associated with the phase space point provided by the last call to setKinematics...
Definition: MEGroup.h:81
virtual unsigned int orderInAlphaS() const
Return the order in in which this matrix element is given.
Definition: MEGroup.h:55
virtual vector< StdXCombPtr > makeDependentXCombs(tStdXCombPtr xcHead, const cPDVector &proc, tMEPtr depME, const PartonPairVec &allPBins) const
Create a dependent xcomb object to be used for the given process steered bythe head object and depend...
int theNDim
The total number of random numbers required.
Definition: MEGroup.h:488
virtual const ColourLines & selectColourGeometry(tcDiagPtr diag) const
Select a ColpurLines geometry.
Definition: MEGroup.h:216
virtual unsigned int orderInAlphaEW() const
Return the order in in which this matrix element is given.
Definition: MEGroup.h:61
virtual Selector< DiagramIndex > diagrams(const DiagramVector &dv) const
With the information previously supplied with the setKinematics(...) method, a derived class may opti...
Definition: MEGroup.h:224
virtual void flushCaches()
Inform this matrix element that a new phase space point is about to be generated, so all caches shoul...
Definition: MEGroup.h:285
virtual void constructVertex(tSubProPtr sub)
construct the spin information for the interaction
Definition: MEGroup.h:105
virtual bool noMirror() const
Return true, if this matrix element does not want to make use of mirroring processes; in this case al...
Definition: MEGroup.h:201
virtual CrossSection dSigHatDR() const
Return the matrix element squared differential in the variables given by the last call to generateKin...
Definition: MEGroup.h:140
map< tMEPtr, int > theNDimMap
Offsets to access additional random numbers required by the dependent matrix elements.
Definition: MEGroup.h:483
static void Init()
Standard Init function used to initialize the interfaces.
virtual bool havePDFWeight1() const
Return true, if this matrix element provides the PDF weight for the first incoming parton itself.
Definition: MEGroup.h:156
virtual bool generateKinematics(const double *r)
Generate internal degrees of freedom given nDim() uniform random numbers in the interval ]0,...
MEVector theDependent
The dependent matrix elements.
Definition: MEGroup.h:477
virtual double reweightDependent(tStdXCombPtr, const vector< tStdXCombPtr > &)
Reweight the dependent cross section.
Definition: MEGroup.h:381
virtual void doinitrun()
Initialize this object.
virtual DiagramIndex diagram(const DiagramVector &dv) const
Select a diagram.
Definition: MEGroup.h:234
virtual double alphaEM() const
Return the value of associated with the phase space point provided by the last call to setKinematics...
Definition: MEGroup.h:88
virtual void setXComb(tStdXCombPtr xc)
Set the XComb object to be used in the next call to generateKinematics() and dSigHatDR().
Definition: MEGroup.h:243
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual void getDiagrams() const
Add all possible diagrams with the add() function.
Definition: MEGroup.h:189
virtual void lastEventStatistics()
Collect information on the last evaluated phasespace point for verification or debugging purposes.
Definition: MEGroup.h:293
virtual void fillProjectors()
Fill the projectors object of xcombs to choose subprocesses different than the one currently integrat...
Definition: MEGroup.h:360
virtual void generateSubCollision(SubProcess &sub)
Comlete a SubProcess object using the internal degrees of freedom generated in the last generateKinem...
Definition: MEGroup.h:178
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
void head(tMEPtr me)
Set the head matrix element.
Definition: MEGroup.h:319
virtual bool havePDFWeight2() const
Return true, if this matrix element provides the PDF weight for the second incoming parton itself.
Definition: MEGroup.h:162
virtual void maxMultCKKW(int mult)
If this matrix element is to be used together with others for CKKW reweighting and veto,...
Definition: MEGroup.h:270
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 an xcomb object appropriate to this matrix element.
virtual void minMultCKKW(int mult)
If this matrix element is to be used together with others for CKKW reweighting and veto,...
Definition: MEGroup.h:278
const MEVector & dependent() const
Visit the dependent matrix elements.
Definition: MEGroup.h:314
virtual void constructVertex(tSubProPtr sub, const ColourLines *cl)
construct the spin information for the interaction
Definition: MEGroup.h:110
virtual int nDim() const
The number of internal degreed of freedom used in the matrix element.
Definition: MEGroup.h:118
virtual int maxMultCKKW() const
If this matrix element is to be used together with others for CKKW reweighting and veto,...
Definition: MEGroup.h:254
MEPtr theHead
The head matrix element.
Definition: MEGroup.h:472
int dependentOffset(tMEPtr dep) const
Return the random number offset to access the random numbers provided for the given matrix element to...
virtual bool subProcessGroups() const
Return true, if SubProcessGroups should be setup from this MEGroup.
Definition: MEGroup.h:389
virtual void clearKinematics()
Clear the information previously provided by a call to setKinematics(...).
virtual Selector< const ColourLines * > colourGeometries(tcDiagPtr diag) const
Return a Selector with possible colour geometries for the selected diagram weighted by their relative...
Definition: MEGroup.h:208
virtual bool wantCMS() const
Return true, if this matrix element expects the incoming partons in their center-of-mass system.
Definition: MEGroup.h:134
MEVector & dependent()
Access the dependent matrix elements.
Definition: MEGroup.h:324
virtual double reweightHead(const vector< tStdXCombPtr > &)
Reweight the head cross section.
Definition: MEGroup.h:376
virtual IVector getReferences()
Return a vector of all pointers to Interfaced objects used in this object.
virtual MEBase::DiagramVector dependentDiagrams(const cPDVector &proc, tMEPtr depME) const =0
Given a process from the head matrix element, return a list of diagrams which should be considered fo...
tMEPtr head() const
Return the head matrix element.
Definition: MEGroup.h:309
static AbstractClassDescription< MEGroup > initMEGroup
Describe a class with persistent data.
Definition: MEGroup.h:495
MEGroup()
Default constructor.
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
virtual bool discard(const CrossSection &, const CrossSection &) const
Return true, if this configuration of cross sections should not be included due to their relative mag...
Definition: MEGroup.h:301
virtual bool keepRandomNumbers() const
Return true, if the XComb steering this matrix element should keep track of the random numbers used t...
Definition: MEGroup.h:169
virtual void setKinematics()
Set the typed and momenta of the incoming and outgoing partons to be used in subsequent calls to me()...
Definition: MEGroup.h:97
PersistentIStream is used to read persistent objects from a stream where they were previously written...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
Rebinder is a class associating pairs of pointers to objects.
Definition: Rebinder.h:27
Selector is a templated class for storing objects associated with probabilities in a way such that,...
Definition: Selector.h:46
A SubProcess object represents a hard sub-process in a collision.
Definition: SubProcess.h:33
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
pair< cPDPtr, cPDPtr > cPDPair
A pair of pointers to const ParticleData objects.
Definition: Containers.h:118
vector< IBPtr > IVector
A vector of pointers to InterfacedBase objects.
Definition: Containers.h:67
vector< cPDPtr > cPDVector
A vector of pointers to const ParticleData objects.
Definition: Containers.h:36
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
static string className()
Return the name of class T.
Definition: ClassTraits.h:66