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 <>
153 struct ClassTraits<ConstituentParticleData>:
154  public ClassTraitsBase<ConstituentParticleData> {
156  static string className() { return "ThePEG::ConstituentParticleData"; }
157 };
158 
161 }
162 
163 #endif /* ThePEG_ConstituentParticleData_H */