ThePEG  1.8.0
WeakToHadronsDecayer.h
1 // -*- C++ -*-
2 //
3 // WeakToHadronsDecayer.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_WeakToHadronsDecayer_H
10 #define THEPEG_WeakToHadronsDecayer_H
11 // This is the declaration of the WeakToHadronsDecayer class.
12 
13 #include "ThePEG/PDT/QuarksToHadronsDecayer.h"
14 
15 namespace ThePEG {
16 
32 
33 public:
34 
45  virtual bool accept(const DecayMode & dm) const;
46 
52  virtual double reweight(const Particle & parent,
53  const PVector & children) const;
54 
59  virtual PVector getHadrons(int Nh, tcPDVector quarks) const;
61 
62 public:
63 
64 
71  void persistentOutput(PersistentOStream & os) const;
72 
78  void persistentInput(PersistentIStream & is, int version);
80 
84  static void Init();
85 
86 protected:
87 
94  virtual IBPtr clone() const;
95 
100  virtual IBPtr fullclone() const;
102 
103 private:
104 
109 
114 
115 };
116 
117 }
118 
119 
120 namespace ThePEG {
121 
126 template <>
127 struct BaseClassTrait<WeakToHadronsDecayer,1>: public ClassTraitsType {
129  typedef QuarksToHadronsDecayer NthBase;
130 };
131 
135 template <>
136 struct ClassTraits<WeakToHadronsDecayer>
137  : public ClassTraitsBase<WeakToHadronsDecayer> {
139  static string className() { return "ThePEG::WeakToHadronsDecayer"; }
143  static string library() { return "WeakToHadronsDecayer.so"; }
144 };
145 
148 }
149 
150 #endif /* THEPEG_WeakToHadronsDecayer_H */
PersistentIStream is used to read persistent objects from a stream where they were previously written...
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
The Particle class is used to describe an instance of a particle.
Definition: Particle.h:83
static ClassDescription< WeakToHadronsDecayer > initWeakToHadronsDecayer
Describe a concrete class with persistent data.
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...
vector< tcPDPtr > tcPDVector
A vector of transient pointers to const ParticleData objects.
Definition: Containers.h:42
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
virtual IBPtr clone() const
Make a simple clone of this object.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
WeakToHadronsDecayer & operator=(const WeakToHadronsDecayer &)
Private and non-existent assignment operator.
The WeakToHadronsDecayer class inherits from QuarksToHadronsDecayer and can performs weak decays of t...
static string library()
The name of a file containing the dynamic library where the class T is implemented.
Definition: ClassTraits.h:85
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
static void Init()
Standard Init function used to initialize the interfaces.
virtual bool accept(const DecayMode &dm) const
Check if this decayer can perfom the decay specified by the given decay mode.
The DecayMode class describes a decay channel of a particle.
Definition: DecayMode.h:87
static string className()
Return the name of class T.
Definition: ClassTraits.h:66
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
virtual PVector getHadrons(int Nh, tcPDVector quarks) const
Produce Nh hadrons from the specified quarks.
The QuarksToHadronsDecayer class inherits from Decayer and is able to decay particles to (2 or 4) qu...
vector< PPtr > PVector
A vector of pointers to Particle objects.
Definition: Containers.h:76
virtual double reweight(const Particle &parent, const PVector &children) const
Called by QuarksToHadronsDecayer::distribute() to reweight the default flat phase spece...