HepMC3 event record library
Data Structures | Typedefs | Functions | Variables
HepMC3 Namespace Reference

HepMC3 main namespace. More...

Data Structures

class  _children
 Provides operator to find the child particles of a Vertex or Particle. More...
 
class  _parents
 Provides operator to find the parent particles of a Vertex or Particle. More...
 
class  AssociatedParticle
 Attribute class allowing eg. a GenParticle to refer to another GenParticle. More...
 
class  Attribute
 Forward declaration of GenParticle. More...
 
class  ATTRIBUTE
 Filter for the attributes. More...
 
class  AttributeFeature
 AttributeFeature. More...
 
class  DoubleAttribute
 Attribute that holds a real number as a double. More...
 
class  Exception
 Standard runtime error. More...
 
class  Feature
 Expose GenericFeature interface to derived Feature class. More...
 
class  Feature< Feature_type, typename std::enable_if< std::is_floating_point< Feature_type >::value, void >::type >
 specialisation of Feature for floating point type More...
 
class  Feature< Feature_type, typename std::enable_if< std::is_integral< Feature_type >::value, void >::type >
 Specialisation of Feature for integral types. More...
 
class  FloatAttribute
 Attribute that holds a real number as a float. More...
 
class  FourVector
 Generic 4-vector. More...
 
class  GenCrossSection
 Stores additional information about cross-section. More...
 
class  GenericFeature
 GenericFeature defines the Feature interface GenericFeature is not intended to be used directly. The derived Feature class and its specialisations should be used. More...
 
class  GenEvent
 Stores event-related information. More...
 
struct  GenEventData
 Stores serializable event information. More...
 
class  GenHeavyIon
 Stores additional information about Heavy Ion generator. More...
 
class  GenParticle
 Stores particle-related information. More...
 
struct  GenParticleData
 Stores serializable particle information. More...
 
struct  GenParticlePtr_greater_order
 
class  GenPdfInfo
 Stores additional information about PDFs. More...
 
class  GenRunInfo
 Stores run-related information. More...
 
struct  GenRunInfoData
 Stores serializable run information. More...
 
class  GenVertex
 Stores vertex-related information. More...
 
struct  GenVertexData
 Stores serializable vertex information. More...
 
class  HEPEUPAttribute
 Class for storing data for LHEF run information. More...
 
class  HEPEVT_Wrapper
 An interface to HEPEVT common block. More...
 
class  HEPRUPAttribute
 Class for storing data for LHEF run information. More...
 
class  IntAttribute
 Attribute that holds an Integer implemented as an int. More...
 
class  LongAttribute
 Attribute that holds an Integer implemented as an int. More...
 
struct  pair_GenVertexPtr_int_greater
 
class  Print
 Provides different printing formats. More...
 
class  Reader
 Base class for all I/O readers. More...
 
class  ReaderAscii
 GenEvent I/O parsing for structured text files. More...
 
class  ReaderAsciiHepMC2
 Parser for HepMC2 I/O files. More...
 
class  ReaderHEPEVT
 GenEvent I/O parsing and serialization for HEPEVT files. More...
 
class  ReaderLHEF
 GenEvent I/O parsing and serialization for LHEF files. More...
 
class  ReaderRoot
 GenEvent I/O parsing and serialization for root files. More...
 
class  ReaderRootTree
 GenEvent I/O parsing and serialization for root files based on root TTree. More...
 
class  Recursive
 
class  Relatives
 Define a common interface that all Relatives objects will satisfy Relatives provides an operator to get the relatives of a range of different GenObject types. The following are examples. More...
 
class  RelativesInterface
 wrap a templated class that implements Relatives Since we need to template the functionality on the input type (GenParticlePtr, ConstGenVertexPtr etc.) we must wrap a class that has a templated operator in this that provides the Relatives interface and calls through to the underlying template method. More...
 
class  Selector
 Selector is an interface to "standard" Features that are valid for both integral and floating point comparisons. More...
 
class  SelectorWrapper
 
class  Setup
 Configuration for HepMC. More...
 
struct  sort_by_id_asc
 
class  StringAttribute
 Attribute that holds a string. More...
 
class  Units
 Stores units-related enums and conversion functions. More...
 
struct  WeightError
 Exception related to weight lookups, setting, and index consistency. More...
 
class  Writer
 Base class for all I/O writers. More...
 
class  WriterAscii
 GenEvent I/O serialization for structured text files. More...
 
class  WriterAsciiHepMC2
 GenEvent I/O serialization for structured text files. More...
 
class  WriterDOT
 GenEvent I/O output to dot files that should be processed by graphviz or other software. More...
 
class  WriterHEPEVT
 GenEvent I/O serialization for HEPEVT files. More...
 
class  WriterHEPEVTZEUS
 
class  WriterRoot
 GenEvent I/O serialization for root files. More...
 
class  WriterRootTree
 GenEvent I/O serialization for root files based on root TTree. More...
 
class  WriterRootTreeOPAL
 

Typedefs

using GenCrossSectionPtr = std::shared_ptr< GenCrossSection >
 
using ConstGenCrossSectionPtr = std::shared_ptr< const GenCrossSection >
 
typedef GenHeavyIon HeavyIon
 Backward compatibility typedef. More...
 
using GenHeavyIonPtr = std::shared_ptr< GenHeavyIon >
 
using ConstGenHeavyIonPtr = std::shared_ptr< const GenHeavyIon >
 
using GenParticlePtr = std::shared_ptr< GenParticle >
 
using ConstGenParticlePtr = std::shared_ptr< const GenParticle >
 
using GenParticles = std::vector< GenParticlePtr >
 
using ConstGenParticles = std::vector< ConstGenParticlePtr >
 
template<typename T >
using GenParticles_type = typename std::conditional< std::is_const< typename T::element_type >::value, ConstGenParticles, GenParticles >::type
 
using GenPdfInfoPtr = std::shared_ptr< GenPdfInfo >
 
using ConstGenPdfInfoPtr = std::shared_ptr< const GenPdfInfo >
 
using GenVertexPtr = std::shared_ptr< GenVertex >
 
using ConstGenVertexPtr = std::shared_ptr< const GenVertex >
 
template<typename T >
using GenVertex_type = typename std::conditional< std::is_const< typename T::element_type >::value, ConstGenVertexPtr, GenVertexPtr >::type
 
using Filter = std::function< bool(ConstGenParticlePtr)>
 
using Parents = RelativesInterface< _parents >
 alias of _parents wrapped in the Relatives interface More...
 
using Children = RelativesInterface< _children >
 alias of _children wrapped in the Relatives interface More...
 
using Ancestors = RelativesInterface< Recursive< _parents > >
 Ancestors is an alias to Recursion applied to the _parents and wrapped in the Relatives interface. More...
 
using Descendants = RelativesInterface< Recursive< _children > >
 Descendants is an alias to Recursion applied to the _children and wrapped in the Relatives interface. More...
 
using ConstSelectorPtr = std::shared_ptr< const Selector >
 

Functions

bool is_parton (const int &pd)
 
std::shared_ptr< Readerdeduce_reader (const std::string &filename)
 
std::string version ()
 Get the HepMC library version string. More...
 
template<typename Feature_type >
Feature< Feature_type > abs (const Feature< Feature_type > &input)
 Obtain the absolute value of a Feature. This works as you'd expect. If foo is a valid Feature, then abs(foo) returns a new Feature that corresponds to the absolute value of the foo feature. You can construct a Filter from that in the usual way with e.g. Filter f = abs(foo) > 10.;. More...
 
vector< GenParticlePtr > applyFilter (const Filter &filter, const vector< GenParticlePtr > &particles)
 Apply a Filter to a list of GenParticles Returns a vector of GenParticles that satisfy the Filter. More...
 
vector< ConstGenParticlePtr > applyFilter (const Filter &filter, const vector< ConstGenParticlePtr > &particles)
 Apply a Filter to a list of ConstGenParticles Returns a vector of ConstGenParticles that satisfy the Filter. More...
 
bool ACCEPT_ALL (ConstGenParticlePtr dummy)
 A Filter that will accept all particles This might be needed if a signature requires a default Filter. More...
 
Filter operator&& (const Filter &lhs, const Filter &rhs)
 The logical AND of two Filters is itself a Filter. More...
 
Filter operator|| (const Filter &lhs, const Filter &rhs)
 The logical OR of two Filters is itself a Filter. More...
 
Filter operator! (const Filter &rhs)
 The negation of a Filter is itself a Filter. More...
 
ConstSelectorPtr abs (const Selector &input)
 
static bool visit_children (std::map< ConstGenVertexPtr, int > &a, ConstGenVertexPtr v)
 
void calculate_longest_path_to_top (ConstGenVertexPtr v, std::map< ConstGenVertexPtr, int > &pathl)
 
Unbound vector comparison functions
double delta_phi (const FourVector &a, const FourVector &b)
 Signed azimuthal angle separation in [-pi, pi] between vecs a and b. More...
 
double delta_eta (const FourVector &a, const FourVector &b)
 Pseudorapidity separation between vecs a and b. More...
 
double delta_rap (const FourVector &a, const FourVector &b)
 Rapidity separation between vecs a and b. More...
 
double delta_r2_eta (const FourVector &a, const FourVector &b)
 R_eta^2-distance separation dR^2 = dphi^2 + deta^2 between vecs a and b. More...
 
double delta_r_eta (const FourVector &a, const FourVector &b)
 R_eta-distance separation dR = sqrt(dphi^2 + deta^2) between vecs a and b. More...
 
double delta_r2_rap (const FourVector &a, const FourVector &b)
 R_rap^2-distance separation dR^2 = dphi^2 + drap^2 between vecs a and b. More...
 
double delta_r_rap (const FourVector &a, const FourVector &b)
 R_rap-distance separation dR = sqrt(dphi^2 + drap^2) between vecs a and b. More...
 

Variables

struct HEPEVThepevtptr
 

Detailed Description

HepMC3 main namespace.

HepMC3 main namespace

Typedef Documentation

◆ Ancestors

Ancestors is an alias to Recursion applied to the _parents and wrapped in the Relatives interface.

Definition at line 35 of file Relatives.h.

◆ Children

alias of _children wrapped in the Relatives interface

Definition at line 33 of file Relatives.h.

◆ Descendants

Descendants is an alias to Recursion applied to the _children and wrapped in the Relatives interface.

Definition at line 37 of file Relatives.h.

◆ GenParticles_type

using GenParticles_type = typename std::conditional<std::is_const<typename T::element_type>::value, ConstGenParticles, GenParticles>::type

An alias to a vector of GenParticle pointers whose constness depends on the constness of the template shared_ptr param This is convenient for declaring the return types based on the input type

Definition at line 31 of file GenParticle_fwd.h.

◆ HeavyIon

Backward compatibility typedef.

Definition at line 247 of file GenHeavyIon.h.

◆ Parents

alias of _parents wrapped in the Relatives interface

Definition at line 31 of file Relatives.h.

Function Documentation

◆ abs()

Feature<Feature_type> HepMC3::abs ( const Feature< Feature_type > &  input)

Obtain the absolute value of a Feature. This works as you'd expect. If foo is a valid Feature, then abs(foo) returns a new Feature that corresponds to the absolute value of the foo feature. You can construct a Filter from that in the usual way with e.g. Filter f = abs(foo) > 10.;.

Examples
basic_tree.cc.

Definition at line 316 of file Feature.h.

◆ ACCEPT_ALL()

bool HepMC3::ACCEPT_ALL ( ConstGenParticlePtr  dummy)
inline

A Filter that will accept all particles This might be needed if a signature requires a default Filter.

Definition at line 41 of file Filter.h.

◆ applyFilter() [1/2]

vector<GenParticlePtr> HepMC3::applyFilter ( const Filter &  filter,
const vector< GenParticlePtr > &  particles 
)
inline

Apply a Filter to a list of GenParticles Returns a vector of GenParticles that satisfy the Filter.

Examples
basic_tree.cc.

Definition at line 21 of file Filter.h.

◆ applyFilter() [2/2]

vector<ConstGenParticlePtr> HepMC3::applyFilter ( const Filter &  filter,
const vector< ConstGenParticlePtr > &  particles 
)
inline

Apply a Filter to a list of ConstGenParticles Returns a vector of ConstGenParticles that satisfy the Filter.

Definition at line 31 of file Filter.h.

◆ delta_eta()

double HepMC3::delta_eta ( const FourVector a,
const FourVector b 
)
inline

Pseudorapidity separation between vecs a and b.

Definition at line 277 of file FourVector.h.

References FourVector::delta_eta().

◆ delta_phi()

double HepMC3::delta_phi ( const FourVector a,
const FourVector b 
)
inline

Signed azimuthal angle separation in [-pi, pi] between vecs a and b.

Definition at line 274 of file FourVector.h.

References FourVector::delta_phi().

◆ delta_r2_eta()

double HepMC3::delta_r2_eta ( const FourVector a,
const FourVector b 
)
inline

R_eta^2-distance separation dR^2 = dphi^2 + deta^2 between vecs a and b.

Definition at line 283 of file FourVector.h.

References FourVector::delta_r2_eta().

◆ delta_r2_rap()

double HepMC3::delta_r2_rap ( const FourVector a,
const FourVector b 
)
inline

R_rap^2-distance separation dR^2 = dphi^2 + drap^2 between vecs a and b.

Definition at line 289 of file FourVector.h.

References FourVector::delta_r2_rap().

◆ delta_r_eta()

double HepMC3::delta_r_eta ( const FourVector a,
const FourVector b 
)
inline

R_eta-distance separation dR = sqrt(dphi^2 + deta^2) between vecs a and b.

Definition at line 286 of file FourVector.h.

References FourVector::delta_r_eta().

◆ delta_r_rap()

double HepMC3::delta_r_rap ( const FourVector a,
const FourVector b 
)
inline

R_rap-distance separation dR = sqrt(dphi^2 + drap^2) between vecs a and b.

Definition at line 292 of file FourVector.h.

References FourVector::delta_r_rap().

◆ delta_rap()

double HepMC3::delta_rap ( const FourVector a,
const FourVector b 
)
inline

Rapidity separation between vecs a and b.

Definition at line 280 of file FourVector.h.

References FourVector::delta_rap().

◆ operator!()

Filter HepMC3::operator! ( const Filter &  rhs)
inline

The negation of a Filter is itself a Filter.

Definition at line 56 of file Filter.h.

◆ operator&&()

Filter HepMC3::operator&& ( const Filter &  lhs,
const Filter &  rhs 
)
inline

The logical AND of two Filters is itself a Filter.

Definition at line 46 of file Filter.h.

◆ operator||()

Filter HepMC3::operator|| ( const Filter &  lhs,
const Filter &  rhs 
)
inline

The logical OR of two Filters is itself a Filter.

Definition at line 51 of file Filter.h.

◆ version()

std::string HepMC3::version ( )
inline

Get the HepMC library version string.

Definition at line 20 of file Version.h.

◆ visit_children()

static bool HepMC3::visit_children ( std::map< ConstGenVertexPtr, int > &  a,
ConstGenVertexPtr  v 
)
static
Todo:
This looks dangerously similar to the recusive event traversel that we forbade in the Core library due to wories about generator dependence

Definition at line 255 of file GenEvent.cc.