CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
Gen_HEPEVT.h
Go to the documentation of this file.
1#ifndef GENERATORMODULES_GEN_HEPEVT_H
2# define GENERATORMODULES_GEN_HEPEVT_H
3
4#include <vector>
5#include <map>
6
7#include "CLIDSvc/CLASS_DEF.h"
8// #include "StoreGate/tools/ClassID_traits.h"
9#include "CLHEP/Vector/LorentzVector.h"
10
12{
13public:
14 Gen_HEPEVT (void);
15
16 // Get Methods
17 int nevhep (void) const;
18 int nhep (void) const;
19 int isthep (int ihep);
20 int idhep (int ihep);
21 int first_parent (int ihep);
22 int last_parent (int ihep);
23 int first_child (int ihep);
24 int last_child (int ihep);
25 double px (int ihep);
26 double py (int ihep);
27 double pz (int ihep);
28 double e (int ihep);
29 double m (int ihep);
30 double x (int ihep);
31 double y (int ihep);
32 double z (int ihep);
33 double t (int ihep);
34
35
36 // Set Methods
37 void nevhep (int value);
38 void nhep (int value);
39 void isthep (int& ihep, int value);
40 void idhep (int& ihep, int value);
41 void mothers (int& ihep, int value1, int value2);
42 void daughters (int& ihep, int value1, int value2);
43 void momentum (int& ihep, double px, double py,
44 double pz, double e, double m );
45 void position (int& ihep, double x, double y,
46 double z, double t);
47private:
48
49/**********************************************************/
50/* D E S C R I P T I O N : */
51/*--------------------------------------------------------*/
52/* NEVHEP - event number (or some special meaning*/
53/* (see documentation for details) */
54/* NHEP - actual number of entries in current */
55/* event. */
56/* ISTHEP[IHEP] - status code for IHEP'th entry - see */
57/* documentation for details */
58/* IDHEP [IHEP] - IHEP'th particle identifier according*/
59/* to PDG. */
60/* JMOHEP[IHEP][0] - pointer to position of 1st mother */
61/* JMOHEP[IHEP][1] - pointer to position of 2nd mother */
62/* JDAHEP[IHEP][0] - pointer to position of 1st daughter */
63/* JDAHEP[IHEP][1] - pointer to position of 2nd daughter */
64/* PHEP [IHEP][0] - X momentum [Gev/c] */
65/* PHEP [IHEP][1] - Y momentum [Gev/c] */
66/* PHEP [IHEP][2] - Z momentum [Gev/c] */
67/* PHEP [IHEP][3] - Energy [Gev] */
68/* PHEP [IHEP][4] - Mass[Gev/c^2] */
69/* VHEP [IHEP][0] - X vertex [mm] */
70/* VHEP [IHEP][1] - Y vertex [mm] */
71/* VHEP [IHEP][2] - Z vertex [mm] */
72/* VHEP [IHEP][3] - production time [mm/c] */
73/*========================================================*/
74
75 int m_NEVHEP;
76 int m_NHEP;
77 std::map<int, int> m_ISTHEP;
78 std::map<int, int> m_IDHEP;
79 std::map<int, std::pair<int, int> > m_JMOHEP;
80 std::map<int, std::pair<int, int> > m_JDAHEP;
81 std::map<int, double > m_PHEP0;
82 std::map<int, double > m_PHEP1;
83 std::map<int, double > m_PHEP2;
84 std::map<int, double > m_PHEP3;
85 std::map<int, double > m_PHEP4;
86 std::map<int, double > m_VHEP0;
87 std::map<int, double > m_VHEP1;
88 std::map<int, double > m_VHEP2;
89 std::map<int, double > m_VHEP3;
90};
91
92inline
94 : m_NEVHEP (0),
95 m_NHEP (0)
96{}
97
98//
99// Get Methods
100//
101inline int
103{ return m_NEVHEP; }
104
105inline int
107{ return m_NHEP; }
108
109inline int
111{ return m_ISTHEP[ihep]; }
112
113inline int
115{ return m_IDHEP[ihep]; }
116
117inline int
119{ return m_JMOHEP[ihep].first; }
120
121inline int
123{ return m_JMOHEP[ihep].second; }
124
125inline int
127{ return m_JDAHEP[ihep].first; }
128
129inline int
131{ return m_JDAHEP[ihep].second; }
132
133inline double
135{ return m_PHEP0[ihep]; }
136
137inline double
139{ return m_PHEP1[ihep]; }
140
141inline double
143{ return m_PHEP2[ihep]; }
144
145inline double
147{ return m_PHEP3[ihep]; }
148
149inline double
151{ return m_PHEP4[ihep]; }
152
153inline double
155{ return m_VHEP0[ihep]; }
156
157inline double
159{ return m_VHEP1[ihep]; }
160
161inline double
163{ return m_VHEP2[ihep]; }
164
165inline double
167{ return m_VHEP3[ihep]; }
168
169//
170// Set Methods
171//
172inline void
174{ m_NEVHEP = value; }
175
176inline void
178{ m_NHEP = value; }
179
180inline void
181Gen_HEPEVT::isthep (int& ihep, int value)
182{ m_ISTHEP[ihep] = value; }
183
184inline void
185Gen_HEPEVT::idhep (int& ihep, int value)
186{ m_IDHEP[ihep] = value; }
187
188inline void
189Gen_HEPEVT::mothers (int& ihep, int value1, int value2)
190{ m_JMOHEP[ihep] = std::make_pair(value1, value2); }
191
192inline void
193Gen_HEPEVT::daughters (int& ihep, int value1, int value2)
194{ m_JDAHEP[ihep] = std::make_pair(value1, value2); }
195
196inline void
197Gen_HEPEVT::momentum (int& ihep, double px, double py,
198 double pz, double e, double m )
199{
200 m_PHEP0[ihep] = px;
201 m_PHEP1[ihep] = py;
202 m_PHEP2[ihep] = pz;
203 m_PHEP3[ihep] = e;
204 m_PHEP4[ihep] = m;
205}
206
207inline void
208Gen_HEPEVT::position (int& ihep, double x, double y,
209 double z, double t)
210{
211 m_VHEP0[ihep] = x;
212 m_VHEP1[ihep] = y;
213 m_VHEP2[ihep] = z;
214 m_VHEP3[ihep] = t;
215}
216
217CLASS_DEF( Gen_HEPEVT, 2221, 1)
218
219#endif // GENERATORMODULES_GEN_HEPEVT_H
**********INTEGER nmxhep !maximum number of particles DOUBLE PRECISION vhep INTEGER idhep
**********INTEGER nmxhep !maximum number of particles DOUBLE PRECISION vhep INTEGER isthep
**********INTEGER nmxhep !maximum number of particles DOUBLE PRECISION vhep INTEGER jdahep COMMON hepevt $ !serial number $ !number of particles $ !status code $ !particle ident KF $ !parent particles $ !childreen particles $ !four momentum
CLASS_DEF(std::vector< std::string >, 10123, 1)
Double_t x[10]
double px(int ihep)
Definition Gen_HEPEVT.h:134
int nevhep(void) const
Definition Gen_HEPEVT.h:102
void mothers(int &ihep, int value1, int value2)
Definition Gen_HEPEVT.h:189
Gen_HEPEVT(void)
Definition Gen_HEPEVT.h:93
int last_parent(int ihep)
Definition Gen_HEPEVT.h:122
double y(int ihep)
Definition Gen_HEPEVT.h:158
double t(int ihep)
Definition Gen_HEPEVT.h:166
int nhep(void) const
Definition Gen_HEPEVT.h:106
int isthep(int ihep)
Definition Gen_HEPEVT.h:110
int idhep(int ihep)
Definition Gen_HEPEVT.h:114
void position(int &ihep, double x, double y, double z, double t)
Definition Gen_HEPEVT.h:208
int first_child(int ihep)
Definition Gen_HEPEVT.h:126
double m(int ihep)
Definition Gen_HEPEVT.h:150
void daughters(int &ihep, int value1, int value2)
Definition Gen_HEPEVT.h:193
void momentum(int &ihep, double px, double py, double pz, double e, double m)
Definition Gen_HEPEVT.h:197
double pz(int ihep)
Definition Gen_HEPEVT.h:142
double py(int ihep)
Definition Gen_HEPEVT.h:138
double e(int ihep)
Definition Gen_HEPEVT.h:146
double x(int ihep)
Definition Gen_HEPEVT.h:154
int first_parent(int ihep)
Definition Gen_HEPEVT.h:118
int last_child(int ihep)
Definition Gen_HEPEVT.h:130
double z(int ihep)
Definition Gen_HEPEVT.h:162
int t()
Definition t.c:1