thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
LWHFactory.h
1// -*- C++ -*-
2//
3// LWHFactory.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_LWHFactory_H
10#define THEPEG_LWHFactory_H
11//
12// This is the declaration of the LWHFactory class.
13//
14
15#include "ThePEG/Analysis/FactoryBase.h"
16
17namespace ThePEG {
18
36class LWHFactory: public FactoryBase {
37
38public:
39
47 virtual void
48 normalizeToXSec(tH1DPtr histogram, CrossSection unit = picobarn) const;
49
55 virtual void normalizeToXSecFraction(tH1DPtr histogram) const;
56
61 virtual void normalizeToUnity(tH1DPtr histogram) const;
62
68 virtual void
69 normalizeToXSec(tH2DPtr histogram, CrossSection unit = picobarn) const;
70
76 virtual void normalizeToXSecFraction(tH2DPtr histogram) const;
77
82 virtual void normalizeToUnity(tH2DPtr histogram) const;
84
85public:
86
94
100 void persistentInput(PersistentIStream & is, int version);
102
109 static void Init();
110
111protected:
112
119 virtual IBPtr clone() const { return new_ptr(*this); }
120
125 virtual IBPtr fullclone() const { return new_ptr(*this); }
127
128
129
130protected:
131
138 virtual void doinitrun();
140
141
142private:
143
149
154 LWHFactory & operator=(const LWHFactory &) = delete;
155
156};
157
158}
159
160#include "ThePEG/Utilities/ClassTraits.h"
161
162namespace ThePEG {
163
168template <>
169struct BaseClassTrait<LWHFactory,1> {
171 typedef FactoryBase NthBase;
172};
173
176template <>
177struct ClassTraits<LWHFactory>
178 : public ClassTraitsBase<LWHFactory> {
180 static string className() { return "ThePEG::LWHFactory"; }
181
185 static string library() { return "LWHFactory.so"; }
186};
187
190}
191
192#endif /* THEPEG_LWHFactory_H */
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
Here is the documentation of the FactoryBase class.
Definition: FactoryBase.h:47
AIDA::IHistogram1D * tH1DPtr
Convenient typedef for pointer to AIDA::IHistogram1D.
Definition: FactoryBase.h:54
AIDA::IHistogram2D * tH2DPtr
Convenient typedef for pointer to AIDA::IHistogram2D.
Definition: FactoryBase.h:64
Here is the documentation of the LWHFactory class.
Definition: LWHFactory.h:36
virtual void normalizeToUnity(tH2DPtr histogram) const
Rescale the given histogram so that the integral over the bins gives one.
static void Init()
The standard Init function used to initialize the interfaces.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual void normalizeToXSec(tH2DPtr histogram, CrossSection unit=picobarn) const
Rescale the given histogram so that the integral over the bins will give the correct integrated cross...
virtual void normalizeToXSec(tH1DPtr histogram, CrossSection unit=picobarn) const
Rescale the given histogram so that the integral over the bins will give the correct integrated cross...
static ClassDescription< LWHFactory > initLWHFactory
The static object used to initialize the description of this class.
Definition: LWHFactory.h:148
virtual void normalizeToXSecFraction(tH1DPtr histogram) const
Rescale the given histogram so that the integral over the bins gives the fraction of the total cross ...
virtual void normalizeToXSecFraction(tH2DPtr histogram) const
Rescale the given histogram so that the integral over the bins gives the fraction of the total cross ...
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Definition: LWHFactory.h:125
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual void normalizeToUnity(tH1DPtr histogram) const
Rescale the given histogram so that the integral over the bins gives one.
virtual IBPtr clone() const
Make a simple clone of this object.
Definition: LWHFactory.h:119
LWHFactory & operator=(const LWHFactory &)=delete
The assignment operator is private and must never be called.
virtual void doinitrun()
Initialize this object.
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
Ptr< T >::pointer new_ptr()
Simple interface to the PtrTraits<Ptr>::create()
Definition: PtrTraits.h:195
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