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-2019 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>
22 #include "HepMC3/Units.h"
23 
24 namespace 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
Definition of class GenVertexData.
std::vector< int > attribute_id
Attribute owner id.
Definition: GenEventData.h:54
std::vector< int > links2
Second id of the vertex links.
Definition: GenEventData.h:52
int event_number
Event number.
Definition: GenEventData.h:27
Units::MomentumUnit momentum_unit
Momentum unit.
Definition: GenEventData.h:28
std::vector< int > links1
First id of the vertex links.
Definition: GenEventData.h:51
FourVector event_pos
Event position.
Definition: GenEventData.h:35
std::vector< std::string > attribute_string
Attribute serialized as string.
Definition: GenEventData.h:56
LengthUnit
Position units.
Definition: Units.h:32
MomentumUnit
Momentum units.
Definition: Units.h:29
Stores serializable event information.
Definition: GenEventData.h:26
Generic 4-vector.
Definition: FourVector.h:35
std::vector< std::string > attribute_name
Attribute name.
Definition: GenEventData.h:55
Definition of class Units.
std::vector< GenParticleData > particles
Particles.
Definition: GenEventData.h:31
std::vector< double > weights
Weights.
Definition: GenEventData.h:33
std::vector< GenVertexData > vertices
Vertices.
Definition: GenEventData.h:32
Definition of class GenParticleData.
Units::LengthUnit length_unit
Length unit.
Definition: GenEventData.h:29