Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-20 02:31:54

0001 // CepGen-CMSSW interfacing module
0002 //   2022-2024, Laurent Forthomme
0003 
0004 #ifndef GeneratorInterface_CepGenInterface_CepGenEventGenerator_h
0005 #define GeneratorInterface_CepGenInterface_CepGenEventGenerator_h
0006 
0007 #include "FWCore/Framework/interface/ConsumesCollector.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009 #include "GeneratorInterface/Core/interface/BaseHadronizer.h"
0010 
0011 #include <CepGen/Core/ParametersList.h>
0012 #include <CepGen/Generator.h>
0013 
0014 namespace gen {
0015   class CepGenEventGenerator : public BaseHadronizer {
0016   public:
0017     explicit CepGenEventGenerator(const edm::ParameterSet&, edm::ConsumesCollector&&);
0018     virtual ~CepGenEventGenerator();
0019 
0020     bool readSettings(int) { return true; }
0021     bool declareStableParticles(const std::vector<int>&) { return true; }
0022     bool declareSpecialSettings(const std::vector<std::string>&) { return true; }
0023 
0024     bool initializeForInternalPartons();
0025     bool generatePartonsAndHadronize();
0026     bool decay() { return true; }  // NOT used - let's call it "design imperfection"
0027     bool residualDecay() { return true; }
0028 
0029     void finalizeEvent() {}
0030     void statistics() {}
0031 
0032     const char* classname() const { return "CepGenEventGenerator"; }
0033     const std::vector<std::string>& doSharedResources() const override { return shared_resources_; }
0034 
0035   private:
0036     cepgen::Generator* gen_{nullptr};
0037     const cepgen::ParametersList proc_params_;
0038     std::vector<std::pair<std::string, cepgen::ParametersList> > modif_modules_, output_modules_;
0039     const std::vector<std::string> shared_resources_;
0040     HepMC::GenCrossSection xsec_;
0041   };
0042 }  // namespace gen
0043 
0044 #endif