HepMC3 event record library: GenEventData.h Source File

HepMC3 event record library

GenEventData.h
Go to the documentation of this file.
1// -*- C++ -*-
2//
3// This file is part of HepMC
4// Copyright (C) 2014-2023 The HepMC collaboration (see AUTHORS for details)
5//
6#ifndef HEPMC3_DATA_GENEVENTDATA_H
7#define HEPMC3_DATA_GENEVENTDATA_H
8/**
9 * @file GenEventData.h
10 * @brief Definition of \b struct GenEventData
11 *
12 * @struct HepMC3::GenEventData
13 * @brief Stores serializable event information
14 *
15 * @ingroup data
16 *
17 */
18#include <vector>
19#include <string>
20#include "HepMC3/Data/GenParticleData.h"
21#include "HepMC3/Data/GenVertexData.h"
22#include "HepMC3/Units.h"
23
24namespace HepMC3 {
25
26 struct GenEventData {
27 int event_number; ///< Event number
28 Units::MomentumUnit momentum_unit; ///< Momentum unit
29 Units::LengthUnit length_unit; ///< Length unit
30
31 std::vector<GenParticleData> particles; ///< Particles
32 std::vector<GenVertexData> vertices; ///< Vertices
33 std::vector<double> weights; ///< Weights
34
35 FourVector event_pos; ///< Event position
36
37 /** @brief First id of the vertex links
38 *
39 * If this id is positive - it is the incoming particle id
40 * of a vertex which id is written in GenEventData::links2
41 *
42 * If this id is negative - it's the id of a vertex which
43 * outgoing particle id is written in GenEventData::links2
44 *
45 * The links1[i] points to links2[i].
46 * In case links1[i] is particle, links2[i] is end vertex.
47 * In case links2[i] is vertex, links2[i] is outgoing particle.
48 * An example of usage is given in documentation.
49 *
50 */
51 std::vector<int> links1;
52 std::vector<int> links2; ///< Second id of the vertex links
53
54 std::vector<int> attribute_id; ///< Attribute owner id
55 std::vector<std::string> attribute_name; ///< Attribute name
56 std::vector<std::string> attribute_string; ///< Attribute serialized as string
57};
58
59} // namespace HepMC
60
61#endif
GenParticleData.h
Definition of class GenParticleData.
GenVertexData.h
Definition of class GenVertexData.
Units.h
Definition of class Units.
HepMC3::FourVector
Generic 4-vector.
Definition FourVector.h:36
HepMC3::Units::LengthUnit
LengthUnit
Position units.
Definition Units.h:32
HepMC3::Units::MomentumUnit
MomentumUnit
Momentum units.
Definition Units.h:29
HepMC3
HepMC3 main namespace.
Definition AnalysisExample.h:24
HepMC3::GenEventData
Stores serializable event information.
Definition GenEventData.h:26
HepMC3::GenEventData::vertices
std::vector< GenVertexData > vertices
Vertices.
Definition GenEventData.h:32
HepMC3::GenEventData::links2
std::vector< int > links2
Second id of the vertex links.
Definition GenEventData.h:52
HepMC3::GenEventData::event_number
int event_number
Event number.
Definition GenEventData.h:27
HepMC3::GenEventData::attribute_string
std::vector< std::string > attribute_string
Attribute serialized as string.
Definition GenEventData.h:56
HepMC3::GenEventData::particles
std::vector< GenParticleData > particles
Particles.
Definition GenEventData.h:31
HepMC3::GenEventData::links1
std::vector< int > links1
First id of the vertex links.
Definition GenEventData.h:51
HepMC3::GenEventData::attribute_name
std::vector< std::string > attribute_name
Attribute name.
Definition GenEventData.h:55
HepMC3::GenEventData::length_unit
Units::LengthUnit length_unit
Length unit.
Definition GenEventData.h:29
HepMC3::GenEventData::attribute_id
std::vector< int > attribute_id
Attribute owner id.
Definition GenEventData.h:54
HepMC3::GenEventData::event_pos
FourVector event_pos
Event position.
Definition GenEventData.h:35
HepMC3::GenEventData::weights
std::vector< double > weights
Weights.
Definition GenEventData.h:33
HepMC3::GenEventData::momentum_unit
Units::MomentumUnit momentum_unit
Momentum unit.
Definition GenEventData.h:28