File indexing completed on 2024-04-06 12:13:52
0001 #include <memory>
0002
0003 #include <memory>
0004 #include <string>
0005
0006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0008
0009 #include "GeneratorInterface/LHEInterface/interface/LHERunInfo.h"
0010 #include "GeneratorInterface/LHEInterface/interface/LHEEvent.h"
0011
0012 #include "GeneratorInterface/PartonShowerVeto/interface/JetMatchingMadgraph.h"
0013 #include "GeneratorInterface/PartonShowerVeto/interface/JetMatchingAlpgen.h"
0014
0015 namespace gen {
0016
0017 JetMatching::JetMatching(const edm::ParameterSet& params) { fMatchingStatus = false; }
0018
0019 JetMatching::~JetMatching() {}
0020
0021 void JetMatching::init(const lhef::LHERunInfo* runInfo) {}
0022
0023 void JetMatching::beforeHadronisation(const lhef::LHEEvent* event) {}
0024
0025 void JetMatching::beforeHadronisationExec() {}
0026
0027 std::set<std::string> JetMatching::capabilities() const {
0028 std::set<std::string> result;
0029 result.insert("psFinalState");
0030 result.insert("hepmc");
0031 return result;
0032 }
0033
0034 std::unique_ptr<JetMatching> JetMatching::create(const edm::ParameterSet& params) {
0035 std::string scheme = params.getParameter<std::string>("scheme");
0036
0037 std::unique_ptr<JetMatching> matching;
0038
0039 if (scheme == "Madgraph") {
0040 matching = std::make_unique<JetMatchingMadgraph>(params);
0041 } else if (scheme == "Alpgen") {
0042 matching = std::make_unique<JetMatchingAlpgen>(params);
0043 } else if (scheme == "MLM") {
0044 matching.reset();
0045 } else
0046 throw cms::Exception("InvalidJetMatching") << "Unknown scheme \"" << scheme
0047 << "\""
0048 " specified for parton-shower matching."
0049 << std::endl;
0050
0051 if (!matching.get())
0052 throw cms::Exception("InvalidJetMatching") << "Port of " << scheme << "scheme \""
0053 << "\""
0054 " for parton-shower matching is still in progress."
0055 << std::endl;
0056
0057 return matching;
0058 }
0059
0060 }