Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:07:26

0001 // -*- C++ -*-
0002 //
0003 //
0004 
0005 //
0006 // This class is a "Hadronizer" template (see GeneratorInterface/Core)
0007 //
0008 
0009 #ifndef gen_Py8GunBase_h
0010 #define gen_Py8GunBase_h
0011 
0012 #include <memory>
0013 #include <string>
0014 #include <vector>
0015 
0016 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0017 
0018 #include "SimDataFormats/GeneratorProducts/interface/GenRunInfoProduct.h"
0019 #include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
0020 
0021 #include "GeneratorInterface/Pythia8Interface/interface/Py8InterfaceBase.h"
0022 
0023 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0024 #include "FWCore/Framework/interface/LuminosityBlock.h"
0025 
0026 #include <Pythia8/Pythia.h>
0027 #include <Pythia8Plugins/HepMC2.h>
0028 
0029 // foward declarations
0030 namespace edm {
0031   class Event;
0032 }
0033 
0034 namespace CLHEP {
0035   class HepRandomEngine;
0036 }
0037 
0038 namespace gen {
0039 
0040   class Py8GunBase : public Py8InterfaceBase {
0041   public:
0042     Py8GunBase(edm::ParameterSet const& ps);
0043     ~Py8GunBase() override {}
0044 
0045     virtual bool residualDecay();  // common func
0046     bool initializeForInternalPartons() override;
0047     void finalizeEvent() override;
0048     void statistics() override;
0049 
0050     void setRandomEngine(CLHEP::HepRandomEngine* v) { p8SetRandomEngine(v); }
0051     std::vector<std::string> const& sharedResources() const { return p8SharedResources; }
0052     void evtGenDecay();
0053 
0054   protected:
0055     // (some of) PGun parameters
0056     //
0057     std::vector<int> fPartIDs;
0058     double fMinPhi;
0059     double fMaxPhi;
0060 
0061   private:
0062     static const std::vector<std::string> p8SharedResources;
0063   };
0064 
0065 }  // namespace gen
0066 
0067 #endif  // gen_BaseHadronizer_h