HepMC event record
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 1831 of file build/outputs/include/HepMC/LHEF.h.

#include <LHEF.h>

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

Public Types

typedef XMLTag::AttributeMap AttributeMap
 
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)
 
 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)
 
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 printattrs (std::ostream &file) const
 
void closetag (std::ostream &file, std::string tag) 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 ()
 
 HEPEUP ()
 
 HEPEUP (const HEPEUP &x)
 
HEPEUPsetEvent (const HEPEUP &x)
 
HEPEUPoperator= (const HEPEUP &x)
 
 ~HEPEUP ()
 

Static Public Member Functions

static std::string yes ()
 
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
 
bool isGroup
 
EventGroup subevents
 
std::string junk
 
XMLTag::AttributeMap attributes
 
std::string contents
 

Member Typedef Documentation

◆ AttributeMap [1/2]

Convenient typedef.

Definition at line 338 of file build/outputs/include/HepMC/LHEF.h.

◆ AttributeMap [2/2]

Convenient typedef.

Definition at line 338 of file include/HepMC/LHEF.h.

Constructor & Destructor Documentation

◆ HEPEUP() [1/6]

HEPEUP ( )
inline

Default constructor.

Definition at line 1840 of file build/outputs/include/HepMC/LHEF.h.

◆ HEPEUP() [2/6]

HEPEUP ( const HEPEUP x)
inline

Copy constructor

Definition at line 1848 of file build/outputs/include/HepMC/LHEF.h.

References HEPEUP::operator=().

◆ ~HEPEUP() [1/2]

~HEPEUP ( )
inline

Destructor.

Definition at line 1899 of file build/outputs/include/HepMC/LHEF.h.

References HEPEUP::clear().

◆ HEPEUP() [3/6]

HEPEUP ( const XMLTag tagin,
HEPRUP heprupin 
)
inline

◆ HEPEUP() [4/6]

HEPEUP ( )
inline

Default constructor.

Definition at line 1840 of file include/HepMC/LHEF.h.

◆ HEPEUP() [5/6]

HEPEUP ( const HEPEUP x)
inline

Copy constructor

Definition at line 1848 of file include/HepMC/LHEF.h.

References HEPEUP::operator=().

◆ ~HEPEUP() [2/2]

~HEPEUP ( )
inline

Destructor.

Definition at line 1899 of file include/HepMC/LHEF.h.

References HEPEUP::clear().

◆ HEPEUP() [6/6]

HEPEUP ( const XMLTag tagin,
HEPRUP heprupin 
)
inline

Member Function Documentation

◆ clear() [1/2]

void clear ( )
inline

Clear the HEPEUP object.

Definition at line 2126 of file build/outputs/include/HepMC/LHEF.h.

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

◆ clear() [2/2]

void clear ( )
inline

Clear the HEPEUP object.

Definition at line 2126 of file include/HepMC/LHEF.h.

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

◆ closetag() [1/2]

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 434 of file build/outputs/include/HepMC/LHEF.h.

References TagBase::contents.

◆ closetag() [2/2]

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 434 of file include/HepMC/LHEF.h.

References TagBase::contents.

◆ getattr() [1/10]

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 357 of file include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [2/10]

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 357 of file build/outputs/include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [3/10]

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 371 of file build/outputs/include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [4/10]

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 371 of file include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [5/10]

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 385 of file build/outputs/include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [6/10]

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 385 of file include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [7/10]

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 399 of file build/outputs/include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [8/10]

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 399 of file include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [9/10]

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 413 of file build/outputs/include/HepMC/LHEF.h.

References TagBase::attributes.

◆ getattr() [10/10]

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 413 of file include/HepMC/LHEF.h.

References TagBase::attributes.

◆ operator=() [1/2]

HEPEUP& operator= ( const HEPEUP x)
inline

Assignment operator.

Definition at line 1888 of file include/HepMC/LHEF.h.

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

◆ operator=() [2/2]

HEPEUP& operator= ( const HEPEUP x)
inline

Assignment operator.

Definition at line 1888 of file build/outputs/include/HepMC/LHEF.h.

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

◆ print() [1/2]

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

◆ print() [2/2]

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

◆ printattrs() [1/2]

void printattrs ( std::ostream &  file) const
inlineinherited

print out ' name="value"' for all unparsed attributes.

Definition at line 424 of file build/outputs/include/HepMC/LHEF.h.

References TagBase::attributes.

◆ printattrs() [2/2]

void printattrs ( std::ostream &  file) const
inlineinherited

print out ' name="value"' for all unparsed attributes.

Definition at line 424 of file include/HepMC/LHEF.h.

References TagBase::attributes.

◆ reset() [1/2]

void reset ( )
inline

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

Definition at line 2116 of file build/outputs/include/HepMC/LHEF.h.

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

◆ reset() [2/2]

void reset ( )
inline

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

Definition at line 2116 of file include/HepMC/LHEF.h.

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

◆ resize() [1/4]

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 2136 of file build/outputs/include/HepMC/LHEF.h.

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

◆ resize() [2/4]

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 2136 of file include/HepMC/LHEF.h.

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

◆ resize() [3/4]

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 2197 of file build/outputs/include/HepMC/LHEF.h.

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

◆ resize() [4/4]

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 2197 of file include/HepMC/LHEF.h.

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

◆ setEvent() [1/2]

HEPEUP& setEvent ( const HEPEUP x)
inline

◆ setEvent() [2/2]

HEPEUP& setEvent ( const HEPEUP x)
inline

◆ setSubEvent() [1/2]

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 2242 of file include/HepMC/LHEF.h.

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

◆ setSubEvent() [2/2]

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 2242 of file build/outputs/include/HepMC/LHEF.h.

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

◆ setWeight() [1/4]

void setWeight ( int  i,
double  w 
)
inline

Set the weight with the given index.

Definition at line 2178 of file build/outputs/include/HepMC/LHEF.h.

References HEPEUP::weights.

◆ setWeight() [2/4]

void setWeight ( int  i,
double  w 
)
inline

Set the weight with the given index.

Definition at line 2178 of file include/HepMC/LHEF.h.

References HEPEUP::weights.

◆ setWeight() [3/4]

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

Set the weight with the given name.

Definition at line 2184 of file include/HepMC/LHEF.h.

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

◆ setWeight() [4/4]

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

Set the weight with the given name.

Definition at line 2184 of file build/outputs/include/HepMC/LHEF.h.

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

◆ setWeightInfo() [1/2]

bool setWeightInfo ( unsigned int  i)
inline

◆ setWeightInfo() [2/2]

bool setWeightInfo ( unsigned int  i)
inline

◆ totalWeight() [1/4]

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 2145 of file build/outputs/include/HepMC/LHEF.h.

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

◆ totalWeight() [2/4]

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 2145 of file include/HepMC/LHEF.h.

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

◆ totalWeight() [3/4]

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 2157 of file build/outputs/include/HepMC/LHEF.h.

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

◆ totalWeight() [4/4]

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 2157 of file include/HepMC/LHEF.h.

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

◆ weight() [1/4]

double weight ( int  i = 0) const
inline

Return the weight for the given index.

Definition at line 2164 of file include/HepMC/LHEF.h.

References HEPEUP::weights.

◆ weight() [2/4]

double weight ( int  i = 0) const
inline

Return the weight for the given index.

Definition at line 2164 of file build/outputs/include/HepMC/LHEF.h.

References HEPEUP::weights.

◆ weight() [3/4]

double weight ( std::string  name) const
inline

Return the weight for the given weight name.

Definition at line 2171 of file build/outputs/include/HepMC/LHEF.h.

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

◆ weight() [4/4]

double weight ( std::string  name) const
inline

Return the weight for the given weight name.

Definition at line 2171 of file include/HepMC/LHEF.h.

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

◆ yes() [1/2]

static std::string yes ( )
inlinestaticinherited

Static string token for truth values.

Definition at line 456 of file include/HepMC/LHEF.h.

◆ yes() [2/2]

static std::string yes ( )
inlinestaticinherited

Static string token for truth values.

Definition at line 456 of file build/outputs/include/HepMC/LHEF.h.

Field Documentation

◆ AQCDUP

double AQCDUP

The value of the QCD coupling used in this event.

Definition at line 2296 of file build/outputs/include/HepMC/LHEF.h.

◆ AQEDUP

double AQEDUP

The value of the QED coupling used in this event.

Definition at line 2291 of file build/outputs/include/HepMC/LHEF.h.

◆ attributes

XMLTag::AttributeMap attributes
inherited

The attributes of this tag;

Definition at line 446 of file build/outputs/include/HepMC/LHEF.h.

◆ clustering

std::vector< Clus > clustering

Contents of the clustering tag.

Definition at line 2362 of file build/outputs/include/HepMC/LHEF.h.

◆ contents

std::string contents
inherited

The contents of this tag.

Definition at line 451 of file build/outputs/include/HepMC/LHEF.h.

◆ currentWeight

const WeightInfo * currentWeight

The current weight info object.

Definition at line 2347 of file build/outputs/include/HepMC/LHEF.h.

◆ heprup

HEPRUP * heprup

A pointer to the current HEPRUP object.

Examples:
LHEF_example_cat.cc.

Definition at line 2342 of file build/outputs/include/HepMC/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 2318 of file build/outputs/include/HepMC/LHEF.h.

◆ IDPRUP

int IDPRUP

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

Definition at line 2267 of file build/outputs/include/HepMC/LHEF.h.

◆ IDUP

std::vector< long > IDUP

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

Definition at line 2301 of file build/outputs/include/HepMC/LHEF.h.

◆ isGroup

bool isGroup

Is this an event or an event group?

Definition at line 2388 of file build/outputs/include/HepMC/LHEF.h.

◆ ISTUP

std::vector< int > ISTUP

The status codes for the particle entries in this event.

Definition at line 2306 of file build/outputs/include/HepMC/LHEF.h.

◆ junk

std::string junk

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

Definition at line 2399 of file build/outputs/include/HepMC/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 2312 of file build/outputs/include/HepMC/LHEF.h.

◆ namedweights

std::vector< Weight > namedweights

The weights associated with this event

Definition at line 2352 of file build/outputs/include/HepMC/LHEF.h.

◆ NUP

int NUP

The number of particle entries in the current event.

Definition at line 2262 of file build/outputs/include/HepMC/LHEF.h.

◆ PDFGUPsave

std::pair< int, int > PDFGUPsave

Saved information about pdfs if different in a selected weight.

Definition at line 2372 of file build/outputs/include/HepMC/LHEF.h.

◆ pdfinfo

PDFInfo pdfinfo

Contents of the pdfinfo tag.

Definition at line 2367 of file build/outputs/include/HepMC/LHEF.h.

◆ PDFSUPsave

std::pair< int, int > PDFSUPsave

Saved information about pdfs if different in a selected weight.

Definition at line 2377 of file build/outputs/include/HepMC/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 2324 of file build/outputs/include/HepMC/LHEF.h.

◆ scales

Scales scales

Contents of the scales tag

Definition at line 2383 of file build/outputs/include/HepMC/LHEF.h.

◆ SCALUP

double SCALUP

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

Definition at line 2286 of file build/outputs/include/HepMC/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 2337 of file build/outputs/include/HepMC/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 2394 of file build/outputs/include/HepMC/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 2330 of file build/outputs/include/HepMC/LHEF.h.

◆ weights

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

The weights for this event and their corresponding WeightInfo object.

Definition at line 2357 of file build/outputs/include/HepMC/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 2280 of file build/outputs/include/HepMC/LHEF.h.

◆ XWGTUP

double XWGTUP

The weight for this event.

Definition at line 2272 of file build/outputs/include/HepMC/LHEF.h.


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