HepMC event record
Data Structures | Typedefs | Enumerations | Functions | Variables
HepMC Namespace Reference

Definition of template class SmartPointer. More...

Data Structures

class  Attribute
 Base class for all attributes. More...
 
class  ATTRIBUTE
 Filter for the attributes. More...
 
class  DoubleAttribute
 Attribute that holds a real number as a double. More...
 
class  Exception
 Standard runtime error. More...
 
class  Filter
 Class used to define filters for search engine. More...
 
class  FilterBase
 Base class for Filter class. More...
 
class  FilterList
 List of filters for the search engine. More...
 
class  FindParticles
 Search engine for GenEvent class. 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  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  IO_GenEvent
 Backward-compatibility wrapper for WriterAscii and ReaderAscii. More...
 
class  LongAttribute
 
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  ReaderRoot
 GenEvent I/O parsing and serialization for root files. More...
 
class  ReaderRootTree
 
class  ReaderRootTreeTree
 GenEvent I/O parsing and serialization for root files based on root TTree. More...
 
class  Setup
 Configuration for HepMC. More...
 
class  SmartPointer
 Smart pointer for HepMC objects. 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  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 FilterParticle = Relationship
 Compatibility name. More...
 
using IteratorRange = Relationship
 Compatibility name. More...
 
typedef std::vector< double > WeightContainer
 
typedef GenHeavyIon HeavyIon
 Backward compatibility typedef. More...
 
typedef GenPdfInfo PdfInfo
 Backward compatibility typedef. More...
 
using FilterEvent = FilterType
 Compatibility name. More...
 
Typedefs for smart pointers to HepMC classes
typedef SmartPointer< class GenParticleGenParticlePtr
 Smart pointer to GenParticle. More...
 
typedef SmartPointer< class GenVertexGenVertexPtr
 Smart pointer to GenVertex. More...
 
typedef SmartPointer< const class GenParticleConstGenParticlePtr
 Const smart pointer to GenParticle. More...
 
typedef SmartPointer< const class GenVertexConstGenVertexPtr
 Const smart pointer to GenVertex. More...
 
typedef shared_ptr< class GenPdfInfoGenPdfInfoPtr
 Shared pointer to GenPdfInfo. More...
 
typedef shared_ptr< class GenHeavyIonGenHeavyIonPtr
 Shared pointer to GenHeavyIon. More...
 
typedef shared_ptr< class GenCrossSectionGenCrossSectionPtr
 Shared pointer to GenCrossSection. More...
 

Enumerations

enum  Relationship {
  ANCESTORS = 0, FIND_ANCESTORS = 0, FIND_ALL_ANCESTORS = 0, ancestors = 0,
  DESCENDANTS = 1, FIND_DESCENDANTS = 1, FIND_ALL_DESCENDANTS = 1, descendants = 1,
  PARENTS = 2, FIND_PARENTS = 2, FIND_MOTHERS = 2, parents = 2,
  CHILDREN = 3, FIND_CHILDREN = 3, FIND_DAUGHTERS = 3, children = 3,
  PRODUCTION_SIBLINGS = 4, FIND_PRODUCTION_SIBLINGS = 4, ANCESTORS = 0, FIND_ANCESTORS = 0,
  FIND_ALL_ANCESTORS = 0, ancestors = 0, DESCENDANTS = 1, FIND_DESCENDANTS = 1,
  FIND_ALL_DESCENDANTS = 1, descendants = 1, PARENTS = 2, FIND_PARENTS = 2,
  FIND_MOTHERS = 2, parents = 2, CHILDREN = 3, FIND_CHILDREN = 3,
  FIND_DAUGHTERS = 3, children = 3, PRODUCTION_SIBLINGS = 4, FIND_PRODUCTION_SIBLINGS = 4
}
 List of methods of searching starting from a particle or vertex. More...
 
enum  FilterType {
  FIND_ALL, FIND_FIRST, FIND_LAST, FIND_ALL,
  FIND_FIRST, FIND_LAST
}
 List of methods of searching through all particles in the event. More...
 
enum  Relationship {
  ANCESTORS = 0, FIND_ANCESTORS = 0, FIND_ALL_ANCESTORS = 0, ancestors = 0,
  DESCENDANTS = 1, FIND_DESCENDANTS = 1, FIND_ALL_DESCENDANTS = 1, descendants = 1,
  PARENTS = 2, FIND_PARENTS = 2, FIND_MOTHERS = 2, parents = 2,
  CHILDREN = 3, FIND_CHILDREN = 3, FIND_DAUGHTERS = 3, children = 3,
  PRODUCTION_SIBLINGS = 4, FIND_PRODUCTION_SIBLINGS = 4, ANCESTORS = 0, FIND_ANCESTORS = 0,
  FIND_ALL_ANCESTORS = 0, ancestors = 0, DESCENDANTS = 1, FIND_DESCENDANTS = 1,
  FIND_ALL_DESCENDANTS = 1, descendants = 1, PARENTS = 2, FIND_PARENTS = 2,
  FIND_MOTHERS = 2, parents = 2, CHILDREN = 3, FIND_CHILDREN = 3,
  FIND_DAUGHTERS = 3, children = 3, PRODUCTION_SIBLINGS = 4, FIND_PRODUCTION_SIBLINGS = 4
}
 List of methods of searching starting from a particle or vertex. More...
 
enum  FilterType {
  FIND_ALL, FIND_FIRST, FIND_LAST, FIND_ALL,
  FIND_FIRST, FIND_LAST
}
 List of methods of searching through all particles in the event. More...
 

Functions

template<typename NUM >
NUM sqr (NUM x)
 Handy number squaring function. More...
 
FilterList operator && (const Filter &f1, const Filter &f2)
 Filter AND operator. More...
 
std::string version ()
 Get the HepMC library version string. More...
 
FilterList operator && (const Filter &f1, const Filter &f2)
 Filter AND operator. More...
 
void calculate_longest_path_to_top (GenVertexPtr v, std::map< GenVertexPtr, int > &pathl)
 
FilterList operator && (const Filter &f1, const Filter &f2)
 Filter AND operator. More...
 
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...
 
Finding via unbound functions (returns by copy)
vector< GenParticlePtrfindParticles (const GenEvent &evt, FilterEvent filter_type, FilterList filter_list=FilterList())
 Find from GenEvent. More...
 
vector< GenParticlePtrfindParticles (const GenParticlePtr &p, Relationship filter_type, FilterList filter_list=FilterList())
 Find from GenParticle. More...
 
vector< GenParticlePtrfindParticles (const GenVertexPtr &v, Relationship filter_type, FilterList filter_list=FilterList())
 Find from GenVertex. More...
 

Variables

struct HEPEVThepevtptr
 
static const Filter HAS_END_VERTEX = FilterBase::init_has_end_vertex()
 Filter for checking if HepMC::GenParticle::end_vertex() != NULL. More...
 
static const Filter HAS_PRODUCTION_VERTEX = FilterBase::init_has_production_vertex()
 Filter for checking if HepMC::GenParticle::production_vertex() != NULL. More...
 
static const Filter HAS_SAME_PDG_ID_DAUGHTER = FilterBase::init_has_same_pdg_id_daughter()
 Filter for checking if end vertex has particle with same pdg_id. More...
 
static const Filter IS_STABLE = FilterBase::init_is_stable()
 Filter for checking if particle is stable. More...
 
static const Filter IS_BEAM = FilterBase::init_is_beam()
 Filter for checking if particle is a beam particle. More...
 
static const FilterBase STATUS = FilterBase::init_status()
 Filter base for filtering GenParticle::status() More...
 
static const FilterBase PDG_ID = FilterBase::init_pdg_id()
 Filter base for filtering GenParticle::pid() More...
 
static const FilterBase ABS_PDG_ID = FilterBase::init_abs_pdg_id()
 Filter base for filtering abs( GenParticle::pid() ) More...
 
static const Filter HAS_END_VERTEX = FilterBase::init_has_end_vertex()
 Filter for checking if HepMC::GenParticle::end_vertex() != NULL. More...
 
static const Filter HAS_PRODUCTION_VERTEX = FilterBase::init_has_production_vertex()
 Filter for checking if HepMC::GenParticle::production_vertex() != NULL. More...
 
static const Filter HAS_SAME_PDG_ID_DAUGHTER = FilterBase::init_has_same_pdg_id_daughter()
 Filter for checking if end vertex has particle with same pdg_id. More...
 
static const Filter IS_STABLE = FilterBase::init_is_stable()
 Filter for checking if particle is stable. More...
 
static const Filter IS_BEAM = FilterBase::init_is_beam()
 Filter for checking if particle is a beam particle. More...
 
static const FilterBase STATUS = FilterBase::init_status()
 Filter base for filtering GenParticle::status() More...
 
static const FilterBase PDG_ID = FilterBase::init_pdg_id()
 Filter base for filtering GenParticle::pid() More...
 
static const FilterBase ABS_PDG_ID = FilterBase::init_abs_pdg_id()
 Filter base for filtering abs( GenParticle::pid() ) More...
 

Detailed Description

Definition of template class SmartPointer.

Todo:
Add feature detection macros? (clearly version-related)
Todo:
Add feature detection macros? (clearly version-related)

Typedef Documentation

◆ ConstGenParticlePtr

Const smart pointer to GenParticle.

Definition at line 142 of file build/outputs/include/HepMC/Data/SmartPointer.h.

◆ ConstGenVertexPtr

typedef SmartPointer< const class GenVertex > ConstGenVertexPtr

Const smart pointer to GenVertex.

Definition at line 143 of file build/outputs/include/HepMC/Data/SmartPointer.h.

◆ FilterEvent

Compatibility name.

Definition at line 34 of file build/outputs/include/HepMC/Search/FindParticles.h.

◆ FilterParticle

Compatibility name.

Definition at line 39 of file build/outputs/include/HepMC/Common.h.

◆ GenCrossSectionPtr

typedef shared_ptr< class GenCrossSection > GenCrossSectionPtr

Shared pointer to GenCrossSection.

Definition at line 147 of file build/outputs/include/HepMC/Data/SmartPointer.h.

◆ GenHeavyIonPtr

typedef shared_ptr< class GenHeavyIon > GenHeavyIonPtr

Shared pointer to GenHeavyIon.

Definition at line 146 of file build/outputs/include/HepMC/Data/SmartPointer.h.

◆ GenParticlePtr

Smart pointer to GenParticle.

Definition at line 139 of file build/outputs/include/HepMC/Data/SmartPointer.h.

◆ GenPdfInfoPtr

typedef shared_ptr< class GenPdfInfo > GenPdfInfoPtr

Shared pointer to GenPdfInfo.

Definition at line 145 of file build/outputs/include/HepMC/Data/SmartPointer.h.

◆ GenVertexPtr

Smart pointer to GenVertex.

Definition at line 140 of file build/outputs/include/HepMC/Data/SmartPointer.h.

◆ HeavyIon

Backward compatibility typedef.

Definition at line 69 of file build/outputs/include/HepMC/GenHeavyIon.h.

◆ IteratorRange

Compatibility name.

Definition at line 42 of file build/outputs/include/HepMC/Common.h.

◆ PdfInfo

Backward compatibility typedef.

Definition at line 66 of file build/outputs/include/HepMC/GenPdfInfo.h.

◆ WeightContainer

typedef std::vector< double > WeightContainer

Deprecated backward compatibility typedef

There is no distinct weight container type in HepMC3 – the information comes from several sources spread between GenEvent and GenRunInfo.

Definition at line 477 of file build/outputs/include/HepMC/GenEvent.h.

Enumeration Type Documentation

◆ FilterType [1/2]

enum FilterType

List of methods of searching through all particles in the event.

Definition at line 28 of file build/outputs/include/HepMC/Search/FindParticles.h.

◆ FilterType [2/2]

enum FilterType

List of methods of searching through all particles in the event.

Definition at line 28 of file include/HepMC/Search/FindParticles.h.

◆ Relationship [1/2]

List of methods of searching starting from a particle or vertex.

Todo:
Add 'family'='parents'+'children' and 'relatives'='ancestors'+'descendants'(+'siblings')?

Definition at line 30 of file include/HepMC/Common.h.

◆ Relationship [2/2]

List of methods of searching starting from a particle or vertex.

Todo:
Add 'family'='parents'+'children' and 'relatives'='ancestors'+'descendants'(+'siblings')?

Definition at line 30 of file build/outputs/include/HepMC/Common.h.

Function Documentation

◆ delta_eta()

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

Pseudorapidity separation between vecs a and b.

Definition at line 280 of file build/outputs/include/HepMC/FourVector.h.

References FourVector::delta_eta().

◆ delta_phi()

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

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

Definition at line 277 of file build/outputs/include/HepMC/FourVector.h.

References FourVector::delta_phi().

◆ delta_r2_eta()

double 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 286 of file build/outputs/include/HepMC/FourVector.h.

References FourVector::delta_r2_eta().

◆ delta_r2_rap()

double 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 292 of file build/outputs/include/HepMC/FourVector.h.

References FourVector::delta_r2_rap().

◆ delta_r_eta()

double 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 289 of file build/outputs/include/HepMC/FourVector.h.

References FourVector::delta_r_eta().

◆ delta_r_rap()

double 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 295 of file build/outputs/include/HepMC/FourVector.h.

References FourVector::delta_r_rap().

◆ delta_rap()

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

Rapidity separation between vecs a and b.

Definition at line 283 of file build/outputs/include/HepMC/FourVector.h.

References FourVector::delta_rap().

◆ findParticles() [1/3]

vector< GenParticlePtr > findParticles ( const GenEvent evt,
FilterEvent  filter_type,
FilterList  filter_list = FilterList() 
)
inline

Find from GenEvent.

Definition at line 92 of file build/outputs/include/HepMC/Search/FindParticles.h.

References FindParticles::results().

◆ findParticles() [2/3]

vector< GenParticlePtr > findParticles ( const GenParticlePtr p,
Relationship  filter_type,
FilterList  filter_list = FilterList() 
)
inline

◆ findParticles() [3/3]

vector< GenParticlePtr > findParticles ( const GenVertexPtr v,
Relationship  filter_type,
FilterList  filter_list = FilterList() 
)
inline

◆ operator &&() [1/3]

FilterList HepMC::operator&& ( const Filter f1,
const Filter f2 
)

Filter AND operator.

Defined so that FilterList can be constructed when there is more than one filter passed to search engine

Definition at line 29 of file FilterList.cc.

◆ operator &&() [2/3]

FilterList HepMC::operator&& ( const Filter f1,
const Filter f2 
)

Filter AND operator.

Defined so that FilterList can be constructed when there is more than one filter passed to search engine

Definition at line 29 of file FilterList.cc.

◆ operator &&() [3/3]

FilterList HepMC::operator&& ( const Filter f1,
const Filter f2 
)

Filter AND operator.

Defined so that FilterList can be constructed when there is more than one filter passed to search engine

Definition at line 29 of file FilterList.cc.

◆ sqr()

NUM sqr ( NUM  x)
inline

Handy number squaring function.

Definition at line 24 of file build/outputs/include/HepMC/Common.h.

◆ version()

std::string version ( )
inline

Get the HepMC library version string.

Definition at line 29 of file build/outputs/include/HepMC/Version.h.

Variable Documentation

◆ ABS_PDG_ID [1/2]

const FilterBase ABS_PDG_ID = FilterBase::init_abs_pdg_id()
static

Filter base for filtering abs( GenParticle::pid() )

Definition at line 134 of file build/outputs/include/HepMC/Search/FilterBase.h.

◆ ABS_PDG_ID [2/2]

const FilterBase ABS_PDG_ID = FilterBase::init_abs_pdg_id()
static

Filter base for filtering abs( GenParticle::pid() )

Definition at line 134 of file include/HepMC/Search/FilterBase.h.

◆ HAS_END_VERTEX [1/2]

const Filter HAS_END_VERTEX = FilterBase::init_has_end_vertex()
static

Filter for checking if HepMC::GenParticle::end_vertex() != NULL.

Examples:
basic_tree.cc.

Definition at line 91 of file build/outputs/include/HepMC/Search/Filter.h.

◆ HAS_END_VERTEX [2/2]

const Filter HAS_END_VERTEX = FilterBase::init_has_end_vertex()
static

Filter for checking if HepMC::GenParticle::end_vertex() != NULL.

Definition at line 91 of file include/HepMC/Search/Filter.h.

◆ HAS_PRODUCTION_VERTEX [1/2]

const Filter HAS_PRODUCTION_VERTEX = FilterBase::init_has_production_vertex()
static

Filter for checking if HepMC::GenParticle::production_vertex() != NULL.

Definition at line 92 of file include/HepMC/Search/Filter.h.

◆ HAS_PRODUCTION_VERTEX [2/2]

const Filter HAS_PRODUCTION_VERTEX = FilterBase::init_has_production_vertex()
static

◆ HAS_SAME_PDG_ID_DAUGHTER [1/2]

const Filter HAS_SAME_PDG_ID_DAUGHTER = FilterBase::init_has_same_pdg_id_daughter()
static

Filter for checking if end vertex has particle with same pdg_id.

Definition at line 93 of file build/outputs/include/HepMC/Search/Filter.h.

◆ HAS_SAME_PDG_ID_DAUGHTER [2/2]

const Filter HAS_SAME_PDG_ID_DAUGHTER = FilterBase::init_has_same_pdg_id_daughter()
static

Filter for checking if end vertex has particle with same pdg_id.

Definition at line 93 of file include/HepMC/Search/Filter.h.

◆ IS_BEAM [1/2]

const Filter IS_BEAM = FilterBase::init_is_beam()
static

Filter for checking if particle is a beam particle.

Definition at line 95 of file build/outputs/include/HepMC/Search/Filter.h.

◆ IS_BEAM [2/2]

const Filter IS_BEAM = FilterBase::init_is_beam()
static

Filter for checking if particle is a beam particle.

Definition at line 95 of file include/HepMC/Search/Filter.h.

◆ IS_STABLE [1/2]

const Filter IS_STABLE = FilterBase::init_is_stable()
static

Filter for checking if particle is stable.

Definition at line 94 of file include/HepMC/Search/Filter.h.

◆ IS_STABLE [2/2]

const Filter IS_STABLE = FilterBase::init_is_stable()
static

Filter for checking if particle is stable.

Examples:
basic_tree.cc.

Definition at line 94 of file build/outputs/include/HepMC/Search/Filter.h.

◆ PDG_ID [1/2]

const FilterBase PDG_ID = FilterBase::init_pdg_id()
static

Filter base for filtering GenParticle::pid()

Examples:
basic_tree.cc.

Definition at line 133 of file build/outputs/include/HepMC/Search/FilterBase.h.

◆ PDG_ID [2/2]

const FilterBase PDG_ID = FilterBase::init_pdg_id()
static

Filter base for filtering GenParticle::pid()

Definition at line 133 of file include/HepMC/Search/FilterBase.h.

◆ STATUS [1/2]

const FilterBase STATUS = FilterBase::init_status()
static

Filter base for filtering GenParticle::status()

Definition at line 132 of file include/HepMC/Search/FilterBase.h.

◆ STATUS [2/2]

const FilterBase STATUS = FilterBase::init_status()
static

Filter base for filtering GenParticle::status()

Examples:
basic_tree.cc.

Definition at line 132 of file build/outputs/include/HepMC/Search/FilterBase.h.