HepMC3 event record library
HEPRUP Class Reference

Detailed Description

The HEPRUP class is a simple container corresponding to the Les Houches accord (hep-ph/0109068) common block with the same name. The members are named in the same way as in the common block. However, fortran arrays are represented by vectors, except for the arrays of length two which are represented by pair objects.

Definition at line 1646 of file LHEF.h.

#include <LHEF.h>

+ Inheritance diagram for HEPRUP:
+ Collaboration diagram for HEPRUP:

Public Types

typedef XMLTag::AttributeMap AttributeMap
 

Public Member Functions

std::string weightNameHepMC (int i) const
 
void print (std::ostream &file) const
 
void clear ()
 
void resize (int nrup)
 
void resize ()
 
int weightIndex (const std::string &name) const
 
int nWeights () const
 
XSecInfogetXSecInfo (std::string weightname="")
 
const XSecInfogetXSecInfo (std::string weightname="") const
 
bool getattr (const std::string &n, double &v, bool erase=true)
 
bool getattr (const std::string &n, bool &v, bool erase=true)
 
bool getattr (const std::string &n, long &v, bool erase=true)
 
bool getattr (const std::string &n, int &v, bool erase=true)
 
bool getattr (const std::string &n, std::string &v, bool erase=true)
 
void printattrs (std::ostream &file) const
 
void closetag (std::ostream &file, const std::string &tag) const
 
Standard constructors and destructors.
 HEPRUP ()
 
 HEPRUP (const HEPRUP &)=default
 
HEPRUPoperator= (const HEPRUP &)=default
 
 HEPRUP (const XMLTag &tagin, int versin)
 

Static Public Member Functions

static std::string yes ()
 

Data Fields

std::pair< long, long > IDBMUP
 
std::pair< double, double > EBMUP
 
std::pair< int, int > PDFGUP
 
std::pair< int, int > PDFSUP
 
int IDWTUP
 
int NPRUP
 
std::vector< double > XSECUP
 
std::vector< double > XERRUP
 
std::vector< double > XMAXUP
 
std::vector< int > LPRUP
 
XSecInfos xsecinfos
 
std::vector< EventFileeventfiles
 
std::vector< Cutcuts
 
std::map< std::string, std::set< long > > ptypes
 
std::map< long, ProcInfoprocinfo
 
std::map< long, MergeInfomergeinfo
 
std::vector< Generatorgenerators
 
std::vector< WeightInfoweightinfo
 
std::map< std::string, int > weightmap
 
std::vector< WeightGroupweightgroup
 
std::string junk
 
int version
 
int dprec
 
XMLTag::AttributeMap attributes
 
std::string contents
 

Member Typedef Documentation

◆ AttributeMap

Convenient typedef.

Definition at line 367 of file LHEF.h.

Constructor & Destructor Documentation

◆ HEPRUP() [1/3]

HEPRUP ( )
inline

Default constructor.

Definition at line 1655 of file LHEF.h.

References dprec, IDWTUP, NPRUP, and version.

◆ HEPRUP() [2/3]

HEPRUP ( const HEPRUP & )
default

Copy constructor

References HEPRUP().

◆ HEPRUP() [3/3]

Member Function Documentation

◆ clear()

void clear ( )
inline

Clear all information.

Definition at line 1881 of file LHEF.h.

References cuts, junk, mergeinfo, procinfo, ptypes, weightgroup, and weightinfo.

◆ closetag()

void closetag ( std::ostream & file,
const std::string & tag ) const
inlineinherited

Print out end of tag marker. Print contents if not empty else print simple close tag.

Definition at line 463 of file LHEF.h.

References contents.

◆ getattr() [1/5]

bool getattr ( const std::string & n,
bool & v,
bool erase = true )
inlineinherited

Find an attribute named n and set the bool variable v to true if the corresponding value is "yes". Remove the correspondig attribute from the list if found and erase is true.

Returns
false if no attribute was found.

Definition at line 400 of file LHEF.h.

References attributes.

◆ getattr() [2/5]

bool getattr ( const std::string & n,
double & v,
bool erase = true )
inlineinherited

Find an attribute named n and set the double variable v to the corresponding value. Remove the correspondig attribute from the list if found and erase is true.

Returns
false if no attribute was found.

Definition at line 386 of file LHEF.h.

References attributes.

◆ getattr() [3/5]

bool getattr ( const std::string & n,
int & v,
bool erase = true )
inlineinherited

Find an attribute named n and set the long variable v to the corresponding value. Remove the correspondig attribute from the list if found and erase is true.

Returns
false if no attribute was found.

Definition at line 428 of file LHEF.h.

References attributes.

◆ getattr() [4/5]

bool getattr ( const std::string & n,
long & v,
bool erase = true )
inlineinherited

Find an attribute named n and set the long variable v to the corresponding value. Remove the correspondig attribute from the list if found and erase is true.

Returns
false if no attribute was found.

Definition at line 414 of file LHEF.h.

References attributes.

◆ getattr() [5/5]

bool getattr ( const std::string & n,
std::string & v,
bool erase = true )
inlineinherited

Find an attribute named n and set the string variable v to the corresponding value. Remove the correspondig attribute from the list if found and erase is true.

Returns
false if no attribute was found.

Definition at line 442 of file LHEF.h.

References attributes.

◆ getXSecInfo() [1/2]

XSecInfo & getXSecInfo ( std::string weightname = "")
inline
Returns
the XSecInfo object corresponding to the named weight weithname. If no such object exists, it will be created.

Definition at line 1933 of file LHEF.h.

References XSecInfo::weightname, and xsecinfos.

◆ getXSecInfo() [2/2]

const XSecInfo & getXSecInfo ( std::string weightname = "") const
inline
Returns
the XSecInfo object corresponding to the named weight weithname. If no such object exists, an empty XSecInfo will be returned..

Definition at line 1944 of file LHEF.h.

References xsecinfos.

◆ nWeights()

int nWeights ( ) const
inline
Returns
the number of weights (including the nominial one).

Definition at line 1925 of file LHEF.h.

References weightmap.

◆ operator=()

HEPRUP & operator= ( const HEPRUP & )
default

Assignment operator.

References HEPRUP().

◆ print()

void print ( std::ostream & file) const
inline

Print out the corresponding XML tag to a stream.

Definition at line 1784 of file LHEF.h.

References cuts, dprec, EBMUP, eventfiles, generators, LHEF::hashline(), IDBMUP, IDWTUP, junk, LPRUP, mergeinfo, NPRUP, LHEF::oattr(), PDFGUP, PDFSUP, procinfo, ptypes, weightgroup, weightinfo, XERRUP, XMAXUP, xsecinfos, and XSECUP.

◆ printattrs()

void printattrs ( std::ostream & file) const
inlineinherited

print out ' name="value"' for all unparsed attributes.

Definition at line 453 of file LHEF.h.

References attributes, and LHEF::oattr().

◆ resize() [1/2]

void resize ( )
inline

Assuming the NPRUP variable, corresponding to the number of sub-processes, is correctly set, resize the relevant vectors accordingly.

Definition at line 1906 of file LHEF.h.

References LPRUP, NPRUP, XERRUP, XMAXUP, and XSECUP.

◆ resize() [2/2]

void resize ( int nrup)
inline

Set the NPRUP variable, corresponding to the number of sub-processes, to nrup, and resize all relevant vectors accordingly.

Definition at line 1896 of file LHEF.h.

References NPRUP, and resize().

◆ weightIndex()

int weightIndex ( const std::string & name) const
inline
Returns
the index of the weight with the given name

Definition at line 1916 of file LHEF.h.

References weightmap.

◆ weightNameHepMC()

std::string weightNameHepMC ( int i) const
inline

Return the name of the weight with given index suitable to ne used for HepMC3 output.

Definition at line 1770 of file LHEF.h.

References weightgroup, and weightinfo.

◆ yes()

static std::string yes ( )
inlinestaticinherited

Static string token for truth values.

Definition at line 485 of file LHEF.h.

Field Documentation

◆ attributes

XMLTag::AttributeMap attributes
inherited

The attributes of this tag;

Definition at line 475 of file LHEF.h.

◆ contents

std::string contents
mutableinherited

The contents of this tag.

Definition at line 480 of file LHEF.h.

◆ cuts

std::vector<Cut> cuts

Contents of the cuts tag.

Definition at line 2024 of file LHEF.h.

◆ dprec

int dprec

The precision used for outputing real numbers.

Definition at line 2075 of file LHEF.h.

◆ EBMUP

std::pair<double,double> EBMUP

Energy of beam particles given in GeV.

Definition at line 1962 of file LHEF.h.

◆ eventfiles

std::vector<EventFile> eventfiles

A vector of EventFiles where the events are stored separate fron the init block.

Examples
LHEF_example_cat.cc.

Definition at line 2019 of file LHEF.h.

◆ generators

std::vector<Generator> generators

The names of the programs and their version information used to create this file.

Definition at line 2045 of file LHEF.h.

◆ IDBMUP

std::pair<long,long> IDBMUP

PDG id's of beam particles. (first/second is in +/-z direction).

Definition at line 1957 of file LHEF.h.

◆ IDWTUP

int IDWTUP

Master switch indicating how the ME generator envisages the events weights should be interpreted according to the Les Houches accord.

Definition at line 1981 of file LHEF.h.

◆ junk

std::string junk

Just to be on the safe side we save any junk inside the init-tag.

Definition at line 2065 of file LHEF.h.

◆ LPRUP

std::vector<int> LPRUP

The subprocess code for the different subprocesses.

Definition at line 2008 of file LHEF.h.

◆ mergeinfo

std::map<long,MergeInfo> mergeinfo

Contents of the mergeinfo tags

Definition at line 2039 of file LHEF.h.

◆ NPRUP

int NPRUP

The number of different subprocesses in this file.

Definition at line 1986 of file LHEF.h.

◆ PDFGUP

std::pair<int,int> PDFGUP

The author group for the PDF used for the beams according to the PDFLib specification.

Definition at line 1968 of file LHEF.h.

◆ PDFSUP

std::pair<int,int> PDFSUP

The id number the PDF used for the beams according to the PDFLib specification.

Definition at line 1974 of file LHEF.h.

◆ procinfo

std::map<long,ProcInfo> procinfo

Contents of the procinfo tags

Definition at line 2034 of file LHEF.h.

◆ ptypes

std::map<std::string, std::set<long> > ptypes

A map of codes for different particle types.

Definition at line 2029 of file LHEF.h.

◆ version

int version

The main version of the information stored.

Definition at line 2070 of file LHEF.h.

◆ weightgroup

std::vector<WeightGroup> weightgroup

The vector of WeightGroup objects in this file.

Definition at line 2060 of file LHEF.h.

◆ weightinfo

std::vector<WeightInfo> weightinfo

The vector of WeightInfo objects for this file.

Definition at line 2050 of file LHEF.h.

◆ weightmap

std::map<std::string,int> weightmap

A map relating names of weights to indices of the weightinfo vector.

Definition at line 2055 of file LHEF.h.

◆ XERRUP

std::vector<double> XERRUP

The statistical error in the cross sections for the different subprocesses in pb.

Definition at line 1997 of file LHEF.h.

◆ XMAXUP

std::vector<double> XMAXUP

The maximum event weights (in HEPEUP::XWGTUP) for different subprocesses.

Definition at line 2003 of file LHEF.h.

◆ xsecinfos

XSecInfos xsecinfos

Contents of the xsecinfo tags.

Definition at line 2013 of file LHEF.h.

◆ XSECUP

std::vector<double> XSECUP

The cross sections for the different subprocesses in pb.

Definition at line 1991 of file LHEF.h.


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