hej
is hosted by
Hepforge
,
IPPP Durham
HEJ
2.2.2
High energy resummation for hadron colliders
Loading...
Searching...
No Matches
include
HEJ
Unweighter.hh
Go to the documentation of this file.
1
6
#pragma once
7
8
#include <functional>
9
#include <optional>
10
#include <vector>
11
12
namespace
HEJ
{
13
class
Event;
14
struct
RNG;
15
21
class
Unweighter
{
22
public
:
25
Unweighter
(
double
cut):
26
cut_(cut){}
27
Unweighter
() =
default
;
28
30
void
set_cut
(
double
max_weight){
31
cut_ = max_weight;
32
}
34
void
set_cut_to_maxwt
(std::vector<Event>
const
& events){
35
set_cut_to_maxwt
(events.cbegin(), events.cend());
36
}
38
template
<
class
ConstIt>
39
void
set_cut_to_maxwt
(ConstIt begin, ConstIt end);
40
42
46
void
set_cut_to_peakwt
(std::vector<Event>
const
& events,
double
max_dev){
47
set_cut_to_peakwt
(events.cbegin(), events.cend(), max_dev);
48
}
50
template
<
class
ConstIt>
51
void
set_cut_to_peakwt
(ConstIt begin, ConstIt end,
double
max_dev);
52
54
double
get_cut
()
const
{
55
return
cut_;
56
}
57
59
std::optional<Event>
unweight
(
Event
ev,
RNG
& ran)
const
;
61
std::vector<Event>
unweight
(
62
std::vector<Event> events,
RNG
& ran
63
)
const
;
65
70
template
<
class
Iterator>
71
Iterator
unweight
(
72
Iterator begin, Iterator end,
RNG
& ran
73
)
const
;
74
75
private
:
76
double
cut_{-1};
79
bool
discard
(
RNG
& ran,
Event
& ev)
const
;
80
};
81
}
// namespace HEJ
82
83
// implementation of template functions
84
#include "
HEJ/detail/Unweighter_impl.hh
"
Unweighter_impl.hh
Unweighter Class Implementation for template functions.
HEJ::Event
An event with clustered jets.
Definition:
Event.hh:51
HEJ::Unweighter
Unweight events.
Definition:
Unweighter.hh:21
HEJ::Unweighter::Unweighter
Unweighter(double cut)
Definition:
Unweighter.hh:25
HEJ::Unweighter::Unweighter
Unweighter()=default
HEJ::Unweighter::set_cut_to_maxwt
void set_cut_to_maxwt(std::vector< Event > const &events)
Set cut as max(weight) of events.
Definition:
Unweighter.hh:34
HEJ::Unweighter::set_cut
void set_cut(double max_weight)
Explicitly set cut.
Definition:
Unweighter.hh:30
HEJ::Unweighter::unweight
std::vector< Event > unweight(std::vector< Event > events, RNG &ran) const
Unweight for multiple events at once.
HEJ::Unweighter::unweight
std::optional< Event > unweight(Event ev, RNG &ran) const
Unweight one event, returns original event if weight > get_cut()
HEJ::Unweighter::set_cut_to_peakwt
void set_cut_to_peakwt(std::vector< Event > const &events, double max_dev)
Estimate some reasonable cut for partial unweighting.
Definition:
Unweighter.hh:46
HEJ::Unweighter::get_cut
double get_cut() const
Returns current value of the cut.
Definition:
Unweighter.hh:54
HEJ
Main HEJ 2 Namespace.
Definition:
mainpage.dox:1
HEJ::discard
@ discard
Definition:
StatusCode.hh:18
HEJ::RNG
Interface for random number generator.
Definition:
RNG.hh:22
Generated by
1.9.5