CMS 3D CMS Logo

AlpgenProducer.h

Go to the documentation of this file.
00001 #ifndef Alpgen_Producer_h
00002 #define Alpgen_Producer_h
00003 
00015 #define PYCOMP pycomp_
00016 
00017 #include "FWCore/Framework/interface/EDProducer.h"
00018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00019 #include <map>
00020 #include <vector>
00021 #include <string>
00022 #include <iostream>
00023 #include <fstream>
00024 #include "HepMC/GenEvent.h"
00025 
00026 #include "SimDataFormats/GeneratorProducts/interface/LHERunInfoProduct.h"
00027 
00028 namespace CLHEP
00029 {
00030   class RandFlat ;
00031   class HepRandomEngine;
00032 }
00033 
00034 namespace edm
00035 {
00036   class AlpgenProducer : public EDProducer {
00037   public:
00038 
00040     AlpgenProducer(const ParameterSet &);
00042     virtual ~AlpgenProducer();
00043 
00044 
00045   private:
00046 
00048     bool call_pygive(const std::string& iParm );
00049     bool call_txgive(const std::string& iParm );
00050     int Nev_; // number of events in the input file
00051 
00052     // .unw file with infos for AlpgenInfoProduct
00053 //    std::ifstream* unwfile;
00054 
00055   private:
00056     
00057     virtual void produce(Event & e, const EventSetup& es);
00058     void beginRun(Run& r);
00059     void clear();    
00060     HepMC::GenEvent  *evt;
00061     
00063     unsigned int pythiaPylistVerbosity_;
00065     bool pythiaHepMCVerbosity_;
00067     unsigned int maxEventsToPrint_;    
00068     
00069     std::vector<std::string> fileNames_;
00070     std::string fileName_;
00071     unsigned int eventsRead_;
00072     
00073     // for single particle generation in pythia
00074     int    particleID;
00075     bool   doubleParticle;
00076     double ptmin, ptmax;
00077     double etamin, etamax;
00078     double phimin, phimax;
00079     
00080     CLHEP::HepRandomEngine* fRandomEngine;
00081     CLHEP::RandFlat*        fRandomGenerator; 
00082 
00083     LHERunInfoProduct::Header lheAlpgenUnwParHeader;
00084   };
00085 } 
00086 
00087 // 
00088 #define alpgen_end alpgen_end_
00089     extern "C" {
00090         void alpgen_end();
00091       }
00092 
00093 #endif

Generated on Tue Jun 9 17:36:52 2009 for CMSSW by  doxygen 1.5.4