hej is hosted by Hepforge, IPPP Durham
HEJ 2.2.2
High energy resummation for hadron colliders
Loading...
Searching...
No Matches
HEJ::Unweighter Class Reference

Unweight events. More...

#include <Unweighter.hh>

Public Member Functions

 Unweighter (double cut)
 
 Unweighter ()=default
 
void set_cut (double max_weight)
 Explicitly set cut. More...
 
void set_cut_to_maxwt (std::vector< Event > const &events)
 Set cut as max(weight) of events. More...
 
template<class ConstIt >
void set_cut_to_maxwt (ConstIt begin, ConstIt end)
 Iterator version of set_max() More...
 
void set_cut_to_peakwt (std::vector< Event > const &events, double max_dev)
 Estimate some reasonable cut for partial unweighting. More...
 
template<class ConstIt >
void set_cut_to_peakwt (ConstIt begin, ConstIt end, double max_dev)
 Iterator version of set_cut_to_peakwt() More...
 
double get_cut () const
 Returns current value of the cut. More...
 
std::optional< Eventunweight (Event ev, RNG &ran) const
 Unweight one event, returns original event if weight > get_cut() More...
 
std::vector< Eventunweight (std::vector< Event > events, RNG &ran) const
 Unweight for multiple events at once. More...
 
template<class Iterator >
Iterator unweight (Iterator begin, Iterator end, RNG &ran) const
 Iterator implementation of unweight(),. More...
 

Detailed Description

Unweight events.

Throws away events below with abs(weight)<cut with probability wt/cut

Constructor & Destructor Documentation

◆ Unweighter() [1/2]

HEJ::Unweighter::Unweighter ( double  cut)
inline

Constructor

Parameters
cutInitial value of cut, negative values for no cut

◆ Unweighter() [2/2]

HEJ::Unweighter::Unweighter ( )
default

Member Function Documentation

◆ get_cut()

double HEJ::Unweighter::get_cut ( ) const
inline

Returns current value of the cut.

◆ set_cut()

void HEJ::Unweighter::set_cut ( double  max_weight)
inline

Explicitly set cut.

◆ set_cut_to_maxwt() [1/2]

template<class ConstIt >
void HEJ::Unweighter::set_cut_to_maxwt ( ConstIt  begin,
ConstIt  end 
)

Iterator version of set_max()

◆ set_cut_to_maxwt() [2/2]

void HEJ::Unweighter::set_cut_to_maxwt ( std::vector< Event > const &  events)
inline

Set cut as max(weight) of events.

◆ set_cut_to_peakwt() [1/2]

template<class ConstIt >
void HEJ::Unweighter::set_cut_to_peakwt ( ConstIt  begin,
ConstIt  end,
double  max_dev 
)

Iterator version of set_cut_to_peakwt()

◆ set_cut_to_peakwt() [2/2]

void HEJ::Unweighter::set_cut_to_peakwt ( std::vector< Event > const &  events,
double  max_dev 
)
inline

Estimate some reasonable cut for partial unweighting.

Parameters
eventsEvents used for the estimation
max_devStandard derivation to include above mean weight

◆ unweight() [1/3]

std::optional< Event > HEJ::Unweighter::unweight ( Event  ev,
RNG ran 
) const

Unweight one event, returns original event if weight > get_cut()

◆ unweight() [2/3]

template<class Iterator >
Iterator HEJ::Unweighter::unweight ( Iterator  begin,
Iterator  end,
RNG ran 
) const

Iterator implementation of unweight(),.

Usage similar to std::remove(), i.e. use with erase()

Returns
Beginning of "discarded" range

◆ unweight() [3/3]

std::vector< Event > HEJ::Unweighter::unweight ( std::vector< Event events,
RNG ran 
) const

Unweight for multiple events at once.


The documentation for this class was generated from the following files: