|
|
|||
File indexing completed on 2026-08-06 09:38:28
0001 // -*- C++ -*- 0002 // 0003 // BeamParticleData.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_BeamParticleData_H 0010 #define ThePEG_BeamParticleData_H 0011 // This is the declaration of the BeamParticleData class. 0012 0013 #include "ThePEG/PDT/ParticleData.h" 0014 #include "ThePEG/PDF/PDFBase.h" 0015 #include "BeamParticleData.xh" 0016 0017 namespace ThePEG { 0018 0019 /** 0020 * BeamParticleData inherits from the ParticleData class and is used 0021 * for particles which have information about their sub-structure 0022 * implemented as a pointer to a PDFBase object. 0023 * 0024 * @see \ref BeamParticleDataInterfaces "The interfaces" 0025 * defined for BeamParticleData. 0026 * @see ParticleData 0027 * @see PDFBase 0028 */ 0029 class BeamParticleData: public virtual ParticleData { 0030 0031 public: 0032 0033 /** @name Standard constructors and destructors. */ 0034 //@{ 0035 /** 0036 * Default constructor. 0037 */ 0038 BeamParticleData() {} 0039 //@} 0040 0041 /** @name The Create methods are special interfaces for ParticleData 0042 classes. */ 0043 //@{ 0044 /** 0045 * Create a Particle which is its own anti-particle. 0046 */ 0047 static PDPtr Create(long newId, string newPDGName); 0048 0049 /** 0050 * Create a particle - anti particle pair. Note that setting the 0051 * parton density object on this particle does not change the parton 0052 * density of the anti particle iven if synchronized() is true. 0053 */ 0054 static PDPair Create(long newId, string newPDGName, string newAntiPDGName); 0055 //@} 0056 0057 public: 0058 0059 /** 0060 * Return a pointer to the parton density object describing the 0061 * sub-structure of this particle type. 0062 */ 0063 tcPDFPtr pdf() const { return thePDF; } 0064 0065 public: 0066 0067 /** @name Functions used by the persistent I/O system. */ 0068 //@{ 0069 /** 0070 * Function used to write out object persistently. 0071 * @param os the persistent output stream written to. 0072 */ 0073 void persistentOutput(PersistentOStream & os) const; 0074 0075 /** 0076 * Function used to read in object persistently. 0077 * @param is the persistent input stream read from. 0078 * @param version the version number of the object when written. 0079 */ 0080 void persistentInput(PersistentIStream & is, int version); 0081 //@} 0082 0083 /** 0084 * Standard Init function used to initialize the interface. 0085 */ 0086 static void Init(); 0087 0088 protected: 0089 0090 /** 0091 * Protected constructor only to be used by subclasses or by the 0092 * Create method. 0093 */ 0094 BeamParticleData(long newId, string newPDGName); 0095 0096 /** 0097 * ParticleData clone method 0098 */ 0099 virtual PDPtr pdclone() const; 0100 0101 private: 0102 0103 /** 0104 * Set the parton density object. 0105 */ 0106 void setPDF(PDFPtr); 0107 0108 private: 0109 0110 /** 0111 * The pointer to the parton density object. 0112 */ 0113 PDFPtr thePDF; 0114 0115 private: 0116 0117 /** 0118 * Describe a concrete class with persistent data. 0119 */ 0120 static ClassDescription<BeamParticleData> initBeamParticleData; 0121 0122 /** 0123 * Private and non-existent assignment operator. 0124 */ 0125 BeamParticleData & operator=(const BeamParticleData &) = delete; 0126 0127 }; 0128 0129 /** @cond TRAITSPECIALIZATIONS */ 0130 0131 /** This template specialization informs ThePEG about the 0132 * base classes of BeamParticleData. */ 0133 template <> 0134 struct BaseClassTrait<BeamParticleData,1>: public ClassTraitsType { 0135 /** Typedef of the first base class of BeamParticleData. */ 0136 typedef ParticleData NthBase; 0137 }; 0138 0139 /** This template specialization informs ThePEG about the name of the 0140 * BeamParticleData class. */ 0141 template <> 0142 struct ClassTraits<BeamParticleData>: 0143 public ClassTraitsBase<BeamParticleData> { 0144 /** Return a platform-independent class name */ 0145 static string className() { return "ThePEG::BeamParticleData"; } 0146 }; 0147 0148 /** @endcond */ 0149 0150 } 0151 0152 #endif /* ThePEG_BeamParticleData_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|