thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
GaussianPtGenerator.h
1 // -*- C++ -*-
2 //
3 // GaussianPtGenerator.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_GaussianPtGenerator_H
10 #define THEPEG_GaussianPtGenerator_H
11 // This is the declaration of the GaussianPtGenerator class.
12 
13 #include "ThePEG/Handlers/PtGenerator.h"
14 
15 namespace ThePEG {
16 
26 
27 public:
28 
34  GaussianPtGenerator() : theSigma(1.0*GeV), theUpperCut(5.0*GeV) {}
35 
39  virtual ~GaussianPtGenerator();
41 
42 public:
43 
53  virtual TransverseMomentum generate() const;
55 
56 public:
57 
64  void persistentOutput(PersistentOStream & os) const;
65 
71  void persistentInput(PersistentIStream & is, int version);
73 
77  static void Init();
78 
79 protected:
80 
87  virtual IBPtr clone() const;
88 
93  virtual IBPtr fullclone() const;
95 
96 private:
97 
103 
108 
109 private:
110 
115 
120 
121 };
122 
123 }
124 
125 
126 #include "ThePEG/Utilities/ClassTraits.h"
127 
128 namespace ThePEG {
129 
136 template <>
137 struct BaseClassTrait<GaussianPtGenerator,1>: public ClassTraitsType {
139  typedef PtGenerator NthBase;
140 };
141 
147 template <>
148 struct ClassTraits<GaussianPtGenerator>
149  : public ClassTraitsBase<GaussianPtGenerator> {
151  static string className() { return "ThePEG::GaussianPtGenerator"; }
155  static string library() { return "GaussianPtGenerator.so"; }
156 
157 };
158 
161 }
162 
163 #endif /* THEPEG_GaussianPtGenerator_H */
GaussianPtGenerator inherits from the abstract PtGenerator class.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
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...
GaussianPtGenerator()
Default constructor.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
PtGenerator is the base for all classes implementing alternative models for transverse momentum gener...
Definition: PtGenerator.h:29
Energy theSigma
The width of the Gaussian distribution.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Energy theUpperCut
Upper cutoff for the transverse momentum distribution.
virtual IBPtr clone() const
Make a simple clone of this object.
static void Init()
Standard Init function used to initialize the interfaces.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual TransverseMomentum generate() const
Generate ( ) components of the transverse momentum.
static ClassDescription< GaussianPtGenerator > initGaussianPtGenerator
Describe a concrete class with persistent data.
GaussianPtGenerator & operator=(const GaussianPtGenerator &)=delete
Private and non-existent assignment operator.
virtual ~GaussianPtGenerator()
Destructor.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52