CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/GeneratorInterface/ThePEGInterface/interface/ThePEGInterface.h

Go to the documentation of this file.
00001 #ifndef GeneratorInterface_ThePEGInterface_ThePEGInterface_h
00002 #define GeneratorInterface_ThePEGInterface_ThePEGInterface_h
00003 
00011 #include <memory>
00012 #include <string>
00013 
00014 #include <boost/shared_ptr.hpp>
00015 
00016 #include <HepMC/GenEvent.h>
00017 #include <HepMC/PdfInfo.h>
00018 #include <HepMC/IO_BaseClass.h>
00019 
00020 #include <ThePEG/Repository/EventGenerator.h>
00021 #include <ThePEG/EventRecord/Event.h>
00022 
00023 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00024 
00025 #include "GeneratorInterface/ThePEGInterface/interface/RandomEngineGlue.h"
00026 
00027 class ThePEGInterface {
00028     public:
00029         ThePEGInterface(const edm::ParameterSet &params);
00030         virtual ~ThePEGInterface();
00031 
00032     protected:
00033         void initRepository(const edm::ParameterSet &params) const;
00034         void initGenerator();
00035         void flushRandomNumberGenerator();
00036 
00037         static std::auto_ptr<HepMC::GenEvent>
00038                                 convert(const ThePEG::EventPtr &event);
00039         static void clearAuxiliary(HepMC::GenEvent *hepmc,
00040                                    HepMC::PdfInfo *pdf);
00041         static void fillAuxiliary(HepMC::GenEvent *hepmc,
00042                                   HepMC::PdfInfo *pdf,
00043                                   const ThePEG::EventPtr &event);
00044 
00045         static double pthat(const ThePEG::EventPtr &event);
00046 
00047         std::string dataFile(const std::string &fileName) const;
00048         std::string dataFile(const edm::ParameterSet &pset,
00049                              const std::string &paramName) const;
00050 
00051         ThePEG::EGPtr                           eg_;
00052         std::auto_ptr<HepMC::IO_BaseClass>      iobc_;
00053 
00054     private:
00055         boost::shared_ptr<ThePEG::RandomEngineGlue::Proxy>
00056                                                 randomEngineGlueProxy_;
00057 
00058         const std::string                       dataLocation_;
00059         const std::string                       generator_;
00060         const std::string                       run_;
00061         const std::string                       dumpConfig_;
00062         const unsigned int                      skipEvents_;
00063 };
00064 
00065 #endif // GeneratorInterface_ThePEGInterface_ThePEGInterface_h