HepMC3 event record library: HEPEUP Class Reference

HepMC3 event record library

Public Types | Public Member Functions | Static Public Member Functions | Data Fields
HEPEUP Class Reference

## Detailed Description

The HEPEUP 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 2136 of file LHEF.h.

`#include <LHEF.h>`

Inheritance diagram for HEPEUP:
[legend]
Collaboration diagram for HEPEUP:
[legend]

## Public Types
typedef XMLTag::AttributeMap | AttributeMap

## Public Member Functions
| HEPEUP (const XMLTag &tagin, HEPRUP &heprupin)
void | print (std::ostream &file) const
void | reset ()
void | clear ()
void | resize (int nup)
double | totalWeight (int i=0) const
double | totalWeight (const std::string &name) const
double | weight (int i=0) const
double | weight (const std::string &name) const
void | setWeight (int i, double w)
bool | setWeight (const std::string &name, double w)
void | resize ()
bool | setWeightInfo (unsigned int i)
bool | setSubEvent (unsigned int i)
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.
| HEPEUP ()
| HEPEUP (const HEPEUP &x)
HEPEUP & | setEvent (const HEPEUP &x)
HEPEUP & | operator= (const HEPEUP &x)
| ~HEPEUP ()

## Static Public Member Functions
static std::string | yes ()

## Data Fields
int | NUP
int | IDPRUP
double | XWGTUP
std::pair< double, double > | XPDWUP
double | SCALUP
double | AQEDUP
double | AQCDUP
std::vector< long > | IDUP
std::vector< int > | ISTUP
std::vector< std::pair< int, int > > | MOTHUP
std::vector< std::pair< int, int > > | ICOLUP
std::vector< std::vector< double > > | PUP
std::vector< double > | VTIMUP
std::vector< double > | SPINUP
HEPRUP * | heprup
const WeightInfo * | currentWeight
std::vector< Weight > | namedweights
std::vector< std::pair< double, const WeightInfo * > > | weights
std::vector< Clus > | clustering
PDFInfo | pdfinfo
std::pair< int, int > | PDFGUPsave
std::pair< int, int > | PDFSUPsave
Scales | scales
int | ntries
bool | isGroup
EventGroup | subevents
std::string | junk
XMLTag::AttributeMap | attributes
std::string | contents

## Member Typedef Documentation

## ◆ AttributeMap

typedef XMLTag::AttributeMap AttributeMap
| inherited

Convenient typedef.

Definition at line 367 of file LHEF.h.

## Constructor & Destructor Documentation

## ◆ HEPEUP() [1/3]

HEPEUP | ( |  | ) |
| inline

Default constructor.

Definition at line 2145 of file LHEF.h.

References AQCDUP, AQEDUP, currentWeight, heprup, IDPRUP, isGroup, ntries, NUP, SCALUP, XPDWUP, and XWGTUP.

## ◆ HEPEUP() [2/3]

HEPEUP | ( | const HEPEUP & | x | ) |
| inline

Copy constructor

Definition at line 2153 of file LHEF.h.

References HEPEUP(), isGroup, operator=(), and TagBase::TagBase().

## ◆ ~HEPEUP()

~HEPEUP | ( |  | ) |
| inline

Destructor.

Definition at line 2207 of file LHEF.h.

References clear().

## ◆ HEPEUP() [3/3]

HEPEUP | ( | const XMLTag & | tagin,
|  | HEPRUP & | heprupin )
| inline

Constructor from an event or eventgroup tag.

Definition at line 2218 of file LHEF.h.

References AQCDUP, AQEDUP, clustering, TagBase::contents, XMLTag::contents, currentWeight, TagBase::getattr(), HEPEUP(), heprup, ICOLUP, IDPRUP, IDUP, isGroup, ISTUP, junk, MOTHUP, XMLTag::name, namedweights, ntries, NUP, pdfinfo, PUP, resize(), scales, SCALUP, SPINUP, subevents, TagBase::TagBase(), XMLTag::tags, VTIMUP, weights, XPDWUP, and XWGTUP.

## Member Function Documentation

## ◆ clear()

void clear | ( |  | ) |
| inline

Clear the HEPEUP object.

Definition at line 2433 of file LHEF.h.

References reset(), and subevents.

## ◆ 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.

## ◆ operator=()

HEPEUP & operator= | ( | const HEPEUP & | x | ) |
| inline

Assignment operator.

Definition at line 2194 of file LHEF.h.

References clear(), HEPEUP(), isGroup, setEvent(), and subevents.

## ◆ print()

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

Print out the event (group) as an XML tag.

Definition at line 2339 of file LHEF.h.

References AQCDUP, AQEDUP, clustering, LHEF::hashline(), heprup, ICOLUP, IDPRUP, IDUP, isGroup, ISTUP, junk, MOTHUP, namedweights, ntries, NUP, LHEF::oattr(), pdfinfo, TagBase::printattrs(), PUP, scales, SCALUP, SPINUP, subevents, VTIMUP, weight(), weights, and XWGTUP.

## ◆ 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().

## ◆ reset()

void reset | ( |  | ) |
| inline

Reset the HEPEUP object (does not touch the sub events).

Definition at line 2423 of file LHEF.h.

References clustering, NUP, setWeightInfo(), and weights.

## ◆ resize() [1/2]

void resize | ( |  | ) |
| inline

Assuming the NUP variable, corresponding to the number of particles in the current event, is correctly set, resize the relevant vectors accordingly.

Definition at line 2504 of file LHEF.h.

References ICOLUP, IDUP, ISTUP, MOTHUP, NUP, PUP, SPINUP, and VTIMUP.

## ◆ resize() [2/2]

void resize | ( | int | nup | ) |
| inline

Set the NUP variable, corresponding to the number of particles in the current event, to nup, and resize all relevant vectors accordingly.

Definition at line 2443 of file LHEF.h.

References NUP, and resize().

## ◆ setEvent()

HEPEUP & setEvent | ( | const HEPEUP & | x | ) |
| inline

Copy information from the given HEPEUP. Sub event information is left untouched.

Definition at line 2162 of file LHEF.h.

References AQCDUP, AQEDUP, clustering, currentWeight, HEPEUP(), heprup, ICOLUP, IDPRUP, IDUP, ISTUP, junk, MOTHUP, namedweights, ntries, NUP, PDFGUPsave, pdfinfo, PDFSUPsave, PUP, scales, SCALUP, SPINUP, VTIMUP, weights, XPDWUP, and XWGTUP.

## ◆ setSubEvent()

bool setSubEvent | ( | unsigned int | i | ) |
| inline

Setup the current event to use sub event i. If zero, no sub event will be chsen.

Definition at line 2549 of file LHEF.h.

References currentWeight, reset(), setEvent(), subevents, and weights.

## ◆ setWeight() [1/2]

bool setWeight | ( | const std::string & | name,
|  | double | w )
| inline

Set the weight with the given name.

Definition at line 2491 of file LHEF.h.

References heprup, setWeight(), and weights.

## ◆ setWeight() [2/2]

void setWeight | ( | int | i,
|  | double | w )
| inline

Set the weight with the given index.

Definition at line 2485 of file LHEF.h.

References weights.

## ◆ setWeightInfo()

bool setWeightInfo | ( | unsigned int | i | ) |
| inline

Setup the current event to use weight i. If zero, the default weight will be used.

Definition at line 2518 of file LHEF.h.

References currentWeight, heprup, PDFGUPsave, PDFSUPsave, scales, weights, and XWGTUP.

## ◆ totalWeight() [1/2]

double totalWeight | ( | const std::string & | name | ) | const
| inline

Return the total weight for this event (including all sub evenets) for the given weight name.

Definition at line 2464 of file LHEF.h.

References heprup, and totalWeight().

## ◆ totalWeight() [2/2]

double totalWeight | ( | int | i = 0 | ) | const
| inline

Return the total weight for this event (including all sub evenets) for the given index.

Definition at line 2452 of file LHEF.h.

References subevents, and weight().

## ◆ weight() [1/2]

double weight | ( | const std::string & | name | ) | const
| inline

Return the weight for the given weight name.

Definition at line 2478 of file LHEF.h.

References heprup, and weight().

## ◆ weight() [2/2]

double weight | ( | int | i = 0 | ) | const
| inline

Return the weight for the given index.

Definition at line 2471 of file LHEF.h.

References weights.

## ◆ yes()

std::string yes | ( |  | ) |
| inlinestaticinherited

Static string token for truth values.

Definition at line 485 of file LHEF.h.

## Field Documentation

## ◆ AQCDUP

double AQCDUP

The value of the QCD coupling used in this event.

Definition at line 2603 of file LHEF.h.

## ◆ AQEDUP

double AQEDUP

The value of the QED coupling used in this event.

Definition at line 2598 of file LHEF.h.

## ◆ attributes

XMLTag::AttributeMap attributes
| inherited

The attributes of this tag;

Definition at line 475 of file LHEF.h.

## ◆ clustering

std::vector<Clus> clustering

Contents of the clustering tag.

Definition at line 2669 of file LHEF.h.

## ◆ contents

std::string contents
| mutableinherited

The contents of this tag.

Definition at line 480 of file LHEF.h.

## ◆ currentWeight

const WeightInfo* currentWeight

The current weight info object.

Definition at line 2654 of file LHEF.h.

## ◆ heprup

HEPRUP* heprup

A pointer to the current HEPRUP object.

Examples
  LHEF_example_cat.cc.

Definition at line 2649 of file LHEF.h.

## ◆ ICOLUP

std::vector< std::pair<int,int> > ICOLUP

The colour-line indices (first(second) is (anti)colour) for the particle entries in this event.

Definition at line 2625 of file LHEF.h.

## ◆ IDPRUP

int IDPRUP

The subprocess code for this event (as given in LPRUP).

Definition at line 2574 of file LHEF.h.

## ◆ IDUP

std::vector<long> IDUP

The PDG id's for the particle entries in this event.

Definition at line 2608 of file LHEF.h.

## ◆ isGroup

bool isGroup

Is this an event or an event group?

Definition at line 2701 of file LHEF.h.

## ◆ ISTUP

std::vector<int> ISTUP

The status codes for the particle entries in this event.

Definition at line 2613 of file LHEF.h.

## ◆ junk

std::string junk

Save junk stuff in events just to be on the safe side

Definition at line 2712 of file LHEF.h.

## ◆ MOTHUP

std::vector< std::pair<int,int> > MOTHUP

Indices for the first and last mother for the particle entries in this event.

Definition at line 2619 of file LHEF.h.

## ◆ namedweights

std::vector<Weight> namedweights

The weights associated with this event

Definition at line 2659 of file LHEF.h.

## ◆ ntries

int ntries

The number of attempts the ME generator did before accepting this event.

Definition at line 2696 of file LHEF.h.

## ◆ NUP

int NUP

The number of particle entries in the current event.

Definition at line 2569 of file LHEF.h.

## ◆ PDFGUPsave

std::pair<int,int> PDFGUPsave

Saved information about pdfs if different in a selected weight.

Definition at line 2679 of file LHEF.h.

## ◆ pdfinfo

PDFInfo pdfinfo

Contents of the pdfinfo tag.

Definition at line 2674 of file LHEF.h.

## ◆ PDFSUPsave

std::pair<int,int> PDFSUPsave

Saved information about pdfs if different in a selected weight.

Definition at line 2684 of file LHEF.h.

## ◆ PUP

std::vector< std::vector<double> > PUP

Lab frame momentum (Px, Py, Pz, E and M in GeV) for the particle entries in this event.

Definition at line 2631 of file LHEF.h.

## ◆ scales

Scales scales

Contents of the scales tag

Definition at line 2690 of file LHEF.h.

## ◆ SCALUP

double SCALUP

The scale in GeV used in the calculation of the PDF's in this event.

Definition at line 2593 of file LHEF.h.

## ◆ SPINUP

std::vector<double> SPINUP

Spin info for the particle entries in this event given as the cosine of the angle between the spin vector of a particle and the 3-momentum of the decaying particle, specified in the lab frame.

Definition at line 2644 of file LHEF.h.

## ◆ subevents

EventGroup subevents

If this is not a single event, but an event group, the events included in the group are in this vector;

Definition at line 2707 of file LHEF.h.

## ◆ VTIMUP

std::vector<double> VTIMUP

Invariant lifetime (c*tau, distance from production to decay in mm) for the particle entries in this event.

Definition at line 2637 of file LHEF.h.

## ◆ weights

std::vector< std::pair<double, const WeightInfo *> > weights

The weights for this event and their corresponding WeightInfo object.

Definition at line 2664 of file LHEF.h.

## ◆ XPDWUP

std::pair<double,double> XPDWUP

The PDF weights for the two incoming partons. Note that this variable is not present in the current LesHouches accord (hep-ph/0109068), hopefully it will be present in a future accord.

Definition at line 2587 of file LHEF.h.

## ◆ XWGTUP

double XWGTUP

The weight for this event.

Definition at line 2579 of file LHEF.h.

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

- LHEF.h