PYTHIA  8.303
Public Member Functions | Public Attributes | List of all members
WeightsBase Class Reference

#include <Weights.h>

Inheritance diagram for WeightsBase:
WeightsLHEF WeightsMerging WeightsSimpleShower

Public Member Functions

virtual void clear ()
 Reset all internal values;.
 
virtual void bookVectors (vector< double >, vector< string >)
 Store the current event information.
 
virtual void collectWeightValues (vector< double > &outputWeights, double norm=1.)
 WeightsBase class. More...
 
virtual void collectWeightNames (vector< string > &outputNames)
 Similar function to return processed weight names.
 
string getWeightsName (int iPos) const
 
virtual double getWeightsValue (int iPos) const
 
int getWeightsSize () const
 
void bookWeight (string name, double defaultValue=1.)
 Function to create a new, synchronized, pair of weight name and value.
 
void setValueByIndex (int iPos, double val)
 Functions to set values of weights.
 
void setValueByName (string name, double val)
 
int findIndexOfName (string name)
 
void setPtrs (Info *infoPtrIn)
 

Public Attributes

vector< double > weightValues
 
vector< string > weightNames
 
InfoinfoPtr
 Pointers necessary for variation initialization.
 

Detailed Description

This is a base class to store weight information in a way that allows unified access in the structure that contains all event generation weights information (WeightContainer below). The main purpuse of this class is to supply convenience features to make defining new categories of weights easy. All weights should inherit from this base class. The specialized classes may then contain specialized functions, or only act as a glorified book-keeping struncture.

Member Function Documentation

void collectWeightValues ( vector< double > &  outputWeights,
double  norm = 1. 
)
virtual

WeightsBase class.

Function to return processed weights to weight container, e.g. if weights should be combined before proceeding.

Reimplemented in WeightsLHEF, WeightsMerging, and WeightsSimpleShower.

int findIndexOfName ( string  name)
inline

Function to find the index of a given entry in the weightNames vector, e.g., to be able to synchronize with the weightValues vector.

void setValueByName ( string  name,
double  val 
)
inline

Use existing functions: Find index of name, then set by index.

Member Data Documentation

vector<double> weightValues

Get the stored information. Direcly use storage members here in the base class, and access those through non-virtual getters. Note: NOT opting for a map data structure, since information will anyway have to be serialized in output.


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