CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/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() override;
00040     void beginRun( edm::Run const&, edm::EventSetup const& ) override;
00041     void endRun( edm::Run const&, edm::EventSetup const& ) override;
00042     void produce( edm::Event&, const edm::EventSetup& ) override;
00043 
00044   protected:
00045    
00046     void attachPy6DecaysToGenEvent();
00047     void loadEvent( edm::Event& );
00048     virtual void generateEvent() = 0;
00049     HepMC::GenParticle* addAntiParticle( int&, int&, double&, double&, double& ); 
00050     
00051     Pythia6Service*  fPy6Service;
00052     
00053     // gun particle(s) characteristics
00054     //
00055     std::vector<int> fPartIDs ;
00056     double           fMinPhi ;
00057     double           fMaxPhi ;
00058         
00059     // the event format itself
00060     //
00061     HepMC::GenEvent* fEvt;
00062 
00063     // HepMC/HepPDT related things 
00064     // (for particle/event construction)
00065     //
00066     // edm::ESHandle<HepPDT::ParticleDataTable> fPDGTable ;
00067                         
00068     bool             fHepMCVerbosity ;
00069     int              fPylistVerbosity;
00070     int              fMaxEventsToPrint ;
00071         
00072   };
00073 
00074 }  // end namespace
00075 
00076 #endif