thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
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 
18 namespace ThePEG {
19 
30 class MEGroup: public MEBase {
31 
32 public:
33 
39  MEGroup();
40 
44  virtual ~MEGroup();
46 
47 public:
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) {
244  MEBase::setXComb(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() {}
295 
296 public:
297 
301  tMEPtr head() const { return theHead; }
302 
306  const MEVector& dependent() const { return theDependent; }
307 
311  void head(tMEPtr me) { theHead = me; }
312 
316  MEVector& dependent() { return theDependent; }
317 
323  int dependentOffset(tMEPtr dep) const;
324 
329  virtual StdXCombPtr makeXComb(Energy newMaxEnergy, const cPDPair & inc,
330  tEHPtr newEventHandler,tSubHdlPtr newSubProcessHandler,
331  tPExtrPtr newExtractor, tCascHdlPtr newCKKW,
332  const PBPair & newPartonBins, tCutsPtr newCuts,
333  const DiagramVector & newDiagrams, bool mir,
334  const PartonPairVec& allPBins,
335  tStdXCombPtr newHead = tStdXCombPtr(),
336  tMEPtr newME = tMEPtr());
337 
343  virtual vector<StdXCombPtr> makeDependentXCombs(tStdXCombPtr xcHead,
344  const cPDVector& proc,
345  tMEPtr depME,
346  const PartonPairVec& allPBins) const;
347 
352  virtual void fillProjectors() { head()->fillProjectors(); }
353 
357  virtual bool willProject() const { return false; }
358 
363  virtual bool groupReweighted() const { return false; }
364 
368  virtual double reweightHead(const vector<tStdXCombPtr>&) { return 1.; }
369 
373  virtual double reweightDependent(tStdXCombPtr, const vector<tStdXCombPtr>&) { return 1.; }
374 
381  virtual bool subProcessGroups() const { return true; }
382 
383 public:
384 
390  virtual bool uniformAdditional() const = 0;
391 
398  tMEPtr depME) const = 0;
399 
400 public:
401 
408  void persistentOutput(PersistentOStream & os) const;
409 
415  void persistentInput(PersistentIStream & is, int version);
417 
421  static void Init();
422 
423 protected:
424 
432  virtual void doinit();
433 
438  virtual void doinitrun();
439 
449  virtual void rebind(const TranslationMap & trans);
450 
456  virtual IVector getReferences();
458 
459 private:
460 
464  MEPtr theHead;
465 
469  MEVector theDependent;
470 
475  map<tMEPtr,int> theNDimMap;
476 
480  int theNDim;
481 
482 private:
483 
488 
492  MEGroup & operator=(const MEGroup &) = delete;
493 
494 };
495 
496 }
497 
498 
499 namespace ThePEG {
500 
507 template <>
508 struct BaseClassTrait<MEGroup,1> {
510  typedef MEBase NthBase;
511 };
512 
517 template <>
518 struct ClassTraits<MEGroup>: public ClassTraitsBase<MEGroup> {
520  static string className() { return "ThePEG::MEGroup"; }
521 };
522 
525 }
526 
527 #endif /* ThePEG_MEGroup_H */
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
virtual unsigned int orderInAlphaS() const
Return the order in in which this matrix element is given.
Definition: MEGroup.h:55
PersistentIStream is used to read persistent objects from a stream where they were previously written...
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
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
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
map< tMEPtr, int > theNDimMap
Offsets to access additional random numbers required by the dependent matrix elements.
Definition: MEGroup.h:475
virtual DiagramIndex diagram(const DiagramVector &dv) const
Select a diagram.
Definition: MEGroup.h:234
virtual void clearKinematics()
Clear the information previously provided by a call to setKinematics(...).
virtual const ColourLines & selectColourGeometry(tcDiagPtr diag) const
Select a ColpurLines geometry.
Definition: MEGroup.h:216
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 havePDFWeight2() const
Return true, if this matrix element provides the PDF weight for the second incoming parton itself...
Definition: MEGroup.h:162
virtual unsigned int orderInAlphaEW() const
Return the order in in which this matrix element is given.
Definition: MEGroup.h:61
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
A concreate implementation of ClassDescriptionBase describing an abstract class with persistent data...
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...
virtual int minMultCKKW() const
If this matrix element is to be used together with others for CKKW reweighting and veto...
Definition: MEGroup.h:262
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
tMEPtr head() const
Return the head matrix element.
Definition: MEGroup.h:301
Rebinder is a class associating pairs of pointers to objects.
Definition: Rebinder.h:27
virtual void lastEventStatistics()
Collect information on the last evaluated phasespace point for verification or debugging purposes...
Definition: MEGroup.h:293
virtual bool wantCMS() const
Return true, if this matrix element expects the incoming partons in their center-of-mass system...
Definition: MEGroup.h:134
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
virtual double reweightHead(const vector< tStdXCombPtr > &)
Reweight the head cross section.
Definition: MEGroup.h:368
static void Init()
Standard Init function used to initialize the interfaces.
virtual bool groupReweighted() const
Return true, if this MEGroup will reweight the contributing cross sections.
Definition: MEGroup.h:363
virtual bool haveX1X2() const
Return true, if this matrix element will generate momenta for the incoming partons itself...
Definition: MEGroup.h:150
void useDiagrams(tcMEPtr other) const
Initialize the diagrams from another MEBase object.
A SubProcess object represents a hard sub-process in a collision.
Definition: SubProcess.h:33
void head(tMEPtr me)
Set the head matrix element.
Definition: MEGroup.h:311
MEPtr theHead
The head matrix element.
Definition: MEGroup.h:464
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...
MEVector & dependent()
Access the dependent matrix elements.
Definition: MEGroup.h:316
virtual void getDiagrams() const
Add all possible diagrams with the add() function.
Definition: MEGroup.h:189
virtual bool subProcessGroups() const
Return true, if SubProcessGroups should be setup from this MEGroup.
Definition: MEGroup.h:381
virtual void rebind(const TranslationMap &trans)
Rebind pointer to other Interfaced objects.
virtual void generateSubCollision(SubProcess &sub)
Comlete a SubProcess object using the internal degrees of freedom generated in the last generateKinem...
Definition: MEGroup.h:178
virtual void setXComb(tStdXCombPtr)
Set the XComb object to be used in the next call to generateKinematics() and dSigHatDR().
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 CrossSection dSigHatDR() const
Return the matrix element squared differential in the variables given by the last call to generateKin...
Definition: MEGroup.h:140
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 bool generateKinematics(const double *r)
Generate internal degrees of freedom given nDim() uniform random numbers in the interval ]0...
const MEVector & dependent() const
Visit the dependent matrix elements.
Definition: MEGroup.h:306
virtual bool willProject() const
Return true, if projectors will be used.
Definition: MEGroup.h:357
virtual int maxMultCKKW() const
If this matrix element is to be used together with others for CKKW reweighting and veto...
Definition: MEGroup.h:254
vector< cPDPtr > cPDVector
A vector of pointers to const ParticleData objects.
Definition: Containers.h:36
virtual bool uniformAdditional() const =0
Return true, if the same additional random numbers should be presented to any of the dependent matrix...
virtual IVector getReferences()
Return a vector of all pointers to Interfaced objects used in this object.
int theNDim
The total number of random numbers required.
Definition: MEGroup.h:480
MEVector theDependent
The dependent matrix elements.
Definition: MEGroup.h:469
virtual ~MEGroup()
Destructor.
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
Selector is a templated class for storing objects associated with probabilities in a way such that...
Definition: Selector.h:46
virtual bool havePDFWeight1() const
Return true, if this matrix element provides the PDF weight for the first incoming parton itself...
Definition: MEGroup.h:156
MEGroup & operator=(const MEGroup &)=delete
Private and non-existent assignment operator.
vector< DiagPtr > DiagramVector
A vector of pointers to DiagramBase objects.
Definition: MEBase.h:77
virtual double reweightDependent(tStdXCombPtr, const vector< tStdXCombPtr > &)
Reweight the dependent cross section.
Definition: MEGroup.h:373
virtual void setXComb(tStdXCombPtr xc)
Set the XComb object to be used in the next call to generateKinematics() and dSigHatDR().
Definition: MEGroup.h:243
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
MEGroup()
Default constructor.
static AbstractClassDescription< MEGroup > initMEGroup
Describe a class with persistent data.
Definition: MEGroup.h:487
pair< cPDPtr, cPDPtr > cPDPair
A pair of pointers to const ParticleData objects.
Definition: Containers.h:118
The MEBase class is the base class of all objects representing hard matrix elements in ThePEG...
Definition: MEBase.h:72
virtual void doinitrun()
Initialize this object.
The MEGroup class represents a &#39;head&#39; matrix element in association with a group of dependent matrix ...
Definition: MEGroup.h:30
The ColourLines class defines the colour flow in a SubProcess.
Definition: ColourLines.h:23
DiagramVector::size_type DiagramIndex
The size_type used in the DiagramVector.
Definition: MEBase.h:79
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual double me2() const
Return the matrix element for the kinematical configuation previously provided by the last call to se...
Definition: MEGroup.h:68
vector< IBPtr > IVector
A vector of pointers to InterfacedBase objects.
Definition: Containers.h:67
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 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 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 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 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
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
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 constructVertex(tSubProPtr sub)
construct the spin information for the interaction
Definition: MEGroup.h:105
virtual void fillProjectors()
Fill the projectors object of xcombs to choose subprocesses different than the one currently integrat...
Definition: MEGroup.h:352
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
int dependentOffset(tMEPtr dep) const
Return the random number offset to access the random numbers provided for the given matrix element to...
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52