thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
ReweightConstant.h
1 // -*- C++ -*-
2 //
3 // ReweightConstant.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_ReweightConstant_H
10 #define THEPEG_ReweightConstant_H
11 //
12 // This is the declaration of the ReweightConstant class.
13 //
14 
15 #include "ThePEG/MatrixElement/ReweightBase.h"
16 
17 namespace ThePEG {
18 
27 
28 public:
29 
35  ReweightConstant() : C(1.0) {}
37 
38 public:
39 
44  virtual double weight() const;
45 
46 public:
47 
54  void persistentOutput(PersistentOStream & os) const;
55 
61  void persistentInput(PersistentIStream & is, int version);
63 
70  static void Init();
71 
72 protected:
73 
80  virtual IBPtr clone() const;
81 
86  virtual IBPtr fullclone() const;
88 
89 private:
90 
94  double C;
95 
96 private:
97 
103 
108  ReweightConstant & operator=(const ReweightConstant &) = delete;
109 
110 };
111 
112 }
113 
114 #include "ThePEG/Utilities/ClassTraits.h"
115 
116 namespace ThePEG {
117 
122 template <>
123 struct BaseClassTrait<ReweightConstant,1> {
125  typedef ReweightBase NthBase;
126 };
127 
130 template <>
131 struct ClassTraits<ReweightConstant>
132  : public ClassTraitsBase<ReweightConstant> {
134  static string className() { return "ThePEG::ReweightConstant"; }
138  static string library() { return "ReweightConstant.so"; }
139 };
140 
143 }
144 
145 #endif /* THEPEG_ReweightConstant_H */
PersistentIStream is used to read persistent objects from a stream where they were previously written...
double C
The constant to reweight with.
ReweightConstant()
The default constructor.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
static void Init()
The standard Init function used to initialize the interfaces.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
ReweightConstant & operator=(const ReweightConstant &)=delete
The assignment operator is private and must never be called.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
static ClassDescription< ReweightConstant > initReweightConstant
The static object used to initialize the description of this class.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
virtual IBPtr clone() const
Make a simple clone of this object.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
The ReweightConstant class is a simple ReweightBase sub-class which simply reweight an event with a c...
virtual double weight() const
Return the wieght for the kinematical configuation provided by the assigned XComb object (in the Last...
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
The ReweightBase class is the base class of all objects representing external biases to matrix elemen...
Definition: ReweightBase.h:39
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