BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
MpdRainGenerator.cxx
Go to the documentation of this file.
1
#include "
MpdRainGenerator.h
"
2
3
#include "FairPrimaryGenerator.h"
4
5
#include <
TMath.h
>
6
#include <iostream>
7
8
MpdRainGenerator::MpdRainGenerator
()
9
:
_PDGType
(-1)
10
,
_N
(0)
11
,
_p
(0)
12
,
_theta
(0)
13
,
_phi
(0)
14
,
_height
(0)
15
,
_d
(-1)
16
{}
17
18
MpdRainGenerator::MpdRainGenerator
(
Int_t
pdgid,
19
Double_t
p,
20
Double_t
theta,
21
Double_t
phi,
22
Double_t
d,
23
Double_t
height,
24
Int_t
n
)
25
:
_PDGType
(pdgid)
26
,
_N
(
n
)
27
,
_p
(p)
28
,
_theta
(theta)
29
,
_phi
(phi)
30
,
_height
(height)
31
,
_d
(d)
32
{}
33
34
Bool_t
MpdRainGenerator::ReadEvent
(FairPrimaryGenerator* primGen)
35
{
36
37
// Check for particle type
38
if
(
_PDGType
== -1)
39
Fatal
(
"MpdRainGenerator"
,
"PDG code not defined."
);
40
41
for
(
int
i
= -
_N
;
i
<
_N
;
i
++)
42
for
(
int
j = -
_N
; j <
_N
; j++) {
43
TVector3
point(
i
*
_d
, j *
_d
,
_height
);
44
point.
RotateY
(
_theta
);
45
point.
RotateZ
(
_phi
);
46
47
TVector3
m
;
48
m
.SetMagThetaPhi(
_p
,
_theta
,
_phi
);
49
m
= -
m
;
50
51
primGen->AddTrack(
_PDGType
,
m
.X(),
m
.Y(),
m
.Z(), point.
X
(), point.
Y
(), point.
Z
());
52
}
53
54
return
kTRUE
;
55
}
i
int i
Definition
P4_F32vec4.h:22
m
__m128 m
Definition
P4_F32vec4.h:27
Bool_t
bool Bool_t
Int_t
int Int_t
Double_t
double Double_t
kTRUE
constexpr Bool_t kTRUE
Fatal
void Fatal(const char *location, const char *msgfmt,...)
TMath.h
MpdRainGenerator::_phi
Double_t _phi
Definition
MpdRainGenerator.h:14
MpdRainGenerator::_d
Double_t _d
Definition
MpdRainGenerator.h:16
MpdRainGenerator::MpdRainGenerator
MpdRainGenerator()
Definition
MpdRainGenerator.cxx:8
MpdRainGenerator::_height
Double_t _height
Definition
MpdRainGenerator.h:15
MpdRainGenerator::_N
Int_t _N
Definition
MpdRainGenerator.h:11
MpdRainGenerator::_p
Double_t _p
Definition
MpdRainGenerator.h:12
MpdRainGenerator::_PDGType
Int_t _PDGType
Definition
MpdRainGenerator.h:10
MpdRainGenerator::ReadEvent
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
Definition
MpdRainGenerator.cxx:34
MpdRainGenerator::_theta
Double_t _theta
Definition
MpdRainGenerator.h:13
TVector3
TVector3::Z
Double_t Z() const
TVector3::Y
Double_t Y() const
TVector3::RotateZ
void RotateZ(Double_t)
TVector3::X
Double_t X() const
TVector3::RotateY
void RotateY(Double_t)
MpdRainGenerator.h
n
*brief user defined string literal for JSON values *sa std::size_t n
Definition
json.hpp:20362
generators
MpdRainGenerator.cxx
Generated on
for BmnRoot by
1.17.0