00001 // -*- C++ -*- 00002 // 00003 // LWHFactory.h is a part of ThePEG - Toolkit for HEP Event Generation 00004 // Copyright (C) 1999-2007 Leif Lonnblad 00005 // 00006 // ThePEG is licenced under version 2 of the GPL, see COPYING for details. 00007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 00008 // 00009 #ifndef THEPEG_LWHFactory_H 00010 #define THEPEG_LWHFactory_H 00011 // 00012 // This is the declaration of the LWHFactory class. 00013 // 00014 00015 #include "ThePEG/Analysis/FactoryBase.h" 00016 00017 namespace ThePEG { 00018 00036 class LWHFactory: public FactoryBase { 00037 00038 public: 00039 00047 virtual void 00048 normalizeToXSec(tH1DPtr histogram, CrossSection unit = picobarn) const; 00049 00055 virtual void normalizeToXSecFraction(tH1DPtr histogram) const; 00056 00061 virtual void normalizeToUnity(tH1DPtr histogram) const; 00063 00064 public: 00065 00072 void persistentOutput(PersistentOStream & os) const; 00073 00079 void persistentInput(PersistentIStream & is, int version); 00081 00088 static void Init(); 00089 00090 protected: 00091 00098 virtual IBPtr clone() const { return new_ptr(*this); } 00099 00104 virtual IBPtr fullclone() const { return new_ptr(*this); } 00106 00107 00108 00109 protected: 00110 00117 virtual void doinitrun(); 00119 00120 00121 private: 00122 00127 static ClassDescription<LWHFactory> initLWHFactory; 00128 00133 LWHFactory & operator=(const LWHFactory &); 00134 00135 }; 00136 00137 } 00138 00139 #include "ThePEG/Utilities/ClassTraits.h" 00140 00141 namespace ThePEG { 00142 00147 template <> 00148 struct BaseClassTrait<LWHFactory,1> { 00150 typedef FactoryBase NthBase; 00151 }; 00152 00155 template <> 00156 struct ClassTraits<LWHFactory> 00157 : public ClassTraitsBase<LWHFactory> { 00159 static string className() { return "ThePEG::LWHFactory"; } 00160 00164 static string library() { return "LWHFactory.so"; } 00165 }; 00166 00169 } 00170 00171 #endif /* THEPEG_LWHFactory_H */