Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:38:27

0001 // -*- C++ -*-
0002 //
0003 // BlobDiagram.h is a part of ThePEG - Toolkit for HEP Event Generation
0004 // Copyright (C) 1999-2019 Leif Lonnblad
0005 //
0006 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0008 //
0009 #ifndef ThePEG_BlobDiagram_H
0010 #define ThePEG_BlobDiagram_H
0011 // This is the declaration of the BlobDiagram class.
0012 
0013 #include "ThePEG/MatrixElement/DiagramBase.h"
0014 #include "ThePEG/MatrixElement/ColourLines.h"
0015 #include "ThePEG/Handlers/StandardXComb.fh"
0016 
0017 namespace ThePEG {
0018 
0019 /**
0020  * The BlobDiagram class inherits from DiagramBase and represents a general
0021  * Feynman diagram of which no further substructure is assumed.
0022  *
0023  * @see DiagramBase
0024  * @see ColourLines
0025  * 
0026  */
0027 class BlobDiagram: public DiagramBase {
0028 
0029 public:
0030 
0031   /** The integer type reresenting vector sizes. */
0032   typedef cPDVector::size_type size_type;
0033 
0034 public:
0035 
0036   /** @name Standard constructors and destructors. */
0037   //@{
0038   /**
0039    * Default constructor
0040    */
0041   BlobDiagram() 
0042     : DiagramBase() {}
0043 
0044   /**
0045    * Constructor specifiying incoming partons
0046    */
0047   BlobDiagram(int id, tcPDPtr first, tcPDPtr second) 
0048     : DiagramBase() {
0049     addParton(first);
0050     addParton(second);
0051     diagramInfo(2,id);
0052   }
0053 
0054   /**
0055    * Destructor.
0056    */
0057   ~BlobDiagram();
0058   //@}
0059 
0060 public:
0061 
0062   /**
0063    * Add a space- or time-like parton.
0064    */
0065   BlobDiagram& operator,(PDPtr pd) { addParton(pd); return *this; }
0066 
0067   /**
0068    * Add a space- or time-like parton.
0069    */
0070   BlobDiagram& operator,(cPDPtr pd) { addParton(pd); return *this; }
0071 
0072   /**
0073    * Add a space- or time-like parton.
0074    */
0075   BlobDiagram& operator,(tPDPtr pd) { addParton(pd); return *this; }
0076 
0077   /**
0078    * Add a space- or time-like parton.
0079    */
0080   BlobDiagram& operator,(tcPDPtr pd) { addParton(pd); return *this; }
0081 
0082   /**
0083    * Construct a sub process corresponding to this diagram. The
0084    * incoming partons, and the momenta of the outgoing ones, are given
0085    * by the XComb object. All parent/children pointers should be set
0086    * correspondingly and the partons should be colour connected as
0087    * specified by the ColourLines object.
0088    */
0089   virtual tPVector construct(SubProPtr sb, const StandardXComb&,
0090                  const ColourLines&) const;
0091 
0092   /**
0093    * Return the types of the incoming partons.
0094    */
0095   tcPDPair incoming() const {
0096     return tcPDPair(partons()[0],partons()[1]); 
0097   }
0098 
0099   /**
0100    * Return the outgoing parton types of this tree diagram.
0101    */
0102   tcPDVector outgoing() const {
0103     return tcPDVector(partons().begin()+2,partons().end());
0104   }
0105 
0106   /**
0107    * Return the incoming followed by the outgoing parton types of this
0108    * tree diagram.
0109    */
0110   tcPDVector external() const {
0111     return tcPDVector(partons().begin(),partons().end());
0112   }
0113 
0114   /**
0115    * Return the number of outgoing partons.
0116    */
0117   size_type nOutgoing() const { return partons().size() - 2; }
0118 
0119 public:
0120 
0121   /** @name Functions used by the persistent I/O system. */
0122   //@{
0123   /**
0124    * Function used to write out object persistently.
0125    * @param os the persistent output stream written to.
0126    */
0127   void persistentOutput(PersistentOStream & os) const;
0128 
0129   /**
0130    * Function used to read in object persistently.
0131    * @param is the persistent input stream read from.
0132    * @param version the version number of the object when written.
0133    */
0134   void persistentInput(PersistentIStream & is, int version);
0135   //@}
0136 
0137 private:
0138 
0139   /**
0140    * Describe a concrete class with persistent data.
0141    */
0142   static ClassDescription<BlobDiagram> initBlobDiagram;
0143 
0144   /**
0145    *  Private and non-existent assignment operator.
0146    */
0147   BlobDiagram & operator=(const BlobDiagram &) = delete;
0148 
0149 };
0150 
0151 }
0152 
0153 namespace ThePEG {
0154 
0155 /** @cond TRAITSPECIALIZATIONS */
0156 
0157 /**
0158  * This template specialization informs ThePEG about the
0159  * base class of BlobDiagram.
0160  */
0161 template <>
0162 struct BaseClassTrait<BlobDiagram,1>: public ClassTraitsType {
0163   /** Typedef of the base class of BlobDiagram. */
0164   typedef DiagramBase NthBase;
0165 };
0166 
0167 /**
0168  * This template specialization informs ThePEG about the name of the
0169  * BlobDiagram class.
0170  */
0171 template <>
0172 struct ClassTraits<BlobDiagram>: public ClassTraitsBase<BlobDiagram> {
0173   /** Return the class name. */
0174   static string className() { return "ThePEG::BlobDiagram"; }
0175 };
0176 
0177 /** @endcond */
0178 
0179 }
0180 
0181 #endif /* ThePEG_BlobDiagram_H */