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

#include <LHEF.h>

+ Inheritance diagram for HEPEUP:
+ Collaboration diagram for HEPEUP:

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 (std::string name) const
 
double weight (int i=0) const
 
double weight (std::string name) const
 
void setWeight (int i, double w)
 
bool setWeight (std::string name, double w)
 
void resize ()
 
bool setWeightInfo (unsigned int i)
 
bool setSubEvent (unsigned int i)
 
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.
 HEPEUP ()
 
 HEPEUP (const HEPEUP &x)
 
HEPEUPsetEvent (const HEPEUP &x)
 
HEPEUPoperator= (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
 
HEPRUPheprup
 
const WeightInfocurrentWeight
 
std::vector< Weightnamedweights
 
std::vector< std::pair< double, const WeightInfo * > > weights
 
std::vector< Clusclustering
 
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

Convenient typedef.

Definition at line 350 of file LHEF.h.

Constructor & Destructor Documentation

◆ HEPEUP() [1/3]

HEPEUP ( )
inline

Default constructor.

Definition at line 2126 of file LHEF.h.

◆ HEPEUP() [2/3]

HEPEUP ( const HEPEUP x)
inline

Copy constructor

Definition at line 2134 of file LHEF.h.

References HEPEUP::operator=().

◆ ~HEPEUP()

~HEPEUP ( )
inline

Destructor.

Definition at line 2188 of file LHEF.h.

References HEPEUP::clear().

◆ HEPEUP() [3/3]

HEPEUP ( const XMLTag tagin,
HEPRUP heprupin 
)
inline

Member Function Documentation

◆ clear()

void clear ( )
inline

Clear the HEPEUP object.

Definition at line 2414 of file LHEF.h.

References EventGroup::clear(), HEPEUP::reset(), and HEPEUP::subevents.

◆ closetag()

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.

◆ getattr() [1/5]

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.

◆ getattr() [2/5]

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.

◆ getattr() [3/5]

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.

◆ getattr() [4/5]

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.

◆ getattr() [5/5]

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.

◆ operator=()

HEPEUP & operator= ( const HEPEUP x)
inline

Assignment operator.

Definition at line 2175 of file LHEF.h.

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

◆ print()

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

◆ printattrs()

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

◆ reset()

void reset ( )
inline

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

Definition at line 2404 of file LHEF.h.

References HEPEUP::clustering, HEPEUP::NUP, HEPEUP::setWeightInfo(), and HEPEUP::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 2485 of file LHEF.h.

References HEPEUP::ICOLUP, HEPEUP::IDUP, HEPEUP::ISTUP, HEPEUP::MOTHUP, HEPEUP::NUP, HEPEUP::PUP, HEPEUP::SPINUP, and HEPEUP::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 2424 of file LHEF.h.

References HEPEUP::NUP, and HEPEUP::resize().

◆ setEvent()

HEPEUP & setEvent ( const HEPEUP x)
inline

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

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

◆ setWeight() [1/2]

void setWeight ( int  i,
double  w 
)
inline

Set the weight with the given index.

Definition at line 2466 of file LHEF.h.

References HEPEUP::weights.

◆ setWeight() [2/2]

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

Set the weight with the given name.

Definition at line 2472 of file LHEF.h.

References HEPEUP::heprup, HEPEUP::setWeight(), HEPRUP::weightIndex(), and HEPEUP::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 2499 of file LHEF.h.

References HEPEUP::currentWeight, HEPEUP::heprup, WeightInfo::muf, Scales::muf, WeightInfo::mur, Scales::mur, WeightInfo::pdf, WeightInfo::pdf2, HEPRUP::PDFGUP, HEPEUP::PDFGUPsave, HEPRUP::PDFSUP, HEPEUP::PDFSUPsave, HEPEUP::scales, HEPEUP::weights, and HEPEUP::XWGTUP.

◆ totalWeight() [1/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 2433 of file LHEF.h.

References HEPEUP::subevents, and HEPEUP::weight().

◆ totalWeight() [2/2]

double totalWeight ( std::string  name) const
inline

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

Definition at line 2445 of file LHEF.h.

References HEPEUP::heprup, HEPEUP::totalWeight(), and HEPRUP::weightIndex().

◆ weight() [1/2]

double weight ( int  i = 0) const
inline

Return the weight for the given index.

Definition at line 2452 of file LHEF.h.

References HEPEUP::weights.

◆ weight() [2/2]

double weight ( std::string  name) const
inline

Return the weight for the given weight name.

Definition at line 2459 of file LHEF.h.

References HEPEUP::heprup, HEPEUP::weight(), and HEPRUP::weightIndex().

◆ yes()

static std::string yes ( )
inlinestaticinherited

Static string token for truth values.

Definition at line 467 of file LHEF.h.

Field Documentation

◆ AQCDUP

double AQCDUP

The value of the QCD coupling used in this event.

Definition at line 2584 of file LHEF.h.

◆ AQEDUP

double AQEDUP

The value of the QED coupling used in this event.

Definition at line 2579 of file LHEF.h.

◆ attributes

XMLTag::AttributeMap attributes
inherited

The attributes of this tag;

Definition at line 457 of file LHEF.h.

◆ clustering

std::vector<Clus> clustering

Contents of the clustering tag.

Definition at line 2650 of file LHEF.h.

◆ contents

std::string contents
mutableinherited

The contents of this tag.

Definition at line 462 of file LHEF.h.

◆ currentWeight

const WeightInfo* currentWeight

The current weight info object.

Definition at line 2635 of file LHEF.h.

◆ heprup

HEPRUP* heprup

A pointer to the current HEPRUP object.

Examples
LHEF_example_cat.cc.

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

◆ IDPRUP

int IDPRUP

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

Definition at line 2555 of file LHEF.h.

◆ IDUP

std::vector<long> IDUP

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

Definition at line 2589 of file LHEF.h.

◆ isGroup

bool isGroup

Is this an event or an event group?

Definition at line 2682 of file LHEF.h.

◆ ISTUP

std::vector<int> ISTUP

The status codes for the particle entries in this event.

Definition at line 2594 of file LHEF.h.

◆ junk

std::string junk

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

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

◆ namedweights

std::vector<Weight> namedweights

The weights associated with this event

Definition at line 2640 of file LHEF.h.

◆ ntries

int ntries

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

Definition at line 2677 of file LHEF.h.

◆ NUP

int NUP

The number of particle entries in the current event.

Definition at line 2550 of file LHEF.h.

◆ PDFGUPsave

std::pair<int,int> PDFGUPsave

Saved information about pdfs if different in a selected weight.

Definition at line 2660 of file LHEF.h.

◆ pdfinfo

PDFInfo pdfinfo

Contents of the pdfinfo tag.

Definition at line 2655 of file LHEF.h.

◆ PDFSUPsave

std::pair<int,int> PDFSUPsave

Saved information about pdfs if different in a selected weight.

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

◆ scales

Scales scales

Contents of the scales tag

Definition at line 2671 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 2574 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 2625 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 2688 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 2618 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 2645 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 2568 of file LHEF.h.

◆ XWGTUP

double XWGTUP

The weight for this event.

Definition at line 2560 of file LHEF.h.


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