thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
BlobDiagram.h
1 // -*- C++ -*-
2 //
3 // BlobDiagram.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2019 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef ThePEG_BlobDiagram_H
10 #define ThePEG_BlobDiagram_H
11 // This is the declaration of the BlobDiagram class.
12 
13 #include "ThePEG/MatrixElement/DiagramBase.h"
14 #include "ThePEG/MatrixElement/ColourLines.h"
15 #include "ThePEG/Handlers/StandardXComb.fh"
16 
17 namespace ThePEG {
18 
27 class BlobDiagram: public DiagramBase {
28 
29 public:
30 
32  typedef cPDVector::size_type size_type;
33 
34 public:
35 
42  : DiagramBase() {}
43 
47  BlobDiagram(int id, tcPDPtr first, tcPDPtr second)
48  : DiagramBase() {
49  addParton(first);
50  addParton(second);
51  diagramInfo(2,id);
52  }
53 
57  ~BlobDiagram();
59 
60 public:
61 
65  BlobDiagram& operator,(PDPtr pd) { addParton(pd); return *this; }
66 
70  BlobDiagram& operator,(cPDPtr pd) { addParton(pd); return *this; }
71 
75  BlobDiagram& operator,(tPDPtr pd) { addParton(pd); return *this; }
76 
80  BlobDiagram& operator,(tcPDPtr pd) { addParton(pd); return *this; }
81 
89  virtual tPVector construct(SubProPtr sb, const StandardXComb&,
90  const ColourLines&) const;
91 
95  tcPDPair incoming() const {
96  return tcPDPair(partons()[0],partons()[1]);
97  }
98 
103  return tcPDVector(partons().begin()+2,partons().end());
104  }
105 
111  return tcPDVector(partons().begin(),partons().end());
112  }
113 
117  size_type nOutgoing() const { return partons().size() - 2; }
118 
119 public:
120 
127  void persistentOutput(PersistentOStream & os) const;
128 
134  void persistentInput(PersistentIStream & is, int version);
136 
137 private:
138 
143 
147  BlobDiagram & operator=(const BlobDiagram &) = delete;
148 
149 };
150 
151 }
152 
153 namespace ThePEG {
154 
161 template <>
162 struct BaseClassTrait<BlobDiagram,1>: public ClassTraitsType {
164  typedef DiagramBase NthBase;
165 };
166 
171 template <>
172 struct ClassTraits<BlobDiagram>: public ClassTraitsBase<BlobDiagram> {
174  static string className() { return "ThePEG::BlobDiagram"; }
175 };
176 
179 }
180 
181 #endif /* ThePEG_BlobDiagram_H */
pair< tcPDPtr, tcPDPtr > tcPDPair
A pair of transient pointers to const ParticleData objects.
Definition: Containers.h:124
BlobDiagram & operator,(cPDPtr pd)
Add a space- or time-like parton.
Definition: BlobDiagram.h:70
PersistentIStream is used to read persistent objects from a stream where they were previously written...
cPDVector::size_type size_type
The integer type reresenting vector sizes.
Definition: BlobDiagram.h:32
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
virtual tPVector construct(SubProPtr sb, const StandardXComb &, const ColourLines &) const
Construct a sub process corresponding to this diagram.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
~BlobDiagram()
Destructor.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
vector< tcPDPtr > tcPDVector
A vector of transient pointers to const ParticleData objects.
Definition: Containers.h:42
void addParton(tcPDPtr pd)
Add to the partons.
Definition: DiagramBase.h:147
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
ConstRCPtr is a reference counted (smart) const pointer.
Definition: RCPtr.h:320
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
const cPDVector & partons() const
Return the incoming, followed by the outgoing partons for this diagram.
Definition: DiagramBase.h:85
static ClassDescription< BlobDiagram > initBlobDiagram
Describe a concrete class with persistent data.
Definition: BlobDiagram.h:142
The StandardXComb class inherits from the more general XComb class which stores all information about...
Definition: StandardXComb.h:53
BlobDiagram & operator=(const BlobDiagram &)=delete
Private and non-existent assignment operator.
BlobDiagram & operator,(PDPtr pd)
Add a space- or time-like parton.
Definition: BlobDiagram.h:65
The BlobDiagram class inherits from DiagramBase and represents a general Feynman diagram of which no ...
Definition: BlobDiagram.h:27
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
tcPDVector outgoing() const
Return the outgoing parton types of this tree diagram.
Definition: BlobDiagram.h:102
BlobDiagram(int id, tcPDPtr first, tcPDPtr second)
Constructor specifiying incoming partons.
Definition: BlobDiagram.h:47
BlobDiagram & operator,(tcPDPtr pd)
Add a space- or time-like parton.
Definition: BlobDiagram.h:80
BlobDiagram()
Default constructor.
Definition: BlobDiagram.h:41
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
DiagramBase is the base class of all classes which describes Feynman diagrams which can be generated ...
Definition: DiagramBase.h:41
The ColourLines class defines the colour flow in a SubProcess.
Definition: ColourLines.h:23
vector< tPPtr > tPVector
A vector of transient pointers to Particle objects.
Definition: Containers.h:82
BlobDiagram & operator,(tPDPtr pd)
Add a space- or time-like parton.
Definition: BlobDiagram.h:75
tcPDPair incoming() const
Return the types of the incoming partons.
Definition: BlobDiagram.h:95
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
size_type nOutgoing() const
Return the number of outgoing partons.
Definition: BlobDiagram.h:117
tcPDVector external() const
Return the incoming followed by the outgoing parton types of this tree diagram.
Definition: BlobDiagram.h:110
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
void diagramInfo(int ninc, int newId)
Complete the missing information, provided partons() has already been filled.
Definition: DiagramBase.h:133