ATLAS Offline Software
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 
37 class Gen_HEPEVT {
38 public:
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 
75 private:
76 
77  int m_NEVHEP;
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 
96 inline
98  : m_NEVHEP(0), m_NHEP(0)
99 { }
100 
101 
102 inline int
103 Gen_HEPEVT::nevhep (void) const { return m_NEVHEP; }
104 
105 inline int
106 Gen_HEPEVT::nhep(void) const { return m_NHEP; }
107 
108 inline int
109 Gen_HEPEVT::isthep(int ihep) { return m_ISTHEP[ihep]; }
110 
111 inline int
112 Gen_HEPEVT::idhep(int ihep) { return m_IDHEP[ihep]; }
113 
114 inline int
115 Gen_HEPEVT::first_parent(int ihep) { return m_JMOHEP[ihep].first; }
116 
117 inline int
118 Gen_HEPEVT::last_parent(int ihep) { return m_JMOHEP[ihep].second; }
119 
120 inline int
121 Gen_HEPEVT::first_child(int ihep) { return m_JDAHEP[ihep].first; }
122 
123 inline int
124 Gen_HEPEVT::last_child(int ihep) { return m_JDAHEP[ihep].second; }
125 
126 inline double
127 Gen_HEPEVT::px(int ihep) { return m_PHEP0[ihep]; }
128 
129 inline double
130 Gen_HEPEVT::py(int ihep) { return m_PHEP1[ihep]; }
131 
132 inline double
133 Gen_HEPEVT::pz(int ihep) { return m_PHEP2[ihep]; }
134 
135 inline double
136 Gen_HEPEVT::e(int ihep) { return m_PHEP3[ihep]; }
137 
138 inline double
139 Gen_HEPEVT::m(int ihep) { return m_PHEP4[ihep]; }
140 
141 inline double
142 Gen_HEPEVT::x(int ihep) { return m_VHEP0[ihep]; }
143 
144 inline double
145 Gen_HEPEVT::y(int ihep) { return m_VHEP1[ihep]; }
146 
147 inline double
148 Gen_HEPEVT::z(int ihep) { return m_VHEP2[ihep]; }
149 
150 inline double
151 Gen_HEPEVT::t(int ihep) { return m_VHEP3[ihep]; }
152 
153 
154 inline void
156 
157 inline void
159 
160 inline void
161 Gen_HEPEVT::isthep(int& ihep, int value) { m_ISTHEP[ihep] = value; }
162 
163 inline void
164 Gen_HEPEVT::idhep(int& ihep, int value) { m_IDHEP[ihep] = value; }
165 
166 inline void
167 Gen_HEPEVT::mothers(int& ihep, int value1, int value2) {
168  m_JMOHEP[ihep] = std::make_pair(value1, value2);
169 }
170 
171 inline void
172 Gen_HEPEVT::daughters(int& ihep, int value1, int value2) {
173  m_JDAHEP[ihep] = std::make_pair(value1, value2);
174 }
175 
176 inline void
177 Gen_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 
185 inline void
186 Gen_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 
194 CLASS_DEF( Gen_HEPEVT, 2221, 1)
195 
196 #endif
Gen_HEPEVT::isthep
int isthep(int ihep)
Definition: Gen_HEPEVT.h:109
Gen_HEPEVT::m
double m(int ihep)
Definition: Gen_HEPEVT.h:139
Gen_HEPEVT::z
double z(int ihep)
Definition: Gen_HEPEVT.h:148
test_pyathena.px
px
Definition: test_pyathena.py:18
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
Gen_HEPEVT::m_IDHEP
std::map< int, int > m_IDHEP
Definition: Gen_HEPEVT.h:80
Gen_HEPEVT::Gen_HEPEVT
Gen_HEPEVT()
Definition: Gen_HEPEVT.h:97
Gen_HEPEVT::daughters
void daughters(int &ihep, int value1, int value2)
Definition: Gen_HEPEVT.h:172
Gen_HEPEVT::y
double y(int ihep)
Definition: Gen_HEPEVT.h:145
Gen_HEPEVT::m_VHEP1
std::map< int, double > m_VHEP1
Definition: Gen_HEPEVT.h:89
Gen_HEPEVT::m_PHEP2
std::map< int, double > m_PHEP2
Definition: Gen_HEPEVT.h:85
Gen_HEPEVT::t
double t(int ihep)
Definition: Gen_HEPEVT.h:151
athena.value
value
Definition: athena.py:122
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Gen_HEPEVT::idhep
int idhep(int ihep)
Definition: Gen_HEPEVT.h:112
x
#define x
Gen_HEPEVT::m_NEVHEP
int m_NEVHEP
Definition: Gen_HEPEVT.h:77
Gen_HEPEVT::m_VHEP0
std::map< int, double > m_VHEP0
Definition: Gen_HEPEVT.h:88
Gen_HEPEVT::py
double py(int ihep)
Definition: Gen_HEPEVT.h:130
Gen_HEPEVT::m_VHEP2
std::map< int, double > m_VHEP2
Definition: Gen_HEPEVT.h:90
Gen_HEPEVT::first_parent
int first_parent(int ihep)
Definition: Gen_HEPEVT.h:115
Gen_HEPEVT::last_child
int last_child(int ihep)
Definition: Gen_HEPEVT.h:124
Gen_HEPEVT::m_PHEP0
std::map< int, double > m_PHEP0
Definition: Gen_HEPEVT.h:83
Gen_HEPEVT::m_JDAHEP
std::map< int, std::pair< int, int > > m_JDAHEP
Definition: Gen_HEPEVT.h:82
Gen_HEPEVT::px
double px(int ihep)
Definition: Gen_HEPEVT.h:127
z
#define z
Gen_HEPEVT::last_parent
int last_parent(int ihep)
Definition: Gen_HEPEVT.h:118
Gen_HEPEVT::m_VHEP3
std::map< int, double > m_VHEP3
Definition: Gen_HEPEVT.h:91
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
Gen_HEPEVT::m_PHEP1
std::map< int, double > m_PHEP1
Definition: Gen_HEPEVT.h:84
Gen_HEPEVT::nevhep
int nevhep() const
Definition: Gen_HEPEVT.h:103
Gen_HEPEVT::m_NHEP
int m_NHEP
Definition: Gen_HEPEVT.h:78
Gen_HEPEVT::m_ISTHEP
std::map< int, int > m_ISTHEP
Definition: Gen_HEPEVT.h:79
Gen_HEPEVT::m_PHEP3
std::map< int, double > m_PHEP3
Definition: Gen_HEPEVT.h:86
Amg::py
@ py
Definition: GeoPrimitives.h:39
Gen_HEPEVT::e
double e(int ihep)
Definition: Gen_HEPEVT.h:136
Gen_HEPEVT::position
void position(int &ihep, double x, double y, double z, double t)
Definition: Gen_HEPEVT.h:186
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
y
#define y
Gen_HEPEVT::momentum
void momentum(int &ihep, double px, double py, double pz, double e, double m)
Definition: Gen_HEPEVT.h:177
Gen_HEPEVT::pz
double pz(int ihep)
Definition: Gen_HEPEVT.h:133
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
Gen_HEPEVT::m_PHEP4
std::map< int, double > m_PHEP4
Definition: Gen_HEPEVT.h:87
Gen_HEPEVT::first_child
int first_child(int ihep)
Definition: Gen_HEPEVT.h:121
Gen_HEPEVT::m_JMOHEP
std::map< int, std::pair< int, int > > m_JMOHEP
Definition: Gen_HEPEVT.h:81
Gen_HEPEVT::mothers
void mothers(int &ihep, int value1, int value2)
Definition: Gen_HEPEVT.h:167
CLASS_DEF.h
macros to associate a CLID to a type
Gen_HEPEVT
C++ access to the Fortran HEPEVT common block.
Definition: Gen_HEPEVT.h:37
Gen_HEPEVT::x
double x(int ihep)
Definition: Gen_HEPEVT.h:142
Gen_HEPEVT::nhep
int nhep() const
Definition: Gen_HEPEVT.h:106