|
|
|||
File indexing completed on 2026-08-06 09:38:29
0001 // -*- C++ -*- 0002 // 0003 // RemnantData.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_RemnantData_H 0010 #define THEPEG_RemnantData_H 0011 // 0012 // This is the declaration of the RemnantData class. 0013 // 0014 0015 #include "ThePEG/PDT/ParticleData.h" 0016 #include "ThePEG/PDT/RemnantData.fh" 0017 #include "ThePEG/PDT/RemnantDecayer.fh" 0018 #include "ThePEG/PDT/DecayMode.h" 0019 0020 namespace ThePEG { 0021 0022 /** 0023 * The RemnantData class is not a normal ParticleData class. It should 0024 * never be handled directly by the interface but is automatically 0025 * created and assigned to an object of the SoftRemnant sub-class of 0026 * Particle. The SoftRemnant in turn is not a proper Particle, but 0027 * rather a place holder for what is left of a colliding particle 0028 * after one or several partons has been extracted. To be able to 0029 * retrieve properties of the SoftRemnant through its ParticleData the 0030 * RemnantData is used to dynamically keep track of this. 0031 * 0032 * The RemnantData is initialized by the ParticleData corresponding to 0033 * the colliding particle. For each particle which is extracted the 0034 * charge charge is changed accordingly. Also the colour charge is 0035 * changed, but only such that the coloured(), hasColour() and 0036 * hasAntiColour() returns relevant information. The actual colour can 0037 * only be singlet, (anti-)triplet or octet. 0038 * 0039 * When created the RemnantData object must be given a RemnantDecayer 0040 * object and a single DecayMode object will be created with this 0041 * Decayer. 0042 * 0043 * @see \ref RemnantDataInterfaces "The interfaces" 0044 * defined for RemnantData. 0045 */ 0046 class RemnantData: public ParticleData { 0047 0048 public: 0049 0050 /** @name Standard constructors and destructors. */ 0051 //@{ 0052 /** 0053 * The standard constructor takes as argument the \a particle type 0054 * for which this is the remnant and a \a decayer capable of 0055 * performing the decay. 0056 */ 0057 RemnantData(tcPDPtr particle, RemDecPtr decayer); 0058 //@} 0059 0060 public: 0061 0062 /** 0063 * The Decayer responsible for for the decay of this remnant. 0064 */ 0065 const RemnantDecayer & decayer() const { 0066 return *theDecayer; 0067 }; 0068 0069 /** 0070 * Modify the properties to reflect that the given \a parton was 0071 * extracted. 0072 */ 0073 bool extract(tcPDPtr parton); 0074 0075 /** 0076 * Modify the properties to reflect that the given \a parton which was 0077 * previously extracted is removed. 0078 */ 0079 bool remove(tcPDPtr parton); 0080 0081 /** 0082 * Modify the properties to reflect that the previously extracted 0083 * parton, \a oldp, was evolved backwards to the the parton \a newp. 0084 */ 0085 bool reextract(tcPDPtr oldp, tcPDPtr newp); 0086 0087 protected: 0088 /** 0089 * Modify the colour to reflect that the given \a parton was 0090 * extracted. 0091 */ 0092 bool fixColour(); 0093 0094 public: 0095 0096 /** @name Functions used by the persistent I/O system. */ 0097 //@{ 0098 /** 0099 * Function used to write out object persistently. 0100 * @param os the persistent output stream written to. 0101 */ 0102 void persistentOutput(PersistentOStream & os) const; 0103 0104 /** 0105 * Function used to read in object persistently. 0106 * @param is the persistent input stream read from. 0107 * @param version the version number of the object when written. 0108 */ 0109 void persistentInput(PersistentIStream & is, int version); 0110 //@} 0111 0112 /** 0113 * The standard Init function used to initialize the interfaces. 0114 * Called exactly once for each class by the class description system 0115 * before the main function starts or 0116 * when this class is dynamically loaded. 0117 */ 0118 static void Init(); 0119 0120 protected: 0121 0122 /** @name Clone Methods. */ 0123 //@{ 0124 /** 0125 * Make a simple clone of this object. 0126 * @return a pointer to the new object. 0127 */ 0128 virtual IBPtr clone() const; 0129 0130 /** Make a clone of this object, possibly modifying the cloned object 0131 * to make it sane. 0132 * @return a pointer to the new object. 0133 */ 0134 virtual IBPtr fullclone() const; 0135 //@} 0136 0137 0138 // If needed, insert declarations of virtual function defined in the 0139 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs). 0140 0141 0142 private: 0143 0144 /** 0145 * The particle type of the parent. 0146 */ 0147 tcPDPtr parentPD; 0148 0149 /** 0150 * The Decayer responsible for for the decay of this remnant. 0151 */ 0152 RemDecPtr theDecayer; 0153 0154 /** 0155 * The only DecayMode available for this remnant. 0156 */ 0157 DMPtr decayMode; 0158 0159 /** 0160 * The set of extracted particle types. 0161 */ 0162 multiset<tcPDPtr> extracted; 0163 0164 protected: 0165 0166 /** 0167 * The default constructor is protected and must only be used by the 0168 * PersistentIStream class via the ClassTraits<RemnantData> class. 0169 */ 0170 RemnantData() {} 0171 0172 /** 0173 * The ClassTraits<RemnantData> class must be a friend to be able to 0174 * use the private default constructor. 0175 */ 0176 friend struct ClassTraits<RemnantData>; 0177 0178 private: 0179 0180 /** 0181 * The static object used to initialize the description of this class. 0182 * Indicates that this is a concrete class with persistent data. 0183 */ 0184 static ClassDescription<RemnantData> initRemnantData; 0185 0186 /** 0187 * The assignment operator is private and must never be called. 0188 * In fact, it should not even be implemented. 0189 */ 0190 RemnantData & operator=(const RemnantData &) = delete; 0191 0192 }; 0193 0194 } 0195 0196 #include "ThePEG/Utilities/ClassTraits.h" 0197 0198 namespace ThePEG { 0199 0200 /** @cond TRAITSPECIALIZATIONS */ 0201 0202 /** This template specialization informs ThePEG about the 0203 * base classes of RemnantData. */ 0204 template <> 0205 struct BaseClassTrait<RemnantData,1> { 0206 /** Typedef of the first base class of RemnantData. */ 0207 typedef ParticleData NthBase; 0208 }; 0209 0210 /** This template specialization informs ThePEG about the name of 0211 * the RemnantData class and the shared object where it is defined. */ 0212 template <> 0213 struct ClassTraits<RemnantData> 0214 : public ClassTraitsBase<RemnantData> { 0215 /** Return a platform-independent class name */ 0216 static string className() { return "ThePEG::RemnantData"; } 0217 /** Create a Particle object. */ 0218 static TPtr create() { return TPtr::Create(RemnantData()); } 0219 }; 0220 0221 /** @endcond */ 0222 0223 } 0224 0225 #endif /* THEPEG_RemnantData_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|