ThePEG  1.8.0
MEGroup.h
1 // -*- C++ -*-
2 //
3 // MEGroup.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2007 Leif Lonnblad
5 // Copyright (C) 2009-2010 Simon Platzer
6 //
7 // ThePEG is licenced under version 2 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/Handlers/StdDependentXComb.fh"
16 #include "ThePEG/Cuts/Cuts.fh"
17 #include "MEGroup.fh"
18 
19 namespace ThePEG {
20 
32 class MEGroup: public MEBase {
33 
34 public:
35 
41  MEGroup();
42 
46  virtual ~MEGroup();
48 
49 public:
50 
57  virtual unsigned int orderInAlphaS() const { return head()->orderInAlphaS(); }
58 
63  virtual unsigned int orderInAlphaEW() const { return head()->orderInAlphaEW(); }
64 
70  virtual double me2() const { return head()->me2(); }
71 
76  virtual Energy2 scale() const { return head()->scale(); }
77 
83  virtual double alphaS() const { return head()->alphaS(); }
84 
90  virtual double alphaEM() const { return head()->alphaEM(); }
91 
99  virtual void setKinematics();
100 
104  virtual void constructVertex(tSubProPtr sub) { head()->constructVertex(sub); }
105 
110  virtual int nDim() const { return theNDim; }
111 
120  virtual bool generateKinematics(const double * r);
121 
126  virtual bool wantCMS () const { return head()->wantCMS(); }
127 
132  virtual CrossSection dSigHatDR() const { return head()->dSigHatDR(); }
133 
142  virtual bool haveX1X2() const { return head()->haveX1X2(); }
143 
148  virtual bool havePDFWeight1 () const { return head()->havePDFWeight1(); }
149 
154  virtual bool havePDFWeight2 () const { return head()->havePDFWeight2(); }
155 
161  virtual bool keepRandomNumbers() const { return head()->keepRandomNumbers(); }
162 
170  virtual void generateSubCollision(SubProcess & sub) { head()->generateSubCollision(sub); }
171 
176  virtual void clearKinematics();
177 
181  virtual void getDiagrams() const {
182  head()->diagrams();
183  useDiagrams(head());
184  }
185 
193  virtual bool noMirror () const { return head()->noMirror(); }
194 
200  colourGeometries(tcDiagPtr diag) const { return head()->colourGeometries(diag); }
201 
207  virtual const ColourLines &
208  selectColourGeometry(tcDiagPtr diag) const { return head()->selectColourGeometry(diag); }
209 
216  virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const {
217  return head()->diagrams(dv);
218  }
219 
226  virtual DiagramIndex diagram(const DiagramVector & dv) const {
227  DiagramIndex res = head()->diagram(dv);
228  return res;
229  }
230 
235  virtual void setXComb(tStdXCombPtr);
236 
242  virtual void flushCaches();
243 
250  virtual void lastEventStatistics() {}
252 
253 public:
254 
258  tMEPtr head() const { return theHead; }
259 
263  const MEVector& dependent() const { return theDependent; }
264 
268  void head(tMEPtr me) { theHead = me; }
269 
273  MEVector& dependent() { return theDependent; }
274 
280  int dependentOffset(tMEPtr dep) const;
281 
287  StdDependentXCombPtr makeDependentXComb (tStdXCombPtr xcHead,
288  const cPDVector& proc,
289  tMEPtr depME,
290  const PartonPairVec& allPBins) const;
291 
298  virtual bool subProcessGroups() const { return true; }
299 
304  virtual bool mcSumDependent() const { return false; }
305 
310  tStdDependentXCombPtr lastDependentXComb() const { return theLastDependentXComb; }
311 
312 protected:
313 
318  void lastDependentXComb(tStdDependentXCombPtr xc) { theLastDependentXComb = xc; }
319 
320 public:
321 
327  virtual bool uniformAdditional() const = 0;
328 
335  tMEPtr depME) const = 0;
336 
337 public:
338 
345  void persistentOutput(PersistentOStream & os) const;
346 
352  void persistentInput(PersistentIStream & is, int version);
354 
358  static void Init();
359 
360 protected:
361 
369  virtual void doinit();
370 
380  virtual void rebind(const TranslationMap & trans);
381 
387  virtual IVector getReferences();
389 
390 private:
391 
395  MEPtr theHead;
396 
400  MEVector theDependent;
401 
406  map<tMEPtr,int> theNDimMap;
407 
411  int theNDim;
412 
417  tStdDependentXCombPtr theLastDependentXComb;
418 
419 private:
420 
425 
429  MEGroup & operator=(const MEGroup &);
430 
431 };
432 
433 }
434 
435 
436 namespace ThePEG {
437 
444 template <>
445 struct BaseClassTrait<MEGroup,1> {
447  typedef MEBase NthBase;
448 };
449 
454 template <>
455 struct ClassTraits<MEGroup>: public ClassTraitsBase<MEGroup> {
457  static string className() { return "ThePEG::MEGroup"; }
458 };
459 
462 }
463 
464 #endif /* ThePEG_MEGroup_H */
virtual unsigned int orderInAlphaS() const
Return the order in in which this matrix element is given.
Definition: MEGroup.h:57
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 int nDim() const
The number of internal degreed of freedom used in the matrix element.
Definition: MEGroup.h:110
map< tMEPtr, int > theNDimMap
Offsets to access additional random numbers required by the dependent matrix elements.
Definition: MEGroup.h:406
virtual DiagramIndex diagram(const DiagramVector &dv) const
Select a diagram.
Definition: MEGroup.h:226
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:208
virtual Energy2 scale() const
Return the scale associated with the phase space point provided by the last call to setKinematics()...
Definition: MEGroup.h:76
virtual void setXComb(tStdXCombPtr)
Set the XComb object to be used in the next call to generateKinematics() and dSigHatDR().
virtual bool havePDFWeight2() const
Return true, if this matrix element provides the PDF weight for the second incoming parton itself...
Definition: MEGroup.h:154
virtual unsigned int orderInAlphaEW() const
Return the order in in which this matrix element is given.
Definition: MEGroup.h:63
virtual bool mcSumDependent() const
Return true for MC summation of dependent matrix elements, if feasible.
Definition: MEGroup.h:304
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...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:509
tMEPtr head() const
Return the head matrix element.
Definition: MEGroup.h:258
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:250
virtual bool wantCMS() const
Return true, if this matrix element expects the incoming partons in their center-of-mass system...
Definition: MEGroup.h:126
tStdDependentXCombPtr theLastDependentXComb
A pointer to the dependent xcomb object selected if mcSumDependent returned true. ...
Definition: MEGroup.h:417
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
static void Init()
Standard Init function used to initialize the interfaces.
virtual bool haveX1X2() const
Return true, if this matrix element will generate momenta for the incoming partons itself...
Definition: MEGroup.h:142
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:268
MEPtr theHead
The head matrix element.
Definition: MEGroup.h:395
MEVector & dependent()
Access the dependent matrix elements.
Definition: MEGroup.h:273
virtual void getDiagrams() const
Add all possible diagrams with the add() function.
Definition: MEGroup.h:181
virtual bool subProcessGroups() const
Return true, if SubProcessGroups should be setup from this MEGroup.
Definition: MEGroup.h:298
virtual void rebind(const TranslationMap &trans)
Rebind pointer to other Interfaced objects.
void lastDependentXComb(tStdDependentXCombPtr xc)
Set a pointer to the dependent xcomb object selected if mcSumDependent returned true.
Definition: MEGroup.h:318
virtual void generateSubCollision(SubProcess &sub)
Comlete a SubProcess object using the internal degrees of freedom generated in the last generateKinem...
Definition: MEGroup.h:170
virtual double alphaEM() const
Return the value of associated with the phase space point provided by the last call to setKinematics...
Definition: MEGroup.h:90
virtual CrossSection dSigHatDR() const
Return the matrix element squared differential in the variables given by the last call to generateKin...
Definition: MEGroup.h:132
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:263
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:411
MEVector theDependent
The dependent matrix elements.
Definition: MEGroup.h:400
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()...
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:148
vector< DiagPtr > DiagramVector
A vector of pointers to DiagramBase objects.
Definition: MEBase.h:72
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:424
This template class allows the compiler to check calculations with physical quantities for dimensiona...
Definition: PhysicalQty.h:81
The MEBase class is the base class of all objects representing hard matrix elements in ThePEG...
Definition: MEBase.h:67
The MEGroup class represents a &#39;head&#39; matrix element in association with a group of dependent matrix ...
Definition: MEGroup.h:32
tStdDependentXCombPtr lastDependentXComb() const
Return a pointer to the dependent xcomb object selected if mcSumDependent returned true...
Definition: MEGroup.h:310
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:74
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:70
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:83
virtual void flushCaches()
Inform this matrix element that a new phase space point is about to be generated, so all caches shoul...
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:193
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:200
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:216
virtual void constructVertex(tSubProPtr sub)
construct the spin information for the interaction
Definition: MEGroup.h:104
StdDependentXCombPtr makeDependentXComb(tStdXCombPtr xcHead, const cPDVector &proc, tMEPtr depME, const PartonPairVec &allPBins) const
Create an StdDependentXComb object to be used for the given process steered bythe head object and dep...
MEGroup & operator=(const MEGroup &)
Private and non-existent assignment operator.
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:161
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