ATLAS Offline Software
Loading...
Searching...
No Matches
Gen_HEPEVT.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef GENERATORMODULES_GEN_HEPEVT_H
6#define GENERATORMODULES_GEN_HEPEVT_H
7
9// #include "StoreGate/tools/ClassID_traits.h"
10// #include "CLHEP/Vector/LorentzVector.h"
11#include <vector>
12#include <map>
13
14
38public:
39 Gen_HEPEVT();
40
42
43 int nevhep() const;
44 int nhep() const;
45 int isthep(int ihep);
46 int idhep(int ihep);
47 int first_parent(int ihep);
48 int last_parent(int ihep);
49 int first_child(int ihep);
50 int last_child(int ihep);
51 double px(int ihep);
52 double py(int ihep);
53 double pz(int ihep);
54 double e(int ihep);
55 double m(int ihep);
56 double x(int ihep);
57 double y(int ihep);
58 double z(int ihep);
59 double t(int ihep);
61
62 // "Set" methods
64 void nevhep(int value);
65 void nhep(int value);
66 void isthep(int& ihep, int value);
67 void idhep(int& ihep, int value);
68 void mothers(int& ihep, int value1, int value2);
69 void daughters(int& ihep, int value1, int value2);
70 void momentum(int& ihep, double px, double py, double pz, double e, double m );
71 void position(int& ihep, double x, double y, double z, double t);
73
74
75private:
76
78 int m_NHEP;
79 std::map<int, int> m_ISTHEP;
80 std::map<int, int> m_IDHEP;
81 std::map<int, std::pair<int, int> > m_JMOHEP;
82 std::map<int, std::pair<int, int> > m_JDAHEP;
83 std::map<int, double> m_PHEP0;
84 std::map<int, double> m_PHEP1;
85 std::map<int, double> m_PHEP2;
86 std::map<int, double> m_PHEP3;
87 std::map<int, double> m_PHEP4;
88 std::map<int, double> m_VHEP0;
89 std::map<int, double> m_VHEP1;
90 std::map<int, double> m_VHEP2;
91 std::map<int, double> m_VHEP3;
92};
93
94
95
96inline
98 : m_NEVHEP(0), m_NHEP(0)
99{ }
100
101
102inline int
103Gen_HEPEVT::nevhep (void) const { return m_NEVHEP; }
104
105inline int
106Gen_HEPEVT::nhep(void) const { return m_NHEP; }
107
108inline int
109Gen_HEPEVT::isthep(int ihep) { return m_ISTHEP[ihep]; }
110
111inline int
112Gen_HEPEVT::idhep(int ihep) { return m_IDHEP[ihep]; }
113
114inline int
115Gen_HEPEVT::first_parent(int ihep) { return m_JMOHEP[ihep].first; }
116
117inline int
118Gen_HEPEVT::last_parent(int ihep) { return m_JMOHEP[ihep].second; }
119
120inline int
121Gen_HEPEVT::first_child(int ihep) { return m_JDAHEP[ihep].first; }
122
123inline int
124Gen_HEPEVT::last_child(int ihep) { return m_JDAHEP[ihep].second; }
125
126inline double
127Gen_HEPEVT::px(int ihep) { return m_PHEP0[ihep]; }
128
129inline double
130Gen_HEPEVT::py(int ihep) { return m_PHEP1[ihep]; }
131
132inline double
133Gen_HEPEVT::pz(int ihep) { return m_PHEP2[ihep]; }
134
135inline double
136Gen_HEPEVT::e(int ihep) { return m_PHEP3[ihep]; }
137
138inline double
139Gen_HEPEVT::m(int ihep) { return m_PHEP4[ihep]; }
140
141inline double
142Gen_HEPEVT::x(int ihep) { return m_VHEP0[ihep]; }
143
144inline double
145Gen_HEPEVT::y(int ihep) { return m_VHEP1[ihep]; }
146
147inline double
148Gen_HEPEVT::z(int ihep) { return m_VHEP2[ihep]; }
149
150inline double
151Gen_HEPEVT::t(int ihep) { return m_VHEP3[ihep]; }
152
153
154inline void
155Gen_HEPEVT::nevhep(int value) { m_NEVHEP = value; }
156
157inline void
158Gen_HEPEVT::nhep(int value) { m_NHEP = value; }
159
160inline void
161Gen_HEPEVT::isthep(int& ihep, int value) { m_ISTHEP[ihep] = value; }
162
163inline void
164Gen_HEPEVT::idhep(int& ihep, int value) { m_IDHEP[ihep] = value; }
165
166inline void
167Gen_HEPEVT::mothers(int& ihep, int value1, int value2) {
168 m_JMOHEP[ihep] = std::make_pair(value1, value2);
169}
170
171inline void
172Gen_HEPEVT::daughters(int& ihep, int value1, int value2) {
173 m_JDAHEP[ihep] = std::make_pair(value1, value2);
174}
175
176inline void
177Gen_HEPEVT::momentum(int& ihep, double px, double py, double pz, double e, double m ) {
178 m_PHEP0[ihep] = px;
179 m_PHEP1[ihep] = py;
180 m_PHEP2[ihep] = pz;
181 m_PHEP3[ihep] = e;
182 m_PHEP4[ihep] = m;
183}
184
185inline void
186Gen_HEPEVT::position(int& ihep, double x, double y, double z, double t) {
187 m_VHEP0[ihep] = x;
188 m_VHEP1[ihep] = y;
189 m_VHEP2[ihep] = z;
190 m_VHEP3[ihep] = t;
191}
192
193
194CLASS_DEF( Gen_HEPEVT, 2221, 1)
195
196#endif
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
#define y
#define x
#define z
C++ access to the Fortran HEPEVT common block.
Definition Gen_HEPEVT.h:37
std::map< int, std::pair< int, int > > m_JDAHEP
Definition Gen_HEPEVT.h:82
std::map< int, double > m_VHEP3
Definition Gen_HEPEVT.h:91
double px(int ihep)
Definition Gen_HEPEVT.h:127
void mothers(int &ihep, int value1, int value2)
Definition Gen_HEPEVT.h:167
int last_parent(int ihep)
Definition Gen_HEPEVT.h:118
double y(int ihep)
Definition Gen_HEPEVT.h:145
double t(int ihep)
Definition Gen_HEPEVT.h:151
int isthep(int ihep)
Definition Gen_HEPEVT.h:109
int idhep(int ihep)
Definition Gen_HEPEVT.h:112
void position(int &ihep, double x, double y, double z, double t)
Definition Gen_HEPEVT.h:186
int first_child(int ihep)
Definition Gen_HEPEVT.h:121
std::map< int, double > m_PHEP3
Definition Gen_HEPEVT.h:86
std::map< int, double > m_PHEP4
Definition Gen_HEPEVT.h:87
double m(int ihep)
Definition Gen_HEPEVT.h:139
void daughters(int &ihep, int value1, int value2)
Definition Gen_HEPEVT.h:172
void momentum(int &ihep, double px, double py, double pz, double e, double m)
Definition Gen_HEPEVT.h:177
int nevhep() const
Definition Gen_HEPEVT.h:103
double pz(int ihep)
Definition Gen_HEPEVT.h:133
std::map< int, std::pair< int, int > > m_JMOHEP
Definition Gen_HEPEVT.h:81
std::map< int, double > m_VHEP0
Definition Gen_HEPEVT.h:88
double py(int ihep)
Definition Gen_HEPEVT.h:130
double e(int ihep)
Definition Gen_HEPEVT.h:136
std::map< int, double > m_PHEP2
Definition Gen_HEPEVT.h:85
std::map< int, int > m_IDHEP
Definition Gen_HEPEVT.h:80
std::map< int, int > m_ISTHEP
Definition Gen_HEPEVT.h:79
std::map< int, double > m_PHEP1
Definition Gen_HEPEVT.h:84
int nhep() const
Definition Gen_HEPEVT.h:106
double x(int ihep)
Definition Gen_HEPEVT.h:142
std::map< int, double > m_VHEP1
Definition Gen_HEPEVT.h:89
std::map< int, double > m_VHEP2
Definition Gen_HEPEVT.h:90
int first_parent(int ihep)
Definition Gen_HEPEVT.h:115
int last_child(int ihep)
Definition Gen_HEPEVT.h:124
std::map< int, double > m_PHEP0
Definition Gen_HEPEVT.h:83
double z(int ihep)
Definition Gen_HEPEVT.h:148