CMS 3D CMS Logo

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