CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/GeneratorInterface/Pythia6Interface/plugins/Pythia6Gun.h

Go to the documentation of this file.
00001 #ifndef gen_Pythia6Gun_h
00002 #define gen_Pythia6Gun_h
00003 
00010 #include <string>
00011 #include <vector>
00012 
00013 //#include "HepPDT/defs.h"
00014 //#include "HepPDT/TableBuilder.hh"
00015 //#include "HepPDT/ParticleDataTable.hh"
00016 
00017 #include "HepMC/GenEvent.h"
00018 
00019 // #include "FWCore/Framework/interface/ESHandle.h"
00020 #include "FWCore/Framework/interface/EDProducer.h"
00021 
00022 #include "GeneratorInterface/Pythia6Interface/interface/Pythia6Service.h"
00023 #include "GeneratorInterface/Pythia6Interface/interface/Pythia6Declarations.h"
00024 
00025 #include "HepPID/ParticleIDTranslations.hh"
00026 
00027 namespace gen
00028 {
00029   
00030 // class Pythia6Service;
00031   
00032   class Pythia6Gun : public edm::EDProducer
00033   {
00034   
00035   public:
00036 
00037     Pythia6Gun( const edm::ParameterSet& );
00038     virtual ~Pythia6Gun();
00039     void beginJob() ;
00040     void endJob();
00041     void beginRun( edm::Run &, edm::EventSetup const& );
00042     void endRun( edm::Run &, edm::EventSetup const& );
00043     void produce( edm::Event&, const edm::EventSetup& ) ;
00044 
00045   protected:
00046    
00047     void attachPy6DecaysToGenEvent();
00048     void loadEvent( edm::Event& );
00049     virtual void generateEvent() = 0;
00050     HepMC::GenParticle* addAntiParticle( int&, int&, double&, double&, double& ); 
00051     
00052     Pythia6Service*  fPy6Service;
00053     
00054     // gun particle(s) characteristics
00055     //
00056     std::vector<int> fPartIDs ;
00057     double           fMinPhi ;
00058     double           fMaxPhi ;
00059         
00060     // the event format itself
00061     //
00062     HepMC::GenEvent* fEvt;
00063 
00064     // HepMC/HepPDT related things 
00065     // (for particle/event construction)
00066     //
00067     // edm::ESHandle<HepPDT::ParticleDataTable> fPDGTable ;
00068                         
00069     bool             fHepMCVerbosity ;
00070     int              fPylistVerbosity;
00071     int              fMaxEventsToPrint ;
00072         
00073   };
00074 
00075 }  // end namespace
00076 
00077 #endif