hej is hosted by Hepforge, IPPP Durham
HEJ 2.2.2
High energy resummation for hadron colliders
Loading...
Searching...
No Matches
LesHouchesWriter.hh
Go to the documentation of this file.
1
8#pragma once
9
10#include <fstream>
11#include <memory>
12#include <string>
13
14#include "LHEF/LHEF.h"
15
16#include "HEJ/EventWriter.hh"
17
18namespace HEJ {
19 class Event;
20
23 public:
25
29 LesHouchesWriter(std::string const & file, LHEF::HEPRUP heprup);
30 LesHouchesWriter(LesHouchesWriter const & other) = delete;
31 LesHouchesWriter & operator=(LesHouchesWriter const & other) = delete;
38
40 void write(Event const & ev) override;
41
43 void set_xs_scale(double scale) override;
44
46 void finish() override;
47
48 private:
49 void write_init(){
50 writer_->init();
51 }
52
53 void rewrite_init_and_close();
54
55 LHEF::HEPRUP & heprup(){
56 return writer_->heprup;
57 }
58
59 LHEF::HEPEUP & hepeup(){
60 return writer_->hepeup;
61 }
62
63 std::fstream out_;
64 std::unique_ptr<LHEF::Writer> writer_;
65 double xs_scale_ = 1.;
66 };
67} // namespace HEJ
Header file for the EventWriter interface.
Pure abstract base class for event writers.
Definition: EventWriter.hh:16
An event with clustered jets.
Definition: Event.hh:51
Class for writing events to a file in the Les Houches Event File format.
Definition: LesHouchesWriter.hh:22
void write(Event const &ev) override
Write an event to the file specified in the constructor.
LesHouchesWriter(LesHouchesWriter &&other)=delete
LesHouchesWriter(LesHouchesWriter const &other)=delete
void finish() override
Dump general information & finish writing.
LesHouchesWriter(std::string const &file, LHEF::HEPRUP heprup)
Constructor.
void set_xs_scale(double scale) override
Set the ratio (cross section) / (sum of event weights)
LesHouchesWriter & operator=(LesHouchesWriter const &other)=delete
LesHouchesWriter & operator=(LesHouchesWriter &&other)=delete
~LesHouchesWriter() override
Main HEJ 2 Namespace.
Definition: mainpage.dox:1