herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
Statistics::EventContribution Class Reference

A pointlike or boxlike eventContribution; serves to define the EventContribution concept. More...

#include <EventContribution.h>

Public Member Functions

 EventContribution (double newCentralValue, double newWeight, double newWidth=0.0)
 Construct an eventContribution with given width.
 
double centralValue () const
 Return the central value.
 
const std::pair< double, double > & support () const
 Return the support.
 
double overlap (const std::pair< double, double > &interval) const
 Return the normalized overlap with an interval.
 
double weight () const
 Return the eventContribution weight.
 
void periodic (const std::pair< double, double > &periodicity)
 Remap the central value and support given a periodicity interval; if the support exceeds the periodicity it is ajusted to the peridocity interval.
 
void noUnderflow (double lower)
 Adjust to lower boundary.
 
void noOverflow (double upper)
 Adjust to upper boundary.
 
double overlap (const std::pair< double, double > &interval, const std::pair< double, double > &periodicity) const
 Return the normalized overlap with an interval, assuming a periodic quantity.
 

Private Member Functions

double calculateOverlap (const std::pair< double, double > &interval, const std::pair< double, double > &newSupport, double norm) const
 Calculate the normalized overlap with an interval.
 

Private Attributes

double theCentralValue
 The central value.
 
std::pair< double, double > theSupport
 The support.
 
double theWeight
 The eventContribution weight.
 

Detailed Description

A pointlike or boxlike eventContribution; serves to define the EventContribution concept.

Author
Simon Platzer

Definition at line 19 of file EventContribution.h.

Constructor & Destructor Documentation

◆ EventContribution()

Statistics::EventContribution::EventContribution ( double  newCentralValue,
double  newWeight,
double  newWidth = 0.0 
)
inline

Construct an eventContribution with given width.

Definition at line 26 of file EventContribution.h.

Member Function Documentation

◆ calculateOverlap()

double Statistics::EventContribution::calculateOverlap ( const std::pair< double, double > &  interval,
const std::pair< double, double > &  newSupport,
double  norm 
) const
inlineprivate

Calculate the normalized overlap with an interval.

Definition at line 136 of file EventContribution.h.

Referenced by overlap().

◆ centralValue()

double Statistics::EventContribution::centralValue ( ) const
inline

Return the central value.

Definition at line 39 of file EventContribution.h.

References theCentralValue.

Referenced by periodic().

◆ noOverflow()

void Statistics::EventContribution::noOverflow ( double  upper)
inline

Adjust to upper boundary.

Definition at line 106 of file EventContribution.h.

References support(), theCentralValue, and theSupport.

◆ noUnderflow()

void Statistics::EventContribution::noUnderflow ( double  lower)
inline

Adjust to lower boundary.

Definition at line 94 of file EventContribution.h.

References support(), theCentralValue, and theSupport.

◆ overlap() [1/2]

double Statistics::EventContribution::overlap ( const std::pair< double, double > &  interval) const
inline

Return the normalized overlap with an interval.

Definition at line 49 of file EventContribution.h.

References calculateOverlap(), and support().

◆ overlap() [2/2]

double Statistics::EventContribution::overlap ( const std::pair< double, double > &  interval,
const std::pair< double, double > &  periodicity 
) const
inline

Return the normalized overlap with an interval, assuming a periodic quantity.

Definition at line 119 of file EventContribution.h.

References calculateOverlap(), and support().

◆ periodic()

void Statistics::EventContribution::periodic ( const std::pair< double, double > &  periodicity)
inline

Remap the central value and support given a periodicity interval; if the support exceeds the periodicity it is ajusted to the peridocity interval.

Definition at line 65 of file EventContribution.h.

References centralValue(), support(), theCentralValue, and theSupport.

◆ support()

const std::pair< double, double > & Statistics::EventContribution::support ( ) const
inline

Return the support.

Definition at line 44 of file EventContribution.h.

References theSupport.

Referenced by noOverflow(), noUnderflow(), overlap(), and periodic().

◆ weight()

double Statistics::EventContribution::weight ( ) const
inline

Return the eventContribution weight.

Definition at line 56 of file EventContribution.h.

References theWeight.

Member Data Documentation

◆ theCentralValue

double Statistics::EventContribution::theCentralValue
private

The central value.

Definition at line 159 of file EventContribution.h.

Referenced by centralValue(), noOverflow(), noUnderflow(), and periodic().

◆ theSupport

std::pair<double,double> Statistics::EventContribution::theSupport
private

The support.

Definition at line 164 of file EventContribution.h.

Referenced by noOverflow(), noUnderflow(), periodic(), and support().

◆ theWeight

double Statistics::EventContribution::theWeight
private

The eventContribution weight.

Definition at line 169 of file EventContribution.h.

Referenced by weight().


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