HepMC event record
Public Types | Public Member Functions | Static Public Member Functions | Data Fields
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 1363 of file build/outputs/include/HepMC/LHEF.h.

#include <LHEF.h>

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

Public Types

typedef XMLTag::AttributeMap AttributeMap
 
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 (std::string name) const
 
int nWeights () const
 
std::string weightNameHepMC (int i) const
 
void print (std::ostream &file) const
 
void clear ()
 
void resize (int nrup)
 
void resize ()
 
int weightIndex (std::string name) const
 
int nWeights () const
 
bool getattr (std::string n, double &v, bool erase=true)
 
bool getattr (std::string n, bool &v, bool erase=true)
 
bool getattr (std::string n, long &v, bool erase=true)
 
bool getattr (std::string n, int &v, bool erase=true)
 
bool getattr (std::string n, std::string &v, bool erase=true)
 
bool getattr (std::string n, double &v, bool erase=true)
 
bool getattr (std::string n, bool &v, bool erase=true)
 
bool getattr (std::string n, long &v, bool erase=true)
 
bool getattr (std::string n, int &v, bool erase=true)
 
bool getattr (std::string n, std::string &v, bool erase=true)
 
void printattrs (std::ostream &file) const
 
void printattrs (std::ostream &file) const
 
void closetag (std::ostream &file, std::string tag) const
 
void closetag (std::ostream &file, std::string tag) const
 
Standard constructors and destructors.
 HEPRUP ()
 
HEPRUPoperator= (const HEPRUP &x)
 
 HEPRUP (const XMLTag &tagin, int versin)
 
 ~HEPRUP ()
 
 HEPRUP ()
 
HEPRUPoperator= (const HEPRUP &x)
 
 HEPRUP (const XMLTag &tagin, int versin)
 
 ~HEPRUP ()
 

Static Public Member Functions

static std::string yes ()
 
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
 
XSecInfo xsecinfo
 
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 [1/2]

Convenient typedef.

Definition at line 338 of file build/outputs/include/HepMC/LHEF.h.

◆ AttributeMap [2/2]

Convenient typedef.

Definition at line 338 of file include/HepMC/LHEF.h.

Constructor & Destructor Documentation

◆ HEPRUP() [1/4]

HEPRUP ( )
inline

Default constructor.

Definition at line 1372 of file build/outputs/include/HepMC/LHEF.h.

◆ HEPRUP() [2/4]

HEPRUP ( const XMLTag tagin,
int  versin 
)
inline

◆ ~HEPRUP() [1/2]

~HEPRUP ( )
inline

Destructor.

Definition at line 1494 of file build/outputs/include/HepMC/LHEF.h.

◆ HEPRUP() [3/4]

HEPRUP ( )
inline

Default constructor.

Definition at line 1372 of file include/HepMC/LHEF.h.

◆ HEPRUP() [4/4]

HEPRUP ( const XMLTag tagin,
int  versin 
)
inline

◆ ~HEPRUP() [2/2]

~HEPRUP ( )
inline

Destructor.

Definition at line 1494 of file include/HepMC/LHEF.h.

Member Function Documentation

◆ clear() [1/2]

void clear ( )
inline

◆ clear() [2/2]

void clear ( )
inline

◆ closetag() [1/2]

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

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

Definition at line 434 of file build/outputs/include/HepMC/LHEF.h.

References TagBase::contents.

◆ closetag() [2/2]

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

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

Definition at line 434 of file include/HepMC/LHEF.h.

References TagBase::contents.

◆ getattr() [1/10]

bool getattr ( 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 357 of file build/outputs/include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [2/10]

bool getattr ( 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 357 of file include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [3/10]

bool getattr ( 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 371 of file build/outputs/include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [4/10]

bool getattr ( 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 371 of file include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [5/10]

bool getattr ( 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 385 of file build/outputs/include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [6/10]

bool getattr ( 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 385 of file include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [7/10]

bool getattr ( 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 399 of file build/outputs/include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [8/10]

bool getattr ( 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 399 of file include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [9/10]

bool getattr ( 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 413 of file build/outputs/include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [10/10]

bool getattr ( 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 413 of file include/HepMC/LHEF.h.

References TagBase::attributes.

◆ nWeights() [1/2]

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

Definition at line 1649 of file include/HepMC/LHEF.h.

References HEPRUP::weightmap.

◆ nWeights() [2/2]

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

Definition at line 1649 of file build/outputs/include/HepMC/LHEF.h.

References HEPRUP::weightmap.

◆ operator=() [1/2]

HEPRUP& operator= ( const HEPRUP x)
inline

◆ operator=() [2/2]

HEPRUP& operator= ( const HEPRUP x)
inline

◆ print() [1/2]

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

◆ print() [2/2]

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

◆ printattrs() [1/2]

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

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

Definition at line 424 of file build/outputs/include/HepMC/LHEF.h.

References TagBase::attributes.

◆ printattrs() [2/2]

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

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

Definition at line 424 of file include/HepMC/LHEF.h.

References TagBase::attributes.

◆ resize() [1/4]

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 1620 of file include/HepMC/LHEF.h.

References HEPRUP::NPRUP, and HEPRUP::resize().

◆ resize() [2/4]

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 1620 of file build/outputs/include/HepMC/LHEF.h.

References HEPRUP::NPRUP, and HEPRUP::resize().

◆ resize() [3/4]

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 1630 of file build/outputs/include/HepMC/LHEF.h.

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

◆ resize() [4/4]

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 1630 of file include/HepMC/LHEF.h.

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

◆ weightIndex() [1/2]

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

Definition at line 1640 of file build/outputs/include/HepMC/LHEF.h.

References HEPRUP::weightmap.

◆ weightIndex() [2/2]

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

Definition at line 1640 of file include/HepMC/LHEF.h.

References HEPRUP::weightmap.

◆ weightNameHepMC() [1/2]

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 1503 of file build/outputs/include/HepMC/LHEF.h.

References HEPRUP::weightgroup, and HEPRUP::weightinfo.

◆ weightNameHepMC() [2/2]

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 1503 of file include/HepMC/LHEF.h.

References HEPRUP::weightgroup, and HEPRUP::weightinfo.

◆ yes() [1/2]

static std::string yes ( )
inlinestaticinherited

Static string token for truth values.

Definition at line 456 of file build/outputs/include/HepMC/LHEF.h.

◆ yes() [2/2]

static std::string yes ( )
inlinestaticinherited

Static string token for truth values.

Definition at line 456 of file include/HepMC/LHEF.h.

Field Documentation

◆ attributes

XMLTag::AttributeMap attributes
inherited

The attributes of this tag;

Definition at line 446 of file build/outputs/include/HepMC/LHEF.h.

◆ contents

std::string contents
inherited

The contents of this tag.

Definition at line 451 of file build/outputs/include/HepMC/LHEF.h.

◆ cuts

std::vector< Cut > cuts

Contents of the cuts tag.

Definition at line 1719 of file build/outputs/include/HepMC/LHEF.h.

◆ dprec

int dprec

The precision used for outputing real numbers.

Definition at line 1770 of file build/outputs/include/HepMC/LHEF.h.

◆ EBMUP

std::pair< double, double > EBMUP

Energy of beam particles given in GeV.

Definition at line 1663 of file build/outputs/include/HepMC/LHEF.h.

◆ generators

std::vector< Generator > generators

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

Definition at line 1740 of file build/outputs/include/HepMC/LHEF.h.

◆ IDBMUP

std::pair< long, long > IDBMUP

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

Definition at line 1658 of file build/outputs/include/HepMC/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 1682 of file build/outputs/include/HepMC/LHEF.h.

◆ junk

std::string junk

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

Definition at line 1760 of file build/outputs/include/HepMC/LHEF.h.

◆ LPRUP

std::vector< int > LPRUP

The subprocess code for the different subprocesses.

Definition at line 1709 of file build/outputs/include/HepMC/LHEF.h.

◆ mergeinfo

std::map< long, MergeInfo > mergeinfo

Contents of the mergeinfo tags

Definition at line 1734 of file build/outputs/include/HepMC/LHEF.h.

◆ NPRUP

int NPRUP

The number of different subprocesses in this file.

Definition at line 1687 of file build/outputs/include/HepMC/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 1669 of file build/outputs/include/HepMC/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 1675 of file build/outputs/include/HepMC/LHEF.h.

◆ procinfo

std::map< long, ProcInfo > procinfo

Contents of the procinfo tags

Definition at line 1729 of file build/outputs/include/HepMC/LHEF.h.

◆ ptypes

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

A map of codes for different particle types.

Definition at line 1724 of file build/outputs/include/HepMC/LHEF.h.

◆ version

int version

The main version of the information stored.

Definition at line 1765 of file build/outputs/include/HepMC/LHEF.h.

◆ weightgroup

std::vector< WeightGroup > weightgroup

The vector of WeightGroup objects in this file.

Definition at line 1755 of file build/outputs/include/HepMC/LHEF.h.

◆ weightinfo

std::vector< WeightInfo > weightinfo

The vector of WeightInfo objects for this file.

Definition at line 1745 of file build/outputs/include/HepMC/LHEF.h.

◆ weightmap

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

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

Definition at line 1750 of file build/outputs/include/HepMC/LHEF.h.

◆ XERRUP

std::vector< double > XERRUP

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

Definition at line 1698 of file build/outputs/include/HepMC/LHEF.h.

◆ XMAXUP

std::vector< double > XMAXUP

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

Definition at line 1704 of file build/outputs/include/HepMC/LHEF.h.

◆ xsecinfo

XSecInfo xsecinfo

Contents of the xsecinfo tag

Definition at line 1714 of file build/outputs/include/HepMC/LHEF.h.

◆ XSECUP

std::vector< double > XSECUP

The cross sections for the different subprocesses in pb.

Definition at line 1692 of file build/outputs/include/HepMC/LHEF.h.


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