LHEF  3.0(beta)
Public Member Functions | Public Attributes | List of all members
LHEF::HEPEUP Class Reference

The HEPEUP class is a simple container corresponding to the Les Houches accord (hep-ph/0109068) common block with the same name. More...

#include <LHEF.h>

Inheritance diagram for LHEF::HEPEUP:
LHEF::TagBase

Public Member Functions

 HEPEUP (const XMLTag &tag, HEPRUP &heprupin)
 Constructor from an event or eventgroup tag.
 
void print (std::ostream &file) const
 Print out the event (group) as an XML tag.
 
void reset ()
 Reset the HEPEUP object (does not touch the sub events).
 
void clear ()
 Clear the HEPEUP object.
 
void resize (int nup)
 Set the NUP variable, corresponding to the number of particles in the current event, to nup, and resize all relevant vectors accordingly.
 
double totalWeight (int i=0) const
 Return the total weight for this event (including all sub evenets) for the given index.
 
double totalWeight (std::string name) const
 Return the total weight for this event (including all sub evenets) for the given weight name.
 
double weight (int i=0) const
 Return the weight for the given index.
 
double weight (std::string name) const
 Return the weight for the given weight name.
 
void setWeight (int i, double w)
 Set the weight with the given index.
 
bool setWeight (std::string name, double w)
 Set the weight with the given name.
 
void resize ()
 Assuming the NUP variable, corresponding to the number of particles in the current event, is correctly set, resize the relevant vectors accordingly.
 
bool setWeightInfo (unsigned int i)
 Setup the current event to use weight i.
 
bool setSubEvent (unsigned int i)
 Setup the current event to use sub event i.
 
Standard constructors and destructors.
 HEPEUP ()
 Default constructor.
 
 HEPEUP (const HEPEUP &x)
 Copy constructor.
 
HEPEUPsetEvent (const HEPEUP &x)
 Copy information from the given HEPEUP.
 
HEPEUPoperator= (const HEPEUP &x)
 Assignment operator.
 
 ~HEPEUP ()
 Destructor.
 
- Public Member Functions inherited from LHEF::TagBase
 TagBase ()
 Default constructor does nothing.
 
 TagBase (const AttributeMap &attr, std::string conts=std::string())
 Main constructor stores the attributes and contents of a tag.
 
bool getattr (std::string n, double &v, bool erase=true)
 Find an attribute named n and set the double variable v to the corresponding value.
 
bool getattr (std::string n, bool &v, bool erase=true)
 Find an attribute named n and set the bool variable v to true if the corresponding value is "yes".
 
bool getattr (std::string n, long &v, bool erase=true)
 Find an attribute named n and set the long variable v to the corresponding value.
 
bool getattr (std::string n, int &v, bool erase=true)
 Find an attribute named n and set the long variable v to the corresponding value.
 
bool getattr (std::string n, std::string &v, bool erase=true)
 Find an attribute named n and set the string variable v to the corresponding value.
 
void printattrs (std::ostream &file) const
 print out ' name="value"' for all unparsed attributes.
 
void closetag (std::ostream &file, std::string tag) const
 Print out end of tag marker.
 

Public Attributes

int NUP
 The number of particle entries in the current event.
 
int IDPRUP
 The subprocess code for this event (as given in LPRUP).
 
double XWGTUP
 The weight for this event.
 
std::pair< double, double > XPDWUP
 The PDF weights for the two incoming partons.
 
double SCALUP
 The scale in GeV used in the calculation of the PDF's in this event.
 
double AQEDUP
 The value of the QED coupling used in this event.
 
double AQCDUP
 The value of the QCD coupling used in this event.
 
std::vector< long > IDUP
 The PDG id's for the particle entries in this event.
 
std::vector< int > ISTUP
 The status codes for the particle entries in this event.
 
std::vector< std::pair< int,
int > > 
MOTHUP
 Indices for the first and last mother for the particle entries in this event.
 
std::vector< std::pair< int,
int > > 
ICOLUP
 The colour-line indices (first(second) is (anti)colour) for the particle entries in this event.
 
std::vector< std::vector
< double > > 
PUP
 Lab frame momentum (Px, Py, Pz, E and M in GeV) for the particle entries in this event.
 
std::vector< double > VTIMUP
 Invariant lifetime (c*tau, distance from production to decay in mm) for the particle entries in this event.
 
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.
 
HEPRUPheprup
 A pointer to the current HEPRUP object.
 
const WeightInfocurrentWeight
 The current weight info object.
 
std::vector< Weightnamedweights
 The weights associated with this event.
 
std::vector< std::pair< double,
const WeightInfo * > > 
weights
 The weights for this event and their corresponding WeightInfo object.
 
std::vector< Clusclustering
 Contents of the clustering tag.
 
PDFInfo pdfinfo
 Contents of the pdfinfo tag.
 
std::pair< int, int > PDFGUPsave
 Saved information about pdfs if different in a selected weight.
 
std::pair< int, int > PDFSUPsave
 Saved information about pdfs if different in a selected weight.
 
Scales scales
 Contents of the scales tag.
 
bool isGroup
 Is this an event or an event group?
 
EventGroup subevents
 If this is not a single event, but an event group, the events included in the group are in this vector;.
 
std::string junk
 Save junk stuff in events just to be on the safe side.
 
- Public Attributes inherited from LHEF::TagBase
XMLTag::AttributeMap attributes
 The attributes of this tag;.
 
std::string contents
 The contents of this tag.
 

Additional Inherited Members

- Public Types inherited from LHEF::TagBase
typedef XMLTag::AttributeMap AttributeMap
 Convenient typedef.
 
- Static Public Member Functions inherited from LHEF::TagBase
static std::string yes ()
 Static string token for truth values.
 

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

Member Function Documentation

HEPEUP& LHEF::HEPEUP::setEvent ( const HEPEUP x)
inline

Copy information from the given HEPEUP.

Sub event information is left untouched.

Definition at line 1848 of file LHEF.h.

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

Referenced by operator=(), and setSubEvent().

bool LHEF::HEPEUP::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 2231 of file LHEF.h.

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

bool LHEF::HEPEUP::setWeightInfo ( unsigned int  i)
inline

Setup the current event to use weight i.

If zero, the default weight will be used.

Definition at line 2200 of file LHEF.h.

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

Referenced by reset().

Member Data Documentation

std::pair<double,double> LHEF::HEPEUP::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 2269 of file LHEF.h.

Referenced by setEvent().


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