thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
ConstituentParticleData.h
1// -*- C++ -*-
2//
3// ConstituentParticleData.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_ConstituentParticleData_H
10#define ThePEG_ConstituentParticleData_H
11// This is the declaration of the ConstituentParticleData class.
12
13#include "ThePEG/PDT/ParticleData.h"
14
15namespace ThePEG {
16
26
27public:
28
37
44 static PDPtr Create(long newId, string newPDGName);
45
49 static PDPair Create(long newId, string newPDGName, string newAntiPDGName);
51
52public:
53
57 virtual Energy constituentMass() const { return theConstituentMass; }
58
59public:
60
68
74 void persistentInput(PersistentIStream & is, int version);
76
80 static void Init();
81
82protected:
83
88 ConstituentParticleData(long newId, string newPDGName);
89
95 virtual void readSetup(istream & is);
96
100 virtual PDPtr pdclone() const;
101
102private:
103
108
113
114private:
115
120
125
126private:
127
132
137
138};
139
144template <>
147 typedef ParticleData NthBase;
148};
149
152template <>
153struct ClassTraits<ConstituentParticleData>:
154 public ClassTraitsBase<ConstituentParticleData> {
156 static string className() { return "ThePEG::ConstituentParticleData"; }
157};
158
161}
162
163#endif /* ThePEG_ConstituentParticleData_H */
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
ConstituentParticleData inherits from the ParticleData class and is used for quarks,...
ConstituentParticleData & operator=(const ConstituentParticleData &)=delete
Private and non-existent assignment operator.
Energy theConstituentMass
The constituent mass of this parton.
virtual Energy constituentMass() const
Return the constituent mass of this parton.
ConstituentParticleData()
Default constructor.
ConstituentParticleData(long newId, string newPDGName)
Protected constructor only to be used by subclasses or by the Create method.
static ClassDescription< ConstituentParticleData > initConstituentParticleData
Describe a concrete class with persistent data.
static PDPair Create(long newId, string newPDGName, string newAntiPDGName)
Create a particle - anti particle pair.
static PDPtr Create(long newId, string newPDGName)
Create a Particle which is its own anti-particle.
void setConstituentMass(Energy m)
Utility function for the interface.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Energy defConstituentMass() const
Utility function for the interface.
Energy theDefaultConstituentMass
The default constituent mass of this parton.
virtual PDPtr pdclone() const
ParticleData clone method.
virtual void readSetup(istream &is)
Read setup info from a standard stream.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
static void Init()
Standard Init function used to initialize the interface.
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
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
constexpr ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
Definition: PhysicalQty.h:35
pair< PDPtr, PDPtr > PDPair
A pair of pointers to ParticleData objects.
Definition: Containers.h:115
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
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
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30