ThePEG  1.8.0
ConstituentParticleData.h
1 // -*- C++ -*-
2 //
3 // ConstituentParticleData.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2011 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 2 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 
15 namespace ThePEG {
16 
25 class ConstituentParticleData: public virtual ParticleData {
26 
27 public:
28 
37 
44  static PDPtr Create(long newId, string newPDGName);
45 
49  static PDPair Create(long newId, string newPDGName, string newAntiPDGName);
51 
52 public:
53 
57  virtual Energy constituentMass() const { return theConstituentMass; }
58 
59 public:
60 
67  void persistentOutput(PersistentOStream & os) const;
68 
74  void persistentInput(PersistentIStream & is, int version);
76 
80  static void Init();
81 
82 protected:
83 
88  ConstituentParticleData(long newId, string newPDGName);
89 
95  virtual void readSetup(istream & is);
96 
100  virtual PDPtr pdclone() const;
101 
102 private:
103 
107  void setConstituentMass(Energy m);
108 
112  Energy defConstituentMass() const;
113 
114 private:
115 
120 
125 
126 private:
127 
132 
137 
138 };
139 
144 template <>
147  typedef ParticleData NthBase;
148 };
149 
152 template <>
154  public ClassTraitsBase<ConstituentParticleData> {
156  static string className() { return "ThePEG::ConstituentParticleData"; }
157 };
158 
161 }
162 
163 #endif /* ThePEG_ConstituentParticleData_H */
ConstituentParticleData & operator=(const ConstituentParticleData &)
Private and non-existent assignment operator.
static void Init()
Standard Init function used to initialize the interface.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
ConstituentParticleData inherits from the ParticleData class and is used for quarks, diquarks and gluons to store information about their constituent mass.
virtual Energy constituentMass() const
Return the constituent mass of this parton.
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
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...
virtual void readSetup(istream &is)
Read setup info from a standard stream.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
Energy theDefaultConstituentMass
The default constituent mass of this parton.
ParticleData inherits from InterfacedBase and represents the properties of a particle type...
Definition: ParticleData.h:36
Energy defConstituentMass() const
Utility function for the interface.
void setConstituentMass(Energy m)
Utility function for the interface.
QTY< 0, 1, 0 >::Type Energy
Energy.
Definition: Unitsystem.h:34
ConstituentParticleData()
Default constructor.
pair< PDPtr, PDPtr > PDPair
A pair of pointers to ParticleData objects.
Definition: Containers.h:115
static ClassDescription< ConstituentParticleData > initConstituentParticleData
Describe a concrete class with persistent data.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
Energy theConstituentMass
The constituent mass of this parton.
const ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
Definition: PhysicalQty.h:33
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
static PDPtr Create(long newId, string newPDGName)
Create a Particle which is its own anti-particle.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
virtual PDPtr pdclone() const
ParticleData clone method.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52