thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
BeamParticleData.h
1 // -*- C++ -*-
2 //
3 // BeamParticleData.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_BeamParticleData_H
10 #define ThePEG_BeamParticleData_H
11 // This is the declaration of the BeamParticleData class.
12 
13 #include "ThePEG/PDT/ParticleData.h"
14 #include "ThePEG/PDF/PDFBase.h"
15 #include "BeamParticleData.xh"
16 
17 namespace ThePEG {
18 
29 class BeamParticleData: public virtual ParticleData {
30 
31 public:
32 
40 
47  static PDPtr Create(long newId, string newPDGName);
48 
54  static PDPair Create(long newId, string newPDGName, string newAntiPDGName);
56 
57 public:
58 
63  tcPDFPtr pdf() const { return thePDF; }
64 
65 public:
66 
73  void persistentOutput(PersistentOStream & os) const;
74 
80  void persistentInput(PersistentIStream & is, int version);
82 
86  static void Init();
87 
88 protected:
89 
94  BeamParticleData(long newId, string newPDGName);
95 
99  virtual PDPtr pdclone() const;
100 
101 private:
102 
106  void setPDF(PDFPtr);
107 
108 private:
109 
114 
115 private:
116 
121 
125  BeamParticleData & operator=(const BeamParticleData &) = delete;
126 
127 };
128 
133 template <>
136  typedef ParticleData NthBase;
137 };
138 
141 template <>
142 struct ClassTraits<BeamParticleData>:
143  public ClassTraitsBase<BeamParticleData> {
145  static string className() { return "ThePEG::BeamParticleData"; }
146 };
147 
150 }
151 
152 #endif /* ThePEG_BeamParticleData_H */
BeamParticleData inherits from the ParticleData class and is used for particles which have informatio...
PersistentIStream is used to read persistent objects from a stream where they were previously written...
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
BeamParticleData()
Default constructor.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
static void Init()
Standard Init function used to initialize the interface.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
ParticleData inherits from InterfacedBase and represents the properties of a particle type...
Definition: ParticleData.h:36
void setPDF(PDFPtr)
Set the parton density object.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
static PDPtr Create(long newId, string newPDGName)
Create a Particle which is its own anti-particle.
pair< PDPtr, PDPtr > PDPair
A pair of pointers to ParticleData objects.
Definition: Containers.h:115
tcPDFPtr pdf() const
Return a pointer to the parton density object describing the sub-structure of this particle type...
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
static ClassDescription< BeamParticleData > initBeamParticleData
Describe a concrete class with persistent data.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
BeamParticleData & operator=(const BeamParticleData &)=delete
Private and non-existent assignment operator.
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
PDFPtr thePDF
The pointer to the parton density object.
virtual PDPtr pdclone() const
ParticleData clone method.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52