hej is hosted by Hepforge, IPPP Durham
HEJ 2  2.0
High energy resummation for hadron colliders
RivetAnalysis.hh
Go to the documentation of this file.
1 
9 #pragma once
10 
11 #include <memory>
12 #include <string>
13 #include <vector>
14 
15 #include "HEJ/Analysis.hh"
16 #include "HEJ/HepMCInterface.hh"
17 
18 namespace Rivet {
19  class AnalysisHandler;
20 }
21 namespace YAML {
22  class Node;
23 }
24 
25 namespace HEJ {
32  class RivetAnalysis: public HEJ::Analysis {
33  public:
34  static std::unique_ptr<Analysis> create(YAML::Node const & config);
35 
37 
44  RivetAnalysis(YAML::Node const & config);
46  void fill(HEJ::Event const & event, HEJ::Event const &) override;
47  bool pass_cuts(HEJ::Event const &, HEJ::Event const &) override
48  {return true;} //< no additional cuts are applied
49  void finalise() override;
50  private:
51  std::vector<std::string> analyses_names_;
52  const std::string output_name_;
53 
55  struct rivet_info {
56  std::unique_ptr<Rivet::AnalysisHandler> handler;
57  std::string name;
58  HEJ::HepMCInterface hepmc;
59  };
60  std::vector<rivet_info> rivet_runs_;
61 
66  void init(HEJ::Event const & event);
67  bool first_event_;
68  };
69 }
Header file for the Analysis interface.
Header file for the HepMCInterface.
Definition: Event.hh:84
This class converts the Events into HepMC::GenEvents.
Definition: HepMCInterface.hh:32
Class representing a Rivet analysis.
Definition: RivetAnalysis.hh:32
void fill(HEJ::Event const &event, HEJ::Event const &) override
Pass an event to the underlying Rivet analysis.
bool pass_cuts(HEJ::Event const &, HEJ::Event const &) override
Decide whether an event passes the cuts.
Definition: RivetAnalysis.hh:47
RivetAnalysis(YAML::Node const &config)
Constructor.
void finalise() override
Finalise analysis.
static std::unique_ptr< Analysis > create(YAML::Node const &config)
Main HEJ 2 Namespace.
Definition: mainpage.dox:1
Definition: RivetAnalysis.hh:18
YAML Namespace.
Definition: EmptyAnalysis.hh:16
Analysis base class.
Definition: Analysis.hh:23