thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
RemnantData.h
1 // -*- C++ -*-
2 //
3 // RemnantData.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_RemnantData_H
10 #define THEPEG_RemnantData_H
11 //
12 // This is the declaration of the RemnantData class.
13 //
14 
15 #include "ThePEG/PDT/ParticleData.h"
16 #include "ThePEG/PDT/RemnantData.fh"
17 #include "ThePEG/PDT/RemnantDecayer.fh"
18 #include "ThePEG/PDT/DecayMode.h"
19 
20 namespace ThePEG {
21 
46 class RemnantData: public ParticleData {
47 
48 public:
49 
57  RemnantData(tcPDPtr particle, RemDecPtr decayer);
59 
60 public:
61 
65  const RemnantDecayer & decayer() const {
66  return *theDecayer;
67  };
68 
73  bool extract(tcPDPtr parton);
74 
79  bool remove(tcPDPtr parton);
80 
85  bool reextract(tcPDPtr oldp, tcPDPtr newp);
86 
87 protected:
92  bool fixColour();
93 
94 public:
95 
102  void persistentOutput(PersistentOStream & os) const;
103 
109  void persistentInput(PersistentIStream & is, int version);
111 
118  static void Init();
119 
120 protected:
121 
128  virtual IBPtr clone() const;
129 
134  virtual IBPtr fullclone() const;
136 
137 
138 // If needed, insert declarations of virtual function defined in the
139 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
140 
141 
142 private:
143 
148 
152  RemDecPtr theDecayer;
153 
158 
162  multiset<tcPDPtr> extracted;
163 
164 protected:
165 
171 
176  friend struct ClassTraits<RemnantData>;
177 
178 private:
179 
185 
190  RemnantData & operator=(const RemnantData &) = delete;
191 
192 };
193 
194 }
195 
196 #include "ThePEG/Utilities/ClassTraits.h"
197 
198 namespace ThePEG {
199 
204 template <>
205 struct BaseClassTrait<RemnantData,1> {
207  typedef ParticleData NthBase;
208 };
209 
212 template <>
213 struct ClassTraits<RemnantData>
214  : public ClassTraitsBase<RemnantData> {
216  static string className() { return "ThePEG::RemnantData"; }
218  static TPtr create() { return TPtr::Create(RemnantData()); }
219 };
220 
223 }
224 
225 #endif /* THEPEG_RemnantData_H */
The RemnantData class is not a normal ParticleData class.
Definition: RemnantData.h:46
PersistentIStream is used to read persistent objects from a stream where they were previously written...
virtual IBPtr clone() const
Make a simple clone of this object.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
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
RemnantData & operator=(const RemnantData &)=delete
The assignment operator is private and must never be called.
bool reextract(tcPDPtr oldp, tcPDPtr newp)
Modify the properties to reflect that the previously extracted parton, oldp, was evolved backwards to...
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
The RemnantDecayer class is the base class to be used for all decayers capable of decaying a RemnantP...
static ClassDescription< RemnantData > initRemnantData
The static object used to initialize the description of this class.
Definition: RemnantData.h:184
RemnantData()
The default constructor is protected and must only be used by the PersistentIStream class via the Cla...
Definition: RemnantData.h:170
ParticleData inherits from InterfacedBase and represents the properties of a particle type...
Definition: ParticleData.h:36
const RemnantDecayer & decayer() const
The Decayer responsible for for the decay of this remnant.
Definition: RemnantData.h:65
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
bool extract(tcPDPtr parton)
Modify the properties to reflect that the given parton was extracted.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
static void Init()
The standard Init function used to initialize the interfaces.
tcPDPtr parentPD
The particle type of the parent.
Definition: RemnantData.h:147
multiset< tcPDPtr > extracted
The set of extracted particle types.
Definition: RemnantData.h:162
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
RemDecPtr theDecayer
The Decayer responsible for for the decay of this remnant.
Definition: RemnantData.h:152
bool fixColour()
Modify the colour to reflect that the given parton was extracted.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52
DMPtr decayMode
The only DecayMode available for this remnant.
Definition: RemnantData.h:157