HepMC3 event record library
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 1627 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 (std::string name) const
 
int nWeights () const
 
XSecInfogetXSecInfo (std::string weightname="")
 
const XSecInfogetXSecInfo (std::string weightname="") 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)
 
void printattrs (std::ostream &file) const
 
void closetag (std::ostream &file, std::string tag) const
 
Standard constructors and destructors.
 HEPRUP ()
 
 HEPRUP (const HEPRUP &)=default
 
HEPRUPoperator= (const HEPRUP &x)=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

Convenient typedef.

Definition at line 350 of file LHEF.h.

Constructor & Destructor Documentation

HEPRUP ( )
inline

Default constructor.

Definition at line 1636 of file LHEF.h.

HEPRUP ( const HEPRUP )
default

Copy constructor

HEPRUP ( const XMLTag tagin,
int  versin 
)
inline

Member Function Documentation

void clear ( )
inline

Clear all information.

Definition at line 1863 of file LHEF.h.

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

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 445 of file LHEF.h.

References TagBase::contents.

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 368 of file LHEF.h.

References TagBase::attributes.

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 382 of file LHEF.h.

References TagBase::attributes.

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 396 of file LHEF.h.

References TagBase::attributes.

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 410 of file LHEF.h.

References TagBase::attributes.

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 424 of file LHEF.h.

References TagBase::attributes.

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 1915 of file LHEF.h.

References XSecInfo::weightname, and HEPRUP::xsecinfos.

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 1926 of file LHEF.h.

References HEPRUP::xsecinfos.

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

Definition at line 1907 of file LHEF.h.

References HEPRUP::weightmap.

HEPRUP& operator= ( const HEPRUP x)
default

Assignment operator.

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

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

Definition at line 435 of file LHEF.h.

References TagBase::attributes, and LHEF::oattr().

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 1878 of file LHEF.h.

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

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 1888 of file LHEF.h.

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

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

Definition at line 1898 of file LHEF.h.

References HEPRUP::weightmap.

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 1751 of file LHEF.h.

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

static std::string yes ( )
inlinestaticinherited

Static string token for truth values.

Definition at line 467 of file LHEF.h.

Field Documentation

XMLTag::AttributeMap attributes
inherited

The attributes of this tag;

Definition at line 457 of file LHEF.h.

std::string contents
mutableinherited

The contents of this tag.

Definition at line 462 of file LHEF.h.

std::vector<Cut> cuts

Contents of the cuts tag.

Definition at line 2006 of file LHEF.h.

int dprec

The precision used for outputing real numbers.

Definition at line 2057 of file LHEF.h.

std::pair<double,double> EBMUP

Energy of beam particles given in GeV.

Definition at line 1944 of file LHEF.h.

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 2001 of file LHEF.h.

std::vector<Generator> generators

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

Definition at line 2027 of file LHEF.h.

std::pair<long,long> IDBMUP

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

Definition at line 1939 of file LHEF.h.

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 1963 of file LHEF.h.

std::string junk

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

Definition at line 2047 of file LHEF.h.

std::vector<int> LPRUP

The subprocess code for the different subprocesses.

Definition at line 1990 of file LHEF.h.

std::map<long,MergeInfo> mergeinfo

Contents of the mergeinfo tags

Definition at line 2021 of file LHEF.h.

int NPRUP

The number of different subprocesses in this file.

Definition at line 1968 of file LHEF.h.

std::pair<int,int> PDFGUP

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

Definition at line 1950 of file LHEF.h.

std::pair<int,int> PDFSUP

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

Definition at line 1956 of file LHEF.h.

std::map<long,ProcInfo> procinfo

Contents of the procinfo tags

Definition at line 2016 of file LHEF.h.

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

A map of codes for different particle types.

Definition at line 2011 of file LHEF.h.

int version

The main version of the information stored.

Definition at line 2052 of file LHEF.h.

std::vector<WeightGroup> weightgroup

The vector of WeightGroup objects in this file.

Definition at line 2042 of file LHEF.h.

std::vector<WeightInfo> weightinfo

The vector of WeightInfo objects for this file.

Definition at line 2032 of file LHEF.h.

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

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

Definition at line 2037 of file LHEF.h.

std::vector<double> XERRUP

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

Definition at line 1979 of file LHEF.h.

std::vector<double> XMAXUP

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

Definition at line 1985 of file LHEF.h.

XSecInfos xsecinfos

Contents of the xsecinfo tags.

Definition at line 1995 of file LHEF.h.

std::vector<double> XSECUP

The cross sections for the different subprocesses in pb.

Definition at line 1973 of file LHEF.h.


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