![]() |
![]() |
00001 #ifndef Pythia_Source_h 00002 #define Pythia_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 "GeneratorInterface/CommonInterface/interface/TauolaInterface.h" 00024 #include "GeneratorInterface/Pythia6Interface/interface/PtYDistributor.h" 00025 00026 class Run; 00027 namespace CLHEP { 00028 class HepRandomEngine; 00029 class RandFlat; 00030 } 00031 00032 namespace edm 00033 { 00034 class PythiaSource : public GeneratedInputSource { 00035 public: 00036 00038 PythiaSource(const ParameterSet &, const InputSourceDescription &); 00040 virtual ~PythiaSource(); 00041 00042 void endRun( Run& r); 00043 00044 00045 private: 00046 00048 bool call_pygive(const std::string& iParm ); 00049 bool call_txgive(const std::string& iParm ); 00050 bool call_txgive_init(); 00051 bool call_slhagive(const std::string& iParm ); 00052 bool call_slha_init(); 00053 00054 private: 00055 00056 virtual bool produce(Event & e); 00057 void clear(); 00058 00059 HepMC::GenEvent *evt; 00060 00062 unsigned int pythiaPylistVerbosity_; 00064 bool pythiaHepMCVerbosity_; 00066 bool imposeProperTimes_; 00068 unsigned int maxEventsToPrint_; 00069 00070 // external cross section and filter efficiency 00071 double extCrossSect; 00072 double extFilterEff; 00073 00074 // for single particle generation in pythia 00075 int particleID; 00076 std::vector<int> particleIDs; 00077 bool doubleParticle; 00078 std::string kinedata; 00079 double ptmin, ptmax; 00080 double etamin, etamax; 00081 double phimin, phimax; 00082 double comenergy; 00083 double emin, emax; 00084 double ymin, ymax; 00085 bool flatEnergy; 00086 00087 // external generators (tauola,...) 00088 bool useExternalGenerators_ ; 00089 bool useTauola_ ; 00090 bool useTauolaPolarization_ ; 00091 TauolaInterface tauola_ ; 00092 00093 bool stopHadronsEnabled; 00094 bool gluinoHadronsEnabled; 00095 00096 CLHEP::HepRandomEngine& fRandomEngine; 00097 CLHEP::RandFlat* fRandomGenerator; 00098 PtYDistributor* fPtYGenerator; 00099 }; 00100 } 00101 00102 #endif