HepMC3 event record library
Public Types | Public Member Functions | Static Public Member Functions | Data Fields
HEPRUP Class Reference

#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
 

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.

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 1862 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 1914 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 1925 of file LHEF.h.

References HEPRUP::xsecinfos.

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

Definition at line 1906 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 1877 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 1887 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 1897 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 2005 of file LHEF.h.

int dprec

The precision used for outputing real numbers.

Definition at line 2056 of file LHEF.h.

std::pair<double,double> EBMUP

Energy of beam particles given in GeV.

Definition at line 1943 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 2000 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 2026 of file LHEF.h.

std::pair<long,long> IDBMUP

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

Definition at line 1938 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 1962 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 2046 of file LHEF.h.

std::vector<int> LPRUP

The subprocess code for the different subprocesses.

Definition at line 1989 of file LHEF.h.

std::map<long,MergeInfo> mergeinfo

Contents of the mergeinfo tags

Definition at line 2020 of file LHEF.h.

int NPRUP

The number of different subprocesses in this file.

Definition at line 1967 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 1949 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 1955 of file LHEF.h.

std::map<long,ProcInfo> procinfo

Contents of the procinfo tags

Definition at line 2015 of file LHEF.h.

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

A map of codes for different particle types.

Definition at line 2010 of file LHEF.h.

int version

The main version of the information stored.

Definition at line 2051 of file LHEF.h.

std::vector<WeightGroup> weightgroup

The vector of WeightGroup objects in this file.

Definition at line 2041 of file LHEF.h.

std::vector<WeightInfo> weightinfo

The vector of WeightInfo objects for this file.

Definition at line 2031 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 2036 of file LHEF.h.

std::vector<double> XERRUP

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

Definition at line 1978 of file LHEF.h.

std::vector<double> XMAXUP

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

Definition at line 1984 of file LHEF.h.

XSecInfos xsecinfos

Contents of the xsecinfo tags.

Definition at line 1994 of file LHEF.h.

std::vector<double> XSECUP

The cross sections for the different subprocesses in pb.

Definition at line 1972 of file LHEF.h.


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