thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
ReweightBase.h
1 // -*- C++ -*-
2 //
3 // ReweightBase.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_ReweightBase_H
10 #define ThePEG_ReweightBase_H
11 // This is the declaration of the ReweightBase class.
12 
13 #include "ThePEG/Handlers/HandlerBase.h"
14 #include "ThePEG/EventRecord/SubProcess.h"
15 #include "ThePEG/Handlers/LastXCombInfo.h"
16 #include "ThePEG/Handlers/StandardXComb.fh"
17 
18 namespace ThePEG {
19 
39 class ReweightBase: public HandlerBase, public LastXCombInfo<> {
40 
41 public:
42 
45 
49  virtual ~ReweightBase();
51 
52 public:
53 
58  virtual double weight() const = 0;
59 
64  void setXComb(tXCombPtr xc);
65 
66 public:
67 
74  void persistentOutput(PersistentOStream & os) const;
75 
81  void persistentInput(PersistentIStream & is, int version);
83 
87  static void Init();
88 
89 private:
90 
95 
99  ReweightBase & operator=(const ReweightBase &) = delete;
100 
101 };
102 
103 }
104 
105 
106 namespace ThePEG {
107 
114 template <>
115 struct BaseClassTrait<ReweightBase,1>: public ClassTraitsType {
117  typedef HandlerBase NthBase;
118 };
119 
124 template <>
125 struct ClassTraits<ReweightBase>: public ClassTraitsBase<ReweightBase> {
127  static string className() { return "ThePEG::ReweightBase"; }
128 };
129 
132 }
133 
134 #endif /* ThePEG_ReweightBase_H */
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
virtual ~ReweightBase()
Destructor.
static void Init()
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...
A concreate implementation of ClassDescriptionBase describing an abstract class with persistent data...
LastXCombInfo is a templated class giving easy access to the information in an XComb object...
Definition: LastXCombInfo.h:32
virtual double weight() const =0
Return the wieght for the kinematical configuation provided by the assigned XComb object (in the Last...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
static AbstractClassDescription< ReweightBase > initReweightBase
Describe an abstract base class with persistent data.
Definition: ReweightBase.h:94
void setXComb(tXCombPtr xc)
Assigne an XComb object with information about the sub-process to be used in the reweighting.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
ReweightBase & operator=(const ReweightBase &)=delete
Private and non-existent assignment operator.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
HandlerBase is an abstract base class derived from the Interfaced class via the HandlerBaseT class ad...
Definition: HandlerBase.h:151
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
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.