thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.1.5
QuarksToHadronsDecayer.h
1 // -*- C++ -*-
2 //
3 // QuarksToHadronsDecayer.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2017 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_QuarksToHadronsDecayer_H
10 #define THEPEG_QuarksToHadronsDecayer_H
11 // This is the declaration of the QuarksToHadronsDecayer class.
12 
13 #include "ThePEG/PDT/Decayer.h"
14 #include "ThePEG/Handlers/FlavourGenerator.h"
15 
16 namespace ThePEG {
17 
19 
36 
37 public:
38 
45  : theFixedN(0), theMinN(2), theC1(4.5), theC2(0.7*GeV), theC3(0.0) {}
46 
50  virtual ~QuarksToHadronsDecayer();
52 
53 public:
54 
64  virtual bool accept(const DecayMode & dm) const;
65 
72  virtual ParticleVector decay(const DecayMode & dm, const Particle & p) const;
74 
80  virtual int getN(Energy m0, Energy summq, int Nq) const;
81 
86  virtual PVector getHadrons(int Nh, tcPDVector quarks) const;
87 
93  virtual void distribute(const Particle & parent, PVector & children) const;
94 
100  virtual double reweight(const Particle & parent,
101  const PVector & children) const;
102 
103 public:
104 
110  int fixedN() const { return theFixedN; }
111 
115  int minN() const { return theMinN; }
116 
121  double c1() const { return theC1; }
122 
127  Energy c2() const { return theC2; }
128 
133  double c3() const { return theC3; }
134 
139 
140 public:
141 
142 
149  void persistentOutput(PersistentOStream & os) const;
150 
156  void persistentInput(PersistentIStream & is, int version);
158 
162  static void Init();
163 
164 protected:
165 
166 
167 protected:
168 
175  virtual IBPtr clone() const;
176 
181  virtual IBPtr fullclone() const;
183 
184 private:
185 
191 
195  int theMinN;
196 
200  double theC1;
205 
209  double theC3;
210 
216 
217 private:
218 
223 
228 
229 };
230 
231 }
232 
233 
234 namespace ThePEG {
235 
240 template <>
241 struct BaseClassTrait<QuarksToHadronsDecayer,1>: public ClassTraitsType {
243  typedef Decayer NthBase;
244 };
245 
249 template <>
250 struct ClassTraits<QuarksToHadronsDecayer>
251  : public ClassTraitsBase<QuarksToHadronsDecayer> {
253  static string className() { return "ThePEG::QuarksToHadronsDecayer"; }
257  static string library() { return "QuarksToHadronsDecayer.so"; }
258 };
259 
262 }
263 
264 #endif /* THEPEG_QuarksToHadronsDecayer_H */
PersistentIStream is used to read persistent objects from a stream where they were previously written...
virtual bool accept(const DecayMode &dm) const
Check if this decayer can perfom the decay specified by the given decay mode.
The Particle class is used to describe an instance of a particle.
Definition: Particle.h:83
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
double theC3
The parameter of the multiplicity distribution.
double c3() const
Return the parameter used for the multiplicity distriution.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual double reweight(const Particle &parent, const PVector &children) const
Called by distribute() to reweight the default flat phase spece.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
virtual void distribute(const Particle &parent, PVector &children) const
Distribute the produced children in phase space.
int theMinN
The minimum hadrons to be produced.
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
Energy theC2
The parameter of the multiplicity distribution.
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
double c1() const
Return the parameter used for the multiplicity distriution.
virtual ~QuarksToHadronsDecayer()
Destructor.
Energy c2() const
Return the parameter used for the multiplicity distriution.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
virtual PVector getHadrons(int Nh, tcPDVector quarks) const
Produce Nh hadrons from the specified quarks.
#define ThePEG_DECLARE_CLASS_POINTERS(full, abbrev)
This macro helps us to declare pointers and stuff to standard classes.
Definition: Pointers.h:58
FlavourGenerator is an abstract base class to be used to implement models describing the quark conten...
static ClassDescription< QuarksToHadronsDecayer > initQuarksToHadronsDecayer
Describe a concrete class with persistent data.
QuarksToHadronsDecayer()
Default constructor.
FlavGenPtr theFlavourGenerator
The object in charge of generating hadrons spieces from given quark flavours.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
double theC1
The parameter of the multiplicity distribution.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
int fixedN() const
Return the fixed number of hadrons to be produced.
QuarksToHadronsDecayer & operator=(const QuarksToHadronsDecayer &)=delete
Private and non-existent assignment operator.
static void Init()
Standard Init function used to initialize the interfaces.
int minN() const
Return the minimum number of hadrons to be produced.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
The DecayMode class describes a decay channel of a particle.
Definition: DecayMode.h:87
virtual int getN(Energy m0, Energy summq, int Nq) const
Get the number of hadrons to be produced, given the mass of the decaying particle, m0, and the number, Nq and summed masses of the quarks, summq.
tcFlavGenPtr flavourGenerator() const
Return a pointer to the flavour generator to be used.
virtual IBPtr clone() const
Make a simple clone of this object.
Decayer is an abstract base class to specify objects modelling the decay of a particle.
Definition: Decayer.h:29
The QuarksToHadronsDecayer class inherits from Decayer and is able to decay particles to (2 or 4) qu...
vector< PPtr > ParticleVector
A vector of pointers to Particle objects.
Definition: Containers.h:73
vector< PPtr > PVector
A vector of pointers to Particle objects.
Definition: Containers.h:76
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
int theFixedN
The fixed number of hadrons to be produced.
virtual ParticleVector decay(const DecayMode &dm, const Particle &p) const
Perform a decay for a given DecayMode and a given Particle instance.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52