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 2142 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)
 
 contents (conts)
 
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
 
 __pad0__: attributes(attr)
 
XMLTag::AttributeMap attributes
 
std::string contents
 

Member Typedef Documentation

Convenient typedef.

Definition at line 350 of file LHEF.h.

Constructor & Destructor Documentation

HEPEUP ( )
inline

Default constructor.

Definition at line 2151 of file LHEF.h.

HEPEUP ( const HEPEUP x)
inline

Copy constructor

Definition at line 2159 of file LHEF.h.

References HEPEUP::operator=().

~HEPEUP ( )
inline

Destructor.

Definition at line 2211 of file LHEF.h.

References HEPEUP::clear().

HEPEUP ( const XMLTag tagin,
HEPRUP heprupin 
)
inline

Member Function Documentation

void clear ( )
inline

Clear the HEPEUP object.

Definition at line 2438 of file LHEF.h.

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

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 446 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 369 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 383 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 397 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 411 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 425 of file LHEF.h.

References TagBase::attributes.

HEPEUP& operator= ( const HEPEUP x)
inline

Assignment operator.

Definition at line 2200 of file LHEF.h.

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

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

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

void reset ( )
inline

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

Definition at line 2428 of file LHEF.h.

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

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

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

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

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

HEPEUP& setEvent ( const HEPEUP x)
inline
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 2554 of file LHEF.h.

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

void setWeight ( int  i,
double  w 
)
inline

Set the weight with the given index.

Definition at line 2490 of file LHEF.h.

References HEPEUP::weights.

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

Set the weight with the given name.

Definition at line 2496 of file LHEF.h.

References HEPEUP::heprup, HEPEUP::setWeight(), HEPRUP::weightIndex(), and HEPEUP::weights.

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 2523 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.

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

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

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

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

double weight ( int  i = 0) const
inline

Return the weight for the given index.

Definition at line 2476 of file LHEF.h.

References HEPEUP::weights.

double weight ( std::string  name) const
inline

Return the weight for the given weight name.

Definition at line 2483 of file LHEF.h.

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

static std::string yes ( )
inlinestaticinherited

Static string token for truth values.

Definition at line 468 of file LHEF.h.

Field Documentation

__pad0__
inherited

Main constructor stores the attributes and contents of a tag.

Definition at line 361 of file LHEF.h.

double AQCDUP

The value of the QCD coupling used in this event.

Definition at line 2608 of file LHEF.h.

double AQEDUP

The value of the QED coupling used in this event.

Definition at line 2603 of file LHEF.h.

XMLTag::AttributeMap attributes
inherited

The attributes of this tag;

Definition at line 458 of file LHEF.h.

std::vector<Clus> clustering

Contents of the clustering tag.

Definition at line 2674 of file LHEF.h.

std::string contents
mutableinherited

The contents of this tag.

Definition at line 463 of file LHEF.h.

const WeightInfo* currentWeight

The current weight info object.

Definition at line 2659 of file LHEF.h.

HEPRUP* heprup

A pointer to the current HEPRUP object.

Examples:
LHEF_example_cat.cc.

Definition at line 2654 of file LHEF.h.

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

int IDPRUP

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

Definition at line 2579 of file LHEF.h.

std::vector<long> IDUP

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

Definition at line 2613 of file LHEF.h.

bool isGroup

Is this an event or an event group?

Definition at line 2706 of file LHEF.h.

std::vector<int> ISTUP

The status codes for the particle entries in this event.

Definition at line 2618 of file LHEF.h.

std::string junk

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

Definition at line 2717 of file LHEF.h.

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

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

Definition at line 2624 of file LHEF.h.

std::vector<Weight> namedweights

The weights associated with this event

Definition at line 2664 of file LHEF.h.

int ntries

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

Definition at line 2701 of file LHEF.h.

int NUP

The number of particle entries in the current event.

Definition at line 2574 of file LHEF.h.

std::pair<int,int> PDFGUPsave

Saved information about pdfs if different in a selected weight.

Definition at line 2684 of file LHEF.h.

PDFInfo pdfinfo

Contents of the pdfinfo tag.

Definition at line 2679 of file LHEF.h.

std::pair<int,int> PDFSUPsave

Saved information about pdfs if different in a selected weight.

Definition at line 2689 of file LHEF.h.

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

Scales scales

Contents of the scales tag

Definition at line 2695 of file LHEF.h.

double SCALUP

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

Definition at line 2598 of file LHEF.h.

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

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

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

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

The weights for this event and their corresponding WeightInfo object.

Definition at line 2669 of file LHEF.h.

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

double XWGTUP

The weight for this event.

Definition at line 2584 of file LHEF.h.


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