thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
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
20namespace ThePEG {
21
47
48public:
49
57 RemnantData(tcPDPtr particle, RemDecPtr decayer);
59
60public:
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
87protected:
92 bool fixColour();
93
94public:
95
103
109 void persistentInput(PersistentIStream & is, int version);
111
118 static void Init();
119
120protected:
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
142private:
143
148
152 RemDecPtr theDecayer;
153
158
162 multiset<tcPDPtr> extracted;
163
164protected:
165
171
176 friend struct ClassTraits<RemnantData>;
177
178private:
179
185
190 RemnantData & operator=(const RemnantData &) = delete;
191
192};
193
194}
195
196#include "ThePEG/Utilities/ClassTraits.h"
197
198namespace ThePEG {
199
204template <>
205struct BaseClassTrait<RemnantData,1> {
207 typedef ParticleData NthBase;
208};
209
212template <>
213struct 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 */
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
ParticleData inherits from InterfacedBase and represents the properties of a particle type.
Definition: ParticleData.h:36
PersistentIStream is used to read persistent objects from a stream where they were previously written...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
static RCPtr Create()
Allocate and construct an object of class T and return a RCPtr to it.
Definition: RCPtr.h:120
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
The RemnantData class is not a normal ParticleData class.
Definition: RemnantData.h:46
bool reextract(tcPDPtr oldp, tcPDPtr newp)
Modify the properties to reflect that the previously extracted parton, oldp, was evolved backwards to...
RemnantData()
The default constructor is protected and must only be used by the PersistentIStream class via the Cla...
Definition: RemnantData.h:170
RemnantData(tcPDPtr particle, RemDecPtr decayer)
The standard constructor takes as argument the particle type for which this is the remnant and a deca...
multiset< tcPDPtr > extracted
The set of extracted particle types.
Definition: RemnantData.h:162
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
bool remove(tcPDPtr parton)
Modify the properties to reflect that the given parton which was previously extracted is removed.
RemnantData & operator=(const RemnantData &)=delete
The assignment operator is private and must never be called.
RemDecPtr theDecayer
The Decayer responsible for for the decay of this remnant.
Definition: RemnantData.h:152
bool extract(tcPDPtr parton)
Modify the properties to reflect that the given parton was extracted.
tcPDPtr parentPD
The particle type of the parent.
Definition: RemnantData.h:147
virtual IBPtr clone() const
Make a simple clone of this object.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
static void Init()
The standard Init function used to initialize the interfaces.
const RemnantDecayer & decayer() const
The Decayer responsible for for the decay of this remnant.
Definition: RemnantData.h:65
DMPtr decayMode
The only DecayMode available for this remnant.
Definition: RemnantData.h:157
bool fixColour()
Modify the colour to reflect that the given parton was extracted.
static ClassDescription< RemnantData > initRemnantData
The static object used to initialize the description of this class.
Definition: RemnantData.h:184
The RemnantDecayer class is the base class to be used for all decayers capable of decaying a RemnantP...
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
static string className()
Return the name of class T.
Definition: ClassTraits.h:66
static TPtr create()
Create a T object and return a smart pointer to it.
Definition: ClassTraits.h:60
ThePEG::Ptr< T >::pointer TPtr
Alias for a reference counted pointer to T .
Definition: ClassTraits.h:54
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134