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

This shows a WeightsShower example implementation for SimpleShower. More...

#include <Weights.h>

Inheritance diagram for WeightsSimpleShower:
WeightsShower WeightsBase

Public Member Functions

void init (bool doMerging) override
 Initialize weights (more can be booked at any time) More...
 
void collectWeightNames (vector< string > &outputNames) override
 Collect shower weight names. More...
 
void collectWeightValues (vector< double > &outputWeights, double norm=1.) override
 Collect shower weight values.
 
void initWeightGroups (bool=false) override
 Initialize the weight groups for automated variations. More...
 
string getGroupName (int iGN) const override
 Return group name (want to integrate this in weightNameVector?) More...
 
double getGroupWeight (int iGW) const override
 Return group weight (want to integrate this in weightValueVector?) More...
 
int nWeightGroups () const override
 
bool initUniqueShowerVars ()
 Initialise list of atomic weight variations to be performed by shower. More...
 
void setEnhancedTrial (double pTIn, double wtIn)
 Memorize enhancement factor and pT of enhanced emission.
 
double getEnhancedTrialPT ()
 
double getEnhancedTrialWeight ()
 
vector< string > getUniqueShowerVars ()
 Extract full list or subset that matches specific keys (e.g., FSR ones).
 
vector< string > getUniqueShowerVars (vector< string > keys)
 Extract those variations that match a specified list of keys. More...
 
bool initEnhanceFactors ()
 Initialise map of enhancement factors for shower trial probabilities. More...
 
unordered_map< string, double > getEnhanceFactors ()
 
string getInitialName (int iG) const
 
vector< double > getMuRWeightVector ()
 Vector for merging requested weight handling. More...
 
- Public Member Functions inherited from WeightsBase
virtual void init ()
 Initialize the weights.
 
virtual void clear ()
 Reset all internal values.
 
virtual void bookVectors (vector< double > weights, vector< string > 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. More...
 
void setValueByIndex (int iPos, double val)
 Functions to set values of weights.
 
void setValueByName (string name, double val)
 
virtual void reweightValueByIndex (int iPos, double val)
 Functions to reweight weight values, by index or by name.
 
virtual void reweightValueByName (string name, double val)
 
int findIndexOfName (string name)
 
void setPtrs (Info *infoPtrIn)
 Set the pointers.
 

Public Attributes

map< int, double > varPDFplus
 Variations that must be known by TimeShower and Spaceshower.
 
map< int, double > varPDFminus
 
map< int, double > varPDFmember
 
vector< string > uniqueShowerVars
 Vectors for storing shower variatons and enhancement factors.
 
unordered_map< string, double > enhanceFactors
 
vector< string > externalVariations
 Vectors for weight group handling.
 
vector< vector< string > > externalVarNames
 
vector< string > externalGroupNames
 
vector< string > initialNameSave
 
vector< vector< int > > externalMap
 
int externalVariationsSize {}
 
vector< vector< string > > mergingVarNames
 
double pTEnhanced {}
 
double wtEnhanced {}
 

Additional Inherited Members

- Protected Member Functions inherited from WeightsBase
void parse (string wvecKey, map< string, map< string, double > > &dct)
 Parse a WVec of variations into a dictionary. More...
 
- Protected Attributes inherited from WeightsBase
vector< double > weightValues
 Weight values and names.
 
vector< string > weightNames
 
InfoinfoPtr {}
 Pointers necessary for variation initialization.
 

Detailed Description

This shows a WeightsShower example implementation for SimpleShower.

Member Function Documentation

void collectWeightNames ( vector< string > &  outputNames)
overridevirtual

Collect shower weight names.

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

Reimplemented from WeightsBase.

string getGroupName ( int  iGN) const
overridevirtual

Return group name (want to integrate this in weightNameVector?)

Return weight group name.

Reimplemented from WeightsShower.

double getGroupWeight ( int  iGW) const
overridevirtual

Return group weight (want to integrate this in weightValueVector?)

Return weight group value.

Reimplemented from WeightsShower.

vector< double > getMuRWeightVector ( )

Vector for merging requested weight handling.

Get vector of muR weight combinations (isr & fsr) needed by merging.

Insert central shower weight

vector< string > getUniqueShowerVars ( vector< string >  keys)

Extract those variations that match a specified list of keys.

Define return vector and return immediately if nothing to do.

Parse each string in uniqueShowerVars to look for recognized keywords.

does the key match an fsr one?

void init ( bool  doMerging)
overridevirtual

Initialize weights (more can be booked at any time)

WeightsSimpleShower class.

Initialize shower weights.

Call base initialization.

Force shower variations if needed by merging but not requested by user

In this case, also empty requested variations, to not do default ones

Assemble shower variation strings needed for merging

Reimplemented from WeightsShower.

bool initEnhanceFactors ( )

Initialise map of enhancement factors for shower trial probabilities.

Initialise list of enhancement factors to be applied to shower trials.

Get uncertainty variations from Settings (as list of strings to parse).

Parse each string in list to look for recognized keywords.

bool initUniqueShowerVars ( )

Initialise list of atomic weight variations to be performed by shower.

Initialise list of atomic uncertainty variations to be done by shower from list specified by uVars.

Reset saved list of uncertainty variations.

Parse each string in uVars list to look for recognized keywords.

Convert to lowercase (to be case-insensitive). Also remove extra spaces, so everything is mapped to "key=value"

Also attach weights needed for merging

void initWeightGroups ( bool  isISR = false)
overridevirtual

Initialize the weight groups for automated variations.

Uncertainty variations initialization.

Remove initial blank spaces

Search for pdf:family keyword for SpaceShower

Reimplemented from WeightsShower.


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