thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
RemnantParticle.h
1 // -*- C++ -*-
2 //
3 // RemnantParticle.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_RemnantParticle_H
10 #define THEPEG_RemnantParticle_H
11 //
12 // This is the declaration of the RemnantParticle class.
13 //
14 
15 #include "ThePEG/EventRecord/Particle.h"
16 #include "RemnantParticle.fh"
17 #include "ThePEG/PDT/RemnantData.fh"
18 #include "ThePEG/PDT/RemnantDecayer.fh"
19 
20 namespace ThePEG {
21 
25 class RemnantParticle: public Particle {
26 
27 public:
28 
32  friend class RemnantDecayer;
33 
34 public:
35 
44  RemnantParticle(const Particle & particle, RemDecPtr decayer,
45  tPPtr parton = tPPtr());
46 
47 public:
48 
54  bool extract(tPPtr parton, bool fixcolour = false);
55 
62  bool reextract(tPPtr oldp, tPPtr newp, bool fixcolour = false);
63 
68  bool remove(tPPtr parton);
69 
73  const PVector & extracted() const {
74  return theExtracted;
75  }
76 
77 public:
78 
85  void persistentOutput(PersistentOStream & os) const;
86 
92  void persistentInput(PersistentIStream & is, int version);
94 
101  static void Init();
102 
103 protected:
104 
108  void fixColourLines(tPPtr parton);
109 
110 private:
111 
115  RemPDPtr remData;
116 
121 
126 
127 protected:
128 
134 
139  friend struct ClassTraits<RemnantParticle>;
140 
141 private:
142 
148 
153  RemnantParticle & operator=(const RemnantParticle &) = delete;
154 
155 };
156 
157 }
158 
159 #include "ThePEG/Utilities/ClassTraits.h"
160 
161 namespace ThePEG {
162 
167 template <>
168 struct BaseClassTrait<RemnantParticle,1> {
170  typedef Particle NthBase;
171 };
172 
175 template <>
176 struct ClassTraits<RemnantParticle>
177  : public ClassTraitsBase<RemnantParticle> {
179  static string className() { return "ThePEG::RemnantParticle"; }
181  static TPtr create() { return TPtr::Create(RemnantParticle()); }
182 };
183 
186 }
187 
188 #endif /* THEPEG_RemnantParticle_H */
PersistentIStream is used to read persistent objects from a stream where they were previously written...
tcPPtr parent
The parent from which this remnant resulted.
Here is the documentation of the RemnantParticle class.
RemPDPtr remData
The RemnantData object associated to this remnant.
The Particle class is used to describe an instance of a particle.
Definition: Particle.h:83
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
void fixColourLines(tPPtr parton)
If necessary, colour-connect this remnant to the given parton.
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
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
The RemnantDecayer class is the base class to be used for all decayers capable of decaying a RemnantP...
bool extract(tPPtr parton, bool fixcolour=false)
Modify the properties to reflect that the given parton was extracted.
ThePEG::Ptr< Particle >::transient_pointer tPPtr
Alias for a transient pointer to Particle .
Definition: Pointers.h:67
RemnantParticle()
Private default constructor must only be used by the PersistentIStream class via the ClassTraits<Remn...
static ClassDescription< RemnantParticle > initRemnantParticle
The static object used to initialize the description of this class.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
bool reextract(tPPtr oldp, tPPtr newp, bool fixcolour=false)
Modify the properties to reflect that the previously extracted parton, oldp, was evolved backwards to...
const PVector & extracted() const
Acces the extracted partons.
vector< PPtr > PVector
A vector of pointers to Particle objects.
Definition: Containers.h:76
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
PVector theExtracted
The set of extracted partons.
static void Init()
The standard Init function used to initialize the interfaces.
RemnantParticle & operator=(const RemnantParticle &)=delete
The assignment operator is private and must never be called.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52