BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
UEvent.h
Go to the documentation of this file.
1#ifndef UEVENT_H
2#define UEVENT_H
3/**
4 * derived from Unigen project
5 * https://www.gsi.de/work/wissenschaftliche_netzwerke/helmholtz_virtuelle_institute/unigen.htm
6 */
7
8#include "TLorentzVector.h"
9#include "TNamed.h"
10#include "TObject.h"
11
12class TString;
13class TClonesArray;
14class UParticle;
15
16/**
17 * unigen event
18 */
19class UEvent : public TNamed
20{
21
22 private:
23 /**
24 * Event number
25 */
27 /**
28 * Impact parameter (fm)
29 */
31 /**
32 * Reaction plane angle
33 */
35 /**
36 * Number of event steps
37 */
38 Int_t fNes;
39 /**
40 * Event step number
41 */
43 /**
44 * Event step time
45 */
47 /**
48 * Number of particles
49 */
50 Int_t fNpa;
51 /**
52 * Generator-specific information
53 */
54 TString fComment;
55 /**
56 * Array of particles
57 */
59
60 public:
61 /**
62 * default constructor
63 */
65 /**
66 * copy constructor
67 * @param right object to copy
68 */
69 UEvent(const UEvent& right);
70 /**
71 * assignement operator
72 */
73 UEvent operator=(const UEvent& right);
74 virtual ~UEvent();
75 /**
76 * print info about event
77 * @param option if "all" then particles are also printed
78 */
79 void Print(Option_t* option = "");
80 /**
81 *
82 * @return event number
83 */
84 inline Int_t GetEventNr() const { return fEventNr; }
85 /**
86 *
87 * @return impact paramter
88 */
89 inline Double_t GetB() const { return fB; }
90 /**
91 *
92 * @return reaction plane angle
93 */
94 inline Double_t GetPhi() const { return fPhi; }
95 /**
96 *
97 * @return number of event steps
98 */
99 inline Int_t GetNes() const { return fNes; }
100 /**
101 *
102 * @return event step number
103 */
104 inline Int_t GetStepNr() const { return fStepNr; }
105 /**
106 *
107 * @return event step time
108 */
109 inline Double_t GetStepT() const { return fStepT; }
110 /**
111 *
112 * @return number of tracks
113 */
114 inline Int_t GetNpa() const { return fNpa; }
115 /**
116 *
117 * @return list of particles
118 */
119 inline TClonesArray* GetParticleList() const { return fParticles; }
120 /**
121 *
122 * @param comment comment
123 */
124 inline void GetComment(TString& comment) const { comment = fComment; }
125 /**
126 *
127 * @param index particle posistion
128 * @return particle at given position
129 */
131 /**
132 * set event parameters
133 * @param eventNr event number
134 * @param b impact parameter
135 * @param phi reaction plane nagle
136 * @param nes number of steps
137 * @param stepNr step number
138 * @param stepT step time
139 * @param comment comment
140 */
141 void SetParameters(Int_t eventNr,
142 Double_t b,
143 Double_t phi,
144 Int_t nes,
145 Int_t stepNr,
146 Double_t stepT,
147 const char* comment = "");
148 /**
149 *
150 * @param eventNr event nubmer
151 */
152 inline void SetEventNr(Int_t eventNr) { fEventNr = eventNr; }
153 /**
154 *
155 * @param b impact parameter
156 */
157 inline void SetB(Double_t b) { fB = b; }
158 /**
159 *
160 * @param phi reaction plane angle
161 */
162 inline void SetPhi(Double_t phi) { fPhi = phi; }
163 /**
164 *
165 * @param nes number of steps
166 */
167 inline void SetNes(Int_t nes) { fNes = nes; }
168 /**
169 *
170 * @param stepNr step number
171 */
172 inline void SetStepNr(Int_t stepNr) { fStepNr = stepNr; }
173 /**
174 *
175 * @param stepT step time
176 */
177 inline void SetStepT(Double_t stepT) { fStepT = stepT; }
178 /**
179 *
180 * @param comment comment
181 */
182 inline void SetComment(const char* comment) { fComment = comment; }
183 /**
184 * add particle
185 * @param index particle position
186 * @param pdg pid of track
187 * @param status particle status
188 * @param parent parent index
189 * @param parentDecay parent decay index
190 * @param mate index of last collision partner
191 * @param decay decay index (-1 if not decayed)
192 * @param child index of first and last child
193 * @param px px momentum
194 * @param py py momentum
195 * @param pz pz momentum
196 * @param e energy
197 * @param x freezout -x
198 * @param y freezout -y
199 * @param z freezout - z
200 * @param t freezout - t
201 * @param weight particle weight
202 */
203 void AddParticle(Int_t index,
204 Int_t pdg,
205 Int_t status,
206 Int_t parent,
207 Int_t parentDecay,
208 Int_t mate,
209 Int_t decay,
210 Int_t child[2],
211 Double_t px,
212 Double_t py,
213 Double_t pz,
214 Double_t e,
215 Double_t x,
216 Double_t y,
217 Double_t z,
218 Double_t t,
219 Double_t weight);
220 /**
221 *
222 * @param index particle position
223 * @param pdg pid of track
224 * @param status track status
225 * @param parent parent index
226 * @param parentDecay parent decay index
227 * @param mate index of last collision partner
228 * @param decay decay index (-1 if not decayed)
229 * @param child index of first and last child
230 * @param mom momentum
231 * @param pos freezout coordinates as
232 * @param weight
233 */
234 void AddParticle(Int_t index,
235 Int_t pdg,
236 Int_t status,
237 Int_t parent,
238 Int_t parentDecay,
239 Int_t mate,
240 Int_t decay,
241 Int_t child[2],
242 TLorentzVector mom,
243 TLorentzVector pos,
244 Double_t weight);
245 // void Rebuild(UEvent* ev);
246 /**
247 *
248 * @param particle particle to add
249 */
250 void AddParticle(const UParticle& particle);
251 /**
252 * clear this
253 */
254 void Clear();
255 /**
256 * clear this
257 * @param otp clear option
258 */
259 void Clear(Option_t* otp) { Clear(); };
260 /**
261 * remove particle
262 * @param i particle position
263 */
265
266 ClassDef(UEvent, 3)
267};
268
269#endif
int i
Definition P4_F32vec4.h:22
int Int_t
double Double_t
const char Option_t
#define ClassDef(name, id)
friend friend class TClonesArray
unigen event
Definition UEvent.h:20
Double_t fB
Impact parameter (fm).
Definition UEvent.h:30
TClonesArray * fParticles
Array of particles.
Definition UEvent.h:58
void SetNes(Int_t nes)
Definition UEvent.h:167
void SetPhi(Double_t phi)
Definition UEvent.h:162
Int_t fStepNr
Event step number.
Definition UEvent.h:42
Double_t fStepT
Event step time.
Definition UEvent.h:46
void Clear()
clear this
Int_t GetEventNr() const
Definition UEvent.h:84
void AddParticle(Int_t index, Int_t pdg, Int_t status, Int_t parent, Int_t parentDecay, Int_t mate, Int_t decay, Int_t child[2], Double_t px, Double_t py, Double_t pz, Double_t e, Double_t x, Double_t y, Double_t z, Double_t t, Double_t weight)
add particle
void RemoveAt(Int_t i)
remove particle
Int_t GetNpa() const
Definition UEvent.h:114
Double_t GetPhi() const
Definition UEvent.h:94
UEvent()
default constructor
UEvent(const UEvent &right)
copy constructor
void Clear(Option_t *otp)
clear this
Definition UEvent.h:259
void AddParticle(const UParticle &particle)
void SetComment(const char *comment)
Definition UEvent.h:182
TString fComment
Generator-specific information.
Definition UEvent.h:54
Int_t fEventNr
Event number.
Definition UEvent.h:26
void Print(Option_t *option="")
print info about event
void SetStepNr(Int_t stepNr)
Definition UEvent.h:172
Int_t GetNes() const
Definition UEvent.h:99
Double_t GetStepT() const
Definition UEvent.h:109
UEvent operator=(const UEvent &right)
assignement operator
TClonesArray * GetParticleList() const
Definition UEvent.h:119
void SetB(Double_t b)
Definition UEvent.h:157
void AddParticle(Int_t index, Int_t pdg, Int_t status, Int_t parent, Int_t parentDecay, Int_t mate, Int_t decay, Int_t child[2], TLorentzVector mom, TLorentzVector pos, Double_t weight)
Int_t fNpa
Number of particles.
Definition UEvent.h:50
Double_t fPhi
Reaction plane angle.
Definition UEvent.h:34
Int_t GetStepNr() const
Definition UEvent.h:104
UParticle * GetParticle(Int_t index) const
Int_t fNes
Number of event steps.
Definition UEvent.h:38
void GetComment(TString &comment) const
Definition UEvent.h:124
virtual ~UEvent()
void SetStepT(Double_t stepT)
Definition UEvent.h:177
void SetEventNr(Int_t eventNr)
Definition UEvent.h:152
void SetParameters(Int_t eventNr, Double_t b, Double_t phi, Int_t nes, Int_t stepNr, Double_t stepT, const char *comment="")
set event parameters
Double_t GetB() const
Definition UEvent.h:89
unigen particle
Definition UParticle.h:14