BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
UParticle.h
Go to the documentation of this file.
1
#ifndef UPARTICLE_H
2
#define UPARTICLE_H
3
4
#include "
TLorentzVector.h
"
5
#include "
TMath.h
"
6
#include "
TObject.h
"
7
8
class
TParticle
;
9
10
/**
11
* unigen particle
12
*/
13
class
UParticle
:
public
TObject
14
{
15
16
private
:
17
Int_t
fIndex
;
// index of this particle
18
Int_t
fPdg
;
// PDG code
19
Int_t
fStatus
;
// Status
20
Int_t
fParent
;
// Index of parent
21
Int_t
fParentDecay
;
// Parent decay index
22
Int_t
fMate
;
// index of last collision partner
23
Int_t
fDecay
;
// decay index (-1 if not decayed)
24
Int_t
fChild
[2];
// index of first and last child
25
Double32_t
fPx
;
// px (GeV)
26
Double32_t
fPy
;
// py (GeV)
27
Double32_t
fPz
;
// pz (GeV)
28
Double32_t
fE
;
// Energy (GeV)
29
Double32_t
fX
;
// x (fm)
30
Double32_t
fY
;
// y (fm)
31
Double32_t
fZ
;
// z (fm)
32
Double32_t
fT
;
// t (fm)
33
Double32_t
fWeight
;
// weight
34
35
public
:
36
/**
37
* default constructor
38
*/
39
UParticle
();
40
/**
41
* constructor
42
* @param index particle index
43
* @param pdg pid of track
44
* @param status particle status
45
* @param parent parent index
46
* @param parentDecay parent decay index
47
* @param mate index of last collision partner
48
* @param decay decay index (-1 if not decayed)
49
* @param child index of first and last child
50
* @param px px momentum
51
* @param py py momentum
52
* @param pz pz momentum
53
* @param e energy
54
* @param x freezout -x
55
* @param y freezout -y
56
* @param z freezout - z
57
* @param t freezout - t
58
* @param weight particle weight
59
*/
60
UParticle
(
Int_t
index,
61
Int_t
pdg,
62
Int_t
status,
63
Int_t
parent,
64
Int_t
parentDecay,
65
Int_t
mate,
66
Int_t
decay,
67
Int_t
child[2],
68
Double_t
px,
69
Double_t
py,
70
Double_t
pz,
71
Double_t
e,
72
Double_t
x,
73
Double_t
y,
74
Double_t
z,
75
Double_t
t,
76
Double_t
weight);
77
/**
78
* constructor
79
* @param index particle index
80
* @param pdg pid of track
81
* @param status particle status
82
* @param parent parent index
83
* @param parentDecay parent decay index
84
* @param mate index of last collision partner
85
* @param decay decay index (-1 if not decayed)
86
* @param child index of first and last child
87
* @param mom particle momentum
88
* @param pos particle freezout postion
89
* @param weight particle weight
90
*/
91
UParticle
(
Int_t
index,
92
Int_t
pdg,
93
Int_t
status,
94
Int_t
parent,
95
Int_t
parentDecay,
96
Int_t
mate,
97
Int_t
decay,
98
Int_t
child[2],
99
TLorentzVector
mom,
100
TLorentzVector
pos,
101
Double_t
weight);
102
/**
103
* copy constructor
104
* @param right uparticle to copy
105
*/
106
UParticle
(
const
UParticle
& right);
107
/**
108
* copy ctor
109
* @param right TParticle to copy
110
*/
111
UParticle
(
const
TParticle
& right);
112
virtual
~UParticle
();
113
/**
114
* operator =
115
* @param right particle
116
* @return this overwriten particle
117
*/
118
const
UParticle
&
operator=
(
const
UParticle
& right);
119
/**
120
* copy TParticle into this particle
121
* @param right TParticle to copy
122
* @return copy of TParticle in Unigen format
123
*/
124
const
UParticle
&
operator=
(
const
TParticle
& right);
125
/**
126
* comare tracks
127
* @param right track to compare
128
* @return true if particles are the same, false otherwise
129
*/
130
const
Bool_t
operator==
(
const
UParticle
& right)
const
;
131
/**
132
* print info about this particle
133
* @param option not used
134
*/
135
void
Print
(
Option_t
* option =
""
);
136
/**
137
*
138
* @return particle index
139
*/
140
inline
Int_t
GetIndex
()
const
{
return
fIndex
; }
141
/**
142
*
143
* @return particle pid
144
*/
145
inline
Int_t
GetPdg
()
const
{
return
fPdg
; }
146
/**
147
*
148
* @return particle status
149
*/
150
inline
Int_t
GetStatus
()
const
{
return
fStatus
; }
151
/**
152
*
153
* @return particle's parent index
154
*/
155
inline
Int_t
GetParent
()
const
{
return
fParent
; }
156
/**
157
*
158
* @return particle's parent decay index
159
*/
160
inline
Int_t
GetParentDecay
()
const
{
return
fParentDecay
; }
161
/**
162
*
163
* @return index of last collision partner
164
*/
165
inline
Int_t
GetMate
()
const
{
return
fMate
; }
166
/**
167
*
168
* @return decay index (-1 if not decayed)
169
*/
170
inline
Int_t
GetDecay
()
const
{
return
fDecay
; }
171
/**
172
*
173
* @return first child index
174
*/
175
inline
Int_t
GetFirstChild
()
const
{
return
fChild
[0]; }
176
/**
177
*
178
* @return last child index
179
*/
180
inline
Int_t
GetLastChild
()
const
{
return
fChild
[1]; }
181
/**
182
*
183
* @return px
184
*/
185
inline
Double_t
Px
()
const
{
return
fPx
; }
186
/**
187
*
188
* @return py
189
*/
190
inline
Double_t
Py
()
const
{
return
fPy
; }
191
/**
192
*
193
* @return pz
194
*/
195
inline
Double_t
Pz
()
const
{
return
fPz
; }
196
/**
197
*
198
* @return energy
199
*/
200
inline
Double_t
E
()
const
{
return
fE
; }
201
/**
202
*
203
* @return track momentum
204
*/
205
inline
TLorentzVector
GetMomentum
()
const
{
return
TLorentzVector
(
fPx
,
fPy
,
fPz
,
fE
); }
206
/**
207
*
208
* @param mom momentum to fill
209
*/
210
inline
void
Momentum
(
TLorentzVector
& mom)
const
{ mom.
SetPxPyPzE
(
fPx
,
fPy
,
fPz
,
fE
); }
211
/**
212
*
213
* @return freezout-X
214
*/
215
inline
Double_t
X
()
const
{
return
fX
; }
216
/**
217
*
218
* @return freezout-Y
219
*/
220
inline
Double_t
Y
()
const
{
return
fY
; }
221
/**
222
*
223
* @return freezout-Z
224
*/
225
inline
Double_t
Z
()
const
{
return
fZ
; }
226
/**
227
*
228
* @return freezout-T
229
*/
230
inline
Double_t
T
()
const
{
return
fT
; }
231
/**
232
*
233
* @return freezout position
234
*/
235
inline
TLorentzVector
GetPosition
()
const
{
return
TLorentzVector
(
fX
,
fY
,
fZ
,
fT
); }
236
/**
237
*
238
* @param pos position to fill by this track position coord.
239
*/
240
inline
void
Position
(
TLorentzVector
& pos)
const
{ pos.
SetXYZT
(
fX
,
fY
,
fZ
,
fT
); }
241
/**
242
*
243
* @return particle weight
244
*/
245
inline
Double_t
GetWeight
()
const
{
return
fWeight
; }
246
/**
247
*
248
* @param index index
249
*/
250
inline
void
SetIndex
(
Int_t
index) {
fIndex
= index; }
251
/**
252
*
253
* @param pdg pid code
254
*/
255
inline
void
SetPdg
(
Int_t
pdg) {
fPdg
= pdg; }
256
/**
257
*
258
* @param status status
259
*/
260
inline
void
SetStatus
(
Int_t
status) {
fStatus
= status; }
261
/**
262
*
263
* @param parent parent index
264
*/
265
inline
void
SetParent
(
Int_t
parent) {
fParent
= parent; }
266
/**
267
*
268
* @param parentDecay parent decay index
269
*/
270
inline
void
SetParentDecay
(
Int_t
parentDecay) {
fParentDecay
= parentDecay; }
271
/**
272
*
273
* @param mate index of last collision partner
274
*/
275
inline
void
SetMate
(
Int_t
mate) {
fMate
= mate; }
276
/**
277
*
278
* @param decay decay code (-1 if no decayed)
279
*/
280
inline
void
SetDecay
(
Int_t
decay) {
fDecay
= decay; }
281
/**
282
*
283
* @param child index of first and last child
284
*/
285
inline
void
SetChild
(
Int_t
child[2])
286
{
287
fChild
[0] = child[0];
288
fChild
[1] = child[1];
289
}
290
/**
291
*
292
* @param child first child index
293
*/
294
inline
void
SetFirstChild
(
Int_t
child) {
fChild
[0] = child; }
295
/**
296
*
297
* @param child last child index
298
*/
299
inline
void
SetLastChild
(
Int_t
child) {
fChild
[1] = child; }
300
/**
301
*
302
* @param px px momentum
303
*/
304
inline
void
SetPx
(
Double_t
px) {
fPx
= px; }
305
/**
306
*
307
* @param py py momentum
308
*/
309
inline
void
SetPy
(
Double_t
py) {
fPy
= py; }
310
/**
311
*
312
* @param pz pz momentum
313
*/
314
inline
void
SetPz
(
Double_t
pz) {
fPz
= pz; }
315
/**
316
*
317
* @param e energy
318
*/
319
inline
void
SetE
(
Double_t
e) {
fE
= e; }
320
/**
321
* set momentum
322
* @param px px
323
* @param py py
324
* @param pz pz
325
* @param e energy
326
*/
327
inline
void
SetMomentum
(
Double_t
px,
Double_t
py,
Double_t
pz,
Double_t
e)
328
{
329
fPx
= px;
330
fPy
= py;
331
fPz
= pz;
332
fE
= e;
333
}
334
/**
335
* set momentum
336
* @param mom momentum
337
*/
338
inline
void
SetMomentum
(
TLorentzVector
mom)
339
{
340
fPx
= mom.
Px
();
341
fPy
= mom.
Py
();
342
fPz
= mom.
Pz
();
343
fE
= mom.
E
();
344
}
345
/**
346
*
347
* @param x freezout-X
348
*/
349
inline
void
SetX
(
Double_t
x) {
fX
= x; }
350
/**
351
*
352
* @param y freezout-Y
353
*/
354
inline
void
SetY
(
Double_t
y) {
fY
= y; }
355
/**
356
*
357
* @param z freezout-Z
358
*/
359
inline
void
SetZ
(
Double_t
z) {
fZ
= z; }
360
/**
361
*
362
* @param t freezout-T
363
*/
364
inline
void
SetT
(
Double_t
t) {
fT
= t; }
365
/**
366
* set freezout position
367
* @param x X
368
* @param y Y
369
* @param z Z
370
* @param t T
371
*/
372
inline
void
SetPosition
(
Double_t
x,
Double_t
y,
Double_t
z,
Double_t
t)
373
{
374
fX
= x;
375
fY
= y;
376
fZ
= z;
377
fT
= t;
378
}
379
/**
380
* set postition
381
* @param pos new position
382
*/
383
inline
void
SetPosition
(
TLorentzVector
pos)
384
{
385
fX
= pos.
X
();
386
fY
= pos.
Y
();
387
fZ
= pos.
Z
();
388
fT
= pos.
T
();
389
}
390
/**
391
*
392
* @param weight weight
393
*/
394
inline
void
SetWeight
(
Double_t
weight) {
fWeight
= weight; }
395
396
ClassDef
(
UParticle
, 1)
397
};
398
399
#endif
Bool_t
bool Bool_t
Int_t
int Int_t
Double32_t
double Double32_t
Double_t
double Double_t
Option_t
const char Option_t
ClassDef
#define ClassDef(name, id)
TLorentzVector.h
TMath.h
TObject.h
TLorentzVector
TLorentzVector::SetXYZT
void SetXYZT(Double_t x, Double_t y, Double_t z, Double_t t)
TLorentzVector::Y
Double_t Y() const
TLorentzVector::Px
Double_t Px() const
TLorentzVector::Pz
Double_t Pz() const
TLorentzVector::X
Double_t X() const
TLorentzVector::Py
Double_t Py() const
TLorentzVector::SetPxPyPzE
void SetPxPyPzE(Double_t px, Double_t py, Double_t pz, Double_t e)
TLorentzVector::E
Double_t E() const
TLorentzVector::Z
Double_t Z() const
TLorentzVector::T
Double_t T() const
TObject::TObject
TObject()
TParticle
UParticle
unigen particle
Definition
UParticle.h:14
UParticle::SetIndex
void SetIndex(Int_t index)
Definition
UParticle.h:250
UParticle::GetPdg
Int_t GetPdg() const
Definition
UParticle.h:145
UParticle::Py
Double_t Py() const
Definition
UParticle.h:190
UParticle::fX
Double32_t fX
Definition
UParticle.h:29
UParticle::GetDecay
Int_t GetDecay() const
Definition
UParticle.h:170
UParticle::SetChild
void SetChild(Int_t child[2])
Definition
UParticle.h:285
UParticle::SetY
void SetY(Double_t y)
Definition
UParticle.h:354
UParticle::fPx
Double32_t fPx
Definition
UParticle.h:25
UParticle::SetMomentum
void SetMomentum(Double_t px, Double_t py, Double_t pz, Double_t e)
set momentum
Definition
UParticle.h:327
UParticle::SetE
void SetE(Double_t e)
Definition
UParticle.h:319
UParticle::E
Double_t E() const
Definition
UParticle.h:200
UParticle::fZ
Double32_t fZ
Definition
UParticle.h:31
UParticle::Y
Double_t Y() const
Definition
UParticle.h:220
UParticle::Position
void Position(TLorentzVector &pos) const
Definition
UParticle.h:240
UParticle::fT
Double32_t fT
Definition
UParticle.h:32
UParticle::SetParent
void SetParent(Int_t parent)
Definition
UParticle.h:265
UParticle::UParticle
UParticle()
default constructor
Definition
UParticle.cxx:16
UParticle::fStatus
Int_t fStatus
Definition
UParticle.h:19
UParticle::GetMomentum
TLorentzVector GetMomentum() const
Definition
UParticle.h:205
UParticle::GetIndex
Int_t GetIndex() const
Definition
UParticle.h:140
UParticle::SetMomentum
void SetMomentum(TLorentzVector mom)
set momentum
Definition
UParticle.h:338
UParticle::SetX
void SetX(Double_t x)
Definition
UParticle.h:349
UParticle::fMate
Int_t fMate
Definition
UParticle.h:22
UParticle::operator=
const UParticle & operator=(const UParticle &right)
operator =
Definition
UParticle.cxx:127
UParticle::fE
Double32_t fE
Definition
UParticle.h:28
UParticle::GetMate
Int_t GetMate() const
Definition
UParticle.h:165
UParticle::GetWeight
Double_t GetWeight() const
Definition
UParticle.h:245
UParticle::SetDecay
void SetDecay(Int_t decay)
Definition
UParticle.h:280
UParticle::SetPdg
void SetPdg(Int_t pdg)
Definition
UParticle.h:255
UParticle::SetParentDecay
void SetParentDecay(Int_t parentDecay)
Definition
UParticle.h:270
UParticle::fParentDecay
Int_t fParentDecay
Definition
UParticle.h:21
UParticle::fPz
Double32_t fPz
Definition
UParticle.h:27
UParticle::GetParent
Int_t GetParent() const
Definition
UParticle.h:155
UParticle::GetPosition
TLorentzVector GetPosition() const
Definition
UParticle.h:235
UParticle::Pz
Double_t Pz() const
Definition
UParticle.h:195
UParticle::Px
Double_t Px() const
Definition
UParticle.h:185
UParticle::fIndex
Int_t fIndex
Definition
UParticle.h:17
UParticle::operator==
const Bool_t operator==(const UParticle &right) const
comare tracks
Definition
UParticle.cxx:179
UParticle::fWeight
Double32_t fWeight
Definition
UParticle.h:33
UParticle::SetPosition
void SetPosition(Double_t x, Double_t y, Double_t z, Double_t t)
set freezout position
Definition
UParticle.h:372
UParticle::Momentum
void Momentum(TLorentzVector &mom) const
Definition
UParticle.h:210
UParticle::GetFirstChild
Int_t GetFirstChild() const
Definition
UParticle.h:175
UParticle::SetPz
void SetPz(Double_t pz)
Definition
UParticle.h:314
UParticle::X
Double_t X() const
Definition
UParticle.h:215
UParticle::fPdg
Int_t fPdg
Definition
UParticle.h:18
UParticle::SetZ
void SetZ(Double_t z)
Definition
UParticle.h:359
UParticle::SetLastChild
void SetLastChild(Int_t child)
Definition
UParticle.h:299
UParticle::fDecay
Int_t fDecay
Definition
UParticle.h:23
UParticle::SetFirstChild
void SetFirstChild(Int_t child)
Definition
UParticle.h:294
UParticle::SetPosition
void SetPosition(TLorentzVector pos)
set postition
Definition
UParticle.h:383
UParticle::SetPx
void SetPx(Double_t px)
Definition
UParticle.h:304
UParticle::Z
Double_t Z() const
Definition
UParticle.h:225
UParticle::SetPy
void SetPy(Double_t py)
Definition
UParticle.h:309
UParticle::SetMate
void SetMate(Int_t mate)
Definition
UParticle.h:275
UParticle::SetWeight
void SetWeight(Double_t weight)
Definition
UParticle.h:394
UParticle::GetStatus
Int_t GetStatus() const
Definition
UParticle.h:150
UParticle::T
Double_t T() const
Definition
UParticle.h:230
UParticle::fPy
Double32_t fPy
Definition
UParticle.h:26
UParticle::fParent
Int_t fParent
Definition
UParticle.h:20
UParticle::fY
Double32_t fY
Definition
UParticle.h:30
UParticle::GetLastChild
Int_t GetLastChild() const
Definition
UParticle.h:180
UParticle::Print
void Print(Option_t *option="")
print info about this particle
Definition
UParticle.cxx:202
UParticle::fChild
Int_t fChild[2]
Definition
UParticle.h:24
UParticle::SetT
void SetT(Double_t t)
Definition
UParticle.h:364
UParticle::GetParentDecay
Int_t GetParentDecay() const
Definition
UParticle.h:160
UParticle::~UParticle
virtual ~UParticle()
Definition
UParticle.cxx:120
UParticle::SetStatus
void SetStatus(Int_t status)
Definition
UParticle.h:260
generators
unigen_format
UParticle.h
Generated on
for BmnRoot by
1.17.0