CMS 3D CMS Logo

JetMatching.cc
Go to the documentation of this file.
1 #include <memory>
2 
3 #include <memory>
4 #include <string>
5 
8 
11 
14 
15 namespace gen {
16 
18 
20 
22 
24 
26 
27  std::set<std::string> JetMatching::capabilities() const {
28  std::set<std::string> result;
29  result.insert("psFinalState");
30  result.insert("hepmc");
31  return result;
32  }
33 
34  std::unique_ptr<JetMatching> JetMatching::create(const edm::ParameterSet& params) {
35  std::string scheme = params.getParameter<std::string>("scheme");
36 
37  std::unique_ptr<JetMatching> matching;
38 
39  if (scheme == "Madgraph") {
40  matching = std::make_unique<JetMatchingMadgraph>(params);
41  } else if (scheme == "Alpgen") {
42  matching = std::make_unique<JetMatchingAlpgen>(params);
43  } else if (scheme == "MLM") {
44  matching.reset();
45  } else
46  throw cms::Exception("InvalidJetMatching") << "Unknown scheme \"" << scheme
47  << "\""
48  " specified for parton-shower matching."
49  << std::endl;
50 
51  if (!matching.get())
52  throw cms::Exception("InvalidJetMatching") << "Port of " << scheme << "scheme \""
53  << "\""
54  " for parton-shower matching is still in progress."
55  << std::endl;
56 
57  return matching;
58  }
59 
60 } // namespace gen
virtual std::set< std::string > capabilities() const
Definition: JetMatching.cc:27
virtual void beforeHadronisation(const lhef::LHEEvent *event)
Definition: JetMatching.cc:23
virtual ~JetMatching()
Definition: JetMatching.cc:19
JetMatching(const edm::ParameterSet &params)
Definition: JetMatching.cc:17
virtual void beforeHadronisationExec()
Definition: JetMatching.cc:25
virtual void init(const lhef::LHERunInfo *runInfo)
Definition: JetMatching.cc:21
Definition: event.py:1
static std::unique_ptr< JetMatching > create(const edm::ParameterSet &params)
Definition: JetMatching.cc:34