ThePEG  1.8.0
LWHFactory.h
1 // -*- C++ -*-
2 //
3 // LWHFactory.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2011 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 2 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 
17 namespace ThePEG {
18 
36 class LWHFactory: public FactoryBase {
37 
38 public:
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 
85 public:
86 
93  void persistentOutput(PersistentOStream & os) const;
94 
100  void persistentInput(PersistentIStream & is, int version);
102 
109  static void Init();
110 
111 protected:
112 
119  virtual IBPtr clone() const { return new_ptr(*this); }
120 
125  virtual IBPtr fullclone() const { return new_ptr(*this); }
127 
128 
129 
130 protected:
131 
138  virtual void doinitrun();
140 
141 
142 private:
143 
149 
154  LWHFactory & operator=(const LWHFactory &);
155 
156 };
157 
158 }
159 
160 #include "ThePEG/Utilities/ClassTraits.h"
161 
162 namespace ThePEG {
163 
168 template <>
169 struct BaseClassTrait<LWHFactory,1> {
171  typedef FactoryBase NthBase;
172 };
173 
176 template <>
177 struct 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 */
Ptr< T >::pointer new_ptr()
Simple interface to the PtrTraits<Ptr>::create()
Definition: PtrTraits.h:195
PersistentIStream is used to read persistent objects from a stream where they were previously written...
virtual IBPtr clone() const
Make a simple clone of this object.
Definition: LWHFactory.h:119
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.
Definition: LWHFactory.h:125
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
virtual void normalizeToUnity(tH1DPtr histogram) const
Rescale the given histogram so that the integral over the bins gives one.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
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
Here is the documentation of the FactoryBase class.
Definition: FactoryBase.h:47
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual void normalizeToXSecFraction(tH1DPtr histogram) const
Rescale the given histogram so that the integral over the bins gives the fraction of the total cross ...
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
virtual void doinitrun()
Initialize this object.
AIDA::IHistogram1D * tH1DPtr
Convenient typedef for pointer to AIDA::IHistogram1D.
Definition: FactoryBase.h:54
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
static ClassDescription< LWHFactory > initLWHFactory
The static object used to initialize the description of this class.
Definition: LWHFactory.h:148
This template class allows the compiler to check calculations with physical quantities for dimensiona...
Definition: PhysicalQty.h:81
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...
LWHFactory & operator=(const LWHFactory &)
The assignment operator is private and must never be called.
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