00001 #ifndef Pythia8_Source_h 00002 #define Pythia8_Source_h 00003 00015 #define PYCOMP pycomp_ 00016 00017 #include "FWCore/Framework/interface/GeneratedInputSource.h" 00018 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00019 #include <map> 00020 #include <string> 00021 #include "HepMC/GenEvent.h" 00022 00023 #include "Pythia.h" 00024 #include "HepMCInterface.h" 00025 00026 namespace CLHEP 00027 { 00028 class RandFlat ; 00029 class HepRandomEngine; 00030 } 00031 00032 namespace edm 00033 { 00034 class Pythia8Source : public GeneratedInputSource { 00035 public: 00036 00038 Pythia8Source(const ParameterSet &, const InputSourceDescription &); 00040 virtual ~Pythia8Source(); 00041 00042 void endRun( Run& r); 00043 00044 private: 00045 00047 // bool call_pygive(const std::string& iParm ); 00048 bool call_txgive(const std::string& iParm ); 00049 bool call_txgive_init(); 00050 00051 private: 00052 00053 virtual bool produce(Event & e); 00054 void clear(); 00055 00057 unsigned int pythiaPylistVerbosity_; 00059 bool pythiaHepMCVerbosity_; 00061 unsigned int maxEventsToPrint_; 00062 00063 Pythia8::Pythia* pythia; 00064 Pythia8::Event* pythia8event; 00065 HepMC::I_Pythia8* ToHepMC; 00066 00067 // for single particle generation in pythia 00068 int particleID; 00069 bool doubleParticle; 00070 double ptmin, ptmax; 00071 double etamin, etamax; 00072 double phimin, phimax; 00073 double comenergy; 00074 00075 CLHEP::HepRandomEngine* fRandomEngine; 00076 CLHEP::RandFlat* fRandomGenerator; 00077 00078 }; 00079 } 00080 00081 #endif