PYTHIA  8.312
Public Member Functions | Public Attributes | List of all members
WeightContainer Class Reference

#include <Weights.h>

Public Member Functions

 WeightContainer ()
 
void setWeightNominal (double weightNow)
 The WeightContainer class. More...
 
double collectWeightNominal ()
 
int numberOfWeights ()
 Functions to retrieve information stored in the subcategory members. More...
 
double weightValueByIndex (int key=0)
 
string weightNameByIndex (int key=0)
 
vector< double > weightValueVector ()
 
vector< string > weightNameVector ()
 
void clear ()
 Reset all members to default stage. More...
 
void clearTotal ()
 Reset total cross section estimate.
 
void init (bool doMerging)
 Init, for those classes that need it. More...
 
void initPtrs (Info *infoPtrIn)
 Function to set Pointers in weight classes. More...
 
void initXsecVec ()
 Initialize the cross-section vector. More...
 
vector< double > getSampleXsec ()
 Get cross-section vectors. More...
 
vector< double > getTotalXsec ()
 Return cross section estimate for total run.
 
vector< double > getSampleXsecErr ()
 Return cross section error for current sample.
 
vector< double > getTotalXsecErr ()
 Return cross section error estimate for total run.
 
void accumulateXsec (double norm=1.)
 Accumulate cross section for all weights. More...
 

Public Attributes

double weightNominal
 The nominal Pythia weight, in pb for lha strategy 4 and -4.
 
WeightsLHEF weightsLHEF {}
 First example of a weight subcategory.
 
WeightsShowerweightsShowerPtr {}
 
WeightsSimpleShower weightsSimpleShower {}
 
WeightsMerging weightsMerging {}
 Merging weights.
 
WeightsFragmentation weightsFragmentation {}
 Fragmentation weights.
 
WeightsBase weightsUserHooks {}
 Userhooks weights.
 

Detailed Description

This is a container class to collect all event generation weight information into a wrapper which is in turn is part of Info. In this way, we could avoid cluttering Info.

Constructor & Destructor Documentation

WeightContainer ( )
inline

Default constructor only ensures that members are initialized with sensible default values.

Member Function Documentation

void accumulateXsec ( double  norm = 1.)

Accumulate cross section for all weights.

Accumulate cross section for all weights. Provide cross section estimate for whole sample if lhaStrategy != 4 or -4.

void clear ( )

Reset all members to default stage.

Reset all members to default status.

double collectWeightNominal ( )

Assemble nominal weight, including nominal parton shower and merging weight. PS and Merging weight variations are stored relative to this return value.

vector< double > getSampleXsec ( )

Get cross-section vectors.

Return cross section for current sample.

void init ( bool  doMerging)

Init, for those classes that need it.

Function to initialize weight classes.

void initPtrs ( Info infoPtrIn)

Function to set Pointers in weight classes.

Default pointer to shower weights = weightsSimpleShower.

void initXsecVec ( )

Initialize the cross-section vector.

Initialize accumulation of cross section.

int numberOfWeights ( )

Functions to retrieve information stored in the subcategory members.

Functions to retrieve the stored information.

void setWeightNominal ( double  weightNow)

The WeightContainer class.

Set nominal weight.

vector< string > weightNameVector ( )

Function to return the vector of weight names, combining all names from all subcategories, cf. weightValueVector function.

The very first entry in the vector should always be the nominal weight.

Let all weights attach the weight names to the return vector.

Done.

vector< double > weightValueVector ( )

Function to return the vector of weight values, combining all weights from all subcategories. Currently, only the nominal weight and LHEF weights are considered. Internal Pythia weights should also be included eventually.

Function to return the vector of weight values, combining all weights from all subcategories.

The very first entry in the vector should always be the nominal weight.

Let all weights attach the relative weight values to the return vector. Second argument allows for normalization.

Done.

Member Data Documentation

WeightsShower* weightsShowerPtr {}

Shower weights. SimpleShower one hardcoded and made default since Merging explicitly depends on it, but allow to point to a different weightsShower-derived object, eg for Vincia (with own merging).


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