thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
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
17namespace ThePEG {
18
27
28public:
29
35 ReweightConstant() : C(1.0) {}
37
38public:
39
44 virtual double weight() const;
45
46public:
47
55
61 void persistentInput(PersistentIStream & is, int version);
63
70 static void Init();
71
72protected:
73
80 virtual IBPtr clone() const;
81
86 virtual IBPtr fullclone() const;
88
89private:
90
94 double C;
95
96private:
97
103
109
110};
111
112}
113
114#include "ThePEG/Utilities/ClassTraits.h"
115
116namespace ThePEG {
117
122template <>
123struct BaseClassTrait<ReweightConstant,1> {
125 typedef ReweightBase NthBase;
126};
127
130template <>
131struct 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 */
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
The ReweightBase class is the base class of all objects representing external biases to matrix elemen...
Definition: ReweightBase.h:39
The ReweightConstant class is a simple ReweightBase sub-class which simply reweight an event with a c...
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual double weight() const
Return the wieght for the kinematical configuation provided by the assigned XComb object (in the Last...
double C
The constant to reweight with.
ReweightConstant()
The default constructor.
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.
virtual IBPtr clone() const
Make a simple clone of this object.
static void Init()
The standard Init function used to initialize the interfaces.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
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
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
static string className()
Return the name of class T.
Definition: ClassTraits.h:66
static string library()
The name of a file containing the dynamic library where the class T is implemented.
Definition: ClassTraits.h:85