hej
is hosted by
Hepforge
,
IPPP Durham
HEJ
2.1.4
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 <vector>
10
11
#include "
HEJ/optional.hh
"
12
13
namespace
HEJ
{
14
class
Event;
15
struct
RNG;
16
22
class
Unweighter
{
23
public
:
26
Unweighter
(
double
cut):
27
cut_(cut){}
28
Unweighter
() =
default
;
29
31
void
set_cut
(
double
max_weight){
32
cut_ = max_weight;
33
}
35
void
set_cut_to_maxwt
(std::vector<Event>
const
& events){
36
set_cut_to_maxwt
(events.cbegin(), events.cend());
37
}
39
template
<
class
ConstIt>
40
void
set_cut_to_maxwt
(ConstIt begin, ConstIt end);
41
43
47
void
set_cut_to_peakwt
(std::vector<Event>
const
& events,
double
max_dev){
48
set_cut_to_peakwt
(events.cbegin(), events.cend(), max_dev);
49
}
51
template
<
class
ConstIt>
52
void
set_cut_to_peakwt
(ConstIt begin, ConstIt end,
double
max_dev);
53
55
double
get_cut
()
const
{
56
return
cut_;
57
}
58
60
optional<Event>
unweight
(
Event
ev,
RNG
& ran)
const
;
62
std::vector<Event>
unweight
(
63
std::vector<Event> events,
RNG
& ran
64
)
const
;
66
71
template
<
class
Iterator>
72
Iterator
unweight
(
73
Iterator begin, Iterator end,
RNG
& ran
74
)
const
;
75
76
private
:
77
double
cut_{-1};
80
bool
discard
(
RNG
& ran,
Event
& ev)
const
;
81
};
82
}
// namespace HEJ
83
84
// implementation of template functions
85
#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:47
HEJ::Unweighter
Unweight events.
Definition:
Unweighter.hh:22
HEJ::Unweighter::Unweighter
Unweighter(double cut)
Definition:
Unweighter.hh:26
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:35
HEJ::Unweighter::set_cut
void set_cut(double max_weight)
Explicitly set cut.
Definition:
Unweighter.hh:31
HEJ::Unweighter::unweight
std::vector< Event > unweight(std::vector< Event > events, RNG &ran) const
Unweight for multiple events at once.
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:47
HEJ::Unweighter::unweight
optional< Event > unweight(Event ev, RNG &ran) const
Unweight one event, returns original event if weight > get_cut()
HEJ::Unweighter::get_cut
double get_cut() const
Returns current value of the cut.
Definition:
Unweighter.hh:55
HEJ
Main HEJ 2 Namespace.
Definition:
mainpage.dox:1
HEJ::discard
@ discard
Definition:
StatusCode.hh:18
HEJ::optional
boost::optional< T > optional
Definition:
optional.hh:23
optional.hh
Defines the optional type.
HEJ::RNG
Interface for random number generator.
Definition:
RNG.hh:19
Generated by
1.9.5