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 */