Page MenuHomeHEPForge

DiagramBase.h
No OneTemporary

DiagramBase.h

// -*- C++ -*-
#ifndef ThePEG_DiagramBase_H
#define ThePEG_DiagramBase_H
//
// This is the declaration of the <!id>DiagramBase<!!id> class.
//
// CLASSDOC SUBSECTION Description:
//
// The <!id>DiagramBase<!!id> class is the base class of all classes
// which describes Feynman diagrams which can be generated by a matrix
// element class inheriting from <!class>MEBase<!!class>, as reported
// by the <!id>includedDiagrams()<!!id> method.
//
// To work properly, a sub class must in its constructor report the
// incoming and outgoing parton types with the <!id>partons(...)<!!id>
// method. Also an id number should be given to be used internally by
// the matrix element class. In addition, the <!id>construct<!!id>
// method must be implemented to construct the actual partons and
// connect them together in a <!class>SubProcess<!!class> object, also
// performing the colour connections using a given
// <!class>ColourLines<!!class> object.
//
// CLASSDOC SUBSECTION See also:
//
// <a href="http:MEBase.html">MEBase.h</a>,
// <a href="http:SubProcess.html">SubProcess.h</a>,
// <a href="http:ColourLines.html">ColourLines.h</a>.
//
#include "ThePEG/Config/ThePEG.h"
#include "ThePEG/PDT/ParticleData.h"
#include "ThePEG/MatrixElement/ColourLines.h"
#include "DiagramBase.fh"
#include "DiagramBase.xh"
namespace ThePEG {
class DiagramBase: public Base {
public:
inline DiagramBase();
inline DiagramBase(const DiagramBase &);
virtual ~DiagramBase();
// Standard ctors and dtor.
public:
inline int nIncoming() const;
// Return the number of incoming partons for this diagram.
inline const cPDVector & partons() const;
// Return the incoming, followed by the outgoing partons for this
// diagram.
inline int id() const;
// Return the id number of this diagram.
virtual tPVector construct(SubProPtr sb, const XComb &,
const ColourLines &) const = 0;
// Construct a sub process corresponding to this diagram. The
// incoming partons, and the momenta of the outgoing ones, are given
// by the XComb object. All parent/children pointers should be set
// correspondingly and the partons should be colour connected as
// specified by the ColourLines object.
string getTag() const;
// Generate a tag which is unique for tree diagrams with the same
// type of incoming and outgoing partons.
protected:
inline void partons(int ninc, const cPDVector & parts, int newId);
// To be used by sub classes to report the incoming and outgoing
// particle types, and an id number.
inline bool done() const;
// Returns true if the partons(...) has been called properly from
// the sub class.
public:
void persistentOutput(PersistentOStream &) const;
void persistentInput(PersistentIStream &, int);
// Standard functions for writing and reading from persistent streams.
static void Init();
// Standard Init function used to initialize the interfaces.
private:
int theNIncoming;
// The number of incoming partons for this diagram.
cPDVector thePartons;
// The incoming, followed by the outgoing partons for this
// diagram.
int theId;
// The id number of this diagram.
private:
static AbstractClassDescription<DiagramBase> initDiagramBase;
// Describe an abstract base class with persistent data.
DiagramBase & operator=(const DiagramBase &);
// Private and non-existent assignment operator.
};
}
// CLASSDOC OFF
namespace ThePEG {
// The following template specialization informs ThePEG about the
// base class of DiagramBase.
template <>
struct BaseClassTrait<DiagramBase,1> {
typedef Base NthBase;
};
// The following template specialization informs ThePEG about the
// name of this class and the shared object where it is defined.
template <>
struct ClassTraits<DiagramBase>: public ClassTraitsBase<DiagramBase> {
static string className() { return "/ThePEG/DiagramBase"; }
// Return the class name.
};
}
#include "DiagramBase.icc"
#ifndef ThePEG_TEMPLATES_IN_CC_FILE
// #include "DiagramBase.tcc"
#endif
#endif /* ThePEG_DiagramBase_H */

File Metadata

Mime Type
text/x-c++
Expires
Wed, May 14, 11:44 AM (10 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5111502
Default Alt Text
DiagramBase.h (3 KB)

Event Timeline